difit 3.1.17 → 4.0.0

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 (94) hide show
  1. package/README.ja.md +30 -3
  2. package/README.ko.md +30 -3
  3. package/README.md +30 -3
  4. package/README.zh.md +30 -3
  5. package/dist/cli/github.d.ts +65 -0
  6. package/dist/cli/github.js +296 -0
  7. package/dist/cli/github.test.d.ts +1 -0
  8. package/dist/cli/github.test.js +341 -0
  9. package/dist/cli/index.js +26 -1
  10. package/dist/cli/index.test.js +206 -4
  11. package/dist/cli/utils.d.ts +2 -8
  12. package/dist/cli/utils.js +43 -56
  13. package/dist/cli/utils.test.js +61 -67
  14. package/dist/client/assets/{_basePickBy-r8KiD0PT.js → _basePickBy-B9N-f0iT.js} +1 -1
  15. package/dist/client/assets/{_baseUniq-WYpg9s_f.js → _baseUniq-tbL7nVvN.js} +1 -1
  16. package/dist/client/assets/{arc-BZWd656X.js → arc-BOY-7mep.js} +1 -1
  17. package/dist/client/assets/{architectureDiagram-2XIMDMQ5-BiaoV1Oc.js → architectureDiagram-2XIMDMQ5-59AvHaSB.js} +1 -1
  18. package/dist/client/assets/{blockDiagram-WCTKOSBZ-T1RU4TI6.js → blockDiagram-WCTKOSBZ-DXIlumQk.js} +1 -1
  19. package/dist/client/assets/{c4Diagram-IC4MRINW-C1aQSMsj.js → c4Diagram-IC4MRINW-BbfZ0uRn.js} +1 -1
  20. package/dist/client/assets/channel-cZXsTJxA.js +1 -0
  21. package/dist/client/assets/{chunk-4BX2VUAB-DFcwtPlK.js → chunk-4BX2VUAB-l7rcB2IW.js} +1 -1
  22. package/dist/client/assets/{chunk-55IACEB6-Bl3vvNDx.js → chunk-55IACEB6-CrZL3qv9.js} +1 -1
  23. package/dist/client/assets/{chunk-FMBD7UC4-B_2obFwM.js → chunk-FMBD7UC4-CrKv7ndg.js} +1 -1
  24. package/dist/client/assets/{chunk-JSJVCQXG-BrSq4jyX.js → chunk-JSJVCQXG-DyBDhAEM.js} +1 -1
  25. package/dist/client/assets/{chunk-KX2RTZJC-18m3UONJ.js → chunk-KX2RTZJC-By5mkZmU.js} +1 -1
  26. package/dist/client/assets/{chunk-NQ4KR5QH-hFDbMzZU.js → chunk-NQ4KR5QH-C30p9xRx.js} +1 -1
  27. package/dist/client/assets/{chunk-QZHKN3VN-CyCFXX2j.js → chunk-QZHKN3VN-DVlhR2wU.js} +1 -1
  28. package/dist/client/assets/{chunk-WL4C6EOR-BDdHa7t1.js → chunk-WL4C6EOR-Cn7a6CO3.js} +1 -1
  29. package/dist/client/assets/classDiagram-VBA2DB6C-B_coIPEy.js +1 -0
  30. package/dist/client/assets/classDiagram-v2-RAHNMMFH-B_coIPEy.js +1 -0
  31. package/dist/client/assets/clone-BjaT2HOk.js +1 -0
  32. package/dist/client/assets/{cose-bilkent-S5V4N54A-D7t718Sq.js → cose-bilkent-S5V4N54A-LyauIk_9.js} +1 -1
  33. package/dist/client/assets/{dagre-KLK3FWXG-DJXcjsV8.js → dagre-KLK3FWXG-DRWb2KE3.js} +1 -1
  34. package/dist/client/assets/{diagram-E7M64L7V-DL8ck_Al.js → diagram-E7M64L7V-ChT6mNWK.js} +1 -1
  35. package/dist/client/assets/{diagram-IFDJBPK2-NTxUWyD3.js → diagram-IFDJBPK2-CqbTduoP.js} +1 -1
  36. package/dist/client/assets/{diagram-P4PSJMXO-CGkcnGxk.js → diagram-P4PSJMXO-Bzv5Z3ri.js} +1 -1
  37. package/dist/client/assets/{erDiagram-INFDFZHY-BqpbHQrZ.js → erDiagram-INFDFZHY-CvXfUZ4L.js} +1 -1
  38. package/dist/client/assets/{flowDiagram-PKNHOUZH-B-DK3_9I.js → flowDiagram-PKNHOUZH-CxmpNUKq.js} +1 -1
  39. package/dist/client/assets/{ganttDiagram-A5KZAMGK-BK1C57ll.js → ganttDiagram-A5KZAMGK-9LpZCsg6.js} +1 -1
  40. package/dist/client/assets/{gitGraphDiagram-K3NZZRJ6-Duxlcz8R.js → gitGraphDiagram-K3NZZRJ6-C6yZOrQJ.js} +1 -1
  41. package/dist/client/assets/{graph-C7r58m4O.js → graph-bUZ7uHLW.js} +1 -1
  42. package/dist/client/assets/index-BLNN1bfE.js +98 -0
  43. package/dist/client/assets/index-VxkpzDXr.css +1 -0
  44. package/dist/client/assets/{infoDiagram-LFFYTUFH-Bqt-4V9X.js → infoDiagram-LFFYTUFH-Djdy3W21.js} +1 -1
  45. package/dist/client/assets/{ishikawaDiagram-PHBUUO56-B1ZVSkls.js → ishikawaDiagram-PHBUUO56-oOdwCpeS.js} +1 -1
  46. package/dist/client/assets/{journeyDiagram-4ABVD52K-LSEcxqrO.js → journeyDiagram-4ABVD52K-DTb_nGAw.js} +1 -1
  47. package/dist/client/assets/{kanban-definition-K7BYSVSG-CldPadPs.js → kanban-definition-K7BYSVSG-CMtP7pHA.js} +1 -1
  48. package/dist/client/assets/{layout-NpxIVVkp.js → layout-CXr5MatK.js} +1 -1
  49. package/dist/client/assets/{linear-JpKpxaS-.js → linear-pOMS9pjV.js} +1 -1
  50. package/dist/client/assets/{mermaid.core-gANNEmg0.js → mermaid.core-DV5JJ1Ie.js} +4 -4
  51. package/dist/client/assets/{mindmap-definition-YRQLILUH-ewFI1yc5.js → mindmap-definition-YRQLILUH-DN-sbonc.js} +1 -1
  52. package/dist/client/assets/{pieDiagram-SKSYHLDU-CWlAr2t8.js → pieDiagram-SKSYHLDU-tAHCkgh1.js} +1 -1
  53. package/dist/client/assets/{prism-csharp-CxRfePTX.js → prism-csharp-5CQ0RcEE.js} +1 -1
  54. package/dist/client/assets/{prism-elixir-B0H1PC_E.js → prism-elixir-BSOTyVg2.js} +1 -1
  55. package/dist/client/assets/{prism-hcl-Csmcce-t.js → prism-hcl-BYvi1mtM.js} +1 -1
  56. package/dist/client/assets/{prism-java-BRzwomgj.js → prism-java-DMU2FM4X.js} +1 -1
  57. package/dist/client/assets/{prism-perl-DQMRA6u_.js → prism-perl-CpfvaEQk.js} +1 -1
  58. package/dist/client/assets/{prism-php-C6fR1C7-.js → prism-php-SC920LoD.js} +1 -1
  59. package/dist/client/assets/{prism-ruby-CWeh27h1.js → prism-ruby-DZph-YiO.js} +1 -1
  60. package/dist/client/assets/{prism-solidity-3wCU4ra_.js → prism-solidity-qTLbmiAT.js} +1 -1
  61. package/dist/client/assets/{quadrantDiagram-337W2JSQ-D76E3PCD.js → quadrantDiagram-337W2JSQ-B0wODmgR.js} +1 -1
  62. package/dist/client/assets/{requirementDiagram-Z7DCOOCP-C49LvKzR.js → requirementDiagram-Z7DCOOCP-A3aeHC06.js} +1 -1
  63. package/dist/client/assets/{sankeyDiagram-WA2Y5GQK-DOvEhLMf.js → sankeyDiagram-WA2Y5GQK-BWa6kZhG.js} +1 -1
  64. package/dist/client/assets/{sequenceDiagram-2WXFIKYE-BR6dsfEq.js → sequenceDiagram-2WXFIKYE-Cx_COX9G.js} +1 -1
  65. package/dist/client/assets/{stateDiagram-RAJIS63D-CHII26YE.js → stateDiagram-RAJIS63D-BXGnN6rZ.js} +1 -1
  66. package/dist/client/assets/stateDiagram-v2-FVOUBMTO-CMw3xNha.js +1 -0
  67. package/dist/client/assets/{timeline-definition-YZTLITO2-DhUTiAsW.js → timeline-definition-YZTLITO2-DbqaUm9k.js} +1 -1
  68. package/dist/client/assets/{treemap-KZPCXAKY-C0Rh3R0y.js → treemap-KZPCXAKY-CfEujPCR.js} +1 -1
  69. package/dist/client/assets/{vennDiagram-LZ73GAT5-CWt3wBDG.js → vennDiagram-LZ73GAT5-CqJE8CAD.js} +1 -1
  70. package/dist/client/assets/{xychartDiagram-JWTSCODW-DhwJwxGz.js → xychartDiagram-JWTSCODW-CfdDvzHC.js} +1 -1
  71. package/dist/client/index.html +2 -2
  72. package/dist/server/generated-file-check.js +113 -58
  73. package/dist/server/generated-file-check.test.js +2 -0
  74. package/dist/server/git-diff.d.ts +1 -0
  75. package/dist/server/git-diff.js +33 -6
  76. package/dist/server/git-diff.test.js +45 -0
  77. package/dist/server/server.d.ts +2 -0
  78. package/dist/server/server.js +107 -34
  79. package/dist/server/server.test.js +120 -0
  80. package/dist/types/diff.d.ts +73 -14
  81. package/dist/utils/commentFormatting.d.ts +4 -2
  82. package/dist/utils/commentFormatting.js +57 -19
  83. package/dist/utils/commentImports.d.ts +9 -0
  84. package/dist/utils/commentImports.js +264 -0
  85. package/dist/utils/commentImports.test.d.ts +1 -0
  86. package/dist/utils/commentImports.test.js +197 -0
  87. package/package.json +3 -3
  88. package/dist/client/assets/channel-C081SflL.js +0 -1
  89. package/dist/client/assets/classDiagram-VBA2DB6C-CD8hB8X7.js +0 -1
  90. package/dist/client/assets/classDiagram-v2-RAHNMMFH-CD8hB8X7.js +0 -1
  91. package/dist/client/assets/clone-DL1yO1kL.js +0 -1
  92. package/dist/client/assets/index-DcsVWNsS.css +0 -1
  93. package/dist/client/assets/index-Igyd6olF.js +0 -92
  94. package/dist/client/assets/stateDiagram-v2-FVOUBMTO-DtCFGPiV.js +0 -1
@@ -1,92 +0,0 @@
1
- function PS(e,r){for(var i=0;i<r.length;i++){const l=r[i];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(l,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();const e1="data-theme",VS={"--color-github-bg-primary":"#0d1117","--color-github-bg-secondary":"#161b22","--color-github-bg-tertiary":"#21262d","--color-github-border":"#30363d","--color-github-text-primary":"#f0f6fc","--color-github-text-secondary":"#8b949e","--color-github-text-muted":"#6e7681","--color-github-accent":"#238636","--color-github-danger":"#da3633","--color-github-warning":"#d29922","--color-diff-addition-bg":"#0d4429","--color-diff-addition-border":"#1b7c3d","--color-diff-deletion-bg":"#67060c","--color-diff-deletion-border":"#da3633","--color-diff-neutral-bg":"#21262d","--color-comment-bg":"#1c2128","--color-comment-border":"#373e47","--color-comment-text":"#e6edf3","--color-yellow-btn-bg":"rgba(180, 83, 9, 0.2)","--color-yellow-btn-border":"rgba(217, 119, 6, 0.5)","--color-yellow-btn-text":"#fbbf24","--color-yellow-btn-hover-bg":"rgba(180, 83, 9, 0.3)","--color-yellow-btn-hover-border":"#d97706","--color-yellow-path-bg":"rgba(180, 83, 9, 0.3)","--color-yellow-path-text":"#fbbf24","--color-editor-btn-bg":"rgba(248, 250, 252, 0.1)","--color-editor-btn-border":"rgba(248, 250, 252, 0.3)","--color-editor-btn-text":"#f0f6fc","--color-editor-btn-hover-bg":"rgba(248, 250, 252, 0.2)","--color-editor-btn-hover-border":"rgba(248, 250, 252, 0.45)"},GS={"--color-github-bg-primary":"#ffffff","--color-github-bg-secondary":"#f6f8fa","--color-github-bg-tertiary":"#f1f3f4","--color-github-border":"#d1d9e0","--color-github-text-primary":"#24292f","--color-github-text-secondary":"#656d76","--color-github-text-muted":"#8c959f","--color-github-accent":"#1f883d","--color-github-danger":"#cf222e","--color-github-warning":"#bf8700","--color-diff-addition-bg":"#d1f4cd","--color-diff-addition-border":"#1f883d","--color-diff-deletion-bg":"#ffd8d3","--color-diff-deletion-border":"#cf222e","--color-diff-neutral-bg":"#f1f3f4","--color-comment-bg":"#fff8e1","--color-comment-border":"#ffd54f","--color-comment-text":"#5d4037","--color-yellow-btn-bg":"#fef3c7","--color-yellow-btn-border":"#f59e0b","--color-yellow-btn-text":"#92400e","--color-yellow-btn-hover-bg":"#fde68a","--color-yellow-btn-hover-border":"#d97706","--color-yellow-path-bg":"#fde68a","--color-yellow-path-text":"#92400e","--color-editor-btn-bg":"rgba(248, 250, 252, 0.1)","--color-editor-btn-border":"rgba(31, 41, 55, 0.35)","--color-editor-btn-text":"#1f2937","--color-editor-btn-hover-bg":"rgba(248, 250, 252, 0.2)","--color-editor-btn-hover-border":"rgba(31, 41, 55, 0.5)"},YS={dark:VS,light:GS},Id="reviewit-appearance-settings",XS=e=>e==="light"||e==="dark"||e==="auto",ZS=e=>e==="normal"||e==="deuteranopia",KS=e=>e==="light"||e==="dark",ph=()=>{if(!(typeof window>"u"))try{return window.localStorage}catch{return}},mh=()=>{if(!(typeof window>"u"))return window};function t1(e=ph()){if(!e)return null;try{const r=e.getItem(Id);if(!r)return null;const i=JSON.parse(r);if(i&&typeof i=="object"){const l={},o=i;return XS(o.theme)&&(l.theme=o.theme),ZS(o.colorVision)&&(l.colorVision=o.colorVision),l}}catch{return null}return null}function gh(e=mh()){return e?.matchMedia("(prefers-color-scheme: dark)").matches??!0?"dark":"light"}function Fs(e,r=gh()){return e==="light"||e==="dark"?e:r}function Ub(e=typeof document>"u"?void 0:document,r=ph(),i=mh()){const l=e?.documentElement.getAttribute(e1)??null;return KS(l)?l:Fs(t1(r)?.theme,gh(i))}const QS={"--color-github-accent":"#58a6ff","--color-github-danger":"#d29922","--color-diff-addition-bg":"#0c2d6b","--color-diff-addition-border":"#388bfd","--color-diff-deletion-bg":"#5a3600","--color-diff-deletion-border":"#d29922"},JS={"--color-github-accent":"#0969da","--color-github-danger":"#bf8700","--color-diff-addition-bg":"#ddf4ff","--color-diff-addition-border":"#0969da","--color-diff-deletion-bg":"#fff8c5","--color-diff-deletion-border":"#bf8700"},WS={dark:QS,light:JS};function n1(e,r="normal",i=document){const l=i.documentElement;l.setAttribute(e1,e),l.setAttribute("data-color-vision",r);const o=YS[e];if(Object.entries(o).forEach(([u,c])=>{l.style.setProperty(u,c)}),r==="deuteranopia"){const u=WS[e];Object.entries(u).forEach(([c,f])=>{l.style.setProperty(c,f)})}i.body&&(i.body.style.backgroundColor="var(--color-github-bg-primary)",i.body.style.color="var(--color-github-text-primary)")}function e2(e=typeof document>"u"?void 0:document,r=ph(),i=mh()){if(!e)return null;const l=t1(r),o=Fs(l?.theme,gh(i)),u=l?.colorVision??"normal";return n1(o,u,e),o}e2();function gu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hj(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if(typeof r=="function"){var i=function l(){var o=!1;try{o=this instanceof l}catch{}return o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};i.prototype=r.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}),i}var Gf={exports:{}},La={};var Hb;function t2(){if(Hb)return La;Hb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(l,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:l,key:c,ref:o!==void 0?o:null,props:u}}return La.Fragment=r,La.jsx=i,La.jsxs=i,La}var qb;function n2(){return qb||(qb=1,Gf.exports=t2()),Gf.exports}var y=n2(),Yf={exports:{}},_e={};var $b;function r2(){if($b)return _e;$b=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,N={};function E(D,$,T){this.props=D,this.context=$,this.refs=N,this.updater=T||w}E.prototype.isReactComponent={},E.prototype.setState=function(D,$){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,$,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=E.prototype;function j(D,$,T){this.props=D,this.context=$,this.refs=N,this.updater=T||w}var O=j.prototype=new C;O.constructor=j,S(O,E.prototype),O.isPureReactComponent=!0;var U=Array.isArray;function _(){}var F={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function H(D,$,T){var W=T.ref;return{$$typeof:e,type:D,key:$,ref:W!==void 0?W:null,props:T}}function M(D,$){return H(D.type,$,D.props)}function P(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function V(D){var $={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(T){return $[T]})}var J=/\/+/g;function I(D,$){return typeof D=="object"&&D!==null&&D.key!=null?V(""+D.key):$.toString(36)}function Z(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(_,_):(D.status="pending",D.then(function($){D.status==="pending"&&(D.status="fulfilled",D.value=$)},function($){D.status==="pending"&&(D.status="rejected",D.reason=$)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function B(D,$,T,W,te){var ce=typeof D;(ce==="undefined"||ce==="boolean")&&(D=null);var me=!1;if(D===null)me=!0;else switch(ce){case"bigint":case"string":case"number":me=!0;break;case"object":switch(D.$$typeof){case e:case r:me=!0;break;case b:return me=D._init,B(me(D._payload),$,T,W,te)}}if(me)return te=te(D),me=W===""?"."+I(D,0):W,U(te)?(T="",me!=null&&(T=me.replace(J,"$&/")+"/"),B(te,$,T,"",function(ve){return ve})):te!=null&&(P(te)&&(te=M(te,T+(te.key==null||D&&D.key===te.key?"":(""+te.key).replace(J,"$&/")+"/")+me)),$.push(te)),1;me=0;var xe=W===""?".":W+":";if(U(D))for(var ge=0;ge<D.length;ge++)W=D[ge],ce=xe+I(W,ge),me+=B(W,$,T,ce,te);else if(ge=v(D),typeof ge=="function")for(D=ge.call(D),ge=0;!(W=D.next()).done;)W=W.value,ce=xe+I(W,ge++),me+=B(W,$,T,ce,te);else if(ce==="object"){if(typeof D.then=="function")return B(Z(D),$,T,W,te);throw $=String(D),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return me}function Y(D,$,T){if(D==null)return D;var W=[],te=0;return B(D,W,"","",function(ce){return $.call(T,ce,te++)}),W}function X(D){if(D._status===-1){var $=D._result;$=$(),$.then(function(T){(D._status===0||D._status===-1)&&(D._status=1,D._result=T)},function(T){(D._status===0||D._status===-1)&&(D._status=2,D._result=T)}),D._status===-1&&(D._status=0,D._result=$)}if(D._status===1)return D._result.default;throw D._result}var q=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:Y,forEach:function(D,$,T){Y(D,function(){$.apply(this,arguments)},T)},count:function(D){var $=0;return Y(D,function(){$++}),$},toArray:function(D){return Y(D,function($){return $})||[]},only:function(D){if(!P(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return _e.Activity=g,_e.Children=R,_e.Component=E,_e.Fragment=i,_e.Profiler=o,_e.PureComponent=j,_e.StrictMode=l,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,_e.__COMPILER_RUNTIME={__proto__:null,c:function(D){return F.H.useMemoCache(D)}},_e.cache=function(D){return function(){return D.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(D,$,T){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var W=S({},D.props),te=D.key;if($!=null)for(ce in $.key!==void 0&&(te=""+$.key),$)!z.call($,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&$.ref===void 0||(W[ce]=$[ce]);var ce=arguments.length-2;if(ce===1)W.children=T;else if(1<ce){for(var me=Array(ce),xe=0;xe<ce;xe++)me[xe]=arguments[xe+2];W.children=me}return H(D.type,te,W)},_e.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},_e.createElement=function(D,$,T){var W,te={},ce=null;if($!=null)for(W in $.key!==void 0&&(ce=""+$.key),$)z.call($,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(te[W]=$[W]);var me=arguments.length-2;if(me===1)te.children=T;else if(1<me){for(var xe=Array(me),ge=0;ge<me;ge++)xe[ge]=arguments[ge+2];te.children=xe}if(D&&D.defaultProps)for(W in me=D.defaultProps,me)te[W]===void 0&&(te[W]=me[W]);return H(D,ce,te)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(D){return{$$typeof:f,render:D}},_e.isValidElement=P,_e.lazy=function(D){return{$$typeof:b,_payload:{_status:-1,_result:D},_init:X}},_e.memo=function(D,$){return{$$typeof:h,type:D,compare:$===void 0?null:$}},_e.startTransition=function(D){var $=F.T,T={};F.T=T;try{var W=D(),te=F.S;te!==null&&te(T,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(_,q)}catch(ce){q(ce)}finally{$!==null&&T.types!==null&&($.types=T.types),F.T=$}},_e.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},_e.use=function(D){return F.H.use(D)},_e.useActionState=function(D,$,T){return F.H.useActionState(D,$,T)},_e.useCallback=function(D,$){return F.H.useCallback(D,$)},_e.useContext=function(D){return F.H.useContext(D)},_e.useDebugValue=function(){},_e.useDeferredValue=function(D,$){return F.H.useDeferredValue(D,$)},_e.useEffect=function(D,$){return F.H.useEffect(D,$)},_e.useEffectEvent=function(D){return F.H.useEffectEvent(D)},_e.useId=function(){return F.H.useId()},_e.useImperativeHandle=function(D,$,T){return F.H.useImperativeHandle(D,$,T)},_e.useInsertionEffect=function(D,$){return F.H.useInsertionEffect(D,$)},_e.useLayoutEffect=function(D,$){return F.H.useLayoutEffect(D,$)},_e.useMemo=function(D,$){return F.H.useMemo(D,$)},_e.useOptimistic=function(D,$){return F.H.useOptimistic(D,$)},_e.useReducer=function(D,$,T){return F.H.useReducer(D,$,T)},_e.useRef=function(D){return F.H.useRef(D)},_e.useState=function(D){return F.H.useState(D)},_e.useSyncExternalStore=function(D,$,T){return F.H.useSyncExternalStore(D,$,T)},_e.useTransition=function(){return F.H.useTransition()},_e.version="19.2.4",_e}var Pb;function bh(){return Pb||(Pb=1,Yf.exports=r2()),Yf.exports}var A=bh();const Qt=gu(A),r1=PS({__proto__:null,default:Qt},[A]);var Xf={exports:{}},Da={},Zf={exports:{}},Kf={};var Vb;function i2(){return Vb||(Vb=1,(function(e){function r(B,Y){var X=B.length;B.push(Y);e:for(;0<X;){var q=X-1>>>1,R=B[q];if(0<o(R,Y))B[q]=Y,B[X]=R,X=q;else break e}}function i(B){return B.length===0?null:B[0]}function l(B){if(B.length===0)return null;var Y=B[0],X=B.pop();if(X!==Y){B[0]=X;e:for(var q=0,R=B.length,D=R>>>1;q<D;){var $=2*(q+1)-1,T=B[$],W=$+1,te=B[W];if(0>o(T,X))W<R&&0>o(te,T)?(B[q]=te,B[W]=X,q=W):(B[q]=T,B[$]=X,q=$);else if(W<R&&0>o(te,X))B[q]=te,B[W]=X,q=W;else break e}}return Y}function o(B,Y){var X=B.sortIndex-Y.sortIndex;return X!==0?X:B.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],h=[],b=1,g=null,x=3,v=!1,w=!1,S=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function O(B){for(var Y=i(h);Y!==null;){if(Y.callback===null)l(h);else if(Y.startTime<=B)l(h),Y.sortIndex=Y.expirationTime,r(p,Y);else break;Y=i(h)}}function U(B){if(S=!1,O(B),!w)if(i(p)!==null)w=!0,_||(_=!0,V());else{var Y=i(h);Y!==null&&Z(U,Y.startTime-B)}}var _=!1,F=-1,z=5,H=-1;function M(){return N?!0:!(e.unstable_now()-H<z)}function P(){if(N=!1,_){var B=e.unstable_now();H=B;var Y=!0;try{e:{w=!1,S&&(S=!1,C(F),F=-1),v=!0;var X=x;try{t:{for(O(B),g=i(p);g!==null&&!(g.expirationTime>B&&M());){var q=g.callback;if(typeof q=="function"){g.callback=null,x=g.priorityLevel;var R=q(g.expirationTime<=B);if(B=e.unstable_now(),typeof R=="function"){g.callback=R,O(B),Y=!0;break t}g===i(p)&&l(p),O(B)}else l(p);g=i(p)}if(g!==null)Y=!0;else{var D=i(h);D!==null&&Z(U,D.startTime-B),Y=!1}}break e}finally{g=null,x=X,v=!1}Y=void 0}}finally{Y?V():_=!1}}}var V;if(typeof j=="function")V=function(){j(P)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,I=J.port2;J.port1.onmessage=P,V=function(){I.postMessage(null)}}else V=function(){E(P,0)};function Z(B,Y){F=E(function(){B(e.unstable_now())},Y)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(B){switch(x){case 1:case 2:case 3:var Y=3;break;default:Y=x}var X=x;x=Y;try{return B()}finally{x=X}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var X=x;x=B;try{return Y()}finally{x=X}},e.unstable_scheduleCallback=function(B,Y,X){var q=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?q+X:q):X=q,B){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=X+R,B={id:b++,callback:Y,priorityLevel:B,startTime:X,expirationTime:R,sortIndex:-1},X>q?(B.sortIndex=X,r(h,B),i(p)===null&&B===i(h)&&(S?(C(F),F=-1):S=!0,Z(U,X-q))):(B.sortIndex=R,r(p,B),w||v||(w=!0,_||(_=!0,V()))),B},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(B){var Y=x;return function(){var X=x;x=Y;try{return B.apply(this,arguments)}finally{x=X}}}})(Kf)),Kf}var Gb;function l2(){return Gb||(Gb=1,Zf.exports=i2()),Zf.exports}var Qf={exports:{}},qt={};var Yb;function a2(){if(Yb)return qt;Yb=1;var e=bh();function r(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(p,h,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:h,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,qt.createPortal=function(p,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return u(p,h,null,b)},qt.flushSync=function(p){var h=c.T,b=l.p;try{if(c.T=null,l.p=2,p)return p()}finally{c.T=h,l.p=b,l.d.f()}},qt.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(p,h))},qt.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},qt.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?l.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:v}):b==="script"&&l.d.X(p,{crossOrigin:g,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=f(h.as,h.crossOrigin);l.d.M(p,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(p)},qt.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin);l.d.L(p,b,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qt.preloadModule=function(p,h){if(typeof p=="string")if(h){var b=f(h.as,h.crossOrigin);l.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(p)},qt.requestFormReset=function(p){l.d.r(p)},qt.unstable_batchedUpdates=function(p,h){return p(h)},qt.useFormState=function(p,h,b){return c.H.useFormState(p,h,b)},qt.useFormStatus=function(){return c.H.useHostTransitionStatus()},qt.version="19.2.4",qt}var Xb;function i1(){if(Xb)return Qf.exports;Xb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Qf.exports=a2(),Qf.exports}var Zb;function o2(){if(Zb)return Da;Zb=1;var e=l2(),r=bh(),i=i1();function l(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function c(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(l(188))}function h(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(l(188));return n!==t?null:t}for(var a=t,s=n;;){var d=a.return;if(d===null)break;var m=d.alternate;if(m===null){if(s=d.return,s!==null){a=s;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===a)return p(d),t;if(m===s)return p(d),n;m=m.sibling}throw Error(l(188))}if(a.return!==s.return)a=d,s=m;else{for(var k=!1,L=d.child;L;){if(L===a){k=!0,a=d,s=m;break}if(L===s){k=!0,s=d,a=m;break}L=L.sibling}if(!k){for(L=m.child;L;){if(L===a){k=!0,a=m,s=d;break}if(L===s){k=!0,s=m,a=d;break}L=L.sibling}if(!k)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:n}function b(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=b(t),n!==null)return n;t=t.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),j=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=P&&t[P]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function I(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case S:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case U:return"Suspense";case _:return"SuspenseList";case H:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case j:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case O:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case F:return n=t.displayName||null,n!==null?n:I(t.type)||"Memo";case z:n=t._payload,t=t._init;try{return I(t(n))}catch{}}return null}var Z=Array.isArray,B=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},q=[],R=-1;function D(t){return{current:t}}function $(t){0>R||(t.current=q[R],q[R]=null,R--)}function T(t,n){R++,q[R]=t.current,t.current=n}var W=D(null),te=D(null),ce=D(null),me=D(null);function xe(t,n){switch(T(ce,n),T(te,t),T(W,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?ub(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=ub(n),t=cb(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}$(W),T(W,t)}function ge(){$(W),$(te),$(ce)}function ve(t){t.memoizedState!==null&&T(me,t);var n=W.current,a=cb(n,t.type);n!==a&&(T(te,t),T(W,a))}function Ee(t){te.current===t&&($(W),$(te)),me.current===t&&($(me),Ta._currentValue=X)}var de,ye;function we(t){if(de===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);de=n&&n[1]||"",ye=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+de+t+ye}var je=!1;function Ye(t,n){if(!t||je)return"";je=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ie){var re=ie}Reflect.construct(t,[],fe)}else{try{fe.call()}catch(ie){re=ie}t.call(fe.prototype)}}else{try{throw Error()}catch(ie){re=ie}(fe=t())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ie){if(ie&&re&&typeof ie.stack=="string")return[ie.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=s.DetermineComponentFrameRoot(),k=m[0],L=m[1];if(k&&L){var G=k.split(`
4
- `),ne=L.split(`
5
- `);for(d=s=0;s<G.length&&!G[s].includes("DetermineComponentFrameRoot");)s++;for(;d<ne.length&&!ne[d].includes("DetermineComponentFrameRoot");)d++;if(s===G.length||d===ne.length)for(s=G.length-1,d=ne.length-1;1<=s&&0<=d&&G[s]!==ne[d];)d--;for(;1<=s&&0<=d;s--,d--)if(G[s]!==ne[d]){if(s!==1||d!==1)do if(s--,d--,0>d||G[s]!==ne[d]){var ae=`
6
- `+G[s].replace(" at new "," at ");return t.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",t.displayName)),ae}while(1<=s&&0<=d);break}}}finally{je=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?we(a):""}function Ie(t,n){switch(t.tag){case 26:case 27:case 5:return we(t.type);case 16:return we("Lazy");case 13:return t.child!==n&&n!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ye(t.type,!1);case 11:return Ye(t.type.render,!1);case 1:return Ye(t.type,!0);case 31:return we("Activity");default:return""}}function It(t){try{var n="",a=null;do n+=Ie(t,a),a=t,t=t.return;while(t);return n}catch(s){return`
7
- Error generating stack: `+s.message+`
8
- `+s.stack}}var at=Object.prototype.hasOwnProperty,pt=e.unstable_scheduleCallback,Bt=e.unstable_cancelCallback,Jt=e.unstable_shouldYield,Ut=e.unstable_requestPaint,Fe=e.unstable_now,tr=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Xe=e.unstable_IdlePriority,_t=e.log,fn=e.unstable_setDisableYieldValue,Lt=null,bt=null;function Dt(t){if(typeof _t=="function"&&fn(t),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(Lt,t)}catch{}}var We=Math.clz32?Math.clz32:Mu,Pn=Math.log,dn=Math.LN2;function Mu(t){return t>>>=0,t===0?32:31-(Pn(t)/dn|0)|0}var Tr=256,Rr=262144,Ii=4194304;function In(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function jr(t,n,a){var s=t.pendingLanes;if(s===0)return 0;var d=0,m=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var L=s&134217727;return L!==0?(s=L&~m,s!==0?d=In(s):(k&=L,k!==0?d=In(k):a||(a=L&~t,a!==0&&(d=In(a))))):(L=s&~m,L!==0?d=In(L):k!==0?d=In(k):a||(a=s&~t,a!==0&&(d=In(a)))),d===0?0:n!==0&&n!==d&&(n&m)===0&&(m=d&-d,a=n&-n,m>=a||m===32&&(a&4194048)!==0)?n:d}function nr(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Bi(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oo(){var t=Ii;return Ii<<=1,(Ii&62914560)===0&&(Ii=4194304),t}function Ui(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function rr(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function zu(t,n,a,s,d,m){var k=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var L=t.entanglements,G=t.expirationTimes,ne=t.hiddenUpdates;for(a=k&~a;0<a;){var ae=31-We(a),fe=1<<ae;L[ae]=0,G[ae]=-1;var re=ne[ae];if(re!==null)for(ne[ae]=null,ae=0;ae<re.length;ae++){var ie=re[ae];ie!==null&&(ie.lane&=-536870913)}a&=~fe}s!==0&&Hl(t,s,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(k&~n))}function Hl(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-We(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|a&261930}function ql(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var s=31-We(a),d=1<<s;d&n|t[s]&n&&(t[s]|=n),a&=~d}}function Wt(t,n){var a=n&-n;return a=(a&42)!==0?1:$l(a),(a&(t.suspendedLanes|n))!==0?0:a}function $l(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Hi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ir(){var t=Y.p;return t!==0?t:(t=window.event,t===void 0?32:Db(t.type))}function so(t,n){var a=Y.p;try{return Y.p=t,n()}finally{Y.p=a}}var Vn=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Vn,Ht="__reactProps$"+Vn,Cn="__reactContainer$"+Vn,qi="__reactEvents$"+Vn,uo="__reactListeners$"+Vn,Fu="__reactHandles$"+Vn,$i="__reactResources$"+Vn,di="__reactMarker$"+Vn;function Pl(t){delete t[Ct],delete t[Ht],delete t[qi],delete t[uo],delete t[Fu]}function _r(t){var n=t[Ct];if(n)return n;for(var a=t.parentNode;a;){if(n=a[Cn]||a[Ct]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=bb(t);t!==null;){if(a=t[Ct])return a;t=bb(t)}return n}t=a,a=t.parentNode}return null}function Lr(t){if(t=t[Ct]||t[Cn]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function hi(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(l(33))}function le(t){var n=t[$i];return n||(n=t[$i]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function be(t){t[di]=!0}var Re=new Set,Je={};function De(t,n){Nt(t,n),Nt(t+"Capture",n)}function Nt(t,n){for(Je[t]=n,t=0;t<n.length;t++)Re.add(n[t])}var Pi=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Wh={},ep={};function zv(t){return at.call(ep,t)?!0:at.call(Wh,t)?!1:Pi.test(t)?ep[t]=!0:(Wh[t]=!0,!1)}function co(t,n,a){if(zv(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+a)}}function fo(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+a)}}function lr(t,n,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,""+s)}}function Nn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function tp(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Fv(t,n,a){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,m=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(k){a=""+k,m.call(this,k)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Iu(t){if(!t._valueTracker){var n=tp(t)?"checked":"value";t._valueTracker=Fv(t,n,""+t[n])}}function np(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),s="";return t&&(s=tp(t)?t.checked?"true":"false":t.value),t=s,t!==a?(n.setValue(t),!0):!1}function ho(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Iv=/[\n"\\]/g;function An(t){return t.replace(Iv,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Bu(t,n,a,s,d,m,k,L){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),n!=null?k==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Nn(n)):t.value!==""+Nn(n)&&(t.value=""+Nn(n)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),n!=null?Uu(t,k,Nn(n)):a!=null?Uu(t,k,Nn(a)):s!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?t.name=""+Nn(L):t.removeAttribute("name")}function rp(t,n,a,s,d,m,k,L){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),n!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||n!=null)){Iu(t);return}a=a!=null?""+Nn(a):"",n=n!=null?""+Nn(n):a,L||n===t.value||(t.value=n),t.defaultValue=n}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=L?t.checked:!!s,t.defaultChecked=!!s,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),Iu(t)}function Uu(t,n,a){n==="number"&&ho(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Vi(t,n,a,s){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&s&&(t[a].defaultSelected=!0)}else{for(a=""+Nn(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,s&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function ip(t,n,a){if(n!=null&&(n=""+Nn(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Nn(a):""}function lp(t,n,a,s){if(n==null){if(s!=null){if(a!=null)throw Error(l(92));if(Z(s)){if(1<s.length)throw Error(l(93));s=s[0]}a=s}a==null&&(a=""),n=a}a=Nn(n),t.defaultValue=a,s=t.textContent,s===a&&s!==""&&s!==null&&(t.value=s),Iu(t)}function Gi(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var Bv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ap(t,n,a){var s=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,a):typeof a!="number"||a===0||Bv.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function op(t,n,a){if(n!=null&&typeof n!="object")throw Error(l(62));if(t=t.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var d in n)s=n[d],n.hasOwnProperty(d)&&a[d]!==s&&ap(t,d,s)}else for(var m in n)n.hasOwnProperty(m)&&ap(t,m,n[m])}function Hu(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Uv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Hv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function po(t){return Hv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ar(){}var qu=null;function $u(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Yi=null,Xi=null;function sp(t){var n=Lr(t);if(n&&(t=n.stateNode)){var a=t[Ht]||null;e:switch(t=n.stateNode,n.type){case"input":if(Bu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+An(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var s=a[n];if(s!==t&&s.form===t.form){var d=s[Ht]||null;if(!d)throw Error(l(90));Bu(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)s=a[n],s.form===t.form&&np(s)}break e;case"textarea":ip(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Vi(t,!!a.multiple,n,!1)}}}var Pu=!1;function up(t,n,a){if(Pu)return t(n,a);Pu=!0;try{var s=t(n);return s}finally{if(Pu=!1,(Yi!==null||Xi!==null)&&(ts(),Yi&&(n=Yi,t=Xi,Xi=Yi=null,sp(n),t)))for(n=0;n<t.length;n++)sp(t[n])}}function Vl(t,n){var a=t.stateNode;if(a===null)return null;var s=a[Ht]||null;if(s===null)return null;a=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vu=!1;if(or)try{var Gl={};Object.defineProperty(Gl,"passive",{get:function(){Vu=!0}}),window.addEventListener("test",Gl,Gl),window.removeEventListener("test",Gl,Gl)}catch{Vu=!1}var Dr=null,Gu=null,mo=null;function cp(){if(mo)return mo;var t,n=Gu,a=n.length,s,d="value"in Dr?Dr.value:Dr.textContent,m=d.length;for(t=0;t<a&&n[t]===d[t];t++);var k=a-t;for(s=1;s<=k&&n[a-s]===d[m-s];s++);return mo=d.slice(t,1<s?1-s:void 0)}function go(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function bo(){return!0}function fp(){return!1}function en(t){function n(a,s,d,m,k){this._reactName=a,this._targetInst=d,this.type=s,this.nativeEvent=m,this.target=k,this.currentTarget=null;for(var L in t)t.hasOwnProperty(L)&&(a=t[L],this[L]=a?a(m):m[L]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?bo:fp,this.isPropagationStopped=fp,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),n}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yo=en(pi),Yl=g({},pi,{view:0,detail:0}),qv=en(Yl),Yu,Xu,Xl,xo=g({},Yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ku,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Xl&&(Xl&&t.type==="mousemove"?(Yu=t.screenX-Xl.screenX,Xu=t.screenY-Xl.screenY):Xu=Yu=0,Xl=t),Yu)},movementY:function(t){return"movementY"in t?t.movementY:Xu}}),dp=en(xo),$v=g({},xo,{dataTransfer:0}),Pv=en($v),Vv=g({},Yl,{relatedTarget:0}),Zu=en(Vv),Gv=g({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),Yv=en(Gv),Xv=g({},pi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Zv=en(Xv),Kv=g({},pi,{data:0}),hp=en(Kv),Qv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Wv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ew(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Wv[t])?!!n[t]:!1}function Ku(){return ew}var tw=g({},Yl,{key:function(t){if(t.key){var n=Qv[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=go(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Jv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ku,charCode:function(t){return t.type==="keypress"?go(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?go(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),nw=en(tw),rw=g({},xo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pp=en(rw),iw=g({},Yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ku}),lw=en(iw),aw=g({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),ow=en(aw),sw=g({},xo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),uw=en(sw),cw=g({},pi,{newState:0,oldState:0}),fw=en(cw),dw=[9,13,27,32],Qu=or&&"CompositionEvent"in window,Zl=null;or&&"documentMode"in document&&(Zl=document.documentMode);var hw=or&&"TextEvent"in window&&!Zl,mp=or&&(!Qu||Zl&&8<Zl&&11>=Zl),gp=" ",bp=!1;function yp(t,n){switch(t){case"keyup":return dw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Zi=!1;function pw(t,n){switch(t){case"compositionend":return xp(n);case"keypress":return n.which!==32?null:(bp=!0,gp);case"textInput":return t=n.data,t===gp&&bp?null:t;default:return null}}function mw(t,n){if(Zi)return t==="compositionend"||!Qu&&yp(t,n)?(t=cp(),mo=Gu=Dr=null,Zi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return mp&&n.locale!=="ko"?null:n.data;default:return null}}var gw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!gw[t.type]:n==="textarea"}function wp(t,n,a,s){Yi?Xi?Xi.push(s):Xi=[s]:Yi=s,n=ss(n,"onChange"),0<n.length&&(a=new yo("onChange","change",null,a,s),t.push({event:a,listeners:n}))}var Kl=null,Ql=null;function bw(t){rb(t,0)}function vo(t){var n=hi(t);if(np(n))return t}function Sp(t,n){if(t==="change")return n}var kp=!1;if(or){var Ju;if(or){var Wu="oninput"in document;if(!Wu){var Ep=document.createElement("div");Ep.setAttribute("oninput","return;"),Wu=typeof Ep.oninput=="function"}Ju=Wu}else Ju=!1;kp=Ju&&(!document.documentMode||9<document.documentMode)}function Cp(){Kl&&(Kl.detachEvent("onpropertychange",Np),Ql=Kl=null)}function Np(t){if(t.propertyName==="value"&&vo(Ql)){var n=[];wp(n,Ql,t,$u(t)),up(bw,n)}}function yw(t,n,a){t==="focusin"?(Cp(),Kl=n,Ql=a,Kl.attachEvent("onpropertychange",Np)):t==="focusout"&&Cp()}function xw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return vo(Ql)}function vw(t,n){if(t==="click")return vo(n)}function ww(t,n){if(t==="input"||t==="change")return vo(n)}function Sw(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var hn=typeof Object.is=="function"?Object.is:Sw;function Jl(t,n){if(hn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),s=Object.keys(n);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var d=a[s];if(!at.call(n,d)||!hn(t[d],n[d]))return!1}return!0}function Ap(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Tp(t,n){var a=Ap(t);t=0;for(var s;a;){if(a.nodeType===3){if(s=t+a.textContent.length,t<=n&&s>=n)return{node:a,offset:n-t};t=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ap(a)}}function Rp(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Rp(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function jp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=ho(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=ho(t.document)}return n}function ec(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var kw=or&&"documentMode"in document&&11>=document.documentMode,Ki=null,tc=null,Wl=null,nc=!1;function _p(t,n,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;nc||Ki==null||Ki!==ho(s)||(s=Ki,"selectionStart"in s&&ec(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Wl&&Jl(Wl,s)||(Wl=s,s=ss(tc,"onSelect"),0<s.length&&(n=new yo("onSelect","select",null,n,a),t.push({event:n,listeners:s}),n.target=Ki)))}function mi(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var Qi={animationend:mi("Animation","AnimationEnd"),animationiteration:mi("Animation","AnimationIteration"),animationstart:mi("Animation","AnimationStart"),transitionrun:mi("Transition","TransitionRun"),transitionstart:mi("Transition","TransitionStart"),transitioncancel:mi("Transition","TransitionCancel"),transitionend:mi("Transition","TransitionEnd")},rc={},Lp={};or&&(Lp=document.createElement("div").style,"AnimationEvent"in window||(delete Qi.animationend.animation,delete Qi.animationiteration.animation,delete Qi.animationstart.animation),"TransitionEvent"in window||delete Qi.transitionend.transition);function gi(t){if(rc[t])return rc[t];if(!Qi[t])return t;var n=Qi[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in Lp)return rc[t]=n[a];return t}var Dp=gi("animationend"),Op=gi("animationiteration"),Mp=gi("animationstart"),Ew=gi("transitionrun"),Cw=gi("transitionstart"),Nw=gi("transitioncancel"),zp=gi("transitionend"),Fp=new Map,ic="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ic.push("scrollEnd");function Bn(t,n){Fp.set(t,n),De(n,[t])}var wo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Tn=[],Ji=0,lc=0;function So(){for(var t=Ji,n=lc=Ji=0;n<t;){var a=Tn[n];Tn[n++]=null;var s=Tn[n];Tn[n++]=null;var d=Tn[n];Tn[n++]=null;var m=Tn[n];if(Tn[n++]=null,s!==null&&d!==null){var k=s.pending;k===null?d.next=d:(d.next=k.next,k.next=d),s.pending=d}m!==0&&Ip(a,d,m)}}function ko(t,n,a,s){Tn[Ji++]=t,Tn[Ji++]=n,Tn[Ji++]=a,Tn[Ji++]=s,lc|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function ac(t,n,a,s){return ko(t,n,a,s),Eo(t)}function bi(t,n){return ko(t,null,null,n),Eo(t)}function Ip(t,n,a){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a);for(var d=!1,m=t.return;m!==null;)m.childLanes|=a,s=m.alternate,s!==null&&(s.childLanes|=a),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&n!==null&&(d=31-We(a),t=m.hiddenUpdates,s=t[d],s===null?t[d]=[n]:s.push(n),n.lane=a|536870912),m):null}function Eo(t){if(50<wa)throw wa=0,gf=null,Error(l(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Wi={};function Aw(t,n,a,s){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(t,n,a,s){return new Aw(t,n,a,s)}function oc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sr(t,n){var a=t.alternate;return a===null?(a=pn(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Bp(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Co(t,n,a,s,d,m){var k=0;if(s=t,typeof t=="function")oc(t)&&(k=1);else if(typeof t=="string")k=LS(t,a,W.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case H:return t=pn(31,a,n,d),t.elementType=H,t.lanes=m,t;case S:return yi(a.children,d,m,n);case N:k=8,d|=24;break;case E:return t=pn(12,a,n,d|2),t.elementType=E,t.lanes=m,t;case U:return t=pn(13,a,n,d),t.elementType=U,t.lanes=m,t;case _:return t=pn(19,a,n,d),t.elementType=_,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:k=10;break e;case C:k=9;break e;case O:k=11;break e;case F:k=14;break e;case z:k=16,s=null;break e}k=29,a=Error(l(130,t===null?"null":typeof t,"")),s=null}return n=pn(k,a,n,d),n.elementType=t,n.type=s,n.lanes=m,n}function yi(t,n,a,s){return t=pn(7,t,s,n),t.lanes=a,t}function sc(t,n,a){return t=pn(6,t,null,n),t.lanes=a,t}function Up(t){var n=pn(18,null,null,0);return n.stateNode=t,n}function uc(t,n,a){return n=pn(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Hp=new WeakMap;function Rn(t,n){if(typeof t=="object"&&t!==null){var a=Hp.get(t);return a!==void 0?a:(n={value:t,source:n,stack:It(n)},Hp.set(t,n),n)}return{value:t,source:n,stack:It(n)}}var el=[],tl=0,No=null,ea=0,jn=[],_n=0,Or=null,Gn=1,Yn="";function ur(t,n){el[tl++]=ea,el[tl++]=No,No=t,ea=n}function qp(t,n,a){jn[_n++]=Gn,jn[_n++]=Yn,jn[_n++]=Or,Or=t;var s=Gn;t=Yn;var d=32-We(s)-1;s&=~(1<<d),a+=1;var m=32-We(n)+d;if(30<m){var k=d-d%5;m=(s&(1<<k)-1).toString(32),s>>=k,d-=k,Gn=1<<32-We(n)+d|a<<d|s,Yn=m+t}else Gn=1<<m|a<<d|s,Yn=t}function cc(t){t.return!==null&&(ur(t,1),qp(t,1,0))}function fc(t){for(;t===No;)No=el[--tl],el[tl]=null,ea=el[--tl],el[tl]=null;for(;t===Or;)Or=jn[--_n],jn[_n]=null,Yn=jn[--_n],jn[_n]=null,Gn=jn[--_n],jn[_n]=null}function $p(t,n){jn[_n++]=Gn,jn[_n++]=Yn,jn[_n++]=Or,Gn=n.id,Yn=n.overflow,Or=t}var Ot=null,ft=null,Pe=!1,Mr=null,Ln=!1,dc=Error(l(519));function zr(t){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ta(Rn(n,t)),dc}function Pp(t){var n=t.stateNode,a=t.type,s=t.memoizedProps;switch(n[Ct]=t,n[Ht]=s,a){case"dialog":Ue("cancel",n),Ue("close",n);break;case"iframe":case"object":case"embed":Ue("load",n);break;case"video":case"audio":for(a=0;a<ka.length;a++)Ue(ka[a],n);break;case"source":Ue("error",n);break;case"img":case"image":case"link":Ue("error",n),Ue("load",n);break;case"details":Ue("toggle",n);break;case"input":Ue("invalid",n),rp(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ue("invalid",n);break;case"textarea":Ue("invalid",n),lp(n,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||s.suppressHydrationWarning===!0||ob(n.textContent,a)?(s.popover!=null&&(Ue("beforetoggle",n),Ue("toggle",n)),s.onScroll!=null&&Ue("scroll",n),s.onScrollEnd!=null&&Ue("scrollend",n),s.onClick!=null&&(n.onclick=ar),n=!0):n=!1,n||zr(t,!0)}function Vp(t){for(Ot=t.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Ot=Ot.return}}function nl(t){if(t!==Ot)return!1;if(!Pe)return Vp(t),Pe=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||_f(t.type,t.memoizedProps)),a=!a),a&&ft&&zr(t),Vp(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ft=gb(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));ft=gb(t)}else n===27?(n=ft,Kr(t.type)?(t=zf,zf=null,ft=t):ft=n):ft=Ot?On(t.stateNode.nextSibling):null;return!0}function xi(){ft=Ot=null,Pe=!1}function hc(){var t=Mr;return t!==null&&(ln===null?ln=t:ln.push.apply(ln,t),Mr=null),t}function ta(t){Mr===null?Mr=[t]:Mr.push(t)}var pc=D(null),vi=null,cr=null;function Fr(t,n,a){T(pc,n._currentValue),n._currentValue=a}function fr(t){t._currentValue=pc.current,$(pc)}function mc(t,n,a){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===a)break;t=t.return}}function gc(t,n,a,s){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var k=d.child;m=m.firstContext;e:for(;m!==null;){var L=m;m=d;for(var G=0;G<n.length;G++)if(L.context===n[G]){m.lanes|=a,L=m.alternate,L!==null&&(L.lanes|=a),mc(m.return,a,t),s||(k=null);break e}m=L.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(l(341));k.lanes|=a,m=k.alternate,m!==null&&(m.lanes|=a),mc(k,a,t),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===t){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function rl(t,n,a,s){t=null;for(var d=n,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(l(387));if(k=k.memoizedProps,k!==null){var L=d.type;hn(d.pendingProps.value,k.value)||(t!==null?t.push(L):t=[L])}}else if(d===me.current){if(k=d.alternate,k===null)throw Error(l(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Ta):t=[Ta])}d=d.return}t!==null&&gc(n,t,a,s),n.flags|=262144}function Ao(t){for(t=t.firstContext;t!==null;){if(!hn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function wi(t){vi=t,cr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Mt(t){return Gp(vi,t)}function To(t,n){return vi===null&&wi(t),Gp(t,n)}function Gp(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},cr===null){if(t===null)throw Error(l(308));cr=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else cr=cr.next=n;return a}var Tw=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},Rw=e.unstable_scheduleCallback,jw=e.unstable_NormalPriority,vt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bc(){return{controller:new Tw,data:new Map,refCount:0}}function na(t){t.refCount--,t.refCount===0&&Rw(jw,function(){t.controller.abort()})}var ra=null,yc=0,il=0,ll=null;function _w(t,n){if(ra===null){var a=ra=[];yc=0,il=Sf(),ll={status:"pending",value:void 0,then:function(s){a.push(s)}}}return yc++,n.then(Yp,Yp),n}function Yp(){if(--yc===0&&ra!==null){ll!==null&&(ll.status="fulfilled");var t=ra;ra=null,il=0,ll=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Lw(t,n){var a=[],s={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(s.status="rejected",s.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),s}var Xp=B.S;B.S=function(t,n){_g=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&_w(t,n),Xp!==null&&Xp(t,n)};var Si=D(null);function xc(){var t=Si.current;return t!==null?t:ot.pooledCache}function Ro(t,n){n===null?T(Si,Si.current):T(Si,n.pool)}function Zp(){var t=xc();return t===null?null:{parent:vt._currentValue,pool:t}}var al=Error(l(460)),vc=Error(l(474)),jo=Error(l(542)),_o={then:function(){}};function Kp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Qp(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(ar,ar),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Wp(t),t;default:if(typeof n.status=="string")n.then(ar,ar);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=s}},function(s){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Wp(t),t}throw Ei=n,al}}function ki(t){try{var n=t._init;return n(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ei=a,al):a}}var Ei=null;function Jp(){if(Ei===null)throw Error(l(459));var t=Ei;return Ei=null,t}function Wp(t){if(t===al||t===jo)throw Error(l(483))}var ol=null,ia=0;function Lo(t){var n=ia;return ia+=1,ol===null&&(ol=[]),Qp(ol,t,n)}function la(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Do(t,n){throw n.$$typeof===x?Error(l(525)):(t=Object.prototype.toString.call(n),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function em(t){function n(Q,K){if(t){var ee=Q.deletions;ee===null?(Q.deletions=[K],Q.flags|=16):ee.push(K)}}function a(Q,K){if(!t)return null;for(;K!==null;)n(Q,K),K=K.sibling;return null}function s(Q){for(var K=new Map;Q!==null;)Q.key!==null?K.set(Q.key,Q):K.set(Q.index,Q),Q=Q.sibling;return K}function d(Q,K){return Q=sr(Q,K),Q.index=0,Q.sibling=null,Q}function m(Q,K,ee){return Q.index=ee,t?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<K?(Q.flags|=67108866,K):ee):(Q.flags|=67108866,K)):(Q.flags|=1048576,K)}function k(Q){return t&&Q.alternate===null&&(Q.flags|=67108866),Q}function L(Q,K,ee,se){return K===null||K.tag!==6?(K=sc(ee,Q.mode,se),K.return=Q,K):(K=d(K,ee),K.return=Q,K)}function G(Q,K,ee,se){var Ce=ee.type;return Ce===S?ae(Q,K,ee.props.children,se,ee.key):K!==null&&(K.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===z&&ki(Ce)===K.type)?(K=d(K,ee.props),la(K,ee),K.return=Q,K):(K=Co(ee.type,ee.key,ee.props,null,Q.mode,se),la(K,ee),K.return=Q,K)}function ne(Q,K,ee,se){return K===null||K.tag!==4||K.stateNode.containerInfo!==ee.containerInfo||K.stateNode.implementation!==ee.implementation?(K=uc(ee,Q.mode,se),K.return=Q,K):(K=d(K,ee.children||[]),K.return=Q,K)}function ae(Q,K,ee,se,Ce){return K===null||K.tag!==7?(K=yi(ee,Q.mode,se,Ce),K.return=Q,K):(K=d(K,ee),K.return=Q,K)}function fe(Q,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=sc(""+K,Q.mode,ee),K.return=Q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case v:return ee=Co(K.type,K.key,K.props,null,Q.mode,ee),la(ee,K),ee.return=Q,ee;case w:return K=uc(K,Q.mode,ee),K.return=Q,K;case z:return K=ki(K),fe(Q,K,ee)}if(Z(K)||V(K))return K=yi(K,Q.mode,ee,null),K.return=Q,K;if(typeof K.then=="function")return fe(Q,Lo(K),ee);if(K.$$typeof===j)return fe(Q,To(Q,K),ee);Do(Q,K)}return null}function re(Q,K,ee,se){var Ce=K!==null?K.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Ce!==null?null:L(Q,K,""+ee,se);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:return ee.key===Ce?G(Q,K,ee,se):null;case w:return ee.key===Ce?ne(Q,K,ee,se):null;case z:return ee=ki(ee),re(Q,K,ee,se)}if(Z(ee)||V(ee))return Ce!==null?null:ae(Q,K,ee,se,null);if(typeof ee.then=="function")return re(Q,K,Lo(ee),se);if(ee.$$typeof===j)return re(Q,K,To(Q,ee),se);Do(Q,ee)}return null}function ie(Q,K,ee,se,Ce){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Q=Q.get(ee)||null,L(K,Q,""+se,Ce);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case v:return Q=Q.get(se.key===null?ee:se.key)||null,G(K,Q,se,Ce);case w:return Q=Q.get(se.key===null?ee:se.key)||null,ne(K,Q,se,Ce);case z:return se=ki(se),ie(Q,K,ee,se,Ce)}if(Z(se)||V(se))return Q=Q.get(ee)||null,ae(K,Q,se,Ce,null);if(typeof se.then=="function")return ie(Q,K,ee,Lo(se),Ce);if(se.$$typeof===j)return ie(Q,K,ee,To(K,se),Ce);Do(K,se)}return null}function Se(Q,K,ee,se){for(var Ce=null,Ze=null,ke=K,Oe=K=0,$e=null;ke!==null&&Oe<ee.length;Oe++){ke.index>Oe?($e=ke,ke=null):$e=ke.sibling;var Ke=re(Q,ke,ee[Oe],se);if(Ke===null){ke===null&&(ke=$e);break}t&&ke&&Ke.alternate===null&&n(Q,ke),K=m(Ke,K,Oe),Ze===null?Ce=Ke:Ze.sibling=Ke,Ze=Ke,ke=$e}if(Oe===ee.length)return a(Q,ke),Pe&&ur(Q,Oe),Ce;if(ke===null){for(;Oe<ee.length;Oe++)ke=fe(Q,ee[Oe],se),ke!==null&&(K=m(ke,K,Oe),Ze===null?Ce=ke:Ze.sibling=ke,Ze=ke);return Pe&&ur(Q,Oe),Ce}for(ke=s(ke);Oe<ee.length;Oe++)$e=ie(ke,Q,Oe,ee[Oe],se),$e!==null&&(t&&$e.alternate!==null&&ke.delete($e.key===null?Oe:$e.key),K=m($e,K,Oe),Ze===null?Ce=$e:Ze.sibling=$e,Ze=$e);return t&&ke.forEach(function(ti){return n(Q,ti)}),Pe&&ur(Q,Oe),Ce}function Ae(Q,K,ee,se){if(ee==null)throw Error(l(151));for(var Ce=null,Ze=null,ke=K,Oe=K=0,$e=null,Ke=ee.next();ke!==null&&!Ke.done;Oe++,Ke=ee.next()){ke.index>Oe?($e=ke,ke=null):$e=ke.sibling;var ti=re(Q,ke,Ke.value,se);if(ti===null){ke===null&&(ke=$e);break}t&&ke&&ti.alternate===null&&n(Q,ke),K=m(ti,K,Oe),Ze===null?Ce=ti:Ze.sibling=ti,Ze=ti,ke=$e}if(Ke.done)return a(Q,ke),Pe&&ur(Q,Oe),Ce;if(ke===null){for(;!Ke.done;Oe++,Ke=ee.next())Ke=fe(Q,Ke.value,se),Ke!==null&&(K=m(Ke,K,Oe),Ze===null?Ce=Ke:Ze.sibling=Ke,Ze=Ke);return Pe&&ur(Q,Oe),Ce}for(ke=s(ke);!Ke.done;Oe++,Ke=ee.next())Ke=ie(ke,Q,Oe,Ke.value,se),Ke!==null&&(t&&Ke.alternate!==null&&ke.delete(Ke.key===null?Oe:Ke.key),K=m(Ke,K,Oe),Ze===null?Ce=Ke:Ze.sibling=Ke,Ze=Ke);return t&&ke.forEach(function($S){return n(Q,$S)}),Pe&&ur(Q,Oe),Ce}function it(Q,K,ee,se){if(typeof ee=="object"&&ee!==null&&ee.type===S&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:e:{for(var Ce=ee.key;K!==null;){if(K.key===Ce){if(Ce=ee.type,Ce===S){if(K.tag===7){a(Q,K.sibling),se=d(K,ee.props.children),se.return=Q,Q=se;break e}}else if(K.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===z&&ki(Ce)===K.type){a(Q,K.sibling),se=d(K,ee.props),la(se,ee),se.return=Q,Q=se;break e}a(Q,K);break}else n(Q,K);K=K.sibling}ee.type===S?(se=yi(ee.props.children,Q.mode,se,ee.key),se.return=Q,Q=se):(se=Co(ee.type,ee.key,ee.props,null,Q.mode,se),la(se,ee),se.return=Q,Q=se)}return k(Q);case w:e:{for(Ce=ee.key;K!==null;){if(K.key===Ce)if(K.tag===4&&K.stateNode.containerInfo===ee.containerInfo&&K.stateNode.implementation===ee.implementation){a(Q,K.sibling),se=d(K,ee.children||[]),se.return=Q,Q=se;break e}else{a(Q,K);break}else n(Q,K);K=K.sibling}se=uc(ee,Q.mode,se),se.return=Q,Q=se}return k(Q);case z:return ee=ki(ee),it(Q,K,ee,se)}if(Z(ee))return Se(Q,K,ee,se);if(V(ee)){if(Ce=V(ee),typeof Ce!="function")throw Error(l(150));return ee=Ce.call(ee),Ae(Q,K,ee,se)}if(typeof ee.then=="function")return it(Q,K,Lo(ee),se);if(ee.$$typeof===j)return it(Q,K,To(Q,ee),se);Do(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,K!==null&&K.tag===6?(a(Q,K.sibling),se=d(K,ee),se.return=Q,Q=se):(a(Q,K),se=sc(ee,Q.mode,se),se.return=Q,Q=se),k(Q)):a(Q,K)}return function(Q,K,ee,se){try{ia=0;var Ce=it(Q,K,ee,se);return ol=null,Ce}catch(ke){if(ke===al||ke===jo)throw ke;var Ze=pn(29,ke,null,Q.mode);return Ze.lanes=se,Ze.return=Q,Ze}}}var Ci=em(!0),tm=em(!1),Ir=!1;function wc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Br(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ur(t,n,a){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Qe&2)!==0){var d=s.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n,n=Eo(t),Ip(t,null,a),n}return ko(t,s,n,a),Eo(t)}function aa(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,a|=s,n.lanes=a,ql(t,a)}}function kc(t,n){var a=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var d=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?d=m=k:m=m.next=k,a=a.next}while(a!==null);m===null?d=m=n:m=m.next=n}else d=m=n;a={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:s.shared,callbacks:s.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var Ec=!1;function oa(){if(Ec){var t=ll;if(t!==null)throw t}}function sa(t,n,a,s){Ec=!1;var d=t.updateQueue;Ir=!1;var m=d.firstBaseUpdate,k=d.lastBaseUpdate,L=d.shared.pending;if(L!==null){d.shared.pending=null;var G=L,ne=G.next;G.next=null,k===null?m=ne:k.next=ne,k=G;var ae=t.alternate;ae!==null&&(ae=ae.updateQueue,L=ae.lastBaseUpdate,L!==k&&(L===null?ae.firstBaseUpdate=ne:L.next=ne,ae.lastBaseUpdate=G))}if(m!==null){var fe=d.baseState;k=0,ae=ne=G=null,L=m;do{var re=L.lane&-536870913,ie=re!==L.lane;if(ie?(qe&re)===re:(s&re)===re){re!==0&&re===il&&(Ec=!0),ae!==null&&(ae=ae.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Se=t,Ae=L;re=n;var it=a;switch(Ae.tag){case 1:if(Se=Ae.payload,typeof Se=="function"){fe=Se.call(it,fe,re);break e}fe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ae.payload,re=typeof Se=="function"?Se.call(it,fe,re):Se,re==null)break e;fe=g({},fe,re);break e;case 2:Ir=!0}}re=L.callback,re!==null&&(t.flags|=64,ie&&(t.flags|=8192),ie=d.callbacks,ie===null?d.callbacks=[re]:ie.push(re))}else ie={lane:re,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ae===null?(ne=ae=ie,G=fe):ae=ae.next=ie,k|=re;if(L=L.next,L===null){if(L=d.shared.pending,L===null)break;ie=L,L=ie.next,ie.next=null,d.lastBaseUpdate=ie,d.shared.pending=null}}while(!0);ae===null&&(G=fe),d.baseState=G,d.firstBaseUpdate=ne,d.lastBaseUpdate=ae,m===null&&(d.shared.lanes=0),Vr|=k,t.lanes=k,t.memoizedState=fe}}function nm(t,n){if(typeof t!="function")throw Error(l(191,t));t.call(n)}function rm(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)nm(a[t],n)}var sl=D(null),Oo=D(0);function im(t,n){t=vr,T(Oo,t),T(sl,n),vr=t|n.baseLanes}function Cc(){T(Oo,vr),T(sl,sl.current)}function Nc(){vr=Oo.current,$(sl),$(Oo)}var mn=D(null),Dn=null;function Hr(t){var n=t.alternate;T(yt,yt.current&1),T(mn,t),Dn===null&&(n===null||sl.current!==null||n.memoizedState!==null)&&(Dn=t)}function Ac(t){T(yt,yt.current),T(mn,t),Dn===null&&(Dn=t)}function lm(t){t.tag===22?(T(yt,yt.current),T(mn,t),Dn===null&&(Dn=t)):qr()}function qr(){T(yt,yt.current),T(mn,mn.current)}function gn(t){$(mn),Dn===t&&(Dn=null),$(yt)}var yt=D(0);function Mo(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Of(a)||Mf(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var dr=0,Le=null,nt=null,wt=null,zo=!1,ul=!1,Ni=!1,Fo=0,ua=0,cl=null,Dw=0;function mt(){throw Error(l(321))}function Tc(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!hn(t[a],n[a]))return!1;return!0}function Rc(t,n,a,s,d,m){return dr=m,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,B.H=t===null||t.memoizedState===null?qm:Pc,Ni=!1,m=a(s,d),Ni=!1,ul&&(m=om(n,a,s,d)),am(t),m}function am(t){B.H=da;var n=nt!==null&&nt.next!==null;if(dr=0,wt=nt=Le=null,zo=!1,ua=0,cl=null,n)throw Error(l(300));t===null||St||(t=t.dependencies,t!==null&&Ao(t)&&(St=!0))}function om(t,n,a,s){Le=t;var d=0;do{if(ul&&(cl=null),ua=0,ul=!1,25<=d)throw Error(l(301));if(d+=1,wt=nt=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}B.H=$m,m=n(a,s)}while(ul);return m}function Ow(){var t=B.H,n=t.useState()[0];return n=typeof n.then=="function"?ca(n):n,t=t.useState()[0],(nt!==null?nt.memoizedState:null)!==t&&(Le.flags|=1024),n}function jc(){var t=Fo!==0;return Fo=0,t}function _c(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function Lc(t){if(zo){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}zo=!1}dr=0,wt=nt=Le=null,ul=!1,ua=Fo=0,cl=null}function Xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Le.memoizedState=wt=t:wt=wt.next=t,wt}function xt(){if(nt===null){var t=Le.alternate;t=t!==null?t.memoizedState:null}else t=nt.next;var n=wt===null?Le.memoizedState:wt.next;if(n!==null)wt=n,nt=t;else{if(t===null)throw Le.alternate===null?Error(l(467)):Error(l(310));nt=t,t={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},wt===null?Le.memoizedState=wt=t:wt=wt.next=t}return wt}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ca(t){var n=ua;return ua+=1,cl===null&&(cl=[]),t=Qp(cl,t,n),n=Le,(wt===null?n.memoizedState:wt.next)===null&&(n=n.alternate,B.H=n===null||n.memoizedState===null?qm:Pc),t}function Bo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ca(t);if(t.$$typeof===j)return Mt(t)}throw Error(l(438,String(t)))}function Dc(t){var n=null,a=Le.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var s=Le.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Io(),Le.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),s=0;s<t;s++)a[s]=M;return n.index++,a}function hr(t,n){return typeof n=="function"?n(t):n}function Uo(t){var n=xt();return Oc(n,nt,t)}function Oc(t,n,a){var s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var d=t.baseQueue,m=s.pending;if(m!==null){if(d!==null){var k=d.next;d.next=m.next,m.next=k}n.baseQueue=d=m,s.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{n=d.next;var L=k=null,G=null,ne=n,ae=!1;do{var fe=ne.lane&-536870913;if(fe!==ne.lane?(qe&fe)===fe:(dr&fe)===fe){var re=ne.revertLane;if(re===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),fe===il&&(ae=!0);else if((dr&re)===re){ne=ne.next,re===il&&(ae=!0);continue}else fe={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},G===null?(L=G=fe,k=m):G=G.next=fe,Le.lanes|=re,Vr|=re;fe=ne.action,Ni&&a(m,fe),m=ne.hasEagerState?ne.eagerState:a(m,fe)}else re={lane:fe,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},G===null?(L=G=re,k=m):G=G.next=re,Le.lanes|=fe,Vr|=fe;ne=ne.next}while(ne!==null&&ne!==n);if(G===null?k=m:G.next=L,!hn(m,t.memoizedState)&&(St=!0,ae&&(a=ll,a!==null)))throw a;t.memoizedState=m,t.baseState=k,t.baseQueue=G,s.lastRenderedState=m}return d===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Mc(t){var n=xt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var s=a.dispatch,d=a.pending,m=n.memoizedState;if(d!==null){a.pending=null;var k=d=d.next;do m=t(m,k.action),k=k.next;while(k!==d);hn(m,n.memoizedState)||(St=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),a.lastRenderedState=m}return[m,s]}function sm(t,n,a){var s=Le,d=xt(),m=Pe;if(m){if(a===void 0)throw Error(l(407));a=a()}else a=n();var k=!hn((nt||d).memoizedState,a);if(k&&(d.memoizedState=a,St=!0),d=d.queue,Ic(fm.bind(null,s,d,t),[t]),d.getSnapshot!==n||k||wt!==null&&wt.memoizedState.tag&1){if(s.flags|=2048,fl(9,{destroy:void 0},cm.bind(null,s,d,a,n),null),ot===null)throw Error(l(349));m||(dr&127)!==0||um(s,n,a)}return a}function um(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Le.updateQueue,n===null?(n=Io(),Le.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function cm(t,n,a,s){n.value=a,n.getSnapshot=s,dm(n)&&hm(t)}function fm(t,n,a){return a(function(){dm(n)&&hm(t)})}function dm(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!hn(t,a)}catch{return!0}}function hm(t){var n=bi(t,2);n!==null&&an(n,t,2)}function zc(t){var n=Xt();if(typeof t=="function"){var a=t;if(t=a(),Ni){Dt(!0);try{a()}finally{Dt(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:t},n}function pm(t,n,a,s){return t.baseState=a,Oc(t,nt,typeof s=="function"?s:hr)}function Mw(t,n,a,s,d){if($o(t))throw Error(l(485));if(t=n.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){m.listeners.push(k)}};B.T!==null?a(!0):m.isTransition=!1,s(m),a=n.pending,a===null?(m.next=n.pending=m,mm(n,m)):(m.next=a.next,n.pending=a.next=m)}}function mm(t,n){var a=n.action,s=n.payload,d=t.state;if(n.isTransition){var m=B.T,k={};B.T=k;try{var L=a(d,s),G=B.S;G!==null&&G(k,L),gm(t,n,L)}catch(ne){Fc(t,n,ne)}finally{m!==null&&k.types!==null&&(m.types=k.types),B.T=m}}else try{m=a(d,s),gm(t,n,m)}catch(ne){Fc(t,n,ne)}}function gm(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){bm(t,n,s)},function(s){return Fc(t,n,s)}):bm(t,n,a)}function bm(t,n,a){n.status="fulfilled",n.value=a,ym(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,mm(t,a)))}function Fc(t,n,a){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=a,ym(n),n=n.next;while(n!==s)}t.action=null}function ym(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function xm(t,n){return n}function vm(t,n){if(Pe){var a=ot.formState;if(a!==null){e:{var s=Le;if(Pe){if(ft){t:{for(var d=ft,m=Ln;d.nodeType!==8;){if(!m){d=null;break t}if(d=On(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){ft=On(d.nextSibling),s=d.data==="F!";break e}}zr(s)}s=!1}s&&(n=a[0])}}return a=Xt(),a.memoizedState=a.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xm,lastRenderedState:n},a.queue=s,a=Bm.bind(null,Le,s),s.dispatch=a,s=zc(!1),m=$c.bind(null,Le,!1,s.queue),s=Xt(),d={state:n,dispatch:null,action:t,pending:null},s.queue=d,a=Mw.bind(null,Le,d,m,a),d.dispatch=a,s.memoizedState=t,[n,a,!1]}function wm(t){var n=xt();return Sm(n,nt,t)}function Sm(t,n,a){if(n=Oc(t,n,xm)[0],t=Uo(hr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=ca(n)}catch(k){throw k===al?jo:k}else s=n;n=xt();var d=n.queue,m=d.dispatch;return a!==n.memoizedState&&(Le.flags|=2048,fl(9,{destroy:void 0},zw.bind(null,d,a),null)),[s,m,t]}function zw(t,n){t.action=n}function km(t){var n=xt(),a=nt;if(a!==null)return Sm(n,a,t);xt(),n=n.memoizedState,a=xt();var s=a.queue.dispatch;return a.memoizedState=t,[n,s,!1]}function fl(t,n,a,s){return t={tag:t,create:a,deps:s,inst:n,next:null},n=Le.updateQueue,n===null&&(n=Io(),Le.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(s=a.next,a.next=t,t.next=s,n.lastEffect=t),t}function Em(){return xt().memoizedState}function Ho(t,n,a,s){var d=Xt();Le.flags|=t,d.memoizedState=fl(1|n,{destroy:void 0},a,s===void 0?null:s)}function qo(t,n,a,s){var d=xt();s=s===void 0?null:s;var m=d.memoizedState.inst;nt!==null&&s!==null&&Tc(s,nt.memoizedState.deps)?d.memoizedState=fl(n,m,a,s):(Le.flags|=t,d.memoizedState=fl(1|n,m,a,s))}function Cm(t,n){Ho(8390656,8,t,n)}function Ic(t,n){qo(2048,8,t,n)}function Fw(t){Le.flags|=4;var n=Le.updateQueue;if(n===null)n=Io(),Le.updateQueue=n,n.events=[t];else{var a=n.events;a===null?n.events=[t]:a.push(t)}}function Nm(t){var n=xt().memoizedState;return Fw({ref:n,nextImpl:t}),function(){if((Qe&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function Am(t,n){return qo(4,2,t,n)}function Tm(t,n){return qo(4,4,t,n)}function Rm(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function jm(t,n,a){a=a!=null?a.concat([t]):null,qo(4,4,Rm.bind(null,n,t),a)}function Bc(){}function _m(t,n){var a=xt();n=n===void 0?null:n;var s=a.memoizedState;return n!==null&&Tc(n,s[1])?s[0]:(a.memoizedState=[t,n],t)}function Lm(t,n){var a=xt();n=n===void 0?null:n;var s=a.memoizedState;if(n!==null&&Tc(n,s[1]))return s[0];if(s=t(),Ni){Dt(!0);try{t()}finally{Dt(!1)}}return a.memoizedState=[s,n],s}function Uc(t,n,a){return a===void 0||(dr&1073741824)!==0&&(qe&261930)===0?t.memoizedState=n:(t.memoizedState=a,t=Dg(),Le.lanes|=t,Vr|=t,a)}function Dm(t,n,a,s){return hn(a,n)?a:sl.current!==null?(t=Uc(t,a,s),hn(t,n)||(St=!0),t):(dr&42)===0||(dr&1073741824)!==0&&(qe&261930)===0?(St=!0,t.memoizedState=a):(t=Dg(),Le.lanes|=t,Vr|=t,n)}function Om(t,n,a,s,d){var m=Y.p;Y.p=m!==0&&8>m?m:8;var k=B.T,L={};B.T=L,$c(t,!1,n,a);try{var G=d(),ne=B.S;if(ne!==null&&ne(L,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var ae=Lw(G,s);fa(t,n,ae,xn(t))}else fa(t,n,s,xn(t))}catch(fe){fa(t,n,{then:function(){},status:"rejected",reason:fe},xn())}finally{Y.p=m,k!==null&&L.types!==null&&(k.types=L.types),B.T=k}}function Iw(){}function Hc(t,n,a,s){if(t.tag!==5)throw Error(l(476));var d=Mm(t).queue;Om(t,d,n,X,a===null?Iw:function(){return zm(t),a(s)})}function Mm(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:X},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function zm(t){var n=Mm(t);n.next===null&&(n=t.alternate.memoizedState),fa(t,n.next.queue,{},xn())}function qc(){return Mt(Ta)}function Fm(){return xt().memoizedState}function Im(){return xt().memoizedState}function Bw(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=xn();t=Br(a);var s=Ur(n,t,a);s!==null&&(an(s,n,a),aa(s,n,a)),n={cache:bc()},t.payload=n;return}n=n.return}}function Uw(t,n,a){var s=xn();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},$o(t)?Um(n,a):(a=ac(t,n,a,s),a!==null&&(an(a,t,s),Hm(a,n,s)))}function Bm(t,n,a){var s=xn();fa(t,n,a,s)}function fa(t,n,a,s){var d={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if($o(t))Um(n,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var k=n.lastRenderedState,L=m(k,a);if(d.hasEagerState=!0,d.eagerState=L,hn(L,k))return ko(t,n,d,0),ot===null&&So(),!1}catch{}if(a=ac(t,n,d,s),a!==null)return an(a,t,s),Hm(a,n,s),!0}return!1}function $c(t,n,a,s){if(s={lane:2,revertLane:Sf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},$o(t)){if(n)throw Error(l(479))}else n=ac(t,a,s,2),n!==null&&an(n,t,2)}function $o(t){var n=t.alternate;return t===Le||n!==null&&n===Le}function Um(t,n){ul=zo=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Hm(t,n,a){if((a&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,a|=s,n.lanes=a,ql(t,a)}}var da={readContext:Mt,use:Bo,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};da.useEffectEvent=mt;var qm={readContext:Mt,use:Bo,useCallback:function(t,n){return Xt().memoizedState=[t,n===void 0?null:n],t},useContext:Mt,useEffect:Cm,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,Ho(4194308,4,Rm.bind(null,n,t),a)},useLayoutEffect:function(t,n){return Ho(4194308,4,t,n)},useInsertionEffect:function(t,n){Ho(4,2,t,n)},useMemo:function(t,n){var a=Xt();n=n===void 0?null:n;var s=t();if(Ni){Dt(!0);try{t()}finally{Dt(!1)}}return a.memoizedState=[s,n],s},useReducer:function(t,n,a){var s=Xt();if(a!==void 0){var d=a(n);if(Ni){Dt(!0);try{a(n)}finally{Dt(!1)}}}else d=n;return s.memoizedState=s.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},s.queue=t,t=t.dispatch=Uw.bind(null,Le,t),[s.memoizedState,t]},useRef:function(t){var n=Xt();return t={current:t},n.memoizedState=t},useState:function(t){t=zc(t);var n=t.queue,a=Bm.bind(null,Le,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:Bc,useDeferredValue:function(t,n){var a=Xt();return Uc(a,t,n)},useTransition:function(){var t=zc(!1);return t=Om.bind(null,Le,t.queue,!0,!1),Xt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var s=Le,d=Xt();if(Pe){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),ot===null)throw Error(l(349));(qe&127)!==0||um(s,n,a)}d.memoizedState=a;var m={value:a,getSnapshot:n};return d.queue=m,Cm(fm.bind(null,s,m,t),[t]),s.flags|=2048,fl(9,{destroy:void 0},cm.bind(null,s,m,a,n),null),a},useId:function(){var t=Xt(),n=ot.identifierPrefix;if(Pe){var a=Yn,s=Gn;a=(s&~(1<<32-We(s)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Fo++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=Dw++,n="_"+n+"r_"+a.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:qc,useFormState:vm,useActionState:vm,useOptimistic:function(t){var n=Xt();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=$c.bind(null,Le,!0,a),a.dispatch=n,[t,n]},useMemoCache:Dc,useCacheRefresh:function(){return Xt().memoizedState=Bw.bind(null,Le)},useEffectEvent:function(t){var n=Xt(),a={impl:t};return n.memoizedState=a,function(){if((Qe&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Pc={readContext:Mt,use:Bo,useCallback:_m,useContext:Mt,useEffect:Ic,useImperativeHandle:jm,useInsertionEffect:Am,useLayoutEffect:Tm,useMemo:Lm,useReducer:Uo,useRef:Em,useState:function(){return Uo(hr)},useDebugValue:Bc,useDeferredValue:function(t,n){var a=xt();return Dm(a,nt.memoizedState,t,n)},useTransition:function(){var t=Uo(hr)[0],n=xt().memoizedState;return[typeof t=="boolean"?t:ca(t),n]},useSyncExternalStore:sm,useId:Fm,useHostTransitionStatus:qc,useFormState:wm,useActionState:wm,useOptimistic:function(t,n){var a=xt();return pm(a,nt,t,n)},useMemoCache:Dc,useCacheRefresh:Im};Pc.useEffectEvent=Nm;var $m={readContext:Mt,use:Bo,useCallback:_m,useContext:Mt,useEffect:Ic,useImperativeHandle:jm,useInsertionEffect:Am,useLayoutEffect:Tm,useMemo:Lm,useReducer:Mc,useRef:Em,useState:function(){return Mc(hr)},useDebugValue:Bc,useDeferredValue:function(t,n){var a=xt();return nt===null?Uc(a,t,n):Dm(a,nt.memoizedState,t,n)},useTransition:function(){var t=Mc(hr)[0],n=xt().memoizedState;return[typeof t=="boolean"?t:ca(t),n]},useSyncExternalStore:sm,useId:Fm,useHostTransitionStatus:qc,useFormState:km,useActionState:km,useOptimistic:function(t,n){var a=xt();return nt!==null?pm(a,nt,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Dc,useCacheRefresh:Im};$m.useEffectEvent=Nm;function Vc(t,n,a,s){n=t.memoizedState,a=a(s,n),a=a==null?n:g({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Gc={enqueueSetState:function(t,n,a){t=t._reactInternals;var s=xn(),d=Br(s);d.payload=n,a!=null&&(d.callback=a),n=Ur(t,d,s),n!==null&&(an(n,t,s),aa(n,t,s))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var s=xn(),d=Br(s);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=Ur(t,d,s),n!==null&&(an(n,t,s),aa(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=xn(),s=Br(a);s.tag=2,n!=null&&(s.callback=n),n=Ur(t,s,a),n!==null&&(an(n,t,a),aa(n,t,a))}};function Pm(t,n,a,s,d,m,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,m,k):n.prototype&&n.prototype.isPureReactComponent?!Jl(a,s)||!Jl(d,m):!0}function Vm(t,n,a,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,s),n.state!==t&&Gc.enqueueReplaceState(n,n.state,null)}function Ai(t,n){var a=n;if("ref"in n){a={};for(var s in n)s!=="ref"&&(a[s]=n[s])}if(t=t.defaultProps){a===n&&(a=g({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function Gm(t){wo(t)}function Ym(t){console.error(t)}function Xm(t){wo(t)}function Po(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Zm(t,n,a){try{var s=t.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Yc(t,n,a){return a=Br(a),a.tag=3,a.payload={element:null},a.callback=function(){Po(t,n)},a}function Km(t){return t=Br(t),t.tag=3,t}function Qm(t,n,a,s){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var m=s.value;t.payload=function(){return d(m)},t.callback=function(){Zm(n,a,s)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){Zm(n,a,s),typeof d!="function"&&(Gr===null?Gr=new Set([this]):Gr.add(this));var L=s.stack;this.componentDidCatch(s.value,{componentStack:L!==null?L:""})})}function Hw(t,n,a,s,d){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=a.alternate,n!==null&&rl(n,a,d,!0),a=mn.current,a!==null){switch(a.tag){case 31:case 13:return Dn===null?ns():a.alternate===null&&gt===0&&(gt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,s===_o?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([s]):n.add(s),xf(t,s,d)),!1;case 22:return a.flags|=65536,s===_o?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([s]):a.add(s)),xf(t,s,d)),!1}throw Error(l(435,a.tag))}return xf(t,s,d),ns(),!1}if(Pe)return n=mn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,s!==dc&&(t=Error(l(422),{cause:s}),ta(Rn(t,a)))):(s!==dc&&(n=Error(l(423),{cause:s}),ta(Rn(n,a))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,s=Rn(s,a),d=Yc(t.stateNode,s,d),kc(t,d),gt!==4&&(gt=2)),!1;var m=Error(l(520),{cause:s});if(m=Rn(m,a),va===null?va=[m]:va.push(m),gt!==4&&(gt=2),n===null)return!0;s=Rn(s,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=Yc(a.stateNode,s,t),kc(a,t),!1;case 1:if(n=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Gr===null||!Gr.has(m))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Km(d),Qm(d,t,a,s),kc(a,d),!1}a=a.return}while(a!==null);return!1}var Xc=Error(l(461)),St=!1;function zt(t,n,a,s){n.child=t===null?tm(n,null,a,s):Ci(n,t.child,a,s)}function Jm(t,n,a,s,d){a=a.render;var m=n.ref;if("ref"in s){var k={};for(var L in s)L!=="ref"&&(k[L]=s[L])}else k=s;return wi(n),s=Rc(t,n,a,k,m,d),L=jc(),t!==null&&!St?(_c(t,n,d),pr(t,n,d)):(Pe&&L&&cc(n),n.flags|=1,zt(t,n,s,d),n.child)}function Wm(t,n,a,s,d){if(t===null){var m=a.type;return typeof m=="function"&&!oc(m)&&m.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=m,eg(t,n,m,s,d)):(t=Co(a.type,null,s,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(m=t.child,!nf(t,d)){var k=m.memoizedProps;if(a=a.compare,a=a!==null?a:Jl,a(k,s)&&t.ref===n.ref)return pr(t,n,d)}return n.flags|=1,t=sr(m,s),t.ref=n.ref,t.return=n,n.child=t}function eg(t,n,a,s,d){if(t!==null){var m=t.memoizedProps;if(Jl(m,s)&&t.ref===n.ref)if(St=!1,n.pendingProps=s=m,nf(t,d))(t.flags&131072)!==0&&(St=!0);else return n.lanes=t.lanes,pr(t,n,d)}return Zc(t,n,a,s,d)}function tg(t,n,a,s){var d=s.children,m=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,t!==null){for(s=n.child=t.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~m}else s=0,n.child=null;return ng(t,n,m,a,s)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ro(n,m!==null?m.cachePool:null),m!==null?im(n,m):Cc(),lm(n);else return s=n.lanes=536870912,ng(t,n,m!==null?m.baseLanes|a:a,a,s)}else m!==null?(Ro(n,m.cachePool),im(n,m),qr(),n.memoizedState=null):(t!==null&&Ro(n,null),Cc(),qr());return zt(t,n,d,a),n.child}function ha(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ng(t,n,a,s,d){var m=xc();return m=m===null?null:{parent:vt._currentValue,pool:m},n.memoizedState={baseLanes:a,cachePool:m},t!==null&&Ro(n,null),Cc(),lm(n),t!==null&&rl(t,n,s,!0),n.childLanes=d,null}function Vo(t,n){return n=Yo({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function rg(t,n,a){return Ci(n,t.child,null,a),t=Vo(n,n.pendingProps),t.flags|=2,gn(n),n.memoizedState=null,t}function qw(t,n,a){var s=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(Pe){if(s.mode==="hidden")return t=Vo(n,s),n.lanes=536870912,ha(null,t);if(Ac(n),(t=ft)?(t=mb(t,Ln),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Or!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=Up(t),a.return=n,n.child=a,Ot=n,ft=null)):t=null,t===null)throw zr(n);return n.lanes=536870912,null}return Vo(n,s)}var m=t.memoizedState;if(m!==null){var k=m.dehydrated;if(Ac(n),d)if(n.flags&256)n.flags&=-257,n=rg(t,n,a);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(l(558));else if(St||rl(t,n,a,!1),d=(a&t.childLanes)!==0,St||d){if(s=ot,s!==null&&(k=Wt(s,a),k!==0&&k!==m.retryLane))throw m.retryLane=k,bi(t,k),an(s,t,k),Xc;ns(),n=rg(t,n,a)}else t=m.treeContext,ft=On(k.nextSibling),Ot=n,Pe=!0,Mr=null,Ln=!1,t!==null&&$p(n,t),n=Vo(n,s),n.flags|=4096;return n}return t=sr(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Go(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function Zc(t,n,a,s,d){return wi(n),a=Rc(t,n,a,s,void 0,d),s=jc(),t!==null&&!St?(_c(t,n,d),pr(t,n,d)):(Pe&&s&&cc(n),n.flags|=1,zt(t,n,a,d),n.child)}function ig(t,n,a,s,d,m){return wi(n),n.updateQueue=null,a=om(n,s,a,d),am(t),s=jc(),t!==null&&!St?(_c(t,n,m),pr(t,n,m)):(Pe&&s&&cc(n),n.flags|=1,zt(t,n,a,m),n.child)}function lg(t,n,a,s,d){if(wi(n),n.stateNode===null){var m=Wi,k=a.contextType;typeof k=="object"&&k!==null&&(m=Mt(k)),m=new a(s,m),n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Gc,n.stateNode=m,m._reactInternals=n,m=n.stateNode,m.props=s,m.state=n.memoizedState,m.refs={},wc(n),k=a.contextType,m.context=typeof k=="object"&&k!==null?Mt(k):Wi,m.state=n.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(Vc(n,a,k,s),m.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(k=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),k!==m.state&&Gc.enqueueReplaceState(m,m.state,null),sa(n,s,m,d),oa(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){m=n.stateNode;var L=n.memoizedProps,G=Ai(a,L);m.props=G;var ne=m.context,ae=a.contextType;k=Wi,typeof ae=="object"&&ae!==null&&(k=Mt(ae));var fe=a.getDerivedStateFromProps;ae=typeof fe=="function"||typeof m.getSnapshotBeforeUpdate=="function",L=n.pendingProps!==L,ae||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(L||ne!==k)&&Vm(n,m,s,k),Ir=!1;var re=n.memoizedState;m.state=re,sa(n,s,m,d),oa(),ne=n.memoizedState,L||re!==ne||Ir?(typeof fe=="function"&&(Vc(n,a,fe,s),ne=n.memoizedState),(G=Ir||Pm(n,a,G,s,re,ne,k))?(ae||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=ne),m.props=s,m.state=ne,m.context=k,s=G):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{m=n.stateNode,Sc(t,n),k=n.memoizedProps,ae=Ai(a,k),m.props=ae,fe=n.pendingProps,re=m.context,ne=a.contextType,G=Wi,typeof ne=="object"&&ne!==null&&(G=Mt(ne)),L=a.getDerivedStateFromProps,(ne=typeof L=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k!==fe||re!==G)&&Vm(n,m,s,G),Ir=!1,re=n.memoizedState,m.state=re,sa(n,s,m,d),oa();var ie=n.memoizedState;k!==fe||re!==ie||Ir||t!==null&&t.dependencies!==null&&Ao(t.dependencies)?(typeof L=="function"&&(Vc(n,a,L,s),ie=n.memoizedState),(ae=Ir||Pm(n,a,ae,s,re,ie,G)||t!==null&&t.dependencies!==null&&Ao(t.dependencies))?(ne||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(s,ie,G),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(s,ie,G)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ie),m.props=s,m.state=ie,m.context=G,s=ae):(typeof m.componentDidUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&re===t.memoizedState||(n.flags|=1024),s=!1)}return m=s,Go(t,n),s=(n.flags&128)!==0,m||s?(m=n.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:m.render(),n.flags|=1,t!==null&&s?(n.child=Ci(n,t.child,null,d),n.child=Ci(n,null,a,d)):zt(t,n,a,d),n.memoizedState=m.state,t=n.child):t=pr(t,n,d),t}function ag(t,n,a,s){return xi(),n.flags|=256,zt(t,n,a,s),n.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qc(t){return{baseLanes:t,cachePool:Zp()}}function Jc(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=yn),t}function og(t,n,a){var s=n.pendingProps,d=!1,m=(n.flags&128)!==0,k;if((k=m)||(k=t!==null&&t.memoizedState===null?!1:(yt.current&2)!==0),k&&(d=!0,n.flags&=-129),k=(n.flags&32)!==0,n.flags&=-33,t===null){if(Pe){if(d?Hr(n):qr(),(t=ft)?(t=mb(t,Ln),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Or!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},a=Up(t),a.return=n,n.child=a,Ot=n,ft=null)):t=null,t===null)throw zr(n);return Mf(t)?n.lanes=32:n.lanes=536870912,null}var L=s.children;return s=s.fallback,d?(qr(),d=n.mode,L=Yo({mode:"hidden",children:L},d),s=yi(s,d,a,null),L.return=n,s.return=n,L.sibling=s,n.child=L,s=n.child,s.memoizedState=Qc(a),s.childLanes=Jc(t,k,a),n.memoizedState=Kc,ha(null,s)):(Hr(n),Wc(n,L))}var G=t.memoizedState;if(G!==null&&(L=G.dehydrated,L!==null)){if(m)n.flags&256?(Hr(n),n.flags&=-257,n=ef(t,n,a)):n.memoizedState!==null?(qr(),n.child=t.child,n.flags|=128,n=null):(qr(),L=s.fallback,d=n.mode,s=Yo({mode:"visible",children:s.children},d),L=yi(L,d,a,null),L.flags|=2,s.return=n,L.return=n,s.sibling=L,n.child=s,Ci(n,t.child,null,a),s=n.child,s.memoizedState=Qc(a),s.childLanes=Jc(t,k,a),n.memoizedState=Kc,n=ha(null,s));else if(Hr(n),Mf(L)){if(k=L.nextSibling&&L.nextSibling.dataset,k)var ne=k.dgst;k=ne,s=Error(l(419)),s.stack="",s.digest=k,ta({value:s,source:null,stack:null}),n=ef(t,n,a)}else if(St||rl(t,n,a,!1),k=(a&t.childLanes)!==0,St||k){if(k=ot,k!==null&&(s=Wt(k,a),s!==0&&s!==G.retryLane))throw G.retryLane=s,bi(t,s),an(k,t,s),Xc;Of(L)||ns(),n=ef(t,n,a)}else Of(L)?(n.flags|=192,n.child=t.child,n=null):(t=G.treeContext,ft=On(L.nextSibling),Ot=n,Pe=!0,Mr=null,Ln=!1,t!==null&&$p(n,t),n=Wc(n,s.children),n.flags|=4096);return n}return d?(qr(),L=s.fallback,d=n.mode,G=t.child,ne=G.sibling,s=sr(G,{mode:"hidden",children:s.children}),s.subtreeFlags=G.subtreeFlags&65011712,ne!==null?L=sr(ne,L):(L=yi(L,d,a,null),L.flags|=2),L.return=n,s.return=n,s.sibling=L,n.child=s,ha(null,s),s=n.child,L=t.child.memoizedState,L===null?L=Qc(a):(d=L.cachePool,d!==null?(G=vt._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=Zp(),L={baseLanes:L.baseLanes|a,cachePool:d}),s.memoizedState=L,s.childLanes=Jc(t,k,a),n.memoizedState=Kc,ha(t.child,s)):(Hr(n),a=t.child,t=a.sibling,a=sr(a,{mode:"visible",children:s.children}),a.return=n,a.sibling=null,t!==null&&(k=n.deletions,k===null?(n.deletions=[t],n.flags|=16):k.push(t)),n.child=a,n.memoizedState=null,a)}function Wc(t,n){return n=Yo({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Yo(t,n){return t=pn(22,t,null,n),t.lanes=0,t}function ef(t,n,a){return Ci(n,t.child,null,a),t=Wc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function sg(t,n,a){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),mc(t.return,n,a)}function tf(t,n,a,s,d,m){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:d,treeForkCount:m}:(k.isBackwards=n,k.rendering=null,k.renderingStartTime=0,k.last=s,k.tail=a,k.tailMode=d,k.treeForkCount=m)}function ug(t,n,a){var s=n.pendingProps,d=s.revealOrder,m=s.tail;s=s.children;var k=yt.current,L=(k&2)!==0;if(L?(k=k&1|2,n.flags|=128):k&=1,T(yt,k),zt(t,n,s,a),s=Pe?ea:0,!L&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&sg(t,a,n);else if(t.tag===19)sg(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&Mo(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),tf(n,!1,d,a,m,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Mo(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}tf(n,!0,a,null,m,s);break;case"together":tf(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function pr(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),Vr|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(rl(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(l(153));if(n.child!==null){for(t=n.child,a=sr(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=sr(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function nf(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Ao(t)))}function $w(t,n,a){switch(n.tag){case 3:xe(n,n.stateNode.containerInfo),Fr(n,vt,t.memoizedState.cache),xi();break;case 27:case 5:ve(n);break;case 4:xe(n,n.stateNode.containerInfo);break;case 10:Fr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ac(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(Hr(n),n.flags|=128,null):(a&n.child.childLanes)!==0?og(t,n,a):(Hr(n),t=pr(t,n,a),t!==null?t.sibling:null);Hr(n);break;case 19:var d=(t.flags&128)!==0;if(s=(a&n.childLanes)!==0,s||(rl(t,n,a,!1),s=(a&n.childLanes)!==0),d){if(s)return ug(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),T(yt,yt.current),s)break;return null;case 22:return n.lanes=0,tg(t,n,a,n.pendingProps);case 24:Fr(n,vt,t.memoizedState.cache)}return pr(t,n,a)}function cg(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)St=!0;else{if(!nf(t,a)&&(n.flags&128)===0)return St=!1,$w(t,n,a);St=(t.flags&131072)!==0}else St=!1,Pe&&(n.flags&1048576)!==0&&qp(n,ea,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=ki(n.elementType),n.type=t,typeof t=="function")oc(t)?(s=Ai(t,s),n.tag=1,n=lg(null,n,t,s,a)):(n.tag=0,n=Zc(null,n,t,s,a));else{if(t!=null){var d=t.$$typeof;if(d===O){n.tag=11,n=Jm(null,n,t,s,a);break e}else if(d===F){n.tag=14,n=Wm(null,n,t,s,a);break e}}throw n=I(t)||t,Error(l(306,n,""))}}return n;case 0:return Zc(t,n,n.type,n.pendingProps,a);case 1:return s=n.type,d=Ai(s,n.pendingProps),lg(t,n,s,d,a);case 3:e:{if(xe(n,n.stateNode.containerInfo),t===null)throw Error(l(387));s=n.pendingProps;var m=n.memoizedState;d=m.element,Sc(t,n),sa(n,s,null,a);var k=n.memoizedState;if(s=k.cache,Fr(n,vt,s),s!==m.cache&&gc(n,[vt],a,!0),oa(),s=k.element,m.isDehydrated)if(m={element:s,isDehydrated:!1,cache:k.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=ag(t,n,s,a);break e}else if(s!==d){d=Rn(Error(l(424)),n),ta(d),n=ag(t,n,s,a);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ft=On(t.firstChild),Ot=n,Pe=!0,Mr=null,Ln=!0,a=tm(n,null,s,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(xi(),s===d){n=pr(t,n,a);break e}zt(t,n,s,a)}n=n.child}return n;case 26:return Go(t,n),t===null?(a=wb(n.type,null,n.pendingProps,null))?n.memoizedState=a:Pe||(a=n.type,t=n.pendingProps,s=us(ce.current).createElement(a),s[Ct]=n,s[Ht]=t,Ft(s,a,t),be(s),n.stateNode=s):n.memoizedState=wb(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return ve(n),t===null&&Pe&&(s=n.stateNode=yb(n.type,n.pendingProps,ce.current),Ot=n,Ln=!0,d=ft,Kr(n.type)?(zf=d,ft=On(s.firstChild)):ft=d),zt(t,n,n.pendingProps.children,a),Go(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Pe&&((d=s=ft)&&(s=xS(s,n.type,n.pendingProps,Ln),s!==null?(n.stateNode=s,Ot=n,ft=On(s.firstChild),Ln=!1,d=!0):d=!1),d||zr(n)),ve(n),d=n.type,m=n.pendingProps,k=t!==null?t.memoizedProps:null,s=m.children,_f(d,m)?s=null:k!==null&&_f(d,k)&&(n.flags|=32),n.memoizedState!==null&&(d=Rc(t,n,Ow,null,null,a),Ta._currentValue=d),Go(t,n),zt(t,n,s,a),n.child;case 6:return t===null&&Pe&&((t=a=ft)&&(a=vS(a,n.pendingProps,Ln),a!==null?(n.stateNode=a,Ot=n,ft=null,t=!0):t=!1),t||zr(n)),null;case 13:return og(t,n,a);case 4:return xe(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=Ci(n,null,s,a):zt(t,n,s,a),n.child;case 11:return Jm(t,n,n.type,n.pendingProps,a);case 7:return zt(t,n,n.pendingProps,a),n.child;case 8:return zt(t,n,n.pendingProps.children,a),n.child;case 12:return zt(t,n,n.pendingProps.children,a),n.child;case 10:return s=n.pendingProps,Fr(n,n.type,s.value),zt(t,n,s.children,a),n.child;case 9:return d=n.type._context,s=n.pendingProps.children,wi(n),d=Mt(d),s=s(d),n.flags|=1,zt(t,n,s,a),n.child;case 14:return Wm(t,n,n.type,n.pendingProps,a);case 15:return eg(t,n,n.type,n.pendingProps,a);case 19:return ug(t,n,a);case 31:return qw(t,n,a);case 22:return tg(t,n,a,n.pendingProps);case 24:return wi(n),s=Mt(vt),t===null?(d=xc(),d===null&&(d=ot,m=bc(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=a),d=m),n.memoizedState={parent:s,cache:d},wc(n),Fr(n,vt,d)):((t.lanes&a)!==0&&(Sc(t,n),sa(n,null,null,a),oa()),d=t.memoizedState,m=n.memoizedState,d.parent!==s?(d={parent:s,cache:s},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Fr(n,vt,s)):(s=m.cache,Fr(n,vt,s),s!==d.cache&&gc(n,[vt],a,!0))),zt(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function mr(t){t.flags|=4}function rf(t,n,a,s,d){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Fg())t.flags|=8192;else throw Ei=_o,vc}else t.flags&=-16777217}function fg(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Nb(n))if(Fg())t.flags|=8192;else throw Ei=_o,vc}function Xo(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?oo():536870912,t.lanes|=n,ml|=n)}function pa(t,n){if(!Pe)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function dt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,s=0;if(n)for(var d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=s,t.childLanes=a,n}function Pw(t,n,a){var s=n.pendingProps;switch(fc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return a=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),fr(vt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(nl(n)?mr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,hc())),dt(n),null;case 26:var d=n.type,m=n.memoizedState;return t===null?(mr(n),m!==null?(dt(n),fg(n,m)):(dt(n),rf(n,d,null,s,a))):m?m!==t.memoizedState?(mr(n),dt(n),fg(n,m)):(dt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&mr(n),dt(n),rf(n,d,t,s,a)),null;case 27:if(Ee(n),a=ce.current,d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&mr(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return dt(n),null}t=W.current,nl(n)?Pp(n):(t=yb(d,s,a),n.stateNode=t,mr(n))}return dt(n),null;case 5:if(Ee(n),d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&mr(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return dt(n),null}if(m=W.current,nl(n))Pp(n);else{var k=us(ce.current);switch(m){case 1:m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=k.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof s.is=="string"?k.createElement("select",{is:s.is}):k.createElement("select"),s.multiple?m.multiple=!0:s.size&&(m.size=s.size);break;default:m=typeof s.is=="string"?k.createElement(d,{is:s.is}):k.createElement(d)}}m[Ct]=n,m[Ht]=s;e:for(k=n.child;k!==null;){if(k.tag===5||k.tag===6)m.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===n)break e;for(;k.sibling===null;){if(k.return===null||k.return===n)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}n.stateNode=m;e:switch(Ft(m,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&mr(n)}}return dt(n),rf(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&mr(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(l(166));if(t=ce.current,nl(n)){if(t=n.stateNode,a=n.memoizedProps,s=null,d=Ot,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}t[Ct]=n,t=!!(t.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||ob(t.nodeValue,a)),t||zr(n,!0)}else t=us(t).createTextNode(s),t[Ct]=n,n.stateNode=t}return dt(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(s=nl(n),a!==null){if(t===null){if(!s)throw Error(l(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ct]=n}else xi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),t=!1}else a=hc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(gn(n),n):(gn(n),null);if((n.flags&128)!==0)throw Error(l(558))}return dt(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=nl(n),s!==null&&s.dehydrated!==null){if(t===null){if(!d)throw Error(l(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[Ct]=n}else xi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),d=!1}else d=hc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(gn(n),n):(gn(n),null)}return gn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=s!==null,t=t!==null&&t.memoizedState!==null,a&&(s=n.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==d&&(s.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Xo(n,n.updateQueue),dt(n),null);case 4:return ge(),t===null&&Nf(n.stateNode.containerInfo),dt(n),null;case 10:return fr(n.type),dt(n),null;case 19:if($(yt),s=n.memoizedState,s===null)return dt(n),null;if(d=(n.flags&128)!==0,m=s.rendering,m===null)if(d)pa(s,!1);else{if(gt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(m=Mo(t),m!==null){for(n.flags|=128,pa(s,!1),t=m.updateQueue,n.updateQueue=t,Xo(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Bp(a,t),a=a.sibling;return T(yt,yt.current&1|2),Pe&&ur(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&Fe()>Wo&&(n.flags|=128,d=!0,pa(s,!1),n.lanes=4194304)}else{if(!d)if(t=Mo(m),t!==null){if(n.flags|=128,d=!0,t=t.updateQueue,n.updateQueue=t,Xo(n,t),pa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!m.alternate&&!Pe)return dt(n),null}else 2*Fe()-s.renderingStartTime>Wo&&a!==536870912&&(n.flags|=128,d=!0,pa(s,!1),n.lanes=4194304);s.isBackwards?(m.sibling=n.child,n.child=m):(t=s.last,t!==null?t.sibling=m:n.child=m,s.last=m)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Fe(),t.sibling=null,a=yt.current,T(yt,d?a&1|2:a&1),Pe&&ur(n,s.treeForkCount),t):(dt(n),null);case 22:case 23:return gn(n),Nc(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(a&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),a=n.updateQueue,a!==null&&Xo(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048),t!==null&&$(Si),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),fr(vt),dt(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function Vw(t,n){switch(fc(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return fr(vt),ge(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Ee(n),null;case 31:if(n.memoizedState!==null){if(gn(n),n.alternate===null)throw Error(l(340));xi()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(gn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(l(340));xi()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return $(yt),null;case 4:return ge(),null;case 10:return fr(n.type),null;case 22:case 23:return gn(n),Nc(),t!==null&&$(Si),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return fr(vt),null;case 25:return null;default:return null}}function dg(t,n){switch(fc(n),n.tag){case 3:fr(vt),ge();break;case 26:case 27:case 5:Ee(n);break;case 4:ge();break;case 31:n.memoizedState!==null&&gn(n);break;case 13:gn(n);break;case 19:$(yt);break;case 10:fr(n.type);break;case 22:case 23:gn(n),Nc(),t!==null&&$(Si);break;case 24:fr(vt)}}function ma(t,n){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var d=s.next;a=d;do{if((a.tag&t)===t){s=void 0;var m=a.create,k=a.inst;s=m(),k.destroy=s}a=a.next}while(a!==d)}}catch(L){tt(n,n.return,L)}}function $r(t,n,a){try{var s=n.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var m=d.next;s=m;do{if((s.tag&t)===t){var k=s.inst,L=k.destroy;if(L!==void 0){k.destroy=void 0,d=n;var G=a,ne=L;try{ne()}catch(ae){tt(d,G,ae)}}}s=s.next}while(s!==m)}}catch(ae){tt(n,n.return,ae)}}function hg(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{rm(n,a)}catch(s){tt(t,t.return,s)}}}function pg(t,n,a){a.props=Ai(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(s){tt(t,n,s)}}function ga(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof a=="function"?t.refCleanup=a(s):a.current=s}}catch(d){tt(t,n,d)}}function Xn(t,n){var a=t.ref,s=t.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(d){tt(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){tt(t,n,d)}else a.current=null}function mg(t){var n=t.type,a=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(d){tt(t,t.return,d)}}function lf(t,n,a){try{var s=t.stateNode;hS(s,t.type,a,n),s[Ht]=n}catch(d){tt(t,t.return,d)}}function gg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Kr(t.type)||t.tag===4}function af(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||gg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Kr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function of(t,n,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ar));else if(s!==4&&(s===27&&Kr(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(of(t,n,a),t=t.sibling;t!==null;)of(t,n,a),t=t.sibling}function Zo(t,n,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(s!==4&&(s===27&&Kr(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Zo(t,n,a),t=t.sibling;t!==null;)Zo(t,n,a),t=t.sibling}function bg(t){var n=t.stateNode,a=t.memoizedProps;try{for(var s=t.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Ft(n,s,a),n[Ct]=t,n[Ht]=a}catch(m){tt(t,t.return,m)}}var gr=!1,kt=!1,sf=!1,yg=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function Gw(t,n){if(t=t.containerInfo,Rf=gs,t=jp(t),ec(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var d=s.anchorOffset,m=s.focusNode;s=s.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var k=0,L=-1,G=-1,ne=0,ae=0,fe=t,re=null;t:for(;;){for(var ie;fe!==a||d!==0&&fe.nodeType!==3||(L=k+d),fe!==m||s!==0&&fe.nodeType!==3||(G=k+s),fe.nodeType===3&&(k+=fe.nodeValue.length),(ie=fe.firstChild)!==null;)re=fe,fe=ie;for(;;){if(fe===t)break t;if(re===a&&++ne===d&&(L=k),re===m&&++ae===s&&(G=k),(ie=fe.nextSibling)!==null)break;fe=re,re=fe.parentNode}fe=ie}a=L===-1||G===-1?null:{start:L,end:G}}else a=null}a=a||{start:0,end:0}}else a=null;for(jf={focusedElem:t,selectionRange:a},gs=!1,Rt=n;Rt!==null;)if(n=Rt,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,Rt=t;else for(;Rt!==null;){switch(n=Rt,m=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)d=t[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,a=n,d=m.memoizedProps,m=m.memoizedState,s=a.stateNode;try{var Se=Ai(a.type,d);t=s.getSnapshotBeforeUpdate(Se,m),s.__reactInternalSnapshotBeforeUpdate=t}catch(Ae){tt(a,a.return,Ae)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,a=t.nodeType,a===9)Df(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Df(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=n.sibling,t!==null){t.return=n.return,Rt=t;break}Rt=n.return}}function xg(t,n,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:yr(t,a),s&4&&ma(5,a);break;case 1:if(yr(t,a),s&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(k){tt(a,a.return,k)}else{var d=Ai(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(d,n,t.__reactInternalSnapshotBeforeUpdate)}catch(k){tt(a,a.return,k)}}s&64&&hg(a),s&512&&ga(a,a.return);break;case 3:if(yr(t,a),s&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{rm(t,n)}catch(k){tt(a,a.return,k)}}break;case 27:n===null&&s&4&&bg(a);case 26:case 5:yr(t,a),n===null&&s&4&&mg(a),s&512&&ga(a,a.return);break;case 12:yr(t,a);break;case 31:yr(t,a),s&4&&Sg(t,a);break;case 13:yr(t,a),s&4&&kg(t,a),s&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=tS.bind(null,a),wS(t,a))));break;case 22:if(s=a.memoizedState!==null||gr,!s){n=n!==null&&n.memoizedState!==null||kt,d=gr;var m=kt;gr=s,(kt=n)&&!m?xr(t,a,(a.subtreeFlags&8772)!==0):yr(t,a),gr=d,kt=m}break;case 30:break;default:yr(t,a)}}function vg(t){var n=t.alternate;n!==null&&(t.alternate=null,vg(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Pl(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ht=null,tn=!1;function br(t,n,a){for(a=a.child;a!==null;)wg(t,n,a),a=a.sibling}function wg(t,n,a){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:kt||Xn(a,n),br(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:kt||Xn(a,n);var s=ht,d=tn;Kr(a.type)&&(ht=a.stateNode,tn=!1),br(t,n,a),Ca(a.stateNode),ht=s,tn=d;break;case 5:kt||Xn(a,n);case 6:if(s=ht,d=tn,ht=null,br(t,n,a),ht=s,tn=d,ht!==null)if(tn)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(m){tt(a,n,m)}else try{ht.removeChild(a.stateNode)}catch(m){tt(a,n,m)}break;case 18:ht!==null&&(tn?(t=ht,hb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),kl(t)):hb(ht,a.stateNode));break;case 4:s=ht,d=tn,ht=a.stateNode.containerInfo,tn=!0,br(t,n,a),ht=s,tn=d;break;case 0:case 11:case 14:case 15:$r(2,a,n),kt||$r(4,a,n),br(t,n,a);break;case 1:kt||(Xn(a,n),s=a.stateNode,typeof s.componentWillUnmount=="function"&&pg(a,n,s)),br(t,n,a);break;case 21:br(t,n,a);break;case 22:kt=(s=kt)||a.memoizedState!==null,br(t,n,a),kt=s;break;default:br(t,n,a)}}function Sg(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{kl(t)}catch(a){tt(n,n.return,a)}}}function kg(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{kl(t)}catch(a){tt(n,n.return,a)}}function Yw(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new yg),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new yg),n;default:throw Error(l(435,t.tag))}}function Ko(t,n){var a=Yw(t);n.forEach(function(s){if(!a.has(s)){a.add(s);var d=nS.bind(null,t,s);s.then(d,d)}})}function nn(t,n){var a=n.deletions;if(a!==null)for(var s=0;s<a.length;s++){var d=a[s],m=t,k=n,L=k;e:for(;L!==null;){switch(L.tag){case 27:if(Kr(L.type)){ht=L.stateNode,tn=!1;break e}break;case 5:ht=L.stateNode,tn=!1;break e;case 3:case 4:ht=L.stateNode.containerInfo,tn=!0;break e}L=L.return}if(ht===null)throw Error(l(160));wg(m,k,d),ht=null,tn=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Eg(n,t),n=n.sibling}var Un=null;function Eg(t,n){var a=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:nn(n,t),rn(t),s&4&&($r(3,t,t.return),ma(3,t),$r(5,t,t.return));break;case 1:nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),s&64&&gr&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var d=Un;if(nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),s&4){var m=a!==null?a.memoizedState:null;if(s=t.memoizedState,a===null)if(s===null)if(t.stateNode===null){e:{s=t.type,a=t.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":m=d.getElementsByTagName("title")[0],(!m||m[di]||m[Ct]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(s),d.head.insertBefore(m,d.querySelector("head > title"))),Ft(m,s,a),m[Ct]=t,be(m),s=m;break e;case"link":var k=Eb("link","href",d).get(s+(a.href||""));if(k){for(var L=0;L<k.length;L++)if(m=k[L],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){k.splice(L,1);break t}}m=d.createElement(s),Ft(m,s,a),d.head.appendChild(m);break;case"meta":if(k=Eb("meta","content",d).get(s+(a.content||""))){for(L=0;L<k.length;L++)if(m=k[L],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){k.splice(L,1);break t}}m=d.createElement(s),Ft(m,s,a),d.head.appendChild(m);break;default:throw Error(l(468,s))}m[Ct]=t,be(m),s=m}t.stateNode=s}else Cb(d,t.type,t.stateNode);else t.stateNode=kb(d,s,t.memoizedProps);else m!==s?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,s===null?Cb(d,t.type,t.stateNode):kb(d,s,t.memoizedProps)):s===null&&t.stateNode!==null&&lf(t,t.memoizedProps,a.memoizedProps)}break;case 27:nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),a!==null&&s&4&&lf(t,t.memoizedProps,a.memoizedProps);break;case 5:if(nn(n,t),rn(t),s&512&&(kt||a===null||Xn(a,a.return)),t.flags&32){d=t.stateNode;try{Gi(d,"")}catch(Se){tt(t,t.return,Se)}}s&4&&t.stateNode!=null&&(d=t.memoizedProps,lf(t,d,a!==null?a.memoizedProps:d)),s&1024&&(sf=!0);break;case 6:if(nn(n,t),rn(t),s&4){if(t.stateNode===null)throw Error(l(162));s=t.memoizedProps,a=t.stateNode;try{a.nodeValue=s}catch(Se){tt(t,t.return,Se)}}break;case 3:if(ds=null,d=Un,Un=cs(n.containerInfo),nn(n,t),Un=d,rn(t),s&4&&a!==null&&a.memoizedState.isDehydrated)try{kl(n.containerInfo)}catch(Se){tt(t,t.return,Se)}sf&&(sf=!1,Cg(t));break;case 4:s=Un,Un=cs(t.stateNode.containerInfo),nn(n,t),rn(t),Un=s;break;case 12:nn(n,t),rn(t);break;case 31:nn(n,t),rn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ko(t,s)));break;case 13:nn(n,t),rn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Jo=Fe()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ko(t,s)));break;case 22:d=t.memoizedState!==null;var G=a!==null&&a.memoizedState!==null,ne=gr,ae=kt;if(gr=ne||d,kt=ae||G,nn(n,t),kt=ae,gr=ne,rn(t),s&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||G||gr||kt||Ti(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){G=a=n;try{if(m=G.stateNode,d)k=m.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{L=G.stateNode;var fe=G.memoizedProps.style,re=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;L.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Se){tt(G,G.return,Se)}}}else if(n.tag===6){if(a===null){G=n;try{G.stateNode.nodeValue=d?"":G.memoizedProps}catch(Se){tt(G,G.return,Se)}}}else if(n.tag===18){if(a===null){G=n;try{var ie=G.stateNode;d?pb(ie,!0):pb(G.stateNode,!1)}catch(Se){tt(G,G.return,Se)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=t.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Ko(t,a))));break;case 19:nn(n,t),rn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Ko(t,s)));break;case 30:break;case 21:break;default:nn(n,t),rn(t)}}function rn(t){var n=t.flags;if(n&2){try{for(var a,s=t.return;s!==null;){if(gg(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var d=a.stateNode,m=af(t);Zo(t,m,d);break;case 5:var k=a.stateNode;a.flags&32&&(Gi(k,""),a.flags&=-33);var L=af(t);Zo(t,L,k);break;case 3:case 4:var G=a.stateNode.containerInfo,ne=af(t);of(t,ne,G);break;default:throw Error(l(161))}}catch(ae){tt(t,t.return,ae)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Cg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Cg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function yr(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)xg(t,n.alternate,n),n=n.sibling}function Ti(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:$r(4,n,n.return),Ti(n);break;case 1:Xn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&pg(n,n.return,a),Ti(n);break;case 27:Ca(n.stateNode);case 26:case 5:Xn(n,n.return),Ti(n);break;case 22:n.memoizedState===null&&Ti(n);break;case 30:Ti(n);break;default:Ti(n)}t=t.sibling}}function xr(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,d=t,m=n,k=m.flags;switch(m.tag){case 0:case 11:case 15:xr(d,m,a),ma(4,m);break;case 1:if(xr(d,m,a),s=m,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ne){tt(s,s.return,ne)}if(s=m,d=s.updateQueue,d!==null){var L=s.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)nm(G[d],L)}catch(ne){tt(s,s.return,ne)}}a&&k&64&&hg(m),ga(m,m.return);break;case 27:bg(m);case 26:case 5:xr(d,m,a),a&&s===null&&k&4&&mg(m),ga(m,m.return);break;case 12:xr(d,m,a);break;case 31:xr(d,m,a),a&&k&4&&Sg(d,m);break;case 13:xr(d,m,a),a&&k&4&&kg(d,m);break;case 22:m.memoizedState===null&&xr(d,m,a),ga(m,m.return);break;case 30:break;default:xr(d,m,a)}n=n.sibling}}function uf(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&na(a))}function cf(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&na(t))}function Hn(t,n,a,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ng(t,n,a,s),n=n.sibling}function Ng(t,n,a,s){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Hn(t,n,a,s),d&2048&&ma(9,n);break;case 1:Hn(t,n,a,s);break;case 3:Hn(t,n,a,s),d&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&na(t)));break;case 12:if(d&2048){Hn(t,n,a,s),t=n.stateNode;try{var m=n.memoizedProps,k=m.id,L=m.onPostCommit;typeof L=="function"&&L(k,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(G){tt(n,n.return,G)}}else Hn(t,n,a,s);break;case 31:Hn(t,n,a,s);break;case 13:Hn(t,n,a,s);break;case 23:break;case 22:m=n.stateNode,k=n.alternate,n.memoizedState!==null?m._visibility&2?Hn(t,n,a,s):ba(t,n):m._visibility&2?Hn(t,n,a,s):(m._visibility|=2,dl(t,n,a,s,(n.subtreeFlags&10256)!==0||!1)),d&2048&&uf(k,n);break;case 24:Hn(t,n,a,s),d&2048&&cf(n.alternate,n);break;default:Hn(t,n,a,s)}}function dl(t,n,a,s,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var m=t,k=n,L=a,G=s,ne=k.flags;switch(k.tag){case 0:case 11:case 15:dl(m,k,L,G,d),ma(8,k);break;case 23:break;case 22:var ae=k.stateNode;k.memoizedState!==null?ae._visibility&2?dl(m,k,L,G,d):ba(m,k):(ae._visibility|=2,dl(m,k,L,G,d)),d&&ne&2048&&uf(k.alternate,k);break;case 24:dl(m,k,L,G,d),d&&ne&2048&&cf(k.alternate,k);break;default:dl(m,k,L,G,d)}n=n.sibling}}function ba(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,s=n,d=s.flags;switch(s.tag){case 22:ba(a,s),d&2048&&uf(s.alternate,s);break;case 24:ba(a,s),d&2048&&cf(s.alternate,s);break;default:ba(a,s)}n=n.sibling}}var ya=8192;function hl(t,n,a){if(t.subtreeFlags&ya)for(t=t.child;t!==null;)Ag(t,n,a),t=t.sibling}function Ag(t,n,a){switch(t.tag){case 26:hl(t,n,a),t.flags&ya&&t.memoizedState!==null&&DS(a,Un,t.memoizedState,t.memoizedProps);break;case 5:hl(t,n,a);break;case 3:case 4:var s=Un;Un=cs(t.stateNode.containerInfo),hl(t,n,a),Un=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=ya,ya=16777216,hl(t,n,a),ya=s):hl(t,n,a));break;default:hl(t,n,a)}}function Tg(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function xa(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];Rt=s,jg(s,t)}Tg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rg(t),t=t.sibling}function Rg(t){switch(t.tag){case 0:case 11:case 15:xa(t),t.flags&2048&&$r(9,t,t.return);break;case 3:xa(t);break;case 12:xa(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Qo(t)):xa(t);break;default:xa(t)}}function Qo(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];Rt=s,jg(s,t)}Tg(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:$r(8,n,n.return),Qo(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Qo(n));break;default:Qo(n)}t=t.sibling}}function jg(t,n){for(;Rt!==null;){var a=Rt;switch(a.tag){case 0:case 11:case 15:$r(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:na(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,Rt=s;else e:for(a=t;Rt!==null;){s=Rt;var d=s.sibling,m=s.return;if(vg(s),s===a){Rt=null;break e}if(d!==null){d.return=m,Rt=d;break e}Rt=m}}}var Xw={getCacheForType:function(t){var n=Mt(vt),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},cacheSignal:function(){return Mt(vt).controller.signal}},Zw=typeof WeakMap=="function"?WeakMap:Map,Qe=0,ot=null,Be=null,qe=0,et=0,bn=null,Pr=!1,pl=!1,ff=!1,vr=0,gt=0,Vr=0,Ri=0,df=0,yn=0,ml=0,va=null,ln=null,hf=!1,Jo=0,_g=0,Wo=1/0,es=null,Gr=null,At=0,Yr=null,gl=null,wr=0,pf=0,mf=null,Lg=null,wa=0,gf=null;function xn(){return(Qe&2)!==0&&qe!==0?qe&-qe:B.T!==null?Sf():ir()}function Dg(){if(yn===0)if((qe&536870912)===0||Pe){var t=Rr;Rr<<=1,(Rr&3932160)===0&&(Rr=262144),yn=t}else yn=536870912;return t=mn.current,t!==null&&(t.flags|=32),yn}function an(t,n,a){(t===ot&&(et===2||et===9)||t.cancelPendingCommit!==null)&&(bl(t,0),Xr(t,qe,yn,!1)),rr(t,a),((Qe&2)===0||t!==ot)&&(t===ot&&((Qe&2)===0&&(Ri|=a),gt===4&&Xr(t,qe,yn,!1)),Zn(t))}function Og(t,n,a){if((Qe&6)!==0)throw Error(l(327));var s=!a&&(n&127)===0&&(n&t.expiredLanes)===0||nr(t,n),d=s?Jw(t,n):yf(t,n,!0),m=s;do{if(d===0){pl&&!s&&Xr(t,n,0,!1);break}else{if(a=t.current.alternate,m&&!Kw(a)){d=yf(t,n,!1),m=!1;continue}if(d===2){if(m=n,t.errorRecoveryDisabledLanes&m)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){n=k;e:{var L=t;d=va;var G=L.current.memoizedState.isDehydrated;if(G&&(bl(L,k).flags|=256),k=yf(L,k,!1),k!==2){if(ff&&!G){L.errorRecoveryDisabledLanes|=m,Ri|=m,d=4;break e}m=ln,ln=d,m!==null&&(ln===null?ln=m:ln.push.apply(ln,m))}d=k}if(m=!1,d!==2)continue}}if(d===1){bl(t,0),Xr(t,n,0,!0);break}e:{switch(s=t,m=d,m){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n)break;case 6:Xr(s,n,yn,!Pr);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(d=Jo+300-Fe(),10<d)){if(Xr(s,n,yn,!Pr),jr(s,0,!0)!==0)break e;wr=n,s.timeoutHandle=fb(Mg.bind(null,s,a,ln,es,hf,n,yn,Ri,ml,Pr,m,"Throttled",-0,0),d);break e}Mg(s,a,ln,es,hf,n,yn,Ri,ml,Pr,m,null,-0,0)}}break}while(!0);Zn(t)}function Mg(t,n,a,s,d,m,k,L,G,ne,ae,fe,re,ie){if(t.timeoutHandle=-1,fe=n.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ar},Ag(n,m,fe);var Se=(m&62914560)===m?Jo-Fe():(m&4194048)===m?_g-Fe():0;if(Se=OS(fe,Se),Se!==null){wr=m,t.cancelPendingCommit=Se($g.bind(null,t,n,m,a,s,d,k,L,G,ae,fe,null,re,ie)),Xr(t,m,k,!ne);return}}$g(t,n,m,a,s,d,k,L,G)}function Kw(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var d=a[s],m=d.getSnapshot;d=d.value;try{if(!hn(m(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Xr(t,n,a,s){n&=~df,n&=~Ri,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var d=n;0<d;){var m=31-We(d),k=1<<m;s[m]=-1,d&=~k}a!==0&&Hl(t,a,n)}function ts(){return(Qe&6)===0?(Sa(0),!1):!0}function bf(){if(Be!==null){if(et===0)var t=Be.return;else t=Be,cr=vi=null,Lc(t),ol=null,ia=0,t=Be;for(;t!==null;)dg(t.alternate,t),t=t.return;Be=null}}function bl(t,n){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,gS(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),wr=0,bf(),ot=t,Be=a=sr(t.current,null),qe=n,et=0,bn=null,Pr=!1,pl=nr(t,n),ff=!1,ml=yn=df=Ri=Vr=gt=0,ln=va=null,hf=!1,(n&8)!==0&&(n|=n&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=n;0<s;){var d=31-We(s),m=1<<d;n|=t[d],s&=~m}return vr=n,So(),a}function zg(t,n){Le=null,B.H=da,n===al||n===jo?(n=Jp(),et=3):n===vc?(n=Jp(),et=4):et=n===Xc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,bn=n,Be===null&&(gt=1,Po(t,Rn(n,t.current)))}function Fg(){var t=mn.current;return t===null?!0:(qe&4194048)===qe?Dn===null:(qe&62914560)===qe||(qe&536870912)!==0?t===Dn:!1}function Ig(){var t=B.H;return B.H=da,t===null?da:t}function Bg(){var t=B.A;return B.A=Xw,t}function ns(){gt=4,Pr||(qe&4194048)!==qe&&mn.current!==null||(pl=!0),(Vr&134217727)===0&&(Ri&134217727)===0||ot===null||Xr(ot,qe,yn,!1)}function yf(t,n,a){var s=Qe;Qe|=2;var d=Ig(),m=Bg();(ot!==t||qe!==n)&&(es=null,bl(t,n)),n=!1;var k=gt;e:do try{if(et!==0&&Be!==null){var L=Be,G=bn;switch(et){case 8:bf(),k=6;break e;case 3:case 2:case 9:case 6:mn.current===null&&(n=!0);var ne=et;if(et=0,bn=null,yl(t,L,G,ne),a&&pl){k=0;break e}break;default:ne=et,et=0,bn=null,yl(t,L,G,ne)}}Qw(),k=gt;break}catch(ae){zg(t,ae)}while(!0);return n&&t.shellSuspendCounter++,cr=vi=null,Qe=s,B.H=d,B.A=m,Be===null&&(ot=null,qe=0,So()),k}function Qw(){for(;Be!==null;)Ug(Be)}function Jw(t,n){var a=Qe;Qe|=2;var s=Ig(),d=Bg();ot!==t||qe!==n?(es=null,Wo=Fe()+500,bl(t,n)):pl=nr(t,n);e:do try{if(et!==0&&Be!==null){n=Be;var m=bn;t:switch(et){case 1:et=0,bn=null,yl(t,n,m,1);break;case 2:case 9:if(Kp(m)){et=0,bn=null,Hg(n);break}n=function(){et!==2&&et!==9||ot!==t||(et=7),Zn(t)},m.then(n,n);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:Kp(m)?(et=0,bn=null,Hg(n)):(et=0,bn=null,yl(t,n,m,7));break;case 5:var k=null;switch(Be.tag){case 26:k=Be.memoizedState;case 5:case 27:var L=Be;if(k?Nb(k):L.stateNode.complete){et=0,bn=null;var G=L.sibling;if(G!==null)Be=G;else{var ne=L.return;ne!==null?(Be=ne,rs(ne)):Be=null}break t}}et=0,bn=null,yl(t,n,m,5);break;case 6:et=0,bn=null,yl(t,n,m,6);break;case 8:bf(),gt=6;break e;default:throw Error(l(462))}}Ww();break}catch(ae){zg(t,ae)}while(!0);return cr=vi=null,B.H=s,B.A=d,Qe=a,Be!==null?0:(ot=null,qe=0,So(),gt)}function Ww(){for(;Be!==null&&!Jt();)Ug(Be)}function Ug(t){var n=cg(t.alternate,t,vr);t.memoizedProps=t.pendingProps,n===null?rs(t):Be=n}function Hg(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=ig(a,n,n.pendingProps,n.type,void 0,qe);break;case 11:n=ig(a,n,n.pendingProps,n.type.render,n.ref,qe);break;case 5:Lc(n);default:dg(a,n),n=Be=Bp(n,vr),n=cg(a,n,vr)}t.memoizedProps=t.pendingProps,n===null?rs(t):Be=n}function yl(t,n,a,s){cr=vi=null,Lc(n),ol=null,ia=0;var d=n.return;try{if(Hw(t,d,n,a,qe)){gt=1,Po(t,Rn(a,t.current)),Be=null;return}}catch(m){if(d!==null)throw Be=d,m;gt=1,Po(t,Rn(a,t.current)),Be=null;return}n.flags&32768?(Pe||s===1?t=!0:pl||(qe&536870912)!==0?t=!1:(Pr=t=!0,(s===2||s===9||s===3||s===6)&&(s=mn.current,s!==null&&s.tag===13&&(s.flags|=16384))),qg(n,t)):rs(n)}function rs(t){var n=t;do{if((n.flags&32768)!==0){qg(n,Pr);return}t=n.return;var a=Pw(n.alternate,n,vr);if(a!==null){Be=a;return}if(n=n.sibling,n!==null){Be=n;return}Be=n=t}while(n!==null);gt===0&&(gt=5)}function qg(t,n){do{var a=Vw(t.alternate,t);if(a!==null){a.flags&=32767,Be=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){Be=t;return}Be=t=a}while(t!==null);gt=6,Be=null}function $g(t,n,a,s,d,m,k,L,G){t.cancelPendingCommit=null;do is();while(At!==0);if((Qe&6)!==0)throw Error(l(327));if(n!==null){if(n===t.current)throw Error(l(177));if(m=n.lanes|n.childLanes,m|=lc,zu(t,a,m,k,L,G),t===ot&&(Be=ot=null,qe=0),gl=n,Yr=t,wr=a,pf=m,mf=d,Lg=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,rS(Te,function(){return Xg(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,d=Y.p,Y.p=2,k=Qe,Qe|=4;try{Gw(t,n,a)}finally{Qe=k,Y.p=d,B.T=s}}At=1,Pg(),Vg(),Gg()}}function Pg(){if(At===1){At=0;var t=Yr,n=gl,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var s=Y.p;Y.p=2;var d=Qe;Qe|=4;try{Eg(n,t);var m=jf,k=jp(t.containerInfo),L=m.focusedElem,G=m.selectionRange;if(k!==L&&L&&L.ownerDocument&&Rp(L.ownerDocument.documentElement,L)){if(G!==null&&ec(L)){var ne=G.start,ae=G.end;if(ae===void 0&&(ae=ne),"selectionStart"in L)L.selectionStart=ne,L.selectionEnd=Math.min(ae,L.value.length);else{var fe=L.ownerDocument||document,re=fe&&fe.defaultView||window;if(re.getSelection){var ie=re.getSelection(),Se=L.textContent.length,Ae=Math.min(G.start,Se),it=G.end===void 0?Ae:Math.min(G.end,Se);!ie.extend&&Ae>it&&(k=it,it=Ae,Ae=k);var Q=Tp(L,Ae),K=Tp(L,it);if(Q&&K&&(ie.rangeCount!==1||ie.anchorNode!==Q.node||ie.anchorOffset!==Q.offset||ie.focusNode!==K.node||ie.focusOffset!==K.offset)){var ee=fe.createRange();ee.setStart(Q.node,Q.offset),ie.removeAllRanges(),Ae>it?(ie.addRange(ee),ie.extend(K.node,K.offset)):(ee.setEnd(K.node,K.offset),ie.addRange(ee))}}}}for(fe=[],ie=L;ie=ie.parentNode;)ie.nodeType===1&&fe.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<fe.length;L++){var se=fe[L];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}gs=!!Rf,jf=Rf=null}finally{Qe=d,Y.p=s,B.T=a}}t.current=n,At=2}}function Vg(){if(At===2){At=0;var t=Yr,n=gl,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var s=Y.p;Y.p=2;var d=Qe;Qe|=4;try{xg(t,n.alternate,n)}finally{Qe=d,Y.p=s,B.T=a}}At=3}}function Gg(){if(At===4||At===3){At=0,Ut();var t=Yr,n=gl,a=wr,s=Lg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?At=5:(At=0,gl=Yr=null,Yg(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Gr=null),Hi(a),n=n.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Lt,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=B.T,d=Y.p,Y.p=2,B.T=null;try{for(var m=t.onRecoverableError,k=0;k<s.length;k++){var L=s[k];m(L.value,{componentStack:L.stack})}}finally{B.T=n,Y.p=d}}(wr&3)!==0&&is(),Zn(t),d=t.pendingLanes,(a&261930)!==0&&(d&42)!==0?t===gf?wa++:(wa=0,gf=t):wa=0,Sa(0)}}function Yg(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,na(n)))}function is(){return Pg(),Vg(),Gg(),Xg()}function Xg(){if(At!==5)return!1;var t=Yr,n=pf;pf=0;var a=Hi(wr),s=B.T,d=Y.p;try{Y.p=32>a?32:a,B.T=null,a=mf,mf=null;var m=Yr,k=wr;if(At=0,gl=Yr=null,wr=0,(Qe&6)!==0)throw Error(l(331));var L=Qe;if(Qe|=4,Rg(m.current),Ng(m,m.current,k,a),Qe=L,Sa(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Lt,m)}catch{}return!0}finally{Y.p=d,B.T=s,Yg(t,n)}}function Zg(t,n,a){n=Rn(a,n),n=Yc(t.stateNode,n,2),t=Ur(t,n,2),t!==null&&(rr(t,2),Zn(t))}function tt(t,n,a){if(t.tag===3)Zg(t,t,a);else for(;n!==null;){if(n.tag===3){Zg(n,t,a);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Gr===null||!Gr.has(s))){t=Rn(a,t),a=Km(2),s=Ur(n,a,2),s!==null&&(Qm(a,s,n,t),rr(s,2),Zn(s));break}}n=n.return}}function xf(t,n,a){var s=t.pingCache;if(s===null){s=t.pingCache=new Zw;var d=new Set;s.set(n,d)}else d=s.get(n),d===void 0&&(d=new Set,s.set(n,d));d.has(a)||(ff=!0,d.add(a),t=eS.bind(null,t,n,a),n.then(t,t))}function eS(t,n,a){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,ot===t&&(qe&a)===a&&(gt===4||gt===3&&(qe&62914560)===qe&&300>Fe()-Jo?(Qe&2)===0&&bl(t,0):df|=a,ml===qe&&(ml=0)),Zn(t)}function Kg(t,n){n===0&&(n=oo()),t=bi(t,n),t!==null&&(rr(t,n),Zn(t))}function tS(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),Kg(t,a)}function nS(t,n){var a=0;switch(t.tag){case 31:case 13:var s=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(n),Kg(t,a)}function rS(t,n){return pt(t,n)}var ls=null,xl=null,vf=!1,as=!1,wf=!1,Zr=0;function Zn(t){t!==xl&&t.next===null&&(xl===null?ls=xl=t:xl=xl.next=t),as=!0,vf||(vf=!0,lS())}function Sa(t,n){if(!wf&&as){wf=!0;do for(var a=!1,s=ls;s!==null;){if(t!==0){var d=s.pendingLanes;if(d===0)var m=0;else{var k=s.suspendedLanes,L=s.pingedLanes;m=(1<<31-We(42|t)+1)-1,m&=d&~(k&~L),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,eb(s,m))}else m=qe,m=jr(s,s===ot?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(m&3)===0||nr(s,m)||(a=!0,eb(s,m));s=s.next}while(a);wf=!1}}function iS(){Qg()}function Qg(){as=vf=!1;var t=0;Zr!==0&&mS()&&(t=Zr);for(var n=Fe(),a=null,s=ls;s!==null;){var d=s.next,m=Jg(s,n);m===0?(s.next=null,a===null?ls=d:a.next=d,d===null&&(xl=a)):(a=s,(t!==0||(m&3)!==0)&&(as=!0)),s=d}At!==0&&At!==5||Sa(t),Zr!==0&&(Zr=0)}function Jg(t,n){for(var a=t.suspendedLanes,s=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var k=31-We(m),L=1<<k,G=d[k];G===-1?((L&a)===0||(L&s)!==0)&&(d[k]=Bi(L,n)):G<=n&&(t.expiredLanes|=L),m&=~L}if(n=ot,a=qe,a=jr(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,a===0||t===n&&(et===2||et===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Bt(s),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||nr(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(s!==null&&Bt(s),Hi(a)){case 2:case 8:a=pe;break;case 32:a=Te;break;case 268435456:a=Xe;break;default:a=Te}return s=Wg.bind(null,t),a=pt(a,s),t.callbackPriority=n,t.callbackNode=a,n}return s!==null&&s!==null&&Bt(s),t.callbackPriority=2,t.callbackNode=null,2}function Wg(t,n){if(At!==0&&At!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(is()&&t.callbackNode!==a)return null;var s=qe;return s=jr(t,t===ot?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Og(t,s,n),Jg(t,Fe()),t.callbackNode!=null&&t.callbackNode===a?Wg.bind(null,t):null)}function eb(t,n){if(is())return null;Og(t,n,!0)}function lS(){bS(function(){(Qe&6)!==0?pt(oe,iS):Qg()})}function Sf(){if(Zr===0){var t=il;t===0&&(t=Tr,Tr<<=1,(Tr&261888)===0&&(Tr=256)),Zr=t}return Zr}function tb(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:po(""+t)}function nb(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function aS(t,n,a,s,d){if(n==="submit"&&a&&a.stateNode===d){var m=tb((d[Ht]||null).action),k=s.submitter;k&&(n=(n=k[Ht]||null)?tb(n.formAction):k.getAttribute("formAction"),n!==null&&(m=n,k=null));var L=new yo("action","action",null,s,d);t.push({event:L,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Zr!==0){var G=k?nb(d,k):new FormData(d);Hc(a,{pending:!0,data:G,method:d.method,action:m},null,G)}}else typeof m=="function"&&(L.preventDefault(),G=k?nb(d,k):new FormData(d),Hc(a,{pending:!0,data:G,method:d.method,action:m},m,G))},currentTarget:d}]})}}for(var kf=0;kf<ic.length;kf++){var Ef=ic[kf],oS=Ef.toLowerCase(),sS=Ef[0].toUpperCase()+Ef.slice(1);Bn(oS,"on"+sS)}Bn(Dp,"onAnimationEnd"),Bn(Op,"onAnimationIteration"),Bn(Mp,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(Ew,"onTransitionRun"),Bn(Cw,"onTransitionStart"),Bn(Nw,"onTransitionCancel"),Bn(zp,"onTransitionEnd"),Nt("onMouseEnter",["mouseout","mouseover"]),Nt("onMouseLeave",["mouseout","mouseover"]),Nt("onPointerEnter",["pointerout","pointerover"]),Nt("onPointerLeave",["pointerout","pointerover"]),De("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),De("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),De("onBeforeInput",["compositionend","keypress","textInput","paste"]),De("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),De("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),De("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ka="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),uS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ka));function rb(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var s=t[a],d=s.event;s=s.listeners;e:{var m=void 0;if(n)for(var k=s.length-1;0<=k;k--){var L=s[k],G=L.instance,ne=L.currentTarget;if(L=L.listener,G!==m&&d.isPropagationStopped())break e;m=L,d.currentTarget=ne;try{m(d)}catch(ae){wo(ae)}d.currentTarget=null,m=G}else for(k=0;k<s.length;k++){if(L=s[k],G=L.instance,ne=L.currentTarget,L=L.listener,G!==m&&d.isPropagationStopped())break e;m=L,d.currentTarget=ne;try{m(d)}catch(ae){wo(ae)}d.currentTarget=null,m=G}}}}function Ue(t,n){var a=n[qi];a===void 0&&(a=n[qi]=new Set);var s=t+"__bubble";a.has(s)||(ib(n,t,2,!1),a.add(s))}function Cf(t,n,a){var s=0;n&&(s|=4),ib(a,t,s,n)}var os="_reactListening"+Math.random().toString(36).slice(2);function Nf(t){if(!t[os]){t[os]=!0,Re.forEach(function(a){a!=="selectionchange"&&(uS.has(a)||Cf(a,!1,t),Cf(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[os]||(n[os]=!0,Cf("selectionchange",!1,n))}}function ib(t,n,a,s){switch(Db(n)){case 2:var d=FS;break;case 8:d=IS;break;default:d=Hf}a=d.bind(null,n,a,t),d=void 0,!Vu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),s?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function Af(t,n,a,s,d){var m=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var k=s.tag;if(k===3||k===4){var L=s.stateNode.containerInfo;if(L===d)break;if(k===4)for(k=s.return;k!==null;){var G=k.tag;if((G===3||G===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;L!==null;){if(k=_r(L),k===null)return;if(G=k.tag,G===5||G===6||G===26||G===27){s=m=k;continue e}L=L.parentNode}}s=s.return}up(function(){var ne=m,ae=$u(a),fe=[];e:{var re=Fp.get(t);if(re!==void 0){var ie=yo,Se=t;switch(t){case"keypress":if(go(a)===0)break e;case"keydown":case"keyup":ie=nw;break;case"focusin":Se="focus",ie=Zu;break;case"focusout":Se="blur",ie=Zu;break;case"beforeblur":case"afterblur":ie=Zu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=dp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=Pv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=lw;break;case Dp:case Op:case Mp:ie=Yv;break;case zp:ie=ow;break;case"scroll":case"scrollend":ie=qv;break;case"wheel":ie=uw;break;case"copy":case"cut":case"paste":ie=Zv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=pp;break;case"toggle":case"beforetoggle":ie=fw}var Ae=(n&4)!==0,it=!Ae&&(t==="scroll"||t==="scrollend"),Q=Ae?re!==null?re+"Capture":null:re;Ae=[];for(var K=ne,ee;K!==null;){var se=K;if(ee=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||ee===null||Q===null||(se=Vl(K,Q),se!=null&&Ae.push(Ea(K,se,ee))),it)break;K=K.return}0<Ae.length&&(re=new ie(re,Se,null,a,ae),fe.push({event:re,listeners:Ae}))}}if((n&7)===0){e:{if(re=t==="mouseover"||t==="pointerover",ie=t==="mouseout"||t==="pointerout",re&&a!==qu&&(Se=a.relatedTarget||a.fromElement)&&(_r(Se)||Se[Cn]))break e;if((ie||re)&&(re=ae.window===ae?ae:(re=ae.ownerDocument)?re.defaultView||re.parentWindow:window,ie?(Se=a.relatedTarget||a.toElement,ie=ne,Se=Se?_r(Se):null,Se!==null&&(it=u(Se),Ae=Se.tag,Se!==it||Ae!==5&&Ae!==27&&Ae!==6)&&(Se=null)):(ie=null,Se=ne),ie!==Se)){if(Ae=dp,se="onMouseLeave",Q="onMouseEnter",K="mouse",(t==="pointerout"||t==="pointerover")&&(Ae=pp,se="onPointerLeave",Q="onPointerEnter",K="pointer"),it=ie==null?re:hi(ie),ee=Se==null?re:hi(Se),re=new Ae(se,K+"leave",ie,a,ae),re.target=it,re.relatedTarget=ee,se=null,_r(ae)===ne&&(Ae=new Ae(Q,K+"enter",Se,a,ae),Ae.target=ee,Ae.relatedTarget=it,se=Ae),it=se,ie&&Se)t:{for(Ae=cS,Q=ie,K=Se,ee=0,se=Q;se;se=Ae(se))ee++;se=0;for(var Ce=K;Ce;Ce=Ae(Ce))se++;for(;0<ee-se;)Q=Ae(Q),ee--;for(;0<se-ee;)K=Ae(K),se--;for(;ee--;){if(Q===K||K!==null&&Q===K.alternate){Ae=Q;break t}Q=Ae(Q),K=Ae(K)}Ae=null}else Ae=null;ie!==null&&lb(fe,re,ie,Ae,!1),Se!==null&&it!==null&&lb(fe,it,Se,Ae,!0)}}e:{if(re=ne?hi(ne):window,ie=re.nodeName&&re.nodeName.toLowerCase(),ie==="select"||ie==="input"&&re.type==="file")var Ze=Sp;else if(vp(re))if(kp)Ze=ww;else{Ze=xw;var ke=yw}else ie=re.nodeName,!ie||ie.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ne&&Hu(ne.elementType)&&(Ze=Sp):Ze=vw;if(Ze&&(Ze=Ze(t,ne))){wp(fe,Ze,a,ae);break e}ke&&ke(t,re,ne),t==="focusout"&&ne&&re.type==="number"&&ne.memoizedProps.value!=null&&Uu(re,"number",re.value)}switch(ke=ne?hi(ne):window,t){case"focusin":(vp(ke)||ke.contentEditable==="true")&&(Ki=ke,tc=ne,Wl=null);break;case"focusout":Wl=tc=Ki=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,_p(fe,a,ae);break;case"selectionchange":if(kw)break;case"keydown":case"keyup":_p(fe,a,ae)}var Oe;if(Qu)e:{switch(t){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else Zi?yp(t,a)&&($e="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&($e="onCompositionStart");$e&&(mp&&a.locale!=="ko"&&(Zi||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Zi&&(Oe=cp()):(Dr=ae,Gu="value"in Dr?Dr.value:Dr.textContent,Zi=!0)),ke=ss(ne,$e),0<ke.length&&($e=new hp($e,t,null,a,ae),fe.push({event:$e,listeners:ke}),Oe?$e.data=Oe:(Oe=xp(a),Oe!==null&&($e.data=Oe)))),(Oe=hw?pw(t,a):mw(t,a))&&($e=ss(ne,"onBeforeInput"),0<$e.length&&(ke=new hp("onBeforeInput","beforeinput",null,a,ae),fe.push({event:ke,listeners:$e}),ke.data=Oe)),aS(fe,t,ne,a,ae)}rb(fe,n)})}function Ea(t,n,a){return{instance:t,listener:n,currentTarget:a}}function ss(t,n){for(var a=n+"Capture",s=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Vl(t,a),d!=null&&s.unshift(Ea(t,d,m)),d=Vl(t,n),d!=null&&s.push(Ea(t,d,m))),t.tag===3)return s;t=t.return}return[]}function cS(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function lb(t,n,a,s,d){for(var m=n._reactName,k=[];a!==null&&a!==s;){var L=a,G=L.alternate,ne=L.stateNode;if(L=L.tag,G!==null&&G===s)break;L!==5&&L!==26&&L!==27||ne===null||(G=ne,d?(ne=Vl(a,m),ne!=null&&k.unshift(Ea(a,ne,G))):d||(ne=Vl(a,m),ne!=null&&k.push(Ea(a,ne,G)))),a=a.return}k.length!==0&&t.push({event:n,listeners:k})}var fS=/\r\n?/g,dS=/\u0000|\uFFFD/g;function ab(t){return(typeof t=="string"?t:""+t).replace(fS,`
9
- `).replace(dS,"")}function ob(t,n){return n=ab(n),ab(t)===n}function rt(t,n,a,s,d,m){switch(a){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Gi(t,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Gi(t,""+s);break;case"className":fo(t,"class",s);break;case"tabIndex":fo(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":fo(t,a,s);break;case"style":op(t,s,m);break;case"data":if(n!=="object"){fo(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=po(""+s),t.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(n!=="input"&&rt(t,n,"name",d.name,d,null),rt(t,n,"formEncType",d.formEncType,d,null),rt(t,n,"formMethod",d.formMethod,d,null),rt(t,n,"formTarget",d.formTarget,d,null)):(rt(t,n,"encType",d.encType,d,null),rt(t,n,"method",d.method,d,null),rt(t,n,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=po(""+s),t.setAttribute(a,s);break;case"onClick":s!=null&&(t.onclick=ar);break;case"onScroll":s!=null&&Ue("scroll",t);break;case"onScrollEnd":s!=null&&Ue("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}a=po(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""+s):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":s===!0?t.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,s):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(a,s):t.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(a):t.setAttribute(a,s);break;case"popover":Ue("beforetoggle",t),Ue("toggle",t),co(t,"popover",s);break;case"xlinkActuate":lr(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":lr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":lr(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":lr(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":lr(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":lr(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":lr(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":lr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":lr(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":co(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Uv.get(a)||a,co(t,a,s))}}function Tf(t,n,a,s,d,m){switch(a){case"style":op(t,s,m);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof s=="string"?Gi(t,s):(typeof s=="number"||typeof s=="bigint")&&Gi(t,""+s);break;case"onScroll":s!=null&&Ue("scroll",t);break;case"onScrollEnd":s!=null&&Ue("scrollend",t);break;case"onClick":s!=null&&(t.onclick=ar);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Je.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),m=t[Ht]||null,m=m!=null?m[a]:null,typeof m=="function"&&t.removeEventListener(n,m,d),typeof s=="function")){typeof m!="function"&&m!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,s,d);break e}a in t?t[a]=s:s===!0?t.setAttribute(a,""):co(t,a,s)}}}function Ft(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",t),Ue("load",t);var s=!1,d=!1,m;for(m in a)if(a.hasOwnProperty(m)){var k=a[m];if(k!=null)switch(m){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:rt(t,n,m,k,a,null)}}d&&rt(t,n,"srcSet",a.srcSet,a,null),s&&rt(t,n,"src",a.src,a,null);return;case"input":Ue("invalid",t);var L=m=k=d=null,G=null,ne=null;for(s in a)if(a.hasOwnProperty(s)){var ae=a[s];if(ae!=null)switch(s){case"name":d=ae;break;case"type":k=ae;break;case"checked":G=ae;break;case"defaultChecked":ne=ae;break;case"value":m=ae;break;case"defaultValue":L=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(l(137,n));break;default:rt(t,n,s,ae,a,null)}}rp(t,m,L,G,ne,k,d,!1);return;case"select":Ue("invalid",t),s=k=m=null;for(d in a)if(a.hasOwnProperty(d)&&(L=a[d],L!=null))switch(d){case"value":m=L;break;case"defaultValue":k=L;break;case"multiple":s=L;default:rt(t,n,d,L,a,null)}n=m,a=k,t.multiple=!!s,n!=null?Vi(t,!!s,n,!1):a!=null&&Vi(t,!!s,a,!0);return;case"textarea":Ue("invalid",t),m=d=s=null;for(k in a)if(a.hasOwnProperty(k)&&(L=a[k],L!=null))switch(k){case"value":s=L;break;case"defaultValue":d=L;break;case"children":m=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(l(91));break;default:rt(t,n,k,L,a,null)}lp(t,s,d,m);return;case"option":for(G in a)a.hasOwnProperty(G)&&(s=a[G],s!=null)&&(G==="selected"?t.selected=s&&typeof s!="function"&&typeof s!="symbol":rt(t,n,G,s,a,null));return;case"dialog":Ue("beforetoggle",t),Ue("toggle",t),Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":Ue("load",t);break;case"video":case"audio":for(s=0;s<ka.length;s++)Ue(ka[s],t);break;case"image":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"embed":case"source":case"link":Ue("error",t),Ue("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in a)if(a.hasOwnProperty(ne)&&(s=a[ne],s!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:rt(t,n,ne,s,a,null)}return;default:if(Hu(n)){for(ae in a)a.hasOwnProperty(ae)&&(s=a[ae],s!==void 0&&Tf(t,n,ae,s,a,void 0));return}}for(L in a)a.hasOwnProperty(L)&&(s=a[L],s!=null&&rt(t,n,L,s,a,null))}function hS(t,n,a,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,k=null,L=null,G=null,ne=null,ae=null;for(ie in a){var fe=a[ie];if(a.hasOwnProperty(ie)&&fe!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":G=fe;default:s.hasOwnProperty(ie)||rt(t,n,ie,null,s,fe)}}for(var re in s){var ie=s[re];if(fe=a[re],s.hasOwnProperty(re)&&(ie!=null||fe!=null))switch(re){case"type":m=ie;break;case"name":d=ie;break;case"checked":ne=ie;break;case"defaultChecked":ae=ie;break;case"value":k=ie;break;case"defaultValue":L=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(l(137,n));break;default:ie!==fe&&rt(t,n,re,ie,s,fe)}}Bu(t,k,L,G,ne,ae,m,d);return;case"select":ie=k=L=re=null;for(m in a)if(G=a[m],a.hasOwnProperty(m)&&G!=null)switch(m){case"value":break;case"multiple":ie=G;default:s.hasOwnProperty(m)||rt(t,n,m,null,s,G)}for(d in s)if(m=s[d],G=a[d],s.hasOwnProperty(d)&&(m!=null||G!=null))switch(d){case"value":re=m;break;case"defaultValue":L=m;break;case"multiple":k=m;default:m!==G&&rt(t,n,d,m,s,G)}n=L,a=k,s=ie,re!=null?Vi(t,!!a,re,!1):!!s!=!!a&&(n!=null?Vi(t,!!a,n,!0):Vi(t,!!a,a?[]:"",!1));return;case"textarea":ie=re=null;for(L in a)if(d=a[L],a.hasOwnProperty(L)&&d!=null&&!s.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:rt(t,n,L,null,s,d)}for(k in s)if(d=s[k],m=a[k],s.hasOwnProperty(k)&&(d!=null||m!=null))switch(k){case"value":re=d;break;case"defaultValue":ie=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==m&&rt(t,n,k,d,s,m)}ip(t,re,ie);return;case"option":for(var Se in a)re=a[Se],a.hasOwnProperty(Se)&&re!=null&&!s.hasOwnProperty(Se)&&(Se==="selected"?t.selected=!1:rt(t,n,Se,null,s,re));for(G in s)re=s[G],ie=a[G],s.hasOwnProperty(G)&&re!==ie&&(re!=null||ie!=null)&&(G==="selected"?t.selected=re&&typeof re!="function"&&typeof re!="symbol":rt(t,n,G,re,s,ie));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)re=a[Ae],a.hasOwnProperty(Ae)&&re!=null&&!s.hasOwnProperty(Ae)&&rt(t,n,Ae,null,s,re);for(ne in s)if(re=s[ne],ie=a[ne],s.hasOwnProperty(ne)&&re!==ie&&(re!=null||ie!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,n));break;default:rt(t,n,ne,re,s,ie)}return;default:if(Hu(n)){for(var it in a)re=a[it],a.hasOwnProperty(it)&&re!==void 0&&!s.hasOwnProperty(it)&&Tf(t,n,it,void 0,s,re);for(ae in s)re=s[ae],ie=a[ae],!s.hasOwnProperty(ae)||re===ie||re===void 0&&ie===void 0||Tf(t,n,ae,re,s,ie);return}}for(var Q in a)re=a[Q],a.hasOwnProperty(Q)&&re!=null&&!s.hasOwnProperty(Q)&&rt(t,n,Q,null,s,re);for(fe in s)re=s[fe],ie=a[fe],!s.hasOwnProperty(fe)||re===ie||re==null&&ie==null||rt(t,n,fe,re,s,ie)}function sb(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pS(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var d=a[s],m=d.transferSize,k=d.initiatorType,L=d.duration;if(m&&L&&sb(k)){for(k=0,L=d.responseEnd,s+=1;s<a.length;s++){var G=a[s],ne=G.startTime;if(ne>L)break;var ae=G.transferSize,fe=G.initiatorType;ae&&sb(fe)&&(G=G.responseEnd,k+=ae*(G<L?1:(L-ne)/(G-ne)))}if(--s,n+=8*(m+k)/(d.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Rf=null,jf=null;function us(t){return t.nodeType===9?t:t.ownerDocument}function ub(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function cb(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function _f(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Lf=null;function mS(){var t=window.event;return t&&t.type==="popstate"?t===Lf?!1:(Lf=t,!0):(Lf=null,!1)}var fb=typeof setTimeout=="function"?setTimeout:void 0,gS=typeof clearTimeout=="function"?clearTimeout:void 0,db=typeof Promise=="function"?Promise:void 0,bS=typeof queueMicrotask=="function"?queueMicrotask:typeof db<"u"?function(t){return db.resolve(null).then(t).catch(yS)}:fb;function yS(t){setTimeout(function(){throw t})}function Kr(t){return t==="head"}function hb(t,n){var a=n,s=0;do{var d=a.nextSibling;if(t.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(s===0){t.removeChild(d),kl(n);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")Ca(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Ca(a);for(var m=a.firstChild;m;){var k=m.nextSibling,L=m.nodeName;m[di]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=k}}else a==="body"&&Ca(t.ownerDocument.body);a=d}while(a);kl(n)}function pb(t,n){var a=t;t=0;do{var s=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=s}while(a)}function Df(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Df(a),Pl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function xS(t,n,a,s){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[di])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=On(t.nextSibling),t===null)break}return null}function vS(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=On(t.nextSibling),t===null))return null;return t}function mb(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=On(t.nextSibling),t===null))return null;return t}function Of(t){return t.data==="$?"||t.data==="$~"}function Mf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function wS(t,n){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||a.readyState!=="loading")n();else{var s=function(){n(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function On(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var zf=null;function gb(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(n===0)return On(t.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}t=t.nextSibling}return null}function bb(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return t;n--}else a!=="/$"&&a!=="/&"||n++}t=t.previousSibling}return null}function yb(t,n,a){switch(n=us(a),t){case"html":if(t=n.documentElement,!t)throw Error(l(452));return t;case"head":if(t=n.head,!t)throw Error(l(453));return t;case"body":if(t=n.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Ca(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Pl(t)}var Mn=new Map,xb=new Set;function cs(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Sr=Y.d;Y.d={f:SS,r:kS,D:ES,C:CS,L:NS,m:AS,X:RS,S:TS,M:jS};function SS(){var t=Sr.f(),n=ts();return t||n}function kS(t){var n=Lr(t);n!==null&&n.tag===5&&n.type==="form"?zm(n):Sr.r(t)}var vl=typeof document>"u"?null:document;function vb(t,n,a){var s=vl;if(s&&typeof n=="string"&&n){var d=An(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),xb.has(d)||(xb.add(d),t={rel:t,crossOrigin:a,href:n},s.querySelector(d)===null&&(n=s.createElement("link"),Ft(n,"link",t),be(n),s.head.appendChild(n)))}}function ES(t){Sr.D(t),vb("dns-prefetch",t,null)}function CS(t,n){Sr.C(t,n),vb("preconnect",t,n)}function NS(t,n,a){Sr.L(t,n,a);var s=vl;if(s&&t&&n){var d='link[rel="preload"][as="'+An(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+An(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+An(a.imageSizes)+'"]')):d+='[href="'+An(t)+'"]';var m=d;switch(n){case"style":m=wl(t);break;case"script":m=Sl(t)}Mn.has(m)||(t=g({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Mn.set(m,t),s.querySelector(d)!==null||n==="style"&&s.querySelector(Na(m))||n==="script"&&s.querySelector(Aa(m))||(n=s.createElement("link"),Ft(n,"link",t),be(n),s.head.appendChild(n)))}}function AS(t,n){Sr.m(t,n);var a=vl;if(a&&t){var s=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+An(s)+'"][href="'+An(t)+'"]',m=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Sl(t)}if(!Mn.has(m)&&(t=g({rel:"modulepreload",href:t},n),Mn.set(m,t),a.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Aa(m)))return}s=a.createElement("link"),Ft(s,"link",t),be(s),a.head.appendChild(s)}}}function TS(t,n,a){Sr.S(t,n,a);var s=vl;if(s&&t){var d=le(s).hoistableStyles,m=wl(t);n=n||"default";var k=d.get(m);if(!k){var L={loading:0,preload:null};if(k=s.querySelector(Na(m)))L.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Mn.get(m))&&Ff(t,a);var G=k=s.createElement("link");be(G),Ft(G,"link",t),G._p=new Promise(function(ne,ae){G.onload=ne,G.onerror=ae}),G.addEventListener("load",function(){L.loading|=1}),G.addEventListener("error",function(){L.loading|=2}),L.loading|=4,fs(k,n,s)}k={type:"stylesheet",instance:k,count:1,state:L},d.set(m,k)}}}function RS(t,n){Sr.X(t,n);var a=vl;if(a&&t){var s=le(a).hoistableScripts,d=Sl(t),m=s.get(d);m||(m=a.querySelector(Aa(d)),m||(t=g({src:t,async:!0},n),(n=Mn.get(d))&&If(t,n),m=a.createElement("script"),be(m),Ft(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function jS(t,n){Sr.M(t,n);var a=vl;if(a&&t){var s=le(a).hoistableScripts,d=Sl(t),m=s.get(d);m||(m=a.querySelector(Aa(d)),m||(t=g({src:t,async:!0,type:"module"},n),(n=Mn.get(d))&&If(t,n),m=a.createElement("script"),be(m),Ft(m,"link",t),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},s.set(d,m))}}function wb(t,n,a,s){var d=(d=ce.current)?cs(d):null;if(!d)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=wl(a.href),a=le(d).hoistableStyles,s=a.get(n),s||(s={type:"style",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=wl(a.href);var m=le(d).hoistableStyles,k=m.get(t);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,k),(m=d.querySelector(Na(t)))&&!m._p&&(k.instance=m,k.state.loading=5),Mn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Mn.set(t,a),m||_S(d,t,a,k.state))),n&&s===null)throw Error(l(528,""));return k}if(n&&s!==null)throw Error(l(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Sl(a),a=le(d).hoistableScripts,s=a.get(n),s||(s={type:"script",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function wl(t){return'href="'+An(t)+'"'}function Na(t){return'link[rel="stylesheet"]['+t+"]"}function Sb(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function _S(t,n,a,s){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=t.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Ft(n,"link",a),be(n),t.head.appendChild(n))}function Sl(t){return'[src="'+An(t)+'"]'}function Aa(t){return"script[async]"+t}function kb(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+An(a.href)+'"]');if(s)return n.instance=s,be(s),s;var d=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),be(s),Ft(s,"style",d),fs(s,a.precedence,t),n.instance=s;case"stylesheet":d=wl(a.href);var m=t.querySelector(Na(d));if(m)return n.state.loading|=4,n.instance=m,be(m),m;s=Sb(a),(d=Mn.get(d))&&Ff(s,d),m=(t.ownerDocument||t).createElement("link"),be(m);var k=m;return k._p=new Promise(function(L,G){k.onload=L,k.onerror=G}),Ft(m,"link",s),n.state.loading|=4,fs(m,a.precedence,t),n.instance=m;case"script":return m=Sl(a.src),(d=t.querySelector(Aa(m)))?(n.instance=d,be(d),d):(s=a,(d=Mn.get(m))&&(s=g({},a),If(s,d)),t=t.ownerDocument||t,d=t.createElement("script"),be(d),Ft(d,"link",s),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,fs(s,a.precedence,t));return n.instance}function fs(t,n,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,m=d,k=0;k<s.length;k++){var L=s[k];if(L.dataset.precedence===n)m=L;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function Ff(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function If(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var ds=null;function Eb(t,n,a){if(ds===null){var s=new Map,d=ds=new Map;d.set(a,s)}else d=ds,s=d.get(a),s||(s=new Map,d.set(a,s));if(s.has(t))return s;for(s.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var m=a[d];if(!(m[di]||m[Ct]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var k=m.getAttribute(n)||"";k=t+k;var L=s.get(k);L?L.push(m):s.set(k,[m])}}return s}function Cb(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function LS(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Nb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function DS(t,n,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=wl(s.href),m=n.querySelector(Na(d));if(m){n=m._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=hs.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=m,be(m);return}m=n.ownerDocument||n,s=Sb(s),(d=Mn.get(d))&&Ff(s,d),m=m.createElement("link"),be(m);var k=m;k._p=new Promise(function(L,G){k.onload=L,k.onerror=G}),Ft(m,"link",s),a.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=hs.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var Bf=0;function OS(t,n){return t.stylesheets&&t.count===0&&ms(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var s=setTimeout(function(){if(t.stylesheets&&ms(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+n);0<t.imgBytes&&Bf===0&&(Bf=62500*pS());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ms(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>Bf?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function hs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ms(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ps=null;function ms(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ps=new Map,n.forEach(MS,t),ps=null,hs.call(t))}function MS(t,n){if(!(n.state.loading&4)){var a=ps.get(t);if(a)var s=a.get(null);else{a=new Map,ps.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var k=d[m];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),s=k)}s&&a.set(null,s)}d=n.instance,k=d.getAttribute("data-precedence"),m=a.get(k)||s,m===s&&a.set(null,d),a.set(k,d),this.count++,s=hs.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=4}}var Ta={$$typeof:j,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function zS(t,n,a,s,d,m,k,L,G){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ui(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ui(0),this.hiddenUpdates=Ui(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function Ab(t,n,a,s,d,m,k,L,G,ne,ae,fe){return t=new zS(t,n,a,k,G,ne,ae,fe,L),n=1,m===!0&&(n|=24),m=pn(3,null,null,n),t.current=m,m.stateNode=t,n=bc(),n.refCount++,t.pooledCache=n,n.refCount++,m.memoizedState={element:s,isDehydrated:a,cache:n},wc(m),t}function Tb(t){return t?(t=Wi,t):Wi}function Rb(t,n,a,s,d,m){d=Tb(d),s.context===null?s.context=d:s.pendingContext=d,s=Br(n),s.payload={element:a},m=m===void 0?null:m,m!==null&&(s.callback=m),a=Ur(t,s,n),a!==null&&(an(a,t,n),aa(a,t,n))}function jb(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function Uf(t,n){jb(t,n),(t=t.alternate)&&jb(t,n)}function _b(t){if(t.tag===13||t.tag===31){var n=bi(t,67108864);n!==null&&an(n,t,67108864),Uf(t,67108864)}}function Lb(t){if(t.tag===13||t.tag===31){var n=xn();n=$l(n);var a=bi(t,n);a!==null&&an(a,t,n),Uf(t,n)}}var gs=!0;function FS(t,n,a,s){var d=B.T;B.T=null;var m=Y.p;try{Y.p=2,Hf(t,n,a,s)}finally{Y.p=m,B.T=d}}function IS(t,n,a,s){var d=B.T;B.T=null;var m=Y.p;try{Y.p=8,Hf(t,n,a,s)}finally{Y.p=m,B.T=d}}function Hf(t,n,a,s){if(gs){var d=qf(s);if(d===null)Af(t,n,s,bs,a),Ob(t,s);else if(US(d,t,n,a,s))s.stopPropagation();else if(Ob(t,s),n&4&&-1<BS.indexOf(t)){for(;d!==null;){var m=Lr(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var k=In(m.pendingLanes);if(k!==0){var L=m;for(L.pendingLanes|=2,L.entangledLanes|=2;k;){var G=1<<31-We(k);L.entanglements[1]|=G,k&=~G}Zn(m),(Qe&6)===0&&(Wo=Fe()+500,Sa(0))}}break;case 31:case 13:L=bi(m,2),L!==null&&an(L,m,2),ts(),Uf(m,2)}if(m=qf(s),m===null&&Af(t,n,s,bs,a),m===d)break;d=m}d!==null&&s.stopPropagation()}else Af(t,n,s,null,a)}}function qf(t){return t=$u(t),$f(t)}var bs=null;function $f(t){if(bs=null,t=_r(t),t!==null){var n=u(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=c(n),t!==null)return t;t=null}else if(a===31){if(t=f(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return bs=t,null}function Db(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(tr()){case oe:return 2;case pe:return 8;case Te:case ze:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Pf=!1,Qr=null,Jr=null,Wr=null,Ra=new Map,ja=new Map,ei=[],BS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ob(t,n){switch(t){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":Ra.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ja.delete(n.pointerId)}}function _a(t,n,a,s,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:n,domEventName:a,eventSystemFlags:s,nativeEvent:m,targetContainers:[d]},n!==null&&(n=Lr(n),n!==null&&_b(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function US(t,n,a,s,d){switch(n){case"focusin":return Qr=_a(Qr,t,n,a,s,d),!0;case"dragenter":return Jr=_a(Jr,t,n,a,s,d),!0;case"mouseover":return Wr=_a(Wr,t,n,a,s,d),!0;case"pointerover":var m=d.pointerId;return Ra.set(m,_a(Ra.get(m)||null,t,n,a,s,d)),!0;case"gotpointercapture":return m=d.pointerId,ja.set(m,_a(ja.get(m)||null,t,n,a,s,d)),!0}return!1}function Mb(t){var n=_r(t.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){t.blockedOn=n,so(t.priority,function(){Lb(a)});return}}else if(n===31){if(n=f(a),n!==null){t.blockedOn=n,so(t.priority,function(){Lb(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ys(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=qf(t.nativeEvent);if(a===null){a=t.nativeEvent;var s=new a.constructor(a.type,a);qu=s,a.target.dispatchEvent(s),qu=null}else return n=Lr(a),n!==null&&_b(n),t.blockedOn=a,!1;n.shift()}return!0}function zb(t,n,a){ys(t)&&a.delete(n)}function HS(){Pf=!1,Qr!==null&&ys(Qr)&&(Qr=null),Jr!==null&&ys(Jr)&&(Jr=null),Wr!==null&&ys(Wr)&&(Wr=null),Ra.forEach(zb),ja.forEach(zb)}function xs(t,n){t.blockedOn===n&&(t.blockedOn=null,Pf||(Pf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,HS)))}var vs=null;function Fb(t){vs!==t&&(vs=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vs===t&&(vs=null);for(var n=0;n<t.length;n+=3){var a=t[n],s=t[n+1],d=t[n+2];if(typeof s!="function"){if($f(s||a)===null)continue;break}var m=Lr(a);m!==null&&(t.splice(n,3),n-=3,Hc(m,{pending:!0,data:d,method:a.method,action:s},s,d))}}))}function kl(t){function n(G){return xs(G,t)}Qr!==null&&xs(Qr,t),Jr!==null&&xs(Jr,t),Wr!==null&&xs(Wr,t),Ra.forEach(n),ja.forEach(n);for(var a=0;a<ei.length;a++){var s=ei[a];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ei.length&&(a=ei[0],a.blockedOn===null);)Mb(a),a.blockedOn===null&&ei.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var d=a[s],m=a[s+1],k=d[Ht]||null;if(typeof m=="function")k||Fb(a);else if(k){var L=null;if(m&&m.hasAttribute("formAction")){if(d=m,k=m[Ht]||null)L=k.formAction;else if($f(d)!==null)continue}else L=k.action;typeof L=="function"?a[s+1]=L:(a.splice(s,3),s-=3),Fb(a)}}}function Ib(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Vf(t){this._internalRoot=t}ws.prototype.render=Vf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(l(409));var a=n.current,s=xn();Rb(a,s,t,n,null,null)},ws.prototype.unmount=Vf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Rb(t.current,2,null,t,null,null),ts(),n[Cn]=null}};function ws(t){this._internalRoot=t}ws.prototype.unstable_scheduleHydration=function(t){if(t){var n=ir();t={blockedOn:null,target:t,priority:n};for(var a=0;a<ei.length&&n!==0&&n<ei[a].priority;a++);ei.splice(a,0,t),a===0&&Mb(t)}};var Bb=r.version;if(Bb!=="19.2.4")throw Error(l(527,Bb,"19.2.4"));Y.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(n),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var qS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ss.isDisabled&&Ss.supportsFiber)try{Lt=Ss.inject(qS),bt=Ss}catch{}}return Da.createRoot=function(t,n){if(!o(t))throw Error(l(299));var a=!1,s="",d=Gm,m=Ym,k=Xm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(k=n.onRecoverableError)),n=Ab(t,1,!1,null,null,a,s,null,d,m,k,Ib),t[Cn]=n.current,Nf(t),new Vf(n)},Da.hydrateRoot=function(t,n,a){if(!o(t))throw Error(l(299));var s=!1,d="",m=Gm,k=Ym,L=Xm,G=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(L=a.onRecoverableError),a.formState!==void 0&&(G=a.formState)),n=Ab(t,1,!0,n,a??null,s,d,G,m,k,L,Ib),n.context=Tb(null),a=n.current,s=xn(),s=$l(s),d=Br(s),d.callback=null,Ur(a,d,s),a=s,n.current.lanes=a,rr(n,a),Zn(n),t[Cn]=n.current,Nf(t),new ws(n)},Da.version="19.2.4",Da}var Kb;function s2(){if(Kb)return Xf.exports;Kb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Xf.exports=o2(),Xf.exports}var u2=s2();const c2=gu(u2),l1=["shift","alt","meta","mod","ctrl","control"],f2={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function si(e){return(f2[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function a1(e){return l1.includes(e)}function Jf(e,r=","){return e.toLowerCase().split(r)}function Wf(e,r="+",i=">",l=!1,o,u){let c=[],f=!1;e=e.trim(),e.includes(i)?(f=!0,c=e.toLocaleLowerCase().split(i).map(b=>si(b))):c=e.toLocaleLowerCase().split(r).map(b=>si(b));const p={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:l},h=c.filter(b=>!l1.includes(b));return{...p,keys:h,description:o,isSequence:f,hotkey:e,metadata:u}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&o1([si(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&s1([si(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Er.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Er.clear()},0)}));const Er=new Set;function yh(e){return Array.isArray(e)}function d2(e,r=","){return(yh(e)?e:e.split(r)).every(i=>Er.has(i.trim().toLowerCase()))}function o1(e){const r=Array.isArray(e)?e:[e];Er.has("meta")&&Er.forEach(i=>{a1(i)||Er.delete(i.toLowerCase())}),r.forEach(i=>{Er.add(i.toLowerCase())})}function s1(e){const r=Array.isArray(e)?e:[e];e==="meta"?Er.clear():r.forEach(i=>{Er.delete(i.toLowerCase())})}function h2(e,r,i){(typeof i=="function"&&i(e,r)||i===!0)&&e.preventDefault()}function p2(e,r,i){return typeof i=="function"?i(e,r):i===!0||i===void 0}const m2=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function g2(e){return u1(e,m2)}function u1(e,r=!1){const{target:i,composed:l}=e;let o,u;return b2(i)&&l?(o=e.composedPath()[0]&&e.composedPath()[0].tagName,u=e.composedPath()[0]&&e.composedPath()[0].role):(o=i&&i.tagName,u=i&&i.role),yh(r)?!!(o&&r&&r.some(c=>c.toLowerCase()===o.toLowerCase()||c===u)):!!(o&&r&&r)}function b2(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function y2(e,r){return e.length===0&&r?!1:r?e.some(i=>r.includes(i))||e.includes("*"):!0}const x2=(e,r,i=!1)=>{const{alt:l,meta:o,mod:u,shift:c,ctrl:f,keys:p,useKey:h}=r,{code:b,key:g,ctrlKey:x,metaKey:v,shiftKey:w,altKey:S}=e,N=si(b);if(h&&p?.length===1&&p.includes(g.toLowerCase()))return!0;if(!p?.includes(N)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!i){if(l!==S&&N!=="alt"||c!==w&&N!=="shift")return!1;if(u){if(!v&&!x)return!1}else if(o!==v&&N!=="meta"&&N!=="os"||f!==x&&N!=="ctrl"&&N!=="control")return!1}return p&&p.length===1&&p.includes(N)?!0:p&&p.length>0?p.includes(N)?d2(p):!1:!p||p.length===0},c1=A.createContext(void 0),v2=()=>A.useContext(c1);function w2({addHotkey:e,removeHotkey:r,children:i}){return y.jsx(c1.Provider,{value:{addHotkey:e,removeHotkey:r},children:i})}function xh(e,r){return e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(e).length===Object.keys(r).length&&Object.keys(e).reduce((i,l)=>i&&xh(e[l],r[l]),!0):e===r}const f1=A.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Wa=()=>A.useContext(f1),S2=({initiallyActiveScopes:e=["*"],children:r})=>{const[i,l]=A.useState(e),[o,u]=A.useState([]),c=A.useCallback(g=>{l(x=>x.includes("*")?[g]:Array.from(new Set([...x,g])))},[]),f=A.useCallback(g=>{l(x=>x.filter(v=>v!==g))},[]),p=A.useCallback(g=>{l(x=>x.includes(g)?x.filter(v=>v!==g):x.includes("*")?[g]:Array.from(new Set([...x,g])))},[]),h=A.useCallback(g=>{u(x=>[...x,g])},[]),b=A.useCallback(g=>{u(x=>x.filter(v=>!xh(v,g)))},[]);return y.jsx(f1.Provider,{value:{activeScopes:i,hotkeys:o,enableScope:c,disableScope:f,toggleScope:p},children:y.jsx(w2,{addHotkey:h,removeHotkey:b,children:r})})};function k2(e){const r=A.useRef(void 0);return xh(r.current,e)||(r.current=e),r.current}const Qb=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},E2=typeof window<"u"?A.useLayoutEffect:A.useEffect;function lt(e,r,i,l){const o=A.useRef(null),u=A.useRef(!1),c=Array.isArray(i)?Array.isArray(l)?void 0:l:i,f=yh(e)?e.join(c?.delimiter):e,p=Array.isArray(i)?i:Array.isArray(l)?l:void 0,h=A.useCallback(r,p??[]),b=A.useRef(h);p?b.current=h:b.current=r;const g=k2(c),{activeScopes:x}=Wa(),v=v2();return E2(()=>{if(g?.enabled===!1||!y2(x,g?.scopes))return;let w=[],S;const N=(O,U=!1)=>{if(!(g2(O)&&!u1(O,g?.enableOnFormTags))){if(o.current!==null){const _=o.current.getRootNode();if((_ instanceof Document||_ instanceof ShadowRoot)&&_.activeElement!==o.current&&!o.current.contains(_.activeElement)){Qb(O);return}}O.target?.isContentEditable&&!g?.enableOnContentEditable||Jf(f,g?.delimiter).forEach(_=>{if(_.includes(g?.splitKey??"+")&&_.includes(g?.sequenceSplitKey??">")){console.warn(`Hotkey ${_} contains both ${g?.splitKey??"+"} and ${g?.sequenceSplitKey??">"} which is not supported.`);return}const F=Wf(_,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata);if(F.isSequence){S=setTimeout(()=>{w=[]},g?.sequenceTimeoutMs??1e3);const z=F.useKey?O.key:si(O.code);if(a1(z.toLowerCase()))return;w.push(z);const H=F.keys?.[w.length-1];if(z!==H){w=[],S&&clearTimeout(S);return}w.length===F.keys?.length&&(b.current(O,F),S&&clearTimeout(S),w=[])}else if(x2(O,F,g?.ignoreModifiers)||F.keys?.includes("*")){if(g?.ignoreEventWhen?.(O)||U&&u.current)return;if(h2(O,F,g?.preventDefault),!p2(O,F,g?.enabled)){Qb(O);return}b.current(O,F),U||(u.current=!0)}})}},E=O=>{O.code!==void 0&&(o1(si(O.code)),(g?.keydown===void 0&&g?.keyup!==!0||g?.keydown)&&N(O))},C=O=>{O.code!==void 0&&(s1(si(O.code)),u.current=!1,g?.keyup&&N(O,!0))},j=o.current||c?.document||document;return j.addEventListener("keyup",C,c?.eventListenerOptions),j.addEventListener("keydown",E,c?.eventListenerOptions),v&&Jf(f,g?.delimiter).forEach(O=>{v.addHotkey(Wf(O,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata))}),()=>{j.removeEventListener("keyup",C,c?.eventListenerOptions),j.removeEventListener("keydown",E,c?.eventListenerOptions),v&&Jf(f,g?.delimiter).forEach(O=>{v.removeHotkey(Wf(O,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description,g?.metadata))}),w=[],S&&clearTimeout(S)}},[f,g,x]),o}const d1=(...e)=>e.filter((r,i,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===i).join(" ").trim();const C2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const N2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,i,l)=>l?l.toUpperCase():i.toLowerCase());const Jb=e=>{const r=N2(e);return r.charAt(0).toUpperCase()+r.slice(1)};var A2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const T2=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const R2=A.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:c,...f},p)=>A.createElement("svg",{ref:p,...A2,width:r,height:r,stroke:e,strokeWidth:l?Number(i)*24/Number(r):i,className:d1("lucide",o),...!u&&!T2(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,b])=>A.createElement(h,b)),...Array.isArray(u)?u:[u]]));const Ve=(e,r)=>{const i=A.forwardRef(({className:l,...o},u)=>A.createElement(R2,{ref:u,iconNode:r,className:d1(`lucide-${C2(Jb(e))}`,`lucide-${e}`,l),...o}));return i.displayName=Jb(e),i};const j2=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],_2=Ve("arrow-down-from-line",j2);const L2=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],D2=Ve("arrow-up-from-line",L2);const O2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ya=Ve("check",O2);const M2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ml=Ve("chevron-down",M2);const z2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],F2=Ve("chevron-left",z2);const I2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],h1=Ve("chevron-right",I2);const B2=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],U2=Ve("chevrons-down-up",B2);const H2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],q2=Ve("chevrons-up-down",H2);const $2=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],P2=Ve("code",$2);const V2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],G2=Ve("columns-2",V2);const Y2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],p1=Ve("copy",Y2);const X2=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],Z2=Ve("eraser",X2);const K2=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Q2=Ve("external-link",K2);const J2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Is=Ve("eye",J2);const W2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],bu=Ve("file-diff",W2);const ek=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],m1=Ve("file-pen",ek);const tk=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],g1=Ve("file-plus",tk);const nk=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],b1=Ve("file-x",nk);const rk=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ik=Ve("folder-open",rk);const lk=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ak=Ve("folder",lk);const ok=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],sk=Ve("git-branch",ok);const uk=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],ck=Ve("keyboard",uk);const fk=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],dk=Ve("list",fk);const hk=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],pk=Ve("loader-circle",hk);const mk=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],y1=Ve("message-square",mk);const gk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],bk=Ve("panel-left-close",gk);const yk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],xk=Ve("panel-left",yk);const vk=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],wk=Ve("pen",vk);const Sk=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],kk=Ve("refresh-cw",Sk);const Ek=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ck=Ve("search",Ek);const Nk=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],x1=Ve("settings",Nk);const Ak=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Tk=Ve("square",Ak);const Rk=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],jk=Ve("text-align-start",Rk);const _k=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],Lk=Ve("unfold-vertical",_k);const Dk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yu=Ve("x",Dk),eo="split";function Ok(e){switch(e){case"split":case"side-by-side":return"split";case"unified":case"inline":return"unified";default:return eo}}function v1({checked:e,onChange:r,label:i,className:l="",title:o}){const u=f=>{f.stopPropagation(),r(!e)},c=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),r(!e))};return y.jsxs("div",{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${l}`,title:o,onClick:u,onKeyDown:c,role:"checkbox","aria-checked":e,tabIndex:0,children:[y.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center transition-all duration-200 cursor-pointer ${e?"bg-github-accent border-github-accent":"bg-github-bg-tertiary border-github-text-muted hover:border-github-accent/50"}`,children:e&&y.jsx(Ya,{size:10,className:"text-white"})}),i&&y.jsx("span",{className:"select-none",children:i})]})}function Wb({commentsCount:e,isCopiedAll:r,onCopyAll:i,onDeleteAll:l,onViewAll:o,direction:u="down",compact:c=!1}){const[f,p]=A.useState(!1),h=A.useRef(null),b=c,g=u==="up";A.useEffect(()=>{const N=E=>{h.current&&!h.current.contains(E.target)&&p(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const x=()=>{i(),p(!1)},v=()=>{l(),p(!1)},w=()=>{o?.(),p(!1)},S=b?r?"Copied":`Copy All (${e})`:r?"Copied All!":`Copy All Prompt (${e})`;return y.jsxs("div",{className:"relative",ref:h,children:[y.jsxs("div",{className:"flex",children:[y.jsxs("button",{onClick:x,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${b?"whitespace-normal":"whitespace-nowrap"}`,style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)",borderRight:"none"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:`Copy all ${e} comments to AI coding agent`,children:[r?y.jsx(Ya,{size:12}):y.jsx(p1,{size:12}),S]}),y.jsx("button",{onClick:()=>p(!f),className:"text-xs px-2 py-1.5 rounded-r transition-all flex items-center border-l",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",borderTop:"1px solid var(--color-yellow-btn-border)",borderRight:"1px solid var(--color-yellow-btn-border)",borderBottom:"1px solid var(--color-yellow-btn-border)",borderLeft:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"More options",children:y.jsx(Ml,{size:12,className:`transition-transform duration-200 ${f?"rotate-180":""}`})})]}),f&&y.jsxs("div",{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${g?"bottom-full rounded-t":"top-full rounded-b"}`,style:{borderTop:g?void 0:"none",borderBottom:g?"none":void 0},children:[o&&y.jsxs("button",{onClick:w,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",disabled:e===0,children:[y.jsx(dk,{size:12}),"View All Comments"]}),y.jsxs("button",{onClick:v,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",children:[y.jsx(Z2,{size:12}),"Cleanup All Prompt"]})]})]})}function w1(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function S1(e){const r=[],i=/```suggestion\n([\s\S]*?)```/g;let l;for(;(l=i.exec(e))!==null;)r.push({suggestedCode:l[1].replace(/\n$/,""),startIndex:l.index,endIndex:l.index+l[0].length});return r}function Mk(e){return`\`\`\`suggestion
10
- ${e.endsWith(`
11
- `)?e:e+`
12
- `}\`\`\``}const zk=2,Fk=100;function Ik(e){return!(e.length<zk||e.length>Fk)}function ey(e){return e.toLowerCase()}function ty(e){const r=e.trim();return r?r.match(/^\w+$/)!==null&&Ik(r):!1}const Bk=200,k1=A.createContext(void 0);function Uk({children:e}){const[r,i]=A.useState(null),l=A.useRef(null),o=A.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]),u=A.useCallback(h=>{const b=h.target;if(!b.classList.contains("word-token"))return;o();const g=b.getAttribute("data-word");g&&(l.current=setTimeout(()=>{i(g)},Bk))},[o]),c=A.useCallback(()=>{o(),i(null)},[o]),f=A.useCallback(h=>r?ey(h)===ey(r):!1,[r]);A.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const p=A.useMemo(()=>({highlightedWord:r,handleMouseOver:u,handleMouseOut:c,isWordHighlighted:f}),[r,u,c,f]);return y.jsx(k1.Provider,{value:p,children:e})}function Hk(){const e=A.useContext(k1);if(!e)throw new Error("useWordHighlight must be used within a WordHighlightProvider");return e}function E1(e){var r,i,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(i=E1(e[r]))&&(l&&(l+=" "),l+=i)}else for(i in e)e[i]&&(l&&(l+=" "),l+=i);return l}function C1(){for(var e,r,i=0,l="",o=arguments.length;i<o;i++)(e=arguments[i])&&(r=E1(e))&&(l&&(l+=" "),l+=r);return l}var qk=Object.create,xu=Object.defineProperty,$k=Object.defineProperties,Pk=Object.getOwnPropertyDescriptor,Vk=Object.getOwnPropertyDescriptors,N1=Object.getOwnPropertyNames,Bs=Object.getOwnPropertySymbols,Gk=Object.getPrototypeOf,vh=Object.prototype.hasOwnProperty,A1=Object.prototype.propertyIsEnumerable,ny=(e,r,i)=>r in e?xu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,Qn=(e,r)=>{for(var i in r||(r={}))vh.call(r,i)&&ny(e,i,r[i]);if(Bs)for(var i of Bs(r))A1.call(r,i)&&ny(e,i,r[i]);return e},vu=(e,r)=>$k(e,Vk(r)),T1=(e,r)=>{var i={};for(var l in e)vh.call(e,l)&&r.indexOf(l)<0&&(i[l]=e[l]);if(e!=null&&Bs)for(var l of Bs(e))r.indexOf(l)<0&&A1.call(e,l)&&(i[l]=e[l]);return i},Yk=(e,r)=>function(){return r||(0,e[N1(e)[0]])((r={exports:{}}).exports,r),r.exports},Xk=(e,r)=>{for(var i in r)xu(e,i,{get:r[i],enumerable:!0})},Zk=(e,r,i,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of N1(r))!vh.call(e,o)&&o!==i&&xu(e,o,{get:()=>r[o],enumerable:!(l=Pk(r,o))||l.enumerable});return e},Kk=(e,r,i)=>(i=e!=null?qk(Gk(e)):{},Zk(!e||!e.__esModule?xu(i,"default",{value:e,enumerable:!0}):i,e)),Qk=Yk({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,r){var i=(function(){var l=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,u={},c={util:{encode:function w(S){return S instanceof f?new f(S.type,w(S.content),S.alias):Array.isArray(S)?S.map(w):S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(w){return Object.prototype.toString.call(w).slice(8,-1)},objId:function(w){return w.__id||Object.defineProperty(w,"__id",{value:++o}),w.__id},clone:function w(S,N){N=N||{};var E,C;switch(c.util.type(S)){case"Object":if(C=c.util.objId(S),N[C])return N[C];E={},N[C]=E;for(var j in S)S.hasOwnProperty(j)&&(E[j]=w(S[j],N));return E;case"Array":return C=c.util.objId(S),N[C]?N[C]:(E=[],N[C]=E,S.forEach(function(O,U){E[U]=w(O,N)}),E);default:return S}},getLanguage:function(w){for(;w;){var S=l.exec(w.className);if(S)return S[1].toLowerCase();w=w.parentElement}return"none"},setLanguage:function(w,S){w.className=w.className.replace(RegExp(l,"gi"),""),w.classList.add("language-"+S)},isActive:function(w,S,N){for(var E="no-"+S;w;){var C=w.classList;if(C.contains(S))return!0;if(C.contains(E))return!1;w=w.parentElement}return!!N}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(w,S){var N=c.util.clone(c.languages[w]);for(var E in S)N[E]=S[E];return N},insertBefore:function(w,S,N,E){E=E||c.languages;var C=E[w],j={};for(var O in C)if(C.hasOwnProperty(O)){if(O==S)for(var U in N)N.hasOwnProperty(U)&&(j[U]=N[U]);N.hasOwnProperty(O)||(j[O]=C[O])}var _=E[w];return E[w]=j,c.languages.DFS(c.languages,function(F,z){z===_&&F!=w&&(this[F]=j)}),j},DFS:function w(S,N,E,C){C=C||{};var j=c.util.objId;for(var O in S)if(S.hasOwnProperty(O)){N.call(S,O,S[O],E||O);var U=S[O],_=c.util.type(U);_==="Object"&&!C[j(U)]?(C[j(U)]=!0,w(U,N,null,C)):_==="Array"&&!C[j(U)]&&(C[j(U)]=!0,w(U,N,O,C))}}},plugins:{},highlight:function(w,S,N){var E={code:w,grammar:S,language:N};if(c.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=c.tokenize(E.code,E.grammar),c.hooks.run("after-tokenize",E),f.stringify(c.util.encode(E.tokens),E.language)},tokenize:function(w,S){var N=S.rest;if(N){for(var E in N)S[E]=N[E];delete S.rest}var C=new b;return g(C,C.head,w),h(w,C,S,C.head,0),v(C)},hooks:{all:{},add:function(w,S){var N=c.hooks.all;N[w]=N[w]||[],N[w].push(S)},run:function(w,S){var N=c.hooks.all[w];if(!(!N||!N.length))for(var E=0,C;C=N[E++];)C(S)}},Token:f};function f(w,S,N,E){this.type=w,this.content=S,this.alias=N,this.length=(E||"").length|0}f.stringify=function w(S,N){if(typeof S=="string")return S;if(Array.isArray(S)){var E="";return S.forEach(function(_){E+=w(_,N)}),E}var C={type:S.type,content:w(S.content,N),tag:"span",classes:["token",S.type],attributes:{},language:N},j=S.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(C.classes,j):C.classes.push(j)),c.hooks.run("wrap",C);var O="";for(var U in C.attributes)O+=" "+U+'="'+(C.attributes[U]||"").replace(/"/g,"&quot;")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+O+">"+C.content+"</"+C.tag+">"};function p(w,S,N,E){w.lastIndex=S;var C=w.exec(N);if(C&&E&&C[1]){var j=C[1].length;C.index+=j,C[0]=C[0].slice(j)}return C}function h(w,S,N,E,C,j){for(var O in N)if(!(!N.hasOwnProperty(O)||!N[O])){var U=N[O];U=Array.isArray(U)?U:[U];for(var _=0;_<U.length;++_){if(j&&j.cause==O+","+_)return;var F=U[_],z=F.inside,H=!!F.lookbehind,M=!!F.greedy,P=F.alias;if(M&&!F.pattern.global){var V=F.pattern.toString().match(/[imsuy]*$/)[0];F.pattern=RegExp(F.pattern.source,V+"g")}for(var J=F.pattern||F,I=E.next,Z=C;I!==S.tail&&!(j&&Z>=j.reach);Z+=I.value.length,I=I.next){var B=I.value;if(S.length>w.length)return;if(!(B instanceof f)){var Y=1,X;if(M){if(X=p(J,Z,w,H),!X||X.index>=w.length)break;var $=X.index,q=X.index+X[0].length,R=Z;for(R+=I.value.length;$>=R;)I=I.next,R+=I.value.length;if(R-=I.value.length,Z=R,I.value instanceof f)continue;for(var D=I;D!==S.tail&&(R<q||typeof D.value=="string");D=D.next)Y++,R+=D.value.length;Y--,B=w.slice(Z,R),X.index-=Z}else if(X=p(J,0,B,H),!X)continue;var $=X.index,T=X[0],W=B.slice(0,$),te=B.slice($+T.length),ce=Z+B.length;j&&ce>j.reach&&(j.reach=ce);var me=I.prev;W&&(me=g(S,me,W),Z+=W.length),x(S,me,Y);var xe=new f(O,z?c.tokenize(T,z):T,P,T);if(I=g(S,me,xe),te&&g(S,I,te),Y>1){var ge={cause:O+","+_,reach:ce};h(w,S,N,I.prev,Z,ge),j&&ge.reach>j.reach&&(j.reach=ge.reach)}}}}}}function b(){var w={value:null,prev:null,next:null},S={value:null,prev:w,next:null};w.next=S,this.head=w,this.tail=S,this.length=0}function g(w,S,N){var E=S.next,C={value:N,prev:S,next:E};return S.next=C,E.prev=C,w.length++,C}function x(w,S,N){for(var E=S.next,C=0;C<N&&E!==w.tail;C++)E=E.next;S.next=E,E.prev=S,w.length-=C}function v(w){for(var S=[],N=w.head.next;N!==w.tail;)S.push(N.value),N=N.next;return S}return c})();r.exports=i,i.default=i}}),ue=Kk(Qk());ue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ue.languages.markup.tag.inside["attr-value"].inside.entity=ue.languages.markup.entity,ue.languages.markup.doctype.inside["internal-subset"].inside=ue.languages.markup,ue.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(ue.languages.markup.tag,"addInlined",{value:function(e,l){var i={},i=(i["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ue.languages[l]},i.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}}),l=(i["language-"+l]={pattern:/[\s\S]+/,inside:ue.languages[l]},{});l[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},ue.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(ue.languages.markup.tag,"addAttribute",{value:function(e,r){ue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:ue.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ue.languages.html=ue.languages.markup,ue.languages.mathml=ue.languages.markup,ue.languages.svg=ue.languages.markup,ue.languages.xml=ue.languages.extend("markup",{}),ue.languages.ssml=ue.languages.xml,ue.languages.atom=ue.languages.xml,ue.languages.rss=ue.languages.xml,(function(e){var r={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},i=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,l="(?:[^\\\\-]|"+i.source+")",l=RegExp(l+"-"+l),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:l,inside:{escape:i,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:i}},"special-escape":r,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:i,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ue),ue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ue.languages.javascript=ue.languages.extend("clike",{"class-name":[ue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ue.languages.markup&&(ue.languages.markup.tag.addInlined("script","javascript"),ue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ue.languages.js=ue.languages.javascript,ue.languages.actionscript=ue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ue.languages.actionscript["class-name"].alias="function",delete ue.languages.actionscript.parameter,delete ue.languages.actionscript["literal-property"],ue.languages.markup&&ue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ue.languages.markup}}),(function(e){var r=/#(?!\{).+/,i={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:i}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:i}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:i}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(ue),(function(e){var r=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(r,"addSupport",{value:function(i,l){(i=typeof i=="string"?[i]:i).forEach(function(o){var u=function(g){g.inside||(g.inside={}),g.inside.rest=l},c="doc-comment";if(f=e.languages[o]){var f,p=f[c];if((p=p||(f=e.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(p=f[c]={pattern:p}),Array.isArray(p))for(var h=0,b=p.length;h<b;h++)p[h]instanceof RegExp&&(p[h]={pattern:p[h]}),u(p[h]);else u(p)}})}}),r.addSupport(["java","javascript","php"],r)})(ue),(function(e){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,r=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(ue),(function(e){var r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:r={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=r,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})})(ue),(function(e){var r=/[*&][^\s[\]{},]+/,i=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,l="(?:"+i.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+i.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,p){p=(p||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<value>>/g,function(){return f});return RegExp(h,p)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return l})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:i,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(ue),(function(e){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function i(h){return h=h.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+h+")")}var l=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return l}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+u+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+u+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(l),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(l),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:i(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:i(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:i(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:i(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(h){["url","bold","italic","strike","code-snippet"].forEach(function(b){h!==b&&(e.languages.markdown[h].inside.content.inside[b]=e.languages.markdown[b])})}),e.hooks.add("after-tokenize",function(h){h.language!=="markdown"&&h.language!=="md"||(function b(g){if(g&&typeof g!="string")for(var x=0,v=g.length;x<v;x++){var w,S=g[x];S.type!=="code"?b(S.content):(w=S.content[1],S=S.content[3],w&&S&&w.type==="code-language"&&S.type==="code-block"&&typeof w.content=="string"&&(w=w.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),w="language-"+(w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase()),S.alias?typeof S.alias=="string"?S.alias=[S.alias,w]:S.alias.push(w):S.alias=[w]))}})(h.tokens)}),e.hooks.add("wrap",function(h){if(h.type==="code-block"){for(var b="",g=0,x=h.classes.length;g<x;g++){var v=h.classes[g],v=/language-(.+)/.exec(v);if(v){b=v[1];break}}var w,S=e.languages[b];S?h.content=e.highlight((function(N){return N=N.replace(c,""),N=N.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(E,C){var j;return(C=C.toLowerCase())[0]==="#"?(j=C[1]==="x"?parseInt(C.slice(2),16):Number(C.slice(1)),p(j)):f[C]||E})})(h.content),S,b):b&&b!=="none"&&e.plugins.autoloader&&(w="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),h.attributes.id=w,e.plugins.autoloader.loadLanguages(b,function(){var N=document.getElementById(w);N&&(N.innerHTML=e.highlight(N.textContent,e.languages[b],b))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},p=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ue),ue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:ue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},ue.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var r=e.tokens.filter(function(w){return typeof w!="string"&&w.type!=="comment"&&w.type!=="scalar"}),i=0;i<r.length;){var l=r[i++];if(l.type==="keyword"&&l.content==="mutation"){var o=[];if(g(["definition-mutation","punctuation"])&&b(1).content==="("){i+=2;var u=x(/^\($/,/^\)$/);if(u===-1)continue;for(;i<u;i++){var c=b(0);c.type==="variable"&&(v(c,"variable-input"),o.push(c.content))}i=u+1}if(g(["punctuation","property-query"])&&b(0).content==="{"&&(i++,v(b(0),"property-mutation"),0<o.length)){var f=x(/^\{$/,/^\}$/);if(f!==-1)for(var p=i;p<f;p++){var h=r[p];h.type==="variable"&&0<=o.indexOf(h.content)&&v(h,"variable-input")}}}}function b(w){return r[i+w]}function g(w,S){S=S||0;for(var N=0;N<w.length;N++){var E=b(N+S);if(!E||E.type!==w[N])return}return 1}function x(w,S){for(var N=1,E=i;E<r.length;E++){var C=r[E],j=C.content;if(C.type==="punctuation"&&typeof j=="string"){if(w.test(j))N++;else if(S.test(j)&&--N===0)return E}}return-1}function v(w,S){var N=w.alias;N?Array.isArray(N)||(w.alias=N=[N]):w.alias=N=[],N.push(S)}}),ue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(e){var r=e.languages.javascript["template-string"],i=r.pattern.source,l=r.inside.interpolation,o=l.inside["interpolation-punctuation"],u=l.pattern.source;function c(g,x){if(e.languages[g])return{pattern:RegExp("((?:"+x+")\\s*)"+i),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:g}}}}function f(g,x,v){return g={code:g,grammar:x,language:v},e.hooks.run("before-tokenize",g),g.tokens=e.tokenize(g.code,g.grammar),e.hooks.run("after-tokenize",g),g.tokens}function p(g,x,v){var N=e.tokenize(g,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),w=0,S={},N=f(N.map(function(C){if(typeof C=="string")return C;for(var j,O,C=C.content;g.indexOf((O=w++,j="___"+v.toUpperCase()+"_"+O+"___"))!==-1;);return S[j]=C,j}).join(""),x,v),E=Object.keys(S);return w=0,(function C(j){for(var O=0;O<j.length;O++){if(w>=E.length)return;var U,_,F,z,H,M,P,V=j[O];typeof V=="string"||typeof V.content=="string"?(U=E[w],(P=(M=typeof V=="string"?V:V.content).indexOf(U))!==-1&&(++w,_=M.substring(0,P),H=S[U],F=void 0,(z={})["interpolation-punctuation"]=o,(z=e.tokenize(H,z)).length===3&&((F=[1,1]).push.apply(F,f(z[1],e.languages.javascript,"javascript")),z.splice.apply(z,F)),F=new e.Token("interpolation",z,l.alias,H),z=M.substring(P+U.length),H=[],_&&H.push(_),H.push(F),z&&(C(M=[z]),H.push.apply(H,M)),typeof V=="string"?(j.splice.apply(j,[O,1].concat(H)),O+=H.length-1):V.content=H)):(P=V.content,Array.isArray(P)?C(P):C([P]))}})(N),new e.Token(v,N,"language-"+v,g)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),r].filter(Boolean);var h={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function b(g){return typeof g=="string"?g:Array.isArray(g)?g.map(b).join(""):b(g.content)}e.hooks.add("after-tokenize",function(g){g.language in h&&(function x(v){for(var w=0,S=v.length;w<S;w++){var N,E,C,j=v[w];typeof j!="string"&&(N=j.content,Array.isArray(N)?j.type==="template-string"?(j=N[1],N.length===3&&typeof j!="string"&&j.type==="embedded-code"&&(E=b(j),j=j.alias,j=Array.isArray(j)?j[0]:j,C=e.languages[j])&&(N[1]=p(E,C,j))):x(N):typeof N!="string"&&x([N]))}})(g.tokens)})})(ue),(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var r=e.languages.extend("typescript",{});delete r["class-name"],e.languages.typescript["class-name"].inside=r,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r}}}}),e.languages.ts=e.languages.typescript})(ue),(function(e){var r=e.languages.javascript,i=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,l="(@(?:arg|argument|param|property)\\s+(?:"+i+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(l+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(l+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:r,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return i})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+i),lookbehind:!0,inside:{string:r.string,number:r.number,boolean:r.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:r,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(ue),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(ue),ue.languages.n4js=ue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),ue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ue.languages.n4jsd=ue.languages.n4js,(function(e){function r(c,f){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var i=["function","function-variable","method","method-variable","property-access"],l=0;l<i.length;l++){var u=i[l],o=e.languages.javascript[u],u=(o=e.util.type(o)==="RegExp"?e.languages.javascript[u]={pattern:o}:o).inside||{};(o.inside=u)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ue),(function(e){var r=e.util.clone(e.languages.javascript),i=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,l=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(p,h){return p=p.replace(/<S>/g,function(){return i}).replace(/<BRACES>/g,function(){return l}).replace(/<SPREAD>/g,function(){return o}),RegExp(p,h)}o=u(o).source,e.languages.jsx=e.languages.extend("markup",r),e.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=r.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(p){for(var h=[],b=0;b<p.length;b++){var g=p[b],x=!1;typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?0<h.length&&h[h.length-1].tagName===f(g.content[0].content[1])&&h.pop():g.content[g.content.length-1].content!=="/>"&&h.push({tagName:f(g.content[0].content[1]),openedBraces:0}):0<h.length&&g.type==="punctuation"&&g.content==="{"?h[h.length-1].openedBraces++:0<h.length&&0<h[h.length-1].openedBraces&&g.type==="punctuation"&&g.content==="}"?h[h.length-1].openedBraces--:x=!0),(x||typeof g=="string")&&0<h.length&&h[h.length-1].openedBraces===0&&(x=f(g),b<p.length-1&&(typeof p[b+1]=="string"||p[b+1].type==="plain-text")&&(x+=f(p[b+1]),p.splice(b+1,1)),0<b&&(typeof p[b-1]=="string"||p[b-1].type==="plain-text")&&(x=f(p[b-1])+x,p.splice(b-1,1),b--),p[b]=new e.Token("plain-text",x,null,x)),g.content&&typeof g.content!="string"&&c(g.content)}}var f=function(p){return p?typeof p=="string"?p:typeof p.content=="string"?p.content:p.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(p){p.language!=="jsx"&&p.language!=="tsx"||c(p.tokens)})})(ue),(function(e){var r=e.util.clone(e.languages.typescript),r=(e.languages.tsx=e.languages.extend("jsx",r),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(ue),ue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},ue.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ue.languages.swift}),(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var r={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(ue),ue.languages.c=ue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),ue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},ue.languages.c.string],char:ue.languages.c.char,comment:ue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:ue.languages.c}}}}),ue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete ue.languages.c.boolean,ue.languages.objectivec=ue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete ue.languages.objectivec["class-name"],ue.languages.objc=ue.languages.objectivec,ue.languages.reason=ue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),ue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete ue.languages.reason.function,(function(e){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,i=0;i<2;i++)r=r.replace(/<self>/g,function(){return r});r=r.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(ue),ue.languages.go=ue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),ue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ue.languages.go["class-name"],(function(e){var r=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,i=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return r.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return r.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:r,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return i})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(ue),ue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ue.languages.python["string-interpolation"].inside.interpolation.inside.rest=ue.languages.python,ue.languages.py=ue.languages.python,ue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ue.languages.webmanifest=ue.languages.json;var wn={};Xk(wn,{dracula:()=>Wk,duotoneDark:()=>tE,duotoneLight:()=>rE,github:()=>lE,gruvboxMaterialDark:()=>OE,gruvboxMaterialLight:()=>zE,jettwaveDark:()=>NE,jettwaveLight:()=>TE,nightOwl:()=>oE,nightOwlLight:()=>uE,oceanicNext:()=>fE,okaidia:()=>hE,oneDark:()=>jE,oneLight:()=>LE,palenight:()=>mE,shadesOfPurple:()=>bE,synthwave84:()=>xE,ultramin:()=>wE,vsDark:()=>R1,vsLight:()=>EE});var Jk={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},Wk=Jk,eE={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},tE=eE,nE={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},rE=nE,iE={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},lE=iE,aE={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},oE=aE,sE={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},uE=sE,vn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},cE={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:vn.keyword}},{types:["attr-value"],style:{color:vn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:vn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:vn.primitive}},{types:["boolean"],style:{color:vn.boolean}},{types:["tag"],style:{color:vn.tag}},{types:["string"],style:{color:vn.string}},{types:["punctuation"],style:{color:vn.string}},{types:["selector","char","builtin","inserted"],style:{color:vn.char}},{types:["function"],style:{color:vn.function}},{types:["operator","entity","url","variable"],style:{color:vn.variable}},{types:["keyword"],style:{color:vn.keyword}},{types:["atrule","class-name"],style:{color:vn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},fE=cE,dE={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},hE=dE,pE={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},mE=pE,gE={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},bE=gE,yE={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},xE=yE,vE={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},wE=vE,SE={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},R1=SE,kE={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},EE=kE,CE={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},NE=CE,AE={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},TE=AE,RE={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},jE=RE,_E={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},LE=_E,DE={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},OE=DE,ME={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},zE=ME,FE=e=>A.useCallback(r=>{var i=r,{className:l,style:o,line:u}=i,c=T1(i,["className","style","line"]);const f=vu(Qn({},c),{className:C1("token-line",l)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof o=="object"&&(f.style=Qn(Qn({},f.style||{}),o)),f},[e]),IE=e=>{const r=A.useCallback(({types:i,empty:l})=>{if(e!=null){{if(i.length===1&&i[0]==="plain")return l!=null?{display:"inline-block"}:void 0;if(i.length===1&&l!=null)return e[i[0]]}return Object.assign(l!=null?{display:"inline-block"}:{},...i.map(o=>e[o]))}},[e]);return A.useCallback(i=>{var l=i,{token:o,className:u,style:c}=l,f=T1(l,["token","className","style"]);const p=vu(Qn({},f),{className:C1("token",...o.types,u),children:o.content,style:r(o)});return c!=null&&(p.style=Qn(Qn({},p.style||{}),c)),p},[r])},BE=/\r\n|\r|\n/,ry=e=>{e.length===0?e.push({types:["plain"],content:`
13
- `,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
14
- `,e[0].empty=!0)},iy=(e,r)=>{const i=e.length;return i>0&&e[i-1]===r?e:e.concat(r)},UE=e=>{const r=[[]],i=[e],l=[0],o=[e.length];let u=0,c=0,f=[];const p=[f];for(;c>-1;){for(;(u=l[c]++)<o[c];){let h,b=r[c];const x=i[c][u];if(typeof x=="string"?(b=c>0?b:["plain"],h=x):(b=iy(b,x.type),x.alias&&(b=iy(b,x.alias)),h=x.content),typeof h!="string"){c++,r.push(b),i.push(h),l.push(0),o.push(h.length);continue}const v=h.split(BE),w=v.length;f.push({types:b,content:v[0]});for(let S=1;S<w;S++)ry(f),p.push(f=[]),f.push({types:b,content:v[S]})}c--,r.pop(),i.pop(),l.pop(),o.pop()}return ry(f),p},ly=UE,HE=({prism:e,code:r,grammar:i,language:l})=>A.useMemo(()=>{if(i==null)return ly([r]);const o={code:r,grammar:i,language:l,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(r,i),e.hooks.run("after-tokenize",o),ly(o.tokens)},[r,i,l,e]),qE=(e,r)=>{const{plain:i}=e,l=e.styles.reduce((o,u)=>{const{languages:c,style:f}=u;return c&&!c.includes(r)||u.types.forEach(p=>{const h=Qn(Qn({},o[p]),f);o[p]=h}),o},{});return l.root=i,l.plain=vu(Qn({},i),{backgroundColor:void 0}),l},$E=qE,PE=({children:e,language:r,code:i,theme:l,prism:o})=>{const u=r.toLowerCase(),c=$E(l,u),f=FE(c),p=IE(c),h=o.languages[u],b=HE({prism:o,language:u,code:i,grammar:h});return e({tokens:b,className:`prism-code language-${u}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:p})},VE=e=>A.createElement(PE,vu(Qn({},e),{prism:e.prism||ue,theme:e.theme||R1,code:e.code,language:e.language}));const GE="modulepreload",YE=function(e){return"/"+e},ay={},jt=function(r,i,l){let o=Promise.resolve();if(i&&i.length>0){let p=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=p(i.map(h=>{if(h=YE(h),h in ay)return;ay[h]=!0;const b=h.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const x=document.createElement("link");if(x.rel=b?"stylesheet":GE,b||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),b)return new Promise((v,w)=>{x.addEventListener("load",v),x.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})},ks={};function j1(e){if(!ks[e]){const i={bash:()=>jt(()=>import("./prism-bash-DTkDXsAh.js"),[]),sh:()=>jt(()=>import("./prism-bash-DTkDXsAh.js"),[]),shell:()=>jt(()=>import("./prism-bash-DTkDXsAh.js"),[]),php:async()=>(await jt(()=>import("./prism-markup-templating-Ct1xsyfA.js"),[]),jt(()=>import("./prism-php-C6fR1C7-.js").then(l=>l.p),[])),sql:()=>jt(()=>import("./prism-sql-AgAyy5H_.js"),[]),ruby:()=>jt(()=>import("./prism-ruby-CWeh27h1.js").then(l=>l.p),[]),java:()=>jt(()=>import("./prism-java-BRzwomgj.js").then(l=>l.p),[]),scala:async()=>(await j1("java"),jt(()=>import("./prism-scala-BjNo2HkN.js"),[])),solidity:()=>jt(()=>import("./prism-solidity-3wCU4ra_.js").then(l=>l.p),[]),vim:()=>jt(()=>import("./prism-vim-uciLQ2PQ.js"),[]),dart:()=>jt(()=>import("./prism-dart-MjriiaMt.js"),[]),csharp:()=>jt(()=>import("./prism-csharp-CxRfePTX.js").then(l=>l.p),[]),protobuf:()=>jt(()=>import("./prism-protobuf-DiQ_z8B5.js"),[]),hcl:()=>jt(()=>import("./prism-hcl-Csmcce-t.js").then(l=>l.p),[]),perl:()=>jt(()=>import("./prism-perl-DQMRA6u_.js").then(l=>l.p),[]),elixir:()=>jt(()=>import("./prism-elixir-B0H1PC_E.js").then(l=>l.p),[])}[e];if(!i)return console.warn(`No loader available for language: ${e}`),Promise.reject(new Error(`Unsupported language: ${e}`));ks[e]=i().then(()=>{}).catch(l=>{throw delete ks[e],console.warn(`Failed to load language: ${e}`,l),l})}return ks[e]}typeof global<"u"?global.Prism=ue:typeof window<"u"&&(window.Prism=ue);const oy=["markup","html","xml","svg","javascript","js","typescript","ts","jsx","tsx","css","c","cpp","swift","kotlin","objectivec","reason","rust","go","graphql","yaml","yml","json","markdown","md","python","py"];function XE(e,r){const[i,l]=A.useState(()=>oy.includes(r)||!!ue.languages[r]);return A.useEffect(()=>{if(!i){if(oy.includes(r)){l(!0);return}j1(r).then(()=>{l(!0)}).catch(()=>{l(!1)})}},[r,i]),{ready:i,actualLang:i?r:"text"}}function to(e){return e&&e.split(".").pop()?.toLowerCase()||null}function ZE(e){return e&&e.split("/").pop()||""}const KE={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",swift:"swift",kt:"kotlin",scala:"scala",r:"r",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",json:"json",xml:"xml",html:"html",css:"css",scss:"scss",sass:"sass",less:"less",md:"markdown",markdown:"markdown",tex:"latex",vim:"vim",ex:"elixir",exs:"elixir",heex:"elixir"},QE={ts:"typescript",tsx:"tsx",mts:"typescript",cts:"typescript",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"css",html:"html",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",md:"markdown",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",php:"php",sql:"sql",xml:"xml",swift:"swift",kt:"kotlin",scala:"scala",svelte:"svelte",r:"r",lua:"lua",perl:"perl",pl:"perl",pm:"perl",dockerfile:"docker",makefile:"makefile",gitignore:"git",env:"bash",conf:"nginx",ini:"ini",toml:"toml",sol:"solidity",vim:"vim",dart:"dart",cs:"csharp",proto:"protobuf",tf:"hcl",tfvars:"hcl",hcl:"hcl",ex:"elixir",exs:"elixir",heex:"elixir"},JE={dockerfile:"docker",makefile:"makefile",".gitignore":"git",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash"};function _1(e,r){if(e)return r[e.toLowerCase()]}function WE(e){return _1(to(e),KE)}function eC(e){const r=ZE(e).toLowerCase(),i=JE[r];return i||_1(to(e),QE)||"text"}function tC(e){return{...e,styles:e.styles.map(r=>({...r,style:{...r.style,background:void 0,backgroundColor:void 0}}))}}function nC(e){let r;switch(e){case"github":r=wn.github;break;case"vsLight":r=wn.vsLight;break;case"oneLight":r=wn.oneLight;break;case"gruvboxMaterialLight":r=wn.gruvboxMaterialLight;break;case"nightOwlLight":r=wn.nightOwlLight;break;case"vsDark":r=wn.vsDark;break;case"oneDark":r=wn.oneDark;break;case"gruvboxMaterialDark":r=wn.gruvboxMaterialDark;break;case"nightOwl":r=wn.nightOwl;break;case"dracula":r=wn.dracula;break;case"okaidia":r=wn.okaidia;break;default:r=wn.vsDark}return tC(r)}const wh=Qt.memo(function({code:r,language:i,className:l,syntaxTheme:o="vsDark",filename:u="",renderToken:c,onMouseOver:f,onMouseOut:p}){const h=i||(u?eC(u):"text"),{actualLang:b}=XE(r,h),g=nC(o),x=A.useCallback(({style:v,tokens:w,getLineProps:S,getTokenProps:N})=>y.jsx("span",{className:l,style:{...v,background:"transparent",backgroundColor:"transparent"},onMouseOver:f,onMouseOut:p,children:w.map((E,C)=>y.jsx("span",{...S({line:E}),children:E.map((j,O)=>c?c(j,O,N):y.jsx("span",{...N({token:j})},O))},C))}),[l,f,p,c]);return y.jsx(VE,{code:r,language:b,theme:g,prism:ue,children:x})}),Xa=Qt.memo(function(r){const{handleMouseOver:i,handleMouseOut:l,isWordHighlighted:o}=Hk(),u=A.useCallback((c,f,p)=>{const h=p({token:c}),b=c.content.split(/( +)/);if(b.length===1&&b[0]&&!ty(b[0]))return y.jsx("span",{...h},f);const g=b.map((x,v)=>{if(!x)return null;if(ty(x)){const w=x.trim(),S=o(w);return y.jsx("span",{className:`word-token ${S?"word-highlight":""}`,"data-word":w,children:x},`${f}-${v}`)}return y.jsx("span",{children:x},`${f}-${v}`)});return y.jsx("span",{...h,children:g},f)},[o]);return y.jsx(wh,{...r,renderToken:u,onMouseOver:i,onMouseOut:l})}),Bd=Qt.memo(function({segments:r,className:i=""}){const l=A.useMemo(()=>r.map((o,u)=>{const c=o.type==="added"?"word-diff-added":o.type==="removed"?"word-diff-removed":"";return y.jsx("span",{className:c,children:o.value},u)}),[r]);return y.jsx("span",{className:i,children:l})}),rC=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},iC=e=>{switch(e){case"add":return"text-github-accent bg-diff-addition-bg";case"delete":return"text-github-danger bg-diff-deletion-bg";default:return"text-github-text-muted bg-github-bg-secondary"}};function L1({line:e,syntaxTheme:r,filename:i,diffSegments:l,showPrefixBorder:o=!0}){return y.jsxs("div",{className:"flex items-center relative min-h-[16px]",children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 ${o?"border-r border-github-border":""} ${iC(e.type)}`,children:rC(e.type)}),l?y.jsx(Bd,{segments:l,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Xa,{code:e.content,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:r,filename:i})]})}const lC=e=>e==="add"?"bg-diff-addition-bg":"bg-diff-deletion-bg",aC=(e,r)=>({type:e,content:r});function sy({code:e,type:r,filename:i,keyPrefix:l,syntaxTheme:o}){return y.jsx(y.Fragment,{children:e.split(`
15
- `).map((u,c)=>y.jsx("div",{className:lC(r),children:y.jsx(L1,{line:aC(r,u),filename:i,syntaxTheme:o,showPrefixBorder:!1})},`${l}-${c}`))})}function D1(e){return w1(e)}function Ud({body:e,originalCode:r,filename:i,syntaxTheme:l}){const o=A.useMemo(()=>{const u=S1(e);if(u.length===0)return[{type:"text",content:e}];const c=[];let f=0;for(const p of u)p.startIndex>f&&c.push({type:"text",content:e.slice(f,p.startIndex)}),c.push({type:"suggestion",code:p.suggestedCode,original:r||""}),f=p.endIndex;return f<e.length&&c.push({type:"text",content:e.slice(f)}),c},[e,r]);return y.jsx("div",{className:"text-github-text-primary text-sm leading-6",children:o.map((u,c)=>u.type==="text"?y.jsx("span",{className:"whitespace-pre-wrap",children:u.content},c):y.jsx("div",{className:"my-2 border border-github-border rounded-md overflow-hidden",children:y.jsxs("div",{className:"font-mono text-sm",children:[u.original&&y.jsx(sy,{code:u.original,type:"delete",filename:i,keyPrefix:`orig-${c}`,syntaxTheme:l}),y.jsx(sy,{code:u.code,type:"add",filename:i,keyPrefix:`sugg-${c}`,syntaxTheme:l})]})},c))})}const oC="text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all flex items-center gap-1";function O1({selectedCode:e,value:r,onChange:i,textareaRef:l,className:o=oC}){if(!e)return null;const u=()=>{const c=Mk(e),f=l?.current;if(!f){i(`${r}${r?`
16
-
17
- `:""}${c}
18
-
19
- `);return}const p=f.selectionStart,h=f.selectionEnd,b=r.slice(0,p),g=r.slice(h),v=`${b?`
20
-
21
- `:""}${c}
22
-
23
- `,w=b+v+g;i(w);const S=b.length+v.length;requestAnimationFrame(()=>{f.focus(),f.setSelectionRange(S,S)})};return y.jsxs("button",{type:"button",onClick:u,className:o,title:"Add code suggestion",children:[y.jsx(P2,{size:12}),"Add suggestion"]})}function Sh({comment:e,showAuthorBadge:r=!1,onGeneratePrompt:i,onRemoveComment:l,onUpdateComment:o,onClick:u,syntaxTheme:c}){const[f,p]=A.useState(!1),[h,b]=A.useState(!1),[g,x]=A.useState(e.body),[v,w]=A.useState("edit"),S=A.useRef(null),N=D1(g),E=N?v:"edit",C=async z=>{z.stopPropagation();try{const H=i(e);await navigator.clipboard.writeText(H),p(!0),setTimeout(()=>p(!1),2e3)}catch(H){console.error("Failed to copy prompt:",H)}},j=z=>{z.stopPropagation(),b(!0),w("edit"),x(e.body)},O=()=>{b(!1),w("edit"),x(e.body)},U=z=>{z?.stopPropagation(),g.trim()!==e.body&&o(e.id,g.trim()),b(!1),w("edit")},_=z=>{z.stopPropagation(),l(e.id)},F=z=>{z.key==="Enter"&&(z.metaKey||z.ctrlKey)?(z.preventDefault(),U()):z.key==="Escape"&&(z.preventDefault(),O())};return lt("escape",()=>{h&&O()},{enableOnFormTags:["textarea"],enabled:h},[h]),lt("mod+enter",()=>{h&&U()},{enableOnFormTags:["textarea"],enabled:h},[h,g,e.body]),y.jsxs("div",{id:`comment-${e.id}`,className:`p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400 shadow-sm transition-all ${u?"hover:shadow-md cursor-pointer":""}`,onClick:u,children:[y.jsxs("div",{className:"flex items-center justify-between mb-2 gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs text-github-text-secondary flex-1 min-w-0",children:[y.jsxs("span",{className:"font-mono px-1 py-0.5 rounded overflow-hidden text-ellipsis whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-path-bg)",color:"var(--color-yellow-path-text)"},children:[e.file,":",Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line]}),r&&e.author&&y.jsx("span",{className:"inline-flex items-center rounded-full border border-github-border bg-github-bg-secondary px-2 py-0.5 text-[11px] font-medium text-github-text-primary",children:e.author})]}),y.jsx("div",{className:"flex items-center gap-2",children:h?N?y.jsxs("div",{className:"flex items-center bg-github-bg-tertiary border border-github-border rounded p-0.5",onClick:z=>z.stopPropagation(),children:[y.jsx("button",{type:"button",onClick:()=>w("edit"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${E==="edit"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>w("preview"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${E==="preview"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Preview"})]}):y.jsx("div",{onClick:z=>z.stopPropagation(),children:y.jsx(O1,{selectedCode:e.codeContent,value:g,onChange:x,textareaRef:S})}):y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:C,className:"text-xs px-2 py-1 rounded transition-all whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"Copy prompt for AI coding agent",children:f?"Copied!":"Copy Prompt"}),y.jsx("button",{onClick:j,className:"text-xs p-1.5 bg-github-bg-tertiary text-github-text-secondary border border-github-border rounded hover:text-github-text-primary hover:bg-github-bg-primary transition-all",title:"Edit",children:y.jsx(wk,{size:12})}),y.jsx("button",{onClick:_,className:"text-xs p-1.5 bg-github-bg-tertiary text-green-600 border border-github-border rounded hover:bg-green-500/10 hover:border-green-600 transition-all",title:"Resolve",children:y.jsx(Ya,{size:12})})]})})]}),h?y.jsxs("div",{children:[N&&E==="preview"?y.jsx(Ud,{body:g,originalCode:e.codeContent,filename:e.file,syntaxTheme:c}):y.jsx(y.Fragment,{children:y.jsx("textarea",{ref:S,value:g,onChange:z=>x(z.target.value),className:"w-full text-github-text-primary text-sm leading-6 bg-github-bg-secondary border border-github-border rounded px-2 py-1 resize-none focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600/30",rows:Math.max(2,g.split(`
24
- `).length),placeholder:"Edit your comment...",autoFocus:!0,onClick:z=>z.stopPropagation(),onKeyDown:z=>{z.stopPropagation(),F(z)}})}),y.jsxs("div",{className:"flex gap-2 justify-end mt-2",children:[y.jsx("button",{type:"button",onClick:O,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all",children:"Cancel"}),y.jsx("button",{type:"button",onClick:U,className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:z=>{z.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",z.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!g.trim(),children:"Submit"})]})]}):y.jsx(Ud,{body:e.body,originalCode:e.codeContent,filename:e.file,syntaxTheme:c})]})}function sC({isOpen:e,onClose:r,onNavigate:i,comments:l,showAuthorBadges:o=!1,onRemoveComment:u,onGeneratePrompt:c,onUpdateComment:f,syntaxTheme:p}){const[h,b]=A.useState(0),g=A.useRef([]),{enableScope:x,disableScope:v}=Wa(),w=[...l].sort((C,j)=>{const O=C.file.localeCompare(j.file);if(O!==0)return O;const U=Array.isArray(C.line)?C.line[0]:C.line,_=Array.isArray(j.line)?j.line[0]:j.line;return U-_}),S=A.useCallback(C=>{i(C),r()},[i,r]),N=A.useCallback(C=>{confirm(`Delete this comment?
25
-
26
- "${C.body}"`)&&(u(C.id),h>=w.length-1&&h>0&&b(h-1))},[u,h,w.length]);A.useEffect(()=>(e?(x("comments-list"),v("navigation")):(x("navigation"),v("comments-list"),b(0)),()=>{x("navigation"),v("comments-list")}),[e,x,v]);const E={scopes:"comments-list",enableOnFormTags:!1};return lt("escape",()=>r(),E,[r]),lt("j, down",()=>b(C=>Math.min(C+1,w.length-1)),E,[w.length]),lt("k, up",()=>b(C=>Math.max(C-1,0)),E,[]),lt("enter",()=>{w[h]&&S(w[h])},E,[h,w,S]),lt("d",()=>{w[h]&&N(w[h])},E,[h,w,N]),A.useEffect(()=>{g.current[h]&&g.current[h]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[h]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full max-h-[80vh] overflow-hidden",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"All Comments"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close comments list",children:y.jsx(yu,{size:20})})]}),y.jsxs("div",{className:"text-xs text-github-text-secondary",children:[y.jsx("span",{className:"font-mono",children:"j/k"})," or ",y.jsx("span",{className:"font-mono",children:"↑/↓"})," to navigate • ",y.jsx("span",{className:"font-mono",children:"Enter"})," to jump •"," ",y.jsx("span",{className:"font-mono",children:"d"})," to delete • ",y.jsx("span",{className:"font-mono",children:"Esc"})," ","to close"]})]}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(80vh-120px)]",children:y.jsx("div",{className:"p-6",children:w.length===0?y.jsx("p",{className:"text-github-text-secondary text-center",children:"No comments yet"}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"space-y-2",children:w.map((C,j)=>y.jsx("div",{ref:O=>{g.current[j]=O},className:`${h===j?"ring-2 ring-blue-500 rounded":""}`,children:y.jsx(Sh,{comment:C,showAuthorBadge:o,onGeneratePrompt:c,onRemoveComment:u,onUpdateComment:f,syntaxTheme:p,onClick:O=>{O.stopPropagation(),b(j),S(C)}})},C.id))}),w.length>0&&y.jsxs("div",{className:"mt-4 pt-4 border-t border-github-border text-xs text-github-text-secondary text-center",children:[h+1," of ",w.length," comments"]})]})})})]})]}):null}function wu(){return typeof window<"u"}function ci(e){return kh(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Wn(e){var r;return(r=(kh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function kh(e){return wu()?e instanceof Node||e instanceof un(e).Node:!1}function ct(e){return wu()?e instanceof Element||e instanceof un(e).Element:!1}function Tt(e){return wu()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function Za(e){return!wu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}function no(e){const{overflow:r,overflowX:i,overflowY:l,display:o}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(r+l+i)&&o!=="inline"&&o!=="contents"}function uC(e){return/^(table|td|th)$/.test(ci(e))}function Su(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const cC=/transform|translate|scale|rotate|perspective|filter/,fC=/paint|layout|strict|content/,ji=e=>!!e&&e!=="none";let ed;function Eh(e){const r=ct(e)?Fn(e):e;return ji(r.transform)||ji(r.translate)||ji(r.scale)||ji(r.rotate)||ji(r.perspective)||!ku()&&(ji(r.backdropFilter)||ji(r.filter))||cC.test(r.willChange||"")||fC.test(r.contain||"")}function dC(e){let r=Nr(e);for(;Tt(r)&&!Cr(r);){if(Eh(r))return r;if(Su(r))return null;r=Nr(r)}return null}function ku(){return ed==null&&(ed=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ed}function Cr(e){return/^(html|body|#document)$/.test(ci(e))}function Fn(e){return un(e).getComputedStyle(e)}function Eu(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nr(e){if(ci(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Za(e)&&e.host||Wn(e);return Za(r)?r.host:r}function M1(e){const r=Nr(e);return Cr(r)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(r)&&no(r)?r:M1(r)}function ui(e,r,i){var l;r===void 0&&(r=[]),i===void 0&&(i=!0);const o=M1(e),u=o===((l=e.ownerDocument)==null?void 0:l.body),c=un(o);if(u){const f=Hd(c);return r.concat(c,c.visualViewport||[],no(o)?o:[],f&&i?ui(f):[])}else return r.concat(o,ui(o,[],i))}function Hd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Us=Math.min,Li=Math.max,Hs=Math.round,Es=Math.floor,Jn=e=>({x:e,y:e}),hC={left:"right",right:"left",bottom:"top",top:"bottom"};function uy(e,r,i){return Li(e,Us(r,i))}function Cu(e,r){return typeof e=="function"?e(r):e}function Di(e){return e.split("-")[0]}function Nu(e){return e.split("-")[1]}function z1(e){return e==="x"?"y":"x"}function F1(e){return e==="y"?"height":"width"}function ai(e){const r=e[0];return r==="t"||r==="b"?"y":"x"}function I1(e){return z1(ai(e))}function pC(e,r,i){i===void 0&&(i=!1);const l=Nu(e),o=I1(e),u=F1(o);let c=o==="x"?l===(i?"end":"start")?"right":"left":l==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=qs(c)),[c,qs(c)]}function mC(e){const r=qs(e);return[qd(e),r,qd(r)]}function qd(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const cy=["left","right"],fy=["right","left"],gC=["top","bottom"],bC=["bottom","top"];function yC(e,r,i){switch(e){case"top":case"bottom":return i?r?fy:cy:r?cy:fy;case"left":case"right":return r?gC:bC;default:return[]}}function xC(e,r,i,l){const o=Nu(e);let u=yC(Di(e),i==="start",l);return o&&(u=u.map(c=>c+"-"+o),r&&(u=u.concat(u.map(qd)))),u}function qs(e){const r=Di(e);return hC[r]+e.slice(r.length)}function vC(e){return{top:0,right:0,bottom:0,left:0,...e}}function wC(e){return typeof e!="number"?vC(e):{top:e,right:e,bottom:e,left:e}}function $s(e){const{x:r,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:r,right:r+l,bottom:i+o,x:r,y:i}}var SC=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ps=SC.join(","),B1=typeof Element>"u",zl=B1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Vs=!B1&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e?.ownerDocument},Gs=function(r,i){var l;i===void 0&&(i=!0);var o=r==null||(l=r.getAttribute)===null||l===void 0?void 0:l.call(r,"inert"),u=o===""||o==="true",c=u||i&&r&&(typeof r.closest=="function"?r.closest("[inert]"):Gs(r.parentNode));return c},kC=function(r){var i,l=r==null||(i=r.getAttribute)===null||i===void 0?void 0:i.call(r,"contenteditable");return l===""||l==="true"},U1=function(r,i,l){if(Gs(r))return[];var o=Array.prototype.slice.apply(r.querySelectorAll(Ps));return i&&zl.call(r,Ps)&&o.unshift(r),o=o.filter(l),o},Ys=function(r,i,l){for(var o=[],u=Array.from(r);u.length;){var c=u.shift();if(!Gs(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),p=f.length?f:c.children,h=Ys(p,!0,l);l.flatten?o.push.apply(o,h):o.push({scopeParent:c,candidates:h})}else{var b=zl.call(c,Ps);b&&l.filter(c)&&(i||!r.includes(c))&&o.push(c);var g=c.shadowRoot||typeof l.getShadowRoot=="function"&&l.getShadowRoot(c),x=!Gs(g,!1)&&(!l.shadowRootFilter||l.shadowRootFilter(c));if(g&&x){var v=Ys(g===!0?c.children:g.children,!0,l);l.flatten?o.push.apply(o,v):o.push({scopeParent:c,candidates:v})}else u.unshift.apply(u,c.children)}}return o},H1=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},q1=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||kC(r))&&!H1(r)?0:r.tabIndex},EC=function(r,i){var l=q1(r);return l<0&&i&&!H1(r)?0:l},CC=function(r,i){return r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex},$1=function(r){return r.tagName==="INPUT"},NC=function(r){return $1(r)&&r.type==="hidden"},AC=function(r){var i=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(l){return l.tagName==="SUMMARY"});return i},TC=function(r,i){for(var l=0;l<r.length;l++)if(r[l].checked&&r[l].form===i)return r[l]},RC=function(r){if(!r.name)return!0;var i=r.form||Vs(r),l=function(f){return i.querySelectorAll('input[type="radio"][name="'+f+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=l(window.CSS.escape(r.name));else try{o=l(r.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var u=TC(o,r.form);return!u||u===r},jC=function(r){return $1(r)&&r.type==="radio"},_C=function(r){return jC(r)&&!RC(r)},LC=function(r){var i,l=r&&Vs(r),o=(i=l)===null||i===void 0?void 0:i.host,u=!1;if(l&&l!==r){var c,f,p;for(u=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o)||r!=null&&(p=r.ownerDocument)!==null&&p!==void 0&&p.contains(r));!u&&o;){var h,b,g;l=Vs(o),o=(h=l)===null||h===void 0?void 0:h.host,u=!!((b=o)!==null&&b!==void 0&&(g=b.ownerDocument)!==null&&g!==void 0&&g.contains(o))}}return u},dy=function(r){var i=r.getBoundingClientRect(),l=i.width,o=i.height;return l===0&&o===0},DC=function(r,i){var l=i.displayCheck,o=i.getShadowRoot;if(l==="full-native"&&"checkVisibility"in r){var u=r.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!u}if(getComputedStyle(r).visibility==="hidden")return!0;var c=zl.call(r,"details>summary:first-of-type"),f=c?r.parentElement:r;if(zl.call(f,"details:not([open]) *"))return!0;if(!l||l==="full"||l==="full-native"||l==="legacy-full"){if(typeof o=="function"){for(var p=r;r;){var h=r.parentElement,b=Vs(r);if(h&&!h.shadowRoot&&o(h)===!0)return dy(r);r.assignedSlot?r=r.assignedSlot:!h&&b!==r.ownerDocument?r=b.host:r=h}r=p}if(LC(r))return!r.getClientRects().length;if(l!=="legacy-full")return!0}else if(l==="non-zero-area")return dy(r);return!1},OC=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var i=r.parentElement;i;){if(i.tagName==="FIELDSET"&&i.disabled){for(var l=0;l<i.children.length;l++){var o=i.children.item(l);if(o.tagName==="LEGEND")return zl.call(i,"fieldset[disabled] *")?!0:!o.contains(r)}return!0}i=i.parentElement}return!1},$d=function(r,i){return!(i.disabled||NC(i)||DC(i,r)||AC(i)||OC(i))},Pd=function(r,i){return!(_C(i)||q1(i)<0||!$d(r,i))},MC=function(r){var i=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(i)||i>=0)},P1=function(r){var i=[],l=[];return r.forEach(function(o,u){var c=!!o.scopeParent,f=c?o.scopeParent:o,p=EC(f,c),h=c?P1(o.candidates):f;p===0?c?i.push.apply(i,h):i.push(f):l.push({documentOrder:u,tabIndex:p,item:o,isScope:c,content:h})}),l.sort(CC).reduce(function(o,u){return u.isScope?o.push.apply(o,u.content):o.push(u.content),o},[]).concat(i)},Au=function(r,i){i=i||{};var l;return i.getShadowRoot?l=Ys([r],i.includeContainer,{filter:Pd.bind(null,i),flatten:!1,getShadowRoot:i.getShadowRoot,shadowRootFilter:MC}):l=U1(r,i.includeContainer,Pd.bind(null,i)),P1(l)},zC=function(r,i){i=i||{};var l;return i.getShadowRoot?l=Ys([r],i.includeContainer,{filter:$d.bind(null,i),flatten:!0,getShadowRoot:i.getShadowRoot}):l=U1(r,i.includeContainer,$d.bind(null,i)),l},V1=function(r,i){if(i=i||{},!r)throw new Error("No node provided");return zl.call(r,Ps)===!1?!1:Pd(i,r)};function G1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Y1(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:i,version:l}=r;return i+"/"+l}).join(" "):navigator.userAgent}function X1(){return/apple/i.test(navigator.vendor)}function Vd(){const e=/android/i;return e.test(G1())||e.test(Y1())}function FC(){return G1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Z1(){return Y1().includes("jsdom/")}const hy="data-floating-ui-focusable",IC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function li(e){let r=e.activeElement;for(;((i=r)==null||(i=i.shadowRoot)==null?void 0:i.activeElement)!=null;){var i;r=r.shadowRoot.activeElement}return r}function $t(e,r){if(!e||!r)return!1;const i=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(i&&Za(i)){let l=r;for(;l;){if(e===l)return!0;l=l.parentNode||l.host}}return!1}function kr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function td(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const i=e;return i.target!=null&&r.contains(i.target)}function BC(e){return e.matches("html,body")}function Pt(e){return e?.ownerDocument||document}function Ch(e){return Tt(e)&&e.matches(IC)}function py(e){return e?e.getAttribute("role")==="combobox"&&Ch(e):!1}function UC(e){if(!e||Z1())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Gd(e){return e?e.hasAttribute(hy)?e:e.querySelector("["+hy+"]")||e:null}function _l(e,r,i){return i===void 0&&(i=!0),e.filter(o=>{var u;return o.parentId===r&&(!i||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,..._l(e,o.id,i)])}function my(e,r){var i;let l=[],o=(i=e.find(u=>u.id===r))==null?void 0:i.parentId;for(;o;){const u=e.find(c=>c.id===o);o=u?.parentId,u&&(l=l.concat(u))}return l}function nd(e){e.preventDefault(),e.stopPropagation()}function HC(e){return"nativeEvent"in e}function qC(e){return e.mozInputSource===0&&e.isTrusted?!0:Vd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $C(e){return Z1()?!1:!Vd()&&e.width===0&&e.height===0||Vd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ka(e,r){const i=["mouse","pen"];return r||i.push("",void 0),i.includes(e)}var PC=typeof document<"u",VC=function(){},Vt=PC?A.useLayoutEffect:VC;const GC={...r1};function qn(e){const r=A.useRef(e);return Vt(()=>{r.current=e}),r}const YC=GC.useInsertionEffect,XC=YC||(e=>e());function sn(e){const r=A.useRef(()=>{});return XC(()=>{r.current=e}),A.useCallback(function(){for(var i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];return r.current==null?void 0:r.current(...l)},[])}const ro=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function K1(e,r){const i=Au(e,ro()),l=i.length;if(l===0)return;const o=li(Pt(e)),u=i.indexOf(o),c=u===-1?r===1?0:l-1:u+r;return i[c]}function Q1(e){return K1(Pt(e).body,1)||e}function J1(e){return K1(Pt(e).body,-1)||e}function Ha(e,r){const i=r||e.currentTarget,l=e.relatedTarget;return!l||!$t(i,l)}function ZC(e){Au(e,ro()).forEach(i=>{i.dataset.tabindex=i.getAttribute("tabindex")||"",i.setAttribute("tabindex","-1")})}function gy(e){e.querySelectorAll("[data-tabindex]").forEach(i=>{const l=i.dataset.tabindex;delete i.dataset.tabindex,l?i.setAttribute("tabindex",l):i.removeAttribute("tabindex")})}var Nh=i1();function by(e,r,i){let{reference:l,floating:o}=e;const u=ai(r),c=I1(r),f=F1(c),p=Di(r),h=u==="y",b=l.x+l.width/2-o.width/2,g=l.y+l.height/2-o.height/2,x=l[f]/2-o[f]/2;let v;switch(p){case"top":v={x:b,y:l.y-o.height};break;case"bottom":v={x:b,y:l.y+l.height};break;case"right":v={x:l.x+l.width,y:g};break;case"left":v={x:l.x-o.width,y:g};break;default:v={x:l.x,y:l.y}}switch(Nu(r)){case"start":v[c]-=x*(i&&h?-1:1);break;case"end":v[c]+=x*(i&&h?-1:1);break}return v}async function KC(e,r){var i;r===void 0&&(r={});const{x:l,y:o,platform:u,rects:c,elements:f,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:b="viewport",elementContext:g="floating",altBoundary:x=!1,padding:v=0}=Cu(r,e),w=wC(v),N=f[x?g==="floating"?"reference":"floating":g],E=$s(await u.getClippingRect({element:(i=await(u.isElement==null?void 0:u.isElement(N)))==null||i?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:h,rootBoundary:b,strategy:p})),C=g==="floating"?{x:l,y:o,width:c.floating.width,height:c.floating.height}:c.reference,j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),O=await(u.isElement==null?void 0:u.isElement(j))?await(u.getScale==null?void 0:u.getScale(j))||{x:1,y:1}:{x:1,y:1},U=$s(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:C,offsetParent:j,strategy:p}):C);return{top:(E.top-U.top+w.top)/O.y,bottom:(U.bottom-E.bottom+w.bottom)/O.y,left:(E.left-U.left+w.left)/O.x,right:(U.right-E.right+w.right)/O.x}}const QC=50,JC=async(e,r,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:u=[],platform:c}=i,f=c.detectOverflow?c:{...c,detectOverflow:KC},p=await(c.isRTL==null?void 0:c.isRTL(r));let h=await c.getElementRects({reference:e,floating:r,strategy:o}),{x:b,y:g}=by(h,l,p),x=l,v=0;const w={};for(let S=0;S<u.length;S++){const N=u[S];if(!N)continue;const{name:E,fn:C}=N,{x:j,y:O,data:U,reset:_}=await C({x:b,y:g,initialPlacement:l,placement:x,strategy:o,middlewareData:w,rects:h,platform:f,elements:{reference:e,floating:r}});b=j??b,g=O??g,w[E]={...w[E],...U},_&&v<QC&&(v++,typeof _=="object"&&(_.placement&&(x=_.placement),_.rects&&(h=_.rects===!0?await c.getElementRects({reference:e,floating:r,strategy:o}):_.rects),{x:b,y:g}=by(h,x,p)),S=-1)}return{x:b,y:g,placement:x,strategy:o,middlewareData:w}},WC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var i,l;const{placement:o,middlewareData:u,rects:c,initialPlacement:f,platform:p,elements:h}=r,{mainAxis:b=!0,crossAxis:g=!0,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...N}=Cu(e,r);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const E=Di(o),C=ai(f),j=Di(f)===f,O=await(p.isRTL==null?void 0:p.isRTL(h.floating)),U=x||(j||!S?[qs(f)]:mC(f)),_=w!=="none";!x&&_&&U.push(...xC(f,S,w,O));const F=[f,...U],z=await p.detectOverflow(r,N),H=[];let M=((l=u.flip)==null?void 0:l.overflows)||[];if(b&&H.push(z[E]),g){const I=pC(o,c,O);H.push(z[I[0]],z[I[1]])}if(M=[...M,{placement:o,overflows:H}],!H.every(I=>I<=0)){var P,V;const I=(((P=u.flip)==null?void 0:P.index)||0)+1,Z=F[I];if(Z&&(!(g==="alignment"?C!==ai(Z):!1)||M.every(X=>ai(X.placement)===C?X.overflows[0]>0:!0)))return{data:{index:I,overflows:M},reset:{placement:Z}};let B=(V=M.filter(Y=>Y.overflows[0]<=0).sort((Y,X)=>Y.overflows[1]-X.overflows[1])[0])==null?void 0:V.placement;if(!B)switch(v){case"bestFit":{var J;const Y=(J=M.filter(X=>{if(_){const q=ai(X.placement);return q===C||q==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(q=>q>0).reduce((q,R)=>q+R,0)]).sort((X,q)=>X[1]-q[1])[0])==null?void 0:J[0];Y&&(B=Y);break}case"initialPlacement":B=f;break}if(o!==B)return{reset:{placement:B}}}return{}}}},e3=new Set(["left","top"]);async function t3(e,r){const{placement:i,platform:l,elements:o}=e,u=await(l.isRTL==null?void 0:l.isRTL(o.floating)),c=Di(i),f=Nu(i),p=ai(i)==="y",h=e3.has(c)?-1:1,b=u&&p?-1:1,g=Cu(r,e);let{mainAxis:x,crossAxis:v,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof w=="number"&&(v=f==="end"?w*-1:w),p?{x:v*b,y:x*h}:{x:x*h,y:v*b}}const n3=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var i,l;const{x:o,y:u,placement:c,middlewareData:f}=r,p=await t3(r,e);return c===((i=f.offset)==null?void 0:i.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:o+p.x,y:u+p.y,data:{...p,placement:c}}}}},r3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:i,y:l,placement:o,platform:u}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:p={fn:E=>{let{x:C,y:j}=E;return{x:C,y:j}}},...h}=Cu(e,r),b={x:i,y:l},g=await u.detectOverflow(r,h),x=ai(Di(o)),v=z1(x);let w=b[v],S=b[x];if(c){const E=v==="y"?"top":"left",C=v==="y"?"bottom":"right",j=w+g[E],O=w-g[C];w=uy(j,w,O)}if(f){const E=x==="y"?"top":"left",C=x==="y"?"bottom":"right",j=S+g[E],O=S-g[C];S=uy(j,S,O)}const N=p.fn({...r,[v]:w,[x]:S});return{...N,data:{x:N.x-i,y:N.y-l,enabled:{[v]:c,[x]:f}}}}}};function W1(e){const r=Fn(e);let i=parseFloat(r.width)||0,l=parseFloat(r.height)||0;const o=Tt(e),u=o?e.offsetWidth:i,c=o?e.offsetHeight:l,f=Hs(i)!==u||Hs(l)!==c;return f&&(i=u,l=c),{width:i,height:l,$:f}}function Ah(e){return ct(e)?e:e.contextElement}function Ll(e){const r=Ah(e);if(!Tt(r))return Jn(1);const i=r.getBoundingClientRect(),{width:l,height:o,$:u}=W1(r);let c=(u?Hs(i.width):i.width)/l,f=(u?Hs(i.height):i.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const i3=Jn(0);function e0(e){const r=un(e);return!ku()||!r.visualViewport?i3:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function l3(e,r,i){return r===void 0&&(r=!1),!i||r&&i!==un(e)?!1:r}function Oi(e,r,i,l){r===void 0&&(r=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),u=Ah(e);let c=Jn(1);r&&(l?ct(l)&&(c=Ll(l)):c=Ll(e));const f=l3(u,i,l)?e0(u):Jn(0);let p=(o.left+f.x)/c.x,h=(o.top+f.y)/c.y,b=o.width/c.x,g=o.height/c.y;if(u){const x=un(u),v=l&&ct(l)?un(l):l;let w=x,S=Hd(w);for(;S&&l&&v!==w;){const N=Ll(S),E=S.getBoundingClientRect(),C=Fn(S),j=E.left+(S.clientLeft+parseFloat(C.paddingLeft))*N.x,O=E.top+(S.clientTop+parseFloat(C.paddingTop))*N.y;p*=N.x,h*=N.y,b*=N.x,g*=N.y,p+=j,h+=O,w=un(S),S=Hd(w)}}return $s({width:b,height:g,x:p,y:h})}function Tu(e,r){const i=Eu(e).scrollLeft;return r?r.left+i:Oi(Wn(e)).left+i}function t0(e,r){const i=e.getBoundingClientRect(),l=i.left+r.scrollLeft-Tu(e,i),o=i.top+r.scrollTop;return{x:l,y:o}}function a3(e){let{elements:r,rect:i,offsetParent:l,strategy:o}=e;const u=o==="fixed",c=Wn(l),f=r?Su(r.floating):!1;if(l===c||f&&u)return i;let p={scrollLeft:0,scrollTop:0},h=Jn(1);const b=Jn(0),g=Tt(l);if((g||!g&&!u)&&((ci(l)!=="body"||no(c))&&(p=Eu(l)),g)){const v=Oi(l);h=Ll(l),b.x=v.x+l.clientLeft,b.y=v.y+l.clientTop}const x=c&&!g&&!u?t0(c,p):Jn(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-p.scrollLeft*h.x+b.x+x.x,y:i.y*h.y-p.scrollTop*h.y+b.y+x.y}}function o3(e){return Array.from(e.getClientRects())}function s3(e){const r=Wn(e),i=Eu(e),l=e.ownerDocument.body,o=Li(r.scrollWidth,r.clientWidth,l.scrollWidth,l.clientWidth),u=Li(r.scrollHeight,r.clientHeight,l.scrollHeight,l.clientHeight);let c=-i.scrollLeft+Tu(e);const f=-i.scrollTop;return Fn(l).direction==="rtl"&&(c+=Li(r.clientWidth,l.clientWidth)-o),{width:o,height:u,x:c,y:f}}const yy=25;function u3(e,r){const i=un(e),l=Wn(e),o=i.visualViewport;let u=l.clientWidth,c=l.clientHeight,f=0,p=0;if(o){u=o.width,c=o.height;const b=ku();(!b||b&&r==="fixed")&&(f=o.offsetLeft,p=o.offsetTop)}const h=Tu(l);if(h<=0){const b=l.ownerDocument,g=b.body,x=getComputedStyle(g),v=b.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(l.clientWidth-g.clientWidth-v);w<=yy&&(u-=w)}else h<=yy&&(u+=h);return{width:u,height:c,x:f,y:p}}function c3(e,r){const i=Oi(e,!0,r==="fixed"),l=i.top+e.clientTop,o=i.left+e.clientLeft,u=Tt(e)?Ll(e):Jn(1),c=e.clientWidth*u.x,f=e.clientHeight*u.y,p=o*u.x,h=l*u.y;return{width:c,height:f,x:p,y:h}}function xy(e,r,i){let l;if(r==="viewport")l=u3(e,i);else if(r==="document")l=s3(Wn(e));else if(ct(r))l=c3(r,i);else{const o=e0(e);l={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return $s(l)}function n0(e,r){const i=Nr(e);return i===r||!ct(i)||Cr(i)?!1:Fn(i).position==="fixed"||n0(i,r)}function f3(e,r){const i=r.get(e);if(i)return i;let l=ui(e,[],!1).filter(f=>ct(f)&&ci(f)!=="body"),o=null;const u=Fn(e).position==="fixed";let c=u?Nr(e):e;for(;ct(c)&&!Cr(c);){const f=Fn(c),p=Eh(c);!p&&f.position==="fixed"&&(o=null),(u?!p&&!o:!p&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||no(c)&&!p&&n0(e,c))?l=l.filter(b=>b!==c):o=f,c=Nr(c)}return r.set(e,l),l}function d3(e){let{element:r,boundary:i,rootBoundary:l,strategy:o}=e;const c=[...i==="clippingAncestors"?Su(r)?[]:f3(r,this._c):[].concat(i),l],f=xy(r,c[0],o);let p=f.top,h=f.right,b=f.bottom,g=f.left;for(let x=1;x<c.length;x++){const v=xy(r,c[x],o);p=Li(v.top,p),h=Us(v.right,h),b=Us(v.bottom,b),g=Li(v.left,g)}return{width:h-g,height:b-p,x:g,y:p}}function h3(e){const{width:r,height:i}=W1(e);return{width:r,height:i}}function p3(e,r,i){const l=Tt(r),o=Wn(r),u=i==="fixed",c=Oi(e,!0,u,r);let f={scrollLeft:0,scrollTop:0};const p=Jn(0);function h(){p.x=Tu(o)}if(l||!l&&!u)if((ci(r)!=="body"||no(o))&&(f=Eu(r)),l){const v=Oi(r,!0,u,r);p.x=v.x+r.clientLeft,p.y=v.y+r.clientTop}else o&&h();u&&!l&&o&&h();const b=o&&!l&&!u?t0(o,f):Jn(0),g=c.left+f.scrollLeft-p.x-b.x,x=c.top+f.scrollTop-p.y-b.y;return{x:g,y:x,width:c.width,height:c.height}}function rd(e){return Fn(e).position==="static"}function vy(e,r){if(!Tt(e)||Fn(e).position==="fixed")return null;if(r)return r(e);let i=e.offsetParent;return Wn(e)===i&&(i=i.ownerDocument.body),i}function r0(e,r){const i=un(e);if(Su(e))return i;if(!Tt(e)){let o=Nr(e);for(;o&&!Cr(o);){if(ct(o)&&!rd(o))return o;o=Nr(o)}return i}let l=vy(e,r);for(;l&&uC(l)&&rd(l);)l=vy(l,r);return l&&Cr(l)&&rd(l)&&!Eh(l)?i:l||dC(e)||i}const m3=async function(e){const r=this.getOffsetParent||r0,i=this.getDimensions,l=await i(e.floating);return{reference:p3(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function g3(e){return Fn(e).direction==="rtl"}const b3={convertOffsetParentRelativeRectToViewportRelativeRect:a3,getDocumentElement:Wn,getClippingRect:d3,getOffsetParent:r0,getElementRects:m3,getClientRects:o3,getDimensions:h3,getScale:Ll,isElement:ct,isRTL:g3};function i0(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function y3(e,r){let i=null,l;const o=Wn(e);function u(){var f;clearTimeout(l),(f=i)==null||f.disconnect(),i=null}function c(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),u();const h=e.getBoundingClientRect(),{left:b,top:g,width:x,height:v}=h;if(f||r(),!x||!v)return;const w=Es(g),S=Es(o.clientWidth-(b+x)),N=Es(o.clientHeight-(g+v)),E=Es(b),j={rootMargin:-w+"px "+-S+"px "+-N+"px "+-E+"px",threshold:Li(0,Us(1,p))||1};let O=!0;function U(_){const F=_[0].intersectionRatio;if(F!==p){if(!O)return c();F?c(!1,F):l=setTimeout(()=>{c(!1,1e-7)},1e3)}F===1&&!i0(h,e.getBoundingClientRect())&&c(),O=!1}try{i=new IntersectionObserver(U,{...j,root:o.ownerDocument})}catch{i=new IntersectionObserver(U,j)}i.observe(e)}return c(!0),u}function Xs(e,r,i,l){l===void 0&&(l={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=l,h=Ah(e),b=o||u?[...h?ui(h):[],...r?ui(r):[]]:[];b.forEach(E=>{o&&E.addEventListener("scroll",i,{passive:!0}),u&&E.addEventListener("resize",i)});const g=h&&f?y3(h,i):null;let x=-1,v=null;c&&(v=new ResizeObserver(E=>{let[C]=E;C&&C.target===h&&v&&r&&(v.unobserve(r),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var j;(j=v)==null||j.observe(r)})),i()}),h&&!p&&v.observe(h),r&&v.observe(r));let w,S=p?Oi(e):null;p&&N();function N(){const E=Oi(e);S&&!i0(S,E)&&i(),S=E,w=requestAnimationFrame(N)}return i(),()=>{var E;b.forEach(C=>{o&&C.removeEventListener("scroll",i),u&&C.removeEventListener("resize",i)}),g?.(),(E=v)==null||E.disconnect(),v=null,p&&cancelAnimationFrame(w)}}const x3=n3,v3=r3,w3=WC,S3=(e,r,i)=>{const l=new Map,o={platform:b3,...i},u={...o.platform,_c:l};return JC(e,r,{...o,platform:u})};var k3=typeof document<"u",E3=function(){},Os=k3?A.useLayoutEffect:E3;function Zs(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let i,l,o;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==r.length)return!1;for(l=i;l--!==0;)if(!Zs(e[l],r[l]))return!1;return!0}if(o=Object.keys(e),i=o.length,i!==Object.keys(r).length)return!1;for(l=i;l--!==0;)if(!{}.hasOwnProperty.call(r,o[l]))return!1;for(l=i;l--!==0;){const u=o[l];if(!(u==="_owner"&&e.$$typeof)&&!Zs(e[u],r[u]))return!1}return!0}return e!==e&&r!==r}function l0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wy(e,r){const i=l0(e);return Math.round(r*i)/i}function id(e){const r=A.useRef(e);return Os(()=>{r.current=e}),r}function C3(e){e===void 0&&(e={});const{placement:r="bottom",strategy:i="absolute",middleware:l=[],platform:o,elements:{reference:u,floating:c}={},transform:f=!0,whileElementsMounted:p,open:h}=e,[b,g]=A.useState({x:0,y:0,strategy:i,placement:r,middlewareData:{},isPositioned:!1}),[x,v]=A.useState(l);Zs(x,l)||v(l);const[w,S]=A.useState(null),[N,E]=A.useState(null),C=A.useCallback(X=>{X!==_.current&&(_.current=X,S(X))},[]),j=A.useCallback(X=>{X!==F.current&&(F.current=X,E(X))},[]),O=u||w,U=c||N,_=A.useRef(null),F=A.useRef(null),z=A.useRef(b),H=p!=null,M=id(p),P=id(o),V=id(h),J=A.useCallback(()=>{if(!_.current||!F.current)return;const X={placement:r,strategy:i,middleware:x};P.current&&(X.platform=P.current),S3(_.current,F.current,X).then(q=>{const R={...q,isPositioned:V.current!==!1};I.current&&!Zs(z.current,R)&&(z.current=R,Nh.flushSync(()=>{g(R)}))})},[x,r,i,P,V]);Os(()=>{h===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,g(X=>({...X,isPositioned:!1})))},[h]);const I=A.useRef(!1);Os(()=>(I.current=!0,()=>{I.current=!1}),[]),Os(()=>{if(O&&(_.current=O),U&&(F.current=U),O&&U){if(M.current)return M.current(O,U,J);J()}},[O,U,J,M,H]);const Z=A.useMemo(()=>({reference:_,floating:F,setReference:C,setFloating:j}),[C,j]),B=A.useMemo(()=>({reference:O,floating:U}),[O,U]),Y=A.useMemo(()=>{const X={position:i,left:0,top:0};if(!B.floating)return X;const q=wy(B.floating,b.x),R=wy(B.floating,b.y);return f?{...X,transform:"translate("+q+"px, "+R+"px)",...l0(B.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:q,top:R}},[i,f,B.floating,b.x,b.y]);return A.useMemo(()=>({...b,update:J,refs:Z,elements:B,floatingStyles:Y}),[b,J,Z,B,Y])}const Ks=(e,r)=>{const i=x3(e);return{name:i.name,fn:i.fn,options:[e,r]}},Qs=(e,r)=>{const i=v3(e);return{name:i.name,fn:i.fn,options:[e,r]}},Js=(e,r)=>{const i=w3(e);return{name:i.name,fn:i.fn,options:[e,r]}},N3="data-floating-ui-focusable",Sy="active",ky="selected",A3={...r1};let Ey=!1,T3=0;const Cy=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+T3++;function R3(){const[e,r]=A.useState(()=>Ey?Cy():void 0);return Vt(()=>{e==null&&r(Cy())},[]),A.useEffect(()=>{Ey=!0},[]),e}const j3=A3.useId,Th=j3||R3;function _3(){const e=new Map;return{emit(r,i){var l;(l=e.get(r))==null||l.forEach(o=>o(i))},on(r,i){e.has(r)||e.set(r,new Set),e.get(r).add(i)},off(r,i){var l;(l=e.get(r))==null||l.delete(i)}}}const L3=A.createContext(null),D3=A.createContext(null),Rh=()=>{var e;return((e=A.useContext(L3))==null?void 0:e.id)||null},Ru=()=>A.useContext(D3);function Mi(e){return"data-floating-ui-"+e}function Zt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Ny=Mi("safe-polygon");function ld(e,r,i){if(i&&!Ka(i))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const l=e();return typeof l=="number"?l:l?.[r]}return e?.[r]}function ad(e){return typeof e=="function"?e():e}function Ws(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,dataRef:o,events:u,elements:c}=e,{enabled:f=!0,delay:p=0,handleClose:h=null,mouseOnly:b=!1,restMs:g=0,move:x=!0}=r,v=Ru(),w=Rh(),S=qn(h),N=qn(p),E=qn(i),C=qn(g),j=A.useRef(),O=A.useRef(-1),U=A.useRef(),_=A.useRef(-1),F=A.useRef(!0),z=A.useRef(!1),H=A.useRef(()=>{}),M=A.useRef(!1),P=sn(()=>{var Y;const X=(Y=o.current.openEvent)==null?void 0:Y.type;return X?.includes("mouse")&&X!=="mousedown"});A.useEffect(()=>{if(!f)return;function Y(X){let{open:q}=X;q||(Zt(O),Zt(_),F.current=!0,M.current=!1)}return u.on("openchange",Y),()=>{u.off("openchange",Y)}},[f,u]),A.useEffect(()=>{if(!f||!S.current||!i)return;function Y(q){P()&&l(!1,q,"hover")}const X=Pt(c.floating).documentElement;return X.addEventListener("mouseleave",Y),()=>{X.removeEventListener("mouseleave",Y)}},[c.floating,i,l,f,S,P]);const V=A.useCallback(function(Y,X,q){X===void 0&&(X=!0),q===void 0&&(q="hover");const R=ld(N.current,"close",j.current);R&&!U.current?(Zt(O),O.current=window.setTimeout(()=>l(!1,Y,q),R)):X&&(Zt(O),l(!1,Y,q))},[N,l]),J=sn(()=>{H.current(),U.current=void 0}),I=sn(()=>{if(z.current){const Y=Pt(c.floating).body;Y.style.pointerEvents="",Y.removeAttribute(Ny),z.current=!1}}),Z=sn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!f)return;function Y($){if(Zt(O),F.current=!1,b&&!Ka(j.current)||ad(C.current)>0&&!ld(N.current,"open"))return;const T=ld(N.current,"open",j.current);T?O.current=window.setTimeout(()=>{E.current||l(!0,$,"hover")},T):i||l(!0,$,"hover")}function X($){if(Z()){I();return}H.current();const T=Pt(c.floating);if(Zt(_),M.current=!1,S.current&&o.current.floatingContext){i||Zt(O),U.current=S.current({...o.current.floatingContext,tree:v,x:$.clientX,y:$.clientY,onClose(){I(),J(),Z()||V($,!0,"safe-polygon")}});const te=U.current;T.addEventListener("mousemove",te),H.current=()=>{T.removeEventListener("mousemove",te)};return}(j.current!=="touch"||!$t(c.floating,$.relatedTarget))&&V($)}function q($){Z()||o.current.floatingContext&&(S.current==null||S.current({...o.current.floatingContext,tree:v,x:$.clientX,y:$.clientY,onClose(){I(),J(),Z()||V($)}})($))}function R(){Zt(O)}function D($){Z()||V($,!1)}if(ct(c.domReference)){const $=c.domReference,T=c.floating;return i&&$.addEventListener("mouseleave",q),x&&$.addEventListener("mousemove",Y,{once:!0}),$.addEventListener("mouseenter",Y),$.addEventListener("mouseleave",X),T&&(T.addEventListener("mouseleave",q),T.addEventListener("mouseenter",R),T.addEventListener("mouseleave",D)),()=>{i&&$.removeEventListener("mouseleave",q),x&&$.removeEventListener("mousemove",Y),$.removeEventListener("mouseenter",Y),$.removeEventListener("mouseleave",X),T&&(T.removeEventListener("mouseleave",q),T.removeEventListener("mouseenter",R),T.removeEventListener("mouseleave",D))}}},[c,f,e,b,x,V,J,I,l,i,E,v,N,S,o,Z,C]),Vt(()=>{var Y;if(f&&i&&(Y=S.current)!=null&&(Y=Y.__options)!=null&&Y.blockPointerEvents&&P()){z.current=!0;const q=c.floating;if(ct(c.domReference)&&q){var X;const R=Pt(c.floating).body;R.setAttribute(Ny,"");const D=c.domReference,$=v==null||(X=v.nodesRef.current.find(T=>T.id===w))==null||(X=X.context)==null?void 0:X.elements.floating;return $&&($.style.pointerEvents=""),R.style.pointerEvents="none",D.style.pointerEvents="auto",q.style.pointerEvents="auto",()=>{R.style.pointerEvents="",D.style.pointerEvents="",q.style.pointerEvents=""}}}},[f,i,w,c,v,S,P]),Vt(()=>{i||(j.current=void 0,M.current=!1,J(),I())},[i,J,I]),A.useEffect(()=>()=>{J(),Zt(O),Zt(_),I()},[f,c.domReference,J,I]);const B=A.useMemo(()=>{function Y(X){j.current=X.pointerType}return{onPointerDown:Y,onPointerEnter:Y,onMouseMove(X){const{nativeEvent:q}=X;function R(){!F.current&&!E.current&&l(!0,q,"hover")}b&&!Ka(j.current)||i||ad(C.current)===0||M.current&&X.movementX**2+X.movementY**2<2||(Zt(_),j.current==="touch"?R():(M.current=!0,_.current=window.setTimeout(R,ad(C.current))))}}},[b,l,i,E,C]);return A.useMemo(()=>f?{reference:B}:{},[f,B])}let Ay=0;function El(e,r){r===void 0&&(r={});const{preventScroll:i=!1,cancelPrevious:l=!0,sync:o=!1}=r;l&&cancelAnimationFrame(Ay);const u=()=>e?.focus({preventScroll:i});o?u():Ay=requestAnimationFrame(u)}function od(e,r){if(!e||!r)return!1;const i=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(i&&Za(i)){let l=r;for(;l;){if(e===l)return!0;l=l.parentNode||l.host}}return!1}function O3(e){return"composedPath"in e?e.composedPath()[0]:e.target}function M3(e){return e?.ownerDocument||document}const Dl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Ty(e){return e==="inert"?Dl.inert:e==="aria-hidden"?Dl["aria-hidden"]:Dl.none}let Cs=new WeakSet,Ns={},sd=0;const z3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function a0(e){return e?Za(e)?e.host:a0(e.parentNode):null}const F3=(e,r)=>r.map(i=>{if(e.contains(i))return i;const l=a0(i);return e.contains(l)?l:null}).filter(i=>i!=null);function I3(e,r,i,l){const o="data-floating-ui-inert",u=l?"inert":i?"aria-hidden":null,c=F3(r,e),f=new Set,p=new Set(c),h=[];Ns[o]||(Ns[o]=new WeakMap);const b=Ns[o];c.forEach(g),x(r),f.clear();function g(v){!v||f.has(v)||(f.add(v),v.parentNode&&g(v.parentNode))}function x(v){!v||p.has(v)||[].forEach.call(v.children,w=>{if(ci(w)!=="script")if(f.has(w))x(w);else{const S=u?w.getAttribute(u):null,N=S!==null&&S!=="false",E=Ty(u),C=(E.get(w)||0)+1,j=(b.get(w)||0)+1;E.set(w,C),b.set(w,j),h.push(w),C===1&&N&&Cs.add(w),j===1&&w.setAttribute(o,""),!N&&u&&w.setAttribute(u,u==="inert"?"":"true")}})}return sd++,()=>{h.forEach(v=>{const w=Ty(u),N=(w.get(v)||0)-1,E=(b.get(v)||0)-1;w.set(v,N),b.set(v,E),N||(!Cs.has(v)&&u&&v.removeAttribute(u),Cs.delete(v)),E||v.removeAttribute(o)}),sd--,sd||(Dl.inert=new WeakMap,Dl["aria-hidden"]=new WeakMap,Dl.none=new WeakMap,Cs=new WeakSet,Ns={})}}function Ry(e,r,i){r===void 0&&(r=!1),i===void 0&&(i=!1);const l=M3(e[0]).body;return I3(e.concat(Array.from(l.querySelectorAll('[aria-live],[role="status"],output'))),l,r,i)}const jh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},eu=A.forwardRef(function(r,i){const[l,o]=A.useState();Vt(()=>{X1()&&o("button")},[]);const u={ref:i,tabIndex:0,role:l,"aria-hidden":l?void 0:!0,[Mi("focus-guard")]:"",style:jh};return y.jsx("span",{...r,...u})}),B3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},o0=A.createContext(null),jy=Mi("portal");function U3(e){e===void 0&&(e={});const{id:r,root:i}=e,l=Th(),o=s0(),[u,c]=A.useState(null),f=A.useRef(null);return Vt(()=>()=>{u?.remove(),queueMicrotask(()=>{f.current=null})},[u]),Vt(()=>{if(!l||f.current)return;const p=r?document.getElementById(r):null;if(!p)return;const h=document.createElement("div");h.id=l,h.setAttribute(jy,""),p.appendChild(h),f.current=h,c(h)},[r,l]),Vt(()=>{if(i===null||!l||f.current)return;let p=i||o?.portalNode;p&&!kh(p)&&(p=p.current),p=p||document.body;let h=null;r&&(h=document.createElement("div"),h.id=r,p.appendChild(h));const b=document.createElement("div");b.id=l,b.setAttribute(jy,""),p=h||p,p.appendChild(b),f.current=b,c(b)},[r,i,l,o]),u}function tu(e){const{children:r,id:i,root:l,preserveTabOrder:o=!0}=e,u=U3({id:i,root:l}),[c,f]=A.useState(null),p=A.useRef(null),h=A.useRef(null),b=A.useRef(null),g=A.useRef(null),x=c?.modal,v=c?.open,w=!!c&&!c.modal&&c.open&&o&&!!(l||u);return A.useEffect(()=>{if(!u||!o||x)return;function S(N){u&&Ha(N)&&(N.type==="focusin"?gy:ZC)(u)}return u.addEventListener("focusin",S,!0),u.addEventListener("focusout",S,!0),()=>{u.removeEventListener("focusin",S,!0),u.removeEventListener("focusout",S,!0)}},[u,o,x]),A.useEffect(()=>{u&&(v||gy(u))},[v,u]),y.jsxs(o0.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:p,afterOutsideRef:h,beforeInsideRef:b,afterInsideRef:g,portalNode:u,setFocusManagerState:f}),[o,u]),children:[w&&u&&y.jsx(eu,{"data-type":"outside",ref:p,onFocus:S=>{if(Ha(S,u)){var N;(N=b.current)==null||N.focus()}else{const E=c?c.domReference:null,C=J1(E);C?.focus()}}}),w&&u&&y.jsx("span",{"aria-owns":u.id,style:B3}),u&&Nh.createPortal(r,u),w&&u&&y.jsx(eu,{"data-type":"outside",ref:h,onFocus:S=>{if(Ha(S,u)){var N;(N=g.current)==null||N.focus()}else{const E=c?c.domReference:null,C=Q1(E);C?.focus(),c?.closeOnFocusOut&&c?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const s0=()=>A.useContext(o0);function _y(e){return A.useMemo(()=>r=>{e.forEach(i=>{i&&(i.current=r)})},e)}const Ly=20;let oi=[];function _h(){oi=oi.filter(e=>{var r;return(r=e.deref())==null?void 0:r.isConnected})}function H3(e){_h(),e&&ci(e)!=="body"&&(oi.push(new WeakRef(e)),oi.length>Ly&&(oi=oi.slice(-Ly)))}function Dy(){_h();const e=oi[oi.length-1];return e?.deref()}function q3(e){const r=ro();return V1(e,r)?e:Au(e,r)[0]||e}function Oy(e,r){var i;if(!r.current.includes("floating")&&!((i=e.getAttribute("role"))!=null&&i.includes("dialog")))return;const l=ro(),u=zC(e,l).filter(f=>{const p=f.getAttribute("data-tabindex")||"";return V1(f,l)||f.hasAttribute("data-tabindex")&&!p.startsWith("-")}),c=e.getAttribute("tabindex");r.current.includes("floating")||u.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const $3=A.forwardRef(function(r,i){return y.jsx("button",{...r,type:"button",ref:i,tabIndex:-1,style:jh})});function P3(e){const{context:r,children:i,disabled:l=!1,order:o=["content"],guards:u=!0,initialFocus:c=0,returnFocus:f=!0,restoreFocus:p=!1,modal:h=!0,visuallyHiddenDismiss:b=!1,closeOnFocusOut:g=!0,outsideElementsInert:x=!1,getInsideElements:v=()=>[]}=e,{open:w,onOpenChange:S,events:N,dataRef:E,elements:{domReference:C,floating:j}}=r,O=sn(()=>{var de;return(de=E.current.floatingContext)==null?void 0:de.nodeId}),U=sn(v),_=typeof c=="number"&&c<0,F=py(C)&&_,z=z3(),H=z?u:!0,M=!H||z&&x,P=qn(o),V=qn(c),J=qn(f),I=Ru(),Z=s0(),B=A.useRef(null),Y=A.useRef(null),X=A.useRef(!1),q=A.useRef(!1),R=A.useRef(-1),D=A.useRef(-1),$=Z!=null,T=Gd(j),W=sn(function(de){return de===void 0&&(de=T),de?Au(de,ro()):[]}),te=sn(de=>{const ye=W(de);return P.current.map(we=>C&&we==="reference"?C:T&&we==="floating"?T:ye).filter(Boolean).flat()});A.useEffect(()=>{if(l||!h)return;function de(we){if(we.key==="Tab"){$t(T,li(Pt(T)))&&W().length===0&&!F&&nd(we);const je=te(),Ye=kr(we);P.current[0]==="reference"&&Ye===C&&(nd(we),we.shiftKey?El(je[je.length-1]):El(je[1])),P.current[1]==="floating"&&Ye===T&&we.shiftKey&&(nd(we),El(je[0]))}}const ye=Pt(T);return ye.addEventListener("keydown",de),()=>{ye.removeEventListener("keydown",de)}},[l,C,T,h,P,F,W,te]),A.useEffect(()=>{if(l||!j)return;function de(ye){const we=kr(ye),Ye=W().indexOf(we);Ye!==-1&&(R.current=Ye)}return j.addEventListener("focusin",de),()=>{j.removeEventListener("focusin",de)}},[l,j,W]),A.useEffect(()=>{if(l||!g)return;function de(){q.current=!0,setTimeout(()=>{q.current=!1})}function ye(Ye){const Ie=Ye.relatedTarget,It=Ye.currentTarget,at=kr(Ye);queueMicrotask(()=>{const pt=O(),Bt=!($t(C,Ie)||$t(j,Ie)||$t(Ie,j)||$t(Z?.portalNode,Ie)||Ie!=null&&Ie.hasAttribute(Mi("focus-guard"))||I&&(_l(I.nodesRef.current,pt).find(Jt=>{var Ut,Fe;return $t((Ut=Jt.context)==null?void 0:Ut.elements.floating,Ie)||$t((Fe=Jt.context)==null?void 0:Fe.elements.domReference,Ie)})||my(I.nodesRef.current,pt).find(Jt=>{var Ut,Fe,tr;return[(Ut=Jt.context)==null?void 0:Ut.elements.floating,Gd((Fe=Jt.context)==null?void 0:Fe.elements.floating)].includes(Ie)||((tr=Jt.context)==null?void 0:tr.elements.domReference)===Ie})));if(It===C&&T&&Oy(T,P),p&&It!==C&&!(at!=null&&at.isConnected)&&li(Pt(T))===Pt(T).body){Tt(T)&&T.focus();const Jt=R.current,Ut=W(),Fe=Ut[Jt]||Ut[Ut.length-1]||T;Tt(Fe)&&Fe.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(F||!h)&&Ie&&Bt&&!q.current&&Ie!==Dy()&&(X.current=!0,S(!1,Ye,"focus-out"))})}const we=!!(!I&&Z);function je(){Zt(D),E.current.insideReactTree=!0,D.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(j&&Tt(C))return C.addEventListener("focusout",ye),C.addEventListener("pointerdown",de),j.addEventListener("focusout",ye),we&&j.addEventListener("focusout",je,!0),()=>{C.removeEventListener("focusout",ye),C.removeEventListener("pointerdown",de),j.removeEventListener("focusout",ye),we&&j.removeEventListener("focusout",je,!0)}},[l,C,j,T,h,I,Z,S,g,p,W,F,O,P,E]);const ce=A.useRef(null),me=A.useRef(null),xe=_y([ce,Z?.beforeInsideRef]),ge=_y([me,Z?.afterInsideRef]);A.useEffect(()=>{var de,ye;if(l||!j)return;const we=Array.from((Z==null||(de=Z.portalNode)==null?void 0:de.querySelectorAll("["+Mi("portal")+"]"))||[]),Ye=(ye=(I?my(I.nodesRef.current,O()):[]).find(at=>{var pt;return py(((pt=at.context)==null?void 0:pt.elements.domReference)||null)}))==null||(ye=ye.context)==null?void 0:ye.elements.domReference,Ie=[j,Ye,...we,...U(),B.current,Y.current,ce.current,me.current,Z?.beforeOutsideRef.current,Z?.afterOutsideRef.current,P.current.includes("reference")||F?C:null].filter(at=>at!=null),It=h||F?Ry(Ie,!M,M):Ry(Ie);return()=>{It()}},[l,C,j,h,P,Z,F,H,M,I,O,U]),Vt(()=>{if(l||!Tt(T))return;const de=Pt(T),ye=li(de);queueMicrotask(()=>{const we=te(T),je=V.current,Ye=(typeof je=="number"?we[je]:je.current)||T,Ie=$t(T,ye);!_&&!Ie&&w&&El(Ye,{preventScroll:Ye===T})})},[l,w,T,_,te,V]),Vt(()=>{if(l||!T)return;const de=Pt(T),ye=li(de);H3(ye);function we(Ie){let{reason:It,event:at,nested:pt}=Ie;if(["hover","safe-polygon"].includes(It)&&at.type==="mouseleave"&&(X.current=!0),It==="outside-press")if(pt)X.current=!1;else if(qC(at)||$C(at))X.current=!1;else{let Bt=!1;document.createElement("div").focus({get preventScroll(){return Bt=!0,!1}}),Bt?X.current=!1:X.current=!0}}N.on("openchange",we);const je=de.createElement("span");je.setAttribute("tabindex","-1"),je.setAttribute("aria-hidden","true"),Object.assign(je.style,jh),$&&C&&C.insertAdjacentElement("afterend",je);function Ye(){if(typeof J.current=="boolean"){const Ie=C||Dy();return Ie&&Ie.isConnected?Ie:je}return J.current.current||je}return()=>{N.off("openchange",we);const Ie=li(de),It=$t(j,Ie)||I&&_l(I.nodesRef.current,O(),!1).some(pt=>{var Bt;return $t((Bt=pt.context)==null?void 0:Bt.elements.floating,Ie)}),at=Ye();queueMicrotask(()=>{const pt=q3(at);J.current&&!X.current&&Tt(pt)&&(!(pt!==Ie&&Ie!==de.body)||It)&&pt.focus({preventScroll:!0}),je.remove()})}},[l,j,T,J,E,N,I,$,C,O]),A.useEffect(()=>(queueMicrotask(()=>{X.current=!1}),()=>{queueMicrotask(_h)}),[l]),Vt(()=>{if(!l&&Z)return Z.setFocusManagerState({modal:h,closeOnFocusOut:g,open:w,onOpenChange:S,domReference:C}),()=>{Z.setFocusManagerState(null)}},[l,Z,h,w,S,g,C]),Vt(()=>{l||T&&Oy(T,P)},[l,T,P]);function ve(de){return l||!b||!h?null:y.jsx($3,{ref:de==="start"?B:Y,onClick:ye=>S(!1,ye.nativeEvent),children:typeof b=="string"?b:"Dismiss"})}const Ee=!l&&H&&(h?!F:!0)&&($||h);return y.jsxs(y.Fragment,{children:[Ee&&y.jsx(eu,{"data-type":"inside",ref:xe,onFocus:de=>{if(h){const we=te();El(o[0]==="reference"?we[0]:we[we.length-1])}else if(Z!=null&&Z.preserveTabOrder&&Z.portalNode)if(X.current=!1,Ha(de,Z.portalNode)){const we=Q1(C);we?.focus()}else{var ye;(ye=Z.beforeOutsideRef.current)==null||ye.focus()}}}),!F&&ve("start"),i,ve("end"),Ee&&y.jsx(eu,{"data-type":"inside",ref:ge,onFocus:de=>{if(h)El(te()[0]);else if(Z!=null&&Z.preserveTabOrder&&Z.portalNode)if(g&&(X.current=!0),Ha(de,Z.portalNode)){const we=J1(C);we?.focus()}else{var ye;(ye=Z.afterOutsideRef.current)==null||ye.focus()}}})]})}function My(e){return Tt(e.target)&&e.target.tagName==="BUTTON"}function V3(e){return Tt(e.target)&&e.target.tagName==="A"}function zy(e){return Ch(e)}function Yd(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,dataRef:o,elements:{domReference:u}}=e,{enabled:c=!0,event:f="click",toggle:p=!0,ignoreMouse:h=!1,keyboardHandlers:b=!0,stickIfOpen:g=!0}=r,x=A.useRef(),v=A.useRef(!1),w=A.useMemo(()=>({onPointerDown(S){x.current=S.pointerType},onMouseDown(S){const N=x.current;S.button===0&&f!=="click"&&(Ka(N,!0)&&h||(i&&p&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="mousedown")?l(!1,S.nativeEvent,"click"):(S.preventDefault(),l(!0,S.nativeEvent,"click"))))},onClick(S){const N=x.current;if(f==="mousedown"&&x.current){x.current=void 0;return}Ka(N,!0)&&h||(i&&p&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="click")?l(!1,S.nativeEvent,"click"):l(!0,S.nativeEvent,"click"))},onKeyDown(S){x.current=void 0,!(S.defaultPrevented||!b||My(S))&&(S.key===" "&&!zy(u)&&(S.preventDefault(),v.current=!0),!V3(S)&&S.key==="Enter"&&l(!(i&&p),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!b||My(S)||zy(u)||S.key===" "&&v.current&&(v.current=!1,l(!(i&&p),S.nativeEvent,"click"))}}),[o,u,f,h,b,l,i,g,p]);return A.useMemo(()=>c?{reference:w}:{},[c,w])}const G3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Y3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Fy=e=>{var r,i;return{escapeKey:typeof e=="boolean"?e:(r=e?.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(i=e?.outsidePress)!=null?i:!0}};function nu(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,elements:o,dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:h="pointerdown",referencePress:b=!1,referencePressEvent:g="pointerdown",ancestorScroll:x=!1,bubbles:v,capture:w}=r,S=Ru(),N=sn(typeof p=="function"?p:()=>!1),E=typeof p=="function"?N:p,C=A.useRef(!1),{escapeKey:j,outsidePress:O}=Fy(v),{escapeKey:U,outsidePress:_}=Fy(w),F=A.useRef(!1),z=sn(I=>{var Z;if(!i||!c||!f||I.key!=="Escape"||F.current)return;const B=(Z=u.current.floatingContext)==null?void 0:Z.nodeId,Y=S?_l(S.nodesRef.current,B):[];if(!j&&(I.stopPropagation(),Y.length>0)){let X=!0;if(Y.forEach(q=>{var R;if((R=q.context)!=null&&R.open&&!q.context.dataRef.current.__escapeKeyBubbles){X=!1;return}}),!X)return}l(!1,HC(I)?I.nativeEvent:I,"escape-key")}),H=sn(I=>{var Z;const B=()=>{var Y;z(I),(Y=kr(I))==null||Y.removeEventListener("keydown",B)};(Z=kr(I))==null||Z.addEventListener("keydown",B)}),M=sn(I=>{var Z;const B=u.current.insideReactTree;u.current.insideReactTree=!1;const Y=C.current;if(C.current=!1,h==="click"&&Y||B||typeof E=="function"&&!E(I))return;const X=kr(I),q="["+Mi("inert")+"]",R=Pt(o.floating).querySelectorAll(q);let D=ct(X)?X:null;for(;D&&!Cr(D);){const te=Nr(D);if(Cr(te)||!ct(te))break;D=te}if(R.length&&ct(X)&&!BC(X)&&!$t(X,o.floating)&&Array.from(R).every(te=>!$t(D,te)))return;if(Tt(X)&&J){const te=Cr(X),ce=Fn(X),me=/auto|scroll/,xe=te||me.test(ce.overflowX),ge=te||me.test(ce.overflowY),ve=xe&&X.clientWidth>0&&X.scrollWidth>X.clientWidth,Ee=ge&&X.clientHeight>0&&X.scrollHeight>X.clientHeight,de=ce.direction==="rtl",ye=Ee&&(de?I.offsetX<=X.offsetWidth-X.clientWidth:I.offsetX>X.clientWidth),we=ve&&I.offsetY>X.clientHeight;if(ye||we)return}const $=(Z=u.current.floatingContext)==null?void 0:Z.nodeId,T=S&&_l(S.nodesRef.current,$).some(te=>{var ce;return td(I,(ce=te.context)==null?void 0:ce.elements.floating)});if(td(I,o.floating)||td(I,o.domReference)||T)return;const W=S?_l(S.nodesRef.current,$):[];if(W.length>0){let te=!0;if(W.forEach(ce=>{var me;if((me=ce.context)!=null&&me.open&&!ce.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}l(!1,I,"outside-press")}),P=sn(I=>{var Z;const B=()=>{var Y;M(I),(Y=kr(I))==null||Y.removeEventListener(h,B)};(Z=kr(I))==null||Z.addEventListener(h,B)});A.useEffect(()=>{if(!i||!c)return;u.current.__escapeKeyBubbles=j,u.current.__outsidePressBubbles=O;let I=-1;function Z(R){l(!1,R,"ancestor-scroll")}function B(){window.clearTimeout(I),F.current=!0}function Y(){I=window.setTimeout(()=>{F.current=!1},ku()?5:0)}const X=Pt(o.floating);f&&(X.addEventListener("keydown",U?H:z,U),X.addEventListener("compositionstart",B),X.addEventListener("compositionend",Y)),E&&X.addEventListener(h,_?P:M,_);let q=[];return x&&(ct(o.domReference)&&(q=ui(o.domReference)),ct(o.floating)&&(q=q.concat(ui(o.floating))),!ct(o.reference)&&o.reference&&o.reference.contextElement&&(q=q.concat(ui(o.reference.contextElement)))),q=q.filter(R=>{var D;return R!==((D=X.defaultView)==null?void 0:D.visualViewport)}),q.forEach(R=>{R.addEventListener("scroll",Z,{passive:!0})}),()=>{f&&(X.removeEventListener("keydown",U?H:z,U),X.removeEventListener("compositionstart",B),X.removeEventListener("compositionend",Y)),E&&X.removeEventListener(h,_?P:M,_),q.forEach(R=>{R.removeEventListener("scroll",Z)}),window.clearTimeout(I)}},[u,o,f,E,h,i,l,x,c,j,O,z,U,H,M,_,P]),A.useEffect(()=>{u.current.insideReactTree=!1},[u,E,h]);const V=A.useMemo(()=>({onKeyDown:z,...b&&{[G3[g]]:I=>{l(!1,I.nativeEvent,"reference-press")},...g!=="click"&&{onClick(I){l(!1,I.nativeEvent,"reference-press")}}}}),[z,l,b,g]),J=A.useMemo(()=>{function I(Z){Z.button===0&&(C.current=!0)}return{onKeyDown:z,onMouseDown:I,onMouseUp:I,[Y3[h]]:()=>{u.current.insideReactTree=!0}}},[z,h,u]);return A.useMemo(()=>c?{reference:V,floating:J}:{},[c,V,J])}function X3(e){const{open:r=!1,onOpenChange:i,elements:l}=e,o=Th(),u=A.useRef({}),[c]=A.useState(()=>_3()),f=Rh()!=null,[p,h]=A.useState(l.reference),b=sn((v,w,S)=>{u.current.openEvent=v?w:void 0,c.emit("openchange",{open:v,event:w,reason:S,nested:f}),i?.(v,w,S)}),g=A.useMemo(()=>({setPositionReference:h}),[]),x=A.useMemo(()=>({reference:p||l.reference||null,floating:l.floating||null,domReference:l.reference}),[p,l.reference,l.floating]);return A.useMemo(()=>({dataRef:u,open:r,onOpenChange:b,elements:x,events:c,floatingId:o,refs:g}),[r,b,x,c,o,g])}function ru(e){e===void 0&&(e={});const{nodeId:r}=e,i=X3({...e,elements:{reference:null,floating:null,...e.elements}}),l=e.rootContext||i,o=l.elements,[u,c]=A.useState(null),[f,p]=A.useState(null),b=o?.domReference||u,g=A.useRef(null),x=Ru();Vt(()=>{b&&(g.current=b)},[b]);const v=C3({...e,elements:{...o,...f&&{reference:f}}}),w=A.useCallback(j=>{const O=ct(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;p(O),v.refs.setReference(O)},[v.refs]),S=A.useCallback(j=>{(ct(j)||j===null)&&(g.current=j,c(j)),(ct(v.refs.reference.current)||v.refs.reference.current===null||j!==null&&!ct(j))&&v.refs.setReference(j)},[v.refs]),N=A.useMemo(()=>({...v.refs,setReference:S,setPositionReference:w,domReference:g}),[v.refs,S,w]),E=A.useMemo(()=>({...v.elements,domReference:b}),[v.elements,b]),C=A.useMemo(()=>({...v,...l,refs:N,elements:E,nodeId:r}),[v,N,E,r,l]);return Vt(()=>{l.dataRef.current.floatingContext=C;const j=x?.nodesRef.current.find(O=>O.id===r);j&&(j.context=C)}),A.useMemo(()=>({...v,context:C,refs:N,elements:E}),[v,N,E,C])}function ud(){return FC()&&X1()}function u0(e,r){r===void 0&&(r={});const{open:i,onOpenChange:l,events:o,dataRef:u,elements:c}=e,{enabled:f=!0,visibleOnly:p=!0}=r,h=A.useRef(!1),b=A.useRef(-1),g=A.useRef(!0);A.useEffect(()=>{if(!f)return;const v=un(c.domReference);function w(){!i&&Tt(c.domReference)&&c.domReference===li(Pt(c.domReference))&&(h.current=!0)}function S(){g.current=!0}function N(){g.current=!1}return v.addEventListener("blur",w),ud()&&(v.addEventListener("keydown",S,!0),v.addEventListener("pointerdown",N,!0)),()=>{v.removeEventListener("blur",w),ud()&&(v.removeEventListener("keydown",S,!0),v.removeEventListener("pointerdown",N,!0))}},[c.domReference,i,f]),A.useEffect(()=>{if(!f)return;function v(w){let{reason:S}=w;(S==="reference-press"||S==="escape-key")&&(h.current=!0)}return o.on("openchange",v),()=>{o.off("openchange",v)}},[o,f]),A.useEffect(()=>()=>{Zt(b)},[]);const x=A.useMemo(()=>({onMouseLeave(){h.current=!1},onFocus(v){if(h.current)return;const w=kr(v.nativeEvent);if(p&&ct(w)){if(ud()&&!v.relatedTarget){if(!g.current&&!Ch(w))return}else if(!UC(w))return}l(!0,v.nativeEvent,"focus")},onBlur(v){h.current=!1;const w=v.relatedTarget,S=v.nativeEvent,N=ct(w)&&w.hasAttribute(Mi("focus-guard"))&&w.getAttribute("data-type")==="outside";b.current=window.setTimeout(()=>{var E;const C=li(c.domReference?c.domReference.ownerDocument:document);!w&&C===c.domReference||$t((E=u.current.floatingContext)==null?void 0:E.refs.floating.current,C)||$t(c.domReference,C)||N||l(!1,S,"focus")})}}),[u,c.domReference,l,p]);return A.useMemo(()=>f?{reference:x}:{},[f,x])}function cd(e,r,i){const l=new Map,o=i==="item";let u=e;if(o&&e){const{[Sy]:c,[ky]:f,...p}=e;u=p}return{...i==="floating"&&{tabIndex:-1,[N3]:""},...u,...r.map(c=>{const f=c?c[i]:null;return typeof f=="function"?e?f(e):null:f}).concat(e).reduce((c,f)=>(f&&Object.entries(f).forEach(p=>{let[h,b]=p;if(!(o&&[Sy,ky].includes(h)))if(h.indexOf("on")===0){if(l.has(h)||l.set(h,[]),typeof b=="function"){var g;(g=l.get(h))==null||g.push(b),c[h]=function(){for(var x,v=arguments.length,w=new Array(v),S=0;S<v;S++)w[S]=arguments[S];return(x=l.get(h))==null?void 0:x.map(N=>N(...w)).find(N=>N!==void 0)}}}else c[h]=b}),c),{})}}function iu(e){e===void 0&&(e=[]);const r=e.map(f=>f?.reference),i=e.map(f=>f?.floating),l=e.map(f=>f?.item),o=A.useCallback(f=>cd(f,e,"reference"),r),u=A.useCallback(f=>cd(f,e,"floating"),i),c=A.useCallback(f=>cd(f,e,"item"),l);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:u,getItemProps:c}),[o,u,c])}const Z3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function lu(e,r){var i,l;r===void 0&&(r={});const{open:o,elements:u,floatingId:c}=e,{enabled:f=!0,role:p="dialog"}=r,h=Th(),b=((i=u.domReference)==null?void 0:i.id)||h,g=A.useMemo(()=>{var C;return((C=Gd(u.floating))==null?void 0:C.id)||c},[u.floating,c]),x=(l=Z3.get(p))!=null?l:p,w=Rh()!=null,S=A.useMemo(()=>x==="tooltip"||p==="label"?{["aria-"+(p==="label"?"labelledby":"describedby")]:o?g:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":x==="alertdialog"?"dialog":x,"aria-controls":o?g:void 0,...x==="listbox"&&{role:"combobox"},...x==="menu"&&{id:b},...x==="menu"&&w&&{role:"menuitem"},...p==="select"&&{"aria-autocomplete":"none"},...p==="combobox"&&{"aria-autocomplete":"list"}},[x,g,w,o,b,p]),N=A.useMemo(()=>{const C={id:g,...x&&{role:x}};return x==="tooltip"||p==="label"?C:{...C,...x==="menu"&&{"aria-labelledby":b}}},[x,g,b,p]),E=A.useCallback(C=>{let{active:j,selected:O}=C;const U={role:"option",...j&&{id:g+"-fui-option"}};switch(p){case"select":case"combobox":return{...U,"aria-selected":O}}return{}},[g,p]);return A.useMemo(()=>f?{reference:S,floating:N,item:E}:{},[f,S,N,E])}const Iy=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(r,i)=>(i?"-":"")+r.toLowerCase());function Cl(e,r){return typeof e=="function"?e(r):e}function K3(e,r){const[i,l]=A.useState(e);return e&&!i&&l(!0),A.useEffect(()=>{if(!e&&i){const o=setTimeout(()=>l(!1),r);return()=>clearTimeout(o)}},[e,i,r]),i}function Q3(e,r){r===void 0&&(r={});const{open:i,elements:{floating:l}}=e,{duration:o=250}=r,c=(typeof o=="number"?o:o.close)||0,[f,p]=A.useState("unmounted"),h=K3(i,c);return!h&&f==="close"&&p("unmounted"),Vt(()=>{if(l){if(i){p("initial");const b=requestAnimationFrame(()=>{Nh.flushSync(()=>{p("open")})});return()=>{cancelAnimationFrame(b)}}p("close")}},[i,l]),{isMounted:h,status:f}}function J3(e,r){r===void 0&&(r={});const{initial:i={opacity:0},open:l,close:o,common:u,duration:c=250}=r,f=e.placement,p=f.split("-")[0],h=A.useMemo(()=>({side:p,placement:f}),[p,f]),b=typeof c=="number",g=(b?c:c.open)||0,x=(b?c:c.close)||0,[v,w]=A.useState(()=>({...Cl(u,h),...Cl(i,h)})),{isMounted:S,status:N}=Q3(e,{duration:c}),E=qn(i),C=qn(l),j=qn(o),O=qn(u);return Vt(()=>{const U=Cl(E.current,h),_=Cl(j.current,h),F=Cl(O.current,h),z=Cl(C.current,h)||Object.keys(U).reduce((H,M)=>(H[M]="",H),{});if(N==="initial"&&w(H=>({transitionProperty:H.transitionProperty,...F,...U})),N==="open"&&w({transitionProperty:Object.keys(z).map(Iy).join(","),transitionDuration:g+"ms",...F,...z}),N==="close"){const H=_||U;w({transitionProperty:Object.keys(H).map(Iy).join(","),transitionDuration:x+"ms",...F,...H})}},[x,j,E,C,O,g,N,h]),{isMounted:S,styles:v}}function c0(e,r,i){return i===void 0&&(i=!0),e.filter(o=>{var u;return o.parentId===r&&(!i||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,...c0(e,o.id,i)])}function By(e,r){const[i,l]=e;let o=!1;const u=r.length;for(let c=0,f=u-1;c<u;f=c++){const[p,h]=r[c]||[0,0],[b,g]=r[f]||[0,0];h>=l!=g>=l&&i<=(b-p)*(l-h)/(g-h)+p&&(o=!o)}return o}function W3(e,r){return e[0]>=r.x&&e[0]<=r.x+r.width&&e[1]>=r.y&&e[1]<=r.y+r.height}function Xd(e){e===void 0&&(e={});const{buffer:r=.5,blockPointerEvents:i=!1,requireIntent:l=!0}=e,o={current:-1};let u=!1,c=null,f=null,p=typeof performance<"u"?performance.now():0;function h(g,x){const v=performance.now(),w=v-p;if(c===null||f===null||w===0)return c=g,f=x,p=v,null;const S=g-c,N=x-f,C=Math.sqrt(S*S+N*N)/w;return c=g,f=x,p=v,C}const b=g=>{let{x,y:v,placement:w,elements:S,onClose:N,nodeId:E,tree:C}=g;return function(O){function U(){Zt(o),N()}if(Zt(o),!S.domReference||!S.floating||w==null||x==null||v==null)return;const{clientX:_,clientY:F}=O,z=[_,F],H=O3(O),M=O.type==="mouseleave",P=od(S.floating,H),V=od(S.domReference,H),J=S.domReference.getBoundingClientRect(),I=S.floating.getBoundingClientRect(),Z=w.split("-")[0],B=x>I.right-I.width/2,Y=v>I.bottom-I.height/2,X=W3(z,J),q=I.width>J.width,R=I.height>J.height,D=(q?J:I).left,$=(q?J:I).right,T=(R?J:I).top,W=(R?J:I).bottom;if(P&&(u=!0,!M))return;if(V&&(u=!1),V&&!M){u=!0;return}if(M&&ct(O.relatedTarget)&&od(S.floating,O.relatedTarget)||C&&c0(C.nodesRef.current,E).length)return;if(Z==="top"&&v>=J.bottom-1||Z==="bottom"&&v<=J.top+1||Z==="left"&&x>=J.right-1||Z==="right"&&x<=J.left+1)return U();let te=[];switch(Z){case"top":te=[[D,J.top+1],[D,I.bottom-1],[$,I.bottom-1],[$,J.top+1]];break;case"bottom":te=[[D,I.top+1],[D,J.bottom-1],[$,J.bottom-1],[$,I.top+1]];break;case"left":te=[[I.right-1,W],[I.right-1,T],[J.left+1,T],[J.left+1,W]];break;case"right":te=[[J.right-1,W],[J.right-1,T],[I.left+1,T],[I.left+1,W]];break}function ce(me){let[xe,ge]=me;switch(Z){case"top":{const ve=[q?xe+r/2:B?xe+r*4:xe-r*4,ge+r+1],Ee=[q?xe-r/2:B?xe+r*4:xe-r*4,ge+r+1],de=[[I.left,B||q?I.bottom-r:I.top],[I.right,B?q?I.bottom-r:I.top:I.bottom-r]];return[ve,Ee,...de]}case"bottom":{const ve=[q?xe+r/2:B?xe+r*4:xe-r*4,ge-r],Ee=[q?xe-r/2:B?xe+r*4:xe-r*4,ge-r],de=[[I.left,B||q?I.top+r:I.bottom],[I.right,B?q?I.top+r:I.bottom:I.top+r]];return[ve,Ee,...de]}case"left":{const ve=[xe+r+1,R?ge+r/2:Y?ge+r*4:ge-r*4],Ee=[xe+r+1,R?ge-r/2:Y?ge+r*4:ge-r*4];return[...[[Y||R?I.right-r:I.left,I.top],[Y?R?I.right-r:I.left:I.right-r,I.bottom]],ve,Ee]}case"right":{const ve=[xe-r,R?ge+r/2:Y?ge+r*4:ge-r*4],Ee=[xe-r,R?ge-r/2:Y?ge+r*4:ge-r*4],de=[[Y||R?I.left+r:I.right,I.top],[Y?R?I.left+r:I.right:I.left+r,I.bottom]];return[ve,Ee,...de]}}}if(!By([_,F],te)){if(u&&!X)return U();if(!M&&l){const me=h(O.clientX,O.clientY);if(me!==null&&me<.1)return U()}By([_,F],ce([x,v]))?!u&&l&&(o.current=window.setTimeout(U,40)):U()}}};return b.__options={blockPointerEvents:i},b}const e4={".":"Uncommitted Changes",staged:"Staging Area",working:"Working Directory"},t4=new Set([".","staged","working"]),n4=e=>{const r=!e||t4.has(e)?"HEAD":`${e}^`;return{base:`${r}^`,target:r}},Uy=(e,r)=>!!r&&e===`${r}^`,As=(e,r)=>e?e===r.shortHash||e===r.hash:!1,Hy=(e,r)=>r?`${e.shortHash}^`:e.shortHash,qy=(e,r,i)=>{if(!r)return"Select...";const l=r.endsWith("^"),o=l?r.slice(0,-1):r;if(o.startsWith("HEAD"))return r;const u=e4[r];if(u)return u;const c=e.specialOptions.find(h=>h.value===r);if(c)return c.label;const f=e.branches.find(h=>h.name===o);if(f)return l?`${f.name}^`:f.name;const p=e.commits.find(h=>h.shortHash===o||h.hash===o);if(p)return Hy(p,l);if(i){const h=e.commits.find(b=>b.shortHash===i||b.hash===i);if(h)return Hy(h,!1)}return r};function r4({options:e,baseRevision:r,targetRevision:i,resolvedBaseRevision:l,resolvedTargetRevision:o,onSelectDiff:u,onOpenAdvanced:c,compact:f=!1}){const[p,h]=A.useState(!1),[b,g]=A.useState(!1),x=f,{refs:v,floatingStyles:w,context:S}=ru({open:p||b,onOpenChange:te=>{!te&&b||h(te)},placement:"bottom-end",middleware:[Ks(6),Js(),Qs({padding:8})],whileElementsMounted:Xs}),N=Ws(S,{handleClose:Xd()}),E=Yd(S),C=nu(S),j=lu(S,{role:"menu"}),{getReferenceProps:O,getFloatingProps:U}=iu([N,E,C,j]),{refs:_,floatingStyles:F,context:z}=ru({open:b,onOpenChange:te=>{te&&h(!0),g(te)},placement:"left-start",middleware:[Ks(0),Js(),Qs({padding:8})],whileElementsMounted:Xs}),H=Ws(z,{handleClose:Xd()}),M=Yd(z),P=nu(z),V=lu(z,{role:"menu"}),{getReferenceProps:J,getFloatingProps:I}=iu([H,M,P,V]);A.useEffect(()=>{p||g(!1)},[p]);const Z=A.useMemo(()=>{const te=Uy(r,i),ce=e.commits.find(ge=>te?As(i,ge)||As(o,ge):!1);if(ce)return`${ce.shortHash} ${ce.message}`;const me=qy(e,r,l),xe=qy(e,i,o);return`${me}...${xe}`},[e,r,i,l,o]),B=A.useMemo(()=>e.branches.find(te=>te.name==="main")||e.branches.find(te=>te.name==="master"),[e.branches]),Y=!!B,X=A.useMemo(()=>({base:"HEAD^",target:"HEAD"}),[]),q=A.useMemo(()=>n4(i),[i]),R=(te,ce)=>{u(te,ce),g(!1),h(!1)},D=()=>{g(!1),h(!1),c()},$=(te,ce)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",te?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",te?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",ce?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),T=(te,ce)=>r===te&&i===ce,W=te=>Uy(r,i)?As(i,te)||As(o,te):!1;return y.jsxs("div",{className:"relative",children:[y.jsx("button",{ref:v.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"menu","aria-expanded":p,"aria-label":`Revision menu: ${Z}`,title:Z,...O(),children:x?y.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx(sk,{size:14,className:"text-github-text-secondary"}),y.jsx(Ml,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]}):y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary",children:Z}),y.jsx(Ml,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})}),p&&y.jsx(tu,{children:y.jsxs("div",{ref:v.setFloating,style:w,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto",...U(),children:[y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Quick Diffs"}),y.jsx("button",{onClick:()=>R("HEAD","."),className:$(T("HEAD","."),!1),children:"HEAD...Uncommitted"}),Y&&B&&y.jsx(y.Fragment,{children:y.jsxs("button",{onClick:()=>R(B.name,"."),className:$(T(B.name,"."),!1),children:[B.name,"...Uncommitted"]})}),y.jsx("button",{onClick:()=>R(X.base,X.target),className:$(T(X.base,X.target),!1),children:"HEAD"})]}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{onClick:()=>R(q.base,q.target),className:$(T(q.base,q.target),!1),type:"button",children:"Previous commit"})}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{ref:e.commits.length>0?_.setReference:void 0,className:$(!1,e.commits.length===0),...e.commits.length>0?J():{},disabled:e.commits.length===0,type:"button",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(F2,{size:12,className:"text-github-text-secondary"}),y.jsx("span",{children:"Pick Commit..."})]})})}),y.jsx("div",{children:y.jsx("button",{onClick:D,className:$(!1,!1),type:"button",children:"Detailed..."})})]})}),b&&e.commits.length>0&&y.jsx(tu,{children:y.jsxs("div",{ref:_.setFloating,style:F,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto",...I(),children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),e.commits.map(te=>y.jsx("button",{onClick:()=>R(`${te.shortHash}^`,te.shortHash),className:$(W(te),!1),type:"button",children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:te.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:te.message})]})},te.hash))]})})]})}const i4=["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"];function l4(e){if(!e)return!1;const r=to(e);return r?i4.includes(r):!1}const a4=["md","markdown"];function o4(e){if(!e)return!1;const r=to(e);return r?a4.includes(r):!1}const s4=["ipynb"];function u4(e){if(!e)return!1;const r=to(e);return r?s4.includes(r):!1}function c4({file:e,diffMode:r,baseCommitish:i,targetCommitish:l}){const o=r??eo,u=e.status==="deleted",c=e.status==="added",f=e.status==="modified"||e.status==="renamed",p=i||"HEAD~1",h=l||"HEAD",[b,g]=A.useState({}),[x,v]=A.useState({}),w=async(C,j)=>{try{const O=C.naturalWidth,U=C.naturalHeight,z=(await(await fetch(C.src)).blob()).size;j({width:O,height:U,size:z})}catch(O){console.error("Failed to get image info:",O)}},S=C=>C?C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/(1024*1024)).toFixed(1)} MB`:"",N=C=>!C.width||!C.height?"":`W: ${C.width}px | H: ${C.height}px`,E={backgroundImage:`
27
- linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
28
- linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
29
- `,backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px",backgroundColor:"white"};return u?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-danger font-medium",children:"Deleted Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${p}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,g),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(b),N(b)&&S(b.size)&&" | ",S(b.size)]})]})]})}):c?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-accent font-medium",children:"Added Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"New file:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${h}`,alt:`New image ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,v),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(x.width||x.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(x),N(x)&&S(x.size)&&" | ",S(x.size)]})]})]})}):f?o==="split"?y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${p}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,g),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(b),N(b)&&S(b.size)&&" | ",S(b.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${h}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,v),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(x.width||x.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(x),N(x)&&S(x.size)&&" | ",S(x.size)]})]})})]})]}):y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${p}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,g),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(b),N(b)&&S(b.size)&&" | ",S(b.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${h}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,v),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(x.width||x.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(x),N(x)&&S(x.size)&&" | ",S(x.size)]})]})})]})]}):null}function f4(e,r){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const d4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,p4={};function $y(e,r){return(p4.jsx?h4:d4).test(e)}const m4=/[ \t\n\f\r]/g;function g4(e){return typeof e=="object"?e.type==="text"?Py(e.value):!1:Py(e)}function Py(e){return e.replace(m4,"")===""}class io{constructor(r,i,l){this.normal=i,this.property=r,l&&(this.space=l)}}io.prototype.normal={};io.prototype.property={};io.prototype.space=void 0;function f0(e,r){const i={},l={};for(const o of e)Object.assign(i,o.property),Object.assign(l,o.normal);return new io(i,l,r)}function Zd(e){return e.toLowerCase()}class cn{constructor(r,i){this.attribute=i,this.property=r}}cn.prototype.attribute="";cn.prototype.booleanish=!1;cn.prototype.boolean=!1;cn.prototype.commaOrSpaceSeparated=!1;cn.prototype.commaSeparated=!1;cn.prototype.defined=!1;cn.prototype.mustUseProperty=!1;cn.prototype.number=!1;cn.prototype.overloadedBoolean=!1;cn.prototype.property="";cn.prototype.spaceSeparated=!1;cn.prototype.space=void 0;let b4=0;const Me=Fi(),Et=Fi(),Kd=Fi(),he=Fi(),ut=Fi(),Ol=Fi(),Sn=Fi();function Fi(){return 2**++b4}const Qd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:Et,commaOrSpaceSeparated:Sn,commaSeparated:Ol,number:he,overloadedBoolean:Kd,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),fd=Object.keys(Qd);class Lh extends cn{constructor(r,i,l,o){let u=-1;if(super(r,i),Vy(this,"space",o),typeof l=="number")for(;++u<fd.length;){const c=fd[u];Vy(this,fd[u],(l&Qd[c])===Qd[c])}}}Lh.prototype.defined=!0;function Vy(e,r,i){i&&(e[r]=i)}function Bl(e){const r={},i={};for(const[l,o]of Object.entries(e.properties)){const u=new Lh(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),r[l]=u,i[Zd(l)]=l,i[Zd(u.attribute)]=l}return new io(r,i,e.space)}const d0=Bl({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:ut,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:he,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:ut,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Et,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function h0(e,r){return r in e?e[r]:r}function p0(e,r){return h0(e,r.toLowerCase())}const y4=Bl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ol,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:ut,autoFocus:Me,autoPlay:Me,blocking:ut,capture:null,charSet:null,checked:Me,cite:null,className:ut,cols:he,colSpan:null,content:null,contentEditable:Et,controls:Me,controlsList:ut,coords:he|Ol,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Kd,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:ut,height:he,hidden:Kd,high:he,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:ut,itemRef:ut,itemScope:Me,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,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:Me,optimum:he,pattern:null,ping:ut,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:ut,required:Me,reversed:Me,rows:he,rowSpan:he,sandbox:ut,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:Et,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:p0}),x4=Bl({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:Sn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ut,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:Ol,g2:Ol,glyphName:Ol,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sn,rev:Sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sn,requiredFeatures:Sn,requiredFonts:Sn,requiredFormats:Sn,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:h0}),m0=Bl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,r){return"xlink:"+r.slice(5).toLowerCase()}}),g0=Bl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:p0}),b0=Bl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,r){return"xml:"+r.slice(3).toLowerCase()}}),v4={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"},w4=/[A-Z]/g,Gy=/-[a-z]/g,S4=/^data[-\w.:]+$/i;function k4(e,r){const i=Zd(r);let l=r,o=cn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&S4.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(Gy,C4);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!Gy.test(u)){let c=u.replace(w4,E4);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}o=Lh}return new o(l,r)}function E4(e){return"-"+e.toLowerCase()}function C4(e){return e.charAt(1).toUpperCase()}const N4=f0([d0,y4,m0,g0,b0],"html"),Dh=f0([d0,x4,m0,g0,b0],"svg");function A4(e){return e.join(" ").trim()}var Nl={},dd,Yy;function T4(){if(Yy)return dd;Yy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
30
- `,h="/",b="*",g="",x="comment",v="declaration";function w(N,E){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];E=E||{};var C=1,j=1;function O(I){var Z=I.match(r);Z&&(C+=Z.length);var B=I.lastIndexOf(p);j=~B?I.length-B:j+I.length}function U(){var I={line:C,column:j};return function(Z){return Z.position=new _(I),H(),Z}}function _(I){this.start=I,this.end={line:C,column:j},this.source=E.source}_.prototype.content=N;function F(I){var Z=new Error(E.source+":"+C+":"+j+": "+I);if(Z.reason=I,Z.filename=E.source,Z.line=C,Z.column=j,Z.source=N,!E.silent)throw Z}function z(I){var Z=I.exec(N);if(Z){var B=Z[0];return O(B),N=N.slice(B.length),Z}}function H(){z(i)}function M(I){var Z;for(I=I||[];Z=P();)Z!==!1&&I.push(Z);return I}function P(){var I=U();if(!(h!=N.charAt(0)||b!=N.charAt(1))){for(var Z=2;g!=N.charAt(Z)&&(b!=N.charAt(Z)||h!=N.charAt(Z+1));)++Z;if(Z+=2,g===N.charAt(Z-1))return F("End of comment missing");var B=N.slice(2,Z-2);return j+=2,O(B),N=N.slice(Z),j+=2,I({type:x,comment:B})}}function V(){var I=U(),Z=z(l);if(Z){if(P(),!z(o))return F("property missing ':'");var B=z(u),Y=I({type:v,property:S(Z[0].replace(e,g)),value:B?S(B[0].replace(e,g)):g});return z(c),Y}}function J(){var I=[];M(I);for(var Z;Z=V();)Z!==!1&&(I.push(Z),M(I));return I}return H(),J()}function S(N){return N?N.replace(f,g):g}return dd=w,dd}var Xy;function R4(){if(Xy)return Nl;Xy=1;var e=Nl&&Nl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.default=i;const r=e(T4());function i(l,o){let u=null;if(!l||typeof l!="string")return u;const c=(0,r.default)(l),f=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:b}=p;f?o(h,b,p):b&&(u=u||{},u[h]=b)}),u}return Nl}var Oa={},Zy;function j4(){if(Zy)return Oa;Zy=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||i.test(h)||e.test(h)},c=function(h,b){return b.toUpperCase()},f=function(h,b){return"".concat(b,"-")},p=function(h,b){return b===void 0&&(b={}),u(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(o,f):h=h.replace(l,f),h.replace(r,c))};return Oa.camelCase=p,Oa}var Ma,Ky;function _4(){if(Ky)return Ma;Ky=1;var e=Ma&&Ma.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},r=e(R4()),i=j4();function l(o,u){var c={};return!o||typeof o!="string"||(0,r.default)(o,function(f,p){f&&p&&(c[(0,i.camelCase)(f,u)]=p)}),c}return l.default=l,Ma=l,Ma}var L4=_4();const D4=gu(L4),y0=x0("end"),Oh=x0("start");function x0(e){return r;function r(i){const l=i&&i.position&&i.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function O4(e){const r=Oh(e),i=y0(e);if(r&&i)return{start:r,end:i}}function qa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qy(e.position):"start"in e||"end"in e?Qy(e):"line"in e||"column"in e?Jd(e):""}function Jd(e){return Jy(e&&e.line)+":"+Jy(e&&e.column)}function Qy(e){return Jd(e&&e.start)+"-"+Jd(e&&e.end)}function Jy(e){return e&&typeof e=="number"?e:1}class Yt extends Error{constructor(r,i,l){super(),typeof i=="string"&&(l=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof r=="string"?o=r:!u.cause&&r&&(c=!0,o=r.message,u.cause=r),!u.ruleId&&!u.source&&typeof l=="string"){const p=l.indexOf(":");p===-1?u.ruleId=l:(u.source=l.slice(0,p),u.ruleId=l.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=qa(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Yt.prototype.file="";Yt.prototype.name="";Yt.prototype.reason="";Yt.prototype.message="";Yt.prototype.stack="";Yt.prototype.column=void 0;Yt.prototype.line=void 0;Yt.prototype.ancestors=void 0;Yt.prototype.cause=void 0;Yt.prototype.fatal=void 0;Yt.prototype.place=void 0;Yt.prototype.ruleId=void 0;Yt.prototype.source=void 0;const Mh={}.hasOwnProperty,M4=new Map,z4=/[A-Z]/g,F4=new Set(["table","tbody","thead","tfoot","tr"]),I4=new Set(["td","th"]),v0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function B4(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=r.filePath||void 0;let l;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=Y4(i,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=G4(i,r.jsx,r.jsxs)}const o={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:l,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Dh:N4,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=w0(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function w0(e,r,i){if(r.type==="element")return U4(e,r,i);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return H4(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return $4(e,r,i);if(r.type==="mdxjsEsm")return q4(e,r);if(r.type==="root")return P4(e,r,i);if(r.type==="text")return V4(e,r)}function U4(e,r,i){const l=e.schema;let o=l;r.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=Dh,e.schema=o),e.ancestors.push(r);const u=k0(e,r.tagName,!1),c=X4(e,r);let f=Fh(e,r);return F4.has(r.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!g4(p):!0})),S0(e,c,u,r),zh(c,f),e.ancestors.pop(),e.schema=l,e.create(r,u,c,i)}function H4(e,r){if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Qa(e,r.position)}function q4(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Qa(e,r.position)}function $4(e,r,i){const l=e.schema;let o=l;r.name==="svg"&&l.space==="html"&&(o=Dh,e.schema=o),e.ancestors.push(r);const u=r.name===null?e.Fragment:k0(e,r.name,!0),c=Z4(e,r),f=Fh(e,r);return S0(e,c,u,r),zh(c,f),e.ancestors.pop(),e.schema=l,e.create(r,u,c,i)}function P4(e,r,i){const l={};return zh(l,Fh(e,r)),e.create(r,e.Fragment,l,i)}function V4(e,r){return r.value}function S0(e,r,i,l){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(r.node=l)}function zh(e,r){if(r.length>0){const i=r.length>1?r:r[0];i&&(e.children=i)}}function G4(e,r,i){return l;function l(o,u,c,f){const h=Array.isArray(c.children)?i:r;return f?h(u,c,f):h(u,c)}}function Y4(e,r){return i;function i(l,o,u,c){const f=Array.isArray(u.children),p=Oh(l);return r(o,u,c,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function X4(e,r){const i={};let l,o;for(o in r.properties)if(o!=="children"&&Mh.call(r.properties,o)){const u=K4(e,o,r.properties[o]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&I4.has(r.tagName)?l=f:i[c]=f}}if(l){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return i}function Z4(e,r){const i={};for(const l of r.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const u=l.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Qa(e,r.position);else{const o=l.name;let u;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Qa(e,r.position);else u=l.value===null?!0:l.value;i[o]=u}return i}function Fh(e,r){const i=[];let l=-1;const o=e.passKeys?new Map:M4;for(;++l<r.children.length;){const u=r.children[l];let c;if(e.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const h=o.get(p)||0;c=p+"-"+h,o.set(p,h+1)}}const f=w0(e,u,c);f!==void 0&&i.push(f)}return i}function K4(e,r,i){const l=k4(e.schema,r);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=l.commaSeparated?f4(i):A4(i)),l.property==="style"){let o=typeof i=="object"?i:Q4(e,String(i));return e.stylePropertyNameCase==="css"&&(o=J4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?v4[l.property]||l.property:l.attribute,i]}}function Q4(e,r){try{return D4(r,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const l=i,o=new Yt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=v0+"#cannot-parse-style-attribute",o}}function k0(e,r,i){let l;if(!i)l={type:"Literal",value:r};else if(r.includes(".")){const o=r.split(".");let u=-1,c;for(;++u<o.length;){const f=$y(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}l=c}else l=$y(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(l.type==="Literal"){const o=l.value;return Mh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);Qa(e)}function Qa(e,r){const i=new Yt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=v0+"#cannot-handle-mdx-estrees-without-createevaluater",i}function J4(e){const r={};let i;for(i in e)Mh.call(e,i)&&(r[W4(i)]=e[i]);return r}function W4(e){let r=e.replace(z4,eN);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function eN(e){return"-"+e.toLowerCase()}const hd={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"]},tN={};function Ih(e,r){const i=tN,l=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return E0(e,l,o)}function E0(e,r,i){if(nN(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Wy(e.children,r,i)}return Array.isArray(e)?Wy(e,r,i):""}function Wy(e,r,i){const l=[];let o=-1;for(;++o<e.length;)l[o]=E0(e[o],r,i);return l.join("")}function nN(e){return!!(e&&typeof e=="object")}const ex=document.createElement("i");function Bh(e){const r="&"+e+";";ex.innerHTML=r;const i=ex.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===r?!1:i}function En(e,r,i,l){const o=e.length;let u=0,c;if(r<0?r=-r>o?0:o+r:r=r>o?o:r,i=i>0?i:0,l.length<1e4)c=Array.from(l),c.unshift(r,i),e.splice(...c);else for(i&&e.splice(r,i);u<l.length;)c=l.slice(u,u+1e4),c.unshift(r,0),e.splice(...c),u+=1e4,r+=1e4}function zn(e,r){return e.length>0?(En(e,e.length,0,r),e):r}const tx={}.hasOwnProperty;function C0(e){const r={};let i=-1;for(;++i<e.length;)rN(r,e[i]);return r}function rN(e,r){let i;for(i in r){const o=(tx.call(e,i)?e[i]:void 0)||(e[i]={}),u=r[i];let c;if(u)for(c in u){tx.call(o,c)||(o[c]=[]);const f=u[c];iN(o[c],Array.isArray(f)?f:f?[f]:[])}}}function iN(e,r){let i=-1;const l=[];for(;++i<r.length;)(r[i].add==="after"?e:l).push(r[i]);En(e,0,0,l)}function N0(e,r){const i=Number.parseInt(e,r);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function $n(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=fi(/[A-Za-z]/),Gt=fi(/[\dA-Za-z]/),lN=fi(/[#-'*+\--9=?A-Z^-~]/);function au(e){return e!==null&&(e<32||e===127)}const Wd=fi(/\d/),aN=fi(/[\dA-Fa-f]/),oN=fi(/[!-/:-@[-`{-~]/);function Ne(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const ju=fi(new RegExp("\\p{P}|\\p{S}","u")),zi=fi(/\s/);function fi(e){return r;function r(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Ul(e){const r=[];let i=-1,l=0,o=0;for(;++i<e.length;){const u=e.charCodeAt(i);let c="";if(u===37&&Gt(e.charCodeAt(i+1))&&Gt(e.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(i+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),o=1):c="�"}else c=String.fromCharCode(u);c&&(r.push(e.slice(l,i),encodeURIComponent(c)),l=i+o+1,c=""),o&&(i+=o,o=0)}return r.join("")+e.slice(l)}function Ge(e,r,i,l){const o=l?l-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return He(p)?(e.enter(i),f(p)):r(p)}function f(p){return He(p)&&u++<o?(e.consume(p),f):(e.exit(i),r(p))}}const sN={tokenize:uN};function uN(e){const r=e.attempt(this.parser.constructs.contentInitial,l,o);let i;return r;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ge(e,r,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const p=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ne(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const cN={tokenize:fN},nx={tokenize:dN};function fN(e){const r=this,i=[];let l=0,o,u,c;return f;function f(j){if(l<i.length){const O=i[l];return r.containerState=O[1],e.attempt(O[0].continuation,p,h)(j)}return h(j)}function p(j){if(l++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,o&&C();const O=r.events.length;let U=O,_;for(;U--;)if(r.events[U][0]==="exit"&&r.events[U][1].type==="chunkFlow"){_=r.events[U][1].end;break}E(l);let F=O;for(;F<r.events.length;)r.events[F][1].end={..._},F++;return En(r.events,U+1,0,r.events.slice(O)),r.events.length=F,h(j)}return f(j)}function h(j){if(l===i.length){if(!o)return x(j);if(o.currentConstruct&&o.currentConstruct.concrete)return w(j);r.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(nx,b,g)(j)}function b(j){return o&&C(),E(l),x(j)}function g(j){return r.parser.lazy[r.now().line]=l!==i.length,c=r.now().offset,w(j)}function x(j){return r.containerState={},e.attempt(nx,v,w)(j)}function v(j){return l++,i.push([r.currentConstruct,r.containerState]),x(j)}function w(j){if(j===null){o&&C(),E(0),e.consume(j);return}return o=o||r.parser.flow(r.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),S(j)}function S(j){if(j===null){N(e.exit("chunkFlow"),!0),E(0),e.consume(j);return}return Ne(j)?(e.consume(j),N(e.exit("chunkFlow")),l=0,r.interrupt=void 0,f):(e.consume(j),S)}function N(j,O){const U=r.sliceStream(j);if(O&&U.push(null),j.previous=u,u&&(u.next=j),u=j,o.defineSkip(j.start),o.write(U),r.parser.lazy[j.start.line]){let _=o.events.length;for(;_--;)if(o.events[_][1].start.offset<c&&(!o.events[_][1].end||o.events[_][1].end.offset>c))return;const F=r.events.length;let z=F,H,M;for(;z--;)if(r.events[z][0]==="exit"&&r.events[z][1].type==="chunkFlow"){if(H){M=r.events[z][1].end;break}H=!0}for(E(l),_=F;_<r.events.length;)r.events[_][1].end={...M},_++;En(r.events,z+1,0,r.events.slice(F)),r.events.length=_}}function E(j){let O=i.length;for(;O-- >j;){const U=i[O];r.containerState=U[1],U[0].exit.call(r,e)}i.length=j}function C(){o.write([null]),u=void 0,o=void 0,r.containerState._closeFlow=void 0}}function dN(e,r,i){return Ge(e,e.attempt(this.parser.constructs.document,r,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fl(e){if(e===null||st(e)||zi(e))return 1;if(ju(e))return 2}function _u(e,r,i){const l=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!l.includes(u)&&(r=u(r,i),l.push(u))}return r}const eh={name:"attention",resolveAll:hN,tokenize:pN};function hN(e,r){let i=-1,l,o,u,c,f,p,h,b;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(l=i;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&r.sliceSerialize(e[l][1]).charCodeAt(0)===r.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[l][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;p=e[l][1].end.offset-e[l][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[l][1].end},x={...e[i][1].start};rx(g,-p),rx(x,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:x},u={type:p>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[i][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[l][1].end={...c.start},e[i][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=zn(h,[["enter",e[l][1],r],["exit",e[l][1],r]])),h=zn(h,[["enter",o,r],["enter",c,r],["exit",c,r],["enter",u,r]]),h=zn(h,_u(r.parser.constructs.insideSpan.null,e.slice(l+1,i),r)),h=zn(h,[["exit",u,r],["enter",f,r],["exit",f,r],["exit",o,r]]),e[i][1].end.offset-e[i][1].start.offset?(b=2,h=zn(h,[["enter",e[i][1],r],["exit",e[i][1],r]])):b=0,En(e,l-1,i-l+3,h),i=l+h.length-b-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function pN(e,r){const i=this.parser.constructs.attentionMarkers.null,l=this.previous,o=Fl(l);let u;return c;function c(p){return u=p,e.enter("attentionSequence"),f(p)}function f(p){if(p===u)return e.consume(p),f;const h=e.exit("attentionSequence"),b=Fl(p),g=!b||b===2&&o||i.includes(p),x=!o||o===2&&b||i.includes(l);return h._open=!!(u===42?g:g&&(o||!x)),h._close=!!(u===42?x:x&&(b||!g)),r(p)}}function rx(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const mN={name:"autolink",tokenize:gN};function gN(e,r,i){let l=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(v){return Kt(v)?(e.consume(v),c):v===64?i(v):h(v)}function c(v){return v===43||v===45||v===46||Gt(v)?(l=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),l=0,p):(v===43||v===45||v===46||Gt(v))&&l++<32?(e.consume(v),f):(l=0,h(v))}function p(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),r):v===null||v===32||v===60||au(v)?i(v):(e.consume(v),p)}function h(v){return v===64?(e.consume(v),b):lN(v)?(e.consume(v),h):i(v)}function b(v){return Gt(v)?g(v):i(v)}function g(v){return v===46?(e.consume(v),l=0,b):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),r):x(v)}function x(v){if((v===45||Gt(v))&&l++<63){const w=v===45?x:g;return e.consume(v),w}return i(v)}}const lo={partial:!0,tokenize:bN};function bN(e,r,i){return l;function l(u){return He(u)?Ge(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Ne(u)?r(u):i(u)}}const A0={continuation:{tokenize:xN},exit:vN,name:"blockQuote",tokenize:yN};function yN(e,r,i){const l=this;return o;function o(c){if(c===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return i(c)}function u(c){return He(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(c))}}function xN(e,r,i){const l=this;return o;function o(c){return He(c)?Ge(e,u,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(A0,r,i)(c)}}function vN(e){e.exit("blockQuote")}const T0={name:"characterEscape",tokenize:wN};function wN(e,r,i){return l;function l(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return oN(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):i(u)}}const R0={name:"characterReference",tokenize:SN};function SN(e,r,i){const l=this;let o=0,u,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),p}function p(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,c=Gt,b(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=aN,b):(e.enter("characterReferenceValue"),u=7,c=Wd,b(g))}function b(g){if(g===59&&o){const x=e.exit("characterReferenceValue");return c===Gt&&!Bh(l.sliceSerialize(x))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return c(g)&&o++<u?(e.consume(g),b):i(g)}}const ix={partial:!0,tokenize:EN},lx={concrete:!0,name:"codeFenced",tokenize:kN};function kN(e,r,i){const l=this,o={partial:!0,tokenize:U};let u=0,c=0,f;return p;function p(_){return h(_)}function h(_){const F=l.events[l.events.length-1];return u=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,f=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(_)}function b(_){return _===f?(c++,e.consume(_),b):c<3?i(_):(e.exit("codeFencedFenceSequence"),He(_)?Ge(e,g,"whitespace")(_):g(_))}function g(_){return _===null||Ne(_)?(e.exit("codeFencedFence"),l.interrupt?r(_):e.check(ix,S,O)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===null||Ne(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(_)):He(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ge(e,v,"whitespace")(_)):_===96&&_===f?i(_):(e.consume(_),x)}function v(_){return _===null||Ne(_)?g(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===null||Ne(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(_)):_===96&&_===f?i(_):(e.consume(_),w)}function S(_){return e.attempt(o,O,N)(_)}function N(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),E}function E(_){return u>0&&He(_)?Ge(e,C,"linePrefix",u+1)(_):C(_)}function C(_){return _===null||Ne(_)?e.check(ix,S,O)(_):(e.enter("codeFlowValue"),j(_))}function j(_){return _===null||Ne(_)?(e.exit("codeFlowValue"),C(_)):(e.consume(_),j)}function O(_){return e.exit("codeFenced"),r(_)}function U(_,F,z){let H=0;return M;function M(Z){return _.enter("lineEnding"),_.consume(Z),_.exit("lineEnding"),P}function P(Z){return _.enter("codeFencedFence"),He(Z)?Ge(_,V,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):V(Z)}function V(Z){return Z===f?(_.enter("codeFencedFenceSequence"),J(Z)):z(Z)}function J(Z){return Z===f?(H++,_.consume(Z),J):H>=c?(_.exit("codeFencedFenceSequence"),He(Z)?Ge(_,I,"whitespace")(Z):I(Z)):z(Z)}function I(Z){return Z===null||Ne(Z)?(_.exit("codeFencedFence"),F(Z)):z(Z)}}}function EN(e,r,i){const l=this;return o;function o(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return l.parser.lazy[l.now().line]?i(c):r(c)}}const pd={name:"codeIndented",tokenize:NN},CN={partial:!0,tokenize:AN};function NN(e,r,i){const l=this;return o;function o(h){return e.enter("codeIndented"),Ge(e,u,"linePrefix",5)(h)}function u(h){const b=l.events[l.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?p(h):Ne(h)?e.attempt(CN,c,p)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ne(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function p(h){return e.exit("codeIndented"),r(h)}}function AN(e,r,i){const l=this;return o;function o(c){return l.parser.lazy[l.now().line]?i(c):Ne(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ge(e,u,"linePrefix",5)(c)}function u(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):Ne(c)?o(c):i(c)}}const TN={name:"codeText",previous:jN,resolve:RN,tokenize:_N};function RN(e){let r=e.length-4,i=3,l,o;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(l=i;++l<r;)if(e[l][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(l=i-1,r++;++l<=r;)o===void 0?l!==r&&e[l][1].type!=="lineEnding"&&(o=l):(l===r||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),r-=l-o-2,l=o+2),o=void 0);return e}function jN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _N(e,r,i){let l=0,o,u;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),l++,f):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(u=e.enter("codeTextSequence"),o=0,b(g)):Ne(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Ne(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),h)}function b(g){return g===96?(e.consume(g),o++,b):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),r(g)):(u.type="codeTextData",h(g))}}class LN{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,i){const l=i??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(r,l):r>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(r,i,l){const o=i||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&za(this.left,l),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),za(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),za(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const i=this.left.splice(r,Number.POSITIVE_INFINITY);za(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);za(this.left,i.reverse())}}}function za(e,r){let i=0;if(r.length<1e4)e.push(...r);else for(;i<r.length;)e.push(...r.slice(i,i+1e4)),i+=1e4}function j0(e){const r={};let i=-1,l,o,u,c,f,p,h;const b=new LN(e);for(;++i<b.length;){for(;i in r;)i=r[i];if(l=b.get(i),i&&l[1].type==="chunkFlow"&&b.get(i-1)[1].type==="listItemPrefix"&&(p=l[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(l[0]==="enter")l[1].contentType&&(Object.assign(r,DN(b,i)),i=r[i],h=!0);else if(l[1]._container){for(u=i,o=void 0;u--;)if(c=b.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(b.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(l[1].end={...b.get(o)[1].start},f=b.slice(o,i),f.unshift(l),b.splice(o,i-o+1,f))}}return En(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function DN(e,r){const i=e.get(r)[1],l=e.get(r)[2];let o=r-1;const u=[];let c=i._tokenizer;c||(c=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],h={};let b,g,x=-1,v=i,w=0,S=0;const N=[S];for(;v;){for(;e.get(++o)[1]!==v;);u.push(o),v._tokenizer||(b=l.sliceStream(v),v.next||b.push(null),g&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=i;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(S=x+1,N.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):N.pop(),x=N.length;x--;){const E=f.slice(N[x],N[x+1]),C=u.pop();p.push([C,C+E.length-1]),e.splice(C,2,E)}for(p.reverse(),x=-1;++x<p.length;)h[w+p[x][0]]=w+p[x][1],w+=p[x][1]-p[x][0]-1;return h}const ON={resolve:zN,tokenize:FN},MN={partial:!0,tokenize:IN};function zN(e){return j0(e),e}function FN(e,r){let i;return l;function l(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):Ne(f)?e.check(MN,c,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),r(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function IN(e,r,i){const l=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ge(e,u,"linePrefix")}function u(c){if(c===null||Ne(c))return i(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):e.interrupt(l.parser.constructs.flow,i,r)(c)}}function _0(e,r,i,l,o,u,c,f,p){const h=p||Number.POSITIVE_INFINITY;let b=0;return g;function g(E){return E===60?(e.enter(l),e.enter(o),e.enter(u),e.consume(E),e.exit(u),x):E===null||E===32||E===41||au(E)?i(E):(e.enter(l),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(E))}function x(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(o),e.exit(l),r):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===62?(e.exit("chunkString"),e.exit(f),x(E)):E===null||E===60||Ne(E)?i(E):(e.consume(E),E===92?w:v)}function w(E){return E===60||E===62||E===92?(e.consume(E),v):v(E)}function S(E){return!b&&(E===null||E===41||st(E))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(l),r(E)):b<h&&E===40?(e.consume(E),b++,S):E===41?(e.consume(E),b--,S):E===null||E===32||E===40||au(E)?i(E):(e.consume(E),E===92?N:S)}function N(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function L0(e,r,i,l,o,u){const c=this;let f=0,p;return h;function h(v){return e.enter(l),e.enter(o),e.consume(v),e.exit(o),e.enter(u),b}function b(v){return f>999||v===null||v===91||v===93&&!p||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(v):v===93?(e.exit(u),e.enter(o),e.consume(v),e.exit(o),e.exit(l),r):Ne(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Ne(v)||f++>999?(e.exit("chunkString"),b(v)):(e.consume(v),p||(p=!He(v)),v===92?x:g)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function D0(e,r,i,l,o,u){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(l),e.enter(o),e.consume(x),e.exit(o),c=x===40?41:x,p):i(x)}function p(x){return x===c?(e.enter(o),e.consume(x),e.exit(o),e.exit(l),r):(e.enter(u),h(x))}function h(x){return x===c?(e.exit(u),p(c)):x===null?i(x):Ne(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ge(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===c||x===null||Ne(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?g:b)}function g(x){return x===c||x===92?(e.consume(x),b):b(x)}}function $a(e,r){let i;return l;function l(o){return Ne(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i=!0,l):He(o)?Ge(e,l,i?"linePrefix":"lineSuffix")(o):r(o)}}const BN={name:"definition",tokenize:HN},UN={partial:!0,tokenize:qN};function HN(e,r,i){const l=this;let o;return u;function u(v){return e.enter("definition"),c(v)}function c(v){return L0.call(l,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return o=$n(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),p):i(v)}function p(v){return st(v)?$a(e,h)(v):h(v)}function h(v){return _0(e,b,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return e.attempt(UN,g,g)(v)}function g(v){return He(v)?Ge(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Ne(v)?(e.exit("definition"),l.parser.defined.push(o),r(v)):i(v)}}function qN(e,r,i){return l;function l(f){return st(f)?$a(e,o)(f):i(f)}function o(f){return D0(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return He(f)?Ge(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ne(f)?r(f):i(f)}}const $N={name:"hardBreakEscape",tokenize:PN};function PN(e,r,i){return l;function l(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Ne(u)?(e.exit("hardBreakEscape"),r(u)):i(u)}}const VN={name:"headingAtx",resolve:GN,tokenize:YN};function GN(e,r){let i=e.length-2,l=3,o,u;return e[l][1].type==="whitespace"&&(l+=2),i-2>l&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(l===i-1||i-4>l&&e[i-2][1].type==="whitespace")&&(i-=l+1===i?2:4),i>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},u={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},En(e,l,i-l+1,[["enter",o,r],["enter",u,r],["exit",u,r],["exit",o,r]])),e}function YN(e,r,i){let l=0;return o;function o(b){return e.enter("atxHeading"),u(b)}function u(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&l++<6?(e.consume(b),c):b===null||st(b)?(e.exit("atxHeadingSequence"),f(b)):i(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),p(b)):b===null||Ne(b)?(e.exit("atxHeading"),r(b)):He(b)?Ge(e,f,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function p(b){return b===35?(e.consume(b),p):(e.exit("atxHeadingSequence"),f(b))}function h(b){return b===null||b===35||st(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),h)}}const XN=["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"],ax=["pre","script","style","textarea"],ZN={concrete:!0,name:"htmlFlow",resolveTo:JN,tokenize:WN},KN={partial:!0,tokenize:tA},QN={partial:!0,tokenize:eA};function JN(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function WN(e,r,i){const l=this;let o,u,c,f,p;return h;function h(T){return b(T)}function b(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),x):T===47?(e.consume(T),u=!0,S):T===63?(e.consume(T),o=3,l.interrupt?r:R):Kt(T)?(e.consume(T),c=String.fromCharCode(T),N):i(T)}function x(T){return T===45?(e.consume(T),o=2,v):T===91?(e.consume(T),o=5,f=0,w):Kt(T)?(e.consume(T),o=4,l.interrupt?r:R):i(T)}function v(T){return T===45?(e.consume(T),l.interrupt?r:R):i(T)}function w(T){const W="CDATA[";return T===W.charCodeAt(f++)?(e.consume(T),f===W.length?l.interrupt?r:V:w):i(T)}function S(T){return Kt(T)?(e.consume(T),c=String.fromCharCode(T),N):i(T)}function N(T){if(T===null||T===47||T===62||st(T)){const W=T===47,te=c.toLowerCase();return!W&&!u&&ax.includes(te)?(o=1,l.interrupt?r(T):V(T)):XN.includes(c.toLowerCase())?(o=6,W?(e.consume(T),E):l.interrupt?r(T):V(T)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?i(T):u?C(T):j(T))}return T===45||Gt(T)?(e.consume(T),c+=String.fromCharCode(T),N):i(T)}function E(T){return T===62?(e.consume(T),l.interrupt?r:V):i(T)}function C(T){return He(T)?(e.consume(T),C):M(T)}function j(T){return T===47?(e.consume(T),M):T===58||T===95||Kt(T)?(e.consume(T),O):He(T)?(e.consume(T),j):M(T)}function O(T){return T===45||T===46||T===58||T===95||Gt(T)?(e.consume(T),O):U(T)}function U(T){return T===61?(e.consume(T),_):He(T)?(e.consume(T),U):j(T)}function _(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(e.consume(T),p=T,F):He(T)?(e.consume(T),_):z(T)}function F(T){return T===p?(e.consume(T),p=null,H):T===null||Ne(T)?i(T):(e.consume(T),F)}function z(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||st(T)?U(T):(e.consume(T),z)}function H(T){return T===47||T===62||He(T)?j(T):i(T)}function M(T){return T===62?(e.consume(T),P):i(T)}function P(T){return T===null||Ne(T)?V(T):He(T)?(e.consume(T),P):i(T)}function V(T){return T===45&&o===2?(e.consume(T),B):T===60&&o===1?(e.consume(T),Y):T===62&&o===4?(e.consume(T),D):T===63&&o===3?(e.consume(T),R):T===93&&o===5?(e.consume(T),q):Ne(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(KN,$,J)(T)):T===null||Ne(T)?(e.exit("htmlFlowData"),J(T)):(e.consume(T),V)}function J(T){return e.check(QN,I,$)(T)}function I(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Z}function Z(T){return T===null||Ne(T)?J(T):(e.enter("htmlFlowData"),V(T))}function B(T){return T===45?(e.consume(T),R):V(T)}function Y(T){return T===47?(e.consume(T),c="",X):V(T)}function X(T){if(T===62){const W=c.toLowerCase();return ax.includes(W)?(e.consume(T),D):V(T)}return Kt(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),X):V(T)}function q(T){return T===93?(e.consume(T),R):V(T)}function R(T){return T===62?(e.consume(T),D):T===45&&o===2?(e.consume(T),R):V(T)}function D(T){return T===null||Ne(T)?(e.exit("htmlFlowData"),$(T)):(e.consume(T),D)}function $(T){return e.exit("htmlFlow"),r(T)}}function eA(e,r,i){const l=this;return o;function o(c){return Ne(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):i(c)}function u(c){return l.parser.lazy[l.now().line]?i(c):r(c)}}function tA(e,r,i){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(lo,r,i)}}const nA={name:"htmlText",tokenize:rA};function rA(e,r,i){const l=this;let o,u,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),U):R===63?(e.consume(R),j):Kt(R)?(e.consume(R),z):i(R)}function h(R){return R===45?(e.consume(R),b):R===91?(e.consume(R),u=0,w):Kt(R)?(e.consume(R),C):i(R)}function b(R){return R===45?(e.consume(R),v):i(R)}function g(R){return R===null?i(R):R===45?(e.consume(R),x):Ne(R)?(c=g,Y(R)):(e.consume(R),g)}function x(R){return R===45?(e.consume(R),v):g(R)}function v(R){return R===62?B(R):R===45?x(R):g(R)}function w(R){const D="CDATA[";return R===D.charCodeAt(u++)?(e.consume(R),u===D.length?S:w):i(R)}function S(R){return R===null?i(R):R===93?(e.consume(R),N):Ne(R)?(c=S,Y(R)):(e.consume(R),S)}function N(R){return R===93?(e.consume(R),E):S(R)}function E(R){return R===62?B(R):R===93?(e.consume(R),E):S(R)}function C(R){return R===null||R===62?B(R):Ne(R)?(c=C,Y(R)):(e.consume(R),C)}function j(R){return R===null?i(R):R===63?(e.consume(R),O):Ne(R)?(c=j,Y(R)):(e.consume(R),j)}function O(R){return R===62?B(R):j(R)}function U(R){return Kt(R)?(e.consume(R),_):i(R)}function _(R){return R===45||Gt(R)?(e.consume(R),_):F(R)}function F(R){return Ne(R)?(c=F,Y(R)):He(R)?(e.consume(R),F):B(R)}function z(R){return R===45||Gt(R)?(e.consume(R),z):R===47||R===62||st(R)?H(R):i(R)}function H(R){return R===47?(e.consume(R),B):R===58||R===95||Kt(R)?(e.consume(R),M):Ne(R)?(c=H,Y(R)):He(R)?(e.consume(R),H):B(R)}function M(R){return R===45||R===46||R===58||R===95||Gt(R)?(e.consume(R),M):P(R)}function P(R){return R===61?(e.consume(R),V):Ne(R)?(c=P,Y(R)):He(R)?(e.consume(R),P):H(R)}function V(R){return R===null||R===60||R===61||R===62||R===96?i(R):R===34||R===39?(e.consume(R),o=R,J):Ne(R)?(c=V,Y(R)):He(R)?(e.consume(R),V):(e.consume(R),I)}function J(R){return R===o?(e.consume(R),o=void 0,Z):R===null?i(R):Ne(R)?(c=J,Y(R)):(e.consume(R),J)}function I(R){return R===null||R===34||R===39||R===60||R===61||R===96?i(R):R===47||R===62||st(R)?H(R):(e.consume(R),I)}function Z(R){return R===47||R===62||st(R)?H(R):i(R)}function B(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),r):i(R)}function Y(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),X}function X(R){return He(R)?Ge(e,q,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):q(R)}function q(R){return e.enter("htmlTextData"),c(R)}}const Uh={name:"labelEnd",resolveAll:oA,resolveTo:sA,tokenize:uA},iA={tokenize:cA},lA={tokenize:fA},aA={tokenize:dA};function oA(e){let r=-1;const i=[];for(;++r<e.length;){const l=e[r][1];if(i.push(e[r]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",r+=o}}return e.length!==i.length&&En(e,0,e.length,i),e}function sA(e,r){let i=e.length,l=0,o,u,c,f;for(;i--;)if(o=e[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(c=i);const p={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[u+l+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",p,r],["enter",h,r]],f=zn(f,e.slice(u+1,u+l+3)),f=zn(f,[["enter",b,r]]),f=zn(f,_u(r.parser.constructs.insideSpan.null,e.slice(u+l+4,c-3),r)),f=zn(f,[["exit",b,r],e[c-2],e[c-1],["exit",h,r]]),f=zn(f,e.slice(c+1)),f=zn(f,[["exit",p,r]]),En(e,u,e.length,f),e}function uA(e,r,i){const l=this;let o=l.events.length,u,c;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){u=l.events[o][1];break}return f;function f(x){return u?u._inactive?g(x):(c=l.parser.defined.includes($n(l.sliceSerialize({start:u.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),p):i(x)}function p(x){return x===40?e.attempt(iA,b,c?b:g)(x):x===91?e.attempt(lA,b,c?h:g)(x):c?b(x):g(x)}function h(x){return e.attempt(aA,b,g)(x)}function b(x){return r(x)}function g(x){return u._balanced=!0,i(x)}}function cA(e,r,i){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return st(g)?$a(e,u)(g):u(g)}function u(g){return g===41?b(g):_0(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?$a(e,p)(g):b(g)}function f(g){return i(g)}function p(g){return g===34||g===39||g===40?D0(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function h(g){return st(g)?$a(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),r):i(g)}}function fA(e,r,i){const l=this;return o;function o(f){return L0.call(l,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return l.parser.defined.includes($n(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?r(f):i(f)}function c(f){return i(f)}}function dA(e,r,i){return l;function l(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),r):i(u)}}const hA={name:"labelStartImage",resolveAll:Uh.resolveAll,tokenize:pA};function pA(e,r,i){const l=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(f):r(f)}}const mA={name:"labelStartLink",resolveAll:Uh.resolveAll,tokenize:gA};function gA(e,r,i){const l=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?i(c):r(c)}}const md={name:"lineEnding",tokenize:bA};function bA(e,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ge(e,r,"linePrefix")}}const Ms={name:"thematicBreak",tokenize:yA};function yA(e,r,i){let l=0,o;return u;function u(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),p(h)):l>=3&&(h===null||Ne(h))?(e.exit("thematicBreak"),r(h)):i(h)}function p(h){return h===o?(e.consume(h),l++,p):(e.exit("thematicBreakSequence"),He(h)?Ge(e,f,"whitespace")(h):f(h))}}const on={continuation:{tokenize:SA},exit:EA,name:"list",tokenize:wA},xA={partial:!0,tokenize:CA},vA={partial:!0,tokenize:kA};function wA(e,r,i){const l=this,o=l.events[l.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(v){const w=l.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||v===l.containerState.marker:Wd(v)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Ms,i,h)(v):h(v);if(!l.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(v)}return i(v)}function p(v){return Wd(v)&&++c<10?(e.consume(v),p):(!l.interrupt||c<2)&&(l.containerState.marker?v===l.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):i(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||v,e.check(lo,l.interrupt?i:b,e.attempt(xA,x,g))}function b(v){return l.containerState.initialBlankLine=!0,u++,x(v)}function g(v){return He(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):i(v)}function x(v){return l.containerState.size=u+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(v)}}function SA(e,r,i){const l=this;return l.containerState._closeFlow=void 0,e.check(lo,o,u);function o(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Ge(e,r,"listItemIndent",l.containerState.size+1)(f)}function u(f){return l.containerState.furtherBlankLines||!He(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(vA,r,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,Ge(e,e.attempt(on,r,i),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function kA(e,r,i){const l=this;return Ge(e,o,"listItemIndent",l.containerState.size+1);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?r(u):i(u)}}function EA(e){e.exit(this.containerState.type)}function CA(e,r,i){const l=this;return Ge(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=l.events[l.events.length-1];return!He(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):i(u)}}const ox={name:"setextUnderline",resolveTo:NA,tokenize:AA};function NA(e,r){let i=e.length,l,o,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){l=i;break}e[i][1].type==="paragraph"&&(o=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,r]),e.splice(u+1,0,["exit",e[l][1],r]),e[l][1].end={...e[u][1].end}):e[l][1]=c,e.push(["exit",c,r]),e}function AA(e,r,i){const l=this;let o;return u;function u(h){let b=l.events.length,g;for(;b--;)if(l.events[b][1].type!=="lineEnding"&&l.events[b][1].type!=="linePrefix"&&l.events[b][1].type!=="content"){g=l.events[b][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),o=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),He(h)?Ge(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Ne(h)?(e.exit("setextHeadingLine"),r(h)):i(h)}}const TA={tokenize:RA};function RA(e){const r=this,i=e.attempt(lo,l,e.attempt(this.parser.constructs.flowInitial,o,Ge(e,e.attempt(this.parser.constructs.flow,o,e.attempt(ON,o)),"linePrefix")));return i;function l(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),r.currentConstruct=void 0,i}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),r.currentConstruct=void 0,i}}const jA={resolveAll:M0()},_A=O0("string"),LA=O0("text");function O0(e){return{resolveAll:M0(e==="text"?DA:void 0),tokenize:r};function r(i){const l=this,o=this.parser.constructs[e],u=i.attempt(o,c,f);return c;function c(b){return h(b)?u(b):f(b)}function f(b){if(b===null){i.consume(b);return}return i.enter("data"),i.consume(b),p}function p(b){return h(b)?(i.exit("data"),u(b)):(i.consume(b),p)}function h(b){if(b===null)return!0;const g=o[b];let x=-1;if(g)for(;++x<g.length;){const v=g[x];if(!v.previous||v.previous.call(l,l.previous))return!0}return!1}}}function M0(e){return r;function r(i,l){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(i,l):i}}function DA(e,r){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const l=e[i-1][1],o=r.sliceStream(l);let u=o.length,c=-1,f=0,p;for(;u--;){const h=o[u];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)p=!0,f++;else if(h!==-1){u++;break}}if(r._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:l.start._bufferIndex+c,_index:l.start._index+u,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(i,0,["enter",h,r],["exit",h,r]),i+=2)}i++}return e}const OA={42:on,43:on,45:on,48:on,49:on,50:on,51:on,52:on,53:on,54:on,55:on,56:on,57:on,62:A0},MA={91:BN},zA={[-2]:pd,[-1]:pd,32:pd},FA={35:VN,42:Ms,45:[ox,Ms],60:ZN,61:ox,95:Ms,96:lx,126:lx},IA={38:R0,92:T0},BA={[-5]:md,[-4]:md,[-3]:md,33:hA,38:R0,42:eh,60:[mN,nA],91:mA,92:[$N,T0],93:Uh,95:eh,96:TN},UA={null:[eh,jA]},HA={null:[42,95]},qA={null:[]},$A=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:HA,contentInitial:MA,disable:qA,document:OA,flow:FA,flowInitial:zA,insideSpan:UA,string:IA,text:BA},Symbol.toStringTag,{value:"Module"}));function PA(e,r,i){let l={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],f=[];const p={attempt:F(U),check:F(_),consume:C,enter:j,exit:O,interrupt:F(_,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:g};let b=r.tokenize.call(h,p);return r.resolveAll&&u.push(r),h;function g(P){return c=zn(c,P),N(),c[c.length-1]!==null?[]:(z(r,0),h.events=_u(u,h.events,h),h.events)}function x(P,V){return GA(v(P),V)}function v(P){return VA(c,P)}function w(){const{_bufferIndex:P,_index:V,line:J,column:I,offset:Z}=l;return{_bufferIndex:P,_index:V,line:J,column:I,offset:Z}}function S(P){o[P.line]=P.column,M()}function N(){let P;for(;l._index<c.length;){const V=c[l._index];if(typeof V=="string")for(P=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===P&&l._bufferIndex<V.length;)E(V.charCodeAt(l._bufferIndex));else E(V)}}function E(P){b=b(P)}function C(P){Ne(P)?(l.line++,l.column=1,l.offset+=P===-3?2:1,M()):P!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=P}function j(P,V){const J=V||{};return J.type=P,J.start=w(),h.events.push(["enter",J,h]),f.push(J),J}function O(P){const V=f.pop();return V.end=w(),h.events.push(["exit",V,h]),V}function U(P,V){z(P,V.from)}function _(P,V){V.restore()}function F(P,V){return J;function J(I,Z,B){let Y,X,q,R;return Array.isArray(I)?$(I):"tokenize"in I?$([I]):D(I);function D(ce){return me;function me(xe){const ge=xe!==null&&ce[xe],ve=xe!==null&&ce.null,Ee=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return $(Ee)(xe)}}function $(ce){return Y=ce,X=0,ce.length===0?B:T(ce[X])}function T(ce){return me;function me(xe){return R=H(),q=ce,ce.partial||(h.currentConstruct=ce),ce.name&&h.parser.constructs.disable.null.includes(ce.name)?te():ce.tokenize.call(V?Object.assign(Object.create(h),V):h,p,W,te)(xe)}}function W(ce){return P(q,R),Z}function te(ce){return R.restore(),++X<Y.length?T(Y[X]):B}}}function z(P,V){P.resolveAll&&!u.includes(P)&&u.push(P),P.resolve&&En(h.events,V,h.events.length-V,P.resolve(h.events.slice(V),h)),P.resolveTo&&(h.events=P.resolveTo(h.events,h))}function H(){const P=w(),V=h.previous,J=h.currentConstruct,I=h.events.length,Z=Array.from(f);return{from:I,restore:B};function B(){l=P,h.previous=V,h.currentConstruct=J,h.events.length=I,f=Z,M()}}function M(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function VA(e,r){const i=r.start._index,l=r.start._bufferIndex,o=r.end._index,u=r.end._bufferIndex;let c;if(i===o)c=[e[i].slice(l,u)];else{if(c=e.slice(i,o),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function GA(e,r){let i=-1;const l=[];let o;for(;++i<e.length;){const u=e[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
31
- `;break}case-3:{c=`\r
32
- `;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,l.push(c)}return l.join("")}function YA(e){const l={constructs:C0([$A,...(e||{}).extensions||[]]),content:o(sN),defined:[],document:o(cN),flow:o(TA),lazy:{},string:o(_A),text:o(LA)};return l;function o(u){return c;function c(f){return PA(l,u,f)}}}function XA(e){for(;!j0(e););return e}const sx=/[\0\t\n\r]/g;function ZA(){let e=1,r="",i=!0,l;return o;function o(u,c,f){const p=[];let h,b,g,x,v;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),g=0,r="",i&&(u.charCodeAt(0)===65279&&g++,i=void 0);g<u.length;){if(sx.lastIndex=g,h=sx.exec(u),x=h&&h.index!==void 0?h.index:u.length,v=u.charCodeAt(x),!h){r=u.slice(g);break}if(v===10&&g===x&&l)p.push(-3),l=void 0;else switch(l&&(p.push(-5),l=void 0),g<x&&(p.push(u.slice(g,x)),e+=x-g),v){case 0:{p.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,p.push(-2);e++<b;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:l=!0,e=1}g=x+1}return f&&(l&&p.push(-5),r&&p.push(r),p.push(null)),p}}const KA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function QA(e){return e.replace(KA,JA)}function JA(e,r,i){if(r)return r;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return N0(i.slice(u?2:1),u?16:10)}return Bh(i)||e}const z0={}.hasOwnProperty;function WA(e,r,i){return typeof r!="string"&&(i=r,r=void 0),eT(i)(XA(YA(i).document().write(ZA()(e,r,!0))))}function eT(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(at),autolinkProtocol:H,autolinkEmail:H,atxHeading:u(je),blockQuote:u(ve),characterEscape:H,characterReference:H,codeFenced:u(Ee),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Ee,c),codeText:u(de,c),codeTextData:H,data:H,codeFlowValue:H,definition:u(ye),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(we),hardBreakEscape:u(Ye),hardBreakTrailing:u(Ye),htmlFlow:u(Ie,c),htmlFlowData:H,htmlText:u(Ie,c),htmlTextData:H,image:u(It),label:c,link:u(at),listItem:u(Bt),listItemValue:x,listOrdered:u(pt,g),listUnordered:u(pt),paragraph:u(Jt),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(je),strong:u(Ut),thematicBreak:u(tr)},exit:{atxHeading:p(),atxHeadingSequence:U,autolink:p(),autolinkEmail:ge,autolinkProtocol:xe,blockQuote:p(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:ce,characterReference:me,codeFenced:p(N),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:M,codeIndented:p(E),codeText:p(Z),codeTextData:M,data:M,definition:p(),definitionDestinationString:O,definitionLabelString:C,definitionTitleString:j,emphasis:p(),hardBreakEscape:p(V),hardBreakTrailing:p(V),htmlFlow:p(J),htmlFlowData:M,htmlText:p(I),htmlTextData:M,image:p(Y),label:q,labelText:X,lineEnding:P,link:p(B),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:W,resourceDestinationString:R,resourceTitleString:D,resource:$,setextHeading:p(z),setextHeadingLineSequence:F,setextHeadingText:_,strong:p(),thematicBreak:p()}};F0(r,(e||{}).mdastExtensions||[]);const i={};return l;function l(oe){let pe={type:"root",children:[]};const Te={stack:[pe],tokenStack:[],config:r,enter:f,exit:h,buffer:c,resume:b,data:i},ze=[];let Xe=-1;for(;++Xe<oe.length;)if(oe[Xe][1].type==="listOrdered"||oe[Xe][1].type==="listUnordered")if(oe[Xe][0]==="enter")ze.push(Xe);else{const _t=ze.pop();Xe=o(oe,_t,Xe)}for(Xe=-1;++Xe<oe.length;){const _t=r[oe[Xe][0]];z0.call(_t,oe[Xe][1].type)&&_t[oe[Xe][1].type].call(Object.assign({sliceSerialize:oe[Xe][2].sliceSerialize},Te),oe[Xe][1])}if(Te.tokenStack.length>0){const _t=Te.tokenStack[Te.tokenStack.length-1];(_t[1]||ux).call(Te,void 0,_t[0])}for(pe.position={start:ni(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:ni(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<r.transforms.length;)pe=r.transforms[Xe](pe)||pe;return pe}function o(oe,pe,Te){let ze=pe-1,Xe=-1,_t=!1,fn,Lt,bt,Dt;for(;++ze<=Te;){const We=oe[ze];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?Xe++:Xe--,Dt=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(fn&&!Dt&&!Xe&&!bt&&(bt=ze),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Xe&&We[0]==="enter"&&We[1].type==="listItemPrefix"||Xe===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(fn){let Pn=ze;for(Lt=void 0;Pn--;){const dn=oe[Pn];if(dn[1].type==="lineEnding"||dn[1].type==="lineEndingBlank"){if(dn[0]==="exit")continue;Lt&&(oe[Lt][1].type="lineEndingBlank",_t=!0),dn[1].type="lineEnding",Lt=Pn}else if(!(dn[1].type==="linePrefix"||dn[1].type==="blockQuotePrefix"||dn[1].type==="blockQuotePrefixWhitespace"||dn[1].type==="blockQuoteMarker"||dn[1].type==="listItemIndent"))break}bt&&(!Lt||bt<Lt)&&(fn._spread=!0),fn.end=Object.assign({},Lt?oe[Lt][1].start:We[1].end),oe.splice(Lt||ze,0,["exit",fn,We[2]]),ze++,Te++}if(We[1].type==="listItemPrefix"){const Pn={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};fn=Pn,oe.splice(ze,0,["enter",Pn,We[2]]),ze++,Te++,bt=void 0,Dt=!0}}}return oe[pe][1]._spread=_t,Te}function u(oe,pe){return Te;function Te(ze){f.call(this,oe(ze),ze),pe&&pe.call(this,ze)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(oe,pe,Te){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([pe,Te||void 0]),oe.position={start:ni(pe.start),end:void 0}}function p(oe){return pe;function pe(Te){oe&&oe.call(this,Te),h.call(this,Te)}}function h(oe,pe){const Te=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==oe.type&&(pe?pe.call(this,oe,ze[0]):(ze[1]||ux).call(this,oe,ze[0]));else throw new Error("Cannot close `"+oe.type+"` ("+qa({start:oe.start,end:oe.end})+"): it’s not open");Te.position.end=ni(oe.end)}function b(){return Ih(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(oe){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function v(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=oe}function w(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const pe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=pe,Te.identifier=$n(this.sliceSerialize(oe)).toLowerCase()}function j(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function O(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function U(oe){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Te=this.sliceSerialize(oe).length;pe.depth=Te}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function F(oe){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function H(oe){const Te=this.stack[this.stack.length-1].children;let ze=Te[Te.length-1];(!ze||ze.type!=="text")&&(ze=Fe(),ze.position={start:ni(oe.start),end:void 0},Te.push(ze)),this.stack.push(ze)}function M(oe){const pe=this.stack.pop();pe.value+=this.sliceSerialize(oe),pe.position.end=ni(oe.end)}function P(oe){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=pe.children[pe.children.length-1];Te.position.end=ni(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(pe.type)&&(H.call(this,oe),M.call(this,oe))}function V(){this.data.atHardBreak=!0}function J(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function I(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function Z(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function B(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function Y(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function X(oe){const pe=this.sliceSerialize(oe),Te=this.stack[this.stack.length-2];Te.label=QA(pe),Te.identifier=$n(pe).toLowerCase()}function q(){const oe=this.stack[this.stack.length-1],pe=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const ze=oe.children;Te.children=ze}else Te.alt=pe}function R(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function D(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function $(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function W(oe){const pe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=pe,Te.identifier=$n(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function te(oe){this.data.characterReferenceType=oe.type}function ce(oe){const pe=this.sliceSerialize(oe),Te=this.data.characterReferenceType;let ze;Te?(ze=N0(pe,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=Bh(pe);const Xe=this.stack[this.stack.length-1];Xe.value+=ze}function me(oe){const pe=this.stack.pop();pe.position.end=ni(oe.end)}function xe(oe){M.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(oe)}function ge(oe){M.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(oe)}function ve(){return{type:"blockquote",children:[]}}function Ee(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function ye(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function je(){return{type:"heading",depth:0,children:[]}}function Ye(){return{type:"break"}}function Ie(){return{type:"html",value:""}}function It(){return{type:"image",title:null,url:"",alt:null}}function at(){return{type:"link",title:null,url:"",children:[]}}function pt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Bt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Jt(){return{type:"paragraph",children:[]}}function Ut(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function tr(){return{type:"thematicBreak"}}}function ni(e){return{line:e.line,column:e.column,offset:e.offset}}function F0(e,r){let i=-1;for(;++i<r.length;){const l=r[i];Array.isArray(l)?F0(e,l):tT(e,l)}}function tT(e,r){let i;for(i in r)if(z0.call(r,i))switch(i){case"canContainEols":{const l=r[i];l&&e[i].push(...l);break}case"transforms":{const l=r[i];l&&e[i].push(...l);break}case"enter":case"exit":{const l=r[i];l&&Object.assign(e[i],l);break}}}function ux(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+qa({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+qa({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+qa({start:r.start,end:r.end})+") is still open")}function nT(e){const r=this;r.parser=i;function i(l){return WA(l,{...r.data("settings"),...e,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function rT(e,r){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(r),!0)};return e.patch(r,i),e.applyData(r,i)}function iT(e,r){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(r,i),[e.applyData(r,i),{type:"text",value:`
33
- `}]}function lT(e,r){const i=r.value?r.value+`
34
- `:"",l={},o=r.lang?r.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:l,children:[{type:"text",value:i}]};return r.meta&&(u.data={meta:r.meta}),e.patch(r,u),u=e.applyData(r,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(r,u),u}function aT(e,r){const i={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function oT(e,r){const i={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function sT(e,r){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(r.identifier).toUpperCase(),o=Ul(l.toLowerCase()),u=e.footnoteOrder.indexOf(l);let c,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(l,f);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(r,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(r,h),e.applyData(r,h)}function uT(e,r){const i={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function cT(e,r){if(e.options.allowDangerousHtml){const i={type:"raw",value:r.value};return e.patch(r,i),e.applyData(r,i)}}function I0(e,r){const i=r.referenceType;let l="]";if(i==="collapsed"?l+="[]":i==="full"&&(l+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+l}];const o=e.all(r),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=l:o.push({type:"text",value:l}),o}function fT(e,r){const i=String(r.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return I0(e,r);const o={src:Ul(l.url||""),alt:r.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(r,u),e.applyData(r,u)}function dT(e,r){const i={src:Ul(r.url)};r.alt!==null&&r.alt!==void 0&&(i.alt=r.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(r,l),e.applyData(r,l)}function hT(e,r){const i={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,i);const l={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(r,l),e.applyData(r,l)}function pT(e,r){const i=String(r.identifier).toUpperCase(),l=e.definitionById.get(i);if(!l)return I0(e,r);const o={href:Ul(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const u={type:"element",tagName:"a",properties:o,children:e.all(r)};return e.patch(r,u),e.applyData(r,u)}function mT(e,r){const i={href:Ul(r.url)};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function gT(e,r,i){const l=e.all(r),o=i?bT(i):B0(r),u={},c=[];if(typeof r.checked=="boolean"){const b=l[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},l.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const b=l[f];(o||f!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
35
- `}),b.type==="element"&&b.tagName==="p"&&!o?c.push(...b.children):c.push(b)}const p=l[l.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
36
- `});const h={type:"element",tagName:"li",properties:u,children:c};return e.patch(r,h),e.applyData(r,h)}function bT(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const i=e.children;let l=-1;for(;!r&&++l<i.length;)r=B0(i[l])}return r}function B0(e){const r=e.spread;return r??e.children.length>1}function yT(e,r){const i={},l=e.all(r);let o=-1;for(typeof r.start=="number"&&r.start!==1&&(i.start=r.start);++o<l.length;){const c=l[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:r.ordered?"ol":"ul",properties:i,children:e.wrap(l,!0)};return e.patch(r,u),e.applyData(r,u)}function xT(e,r){const i={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function vT(e,r){const i={type:"root",children:e.wrap(e.all(r))};return e.patch(r,i),e.applyData(r,i)}function wT(e,r){const i={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function ST(e,r){const i=e.all(r),l=i.shift(),o=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(r.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=Oh(r.children[1]),p=y0(r.children[r.children.length-1]);f&&p&&(c.position={start:f,end:p}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(r,u),e.applyData(r,u)}function kT(e,r,i){const l=i?i.children:void 0,u=(l?l.indexOf(r):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:r.children.length;let p=-1;const h=[];for(;++p<f;){const g=r.children[p],x={},v=c?c[p]:void 0;v&&(x.align=v);let w={type:"element",tagName:u,properties:x,children:[]};g&&(w.children=e.all(g),e.patch(g,w),w=e.applyData(g,w)),h.push(w)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(r,b),e.applyData(r,b)}function ET(e,r){const i={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}const cx=9,fx=32;function CT(e){const r=String(e),i=/\r?\n|\r/g;let l=i.exec(r),o=0;const u=[];for(;l;)u.push(dx(r.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=i.exec(r);return u.push(dx(r.slice(o),o>0,!1)),u.join("")}function dx(e,r,i){let l=0,o=e.length;if(r){let u=e.codePointAt(l);for(;u===cx||u===fx;)l++,u=e.codePointAt(l)}if(i){let u=e.codePointAt(o-1);for(;u===cx||u===fx;)o--,u=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function NT(e,r){const i={type:"text",value:CT(String(r.value))};return e.patch(r,i),e.applyData(r,i)}function AT(e,r){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,i),e.applyData(r,i)}const TT={blockquote:rT,break:iT,code:lT,delete:aT,emphasis:oT,footnoteReference:sT,heading:uT,html:cT,imageReference:fT,image:dT,inlineCode:hT,linkReference:pT,link:mT,listItem:gT,list:yT,paragraph:xT,root:vT,strong:wT,table:ST,tableCell:ET,tableRow:kT,text:NT,thematicBreak:AT,toml:Ts,yaml:Ts,definition:Ts,footnoteDefinition:Ts};function Ts(){}const U0=-1,Lu=0,Pa=1,ou=2,Hh=3,qh=4,$h=5,Ph=6,H0=7,q0=8,hx=typeof self=="object"?self:globalThis,RT=(e,r)=>{const i=(o,u)=>(e.set(u,o),o),l=o=>{if(e.has(o))return e.get(o);const[u,c]=r[o];switch(u){case Lu:case U0:return i(c,o);case Pa:{const f=i([],o);for(const p of c)f.push(l(p));return f}case ou:{const f=i({},o);for(const[p,h]of c)f[l(p)]=l(h);return f}case Hh:return i(new Date(c),o);case qh:{const{source:f,flags:p}=c;return i(new RegExp(f,p),o)}case $h:{const f=i(new Map,o);for(const[p,h]of c)f.set(l(p),l(h));return f}case Ph:{const f=i(new Set,o);for(const p of c)f.add(l(p));return f}case H0:{const{name:f,message:p}=c;return i(new hx[f](p),o)}case q0:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new hx[u](c),o)};return l},px=e=>RT(new Map,e)(0),Al="",{toString:jT}={},{keys:_T}=Object,Fa=e=>{const r=typeof e;if(r!=="object"||!e)return[Lu,r];const i=jT.call(e).slice(8,-1);switch(i){case"Array":return[Pa,Al];case"Object":return[ou,Al];case"Date":return[Hh,Al];case"RegExp":return[qh,Al];case"Map":return[$h,Al];case"Set":return[Ph,Al];case"DataView":return[Pa,i]}return i.includes("Array")?[Pa,i]:i.includes("Error")?[H0,i]:[ou,i]},Rs=([e,r])=>e===Lu&&(r==="function"||r==="symbol"),LT=(e,r,i,l)=>{const o=(c,f)=>{const p=l.push(c)-1;return i.set(f,p),p},u=c=>{if(i.has(c))return i.get(c);let[f,p]=Fa(c);switch(f){case Lu:{let b=c;switch(p){case"bigint":f=q0,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return o([U0],c)}return o([f,b],c)}case Pa:{if(p){let x=c;return p==="DataView"?x=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(x=new Uint8Array(c)),o([p,[...x]],c)}const b=[],g=o([f,b],c);for(const x of c)b.push(u(x));return g}case ou:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const b=[],g=o([f,b],c);for(const x of _T(c))(e||!Rs(Fa(c[x])))&&b.push([u(x),u(c[x])]);return g}case Hh:return o([f,c.toISOString()],c);case qh:{const{source:b,flags:g}=c;return o([f,{source:b,flags:g}],c)}case $h:{const b=[],g=o([f,b],c);for(const[x,v]of c)(e||!(Rs(Fa(x))||Rs(Fa(v))))&&b.push([u(x),u(v)]);return g}case Ph:{const b=[],g=o([f,b],c);for(const x of c)(e||!Rs(Fa(x)))&&b.push(u(x));return g}}const{message:h}=c;return o([f,{name:p,message:h}],c)};return u},mx=(e,{json:r,lossy:i}={})=>{const l=[];return LT(!(r||i),!!r,new Map,l)(e),l},su=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?px(mx(e,r)):structuredClone(e):(e,r)=>px(mx(e,r));function DT(e,r){const i=[{type:"text",value:"↩"}];return r>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),i}function OT(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function MT(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||DT,l=e.options.footnoteBackLabel||OT,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const b=e.all(h),g=String(h.identifier).toUpperCase(),x=Ul(g.toLowerCase());let v=0;const w=[],S=e.footnoteCounts.get(g);for(;S!==void 0&&++v<=S;){w.length>0&&w.push({type:"text",value:" "});let C=typeof i=="string"?i:i(p,v);typeof C=="string"&&(C={type:"text",value:C}),w.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(p,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const N=b[b.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const C=N.children[N.children.length-1];C&&C.type==="text"?C.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...w)}else b.push(...w);const E={type:"element",tagName:"li",properties:{id:r+"fn-"+x},children:e.wrap(b,!0)};e.patch(h,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...su(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
37
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
38
- `}]}}const Du=(function(e){if(e==null)return BT;if(typeof e=="function")return Ou(e);if(typeof e=="object")return Array.isArray(e)?zT(e):FT(e);if(typeof e=="string")return IT(e);throw new Error("Expected function, string, or object as test")});function zT(e){const r=[];let i=-1;for(;++i<e.length;)r[i]=Du(e[i]);return Ou(l);function l(...o){let u=-1;for(;++u<r.length;)if(r[u].apply(this,o))return!0;return!1}}function FT(e){const r=e;return Ou(i);function i(l){const o=l;let u;for(u in e)if(o[u]!==r[u])return!1;return!0}}function IT(e){return Ou(r);function r(i){return i&&i.type===e}}function Ou(e){return r;function r(i,l,o){return!!(UT(i)&&e.call(this,i,typeof l=="number"?l:void 0,o||void 0))}}function BT(){return!0}function UT(e){return e!==null&&typeof e=="object"&&"type"in e}const $0=[],HT=!0,th=!1,qT="skip";function P0(e,r,i,l){let o;typeof r=="function"&&typeof i!="function"?(l=i,i=r):o=r;const u=Du(o),c=l?-1:1;f(e,void 0,[])();function f(p,h,b){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=$0,w,S,N;if((!r||u(p,h,b[b.length-1]||void 0))&&(v=$T(i(p,b)),v[0]===th))return v;if("children"in p&&p.children){const E=p;if(E.children&&v[0]!==qT)for(S=(l?E.children.length:-1)+c,N=b.concat(E);S>-1&&S<E.children.length;){const C=E.children[S];if(w=f(C,S,N)(),w[0]===th)return w;S=typeof w[1]=="number"?w[1]:S+c}}return v}}}function $T(e){return Array.isArray(e)?e:typeof e=="number"?[HT,e]:e==null?$0:[e]}function Vh(e,r,i,l){let o,u,c;typeof r=="function"&&typeof i!="function"?(u=void 0,c=r,o=i):(u=r,c=i,o=l),P0(e,u,f,o);function f(p,h){const b=h[h.length-1],g=b?b.children.indexOf(p):void 0;return c(p,g,b)}}const nh={}.hasOwnProperty,PT={};function VT(e,r){const i=r||PT,l=new Map,o=new Map,u=new Map,c={...TT,...i.handlers},f={all:h,applyData:YT,definitionById:l,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:i,patch:GT,wrap:ZT};return Vh(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?l:o,x=String(b.identifier).toUpperCase();g.has(x)||g.set(x,b)}}),f;function p(b,g){const x=b.type,v=f.handlers[x];if(nh.call(f.handlers,x)&&v)return v(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in b){const{children:S,...N}=b,E=su(N);return E.children=f.all(b),E}return su(b)}return(f.options.unknownHandler||XT)(f,b,g)}function h(b){const g=[];if("children"in b){const x=b.children;let v=-1;for(;++v<x.length;){const w=f.one(x[v],b);if(w){if(v&&x[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=gx(w.value)),!Array.isArray(w)&&w.type==="element")){const S=w.children[0];S&&S.type==="text"&&(S.value=gx(S.value))}Array.isArray(w)?g.push(...w):g.push(w)}}}return g}}function GT(e,r){e.position&&(r.position=O4(e))}function YT(e,r){let i=r;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof l=="string")if(i.type==="element")i.tagName=l;else{const c="children"in i?i.children:[i];i={type:"element",tagName:l,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,su(u)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function XT(e,r){const i=r.data||{},l="value"in r&&!(nh.call(i,"hProperties")||nh.call(i,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function ZT(e,r){const i=[];let l=-1;for(r&&i.push({type:"text",value:`
39
- `});++l<e.length;)l&&i.push({type:"text",value:`
40
- `}),i.push(e[l]);return r&&e.length>0&&i.push({type:"text",value:`
41
- `}),i}function gx(e){let r=0,i=e.charCodeAt(r);for(;i===9||i===32;)r++,i=e.charCodeAt(r);return e.slice(r)}function bx(e,r){const i=VT(e,r),l=i.one(e,void 0),o=MT(i),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
42
- `},o),u}function KT(e,r){return e&&"run"in e?async function(i,l){const o=bx(i,{file:l,...r});await e.run(o,l)}:function(i,l){return bx(i,{file:l,...e||r})}}function yx(e){if(e)throw e}var gd,xx;function QT(){if(xx)return gd;xx=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},u=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!g)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},c=function(h,b){i&&b.name==="__proto__"?i(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},f=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(l)return l(h,b).value}else return;return h[b]};return gd=function p(){var h,b,g,x,v,w,S=arguments[0],N=1,E=arguments.length,C=!1;for(typeof S=="boolean"&&(C=S,S=arguments[1]||{},N=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});N<E;++N)if(h=arguments[N],h!=null)for(b in h)g=f(S,b),x=f(h,b),S!==x&&(C&&x&&(u(x)||(v=o(x)))?(v?(v=!1,w=g&&o(g)?g:[]):w=g&&u(g)?g:{},c(S,{name:b,newValue:p(C,w,x)})):typeof x<"u"&&c(S,{name:b,newValue:x}));return S},gd}var JT=QT();const bd=gu(JT);function rh(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function WT(){const e=[],r={run:i,use:l};return r;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(p,...h){const b=e[++u];let g=-1;if(p){c(p);return}for(;++g<o.length;)(h[g]===null||h[g]===void 0)&&(h[g]=o[g]);o=h,b?e6(b,f)(...h):c(null,...h)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),r}}function e6(e,r){let i;return l;function l(...c){const f=e.length>c.length;let p;f&&c.push(o);try{p=e.apply(this,c)}catch(h){const b=h;if(f&&i)throw b;return o(b)}f||(p&&p.then&&typeof p.then=="function"?p.then(u,o):p instanceof Error?o(p):u(p))}function o(c,...f){i||(i=!0,r(c,...f))}function u(c){o(null,c)}}const Kn={basename:t6,dirname:n6,extname:r6,join:i6,sep:"/"};function t6(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');ao(e);let i=0,l=-1,o=e.length,u;if(r===void 0||r.length===0||r.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else l<0&&(u=!0,l=o+1);return l<0?"":e.slice(i,l)}if(r===e)return"";let c=-1,f=r.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),f>-1&&(e.codePointAt(o)===r.codePointAt(f--)?f<0&&(l=o):(f=-1,l=c));return i===l?l=c:l<0&&(l=e.length),e.slice(i,l)}function n6(e){if(ao(e),e.length===0)return".";let r=-1,i=e.length,l;for(;--i;)if(e.codePointAt(i)===47){if(l){r=i;break}}else l||(l=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function r6(e){ao(e);let r=e.length,i=-1,l=0,o=-1,u=0,c;for(;r--;){const f=e.codePointAt(r);if(f===47){if(c){l=r+1;break}continue}i<0&&(c=!0,i=r+1),f===46?o<0?o=r:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===l+1?"":e.slice(o,i)}function i6(...e){let r=-1,i;for(;++r<e.length;)ao(e[r]),e[r]&&(i=i===void 0?e[r]:i+"/"+e[r]);return i===void 0?".":l6(i)}function l6(e){ao(e);const r=e.codePointAt(0)===47;let i=a6(e,!r);return i.length===0&&!r&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),r?"/"+i:i}function a6(e,r){let i="",l=0,o=-1,u=0,c=-1,f,p;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||l!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",l=0):(i=i.slice(0,p),l=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",l=0,o=c,u=0;continue}}r&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(o+1,c):i=e.slice(o+1,c),l=c-o-1;o=c,u=0}else f===46&&u>-1?u++:u=-1}return i}function ao(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const o6={cwd:s6};function s6(){return"/"}function ih(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function u6(e){if(typeof e=="string")e=new URL(e);else if(!ih(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return c6(e)}function c6(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const r=e.pathname;let i=-1;for(;++i<r.length;)if(r.codePointAt(i)===37&&r.codePointAt(i+1)===50){const l=r.codePointAt(i+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(r)}const yd=["history","path","basename","stem","extname","dirname"];class V0{constructor(r){let i;r?ih(r)?i={path:r}:typeof r=="string"||f6(r)?i={value:r}:i=r:i={},this.cwd="cwd"in i?"":o6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<yd.length;){const u=yd[l];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)yd.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Kn.basename(this.path):void 0}set basename(r){vd(r,"basename"),xd(r,"basename"),this.path=Kn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Kn.dirname(this.path):void 0}set dirname(r){vx(this.basename,"dirname"),this.path=Kn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Kn.extname(this.path):void 0}set extname(r){if(xd(r,"extname"),vx(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){ih(r)&&(r=u6(r)),vd(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Kn.basename(this.path,this.extname):void 0}set stem(r){vd(r,"stem"),xd(r,"stem"),this.path=Kn.join(this.dirname||"",r+(this.extname||""))}fail(r,i,l){const o=this.message(r,i,l);throw o.fatal=!0,o}info(r,i,l){const o=this.message(r,i,l);return o.fatal=void 0,o}message(r,i,l){const o=new Yt(r,i,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function xd(e,r){if(e&&e.includes(Kn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Kn.sep+"`")}function vd(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function vx(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}function f6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const d6=(function(e){const l=this.constructor.prototype,o=l[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,l),u}),h6={}.hasOwnProperty;class Gh extends d6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=WT()}copy(){const r=new Gh;let i=-1;for(;++i<this.attachers.length;){const l=this.attachers[i];r.use(...l)}return r.data(bd(!0,{},this.namespace)),r}data(r,i){return typeof r=="string"?arguments.length===2?(kd("data",this.frozen),this.namespace[r]=i,this):h6.call(this.namespace,r)&&this.namespace[r]||void 0:r?(kd("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=i.call(r,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const i=js(r),l=this.parser||this.Parser;return wd("parse",l),l(String(i),i)}process(r,i){const l=this;return this.freeze(),wd("process",this.parser||this.Parser),Sd("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const f=js(r),p=l.parse(f);l.run(p,f,function(b,g,x){if(b||!g||!x)return h(b);const v=g,w=l.stringify(v,x);g6(w)?x.value=w:x.result=w,h(b,x)});function h(b,g){b||!g?c(b):u?u(g):i(void 0,g)}}}processSync(r){let i=!1,l;return this.freeze(),wd("processSync",this.parser||this.Parser),Sd("processSync",this.compiler||this.Compiler),this.process(r,o),Sx("processSync","process",i),l;function o(u,c){i=!0,yx(u),l=c}}run(r,i,l){wx(r),this.freeze();const o=this.transformers;return!l&&typeof i=="function"&&(l=i,i=void 0),l?u(void 0,l):new Promise(u);function u(c,f){const p=js(i);o.run(r,p,h);function h(b,g,x){const v=g||r;b?f(b):c?c(v):l(void 0,v,x)}}}runSync(r,i){let l=!1,o;return this.run(r,i,u),Sx("runSync","run",l),o;function u(c,f){yx(c),o=f,l=!0}}stringify(r,i){this.freeze();const l=js(i),o=this.compiler||this.Compiler;return Sd("stringify",o),wx(r),o(r,l)}use(r,...i){const l=this.attachers,o=this.namespace;if(kd("use",this.frozen),r!=null)if(typeof r=="function")p(r,i);else if(typeof r=="object")Array.isArray(r)?f(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function u(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...g]=h;p(b,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(o.settings=bd(!0,o.settings,h.settings))}function f(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const g=h[b];u(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,b){let g=-1,x=-1;for(;++g<l.length;)if(l[g][0]===h){x=g;break}if(x===-1)l.push([h,...b]);else if(b.length>0){let[v,...w]=b;const S=l[x][1];rh(S)&&rh(v)&&(v=bd(!0,S,v)),l[x]=[h,v,...w]}}}}const p6=new Gh().freeze();function wd(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Sd(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kd(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wx(e){if(!rh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Sx(e,r,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function js(e){return m6(e)?e:new V0(e)}function m6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function g6(e){return typeof e=="string"||b6(e)}function b6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",kx=[],Ex={allowDangerousHtml:!0},x6=/^(https?|ircs?|mailto|xmpp)$/i,v6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Yh(e){const r=w6(e),i=S6(e);return k6(r.runSync(r.parse(i),i),e)}function w6(e){const r=e.rehypePlugins||kx,i=e.remarkPlugins||kx,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ex}:Ex;return p6().use(nT).use(i).use(KT,l).use(r)}function S6(e){const r=e.children||"",i=new V0;return typeof r=="string"&&(i.value=r),i}function k6(e,r){const i=r.allowedElements,l=r.allowElement,o=r.components,u=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,p=r.urlTransform||E6;for(const b of v6)Object.hasOwn(r,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+y6+b.id,void 0);return Vh(e,h),B4(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function h(b,g,x){if(b.type==="raw"&&x&&typeof g=="number")return c?x.children.splice(g,1):x.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let v;for(v in hd)if(Object.hasOwn(hd,v)&&Object.hasOwn(b.properties,v)){const w=b.properties[v],S=hd[v];(S===null||S.includes(b.tagName))&&(b.properties[v]=p(String(w||""),v,b))}}if(b.type==="element"){let v=i?!i.includes(b.tagName):u?u.includes(b.tagName):!1;if(!v&&l&&typeof g=="number"&&(v=!l(b,g,x)),v&&x&&typeof g=="number")return f&&b.children?x.children.splice(g,1,...b.children):x.children.splice(g,1),g}}}function E6(e){const r=e.indexOf(":"),i=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return r===-1||o!==-1&&r>o||i!==-1&&r>i||l!==-1&&r>l||x6.test(e.slice(0,r))?e:""}function Cx(e,r){const i=String(e);if(typeof r!="string")throw new TypeError("Expected character");let l=0,o=i.indexOf(r);for(;o!==-1;)l++,o=i.indexOf(r,o+r.length);return l}function C6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function N6(e,r,i){const o=Du((i||{}).ignore||[]),u=A6(r);let c=-1;for(;++c<u.length;)P0(e,"text",f);function f(h,b){let g=-1,x;for(;++g<b.length;){const v=b[g],w=x?x.children:void 0;if(o(v,w?w.indexOf(v):void 0,x))return;x=v}if(x)return p(h,b)}function p(h,b){const g=b[b.length-1],x=u[c][0],v=u[c][1];let w=0;const N=g.children.indexOf(h);let E=!1,C=[];x.lastIndex=0;let j=x.exec(h.value);for(;j;){const O=j.index,U={index:j.index,input:j.input,stack:[...b,h]};let _=v(...j,U);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?x.lastIndex=O+1:(w!==O&&C.push({type:"text",value:h.value.slice(w,O)}),Array.isArray(_)?C.push(..._):_&&C.push(_),w=O+j[0].length,E=!0),!x.global)break;j=x.exec(h.value)}return E?(w<h.value.length&&C.push({type:"text",value:h.value.slice(w)}),g.children.splice(N,1,...C)):C=[h],N+C.length}}function A6(e){const r=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<i.length;){const o=i[l];r.push([T6(o[0]),R6(o[1])])}return r}function T6(e){return typeof e=="string"?new RegExp(C6(e),"g"):e}function R6(e){return typeof e=="function"?e:function(){return e}}const Ed="phrasing",Cd=["autolink","link","image","label"];function j6(){return{transforms:[F6],enter:{literalAutolink:L6,literalAutolinkEmail:Nd,literalAutolinkHttp:Nd,literalAutolinkWww:Nd},exit:{literalAutolink:z6,literalAutolinkEmail:M6,literalAutolinkHttp:D6,literalAutolinkWww:O6}}}function _6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Cd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Cd},{character:":",before:"[ps]",after:"\\/",inConstruct:Ed,notInConstruct:Cd}]}}function L6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Nd(e){this.config.enter.autolinkProtocol.call(this,e)}function D6(e){this.config.exit.autolinkProtocol.call(this,e)}function O6(e){this.config.exit.data.call(this,e);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(e)}function M6(e){this.config.exit.autolinkEmail.call(this,e)}function z6(e){this.exit(e)}function F6(e){N6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,I6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),B6]],{ignore:["link","linkReference"]})}function I6(e,r,i,l,o){let u="";if(!G0(o)||(/^w/i.test(r)&&(i=r+i,r="",u="http://"),!U6(i)))return!1;const c=H6(i+l);if(!c[0])return!1;const f={type:"link",title:null,url:u+r+c[0],children:[{type:"text",value:r+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function B6(e,r,i,l){return!G0(l,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+i,children:[{type:"text",value:r+"@"+i}]}}function U6(e){const r=e.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function H6(e){const r=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let i=r[0],l=i.indexOf(")");const o=Cx(e,"(");let u=Cx(e,")");for(;l!==-1&&o>u;)e+=i.slice(0,l+1),i=i.slice(l+1),l=i.indexOf(")"),u++;return[e,i]}function G0(e,r){const i=e.input.charCodeAt(e.index-1);return(e.index===0||zi(i)||ju(i))&&(!r||i!==47)}Y0.peek=K6;function q6(){this.buffer()}function $6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function P6(){this.buffer()}function V6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function G6(e){const r=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=$n(this.sliceSerialize(e)).toLowerCase(),i.label=r}function Y6(e){this.exit(e)}function X6(e){const r=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=$n(this.sliceSerialize(e)).toLowerCase(),i.label=r}function Z6(e){this.exit(e)}function K6(){return"["}function Y0(e,r,i,l){const o=i.createTracker(l);let u=o.move("[^");const c=i.enter("footnoteReference"),f=i.enter("reference");return u+=o.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),c(),u+=o.move("]"),u}function Q6(){return{enter:{gfmFootnoteCallString:q6,gfmFootnoteCall:$6,gfmFootnoteDefinitionLabelString:P6,gfmFootnoteDefinition:V6},exit:{gfmFootnoteCallString:G6,gfmFootnoteCall:Y6,gfmFootnoteDefinitionLabelString:X6,gfmFootnoteDefinition:Z6}}}function J6(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:i,footnoteReference:Y0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(l,o,u,c){const f=u.createTracker(c);let p=f.move("[^");const h=u.enter("footnoteDefinition"),b=u.enter("label");return p+=f.move(u.safe(u.associationId(l),{before:p,after:"]"})),b(),p+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),p+=f.move((r?`
43
- `:" ")+u.indentLines(u.containerFlow(l,f.current()),r?X0:W6))),h(),p}}function W6(e,r,i){return r===0?e:X0(e,r,i)}function X0(e,r,i){return(i?"":" ")+e}const e5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Z0.peek=l5;function t5(){return{canContainEols:["delete"],enter:{strikethrough:r5},exit:{strikethrough:i5}}}function n5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:e5}],handlers:{delete:Z0}}}function r5(e){this.enter({type:"delete",children:[]},e)}function i5(e){this.exit(e)}function Z0(e,r,i,l){const o=i.createTracker(l),u=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function l5(){return"~"}function a5(e){return e.length}function o5(e,r){const i=r||{},l=(i.align||[]).concat(),o=i.stringLength||a5,u=[],c=[],f=[],p=[];let h=0,b=-1;for(;++b<e.length;){const S=[],N=[];let E=-1;for(e[b].length>h&&(h=e[b].length);++E<e[b].length;){const C=s5(e[b][E]);if(i.alignDelimiters!==!1){const j=o(C);N[E]=j,(p[E]===void 0||j>p[E])&&(p[E]=j)}S.push(C)}c[b]=S,f[b]=N}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<h;)u[g]=Nx(l[g]);else{const S=Nx(l);for(;++g<h;)u[g]=S}g=-1;const x=[],v=[];for(;++g<h;){const S=u[g];let N="",E="";S===99?(N=":",E=":"):S===108?N=":":S===114&&(E=":");let C=i.alignDelimiters===!1?1:Math.max(1,p[g]-N.length-E.length);const j=N+"-".repeat(C)+E;i.alignDelimiters!==!1&&(C=N.length+C+E.length,C>p[g]&&(p[g]=C),v[g]=C),x[g]=j}c.splice(1,0,x),f.splice(1,0,v),b=-1;const w=[];for(;++b<c.length;){const S=c[b],N=f[b];g=-1;const E=[];for(;++g<h;){const C=S[g]||"";let j="",O="";if(i.alignDelimiters!==!1){const U=p[g]-(N[g]||0),_=u[g];_===114?j=" ".repeat(U):_===99?U%2?(j=" ".repeat(U/2+.5),O=" ".repeat(U/2-.5)):(j=" ".repeat(U/2),O=j):O=" ".repeat(U)}i.delimiterStart!==!1&&!g&&E.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&C==="")&&(i.delimiterStart!==!1||g)&&E.push(" "),i.alignDelimiters!==!1&&E.push(j),E.push(C),i.alignDelimiters!==!1&&E.push(O),i.padding!==!1&&E.push(" "),(i.delimiterEnd!==!1||g!==h-1)&&E.push("|")}w.push(i.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return w.join(`
44
- `)}function s5(e){return e==null?"":String(e)}function Nx(e){const r=typeof e=="string"?e.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function u5(e,r,i,l){const o=i.enter("blockquote"),u=i.createTracker(l);u.move("> "),u.shift(2);const c=i.indentLines(i.containerFlow(e,u.current()),c5);return o(),c}function c5(e,r,i){return">"+(i?"":" ")+e}function f5(e,r){return Ax(e,r.inConstruct,!0)&&!Ax(e,r.notInConstruct,!1)}function Ax(e,r,i){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return i;let l=-1;for(;++l<r.length;)if(e.includes(r[l]))return!0;return!1}function Tx(e,r,i,l){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
45
- `&&f5(i.stack,i.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
46
- `}function d5(e,r){const i=String(e);let l=i.indexOf(r),o=l,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++u>c&&(c=u):u=1,o=l+r.length,l=i.indexOf(r,o);return c}function h5(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function p5(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function m5(e,r,i,l){const o=p5(i),u=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(h5(e,i)){const g=i.enter("codeIndented"),x=i.indentLines(u,g5);return g(),x}const f=i.createTracker(l),p=o.repeat(Math.max(d5(u,o)+1,3)),h=i.enter("codeFenced");let b=f.move(p);if(e.lang){const g=i.enter(`codeFencedLang${c}`);b+=f.move(i.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=i.enter(`codeFencedMeta${c}`);b+=f.move(" "),b+=f.move(i.safe(e.meta,{before:b,after:`
47
- `,encode:["`"],...f.current()})),g()}return b+=f.move(`
48
- `),u&&(b+=f.move(u+`
49
- `)),b+=f.move(p),h(),b}function g5(e,r,i){return(i?"":" ")+e}function Xh(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function b5(e,r,i,l){const o=Xh(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("definition");let f=i.enter("label");const p=i.createTracker(l);let h=p.move("[");return h+=p.move(i.safe(i.associationId(e),{before:h,after:"]",...p.current()})),h+=p.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(i.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=i.enter("destinationRaw"),h+=p.move(i.safe(e.url,{before:h,after:e.title?" ":`
50
- `,...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),h+=p.move(" "+o),h+=p.move(i.safe(e.title,{before:h,after:o,...p.current()})),h+=p.move(o),f()),c(),h}function y5(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Ja(e){return"&#x"+e.toString(16).toUpperCase()+";"}function uu(e,r,i){const l=Fl(e),o=Fl(r);return l===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}K0.peek=x5;function K0(e,r,i,l){const o=y5(i),u=i.enter("emphasis"),c=i.createTracker(l),f=c.move(o);let p=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=p.charCodeAt(0),b=uu(l.before.charCodeAt(l.before.length-1),h,o);b.inside&&(p=Ja(h)+p.slice(1));const g=p.charCodeAt(p.length-1),x=uu(l.after.charCodeAt(0),g,o);x.inside&&(p=p.slice(0,-1)+Ja(g));const v=c.move(o);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},f+p+v}function x5(e,r,i){return i.options.emphasis||"*"}function v5(e,r){let i=!1;return Vh(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return i=!0,th}),!!((!e.depth||e.depth<3)&&Ih(e)&&(r.options.setext||i))}function w5(e,r,i,l){const o=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(l);if(v5(e,i)){const b=i.enter("headingSetext"),g=i.enter("phrasing"),x=i.containerPhrasing(e,{...u.current(),before:`
51
- `,after:`
52
- `});return g(),b(),x+`
53
- `+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
54
- `))+1))}const c="#".repeat(o),f=i.enter("headingAtx"),p=i.enter("phrasing");u.move(c+" ");let h=i.containerPhrasing(e,{before:"# ",after:`
55
- `,...u.current()});return/^[\t ]/.test(h)&&(h=Ja(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,i.options.closeAtx&&(h+=" "+c),p(),f(),h}Q0.peek=S5;function Q0(e){return e.value||""}function S5(){return"<"}J0.peek=k5;function J0(e,r,i,l){const o=Xh(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let f=i.enter("label");const p=i.createTracker(l);let h=p.move("![");return h+=p.move(i.safe(e.alt,{before:h,after:"]",...p.current()})),h+=p.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(i.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=i.enter("destinationRaw"),h+=p.move(i.safe(e.url,{before:h,after:e.title?" ":")",...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),h+=p.move(" "+o),h+=p.move(i.safe(e.title,{before:h,after:o,...p.current()})),h+=p.move(o),f()),h+=p.move(")"),c(),h}function k5(){return"!"}W0.peek=E5;function W0(e,r,i,l){const o=e.referenceType,u=i.enter("imageReference");let c=i.enter("label");const f=i.createTracker(l);let p=f.move("![");const h=i.safe(e.alt,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const b=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=b,u(),o==="full"||!h||h!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function E5(){return"!"}ev.peek=C5;function ev(e,r,i){let l=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++u<i.unsafe.length;){const c=i.unsafe[u],f=i.compilePattern(c);let p;if(c.atBreak)for(;p=f.exec(l);){let h=p.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(p.index+1)}}return o+l+o}function C5(){return"`"}function tv(e,r){const i=Ih(e);return!!(!r.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}nv.peek=N5;function nv(e,r,i,l){const o=Xh(i),u=o==='"'?"Quote":"Apostrophe",c=i.createTracker(l);let f,p;if(tv(e,i)){const b=i.stack;i.stack=[],f=i.enter("autolink");let g=c.move("<");return g+=c.move(i.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),i.stack=b,g}f=i.enter("link"),p=i.enter("label");let h=c.move("[");return h+=c.move(i.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=i.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(i.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(p=i.enter("destinationRaw"),h+=c.move(i.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=i.enter(`title${u}`),h+=c.move(" "+o),h+=c.move(i.safe(e.title,{before:h,after:o,...c.current()})),h+=c.move(o),p()),h+=c.move(")"),f(),h}function N5(e,r,i){return tv(e,i)?"<":"["}rv.peek=A5;function rv(e,r,i,l){const o=e.referenceType,u=i.enter("linkReference");let c=i.enter("label");const f=i.createTracker(l);let p=f.move("[");const h=i.containerPhrasing(e,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const b=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=b,u(),o==="full"||!h||h!==g?p+=f.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function A5(){return"["}function Zh(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function T5(e){const r=Zh(e),i=e.options.bulletOther;if(!i)return r==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+i+"`) to be different");return i}function R5(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function iv(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function j5(e,r,i,l){const o=i.enter("list"),u=i.bulletCurrent;let c=e.ordered?R5(i):Zh(i);const f=e.ordered?c==="."?")":".":T5(i);let p=r&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),iv(i)===c&&b){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=f),i.bulletCurrent=c;const h=i.containerFlow(e,l);return i.bulletLastUsed=c,i.bulletCurrent=u,o(),h}function _5(e){const r=e.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function L5(e,r,i,l){const o=_5(i);let u=i.bulletCurrent||Zh(i);r&&r.type==="list"&&r.ordered&&(u=(typeof r.start=="number"&&r.start>-1?r.start:1)+(i.options.incrementListMarker===!1?0:r.children.indexOf(e))+u);let c=u.length+1;(o==="tab"||o==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=i.createTracker(l);f.move(u+" ".repeat(c-u.length)),f.shift(c);const p=i.enter("listItem"),h=i.indentLines(i.containerFlow(e,f.current()),b);return p(),h;function b(g,x,v){return x?(v?"":" ".repeat(c))+g:(v?u:u+" ".repeat(c-u.length))+g}}function D5(e,r,i,l){const o=i.enter("paragraph"),u=i.enter("phrasing"),c=i.containerPhrasing(e,l);return u(),o(),c}const O5=Du(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function M5(e,r,i,l){return(e.children.some(function(c){return O5(c)})?i.containerPhrasing:i.containerFlow).call(i,e,l)}function z5(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}lv.peek=F5;function lv(e,r,i,l){const o=z5(i),u=i.enter("strong"),c=i.createTracker(l),f=c.move(o+o);let p=c.move(i.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=p.charCodeAt(0),b=uu(l.before.charCodeAt(l.before.length-1),h,o);b.inside&&(p=Ja(h)+p.slice(1));const g=p.charCodeAt(p.length-1),x=uu(l.after.charCodeAt(0),g,o);x.inside&&(p=p.slice(0,-1)+Ja(g));const v=c.move(o+o);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},f+p+v}function F5(e,r,i){return i.options.strong||"*"}function I5(e,r,i,l){return i.safe(e.value,l)}function B5(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function U5(e,r,i){const l=(iv(i)+(i.options.ruleSpaces?" ":"")).repeat(B5(i));return i.options.ruleSpaces?l.slice(0,-1):l}const av={blockquote:u5,break:Tx,code:m5,definition:b5,emphasis:K0,hardBreak:Tx,heading:w5,html:Q0,image:J0,imageReference:W0,inlineCode:ev,link:nv,linkReference:rv,list:j5,listItem:L5,paragraph:D5,root:M5,strong:lv,text:I5,thematicBreak:U5};function H5(){return{enter:{table:q5,tableData:Rx,tableHeader:Rx,tableRow:P5},exit:{codeText:V5,table:$5,tableData:Ad,tableHeader:Ad,tableRow:Ad}}}function q5(e){const r=e._align;this.enter({type:"table",align:r.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function $5(e){this.exit(e),this.data.inTable=void 0}function P5(e){this.enter({type:"tableRow",children:[]},e)}function Ad(e){this.exit(e)}function Rx(e){this.enter({type:"tableCell",children:[]},e)}function V5(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,G5));const i=this.stack[this.stack.length-1];i.type,i.value=r,this.exit(e)}function G5(e,r){return r==="|"?r:e}function Y5(e){const r=e||{},i=r.tableCellPadding,l=r.tablePipeAlign,o=r.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:p,tableRow:f}};function c(v,w,S,N){return h(b(v,S,N),v.align)}function f(v,w,S,N){const E=g(v,S,N),C=h([E]);return C.slice(0,C.indexOf(`
57
- `))}function p(v,w,S,N){const E=S.enter("tableCell"),C=S.enter("phrasing"),j=S.containerPhrasing(v,{...N,before:u,after:u});return C(),E(),j}function h(v,w){return o5(v,{align:w,alignDelimiters:l,padding:i,stringLength:o})}function b(v,w,S){const N=v.children;let E=-1;const C=[],j=w.enter("table");for(;++E<N.length;)C[E]=g(N[E],w,S);return j(),C}function g(v,w,S){const N=v.children;let E=-1;const C=[],j=w.enter("tableRow");for(;++E<N.length;)C[E]=p(N[E],v,w,S);return j(),C}function x(v,w,S){let N=av.inlineCode(v,w,S);return S.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function X5(){return{exit:{taskListCheckValueChecked:jx,taskListCheckValueUnchecked:jx,paragraph:K5}}}function Z5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Q5}}}function jx(e){const r=this.stack[this.stack.length-2];r.type,r.checked=e.type==="taskListCheckValueChecked"}function K5(e){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const l=i.children[0];if(l&&l.type==="text"){const o=r.children;let u=-1,c;for(;++u<o.length;){const f=o[u];if(f.type==="paragraph"){c=f;break}}c===i&&(l.value=l.value.slice(1),l.value.length===0?i.children.shift():i.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,i.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function Q5(e,r,i,l){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=i.createTracker(l);u&&f.move(c);let p=av.listItem(e,r,i,{...l,...f.current()});return u&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),p;function h(b){return b+c}}function J5(){return[j6(),Q6(),t5(),H5(),X5()]}function W5(e){return{extensions:[_6(),J6(e),n5(),Y5(e),Z5()]}}const e8={tokenize:a8,partial:!0},ov={tokenize:o8,partial:!0},sv={tokenize:s8,partial:!0},uv={tokenize:u8,partial:!0},t8={tokenize:c8,partial:!0},cv={name:"wwwAutolink",tokenize:i8,previous:dv},fv={name:"protocolAutolink",tokenize:l8,previous:hv},Ar={name:"emailAutolink",tokenize:r8,previous:pv},er={};function n8(){return{text:er}}let _i=48;for(;_i<123;)er[_i]=Ar,_i++,_i===58?_i=65:_i===91&&(_i=97);er[43]=Ar;er[45]=Ar;er[46]=Ar;er[95]=Ar;er[72]=[Ar,fv];er[104]=[Ar,fv];er[87]=[Ar,cv];er[119]=[Ar,cv];function r8(e,r,i){const l=this;let o,u;return c;function c(g){return!lh(g)||!pv.call(l,l.previous)||Kh(l.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return lh(g)?(e.consume(g),f):g===64?(e.consume(g),p):i(g)}function p(g){return g===46?e.check(t8,b,h)(g):g===45||g===95||Gt(g)?(u=!0,e.consume(g),p):b(g)}function h(g){return e.consume(g),o=!0,p}function b(g){return u&&o&&Kt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),r(g)):i(g)}}function i8(e,r,i){const l=this;return o;function o(c){return c!==87&&c!==119||!dv.call(l,l.previous)||Kh(l.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(e8,e.attempt(ov,e.attempt(sv,u),i),i)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),r(c)}}function l8(e,r,i){const l=this;let o="",u=!1;return c;function c(g){return(g===72||g===104)&&hv.call(l,l.previous)&&!Kh(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),f):i(g)}function f(g){if(Kt(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(g),p}return i(g)}function p(g){return g===47?(e.consume(g),u?h:(u=!0,p)):i(g)}function h(g){return g===null||au(g)||st(g)||zi(g)||ju(g)?i(g):e.attempt(ov,e.attempt(sv,b),i)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),r(g)}}function a8(e,r,i){let l=0;return o;function o(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),o):c===46&&l===3?(e.consume(c),u):i(c)}function u(c){return c===null?i(c):r(c)}}function o8(e,r,i){let l,o,u;return c;function c(h){return h===46||h===95?e.check(uv,p,f)(h):h===null||st(h)||zi(h)||h!==45&&ju(h)?p(h):(u=!0,e.consume(h),c)}function f(h){return h===95?l=!0:(o=l,l=void 0),e.consume(h),c}function p(h){return o||l||!u?i(h):r(h)}}function s8(e,r){let i=0,l=0;return o;function o(c){return c===40?(i++,e.consume(c),o):c===41&&l<i?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(uv,r,u)(c):c===null||st(c)||zi(c)?r(c):(e.consume(c),o)}function u(c){return c===41&&l++,e.consume(c),o}}function u8(e,r,i){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),u):f===93?(e.consume(f),o):f===60||f===null||st(f)||zi(f)?r(f):i(f)}function o(f){return f===null||f===40||f===91||st(f)||zi(f)?r(f):l(f)}function u(f){return Kt(f)?c(f):i(f)}function c(f){return f===59?(e.consume(f),l):Kt(f)?(e.consume(f),c):i(f)}}function c8(e,r,i){return l;function l(u){return e.consume(u),o}function o(u){return Gt(u)?i(u):r(u)}}function dv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function hv(e){return!Kt(e)}function pv(e){return!(e===47||lh(e))}function lh(e){return e===43||e===45||e===46||e===95||Gt(e)}function Kh(e){let r=e.length,i=!1;for(;r--;){const l=e[r][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){i=!0;break}if(l._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const f8={tokenize:x8,partial:!0};function d8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:g8,continuation:{tokenize:b8},exit:y8}},text:{91:{name:"gfmFootnoteCall",tokenize:m8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:h8,resolveTo:p8}}}}function h8(e,r,i){const l=this;let o=l.events.length;const u=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;o--;){const p=l.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!c||!c._balanced)return i(p);const h=$n(l.sliceSerialize({start:c.end,end:l.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?i(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),r(p))}}function p8(e,r){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[i+1],e[i+2],["enter",l,r],e[i+3],e[i+4],["enter",o,r],["exit",o,r],["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r],e[e.length-2],e[e.length-1],["exit",l,r]];return e.splice(i,e.length-i+1,...f),e}function m8(e,r,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(u>999||g===93&&!c||g===null||g===91||st(g))return i(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes($n(l.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):i(g)}return st(g)||(c=!0),u++,e.consume(g),g===92?b:h}function b(g){return g===91||g===92||g===93?(e.consume(g),u++,h):h(g)}}function g8(e,r,i){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u,c=0,f;return p;function p(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):i(w)}function b(w){if(c>999||w===93&&!f||w===null||w===91||st(w))return i(w);if(w===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return u=$n(l.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return st(w)||(f=!0),c++,e.consume(w),w===92?g:b}function g(w){return w===91||w===92||w===93?(e.consume(w),c++,b):b(w)}function x(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(u)||o.push(u),Ge(e,v,"gfmFootnoteDefinitionWhitespace")):i(w)}function v(w){return r(w)}}function b8(e,r,i){return e.check(lo,r,e.attempt(f8,r,i))}function y8(e){e.exit("gfmFootnoteDefinition")}function x8(e,r,i){const l=this;return Ge(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):i(u)}}function v8(e){let i=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:u,resolveAll:o};return i==null&&(i=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(c,f){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let h=p;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[p][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[p][1].start)},x=[["enter",b,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",g,f]],v=f.parser.constructs.insideSpan.null;v&&En(x,x.length,0,_u(v,c.slice(h+1,p),f)),En(x,x.length,0,[["exit",g,f],["enter",c[p][1],f],["exit",c[p][1],f],["exit",b,f]]),En(c,h-1,p-h+3,x),p=h+x.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function u(c,f,p){const h=this.previous,b=this.events;let g=0;return x;function x(w){return h===126&&b[b.length-1][1].type!=="characterEscape"?p(w):(c.enter("strikethroughSequenceTemporary"),v(w))}function v(w){const S=Fl(h);if(w===126)return g>1?p(w):(c.consume(w),g++,v);if(g<2&&!i)return p(w);const N=c.exit("strikethroughSequenceTemporary"),E=Fl(w);return N._open=!E||E===2&&!!S,N._close=!S||S===2&&!!E,f(w)}}}class w8{constructor(){this.map=[]}add(r,i,l){S8(this,r,i,l)}consume(r){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const l=[];for(;i>0;)i-=1,l.push(r.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),r.length=this.map[i][0];l.push(r.slice()),r.length=0;let o=l.pop();for(;o;){for(const u of o)r.push(u);o=l.pop()}this.map.length=0}}function S8(e,r,i,l){let o=0;if(!(i===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===r){e.map[o][1]+=i,e.map[o][2].push(...l);return}o+=1}e.map.push([r,i,l])}}function k8(e,r){let i=!1;const l=[];for(;r<e.length;){const o=e[r];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[r-1][1].type==="tableDelimiterMarker"){const u=l.length-1;l[u]=l[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);r+=1}return l}function E8(){return{flow:{null:{name:"table",tokenize:C8,resolveAll:N8}}}}function C8(e,r,i){const l=this;let o=0,u=0,c;return f;function f(M){let P=l.events.length-1;for(;P>-1;){const I=l.events[P][1].type;if(I==="lineEnding"||I==="linePrefix")P--;else break}const V=P>-1?l.events[P][1].type:null,J=V==="tableHead"||V==="tableRow"?_:p;return J===_&&l.parser.lazy[l.now().line]?i(M):J(M)}function p(M){return e.enter("tableHead"),e.enter("tableRow"),h(M)}function h(M){return M===124||(c=!0,u+=1),b(M)}function b(M){return M===null?i(M):Ne(M)?u>1?(u=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),v):i(M):He(M)?Ge(e,b,"whitespace")(M):(u+=1,c&&(c=!1,o+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(M)))}function g(M){return M===null||M===124||st(M)?(e.exit("data"),b(M)):(e.consume(M),M===92?x:g)}function x(M){return M===92||M===124?(e.consume(M),g):g(M)}function v(M){return l.interrupt=!1,l.parser.lazy[l.now().line]?i(M):(e.enter("tableDelimiterRow"),c=!1,He(M)?Ge(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):w(M))}function w(M){return M===45||M===58?N(M):M===124?(c=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),S):U(M)}function S(M){return He(M)?Ge(e,N,"whitespace")(M):N(M)}function N(M){return M===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),E):M===45?(u+=1,E(M)):M===null||Ne(M)?O(M):U(M)}function E(M){return M===45?(e.enter("tableDelimiterFiller"),C(M)):U(M)}function C(M){return M===45?(e.consume(M),C):M===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(M))}function j(M){return He(M)?Ge(e,O,"whitespace")(M):O(M)}function O(M){return M===124?w(M):M===null||Ne(M)?!c||o!==u?U(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(M)):U(M)}function U(M){return i(M)}function _(M){return e.enter("tableRow"),F(M)}function F(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),F):M===null||Ne(M)?(e.exit("tableRow"),r(M)):He(M)?Ge(e,F,"whitespace")(M):(e.enter("data"),z(M))}function z(M){return M===null||M===124||st(M)?(e.exit("data"),F(M)):(e.consume(M),M===92?H:z)}function H(M){return M===92||M===124?(e.consume(M),z):z(M)}}function N8(e,r){let i=-1,l=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,p=0,h,b,g;const x=new w8;for(;++i<e.length;){const v=e[i],w=v[1];v[0]==="enter"?w.type==="tableHead"?(f=!1,p!==0&&(_x(x,r,p,h,b),b=void 0,p=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",h,r]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,g=void 0,u=[0,0,0,0],c=[0,i+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",b,r]])),o=w.type==="tableDelimiterRow"?2:b?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],g=_s(x,r,u,o,void 0,g),u=[0,0,0,0]),c[2]=i)):w.type==="tableCellDivider"&&(l?l=!1:(u[1]!==0&&(c[0]=c[1],g=_s(x,r,u,o,void 0,g)),u=c,c=[u[1],i,0,0])):w.type==="tableHead"?(f=!0,p=i):w.type==="tableRow"||w.type==="tableDelimiterRow"?(p=i,u[1]!==0?(c[0]=c[1],g=_s(x,r,u,o,i,g)):c[1]!==0&&(g=_s(x,r,c,o,i,g)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=i)}for(p!==0&&_x(x,r,p,h,b),x.consume(r.events),i=-1;++i<r.events.length;){const v=r.events[i];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=k8(r.events,i))}return e}function _s(e,r,i,l,o,u){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},jl(r.events,i[0])),e.add(i[0],0,[["exit",u,r]]));const p=jl(r.events,i[1]);if(u={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(i[1],0,[["enter",u,r]]),i[2]!==0){const h=jl(r.events,i[2]),b=jl(r.events,i[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},b)};if(e.add(i[2],0,[["enter",g,r]]),l!==2){const x=r.events[i[2]],v=r.events[i[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",i[3]>i[2]+1){const w=i[2]+1,S=i[3]-i[2]-1;e.add(w,S,[])}}e.add(i[3]+1,0,[["exit",g,r]])}return o!==void 0&&(u.end=Object.assign({},jl(r.events,o)),e.add(o,0,[["exit",u,r]]),u=void 0),u}function _x(e,r,i,l,o){const u=[],c=jl(r.events,i);o&&(o.end=Object.assign({},c),u.push(["exit",o,r])),l.end=Object.assign({},c),u.push(["exit",l,r]),e.add(i+1,0,u)}function jl(e,r){const i=e[r],l=i[0]==="enter"?"start":"end";return i[1][l]}const A8={name:"tasklistCheck",tokenize:R8};function T8(){return{text:{91:A8}}}function R8(e,r,i){const l=this;return o;function o(p){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?i(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),u)}function u(p){return st(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):i(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(p)}function f(p){return Ne(p)?r(p):He(p)?e.check({tokenize:j8},r,i)(p):i(p)}}function j8(e,r,i){return Ge(e,l,"whitespace");function l(o){return o===null?i(o):r(o)}}function _8(e){return C0([n8(),d8(),v8(e),E8(),T8()])}const L8={};function Qh(e){const r=this,i=e||L8,l=r.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),u=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(_8(i)),u.push(J5()),c.push(W5(i))}let Lx=null;const D8=()=>(Lx??=jt(()=>import("./mermaid.core-gANNEmg0.js").then(e=>e.bF),[]),Lx),O8=e=>e==="light"?"default":"dark";function M8({chart:e}){const r=A.useRef(null),i=A.useId().replace(/:/g,"-"),[l,o]=A.useState(()=>Ub()),[u,c]=A.useState(null),f=O8(l);return A.useEffect(()=>{const p=document.documentElement,h=()=>{const g=Ub();o(x=>x===g?x:g)};h();const b=new MutationObserver(g=>{g.some(x=>x.attributeName==="data-theme")&&h()});return b.observe(p,{attributes:!0,attributeFilter:["data-theme"]}),()=>{b.disconnect()}},[]),A.useEffect(()=>{let p=!1;const h=r.current;return(async()=>{if(h){h.innerHTML="",c(null);try{const{default:g}=await D8();g.initialize({startOnLoad:!1,securityLevel:"strict",theme:f});const{svg:x,bindFunctions:v}=await g.render(`mermaid-diagram-${i}`,e);if(p)return;h.innerHTML=x,v?.(h)}catch(g){if(p)return;h.innerHTML="",c(g instanceof Error?g.message:"Failed to render Mermaid diagram")}}})(),()=>{p=!0,h&&(h.innerHTML="")}},[e,i,f]),u?y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"text-sm text-github-danger",title:u,children:"Unable to render Mermaid diagram."}),y.jsx("pre",{className:"markdown-preview-code whitespace-pre-wrap border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm font-mono text-github-text-primary",children:e})]}):y.jsx("div",{ref:r,"aria-label":"Mermaid diagram",className:"mermaid-diagram overflow-x-auto rounded border border-github-border bg-github-bg-secondary p-3"})}class Jh{diff(r,i,l={}){let o;typeof l=="function"?(o=l,l={}):"callback"in l&&(o=l.callback);const u=this.castInput(r,l),c=this.castInput(i,l),f=this.removeEmpty(this.tokenize(u,l)),p=this.removeEmpty(this.tokenize(c,l));return this.diffWithOptionsObj(f,p,l,o)}diffWithOptionsObj(r,i,l,o){var u;const c=C=>{if(C=this.postProcess(C,l),o){setTimeout(function(){o(C)},0);return}else return C},f=i.length,p=r.length;let h=1,b=f+p;l.maxEditLength!=null&&(b=Math.min(b,l.maxEditLength));const g=(u=l.timeout)!==null&&u!==void 0?u:1/0,x=Date.now()+g,v=[{oldPos:-1,lastComponent:void 0}];let w=this.extractCommon(v[0],i,r,0,l);if(v[0].oldPos+1>=p&&w+1>=f)return c(this.buildValues(v[0].lastComponent,i,r));let S=-1/0,N=1/0;const E=()=>{for(let C=Math.max(S,-h);C<=Math.min(N,h);C+=2){let j;const O=v[C-1],U=v[C+1];O&&(v[C-1]=void 0);let _=!1;if(U){const z=U.oldPos-C;_=U&&0<=z&&z<f}const F=O&&O.oldPos+1<p;if(!_&&!F){v[C]=void 0;continue}if(!F||_&&O.oldPos<U.oldPos?j=this.addToPath(U,!0,!1,0,l):j=this.addToPath(O,!1,!0,1,l),w=this.extractCommon(j,i,r,C,l),j.oldPos+1>=p&&w+1>=f)return c(this.buildValues(j.lastComponent,i,r))||!0;v[C]=j,j.oldPos+1>=p&&(N=Math.min(N,C-1)),w+1>=f&&(S=Math.max(S,C+1))}h++};if(o)(function C(){setTimeout(function(){if(h>b||Date.now()>x)return o(void 0);E()||C()},0)})();else for(;h<=b&&Date.now()<=x;){const C=E();if(C)return C}}addToPath(r,i,l,o,u){const c=r.lastComponent;return c&&!u.oneChangePerToken&&c.added===i&&c.removed===l?{oldPos:r.oldPos+o,lastComponent:{count:c.count+1,added:i,removed:l,previousComponent:c.previousComponent}}:{oldPos:r.oldPos+o,lastComponent:{count:1,added:i,removed:l,previousComponent:c}}}extractCommon(r,i,l,o,u){const c=i.length,f=l.length;let p=r.oldPos,h=p-o,b=0;for(;h+1<c&&p+1<f&&this.equals(l[p+1],i[h+1],u);)h++,p++,b++,u.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return b&&!u.oneChangePerToken&&(r.lastComponent={count:b,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=p,h}equals(r,i,l){return l.comparator?l.comparator(r,i):r===i||!!l.ignoreCase&&r.toLowerCase()===i.toLowerCase()}removeEmpty(r){const i=[];for(let l=0;l<r.length;l++)r[l]&&i.push(r[l]);return i}castInput(r,i){return r}tokenize(r,i){return Array.from(r)}join(r){return r.join("")}postProcess(r,i){return r}get useLongestToken(){return!1}buildValues(r,i,l){const o=[];let u;for(;r;)o.push(r),u=r.previousComponent,delete r.previousComponent,r=u;o.reverse();const c=o.length;let f=0,p=0,h=0;for(;f<c;f++){const b=o[f];if(b.removed)b.value=this.join(l.slice(h,h+b.count)),h+=b.count;else{if(!b.added&&this.useLongestToken){let g=i.slice(p,p+b.count);g=g.map(function(x,v){const w=l[h+v];return w.length>x.length?w:x}),b.value=this.join(g)}else b.value=this.join(i.slice(p,p+b.count));p+=b.count,b.added||(h+=b.count)}}return o}}function Dx(e,r){let i;for(i=0;i<e.length&&i<r.length;i++)if(e[i]!=r[i])return e.slice(0,i);return e.slice(0,i)}function Ox(e,r){let i;if(!e||!r||e[e.length-1]!=r[r.length-1])return"";for(i=0;i<e.length&&i<r.length;i++)if(e[e.length-(i+1)]!=r[r.length-(i+1)])return e.slice(-i);return e.slice(-i)}function ah(e,r,i){if(e.slice(0,r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(r)}; this is a bug`);return i+e.slice(r.length)}function oh(e,r,i){if(!r)return e+i;if(e.slice(-r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(r)}; this is a bug`);return e.slice(0,-r.length)+i}function Ia(e,r){return ah(e,r,"")}function Ls(e,r){return oh(e,r,"")}function Mx(e,r){return r.slice(0,z8(e,r))}function z8(e,r){let i=0;e.length>r.length&&(i=e.length-r.length);let l=r.length;e.length<r.length&&(l=e.length);const o=Array(l);let u=0;o[0]=0;for(let c=1;c<l;c++){for(r[c]==r[u]?o[c]=o[u]:o[c]=u;u>0&&r[c]!=r[u];)u=o[u];r[c]==r[u]&&u++}u=0;for(let c=i;c<e.length;c++){for(;u>0&&e[c]!=r[u];)u=o[u];e[c]==r[u]&&u++}return u}function Ba(e){let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function ri(e){const r=e.match(/^\s*/);return r?r[0]:""}const cu="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",F8=new RegExp(`[${cu}]+|\\s+|[^${cu}]`,"ug");class I8 extends Jh{equals(r,i,l){return l.ignoreCase&&(r=r.toLowerCase(),i=i.toLowerCase()),r.trim()===i.trim()}tokenize(r,i={}){let l;if(i.intlSegmenter){const c=i.intlSegmenter;if(c.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');l=[];for(const f of Array.from(c.segment(r))){const p=f.segment;l.length&&/\s/.test(l[l.length-1])&&/\s/.test(p)?l[l.length-1]+=p:l.push(p)}}else l=r.match(F8)||[];const o=[];let u=null;return l.forEach(c=>{/\s/.test(c)?u==null?o.push(c):o.push(o.pop()+c):u!=null&&/\s/.test(u)?o[o.length-1]==u?o.push(o.pop()+c):o.push(u+c):o.push(c),u=c}),o}join(r){return r.map((i,l)=>l==0?i:i.replace(/^\s+/,"")).join("")}postProcess(r,i){if(!r||i.oneChangePerToken)return r;let l=null,o=null,u=null;return r.forEach(c=>{c.added?o=c:c.removed?u=c:((o||u)&&zx(l,u,o,c),l=c,o=null,u=null)}),(o||u)&&zx(l,u,o,null),r}}const B8=new I8;function U8(e,r,i){return B8.diff(e,r,i)}function zx(e,r,i,l){if(r&&i){const o=ri(r.value),u=Ba(r.value),c=ri(i.value),f=Ba(i.value);if(e){const p=Dx(o,c);e.value=oh(e.value,c,p),r.value=Ia(r.value,p),i.value=Ia(i.value,p)}if(l){const p=Ox(u,f);l.value=ah(l.value,f,p),r.value=Ls(r.value,p),i.value=Ls(i.value,p)}}else if(i){if(e){const o=ri(i.value);i.value=i.value.substring(o.length)}if(l){const o=ri(l.value);l.value=l.value.substring(o.length)}}else if(e&&l){const o=ri(l.value),u=ri(r.value),c=Ba(r.value),f=Dx(o,u);r.value=Ia(r.value,f);const p=Ox(Ia(o,f),c);r.value=Ls(r.value,p),l.value=ah(l.value,o,p),e.value=oh(e.value,o,o.slice(0,o.length-p.length))}else if(l){const o=ri(l.value),u=Ba(r.value),c=Mx(u,o);r.value=Ls(r.value,c)}else if(e){const o=Ba(e.value),u=ri(r.value),c=Mx(o,u);r.value=Ia(r.value,c)}}class H8 extends Jh{tokenize(r){const i=new RegExp(`(\\r?\\n)|[${cu}]+|[^\\S\\n\\r]+|[^${cu}]`,"ug");return r.match(i)||[]}}const q8=new H8;function $8(e,r,i){return q8.diff(e,r,i)}class P8 extends Jh{constructor(){super(...arguments),this.tokenize=Y8}equals(r,i,l){return l.ignoreWhitespace?((!l.newlineIsToken||!r.includes(`
58
- `))&&(r=r.trim()),(!l.newlineIsToken||!i.includes(`
59
- `))&&(i=i.trim())):l.ignoreNewlineAtEof&&!l.newlineIsToken&&(r.endsWith(`
60
- `)&&(r=r.slice(0,-1)),i.endsWith(`
61
- `)&&(i=i.slice(0,-1))),super.equals(r,i,l)}}const V8=new P8;function G8(e,r,i){return V8.diff(e,r,i)}function Y8(e,r){r.stripTrailingCr&&(e=e.replace(/\r\n/g,`
62
- `));const i=[],l=e.split(/(\n|\r\n)/);l[l.length-1]||l.pop();for(let o=0;o<l.length;o++){const u=l[o];o%2&&!r.newlineIsToken?i[i.length-1]+=u:i.push(u)}return i}function mv(e,r){const i=$8(e,r),l=[],o=[];for(const u of i)u.added?o.push({value:u.value,type:"added"}):u.removed?l.push({value:u.value,type:"removed"}):(l.push({value:u.value,type:"unchanged"}),o.push({value:u.value,type:"unchanged"}));return{oldSegments:l,newSegments:o}}function gv(e,r){if(!e.trim()||!r.trim()||e===r)return!1;const i=U8(e,r);let l=0,o=0;for(const c of i)o+=c.value.length,!c.added&&!c.removed&&(l+=c.value.length);return l/o>=.2}function bv({onSubmit:e,onCancel:r,selectedCode:i,syntaxTheme:l,filename:o}){const[u,c]=A.useState(""),[f,p]=A.useState(!1),[h,b]=A.useState("edit"),g=A.useRef(null),x=D1(u),v=x?h:"edit",w=async N=>{if(N.preventDefault(),!!u.trim()){p(!0);try{await e(u.trim()),c(""),b("edit")}catch(E){console.error("Failed to submit comment:",E)}finally{p(!1)}}},S=N=>{N.key==="Enter"&&(N.metaKey||N.ctrlKey)?w(N):N.key==="Escape"&&r()};return y.jsxs("form",{className:"m-2 mx-3 p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400",onSubmit:w,"data-empty":!u.trim(),children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("span",{className:"text-sm font-medium",style:{color:"var(--color-yellow-path-text)"},children:"Add a comment"}),x?y.jsxs("div",{className:"flex items-center border border-github-border rounded-md overflow-hidden",children:[y.jsx("button",{type:"button",onClick:()=>b("edit"),className:`text-xs px-2.5 py-1.5 ${v==="edit"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>b("preview"),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${v==="preview"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Preview"})]}):y.jsx(O1,{selectedCode:i,value:u,onChange:c,textareaRef:g})]}),x&&v==="preview"?y.jsx("div",{className:"min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2",children:y.jsx(Ud,{body:u,originalCode:i,filename:o,syntaxTheme:l})}):y.jsx("textarea",{ref:g,className:"w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/30 focus:min-h-[80px] disabled:opacity-50",value:u,onChange:N=>c(N.target.value),onKeyDown:S,placeholder:"Leave a comment...",rows:Math.max(3,u.split(`
63
- `).length),autoFocus:!0,disabled:f}),y.jsxs("div",{className:"flex gap-2 justify-end",children:[y.jsx("button",{type:"button",onClick:r,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all disabled:opacity-50",disabled:f,children:"Cancel"}),y.jsx("button",{type:"submit",className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!u.trim()||f,children:f?"Submitting...":"Submit"})]})]})}const fu=Qt.memo(({onMouseDown:e,onMouseUp:r,title:i="Add a comment"})=>y.jsx("button",{className:"absolute -right-2 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10","data-comment-button":"true",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",l.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",l.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},onMouseDown:e,onMouseUp:r,title:i,children:y.jsx(y1,{className:"w-4 h-4"})}));fu.displayName="CommentButton";const du=Qt.memo(({onClick:e,title:r="Open in editor",className:i})=>y.jsx("button",{className:`absolute -right-10 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10 ${i||""}`,"data-open-in-editor-button":"true",style:{backgroundColor:"var(--color-editor-btn-bg)",color:"var(--color-editor-btn-text)",border:"1px solid var(--color-editor-btn-border)"},onMouseEnter:l=>{l.currentTarget.style.backgroundColor="var(--color-editor-btn-hover-bg)",l.currentTarget.style.borderColor="var(--color-editor-btn-hover-border)"},onMouseLeave:l=>{l.currentTarget.style.backgroundColor="var(--color-editor-btn-bg)",l.currentTarget.style.borderColor="var(--color-editor-btn-border)"},onMouseDown:l=>{l.stopPropagation()},onClick:l=>{l.stopPropagation(),e(l)},title:r,children:y.jsx(Q2,{className:"w-4 h-4 opacity-80"})}));du.displayName="OpenInEditorButton";const X8=e=>{if("isExpanded"in e&&e.isExpanded)return"bg-github-bg-tertiary/80";switch(e.type){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},yv=Qt.memo(({line:e,index:r,lineId:i,isCurrentLine:l=!1,hoveredLineIndex:o,selectedLineStyle:u,onMouseEnter:c,onMouseLeave:f,onMouseMove:p,onCommentButtonMouseDown:h,onCommentButtonMouseUp:b,onOpenInEditor:g,syntaxTheme:x,onClick:v,filename:w,diffSegments:S})=>{const N=e.newLineNumber||e.oldLineNumber,E=o===r&&N,C=l?"keyboard-cursor":"";return y.jsxs("tr",{id:i,className:`group ${X8(e)} relative ${u} ${C} cursor-pointer`,onMouseEnter:c,onMouseLeave:f,onMouseMove:p,onClick:v,children:[y.jsx("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative",children:e.oldLineNumber||""}),y.jsxs("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible",children:[y.jsx("span",{children:e.newLineNumber||""}),E&&y.jsxs(y.Fragment,{children:[g&&y.jsx(du,{onClick:g}),y.jsx(fu,{onMouseDown:h,onMouseUp:b})]})]}),y.jsx("td",{className:"p-0 w-full relative align-top",children:y.jsx(L1,{line:e,syntaxTheme:x,filename:w,diffSegments:S})})]})});yv.displayName="DiffLineRow";const Fx=e=>e!==void 0&&"isExpanded"in e&&e.isExpanded===!0,Ix=(e,r)=>r?"bg-github-bg-tertiary/80":e?.type==="delete"?"bg-diff-deletion-bg":e?.type==="add"?"bg-diff-addition-bg":e?.type==="normal"?"bg-transparent":"bg-github-bg-secondary";function Z8({chunk:e,chunkIndex:r,comments:i,showAuthorBadges:l=!1,onAddComment:o,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,syntaxTheme:p,cursor:h=null,fileIndex:b=0,onLineClick:g,commentTrigger:x,onCommentTriggerHandled:v,filename:w,onOpenInEditor:S}){const[N,E]=A.useState(null),[C,j]=A.useState(null),[O,U]=A.useState(!1),[_,F]=A.useState(null),[z,H]=A.useState(null);A.useEffect(()=>{if(x?.lineIndex!==void 0){const q=e.lines[x.lineIndex];if(q&&q.type!=="delete"){const R=q.newLineNumber;R&&(F({side:"new",lineNumber:R}),v?.())}}},[x,e.lines,v]),A.useEffect(()=>{if(O){const q=()=>{U(!1),E(null),j(null)};return document.addEventListener("mouseup",q),()=>{document.removeEventListener("mouseup",q)}}},[O]);const M=A.useCallback((q,R)=>{_?.side===q&&_?.lineNumber===R?F(null):F({side:q,lineNumber:R})},[_]),P=A.useCallback(()=>{F(null)},[]),V=A.useCallback(()=>{if(!_)return"";const{side:q,lineNumber:R}=_,D=e.lines;if(typeof R=="number")return D.find(T=>q==="old"?T.oldLineNumber===R:T.newLineNumber===R)?.content?.replace(/^[+-]/,"")||"";{const[$,T]=R;return D.filter(te=>{const ce=q==="old"?te.oldLineNumber:te.newLineNumber;return ce!==void 0&&ce>=$&&ce<=T}).map(te=>te.content?.replace(/^[+-]/,"")||"").join(`
64
- `)}},[_,e.lines]),J=A.useCallback(async q=>{if(_!==null){const R=V();await o(_.lineNumber,q,R||void 0,_.side),F(null)}},[_,o,V]),I=(q,R)=>i.filter(D=>{const $=Array.isArray(D.line)?D.line[1]===q:D.line===q,T=!D.side||D.side===R;return $&&T}),Z=q=>q.oldLine?.type==="delete"&&q.newLine?.type==="add"?q.newLineNumber?"right":"left":q.oldLine?.type==="delete"?"left":q.newLine?.type==="add"?"right":"full",B=(q,R)=>{const D=q==="old"?R.oldLineNumber:R.newLineNumber;if(!D)return"";if(O&&N&&C&&N.side===q&&C.side===q){const $=Math.min(N.lineNumber,C.lineNumber),T=Math.max(N.lineNumber,C.lineNumber);if(D>=$&&D<=T){let W="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return D===$&&(W+=" after:border-t-2"),D===T&&(W+=" after:border-b-2"),W}}if(_&&_.side===q){const $=Array.isArray(_.lineNumber)?_.lineNumber:[_.lineNumber,_.lineNumber],T=$[0],W=$[1];if(T!==void 0&&W!==void 0&&D>=T&&D<=W)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},Y=A.useCallback(q=>{const R=[];let D=e.oldStart,$=e.newStart,T=0;for(;T<q.length;){const W=q[T];if(!W){T++;continue}if(W.type==="normal")R.push({oldLine:W,newLine:{...W},oldLineNumber:W.oldLineNumber??D,newLineNumber:W.newLineNumber??$,oldLineOriginalIndex:T,newLineOriginalIndex:T}),D++,$++,T++;else if(W.type==="delete"){let te=T+1;for(;te<q.length&&q[te]?.type==="delete";)te++;const ce=q.slice(T,te),me=T,xe=[],ge=te;for(;te<q.length&&q[te]?.type==="add";){const Ee=q[te];Ee&&xe.push(Ee),te++}const ve=Math.max(ce.length,xe.length);for(let Ee=0;Ee<ve;Ee++){const de=ce[Ee],ye=xe[Ee];let we;de&&ye&&gv(de.content,ye.content)&&(we=mv(de.content,ye.content)),R.push({oldLine:de,newLine:ye,oldLineNumber:de?de.oldLineNumber??D+Ee:void 0,newLineNumber:ye?ye.newLineNumber??$+Ee:void 0,oldLineOriginalIndex:de?me+Ee:void 0,newLineOriginalIndex:ye?ge+Ee:void 0,wordLevelDiff:we})}D+=ce.length,$+=xe.length,T=te}else W.type==="add"&&(R.push({newLine:W,newLineNumber:W.newLineNumber??$,newLineOriginalIndex:T}),$++,T++)}return R},[e.oldStart,e.newStart]),X=A.useMemo(()=>Y(e.lines),[e.lines,Y]);return y.jsx("div",{className:"bg-github-bg-primary overflow-hidden",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:X.map((q,R)=>{const D=q.oldLineNumber?I(q.oldLineNumber,"old"):[],$=q.newLineNumber?I(q.newLineNumber,"new"):[],T=[...D,...$],W=q.oldLineOriginalIndex??-1,te=q.newLineOriginalIndex??-1,ce=h?h.side==="left"&&W>=0?h.chunkIndex===r&&h.lineIndex===W:h.side==="right"&&te>=0?h.chunkIndex===r&&h.lineIndex===te:!1:!1,me=W>=0?`file-${b}-chunk-${r}-line-${W}-left`:void 0,xe=te>=0?`file-${b}-chunk-${r}-line-${te}-right`:void 0,ge=ce&&h?.side==="left",ve=ce&&h?.side==="right",Ee="keyboard-cursor";return y.jsxs(Qt.Fragment,{children:[y.jsxs("tr",{className:"group cursor-pointer",onClick:de=>{if(!O){const ye=de.target;if(!(ye instanceof HTMLElement))return;const we=ye.closest("td:nth-child(1)")||ye.closest("td:nth-child(2)"),je=ye.closest("td:nth-child(3)")||ye.closest("td:nth-child(4)");we&&W>=0?g?.(b,r,W,"left"):je&&te>=0&&g?.(b,r,te,"right")}},onMouseEnter:de=>{const ye=de.target;if(!(ye instanceof HTMLElement))return;const we=ye.closest("td:nth-child(1)")||ye.closest("td:nth-child(2)"),je=ye.closest("td:nth-child(3)")||ye.closest("td:nth-child(4)");we&&q.oldLineNumber?H({side:"old",lineNumber:q.oldLineNumber}):je&&q.newLineNumber&&H({side:"new",lineNumber:q.newLineNumber})},onMouseMove:de=>{const ye=de.target;if(!(ye instanceof HTMLElement))return;const we=ye.closest("td:nth-child(1)")||ye.closest("td:nth-child(2)"),je=ye.closest("td:nth-child(3)")||ye.closest("td:nth-child(4)");we&&q.oldLineNumber?(z?.side!=="old"||z?.lineNumber!==q.oldLineNumber)&&H({side:"old",lineNumber:q.oldLineNumber}):je&&q.newLineNumber&&(z?.side!=="new"||z?.lineNumber!==q.newLineNumber)&&H({side:"new",lineNumber:q.newLineNumber}),O&&N&&(N.side==="old"&&q.oldLineNumber?j({side:"old",lineNumber:q.oldLineNumber}):N.side==="new"&&q.newLineNumber&&j({side:"new",lineNumber:q.newLineNumber}))},onMouseLeave:()=>H(null),children:[y.jsxs("td",{id:me,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ge?Ee:""}`,children:[y.jsx("span",{children:q.oldLineNumber||""}),z?.side==="old"&&z?.lineNumber===q.oldLineNumber&&y.jsxs(y.Fragment,{children:[S&&w&&q.oldLine?.type!=="delete"&&q.newLineNumber!==void 0&&y.jsx(du,{onClick:()=>{const de=q.newLineNumber;!w||de===void 0||S(w,de)}}),y.jsx(fu,{onMouseDown:de=>{de.stopPropagation(),q.oldLineNumber&&(E({side:"old",lineNumber:q.oldLineNumber}),j({side:"old",lineNumber:q.oldLineNumber}),U(!0))},onMouseUp:de=>{if(de.stopPropagation(),!q.oldLineNumber||!N){U(!1),E(null),j(null);return}const ye=C&&C.side==="old"?C.lineNumber:q.oldLineNumber;if(N.side!=="old"||N.lineNumber===ye)M("old",q.oldLineNumber);else{const we=Math.min(N.lineNumber,ye),je=Math.max(N.lineNumber,ye);M("old",[we,je])}U(!1),E(null),j(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Ix(q.oldLine,Fx(q.oldLine))} ${B("old",q)} ${ge?Ee:""}`,children:q.oldLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:q.wordLevelDiff?y.jsx(Bd,{segments:q.wordLevelDiff.oldSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Xa,{code:q.oldLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:p,filename:w})})}),y.jsxs("td",{id:xe,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ve?Ee:""}`,children:[y.jsx("span",{children:q.newLineNumber||""}),z?.side==="new"&&z?.lineNumber===q.newLineNumber&&y.jsxs(y.Fragment,{children:[S&&w&&q.newLineNumber!==void 0&&y.jsx(du,{onClick:()=>{const de=q.newLineNumber;!w||de===void 0||S(w,de)}}),y.jsx(fu,{onMouseDown:de=>{de.stopPropagation(),q.newLineNumber&&(E({side:"new",lineNumber:q.newLineNumber}),j({side:"new",lineNumber:q.newLineNumber}),U(!0))},onMouseUp:de=>{if(de.stopPropagation(),!q.newLineNumber||!N){U(!1),E(null),j(null);return}const ye=C&&C.side==="new"?C.lineNumber:q.newLineNumber;if(N.side!=="new"||N.lineNumber===ye)M("new",q.newLineNumber);else{const we=Math.min(N.lineNumber,ye),je=Math.max(N.lineNumber,ye);M("new",[we,je])}U(!1),E(null),j(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top relative ${Ix(q.newLine,Fx(q.newLine))} ${B("new",q)} ${ve?Ee:""}`,children:q.newLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:q.wordLevelDiff?y.jsx(Bd,{segments:q.wordLevelDiff.newSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Xa,{code:q.newLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:p,filename:w})})})]}),T.length>0&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0 border-t border-github-border",children:T.map(de=>{const ye=de.side||"new";let we;return ye==="old"&&q.oldLineNumber?we="left":ye==="new"&&q.newLineNumber?we="right":we=Z(q),y.jsx("div",{className:`flex ${we==="left"?"justify-start":we==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${we==="full"?"w-full":"w-1/2"}`,children:y.jsx("div",{className:"m-2 mx-3",children:y.jsx(Sh,{comment:de,showAuthorBadge:l,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,syntaxTheme:p})})})},de.id)})})}),_&&(_.side==="old"&&_.lineNumber===q.oldLineNumber||_.side==="new"&&_.lineNumber===q.newLineNumber||Array.isArray(_.lineNumber)&&(_.side==="new"&&_.lineNumber[1]===q.newLineNumber||_.side==="old"&&_.lineNumber[1]===q.oldLineNumber))&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0",children:y.jsx("div",{className:`flex ${_.side==="old"?"justify-start":_.side==="new"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:"w-1/2",children:y.jsx(bv,{onSubmit:J,onCancel:P,selectedCode:V(),syntaxTheme:p,filename:w})})})})})]},R)})})})})}const K8=A.memo(function({chunk:r,chunkIndex:i,comments:l,showAuthorBadges:o=!1,onAddComment:u,onGeneratePrompt:c,onRemoveComment:f,onUpdateComment:p,mode:h=eo,syntaxTheme:b,cursor:g=null,fileIndex:x=0,onLineClick:v,commentTrigger:w,onCommentTriggerHandled:S,filename:N,onOpenInEditor:E}){const[C,j]=A.useState(null),[O,U]=A.useState(null),[_,F]=A.useState(!1),[z,H]=A.useState(null),[M,P]=A.useState(null);A.useEffect(()=>{if(w?.lineIndex!==void 0){const R=r.lines[w.lineIndex];if(R){const D=R.newLineNumber||R.oldLineNumber,$=R.type==="delete"?"old":"new";D&&(H({side:$,lineNumber:D}),S?.())}}},[w,r.lines,S]),A.useEffect(()=>{if(_){const R=()=>{F(!1),j(null),U(null)};return document.addEventListener("mouseup",R),()=>{document.removeEventListener("mouseup",R)}}},[_]);const V=A.useCallback((R,D)=>{z?.side===R&&z?.lineNumber===D?H(null):H({side:R,lineNumber:D})},[z]),J=A.useCallback(()=>{H(null)},[]),I=A.useCallback(()=>{if(!z)return"";const{side:R,lineNumber:D}=z,$=r.lines;if(typeof D=="number")return $.find(W=>R==="old"?W.oldLineNumber===D:W.newLineNumber===D)?.content?.replace(/^[+-]/,"")||"";{const[T,W]=D;return $.filter(ce=>{const me=R==="old"?ce.oldLineNumber:ce.newLineNumber;return me!==void 0&&me>=T&&me<=W}).map(ce=>ce.content?.replace(/^[+-]/,"")||"").join(`
65
- `)}},[z,r.lines]),Z=A.useCallback(async R=>{if(z!==null){const D=I();await u(z.lineNumber,R,D||void 0,z.side),H(null)}},[z,u,I]),B=(R,D)=>l.filter($=>{const T=Array.isArray($.line)?$.line[1]===R:$.line===R,W=!$.side||$.side===D;return T&&W}),Y=R=>{if(h==="unified")return"full";switch(R.type){case"delete":return"left";case"add":return"right";default:return"full"}},X=(R,D)=>{if(!R)return"";if(_&&C&&O){const $=Math.min(C,O),T=Math.max(C,O);if(R>=$&&R<=T){let W="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return R===$&&(W+=" after:border-t-2"),R===T&&(W+=" after:border-b-2"),W}}if(z&&z.side===D){const $=Array.isArray(z.lineNumber)?z.lineNumber[0]:z.lineNumber,T=Array.isArray(z.lineNumber)?z.lineNumber[1]:z.lineNumber;if(R>=$&&R<=T)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},q=A.useMemo(()=>{const R=new Map,D=r.lines;let $=0;for(;$<D.length;){const T=D[$];if(!T){$++;continue}if(T.type==="delete"){let W=$+1;for(;W<D.length&&D[W]?.type==="delete";)W++;const te=D.slice($,W),ce=$,me=[];for(;W<D.length&&D[W]?.type==="add";){const ge=D[W];ge&&me.push({line:ge,index:W}),W++}const xe=Math.max(te.length,me.length);for(let ge=0;ge<xe;ge++){const ve=te[ge],Ee=me[ge];if(ve&&Ee&&gv(ve.content,Ee.line.content)){const de=mv(ve.content,Ee.line.content);R.set(ce+ge,de.oldSegments),R.set(Ee.index,de.newSegments)}}$=W}else $++}return R},[r.lines]);return h==="split"?y.jsx(Z8,{chunk:r,chunkIndex:i,comments:l,showAuthorBadges:o,onAddComment:u,onGeneratePrompt:c,onRemoveComment:f,onUpdateComment:p,onOpenInEditor:E,syntaxTheme:b,cursor:g,fileIndex:x,onLineClick:v,filename:N,commentTrigger:w,onCommentTriggerHandled:S}):y.jsx("div",{className:"bg-github-bg-primary",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:r.lines.map((R,D)=>{const $=R.newLineNumber||R.oldLineNumber||0,T=R.type==="delete"?"old":"new",W=z?Array.isArray(z.lineNumber)?z.lineNumber[1]:z.lineNumber:null,te=R.type==="delete"?R.oldLineNumber:R.newLineNumber,ce=R.type==="delete"?"old":"new",me=te?B(te,ce):[],xe=`file-${x}-chunk-${i}-line-${D}`,ge=g&&g.chunkIndex===i&&g.lineIndex===D;return y.jsxs(Qt.Fragment,{children:[y.jsx(yv,{line:R,index:D,lineId:xe,isCurrentLine:ge||!1,hoveredLineIndex:M,selectedLineStyle:X(R.newLineNumber||R.oldLineNumber,R.type==="delete"?"old":"new"),onMouseEnter:()=>{P(D)},onMouseLeave:()=>P(null),onMouseMove:()=>{if(_&&C){const ve=R.newLineNumber||R.oldLineNumber;ve&&U(ve)}},onCommentButtonMouseDown:ve=>{ve.stopPropagation();const Ee=R.newLineNumber||R.oldLineNumber;Ee&&(j(Ee),U(Ee),F(!0))},onCommentButtonMouseUp:ve=>{ve.stopPropagation();const Ee=R.newLineNumber||R.oldLineNumber,de=R.type==="delete"?"old":"new";if(!Ee||!C){F(!1),j(null),U(null);return}const ye=O||Ee;if(C===ye)V(de,Ee);else{const we=Math.min(C,ye),je=Math.max(C,ye);V(de,[we,je])}F(!1),j(null),U(null)},onOpenInEditor:E&&N&&R.type!=="delete"&&(R.newLineNumber||R.oldLineNumber)?()=>{const ve=R.newLineNumber||R.oldLineNumber;ve&&N&&E(N,ve)}:void 0,syntaxTheme:b,filename:N,diffSegments:q.get(D),onClick:()=>{const ve=R.type==="delete"?"left":"right";v?.(x,i,D,ve)}}),me.map(ve=>{const Ee=Y(R);return y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:3,className:"p-0 border-t border-github-border",children:y.jsx("div",{className:`flex ${Ee==="left"?"justify-start":Ee==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${Ee==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(Sh,{comment:ve,showAuthorBadge:o,onGeneratePrompt:c,onRemoveComment:f,onUpdateComment:p,syntaxTheme:b})})})})},ve.id)}),z&&z.side===T&&W===$&&y.jsx("tr",{className:"bg-[var(--bg-secondary)]",children:y.jsx("td",{colSpan:3,className:"p-0",children:y.jsx("div",{className:`flex ${Y(R)==="left"?"justify-start":Y(R)==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${Y(R)==="full"?"w-full":"w-1/2"}`,children:y.jsx(bv,{onSubmit:Z,onCancel:J,selectedCode:I(),syntaxTheme:b,filename:N})})})})})]},D)})})})})}),Td=20,Rd=A.memo(function({direction:r,hiddenLines:i,onExpandUp:l,onExpandDown:o,onExpandAll:u,isLoading:c=!1}){if(i<=0)return null;const f=`${i} ${i===1?"line":"lines"}`,p=i<=Td,h="grid-cols-[var(--line-number-width)_1fr]",b="flex flex-1 w-full items-center justify-center py-1 text-github-text-primary hover:bg-github-bg-secondary hover:text-github-text-muted transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",g=[];return p?g.push({key:"all",onClick:u,ariaLabel:`Expand all ${i} hidden lines`,icon:y.jsx(Lk,{size:16,"aria-hidden":"true"})}):((r==="up"||r==="both")&&g.push({key:"up",onClick:l,ariaLabel:`Expand ${Td} hidden lines above`,icon:y.jsx(D2,{size:12,"aria-hidden":"true",className:"translate-y-0.5"})}),(r==="down"||r==="both")&&g.push({key:"down",onClick:o,ariaLabel:`Expand ${Td} hidden lines below`,icon:y.jsx(_2,{size:12,"aria-hidden":"true",className:"-translate-y-0.5"})})),y.jsxs("div",{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm ${h}`,children:[y.jsx("div",{className:"flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border",children:c?y.jsx(pk,{size:14,className:"animate-spin text-github-text-muted self-center","aria-hidden":"true"}):g.map(x=>y.jsx("button",{type:"button",onClick:x.onClick,disabled:c||!x.onClick,className:b,title:x.ariaLabel,"aria-label":x.ariaLabel,children:x.icon},x.key))}),y.jsx("div",{className:"flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none",children:f})]})});function hu({file:e,comments:r,showAuthorBadges:i,diffMode:l,syntaxTheme:o,cursor:u,fileIndex:c,mergedChunks:f,isExpandLoading:p,expandHiddenLines:h,expandAllBetweenChunks:b,onAddComment:g,onGeneratePrompt:x,onRemoveComment:v,onUpdateComment:w,onLineClick:S,onOpenInEditor:N,commentTrigger:E,onCommentTriggerHandled:C}){const j=(O,U,_,F)=>O==="top"&&U.hiddenLinesBefore>0?y.jsx(Rd,{direction:"down",hiddenLines:U.hiddenLinesBefore,onExpandDown:()=>h(e,_,"up"),onExpandAll:()=>b(e,_,U.hiddenLinesBefore),isLoading:p}):O==="middle"&&U.hiddenLinesBefore>0?y.jsx(Rd,{direction:"both",hiddenLines:U.hiddenLinesBefore,onExpandUp:()=>h(e,_-1,"down"),onExpandDown:()=>h(e,_,"up"),onExpandAll:()=>b(e,_,U.hiddenLinesBefore),isLoading:p}):O==="bottom"&&U.hiddenLinesAfter>0?y.jsx(Rd,{direction:"up",hiddenLines:U.hiddenLinesAfter,onExpandUp:()=>h(e,F,"down"),onExpandAll:()=>h(e,F,"down",U.hiddenLinesAfter),isLoading:p}):null;return y.jsx(y.Fragment,{children:f.map((O,U)=>{const _=U===0,F=U===f.length-1,z=O.originalIndices[0]??0,H=O.originalIndices[O.originalIndices.length-1]??0;return y.jsxs(Qt.Fragment,{children:[_&&j("top",O,z,H),!_&&j("middle",O,z,H),y.jsx("div",{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${U}`,children:y.jsx(K8,{chunk:O,chunkIndex:U,comments:r,showAuthorBadges:i,onAddComment:g,onGeneratePrompt:x,onRemoveComment:v,onUpdateComment:w,onOpenInEditor:N,mode:l,syntaxTheme:o,cursor:u&&u.chunkIndex===U?u:null,fileIndex:c,onLineClick:S,commentTrigger:E&&E.chunkIndex===U?E:null,onCommentTriggerHandled:C,filename:e.path})}),F&&j("bottom",O,z,H)]},U)})})}const Q8=e=>!!(e&&e!=="stdin"),Tl=["text-[26px] font-semibold","text-[22px] font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold uppercase tracking-wide","text-base font-semibold"],J8=e=>e.type==="delete"||e.type==="remove",W8=e=>e.type==="normal"||e.type==="context",pu=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),sh=(e,r,i)=>{const l=e[e.length-1];if(l&&l.type===r){l.lines.push(i);return}e.push({type:r,lines:[i]})},jd=(e,r)=>{r.forEach(i=>sh(e,"delete",i)),r.length=0},eR=e=>{const r=[],i=[];let l=!1;return e.forEach(o=>{o.lines.forEach(u=>{if(!(u.type==="header"||u.type==="hunk")){if(J8(u)){i.push(u.content);return}if(u.type==="add"){i.length>0&&(jd(r,i),l=!0),sh(r,l?"change":"add",u.content);return}W8(u)&&(jd(r,i),l=!1,sh(r,"context",u.content))}}),jd(r,i),l=!1}),r},tR=e=>Qt.isValidElement(e),nR=e=>Qt.isValidElement(e),uh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(uh).join(""):tR(e)?uh(e.props.children):"",xv=e=>({h1:({children:r})=>y.jsx("h1",{className:`${Tl[0]} mt-6 mb-2 first:mt-0`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${Tl[1]} mt-6 mb-2 first:mt-0`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${Tl[2]} mt-6 mb-2 first:mt-0`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${Tl[3]} mt-6 mb-2 first:mt-0`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${Tl[4]} mt-6 mb-2 first:mt-0`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${Tl[5]} mt-6 mb-2 first:mt-0`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-base leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-base space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-base space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:i})=>{const l=r??"";if(!l||!pu(l))return y.jsx("span",{children:i});const o=l.startsWith("http");return y.jsx("a",{href:l,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:i})},img:({src:r,alt:i})=>{const l=r??"";return!l||!pu(l)?null:y.jsx("img",{src:l,alt:i??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const l=(Array.isArray(r)?r:[r]).find(nR),o=uh(l??r),c=/language-(\S+)/.exec(l?.props.className??"")?.[1],f=o.replace(/\n$/,"");return c==="mermaid"&&f.trim()?y.jsx(M8,{chart:f}):o.trim()?y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:y.jsx(wh,{code:f,language:c,syntaxTheme:e,className:"font-mono text-github-text-primary"})}):y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:r})},code:({className:r,children:i})=>r?y.jsx("code",{className:r,children:i}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono",children:i})}),rR=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},iR=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),lR=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),aR=e=>/^\s*<!--.*-->\s*$/.test(e),oR=e=>e.trim()===""||iR(e)||lR(e)||aR(e),sR=e=>e.every(oR),uR=({blocks:e,syntaxTheme:r})=>{const i=A.useMemo(()=>xv(r),[r]);return y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const c=l.lines.join(`
66
- `).trim();if(!c)return null;const f=sR(l.lines);return y.jsx("div",{className:`px-4 ${rR(l.type)}`,children:f?y.jsx("pre",{className:"whitespace-pre-wrap text-sm text-github-text-primary font-mono",children:c}):y.jsx(Yh,{remarkPlugins:[Qh],urlTransform:p=>pu(p)?p:"",components:i,children:c})},`preview-block-${o}`)})})},cR=({content:e,syntaxTheme:r})=>{const i=A.useMemo(()=>xv(r),[r]);return y.jsx("div",{className:"space-y-4",children:y.jsx(Yh,{remarkPlugins:[Qh],urlTransform:l=>pu(l)?l:"",components:i,children:e})})};function fR(e){const{file:r,baseCommitish:i,targetCommitish:l,mergedChunks:o,syntaxTheme:u}=e,[c,f]=A.useState("diff"),[p,h]=A.useState(null),[b,g]=A.useState(!1),[x,v]=A.useState(null),[w,S]=A.useState(null),N=A.useMemo(()=>eR(o),[o]),E=A.useMemo(()=>!i&&!l?null:r.status==="added"?l?{path:r.path,ref:l}:null:r.status==="deleted"?i?{path:r.oldPath||r.path,ref:i}:null:l?{path:r.path,ref:l}:i?{path:r.oldPath||r.path,ref:i}:null,[i,l,r.path,r.oldPath,r.status]),C=A.useMemo(()=>E?`${E.ref}:${E.path}`:null,[E]);A.useEffect(()=>{if(!E||!C||!Q8(E.ref)){h(null),S(null),v(null),g(!1);return}let O=!1;return(C!==w||p===null)&&(async()=>{C!==w&&h(null),g(!0),v(null);try{const _=encodeURIComponent(E.path),F=await fetch(`/api/blob/${_}?ref=${encodeURIComponent(E.ref)}`);if(!F.ok)throw new Error(`Failed to fetch preview: ${F.statusText}`);const z=await F.text();O||(h(z),S(C))}catch(_){O||(h(null),S(null),v(_ instanceof Error?_.message:"Failed to load preview"))}finally{O||g(!1)}})(),()=>{O=!0}},[p,w,E,C]);const j=A.useMemo(()=>C===w&&p!==null,[p,w,C]);return A.useEffect(()=>{c==="full-preview"&&!j&&f("diff-preview")},[j,c]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>f("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(bu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>f("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Is,{size:14}),"Diff Preview"]}),j&&y.jsxs("button",{onClick:()=>f("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Is,{size:14}),"Full Preview"]})]})}),c==="diff"&&y.jsx(hu,{...e}),c==="diff-preview"&&y.jsx("div",{className:"p-4",children:y.jsx(uR,{blocks:N,syntaxTheme:u})}),c==="full-preview"&&y.jsxs("div",{className:"p-4",children:[b&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),x&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:x}),!b&&!x&&p!==null&&y.jsx(cR,{content:p,syntaxTheme:u}),!b&&!x&&p===null&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Rl=["text-2xl font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold","text-sm font-semibold uppercase tracking-wide","text-sm font-semibold"],vv={markdown:"Markdown",code:"Code",raw:"Raw",unknown:"Cell"},dR=/"cell_type"\s*:\s*"([^"]+)"/,Bx=/"source"\s*:/,hR=/"execution_count"\s*:\s*(null|[0-9]+)/,pR=/"id"\s*:\s*"([^"]+)"/,mR=e=>e.type==="delete"||e.type==="remove",gR=e=>e.type==="normal"||e.type==="context",wv=e=>e.type==="add"?"add":mR(e)?"delete":gR(e)?"context":null,Sv=e=>e==="markdown"||e==="code"||e==="raw"?e:"unknown",bR=e=>{const r=e.trim();if(!r.startsWith('"'))return null;let i=r;i.endsWith(",")&&(i=i.slice(0,-1));try{const l=JSON.parse(i);return typeof l=="string"?l:null}catch{return i.replace(/^"/,"").replace(/"$/,"").replace(/\\n/g,`
67
- `).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}},yR=e=>{const r=e.indexOf('"source"');if(r===-1)return null;const i=e.indexOf(":",r);if(i===-1)return null;let l=e.slice(i+1).trim();if(!l)return null;if(l.endsWith(",")&&(l=l.slice(0,-1).trim()),l.startsWith("[")){const o=l.lastIndexOf("]");if(o===-1)return null;const u=l.slice(0,o+1);try{const c=JSON.parse(u);if(Array.isArray(c))return c.filter(f=>typeof f=="string")}catch{return null}return[]}if(l.startsWith('"'))try{const o=JSON.parse(l);return typeof o=="string"?[o]:null}catch{return null}return null},xR=e=>{const r=vR(e);if(r)return r;const i=[];let l=null,o=!1,u=!1,c=!1;const f=()=>{l&&(l.status=o&&u?"change":o?"add":u?"delete":"context",i.push(l),l=null,o=!1,u=!1,c=!1)},p=h=>{f(),l={cellType:h,sourceLines:[],status:"context"}};return e.forEach(h=>{h.lines.forEach(b=>{const g=wv(b);if(!g)return;const x=b.content.match(dR);if(x?p(Sv(x[1]??"")):!l&&Bx.test(b.content)&&p("unknown"),!l)return;if(g==="add"&&(o=!0),g==="delete"&&(u=!0),!l.id){const S=b.content.match(pR);S&&(l.id=S[1])}if(l.executionCount===void 0){const S=b.content.match(hR);S&&(l.executionCount=S[1]==="null"?null:S[1])}if(Bx.test(b.content)){const S=yR(b.content);if(S){S.forEach(N=>{l?.sourceLines.push({type:g,content:N})}),c=!1;return}c=!0;return}if(!c)return;if(b.content.trim().startsWith("]")){c=!1;return}const w=bR(b.content);w!==null&&l.sourceLines.push({type:g,content:w})})}),f(),{cells:i}},vR=e=>{const r=Ux(e,["add","context"]),i=Ux(e,["delete","context"]),l=Va(r),o=Va(i);if(!l&&!o||l&&l.cells.length===0&&!o)return null;const u=l?.language??o?.language;return{cells:kv(o?.cells??[],l?.cells??[]),language:u}},Ux=(e,r)=>e.flatMap(i=>i.lines).map(i=>{const l=wv(i);return!l||!r.includes(l)?null:i.content}).filter(i=>i!==null).join(`
68
- `),Va=e=>{if(!e.trim())return null;try{const r=JSON.parse(e);if(!r||typeof r!="object"||!("cells"in r))return null;const i=r.cells;if(!Array.isArray(i))return null;const l=r.metadata,o=wR(l);return{cells:i.map(u=>SR(u)),language:o}}catch{return null}},wR=e=>{if(!e||typeof e!="object")return;const r=e,i=r.language_info;if(i&&typeof i=="object"){const o=i.name;if(typeof o=="string"&&o.trim())return o}const l=r.kernelspec;if(l&&typeof l=="object"){const o=l.language;if(typeof o=="string"&&o.trim())return o}},SR=e=>{const r=typeof e=="object"&&e?e:{},i=typeof r.cell_type=="string"?r.cell_type:"",l=Sv(i),o=typeof r.id=="string"?r.id:void 0,u=r.execution_count,c=u===null?null:typeof u=="number"?String(u):typeof u=="string"?u:void 0,f=kR(r.source);return{cellType:l,sourceText:f,id:o,executionCount:c}},kR=e=>typeof e=="string"?e:Array.isArray(e)?e.filter(r=>typeof r=="string").join(""):"",kv=(e,r)=>{const i=[];if(e.some(u=>!!u.id)||r.some(u=>!!u.id)){const u=new Map;e.forEach((f,p)=>{f.id&&u.set(f.id,{cell:f,index:p})});const c=new Set;return r.forEach(f=>{const p=f.id?u.get(f.id):void 0;p&&c.add(p.index),i.push(_d(p?.cell??null,f))}),e.forEach((f,p)=>{c.has(p)||i.push(_d(f,null))}),i}const o=Math.max(e.length,r.length);for(let u=0;u<o;u+=1){const c=e[u]??null,f=r[u]??null;i.push(_d(c,f))}return i},_d=(e,r)=>{if(!r&&e)return{cellType:e.cellType,sourceLines:Ua(e.sourceText,"delete"),status:"delete",id:e.id,executionCount:e.executionCount};if(r&&!e)return{cellType:r.cellType,sourceLines:Ua(r.sourceText,"add"),status:"add",id:r.id,executionCount:r.executionCount};const i=e?.sourceText??"",l=r?.sourceText??"",o=r?.cellType??e?.cellType??"unknown",u=r?.id??e?.id,c=r?.executionCount??e?.executionCount;return i===l&&(e?.cellType??"")===(r?.cellType??"")?{cellType:o,sourceLines:Ua(l,"context"),status:"context",id:u,executionCount:c}:{cellType:o,sourceLines:[...Ua(i,"delete"),...Ua(l,"add")],status:"change",id:u,executionCount:c}},Ua=(e,r)=>e?[{type:r,content:e}]:[],Ld=e=>!!(e&&e!=="stdin"),Dd=async(e,r)=>{const i=encodeURIComponent(e),l=await fetch(`/api/blob/${i}?ref=${encodeURIComponent(r)}`);return l.ok?l.text():null},Il=(e,r)=>e.filter(i=>r.includes(i.type)).map(i=>i.content).join(""),Od=e=>{if(!e)return[];const r=e.split(`
69
- `);return r.length>0&&r[r.length-1]===""&&r.pop(),r},Ev=(e,r)=>!e&&!r?[]:e?r?G8(e,r).flatMap(i=>{const l=i.added?"add":i.removed?"delete":"context";return Od(i.value).map(o=>({type:l,content:o}))}):Od(e).map(i=>({type:"delete",content:i})):Od(r).map(i=>({type:"add",content:i})),ER=e=>Qt.isValidElement(e),CR=e=>Qt.isValidElement(e),ch=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(ch).join(""):ER(e)?ch(e.props.children):"",NR=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},Hx=e=>{switch(e){case"before":return"border-l-4 border-diff-deletion-border";case"after":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},AR=e=>{switch(e){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},TR=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},RR=e=>{switch(e){case"add":return"text-github-accent";case"delete":return"text-github-danger";default:return"text-github-text-muted"}},fh=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),jR=e=>({h1:({children:r})=>y.jsx("h1",{className:`${Rl[0]} mb-2`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${Rl[1]} mb-2`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${Rl[2]} mb-2`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${Rl[3]} mb-2`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${Rl[4]} mb-2`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${Rl[5]} mb-2`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-sm leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-sm space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-sm space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:i})=>{const l=r??"";if(!l||!fh(l))return y.jsx("span",{children:i});const o=l.startsWith("http");return y.jsx("a",{href:l,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:i})},img:({src:r,alt:i})=>{const l=r??"";return!l||!fh(l)?null:y.jsx("img",{src:l,alt:i??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const l=(Array.isArray(r)?r:[r]).find(CR),o=ch(l??r),c=/language-(\S+)/.exec(l?.props.className??"")?.[1];return o.trim()?y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:y.jsx(wh,{code:o.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})}):y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:r})},code:({className:r,children:i})=>r?y.jsx("code",{className:r,children:i}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono",children:i}),table:({children:r})=>y.jsx("div",{className:"overflow-x-auto",children:y.jsx("table",{className:"min-w-full border border-github-border",children:r})}),th:({children:r})=>y.jsx("th",{className:"border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm",children:r}),td:({children:r})=>y.jsx("td",{className:"border border-github-border px-2 py-1 text-sm",children:r})}),_R=e=>{const r=Il(e.sourceLines,["context","delete"]),i=Il(e.sourceLines,["context","add"]),l=[];return e.status==="change"?(r.trim()&&l.push({label:"Before",content:r,tone:"before"}),i.trim()&&l.push({label:"After",content:i,tone:"after"}),l.length===0&&l.push({label:"After",content:i,tone:"after"}),l):e.status==="delete"?(l.push({label:"Before",content:r||i,tone:"before"}),l):(l.push({label:"After",content:i||r,tone:"after"}),l)},Cv=(e,r,i,l)=>{if(!r.trim())return y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"});if(e==="markdown"){const o=jR(i);return y.jsx(Yh,{remarkPlugins:[Qh],urlTransform:u=>fh(u)?u:"",components:o,children:r})}return e==="raw"?y.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary",children:r}):y.jsx("pre",{className:"overflow-x-auto text-xs",children:y.jsx(Xa,{code:r.replace(/\n$/,""),language:l||"python",syntaxTheme:i,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})})},LR=({lines:e,syntaxTheme:r,language:i})=>e.length===0?y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"}):y.jsx("div",{className:"overflow-x-auto",children:y.jsx("div",{className:"font-mono text-xs",children:e.map((l,o)=>y.jsxs("div",{className:`flex items-start min-h-[16px] ${AR(l.type)}`,children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 select-none ${RR(l.type)}`,children:TR(l.type)}),y.jsx(Xa,{code:l.content||" ",language:i||"python",syntaxTheme:r,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit"})]},`notebook-code-line-${o}`))})}),DR=({cells:e,syntaxTheme:r,language:i})=>y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const u=_R(l),c=l.cellType==="code"&&l.executionCount!==void 0?`In[${l.executionCount??" "}]`:null,f=l.cellType==="code",p=f?Ev(Il(l.sourceLines,["context","delete"]),Il(l.sourceLines,["context","add"])).filter(h=>h.type!=="context"):[];return f&&p.length===0?null:y.jsxs("div",{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${NR(l.status)}`,children:[y.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:vv[l.cellType]}),c&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:c}),l.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:l.id})]})}),y.jsx("div",{className:"space-y-3",children:f?y.jsx("div",{className:`px-4 py-3 ${Hx(l.status==="delete"?"before":"after")}`,children:y.jsx(LR,{lines:p,syntaxTheme:r,language:i})}):u.map((h,b)=>y.jsx("div",{className:`px-4 py-3 ${Hx(h.tone)}`,children:y.jsx("div",{className:"text-sm text-github-text-primary",children:Cv(l.cellType,h.content,r,i)})},`notebook-cell-${o}-section-${b}`))})]},`notebook-cell-${o}`)})}),OR=({cells:e,syntaxTheme:r,language:i})=>y.jsx("div",{className:"space-y-4",children:e.map((l,o)=>{const u=l.cellType==="code"&&l.executionCount!==void 0?`In[${l.executionCount??" "}]`:null;return y.jsxs("div",{className:"rounded border border-github-border bg-github-bg-secondary/40 p-4",children:[y.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:vv[l.cellType]}),u&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:u}),l.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:l.id})]}),y.jsx("div",{className:"text-sm text-github-text-primary",children:Cv(l.cellType,l.sourceText,r,i)})]},`notebook-full-cell-${o}`)})});function MR(e){const{file:r,baseCommitish:i,targetCommitish:l}=e,[o,u]=A.useState("diff"),c=A.useMemo(()=>xR(e.mergedChunks),[e.mergedChunks]),[f,p]=A.useState({status:"idle",cells:c.cells,language:c.language}),h=A.useMemo(()=>f.cells.filter(_=>_.status==="context"?!1:_.cellType!=="code"?!0:Ev(Il(_.sourceLines,["context","delete"]),Il(_.sourceLines,["context","add"])).filter(z=>z.type!=="context").length>0),[f.cells]),[b,g]=A.useState(null),[x,v]=A.useState(c.language),[w,S]=A.useState(!1),[N,E]=A.useState(null),[C,j]=A.useState(null),O=A.useMemo(()=>!i&&!l?null:r.status==="added"?l?{path:r.path,ref:l}:null:r.status==="deleted"?i?{path:r.oldPath||r.path,ref:i}:null:l?{path:r.path,ref:l}:i?{path:r.oldPath||r.path,ref:i}:null,[i,l,r.oldPath,r.path,r.status]),U=A.useMemo(()=>O?`${O.ref}:${O.path}`:null,[O]);return A.useEffect(()=>{let _=!1;return(async()=>{const z=i||"HEAD~1",H=l||"HEAD",M=r.oldPath||r.path,P=r.status!=="added"&&Ld(z),V=r.status!=="deleted"&&Ld(H);if(!P&&!V){p({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be loaded, falling back to diff preview."});return}p(J=>({...J,status:"loading"}));try{const[J,I]=await Promise.all([P?Dd(M,z):Promise.resolve(null),V?Dd(r.path,H):Promise.resolve(null)]),Z=J?Va(J):null,B=I?Va(I):null;if(!Z&&!B){_||p({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be parsed, falling back to diff preview."});return}const Y=B?.language??Z?.language??c.language,X=kv(Z?.cells??[],B?.cells??[]);_||p({status:"ready",cells:X,source:"blob",language:Y})}catch(J){_||p({status:"error",cells:c.cells,language:c.language,source:"diff",message:J instanceof Error?J.message:"Failed to load notebook preview."})}})(),()=>{_=!0}},[i,r.oldPath,r.path,r.status,e.mergedChunks,l,c]),A.useEffect(()=>{if(o!=="full-preview")return;if(!O||!U||!Ld(O.ref)){g(null),j(null),E(null),S(!1);return}let _=!1;return(U!==C||!b)&&(async()=>{U!==C&&g(null),S(!0),E(null);try{const z=await Dd(O.path,O.ref);if(!z)throw new Error("Failed to load preview.");const H=Va(z);if(!H)throw new Error("Notebook content could not be parsed.");_||(g(H.cells),v(H.language??c.language),j(U))}catch(z){_||(g(null),j(null),E(z instanceof Error?z.message:"Failed to load preview"))}finally{_||S(!1)}})(),()=>{_=!0}},[c.language,b,C,o,O,U]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>u("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(bu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>u("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Is,{size:14}),"Diff Preview"]}),y.jsxs("button",{onClick:()=>u("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Is,{size:14}),"Full Preview"]})]})}),o==="diff"&&y.jsx(hu,{...e}),o==="diff-preview"&&y.jsxs("div",{className:"p-4",children:[f.status==="loading"&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"Loading notebook preview…"}),f.message&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:f.message}),h.length===0?y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"No changed notebook cells were found. Showing raw diff instead."}),y.jsx(hu,{...e})]}):y.jsx(DR,{cells:h,syntaxTheme:e.syntaxTheme,language:f.language})]}),o==="full-preview"&&y.jsxs("div",{className:"p-4",children:[w&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),N&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:N}),!w&&!N&&b&&y.jsx(OR,{cells:b,syntaxTheme:e.syntaxTheme,language:x??c.language}),!w&&!N&&!b&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Md=[{id:"image",match:e=>l4(e.path),Component:c4,canExpandHiddenLines:()=>!1},{id:"markdown",match:e=>o4(e.path),Component:fR,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"notebook",match:e=>u4(e.path),Component:MR,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"default",match:()=>!0,Component:hu,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"}],zR=e=>{const r=Md[Md.length-1];if(!r)throw new Error("No diff viewers registered");return Md.find(i=>i.match(e))??r},FR=e=>{switch(e){case"added":return y.jsx(g1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(b1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(m1,{size:16,className:"text-github-warning"});default:return y.jsx(bu,{size:16,className:"text-github-text-secondary"})}},IR=({file:e,isCollapsed:r,isReviewed:i,onToggleCollapsed:l,onToggleAllCollapsed:o,onToggleReviewed:u})=>{const[c,f]=A.useState(!1);return y.jsxs("div",{className:"bg-github-bg-secondary border-t-2 border-t-github-accent border-b border-github-border px-5 py-4 flex items-center justify-between flex-wrap gap-3 sticky top-0 z-10",children:[y.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[y.jsx("button",{onClick:p=>{p.altKey?o(!r):l(e.path)},className:"text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer",title:r?"Expand file (Alt+Click to expand all)":"Collapse file (Alt+Click to collapse all)",children:r?y.jsx(h1,{size:16}):y.jsx(Ml,{size:16})}),FR(e.status),y.jsx("h2",{className:"text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e.path}),y.jsx("button",{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${c?"text-github-accent":"text-github-text-secondary hover:text-github-text-primary"}`,onClick:()=>{navigator.clipboard.writeText(e.path).then(()=>{console.log("File path copied to clipboard:",e.path),f(!0),setTimeout(()=>f(!1),2e3)}).catch(p=>{console.error("Failed to copy file path:",p)})},title:"Copy file path",children:c?y.jsx(Ya,{size:14}):y.jsx(p1,{size:14})}),e.oldPath&&e.oldPath!==e.path&&y.jsxs("span",{className:"text-xs text-github-text-muted italic",children:["(renamed from ",e.oldPath,")"]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10",children:["+",e.additions]}),y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10",children:["-",e.deletions]})]}),y.jsxs("button",{onClick:()=>u(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${i?"bg-github-accent text-white":"dark:bg-slate-600 dark:text-white dark:border-slate-500 dark:hover:bg-slate-500 dark:hover:border-slate-400 bg-github-bg-secondary text-github-text-primary border border-github-border hover:bg-github-bg-tertiary hover:border-github-text-muted"}`,title:i?"Mark as not reviewed":"Mark as reviewed",children:[i?y.jsx(Ya,{size:14}):y.jsx(Tk,{size:14}),"Viewed"]})]})]})},BR=e=>{const r={old:[],new:[]};return e.forEach(i=>{const l=i.side??"new",[o,u]=Array.isArray(i.line)?[i.line[0],i.line[1]]:[i.line,i.line];o<=0||u<=0||r[l].push({start:Math.min(o,u),end:Math.max(o,u)})}),r},UR=(e,r)=>e.chunks.map((i,l)=>{const o=r==="old"?i.oldStart:i.newStart,u=r==="old"?i.oldLines:i.newLines;return!o||u<=0?null:{start:o,end:o+u-1,index:l}}).filter(i=>!!i),HR=e=>{const r=[],i=e[0];if(!i)return r;i.start>1&&r.push({type:"before",start:1,end:i.start-1,nextChunkIndex:i.index});for(let o=1;o<e.length;o+=1){const u=e[o-1],c=e[o];!u||!c||c.start>u.end+1&&r.push({type:"between",start:u.end+1,end:c.start-1,prevChunkIndex:u.index,nextChunkIndex:c.index})}const l=e[e.length-1];return l&&r.push({type:"after",start:l.end+1,end:Number.POSITIVE_INFINITY,prevChunkIndex:l.index}),r},qR=e=>{const r=new Map;return e.forEach(i=>{const l=i.originalIndices[0];l!==void 0&&r.set(l,i)}),r},$R=e=>{const r=e[e.length-1];return r?.originalIndices[r.originalIndices.length-1]??null},PR=A.memo(function({file:r,comments:i,showAuthorBadges:l=!1,diffMode:o,reviewedFiles:u,onToggleReviewed:c,collapsedFiles:f,onToggleCollapsed:p,onToggleAllCollapsed:h,onAddComment:b,onGeneratePrompt:g,onRemoveComment:x,onUpdateComment:v,onOpenInEditor:w,syntaxTheme:S,baseCommitish:N,targetCommitish:E,cursor:C=null,fileIndex:j=0,onLineClick:O,commentTrigger:U,onCommentTriggerHandled:_,mergedChunks:F,expandLines:z,expandAllBetweenChunks:H,prefetchFileContent:M,isExpandLoading:P}){const V=f.has(r.path),J=A.useRef(null),[I,Z]=A.useState(!1),B=zR(r),Y=B.canExpandHiddenLines?.(r)??!1;A.useEffect(()=>{if(!Y)return;const $=J.current;if(!$)return;const T=new IntersectionObserver(([W])=>{W?.isIntersecting&&Z(!0)},{rootMargin:"200px"});return T.observe($),()=>T.disconnect()},[Y]),A.useEffect(()=>{I&&!V&&Y&&M(r)},[I,V,Y,r,M]);const X=A.useCallback(async($,T,W,te)=>{try{await b(r.path,$,T,W,te)}catch(ce){console.error("Failed to add comment:",ce)}},[r.path,b]);A.useEffect(()=>{if(V||P||!Y||i.length===0||r.chunks.length===0||F.length===0)return;const $=BR(i),T=qR(F),W=$R(F),te=F[F.length-1],ce=new Set,me=(xe,ge)=>{ce.has(xe)||(ce.add(xe),ge())};["old","new"].forEach(xe=>{const ge=$[xe];if(ge.length===0)return;const ve=UR(r,xe);HR(ve).forEach(de=>{if(!ge.some(Ye=>Ye.start<=de.end&&Ye.end>=de.start))return;if(de.type==="after"&&te&&W!==null){te.hiddenLinesAfter>0&&me(`after-${W}`,()=>{z(r,W,"down",te.hiddenLinesAfter)});return}const we=de.nextChunkIndex;if(we===void 0)return;const je=T.get(we);!je||je.hiddenLinesBefore<=0||(de.type==="before"?me(`before-${we}`,()=>{z(r,we,"up",je.hiddenLinesBefore)}):de.type==="between"&&me(`between-${we}`,()=>{H(r,we,je.hiddenLinesBefore)}))})})},[i,H,z,r,V,P,F,Y]);const q="4em",R=B.Component,D={file:r,comments:i,showAuthorBadges:l,diffMode:o,syntaxTheme:S,baseCommitish:N,targetCommitish:E,cursor:C,fileIndex:j,mergedChunks:F,isExpandLoading:P,expandHiddenLines:z,expandAllBetweenChunks:H,onAddComment:X,onGeneratePrompt:g,onRemoveComment:x,onUpdateComment:v,onOpenInEditor:w,onLineClick:O,commentTrigger:U,onCommentTriggerHandled:_};return y.jsxs("div",{ref:J,className:"bg-github-bg-primary",style:{"--line-number-width":q},children:[y.jsx(IR,{file:r,isCollapsed:V,isReviewed:u.has(r.path),onToggleCollapsed:p,onToggleAllCollapsed:h,onToggleReviewed:c}),!V&&y.jsx("div",{className:"overflow-y-auto",children:y.jsx(R,{...D})})]})});function dh(e){if(!e.isDirectory||!e.children)return[];const r=[];return e.path&&r.push(e.path),e.children.forEach(i=>{r.push(...dh(i))}),r}function VR(e){const r={name:"",path:"",isDirectory:!0,children:[]};e.forEach(l=>{const o=l.path.split("/");let u=r;for(let c=0;c<o.length;c++){const f=o[c];if(!f)continue;const p=c===o.length-1,h=o.slice(0,c+1).join("/");u.children||(u.children=[]);let b=u.children.find(g=>g.name===f);b||(b={name:f,path:h,isDirectory:!p,children:p?void 0:[],file:p?l:void 0},u.children.push(b)),u=b}});const i=l=>{if(!l.isDirectory||!l.children)return l;if(l.children=l.children.map(i),l.children.length===1&&l.children[0]?.isDirectory&&l.children[0]?.children){const o=l.children[0];if(o)return l.name?{...l,name:`${l.name}/${o.name}`,path:o.path,children:o.children}:l}return l};return i(r)}function GR({files:e,onScrollToFile:r,onFileSelected:i,comments:l,reviewedFiles:o,onToggleReviewed:u,selectedFileIndex:c}){const f=A.useMemo(()=>VR(e),[e]),p=A.useRef(null),h=A.useRef(new Map),b={"--dir-row-height":"calc(var(--spacing, 0.25rem) * 9)"},[g,x]=A.useState(()=>new Set(dh(f))),[v,w]=A.useState(""),S=A.useMemo(()=>{const H=new Map;return l.forEach(M=>{H.set(M.file,(H.get(M.file)??0)+1)}),H},[l]),N=A.useMemo(()=>{const H=new Map;return e.forEach((M,P)=>{H.set(M.path,P)}),H},[e]),E=A.useMemo(()=>{const H=v.trim().toLowerCase(),M=P=>{if(!H)return P;if(P.isDirectory&&P.children){const V=P.children.map(J=>M(J)).filter(J=>J!==null);return V.length>0?{...P,children:V}:null}else if(P.file)return P.file.path.toLowerCase().includes(H)?P:null;return null};return M(f)||{...f,children:[]}},[f,v]),C=H=>{switch(H){case"added":return y.jsx(g1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(b1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(m1,{size:16,className:"text-github-warning"});default:return y.jsx(bu,{size:16,className:"text-github-text-secondary"})}},j=H=>{x(M=>{const P=new Set(M);return P.has(H)?P.delete(H):P.add(H),P})},O=A.useMemo(()=>dh(f),[f]),U=g.size===O.length&&O.length>0,_=()=>{x(U?new Set:new Set(O))},F=(H,M)=>{const P=p.current,V=H.currentTarget;if(!P){j(M);return}const J=P.getBoundingClientRect(),I=V.getBoundingClientRect(),Z=Number.parseFloat(getComputedStyle(V).top||"0");if(I.top-J.top<=Z+1){const q=h.current.get(M)?.querySelector('[data-tree-row="true"]:not([data-dir-header="true"])'),R=V.getBoundingClientRect().height||0,D=q??V,$=Number.parseInt(D.dataset.depth||V.dataset.depth||"0",10),T=R*$,W=Math.max(0,D.offsetTop-T);if(Math.abs(P.scrollTop-W)<=1){j(M);return}P.scrollTo({top:W,behavior:"smooth"});return}j(M)},z=(H,M=0)=>{if(H.isDirectory&&H.children){const P=g.has(H.path);return y.jsxs("div",{"data-dir-container":H.path||void 0,ref:V=>{H.path&&(V?h.current.set(H.path,V):h.current.delete(H.path))},children:[H.name&&y.jsxs("div",{className:"sticky flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer","data-dir-header":"true","data-tree-row":"true","data-depth":M,style:{paddingLeft:`${M*16+16}px`,top:`calc(${M} * var(--dir-row-height))`,zIndex:1e3-M},onClick:V=>F(V,H.path),children:[P?y.jsx(Ml,{size:16}):y.jsx(h1,{size:16}),P?y.jsx(ik,{size:16,className:"text-github-text-secondary"}):y.jsx(ak,{size:16,className:"text-github-text-secondary"}),y.jsx("span",{className:"text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap",title:H.name,children:H.name})]}),(P||!H.name)&&H.children.map(V=>z(V,H.name?M+1:M))]},H.path)}else if(H.file){const P=H.file,V=S.get(P.path)??0,J=o.has(P.path),I=N.get(P.path)??-1,Z=c!==null&&c===I;return y.jsxs("div",{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${J?"opacity-70":""} ${Z?"bg-github-bg-tertiary":""}`,"data-file-row":"true","data-tree-row":"true","data-depth":M,style:{paddingLeft:`${M*16+16}px`},onClick:()=>{r(P.path),i?.()},children:[y.jsx(v1,{checked:J,onChange:()=>{u(P.path)},title:J?"Mark as not reviewed":"Mark as reviewed",className:"z-10"}),C(H.file.status),y.jsx("span",{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${J?"line-through text-github-text-muted":""}`,title:H.file.path,children:H.name}),V>0&&y.jsxs("span",{className:"text-github-warning text-sm font-medium ml-auto flex items-center gap-1",children:[y.jsx(y1,{size:14}),V]})]},P.path)}return null};return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-4 py-3 border-b border-github-border bg-github-bg-tertiary",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("h3",{className:"text-sm font-semibold text-github-text-primary m-0",children:["Files changed (",e.length,")"]}),y.jsx("button",{onClick:_,className:"p-1 hover:bg-github-bg-primary rounded transition-colors",title:U?"Collapse all":"Expand all",children:U?y.jsx(U2,{size:16,className:"text-github-text-secondary"}):y.jsx(q2,{size:16,className:"text-github-text-secondary"})})]}),y.jsxs("div",{className:"relative",children:[y.jsx(Ck,{size:16,className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted"}),y.jsx("input",{type:"text",placeholder:"Filter files...",value:v,onChange:H=>w(H.target.value),className:"w-full pl-9 pr-3 py-2 text-sm bg-github-bg-primary border border-github-border rounded-md focus:outline-none focus:border-github-accent text-github-text-primary placeholder-github-text-muted"})]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto relative z-0",style:b,ref:p,children:E.children?.map(H=>z(H))})]})}function YR({style:e}){return y.jsx("svg",{width:"98",height:"96",viewBox:"0, 0, 98, 96",style:e,xmlns:"http://www.w3.org/2000/svg","aria-label":"GitHub",role:"img",children:y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z",fill:"currentColor"})})}function XR({isOpen:e,onClose:r}){const{enableScope:i,disableScope:l}=Wa();return lt("escape",()=>r(),{enabled:e},[r,e]),A.useEffect(()=>(e?l("navigation"):i("navigation"),()=>{i("navigation")}),[e,i,l]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4 flex items-center justify-between",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Keyboard Shortcuts"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close help modal",children:y.jsx(yu,{size:20})})]}),y.jsxs("div",{className:"px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Line Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"j"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↓"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Next line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"k"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↑"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous line"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"File Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to first file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to last file"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Chunk Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"n"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next change chunk (added/deleted lines)"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"p"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous change chunk (added/deleted lines)"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"N"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next comment"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"P"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous comment"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Side Navigation (Side-by-side mode)"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"h"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"←"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus left side"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"l"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"→"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus right side"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Management"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"L"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"View all comments list"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"C"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Copy all comments prompt"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"D"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Delete all comments"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Actions"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"v"}),y.jsx("span",{className:"text-github-text-secondary",children:"Toggle viewed state of current file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"R"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Refresh diff when changes detected"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"c"}),y.jsx("span",{className:"text-github-text-secondary",children:"Add comment at current line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"."}),y.jsx("span",{className:"text-github-text-secondary",children:"Move cursor to center of viewport"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"?"}),y.jsx("span",{className:"text-github-text-secondary",children:"Show/hide this help"})]})]})]}),y.jsx("div",{className:"pt-4 border-t border-github-border lg:col-span-2",children:y.jsx("p",{className:"text-xs text-github-text-secondary",children:"Shortcuts are disabled when typing in input fields."})})]})]})]}):null}function ZR({style:e}){return y.jsxs("svg",{style:e,viewBox:"0 0 720 190",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"difit",role:"img",children:[y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M440.487 5.90627C432.164 9.01695 427.318 16.2817 427.318 25.649C427.318 35.9474 433.206 43.6458 442.714 45.7819C451.336 47.7188 459.606 44.3893 464.84 36.8737C466.923 33.8843 467.35 32.4073 467.606 27.3105C467.773 23.9957 467.492 20.0154 466.983 18.4654C465.699 14.5629 460.869 9.13088 456.854 7.07513C452.57 4.88086 444.73 4.32102 440.487 5.90627ZM596.658 6.653C588.927 9.55794 584.572 15.4908 583.887 24.0465C583.17 33.0212 586.83 39.8868 594.382 43.7278C603.739 48.4877 615.574 44.5081 620.482 34.9515C625.35 25.4728 622.15 13.4916 613.37 8.32678C608.986 5.74808 601.154 4.96365 596.658 6.653ZM368.585 7.68006C367.464 8.80629 367.302 12.903 367.302 40.2286V71.4878L363.832 68.1329C353.432 58.0787 335.595 52.668 319.246 54.6082C310.542 55.641 299.81 59.1369 293.3 63.0607C278.56 71.9427 266.453 89.5576 263.139 106.945C261.765 114.155 261.602 129.431 262.825 136.365C265.723 152.796 274.795 168.36 286.716 177.355C298.275 186.077 310.237 190 325.274 190C340.687 190 353.943 185.273 362.869 176.594L367.302 172.284V178.215C367.302 186.902 366.946 186.724 384.303 186.709C392.243 186.702 399.29 186.347 399.964 185.919C401.04 185.236 401.189 174.47 401.189 97.1224C401.189 23.7236 401.003 8.87842 400.068 7.74809C398.433 5.77021 370.547 5.71037 368.585 7.68006ZM526.937 7.94153C519.783 10.0325 515.359 12.5834 510.029 17.6867C501.959 25.4129 498.766 34.4597 498.766 49.5975V58.8517H490.659C484.378 58.8517 482.263 59.1418 481.268 60.1394C480.214 61.1976 479.986 63.6558 479.986 73.91C479.986 82.5264 480.289 86.6977 480.966 87.3764C481.601 88.0141 484.903 88.36 490.356 88.36H498.766V136.692C498.766 183.638 498.811 185.048 500.345 185.873C502.433 186.994 529.394 186.994 531.482 185.873C533.016 185.048 533.061 183.638 533.061 136.692V88.36H549.334C563.038 88.36 565.809 88.1568 566.89 87.0723C568.782 85.1723 568.782 62.0394 566.89 60.1394C565.808 59.0541 563.029 58.8517 549.231 58.8517H532.856L533.216 51.9721C533.604 44.5499 534.721 41.9147 538.546 39.3958C540.377 38.1901 543.049 37.904 554.661 37.6737C562.626 37.5155 569.018 37.0343 569.602 36.5483C570.892 35.4761 571.046 10.3579 569.777 7.9776C568.978 6.47923 567.918 6.39562 550.384 6.45054C535.269 6.49808 530.93 6.77431 526.937 7.94153ZM654.931 26.4834C653.136 27.7662 653.094 28.1572 653.094 43.3245V58.8517H644.567C633.342 58.8517 633.497 58.6443 633.497 73.6059C633.497 88.5674 633.342 88.36 644.567 88.36H653.094V122.636C653.094 159.998 653.439 163.935 657.362 171.354C661.848 179.838 669.111 184.99 680.857 188.022C687.996 189.866 707.647 189.269 714.309 187.007C719.756 185.158 719.86 184.87 719.969 171.298C720.082 157.364 720.441 157.791 709.174 158.48C695.386 159.324 689.341 156.938 687.388 149.883C686.927 148.214 686.58 134.435 686.577 117.663L686.572 88.36H702.068H717.564L718.87 86.3592C719.946 84.7108 720.129 82.3461 719.91 72.9575C719.719 64.8279 719.321 61.1689 718.522 60.2041C717.553 59.0345 715.315 58.8517 701.987 58.8517H686.572L686.546 43.8926C686.526 31.8556 686.28 28.613 685.288 27.2941C684.156 25.7884 682.945 25.6351 670.412 25.4129C658.94 25.2088 656.476 25.3793 654.931 26.4834ZM431.459 60.1394C430.316 61.2877 430.178 68.0001 430.188 121.82C430.197 168.838 430.429 182.667 431.232 184.262L432.264 186.311L446.657 186.535C458.941 186.725 461.242 186.567 462.353 185.452C463.521 184.279 463.655 177.845 463.655 122.786C463.655 68.0985 463.515 61.2877 462.372 60.1394C460.469 58.2287 433.362 58.2287 431.459 60.1394ZM587.799 60.4369C587.238 61.4894 586.954 82.56 586.954 123.084C586.954 177.502 587.093 184.285 588.236 185.434C590.138 187.342 616.431 187.342 618.333 185.434C619.476 184.285 619.615 177.447 619.615 122.482C619.615 75.6149 619.38 60.5828 618.636 59.8353C617.947 59.1443 613.344 58.8517 603.15 58.8517C589.644 58.8517 588.586 58.9607 587.799 60.4369ZM347.956 87.3469C362.023 93.9543 369.138 107.306 367.775 124.535C366.623 139.097 359.678 149.866 347.83 155.463C337.073 160.544 325.541 160.523 315.049 155.403C293.381 144.83 288.765 112.315 306.417 94.5961C313.92 87.0641 322.021 84.1412 334.301 84.5354C341.49 84.7666 343.224 85.124 347.956 87.3469Z",fill:"currentColor"}),y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.42299 0.744751C4.61699 2.15275 2.03999 5.66375 0.956994 12.2768C-0.369006 20.3728 -0.294006 170.791 1.03899 176.572C2.29699 182.031 4.81699 185.308 9.65399 187.774C13.265 189.615 16.865 189.684 108.63 189.684C163.129 189.684 204.095 189.304 204.41 188.795C206 188.5 206 188.795 207.5 188C211.167 187.079 216.779 180.138 218.005 175.584C218.682 173.068 218.939 143.952 218.756 90.4718C218.487 11.7478 218.417 9.10275 216.535 6.62675C215.466 5.22075 213.441 3.19575 212.035 2.12675C209.546 0.23575 206.839 0.17975 110.978 0.0167504C55.373 -0.0782496 11.148 0.239751 9.42299 0.744751ZM203.778 14.8838C205.558 16.6638 205.509 172.577 203.728 175.005C202.577 176.574 198.865 176.688 156.978 176.446L111.478 176.184L111.226 138.684L110.974 101.184H84.059C69.255 101.184 56.808 101.52 56.397 101.931C55.986 102.343 60.674 107.82 66.814 114.104C72.954 120.388 77.978 126.202 77.978 127.026C77.978 129.577 74.769 134.267 71.896 135.916C69.609 137.229 68.75 137.278 66.704 136.217C63.533 134.572 28.705 99.1448 27.757 96.5998C27.36 95.5348 27.491 93.4308 28.049 91.9238C28.955 89.4768 68.498 49.6838 70.024 49.6838C70.366 49.6838 72.356 51.1627 74.447 52.9697C77.589 55.6867 78.118 56.6658 77.498 58.6198C77.086 59.9198 72.075 65.8308 66.363 71.7568C60.651 77.6818 55.978 83.0148 55.978 83.6068C55.978 84.3488 64.068 84.6838 81.952 84.6838H107.927H110.666C111.144 82.5 110.978 73.4537 110.978 46.2337V13.6838H156.778C191.067 13.6838 202.88 13.9858 203.778 14.8838ZM148.803 52.7217C146.51 54.0597 144.845 59.5997 145.74 62.9107C146.146 64.4107 150.657 69.9308 155.764 75.1788C161.411 80.9788 164.547 84.8988 163.764 85.1788C163.057 85.4318 151.549 85.7608 138.19 85.9108C117.896 86.1388 113.747 86.4308 112.956 87.6838C112.435 88.5088 112.002 91.7228 111.993 94.8268C111.982 99.0598 112.373 100.622 113.56 101.077C114.43 101.411 126.13 101.684 139.56 101.684C156.121 101.684 163.978 102.026 163.978 102.746C163.978 103.33 160.187 107.607 155.554 112.251C146.244 121.582 144.276 125.371 146.069 130.514C147.321 134.107 149.576 135.684 153.463 135.684C155.522 135.684 159.843 131.902 173.778 117.904C191.699 99.9008 194.978 96.0678 194.978 93.1208C194.978 91.1338 157.422 53.8238 154.163 52.5728C151.322 51.4818 150.908 51.4937 148.803 52.7217Z",fill:"currentColor"})]})}function KR({shouldReload:e,isReloading:r,onReload:i,changeType:l,className:o="",compact:u=!1}){if(!e)return null;const c=()=>{switch(l){case"commit":return"New commits available";case"staging":return"Staging changes detected";case"file":return"File changes detected";default:return"Changes detected"}};return y.jsxs("button",{onClick:i,disabled:r,className:`
70
- flex items-center gap-1.5 text-xs rounded-md border ${o} ${u?"px-2 py-2":"px-3 py-1.5"}
71
- ${r?"bg-github-text-primary text-github-bg-primary border-github-text-primary cursor-not-allowed":"bg-github-text-primary text-github-bg-primary border-github-text-primary"}
72
- `,title:`${c()} - Click to refresh`,"aria-label":u?"Refresh":void 0,children:[y.jsx(kk,{size:12,className:`${r?"animate-spin":""}`}),u?y.jsx("span",{className:"sr-only",children:"Refresh"}):"Refresh"]})}function qx({label:e,value:r,resolvedValue:i,onChange:l,options:o,disabledValues:u=[]}){const[c,f]=A.useState(!1),{refs:p,floatingStyles:h,context:b}=ru({open:c,onOpenChange:f,middleware:[Ks(4),Js(),Qs({padding:8})],whileElementsMounted:Xs}),g=Ws(b,{handleClose:Xd()}),x=Yd(b),v=u0(b),w=nu(b),S=lu(b),{getReferenceProps:N,getFloatingProps:E}=iu([g,x,v,w,S]),C=r==="working"&&u.includes("staged")||r==="staged"&&u.includes("working"),j=()=>{const H=o.specialOptions.find(V=>V.value===r);if(H)return H.label;const M=o.branches.find(V=>V.name===r);if(M)return`${M.name}${M.current?" (current)":""}`;const P=o.commits.find(V=>V.shortHash===r||V.hash===r);return P?`${P.shortHash} - ${P.message}`:r||"Select..."},O=H=>{l(H),f(!1)},U=H=>u.includes(H),_=(H,M)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",H?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",H?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",M?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),F=(H,M)=>H===r||M===r?!0:i?H===i||M===i:!1,z=()=>{let H=0;const M=o.specialOptions.findIndex(P=>P.value===r);if(M!==-1)return M;if(H+=o.specialOptions.length,!C){const P=o.commits.findIndex(J=>J.shortHash===r);if(P!==-1)return H+P;H+=o.commits.length;const V=o.branches.findIndex(J=>J.name===r);if(V!==-1)return H+V}return 0};return y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:p.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"listbox","aria-expanded":c,...N(),children:[y.jsxs("span",{className:"text-xs text-github-text-secondary",children:[e,":"]}),y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary max-w-[150px] truncate",children:j()}),y.jsx(Ml,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})]}),c&&y.jsx(tu,{children:y.jsx(P3,{context:b,modal:!1,initialFocus:z(),children:y.jsxs("div",{ref:p.setFloating,style:h,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto",...E(),children:[o.specialOptions.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Special"}),o.specialOptions.map(H=>y.jsx("button",{onClick:()=>O(H.value),disabled:U(H.value),className:_(H.value===r,U(H.value)),children:H.label},H.value))]}),!C&&o.commits.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),o.commits.map(H=>y.jsx("button",{onClick:()=>O(H.shortHash),disabled:U(H.shortHash),className:_(F(H.shortHash,H.hash),U(H.shortHash)),children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:H.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:H.message})]})},H.hash))]}),!C&&o.branches.length>0&&y.jsxs("div",{children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Branches"}),o.branches.map(H=>y.jsx("button",{onClick:()=>O(H.name),disabled:U(H.name),className:_(H.name===r,U(H.name)),children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-github-text-primary",children:H.name}),H.current&&y.jsx("span",{className:"text-xs text-github-text-muted",children:"(current)"})]})},H.name))]})]})})})]})}function QR({isOpen:e,onClose:r,options:i,baseRevision:l,targetRevision:o,resolvedBaseRevision:u,resolvedTargetRevision:c,onApply:f}){const[p,h]=A.useState(l),[b,g]=A.useState(o),{enableScope:x,disableScope:v}=Wa();A.useEffect(()=>(e?v("navigation"):x("navigation"),()=>{x("navigation")}),[e,x,v]);const w=A.useMemo(()=>{const E=c||b,C=i.commits.findIndex(O=>O.shortHash===E||O.hash===E);if(C===-1)return b?[b]:[];const j=i.commits.slice(0,C+1).map(O=>O.shortHash);return b&&!j.includes(b)&&j.push(b),j.includes("working")||j.push("working"),j},[b,c,i.commits]),S=A.useMemo(()=>{const E=u||p,C=i.commits.findIndex(O=>O.shortHash===E||O.hash===E);if(C===-1)return p?[p]:[];const j=i.commits.slice(C).map(O=>O.shortHash);return p&&!j.includes(p)&&j.push(p),j},[p,u,i.commits]);if(!e)return null;const N=()=>{f(p,b),r()};return y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Detailed Diff"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1","aria-label":"Close detailed diff",children:y.jsx(yu,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-4",children:[y.jsxs("div",{className:"flex items-center justify-center gap-3",children:[y.jsx(qx,{label:"Base",value:p,resolvedValue:u,onChange:h,options:i,disabledValues:w}),y.jsx("span",{className:"text-github-text-muted",children:"..."}),y.jsx(qx,{label:"Target",value:b,resolvedValue:c,onChange:g,options:i,disabledValues:S})]}),y.jsxs("div",{className:"flex justify-end gap-2",children:[y.jsx("button",{onClick:r,className:"px-3 py-1.5 text-xs font-medium rounded border border-github-border text-github-text-secondary hover:text-github-text-primary transition-colors",type:"button",children:"Cancel"}),y.jsx("button",{onClick:N,className:"px-3 py-1.5 text-xs font-medium rounded bg-github-accent text-white hover:bg-github-accent/90 transition-colors",type:"button",children:"Apply"})]})]})]})]})}const JR=[{id:"vscode",label:"VS Code",protocol:"vscode",cliCommand:"code",cliArgs:[],lineFormat:"goto-flag",aliases:["vscode","code"]},{id:"cursor",label:"Cursor",protocol:"cursor",cliCommand:"cursor",cliArgs:[],lineFormat:"goto-flag",aliases:["cursor"]},{id:"zed",label:"Zed",protocol:"zed",cliCommand:"zed",cliArgs:[],lineFormat:"path-suffix",aliases:["zed"]},{id:"none",label:"Hide “Open in editor” button",protocol:null,cliCommand:null,cliArgs:[],lineFormat:"goto-flag",aliases:["none","disabled","off"]}],Nv="vscode",$x=[{id:"github",label:"GitHub Light"},{id:"vsLight",label:"VS Light"},{id:"oneLight",label:"One Light"},{id:"gruvboxMaterialLight",label:"Gruvbox Material Light"},{id:"nightOwlLight",label:"Night Owl Light"}],Px=[{id:"vsDark",label:"VS Dark"},{id:"oneDark",label:"One Dark"},{id:"gruvboxMaterialDark",label:"Gruvbox Material Dark"},{id:"nightOwl",label:"Night Owl"},{id:"dracula",label:"Dracula"},{id:"okaidia",label:"Okaidia"}],Vx=e=>e==="top"?"translateY(4px)":e==="bottom"?"translateY(-4px)":e==="left"?"translateX(4px)":"translateX(-4px)",WR=(e,r)=>{if(typeof e=="function"){e(r);return}e&&"current"in e&&(e.current=r)};function ej({content:e,children:r,placement:i="top",className:l=""}){const[o,u]=A.useState(!1),c=A.useId(),{refs:f,floatingStyles:p,context:h}=ru({open:o,onOpenChange:u,placement:i,middleware:[Ks(8),Js(),Qs({padding:8})],whileElementsMounted:Xs}),b=Ws(h,{move:!1}),g=u0(h),x=nu(h),v=lu(h,{role:"tooltip"}),{isMounted:w,styles:S}=J3(h,{duration:{open:180,close:120},initial:({side:U})=>({opacity:0,transform:Vx(U)}),open:{opacity:1,transform:"translate(0, 0)"},close:({side:U})=>({opacity:0,transform:Vx(U)}),common:{willChange:"opacity, transform"}}),{getReferenceProps:N,getFloatingProps:E}=iu([b,g,x,v]),C=r.props,j=N({...C,"aria-describedby":o?c:void 0}),O=["w-64 rounded-md border border-github-border bg-github-bg-primary px-3 py-2 text-xs text-github-text-primary",l].filter(Boolean).join(" ");return y.jsxs(y.Fragment,{children:[A.cloneElement(r,{...j,ref:U=>{WR(C.ref,U),f.setReference(U)}}),w?y.jsx(tu,{children:y.jsx("div",{ref:f.setFloating,...E(),id:c,style:p,className:"z-[60]",children:y.jsx("div",{style:S,className:O,children:e})})}):null]})}const tj={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Nv,colorVision:"normal"},nj=[{name:"System Font",value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif'},{name:"Menlo",value:'Menlo, Monaco, "Courier New", monospace'},{name:"SF Mono",value:'SF Mono, Consolas, "Liberation Mono", monospace'},{name:"Fira Code",value:'"Fira Code", "Courier New", monospace'},{name:"JetBrains Mono",value:'"JetBrains Mono", "Courier New", monospace'}],rj=[{id:"normal",label:"Normal"},{id:"deuteranopia",label:"Deuteranopia",tooltip:"Deuteranopia mode uses blue/orange instead of green/red for diffs."}];function ij({isOpen:e,onClose:r,settings:i,onSettingsChange:l}){const[o,u]=A.useState(i),{enableScope:c,disableScope:f}=Wa();A.useEffect(()=>{u(i)},[i]),A.useEffect(()=>{l(o)},[o,l]),A.useEffect(()=>(e?f("navigation"):c("navigation"),()=>{c("navigation")}),[e,c,f]);const p=()=>o.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o.theme,h=()=>p()==="light"?$x:Px,b=x=>{const v={...o,theme:x},S=(x==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":x)==="light"?$x:Px;if(!S.some(E=>E.id===o.syntaxTheme)&&S.length>0){const E=S[0];E&&(v.syntaxTheme=E.id)}u(v)},g=()=>{u(tj)};return e?y.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 pointer-events-none",children:y.jsxs("div",{className:"bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-md mx-4 pointer-events-auto",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsxs("h2",{className:"text-lg font-semibold text-github-text-primary flex items-center gap-2",children:[y.jsx(x1,{size:20}),"Appearance Settings"]}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1",children:y.jsx(yu,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Size"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("input",{type:"range",min:"10",max:"20",step:"1",value:o.fontSize,onChange:x=>u({...o,fontSize:parseInt(x.target.value)}),className:"flex-1 accent-github-accent"}),y.jsxs("span",{className:"text-sm text-github-text-secondary w-8 text-right",children:[o.fontSize,"px"]})]})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Family"}),y.jsx("select",{value:o.fontFamily,onChange:x=>u({...o,fontFamily:x.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:nj.map(x=>y.jsx("option",{value:x.value,children:x.name},x.value))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Theme"}),y.jsx("div",{className:"flex gap-2",children:["light","dark","auto"].map(x=>y.jsx("button",{onClick:()=>b(x),className:`px-3 py-2 text-sm rounded border transition-colors ${o.theme===x?"bg-github-accent text-white border-github-accent":"bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary"}`,children:x.charAt(0).toUpperCase()+x.slice(1)},x))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Color Vision"}),y.jsx("div",{className:"flex gap-2",children:rj.map(x=>{const v=(o.colorVision??"normal")===x.id,w=y.jsx("button",{onClick:()=>u({...o,colorVision:x.id}),className:`px-3 py-2 text-sm rounded border transition-colors ${v?"bg-github-accent text-white border-github-accent":"bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary"}`,children:x.label},x.id);return"tooltip"in x?y.jsx(ej,{content:x.tooltip,children:w},x.id):w})})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Syntax Highlighting Theme"}),y.jsx("select",{value:o.syntaxTheme,onChange:x=>u({...o,syntaxTheme:x.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:h().map(x=>y.jsx("option",{value:x.id,children:x.label},x.id))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Open In Editor"}),y.jsx("select",{value:o.editor,onChange:x=>u({...o,editor:x.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:JR.map(x=>y.jsx("option",{value:x.id,children:x.label},x.id))})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-github-border",children:[y.jsx("button",{onClick:g,className:"px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary",children:"Reset to Default"}),y.jsx("button",{onClick:r,className:"px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600",children:"Close"})]})]})}):null}const Gx={position:"absolute",fontSize:"16px",pointerEvents:"none",zIndex:100,transform:"translateY(20px) scale(0.5)",opacity:0},lj=({isActive:e})=>e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"animate-sparkle-rise",style:{...Gx,left:"-12px",animationDelay:"0s"},children:"✨"}),y.jsx("div",{className:"animate-sparkle-rise",style:{...Gx,right:"-12px",animationDelay:"0.3s"},children:"✨"})]}):null,Yx={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Nv,colorVision:"normal"};function aj(){const[e,r]=A.useState(()=>{try{const o=localStorage.getItem(Id);if(o)return{...Yx,...JSON.parse(o)}}catch(o){console.warn("Failed to load appearance settings from localStorage:",o)}return Yx}),i=A.useCallback((o,u="normal")=>{n1(o,u)},[]);return A.useEffect(()=>{const o=document.documentElement;o.style.setProperty("--app-font-size",`${e.fontSize}px`),o.style.setProperty("--app-font-family",e.fontFamily);const u=e.colorVision??"normal";if(e.theme==="auto"){const c=window.matchMedia("(prefers-color-scheme: dark)");i(Fs("auto",c.matches?"dark":"light"),u);const f=p=>{i(Fs("auto",p.matches?"dark":"light"),u)};return c.addEventListener("change",f),()=>c.removeEventListener("change",f)}else{i(e.theme,u);return}},[e,i]),{settings:e,updateSettings:o=>{r(o);try{localStorage.setItem(Id,JSON.stringify(o))}catch(u){console.warn("Failed to save appearance settings to localStorage:",u)}}}}function Av(e,r,i,l){const o=typeof r=="number"?`L${r}`:Array.isArray(r)?`L${r[0]}-L${r[1]}`:"",u=e||"<unknown file>";if(w1(i)){const c=S1(i);if(c.length>0){let f=`${u}:${o}`,p=0;for(const b of c){const g=i.slice(p,b.startIndex).trim();g&&(f+=`
73
- ${g}`),l&&(f+=`
74
- ORIGINAL:
75
- \`\`\`
76
- ${l}
77
- \`\`\``),f+=`
78
- SUGGESTED:
79
- \`\`\`
80
- ${b.suggestedCode}
81
- \`\`\``,p=b.endIndex}const h=i.slice(p).trim();return h&&(f+=`
82
- ${h}`),f}}return`${u}:${o}
83
- ${i}`}function oj(e){return e.length===0?"":e.map(i=>Av(i.file,i.line,i.body,i.codeContent)).join(`
84
- =====
85
- `)}const Ds="difit-storage-v1";class sj{generateStorageKey(r,i){const l=o=>o.replace(/[^a-zA-Z0-9-_]/g,u=>`_${u.charCodeAt(0).toString(16)}_`);return`${l(r)}-${l(i)}`}normalizeCommitish(r,i,l){if(r==="."||r==="working")return"WORKING";if(r==="staged")return"STAGED";if((r==="HEAD"||r==="@")&&i)return i;if(l?.has(r)){const o=l.get(r);if(o)return o}return(r.startsWith("@")||r.includes("^")||r.includes("~")||r.includes("HEAD"))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${r}' - may cause key collision. currentCommitHash=${i}`),r}getStorageKey(r,i,l,o,u){let c,f;i==="."||i==="working"?(c=l||r,f="WORKING"):i==="staged"?(c=l||r,f="STAGED"):(c=this.normalizeCommitish(r,l,o),f=this.normalizeCommitish(i,l,o));const p=this.generateStorageKey(c,f);return u?`${Ds}/${u}/${p}`:`${Ds}/${p}`}getDiffContextData(r,i,l,o,u){try{const c=this.getStorageKey(r,i,l,o,u),f=localStorage.getItem(c);if(!f)return null;const p=JSON.parse(f);return p.version!==1?(console.warn(`Unknown storage version: ${p.version}`),null):p}catch(c){return console.error("Error reading diff context data:",c),null}}saveDiffContextData(r,i,l,o,u,c){try{const f=this.getStorageKey(r,i,o,u,c),p={...l,baseCommitish:r,targetCommitish:i,lastModifiedAt:new Date().toISOString()};localStorage.setItem(f,JSON.stringify(p))}catch(f){f instanceof DOMException&&f.name==="QuotaExceededError"?console.error("localStorage quota exceeded"):console.error("Error saving diff context data:",f)}}getComments(r,i,l,o,u){return this.getDiffContextData(r,i,l,o,u)?.comments||[]}saveComments(r,i,l,o,u,c){const p=this.getDiffContextData(r,i,o,u,c)||{version:1,baseCommitish:r,targetCommitish:i,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};p.comments=l,this.saveDiffContextData(r,i,p,o,u,c)}getViewedFiles(r,i,l,o,u){return this.getDiffContextData(r,i,l,o,u)?.viewedFiles||[]}saveViewedFiles(r,i,l,o,u,c){const p=this.getDiffContextData(r,i,o,u,c)||{version:1,baseCommitish:r,targetCommitish:i,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};p.viewedFiles=l,this.saveDiffContextData(r,i,p,o,u,c)}cleanupOldData(r){const i=new Date;i.setDate(i.getDate()-r);const l=i.getTime(),o=[];for(let u=0;u<localStorage.length;u++){const c=localStorage.key(u);if(c?.startsWith(Ds))try{const f=localStorage.getItem(c);if(!f)continue;const p=JSON.parse(f);new Date(p.lastModifiedAt).getTime()<l&&o.push(c)}catch{}}o.forEach(u=>localStorage.removeItem(u))}getStorageSize(){let r=0;for(let i=0;i<localStorage.length;i++){const l=localStorage.key(i);if(!l?.startsWith(Ds))continue;const o=localStorage.getItem(l);o&&(r+=(l.length+o.length)*2)}return r}}const Ga=new sj;async function Xx(e){try{const i=new TextEncoder().encode(e),l=await crypto.subtle.digest("SHA-256",i);return Array.from(new Uint8Array(l)).map(u=>u.toString(16).padStart(2,"0")).join("")}catch{return console.warn("Crypto API not available, using fallback hash"),uj(e)}}function uj(e){let r=0;for(let i=0;i<e.length;i++){const l=e.charCodeAt(i);r=(r<<5)-r+l,r=r&r}return Math.abs(r).toString(16)}function Zx(e){const r=e.chunks.map(i=>{const l=i.lines.filter(o=>o.type!=="hunk"&&o.type!=="header").map(o=>`${o.type}:${o.content}`).join(`
86
- `);return`${i.header}
87
- ${l}`}).join(`
88
-
89
- `);return`${e.path}
90
- ${e.status}
91
- ${r}`}function cj(e,r,i,l,o){const[u,c]=A.useState([]);A.useEffect(()=>{if(!e||!r)return;const w=Ga.getComments(e,r,i,l,o);c(w)},[e,r,i,l,o]);const f=A.useCallback(w=>{!e||!r||(Ga.saveComments(e,r,w,i,l,o),c(w))},[e,r,i,l,o]),p=A.useCallback(w=>{const S={id:crypto.randomUUID(),filePath:w.filePath,body:w.body,author:"User",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),position:{side:w.side,line:w.line},codeSnapshot:w.codeSnapshot||{content:"",language:WE(w.filePath)}},N=[...u,S];return f(N),S},[u,f]),h=A.useCallback(w=>{const S=u.filter(N=>N.id!==w);f(S)},[u,f]),b=A.useCallback((w,S)=>{const N=u.map(E=>E.id===w?{...E,body:S,updatedAt:new Date().toISOString()}:E);f(N)},[u,f]),g=A.useCallback(()=>{f([])},[f]),x=A.useCallback(w=>{const S=u.find(E=>E.id===w);if(!S)return"";const N=typeof S.position.line=="number"?S.position.line:[S.position.line.start,S.position.line.end];return Av(S.filePath,N,S.body,S.codeSnapshot?.content)},[u]),v=A.useCallback(()=>{const w=u.map(S=>({id:S.id,file:S.filePath,line:typeof S.position.line=="number"?S.position.line:[S.position.line.start,S.position.line.end],body:S.body,timestamp:S.createdAt,author:S.author,codeContent:S.codeSnapshot?.content}));return oj(w)},[u]);return{comments:u,addComment:p,removeComment:h,updateComment:b,clearAllComments:g,generatePrompt:x,generateAllCommentsPrompt:v}}const fj=20;async function Kx(e,r){const i=encodeURIComponent(e),l=await fetch(`/api/blob/${i}?ref=${encodeURIComponent(r)}`);if(!l.ok)throw new Error(`Failed to fetch file content: ${l.statusText}`);const u=(await l.text()).split(`
92
- `);return u.length>0&&u[u.length-1]===""&&u.pop(),{lines:u,totalLines:u.length}}async function dj(e,r,i,l){const o=encodeURIComponent(e),u=new URLSearchParams;r&&u.set("oldRef",r),i&&u.set("newRef",i),l&&l!==e&&u.set("oldPath",l);const c=await fetch(`/api/line-count/${o}?${u}`);if(!c.ok)throw new Error(`Failed to fetch line count: ${c.statusText}`);return c.json()}function hj({baseCommitish:e,targetCommitish:r}){const[i,l]=A.useState({}),[o,u]=A.useState(!1),[c,f]=A.useState(null),[p,h]=A.useState(0),b=A.useRef(new Map),g=A.useRef({});g.current=i;const x=A.useCallback(async _=>{const F=b.current.get(_.path);if(F)return F;const z=(async()=>{const H=g.current[_.path];if(H?.oldContent&&H?.newContent)return H;const M={...H,expandedRanges:H?.expandedRanges||[]};if(_.status!=="added"&&e){const P=_.oldPath||_.path;try{const{lines:V,totalLines:J}=await Kx(P,e);M.oldContent=V,M.oldTotalLines=J}catch(V){console.error("Failed to fetch old file content:",V),M.oldContent=[],M.oldTotalLines=0}}if(_.status!=="deleted"&&r)try{const{lines:P,totalLines:V}=await Kx(_.path,r);M.newContent=P,M.newTotalLines=V}catch(P){console.error("Failed to fetch new file content:",P),M.newContent=[],M.newTotalLines=0}return M})();b.current.set(_.path,z);try{return await z}finally{b.current.delete(_.path)}},[e,r]),v=A.useCallback(_=>{f(_),h(F=>F+1)},[]),w=A.useCallback(async(_,F,z,H=fj)=>{u(!0);try{const M=await x(_);l(P=>{const V=P[_.path],J=V?.expandedRanges||M.expandedRanges||[],I=J.findIndex(B=>B.chunkIndex===F&&B.direction===z),Z=[...J];if(I>=0&&Z[I]){const B=Z[I];Z[I]={chunkIndex:B.chunkIndex,direction:B.direction,count:B.count+H}}else Z.push({chunkIndex:F,direction:z,count:H});return{...P,[_.path]:{oldContent:V?.oldContent??M.oldContent,newContent:V?.newContent??M.newContent,oldTotalLines:V?.oldTotalLines??M.oldTotalLines,newTotalLines:V?.newTotalLines??M.newTotalLines,expandedRanges:Z}}}),v(_.path)}finally{u(!1)}},[x,v]),S=A.useCallback(async(_,F,z)=>{u(!0);try{const H=await x(_);l(M=>{const P=M[_.path],J=[...P?.expandedRanges||H.expandedRanges||[]],I=J.findIndex(D=>D.chunkIndex===F&&D.direction==="up"),Z=J.findIndex(D=>D.chunkIndex===F-1&&D.direction==="down");let B=0,Y=0;I>=0&&J[I]&&(B=J[I].count),Z>=0&&J[Z]&&(Y=J[Z].count);const X=B+Y+z,q=J.filter(D=>!(D.chunkIndex===F-1&&D.direction==="down")),R=q.findIndex(D=>D.chunkIndex===F&&D.direction==="up");return R>=0&&q[R]?q[R]={chunkIndex:F,direction:"up",count:X}:q.push({chunkIndex:F,direction:"up",count:X}),{...M,[_.path]:{oldContent:P?.oldContent??H.oldContent,newContent:P?.newContent??H.newContent,oldTotalLines:P?.oldTotalLines??H.oldTotalLines,newTotalLines:P?.newTotalLines??H.newTotalLines,expandedRanges:q}}}),v(_.path)}finally{u(!1)}},[x,v]),N=A.useCallback(async _=>{const F=g.current[_.path];if(F?.oldTotalLines!==void 0||F?.newTotalLines!==void 0)return;const z=_.status!=="added"?e:void 0,H=_.status!=="deleted"?r:void 0;if(!(!z&&!H))try{const{oldLineCount:M,newLineCount:P}=await dj(_.path,z,H,_.oldPath);l(V=>{const J=V[_.path];return J?.oldTotalLines!==void 0||J?.newTotalLines!==void 0?V:{...V,[_.path]:{...J,expandedRanges:J?.expandedRanges||[],oldTotalLines:M,newTotalLines:P}}}),v(_.path)}catch(M){console.error("Failed to prefetch line count:",M)}},[e,r,v]),E=A.useCallback((_,F,z)=>{const H=i[_];return H&&H.expandedRanges.find(P=>P.chunkIndex===F&&P.direction===z)?.count||0},[i]),C=A.useCallback((_,F,z)=>{if(_.status==="added"||_.status==="deleted")return 0;const H=_.chunks[z-1];let M;if(!H)M=F.oldStart-1;else{const J=H.oldStart+H.oldLines;M=F.oldStart-J}const P=E(_.path,z,"up"),V=z>0?E(_.path,z-1,"down"):0;return Math.max(0,M-P-V)},[E]),j=A.useCallback((_,F,z)=>{if(_.status==="added"||_.status==="deleted")return 0;const H=i[_.path],M=H?.oldTotalLines||H?.newTotalLines;if(M===void 0)return _.chunks[z+1]?0:-1;if(_.chunks[z+1])return 0;const V=F.oldStart+F.oldLines-1,J=M-V,I=E(_.path,z,"down");return Math.max(0,J-I)},[i,E]),O=A.useCallback((_,F,z)=>{const H=i[_.path];if(!H)return F;const M=E(_.path,z,"up"),P=E(_.path,z,"down");if(M===0&&P===0)return F;const V=H.oldContent||[],J=H.newContent||[],I=[];if(M>0){const Y=_.chunks[z-1];let X;Y?X=Y.oldStart+Y.oldLines-1:X=Math.max(0,F.oldStart-1-M);const q=F.oldStart-1,R=F.newStart-1,D=Math.min(M,q-X),$=q-D,T=R-D;for(let W=0;W<D;W++){const te=$+W+1,ce=T+W+1,me=V[te-1]??J[ce-1]??"";I.push({type:"normal",content:me,oldLineNumber:te,newLineNumber:ce,isExpanded:!0})}}if(I.push(...F.lines),P>0){const Y=F.oldStart+F.oldLines-1,X=F.newStart+F.newLines-1,q=_.chunks[z+1],R=q?q.oldStart-1:H.oldTotalLines||Y,D=Math.min(P,R-Y);for(let $=0;$<D;$++){const T=Y+$+1,W=X+$+1,te=V[T-1]??J[W-1]??"";I.push({type:"normal",content:te,oldLineNumber:T,newLineNumber:W,isExpanded:!0})}}const Z=I[0],B=I[I.length-1];return{...F,lines:I,oldStart:Z?.oldLineNumber??F.oldStart,newStart:Z?.newLineNumber??F.newStart,oldLines:(B?.oldLineNumber??F.oldStart+F.oldLines-1)-(Z?.oldLineNumber??F.oldStart)+1,newLines:(B?.newLineNumber??F.newStart+F.newLines-1)-(Z?.newLineNumber??F.newStart)+1}},[i,E]),U=A.useCallback(_=>{const F=[];for(let z=0;z<_.chunks.length;z++){const H=_.chunks[z];if(!H)continue;const M=O(_,H,z),P=C(_,H,z),V=j(_,H,z),J=F[F.length-1];if(J&&P===0){J.lines=[...J.lines,...M.lines],J.originalIndices.push(z),J.hiddenLinesAfter=V;const I=J.lines[J.lines.length-1];J.oldLines=(I?.oldLineNumber??J.oldStart+J.oldLines-1)-J.oldStart+1,J.newLines=(I?.newLineNumber??J.newStart+J.newLines-1)-J.newStart+1}else F.push({...M,originalIndices:[z],hiddenLinesBefore:P,hiddenLinesAfter:V})}return F},[O,C,j]);return{expandedState:i,isLoading:o,lastUpdatedFilePath:c,lastUpdatedAt:p,expandLines:w,expandAllBetweenChunks:S,prefetchFileContent:N,getMergedChunks:U,getHiddenLinesBefore:C,getHiddenLinesAfter:j}}var Tv=(e=>(e.DEFAULT="default",e.WORKING="working",e.STAGED="staged",e.DOT="dot",e.SPECIFIC="specific",e))(Tv||{});function pj(e){const r=A.useRef(null),i=A.useRef(null),l=A.useRef(0),o=5,u=3e3,[c,f]=A.useState({isWatchEnabled:!1,diffMode:Tv.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:"disconnected"}),[p,h]=A.useState(null),b=A.useCallback(()=>{if(!r.current)try{const v=new EventSource("/api/watch");r.current=v,v.onopen=()=>{console.log("Connected to file watch service"),f(w=>({...w,connectionStatus:"connected"})),l.current=0,h(null)},v.onmessage=w=>{try{const S=JSON.parse(w.data);switch(S.type){case"connected":f(N=>({...N,isWatchEnabled:!0,diffMode:S.diffMode,connectionStatus:"connected"}));break;case"reload":console.log("File changes detected, showing reload button:",S.changeType),f(N=>({...N,shouldReload:!0,lastChangeTime:new Date,lastChangeType:S.changeType}));break;case"error":console.error("File watch error:",S.message),h(S.message||"File watch error occurred");break}}catch(S){console.error("Error parsing watch event:",S)}},v.onerror=()=>{console.log("File watch connection lost"),f(w=>({...w,connectionStatus:"disconnected"})),r.current&&(r.current.close(),r.current=null),l.current<o?(f(w=>({...w,connectionStatus:"reconnecting"})),l.current+=1,i.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${l.current}/${o})...`),b()},u)):(console.error("Max reconnection attempts reached"),h("Lost connection to file watch service"))}}catch(v){console.error("Failed to connect to file watch service:",v),h("Failed to connect to file watch service")}},[o,u]),g=A.useCallback(async()=>{if(!c.isReloading){f(v=>({...v,isReloading:!0}));try{e&&await e(),f(v=>({...v,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(v){console.error("Reload failed:",v),h("Failed to reload diff data"),f(w=>({...w,isReloading:!1}))}}},[e,c.isReloading]),x=()=>{r.current&&(r.current.close(),r.current=null),i.current&&(clearTimeout(i.current),i.current=null)};return A.useEffect(()=>(b(),x),[b]),A.useEffect(()=>x,[]),{shouldReload:c.shouldReload,isConnected:c.connectionStatus==="connected",error:p,reload:g,watchState:c}}const hh={SCROLL_CONTAINER:"main.overflow-y-auto"};function ii(e,r){const i=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return r==="split"?`${i}-${e.side}`:i}function Rv(e,r){return`${e}:${r}`}function mj(e,r){const i=r[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return i&&(i.type==="add"||i.type==="delete"||i.type==="normal")?i.type:null}function kn(e,r){const i=mj(e,r);return i?i==="normal"?!0:i==="delete"?e.side==="left":i==="add"?e.side==="right":!1:!1}function jv(e,r){return kn(e,r)?e:{...e,side:e.side==="left"?"right":"left"}}const Qx={VIEWPORT_OFFSET_RATIO:1/3};function gj(e,r,i,l){return{line:o=>{const u=e[o.fileIndex];return!u||l?.has(u.path)?!1:i==="unified"||kn(o,e)},chunk:o=>{const u=e[o.fileIndex];if(!u||l?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];if(!c||c.type==="normal")return!1;if(o.lineIndex===0)return!0;const f=u.chunks[o.chunkIndex]?.lines[o.lineIndex-1];return!f||f.type==="normal"},comment:o=>{const u=e[o.fileIndex];if(!u||l?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];if(!c||c.type==="delete")return!1;const f=c.newLineNumber;if(!f)return!1;const p=Rv(u.path,f);return r.has(p)},file:o=>o.chunkIndex===0&&o.lineIndex===0}}function bj(){return e=>{const r=document.getElementById(e);if(!r)return;const i=document.querySelector(hh.SCROLL_CONTAINER);if(!i)throw new Error(`Scrollable container (${hh.SCROLL_CONTAINER}) not found`);const l=r.getBoundingClientRect(),o=i.getBoundingClientRect(),u=i.clientHeight,c=i.scrollTop,f=Math.max(o.top,0),p=Math.min(o.bottom,window.innerHeight);if(!(l.top>=f&&l.bottom<=p)){const S=yj(r,i)-u*Qx.VIEWPORT_OFFSET_RATIO;i.scrollTop=Math.max(0,S);return}const b=l.bottom>Math.min(o.bottom,window.innerHeight),x=r.offsetTop-i.offsetTop-u*Qx.VIEWPORT_OFFSET_RATIO,v=x>c;b&&v&&(i.scrollTop=Math.max(0,x))}}function yj(e,r){let i=e,l=0;for(;i&&i!==r&&i.offsetParent;)l+=i.offsetTop,i=i.offsetParent;return i&&i!==r&&(l+=i.offsetTop),l}function xj(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:"right"}}function vj(e,r,i){return i&&e.fileIndex===r.fileIndex&&e.chunkIndex===r.chunkIndex&&e.lineIndex===r.lineIndex}function wj(e,r,i){let{fileIndex:l,chunkIndex:o,lineIndex:u}=e;const c=i.length;let f=0;if(r==="next")for(u++;f<c;){if(i[l]?.chunks[o]?.lines[u])return{...e,fileIndex:l,chunkIndex:o,lineIndex:u};o++,u=0,i[l]?.chunks[o]||(l++,o=0,u=0,l>=c&&(l=0,f++))}else for(u--;f<c;){if(u<0)if(o--,o<0){l--,l<0&&(l=c-1,f++);const p=i[l];if(p&&p.chunks.length>0){o=p.chunks.length-1;const h=p.chunks[o];u=h&&h.lines.length>0?h.lines.length-1:-1}else o=-1,u=-1}else{const p=i[l]?.chunks[o];u=p&&p.lines.length>0?p.lines.length-1:-1}if(u>=0&&i[l]?.chunks[o]?.lines[u])return{...e,fileIndex:l,chunkIndex:o,lineIndex:u};u<0||u--}return null}function Sj(e,r,i,l,o){let u=e,c=!1;for(;u;){const f=wj(u,r,l);if(!f||(u=f,vj(u,e,c)))break;if(c=!0,i(u,l)){const p=jv(u,l);return{position:p,scrollTarget:ii(p,o)}}}return{position:null,scrollTarget:null}}function kj({files:e,comments:r,viewMode:i=eo,reviewedFiles:l,onToggleReviewed:o,onCreateComment:u,onCopyAllComments:c,onDeleteAllComments:f,onShowCommentsList:p,onRefresh:h}){const[b,g]=A.useState(null),[x,v]=A.useState(!1),w=A.useMemo(()=>bj(),[]),S=A.useMemo(()=>{const P=new Map;return r.forEach(V=>{const J=Array.isArray(V.line)?V.line[0]:V.line,I=Rv(V.file,J);P.has(I)||P.set(I,[]),P.get(I)?.push(V)}),P},[r]),N=A.useMemo(()=>gj(e,S,i,l),[e,S,i,l]),E=A.useCallback((P,V)=>{if(e.length===0)return{position:null,scrollTarget:null};const J=xj(b);return Sj(J,P,V,e,i)},[b,e,i]),C=A.useCallback(P=>V=>{const J=E(V,P);J.position&&(g(J.position),J.scrollTarget&&w(J.scrollTarget))},[E,w]),j=A.useMemo(()=>C(N.line),[C,N.line]),O=A.useMemo(()=>C(N.chunk),[C,N.chunk]),U=A.useMemo(()=>C(N.file),[C,N.file]),_=A.useMemo(()=>C(N.comment),[C,N.comment]),F=A.useCallback(P=>{if(!b||i!=="split")return;let V={...b,side:P};const J=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];if(J){if(P==="left"&&J.type==="add"&&b.lineIndex>0){if(e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex-1]?.type==="delete"){V={...V,lineIndex:b.lineIndex-1},g(V),w(ii(V,i));return}}else if(P==="right"&&J.type==="delete"&&e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex+1]?.type==="add"){V={...V,lineIndex:b.lineIndex+1},g(V),w(ii(V,i));return}}if(!kn(V,e)){const I=e[b.fileIndex];if(!I)return;const Z=I.chunks[b.chunkIndex];if(Z){for(let B=b.lineIndex+1;B<Z.lines.length;B++){const Y={...V,lineIndex:B};if(kn(Y,e)){V=Y;break}}if(!kn(V,e))for(let B=b.lineIndex-1;B>=0;B--){const Y={...V,lineIndex:B};if(kn(Y,e)){V=Y;break}}}if(!kn(V,e)){for(let B=b.chunkIndex+1;B<I.chunks.length;B++){const Y=I.chunks[B];if(Y){for(let X=0;X<Y.lines.length;X++){const q={...V,chunkIndex:B,lineIndex:X};if(kn(q,e)){V=q;break}}if(kn(V,e))break}}if(!kn(V,e))for(let B=b.chunkIndex-1;B>=0;B--){const Y=I.chunks[B];if(Y){for(let X=Y.lines.length-1;X>=0;X--){const q={...V,chunkIndex:B,lineIndex:X};if(kn(q,e)){V=q;break}}if(kn(V,e))break}}}}g(V),w(ii(V,i))},[b,i,w,e]),z=A.useCallback(()=>{const P=document.querySelector(hh.SCROLL_CONTAINER);if(!P)return;const V=P.getBoundingClientRect(),J=V.top+V.height/2;let I=1/0,Z=null;e.forEach((B,Y)=>{B.chunks.forEach((X,q)=>{X.lines.forEach((R,D)=>{const $=i==="split"?["left","right"]:["right"];for(const T of $){const W={fileIndex:Y,chunkIndex:q,lineIndex:D,side:T};if(i==="split"&&!kn(W,e))continue;const te=ii(W,i),ce=document.getElementById(te);if(ce){const me=ce.getBoundingClientRect(),xe=me.top+me.height/2,ge=Math.abs(xe-J);me.top<V.bottom&&me.bottom>V.top&&ge<I&&(I=ge,Z=W)}}})})}),Z&&g(Z)},[e,i,g]),H=A.useCallback(P=>{if(!P){g(null);return}const V=jv(P,e);g(V),w(ii(V,i))},[e,i,w]),M={scopes:"navigation",enableOnFormTags:!1,preventDefault:!0};return lt("j, down",()=>j("next"),M,[j]),lt("k, up",()=>j("prev"),M,[j]),lt("n",()=>O("next"),M,[O]),lt("p",()=>O("prev"),M,[O]),lt("shift+n",()=>_("next"),M,[_]),lt("shift+p",()=>_("prev"),M,[_]),lt("]",()=>U("next"),{...M,useKey:!0},[U]),lt("[",()=>U("prev"),{...M,useKey:!0},[U]),lt("{",()=>{e.length>0&&(g({fileIndex:0,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"}),w(ii({fileIndex:0,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"},i)))},{...M,useKey:!0},[e,i,w]),lt("}",()=>{if(e.length>0){const P=e.length-1,V=e[P];V&&V.chunks.length>0&&(g({fileIndex:P,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"}),w(ii({fileIndex:P,chunkIndex:0,lineIndex:0,side:i==="split"?"left":"right"},i)))}},{...M,useKey:!0},[e,i,w]),lt("h, left",()=>F("left"),{...M,enabled:i==="split"},[F,i]),lt("l, right",()=>F("right"),{...M,enabled:i==="split"},[F,i]),lt("v",()=>{if(b){const P=e[b.fileIndex];P&&o(P.path)}},M,[b,e,o]),lt("shift+r",()=>{h&&h()},M,[h]),lt("c",()=>{if(b&&u){const P=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];P&&P.type!=="delete"&&u()}},M,[b,e,u]),lt("?",()=>v(!x),{...M,useKey:!0},[x]),lt(".",P=>{P.ctrlKey||P.altKey||P.shiftKey||P.metaKey||(z(),P.preventDefault())},{...M,useKey:!0,preventDefault:!1},[z]),lt("shift+c",()=>{c&&c()},{...M,scopes:["navigation","comments-list"]},[c]),lt("shift+d",()=>{f&&f()},{...M,scopes:["navigation","comments-list"]},[f]),lt("shift+l",()=>{p&&p()},M,[p]),{cursor:b,isHelpOpen:x,setIsHelpOpen:v,setCursorPosition:H}}const zd=new Map;let Ej=0;function zs(e){return zd.has(e)||zd.set(e,`file-${++Ej}`),zd.get(e)??""}const Cj=8,Nj="1200px 0px",Jx=60,Aj=180;function Tj({diffData:e,diffScrollContainerRef:r,setDiffData:i}){const[l,o]=A.useState(new Set),u=A.useRef(new Set),c=A.useRef(null),f=A.useRef(new Map),p=A.useRef(new Set),h=A.useRef(null),b=A.useRef(0);A.useEffect(()=>{if(!e){const C=new Set;u.current=C,o(C),p.current.clear(),h.current=null;return}const S=`${e.requestedBaseCommitish??""}:${e.requestedTargetCommitish??""}`;if(h.current===S)return;h.current=S;const N=e.files.slice(0,Cj).map(C=>C.path),E=new Set(N);u.current=E,o(E),p.current.clear()},[e]);const g=A.useCallback(S=>{const N=f.current.get(S);N&&c.current&&c.current.unobserve(N),o(E=>{if(E.has(S))return E;const C=new Set(E);return C.add(S),u.current=C,C})},[]),x=A.useCallback((S,N)=>{const E=c.current,C=f.current.get(S);if(C&&E&&E.unobserve(C),!N){f.current.delete(S);return}f.current.set(S,N),!(u.current.has(S)||!E)&&E.observe(N)},[]);A.useEffect(()=>{if(c.current&&c.current.disconnect(),!e){c.current=null;return}const S=new IntersectionObserver(N=>{o(E=>{let C=!1;const j=new Set(E);return N.forEach(O=>{if(!O.isIntersecting)return;const U=O.target.dataset.filePath;!U||j.has(U)||(j.add(U),S.unobserve(O.target),C=!0)}),C&&(u.current=j),C?j:E})},{root:r.current,rootMargin:Nj});return c.current=S,f.current.forEach((N,E)=>{u.current.has(E)||S.observe(N)}),()=>{S.disconnect(),c.current=null}},[e,r]);const v=A.useCallback(S=>{if(!e)return;const N=e.files.findIndex(C=>C.path===S);if(N<0)return;const E=c.current;o(C=>{let j=!1;const O=new Set(C);for(let U=0;U<=N;U++){const _=e.files[U]?.path;if(_&&!O.has(_)){O.add(_),j=!0;const F=f.current.get(_);F&&E&&E.unobserve(F)}}return j&&(u.current=O),j?O:C})},[e]),w=A.useCallback(S=>{v(S);const N=e?.files.findIndex(F=>F.path===S)??-1,E=e&&N>=0?e.files.slice(0,N+1).map(F=>zs(F.path)):[zs(S)],C=b.current+1;b.current=C;const j=()=>{for(const F of E){const z=document.getElementById(F);if(!z||z.dataset.rendered!=="true")return!1}return!0},O=F=>{const z=r.current,H=document.getElementById(zs(S));if(!z||!H)return!1;const M=z.getBoundingClientRect(),P=H.getBoundingClientRect(),V=z.scrollTop+(P.top-M.top);return z.scrollTo({top:Math.max(0,V),behavior:F}),!0};let U=0;const _=()=>{requestAnimationFrame(()=>{if(b.current===C){if(!j()){U<Jx&&(U++,_());return}if(!O("smooth")){U<Jx&&(U++,_());return}window.setTimeout(()=>{b.current===C&&O("smooth")},Aj)}})};_()},[e,r,v]);return A.useEffect(()=>{if(!e||e.targetCommitish==="stdin")return;const S=e.targetCommitish||"HEAD",N=`${e.requestedBaseCommitish??""}...${e.requestedTargetCommitish??""}`;e.files.forEach(E=>{if(!l.has(E.path)||E.isGenerated!==!1||E.status==="deleted")return;const C=`${N}:${S}:${E.path}`;if(p.current.has(C))return;p.current.add(C);const j=encodeURIComponent(E.path);fetch(`/api/generated-status/${j}?ref=${encodeURIComponent(S)}`).then(O=>O.ok?O.json():null).then(O=>{!O||O.isGenerated!==!0||i(U=>{if(!U||U.requestedBaseCommitish!==e.requestedBaseCommitish||U.requestedTargetCommitish!==e.requestedTargetCommitish)return U;let _=!1;const F=U.files.map(z=>z.path!==E.path||z.isGenerated?z:(_=!0,{...z,isGenerated:!0}));return _?{...U,files:F}:U})}).catch(()=>{})})},[e,l,i]),{renderedFilePaths:l,ensureFileRendered:g,ensureFilesRenderedUpTo:v,registerLazyFileContainer:x,scrollFileIntoDiffContainer:w}}function Rj(e,r,i,l,o,u){const[c,f]=A.useState([]),[p,h]=A.useState(new Map);A.useEffect(()=>{if(!e||!r)return;const E=Ga.getViewedFiles(e,r,i,l,u);(async()=>{if(o&&o.length>0){const j=[],O=new Set(E.map(U=>U.filePath));for(const U of o)if((U.isGenerated||U.status==="deleted")&&!O.has(U.path))try{const _=Zx(U),F=await Xx(_),z={filePath:U.path,viewedAt:new Date().toISOString(),diffContentHash:F};j.push(z)}catch(_){console.error("Failed to generate hash for auto-collapsed file:",_)}if(j.length>0){const U=[...E,...j];Ga.saveViewedFiles(e,r,U,i,l,u),f(U);return}}f(E)})()},[e,r,i,l,u]);const b=A.useCallback(E=>{!e||!r||(Ga.saveViewedFiles(e,r,E,i,l,u),f(E))},[e,r,i,l,u]),g=A.useMemo(()=>new Set(c.map(E=>E.filePath)),[c]),x=A.useCallback(E=>c.find(C=>C.filePath===E),[c]),v=A.useCallback(async E=>{const C=p.get(E.path);if(C)return C;const j=Zx(E),O=await Xx(j);return h(U=>new Map(U).set(E.path,O)),O},[p]),w=A.useCallback(async(E,C)=>{const j=x(E);if(!j)return!1;const O=await v(C);return j.diffContentHash!==O},[x,v]),S=A.useCallback(async(E,C)=>{if(x(E)){const O=c.filter(U=>U.filePath!==E);b(O)}else{const O=await v(C),U={filePath:E,viewedAt:new Date().toISOString(),diffContentHash:O},_=[...c,U];b(_)}},[c,x,v,b]),N=A.useCallback(()=>{b([]),h(new Map)},[b]);return{viewedFiles:g,toggleFileViewed:S,isFileContentChanged:w,getViewedFileRecord:x,clearViewedFiles:N}}const Wx={mobileMax:767,desktopMin:1024},mu={mobile:`(max-width: ${Wx.mobileMax}px)`,desktop:`(min-width: ${Wx.desktopMin}px)`},jj=()=>typeof window>"u"?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(mu.mobile).matches,isDesktop:window.matchMedia(mu.desktop).matches};function _j(){const[e,r]=A.useState(()=>jj());return A.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(mu.mobile),l=window.matchMedia(mu.desktop),o=()=>{r({isMobile:i.matches,isDesktop:l.matches})};return o(),i.addEventListener("change",o),l.addEventListener("change",o),()=>{i.removeEventListener("change",o),l.removeEventListener("change",o)}},[]),e}function Lj(e){const r=new Set;return e.forEach(i=>{const l=i.author?.trim();l&&r.add(l)}),[...r]}function Dj(e){return Lj(e).length>=2}function Oj(e,r,i){for(let l=0;l<e.chunks.length;l++){const o=e.chunks[l];if(o)for(let u=0;u<o.lines.length;u++){const c=o.lines[u];if(!c)continue;if((c.newLineNumber||c.oldLineNumber)===i)return{fileIndex:r,chunkIndex:l,lineIndex:u,side:c.newLineNumber?"right":"left"}}}return null}function Mj(e,r){const i=r.findIndex(u=>u.path===e.file);if(i===-1)return null;const l=r[i];if(!l)return null;const o=Array.isArray(e.line)?e.line[1]:e.line;return Oj(l,i,o)}const zj=[],Fj=[],_v="difit.sidebarWidth",Lv="difit.sidebarOpen",Dv=200,Ov=600,Fd=280,Ij=()=>{if(typeof window>"u")return Fd;const e=window.localStorage.getItem(_v);if(!e)return Fd;const r=Number.parseInt(e,10);return Number.isFinite(r)?Math.min(Ov,Math.max(Dv,r)):Fd},Bj=()=>{if(typeof window>"u")return!0;const e=window.localStorage.getItem(Lv);return e===null||e==="true"?!0:e!=="false"};function Uj(){const[e,r]=A.useState(null),[i,l]=A.useState(eo),o=A.useRef(!1),[u,c]=A.useState(!0),[f,p]=A.useState(!0),[h,b]=A.useState(null),[g,x]=A.useState(!1),[v,w]=A.useState(Ij),[S,N]=A.useState(!1),[E,C]=A.useState(Bj),[j,O]=A.useState(!1),[U,_]=A.useState(!1),[F,z]=A.useState(!1),[H,M]=A.useState(!1),[P,V]=A.useState(!1),[J,I]=A.useState(new Set),Z=A.useRef(!1),B=A.useRef(null),[Y,X]=A.useState(null),[q,R]=A.useState(""),[D,$]=A.useState(""),[T,W]=A.useState(""),[te,ce]=A.useState(""),me=A.useRef(!1),{settings:xe,updateSettings:ge}=aj(),{isMobile:ve,isDesktop:Ee}=_j(),{comments:de,addComment:ye,removeComment:we,updateComment:je,clearAllComments:Ye,generatePrompt:Ie,generateAllCommentsPrompt:It}=cj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.repositoryId),at=A.useMemo(()=>de.map(le=>({id:le.id,file:le.filePath,line:typeof le.position.line=="number"?le.position.line:[le.position.line.start,le.position.line.end],body:le.body,timestamp:le.createdAt,author:le.author,codeContent:le.codeSnapshot?.content,side:le.position.side})),[de]),pt=A.useMemo(()=>de.map(le=>({id:le.id,file:le.filePath,line:typeof le.position.line=="number"?le.position.line:[le.position.line.start,le.position.line.end],body:le.body,timestamp:le.createdAt,author:le.author,side:le.position.side})),[de]),Bt=A.useMemo(()=>Dj(at),[at]),Jt=A.useMemo(()=>{const le=new Map;return at.forEach(be=>{const Re=le.get(be.file);Re?Re.push(be):le.set(be.file,[be])}),le},[at]),Ut=ve&&de.length>0,{viewedFiles:Fe,toggleFileViewed:tr,clearViewedFiles:oe}=Rj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId);A.useEffect(()=>{Z.current=!1},[e?.repositoryId,e?.commit]),A.useEffect(()=>{Z.current||(I(new Set(Fe)),Z.current=!0)},[Fe]);const{renderedFilePaths:pe,ensureFileRendered:Te,ensureFilesRenderedUpTo:ze,registerLazyFileContainer:Xe,scrollFileIntoDiffContainer:_t}=Tj({diffData:e,diffScrollContainerRef:B,setDiffData:r}),fn=A.useCallback(async le=>{if(!e)return;const be=e.files.find(Je=>Je.path===le);if(!be)return;const Re=Fe.has(le);await tr(le,be),I(Je=>{const De=new Set(Je);return Re?De.delete(le):De.add(le),De}),Re||setTimeout(()=>{_t(le)},100)},[e,_t,tr,Fe]),Lt=A.useCallback(le=>{I(be=>{const Re=new Set(be);return Re.has(le)?Re.delete(le):Re.add(le),Re})},[]),bt=A.useCallback(le=>{e&&I(le?new Set(e.files.map(be=>be.path)):new Set)},[e]),Dt=A.useCallback(le=>{o.current=!0,l(le)},[]),{isLoading:We,expandLines:Pn,expandAllBetweenChunks:dn,prefetchFileContent:Mu,getMergedChunks:Tr,lastUpdatedFilePath:Rr,lastUpdatedAt:Ii}=hj({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish}),In=A.useRef(Tr);A.useEffect(()=>{In.current=Tr},[Tr]);const[jr,nr]=A.useState(new Map),Bi=A.useMemo(()=>{const le=new Map;return e?.files.forEach(be=>{le.set(be.path,be)}),le},[e]);A.useEffect(()=>{if(!e){nr(new Map);return}nr(le=>{let be=!1;const Re=new Map(le),Je=new Set(e.files.map(De=>De.path));return Re.forEach((De,Nt)=>{Je.has(Nt)||(Re.delete(Nt),be=!0)}),pe.forEach(De=>{if(Re.has(De))return;const Nt=Bi.get(De);Nt&&(Re.set(De,In.current(Nt)),be=!0)}),be?Re:le})},[e,Bi,pe]),A.useEffect(()=>{if(!e||!Rr)return;const le=Bi.get(Rr);le&&nr(be=>{if(!be.has(le.path))return be;const Re=new Map(be);return Re.set(le.path,In.current(le)),Re})},[e,Bi,Rr,Ii]);const oo=A.useMemo(()=>e?e.files.map(le=>({...le,chunks:jr.get(le.path)||le.chunks})):[],[e,jr]),[Ui,rr]=A.useState(null),{shouldReload:zu,reload:Hl,watchState:ql}=pj(async()=>{await Cn()}),{cursor:Wt,isHelpOpen:$l,setIsHelpOpen:Hi,setCursorPosition:ir}=kj({files:oo,comments:at,viewMode:i,reviewedFiles:Fe,onToggleReviewed:fn,onCreateComment:()=>{Wt&&rr({fileIndex:Wt.fileIndex,chunkIndex:Wt.chunkIndex,lineIndex:Wt.lineIndex})},onCopyAllComments:()=>{de.length>0&&$i()},onDeleteAllComments:()=>{de.length>0&&confirm("Delete all comments?")&&Ye()},onShowCommentsList:()=>{M(!0)},onRefresh:()=>{Hl()}});A.useEffect(()=>{if(!e||!Wt)return;const le=e.files[Wt.fileIndex]?.path;!le||pe.has(le)||(ze(le),requestAnimationFrame(()=>{ir(Wt)}))},[Wt,e,ze,pe,ir]);const so=A.useCallback((le,be,Re,Je)=>{ir({fileIndex:le,chunkIndex:be,lineIndex:Re,side:Je})},[ir]),Vn=A.useCallback(()=>{rr(null)},[rr]),Ct=A.useCallback(le=>Ie(le.id),[Ie]),Ht=le=>{le.preventDefault(),O(!0);const be=le.clientX,Re=v,Je=Nt=>{const Pi=Math.max(Dv,Math.min(Ov,Re+(Nt.clientX-be)));w(Pi)},De=()=>{O(!1),document.removeEventListener("mousemove",Je),document.removeEventListener("mouseup",De)};document.addEventListener("mousemove",Je),document.addEventListener("mouseup",De)},Cn=A.useCallback(async(le,be)=>{try{const Re=new URLSearchParams({ignoreWhitespace:String(u)});le&&Re.set("base",le),be&&Re.set("target",be);const Je=await fetch(`/api/diff?${Re}`);if(!Je.ok)throw new Error("Failed to fetch diff data");const De=await Je.json();if(r(De),De.baseCommitish&&W(De.baseCommitish),De.targetCommitish&&ce(De.targetCommitish),!me.current){const Nt=De.requestedBaseCommitish??De.baseCommitish,Pi=De.requestedTargetCommitish??De.targetCommitish;Nt&&R(Nt),Pi&&$(Pi)}De.mode&&!o.current&&l(Ok(De.mode))}catch(Re){b(Re instanceof Error?Re.message:"Unknown error")}finally{p(!1)}},[u]);A.useEffect(()=>{Cn()},[Cn]),A.useEffect(()=>{ve&&i!=="unified"&&l("unified")},[i,ve]),A.useEffect(()=>{try{window.localStorage.setItem(_v,String(v))}catch{}},[v]),A.useEffect(()=>{try{window.localStorage.setItem(Lv,String(E))}catch{}},[E]),A.useEffect(()=>{fetch("/api/revisions").then(le=>le.ok?le.json():null).then(le=>{X(le),le?.resolvedBase&&W(be=>be||le.resolvedBase||""),le?.resolvedTarget&&ce(be=>be||le.resolvedTarget||"")}).catch(()=>X(null))},[]);const qi=A.useCallback(async(le,be)=>{le===q&&be===D||(me.current=!0,R(le),$(be),p(!0),b(null),await Cn(le,be))},[q,D,Cn]),uo=A.useRef(!1);A.useEffect(()=>{e?.clearComments&&!uo.current&&(uo.current=!0,Ye(),oe(),console.log("✅ All existing comments and viewed files cleared as requested via --clean flag"))},[e?.clearComments,Ye,oe]),A.useEffect(()=>{e&&(Fe.size<e.files.length?z(!1):Fe.size===e.files.length&&!F&&(_(!0),z(!0),setTimeout(()=>{_(!1)},1e3)))},[Fe.size,e,F]),A.useEffect(()=>{const le=JSON.stringify({comments:pt});fetch("/api/comments",{method:"POST",headers:{"Content-Type":"application/json"},body:le}).catch(Re=>{console.error("Failed to sync comments:",Re)});const be=()=>{navigator.sendBeacon("/api/comments",le)};return window.addEventListener("beforeunload",be),()=>{window.removeEventListener("beforeunload",be)}},[pt]),A.useEffect(()=>{const le=new EventSource("/api/heartbeat");return le.onopen=()=>{console.log("Connected to server heartbeat")},le.onerror=()=>{console.log("Server connection lost"),le.close()},()=>{le.close()}},[]);const Fu=A.useCallback((le,be,Re,Je,De)=>(ye({filePath:le,body:Re,side:De||"new",line:typeof be=="number"?be:{start:be[0],end:be[1]},codeSnapshot:Je?{content:Je,language:void 0}:void 0}),Promise.resolve()),[ye]),$i=async()=>{try{const le=It();await navigator.clipboard.writeText(le),x(!0),setTimeout(()=>x(!1),2e3)}catch(le){console.error("Failed to copy all comments prompt:",le)}},di=le=>{if(!e)return;const be=Mj(le,e.files);be&&ir(be)},Pl=A.useCallback(async(le,be)=>{try{const Re=await fetch("/api/open-in-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:le,line:be,editor:xe.editor})});if(!Re.ok){const Je=await Re.json().catch(()=>null);let De=Re.statusText;Je&&typeof Je=="object"&&"error"in Je&&typeof Je.error=="string"&&(De=Je.error),console.error("Failed to open file in editor:",De)}}catch(Re){console.error("Failed to open file in editor:",Re)}},[xe.editor]),_r=le=>{ir(null);const be=le.target,Re=be.closest('[data-comment-button="true"]'),Je=be.closest('[data-open-in-editor-button="true"]');!Re&&!Je&&Lr(le)},Lr=le=>{document.querySelectorAll('form[data-empty="true"]').forEach(Re=>{Re.contains(le.target)||Re.querySelector('button[type="button"]')?.click()})};if(f)return y.jsx("div",{className:"flex items-center justify-center h-screen bg-github-bg-primary",children:y.jsx("div",{className:"text-github-text-secondary text-base",children:"Loading diff..."})});if(h)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"Error"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:h})]});if(!e)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"No data"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:"No diff data available"})]});const hi=xe.editor!=="none"&&e.openInEditorAvailable!==!1;return y.jsx(Uk,{children:y.jsxs("div",{className:"h-screen flex flex-col",onClickCapture:_r,children:[y.jsxs("header",{className:`bg-github-bg-secondary border-b border-github-border flex ${ve?"flex-col":"flex-row items-center"}`,children:[y.jsxs("div",{className:`flex items-center justify-between w-full ${ve?"px-3 py-2 gap-3":"px-4 py-3 gap-4 w-auto"} ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:ve?"100%":E?`${v}px`:"auto",minWidth:ve?"0px":E?"200px":"auto",maxWidth:ve?"none":E?"600px":"none"},children:[y.jsx("h1",{children:y.jsx(ZR,{style:{height:"18px",color:"var(--color-github-text-secondary)"}})}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("button",{onClick:()=>C(!E),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:E?"Collapse file tree":"Expand file tree","aria-expanded":E,"aria-controls":"file-tree-panel","aria-label":"Toggle file tree panel",children:E?y.jsx(bk,{size:18}):y.jsx(xk,{size:18})}),y.jsx("button",{onClick:()=>N(!0),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:"Appearance Settings",children:y.jsx(x1,{size:18})})]})]}),!ve&&y.jsx("div",{className:`border-r border-github-border ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px",height:"calc(100% - 16px)",margin:"8px 0",transform:"translateX(-2px)"}}),y.jsxs("div",{className:`flex-1 flex flex-wrap items-center justify-between ${ve?"px-3 pb-2 gap-3":"px-4 py-3 gap-4"}`,children:[y.jsxs("div",{className:`flex flex-wrap items-center ${ve?"gap-2":"gap-3"}`,children:[!ve&&y.jsxs("div",{className:"flex bg-github-bg-tertiary border border-github-border rounded-md p-1",children:[y.jsxs("button",{onClick:()=>Dt("split"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i==="split"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(G2,{size:14}),"Split"]}),y.jsxs("button",{onClick:()=>Dt("unified"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${i==="unified"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(jk,{size:14}),"Unified"]})]}),y.jsx(v1,{checked:u,onChange:c,label:"Ignore Whitespace",title:u?"Show whitespace changes":"Ignore whitespace changes"}),y.jsx(KR,{shouldReload:zu,isReloading:ql.isReloading,onReload:Hl,changeType:ql.lastChangeType,compact:ve})]}),y.jsxs("div",{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${ve?"gap-3":"gap-4"}`,children:[!ve&&de.length>0&&y.jsx(Wb,{commentsCount:de.length,isCopiedAll:g,onCopyAll:$i,onDeleteAll:Ye,onViewAll:()=>M(!0)}),y.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[y.jsxs("div",{className:"text-xs relative",children:[Fe.size===e.files.length?"All diffs difit-ed!":`${Fe.size} / ${e.files.length} files viewed`,y.jsx(lj,{isActive:U})]}),y.jsx("div",{className:"relative h-2 bg-github-bg-tertiary rounded-full overflow-hidden",style:{width:"90px",border:"1px solid var(--color-github-border)"},children:y.jsx("div",{className:"absolute top-0 right-0 h-full transition-all duration-300 ease-out",style:{width:`${(e.files.length-Fe.size)/e.files.length*100}%`,backgroundColor:(()=>{const le=(e.files.length-Fe.size)/e.files.length*100;return le>50?"var(--color-github-accent)":le>20?"var(--color-github-warning)":"var(--color-github-danger)"})()}})})]}),Y?y.jsx(r4,{options:Y,baseRevision:q,targetRevision:D,resolvedBaseRevision:T,resolvedTargetRevision:te,onSelectDiff:(le,be)=>{qi(le,be)},onOpenAdvanced:()=>V(!0),compact:!Ee}):y.jsxs("span",{className:"text-xs",children:["Reviewing:"," ",y.jsx("code",{className:"bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary",children:e.commit.includes("...")?y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"text-github-text-secondary font-medium",children:[e.commit.split("...")[0],"..."]}),y.jsx("span",{className:"font-medium",children:e.commit.split("...")[1]})]}):e.commit})]})]})]})]}),Y&&y.jsx(QR,{isOpen:P,onClose:()=>V(!1),options:Y,baseRevision:q,targetRevision:D,resolvedBaseRevision:T,resolvedTargetRevision:te,onApply:(le,be)=>{qi(le,be)}},P?`${q}:${D}`:"closed"),ve&&E&&y.jsx("button",{type:"button","aria-label":"Close file tree",className:"fixed inset-0 bg-black/40 z-30",onClick:()=>C(!1)}),y.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[y.jsx("div",{className:`relative overflow-hidden ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:ve?"0px":E?`${v}px`:"0px"},children:y.jsxs("aside",{id:"file-tree-panel",className:`bg-github-bg-secondary overflow-y-auto flex flex-col ${ve?"fixed inset-y-0 right-0 z-40 w-[min(85vw,360px)] border-l border-github-border transition-transform duration-300 ease-out":"relative border-r border-github-border"}`,style:{width:ve?"min(85vw, 360px)":`${v}px`,minWidth:ve?"0px":"200px",maxWidth:ve?"none":"600px",height:"100%",transform:ve?E?"translateX(0)":"translateX(100%)":void 0},children:[y.jsx("div",{className:"flex-1 overflow-y-auto",children:y.jsx(GR,{files:e.files,onScrollToFile:_t,onFileSelected:ve?()=>C(!1):void 0,comments:at,reviewedFiles:Fe,onToggleReviewed:fn,selectedFileIndex:Wt?.fileIndex??null})}),!ve&&y.jsxs("div",{className:"p-4 border-t border-github-border flex justify-between items-center",children:[y.jsxs("button",{onClick:()=>Hi(!0),className:"flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"Keyboard shortcuts (Shift+?)",children:[y.jsx(ck,{size:16}),y.jsx("span",{className:"text-sm",children:"Shortcuts"})]}),y.jsxs("a",{href:"https://github.com/yoshiko-pg/difit",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"View on GitHub",children:[y.jsx("span",{className:"text-sm",children:"Star on GitHub"}),y.jsx(YR,{style:{height:"18px",width:"18px"}})]})]})]})}),!ve&&y.jsx("div",{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px"},onMouseDown:Ht,title:"Drag to resize file list"}),y.jsx("main",{ref:B,className:`flex-1 overflow-y-auto ${Ut?"pb-16":""}`,children:e.files.map((le,be)=>{const Re=Jt.get(le.path)??zj,Je=jr.get(le.path)??Fj,De=pe.has(le.path);return y.jsx("div",{id:zs(le.path),"data-file-path":le.path,"data-rendered":De?"true":"false",ref:Nt=>Xe(le.path,Nt),className:"mb-6",children:De?y.jsx(PR,{file:le,comments:Re,showAuthorBadges:Bt,diffMode:i,reviewedFiles:Fe,onToggleReviewed:fn,collapsedFiles:J,onToggleCollapsed:Lt,onToggleAllCollapsed:bt,onAddComment:Fu,onGeneratePrompt:Ct,onRemoveComment:we,onUpdateComment:je,onOpenInEditor:hi?Pl:void 0,syntaxTheme:xe.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:Wt?.fileIndex===be?Wt:null,fileIndex:be,onLineClick:so,commentTrigger:Ui?.fileIndex===be?Ui:null,onCommentTriggerHandled:Vn,mergedChunks:Je,expandLines:Pn,expandAllBetweenChunks:dn,prefetchFileContent:Mu,isExpandLoading:We}):y.jsx("div",{className:"bg-github-bg-secondary border border-github-border rounded-md px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-xs uppercase tracking-wide text-github-text-muted",children:"Deferred Rendering"}),y.jsx("div",{className:"text-sm font-mono text-github-text-primary truncate",children:le.path})]}),y.jsx("button",{type:"button",onClick:()=>Te(le.path),className:"px-3 py-1.5 text-xs rounded border border-github-border text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary",children:"Load now"})]})})},le.path)})})]}),Ut&&y.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-20 bg-github-bg-secondary border-t border-github-border px-4 py-2 flex justify-end",children:y.jsx(Wb,{commentsCount:de.length,isCopiedAll:g,onCopyAll:$i,onDeleteAll:Ye,onViewAll:()=>M(!0),direction:"up",compact:!0})}),y.jsx(ij,{isOpen:S,onClose:()=>N(!1),settings:xe,onSettingsChange:ge}),y.jsx(XR,{isOpen:$l,onClose:()=>Hi(!1)}),y.jsx(sC,{isOpen:H,onClose:()=>M(!1),onNavigate:di,comments:at,showAuthorBadges:Bt,onRemoveComment:we,onGeneratePrompt:le=>Ie(le.id),onUpdateComment:je,syntaxTheme:xe.syntaxTheme})]})})}const Mv=document.getElementById("root");if(!Mv)throw new Error("Root element not found");c2.createRoot(Mv).render(y.jsx(Qt.StrictMode,{children:y.jsx(S2,{initiallyActiveScopes:["navigation"],children:y.jsx(Uj,{})})}));export{jt as _,Hj as a,gu as g};