diff-easy 0.1.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.
- package/LICENSE +22 -0
- package/README.md +142 -0
- package/dist/cli/cmux.d.ts +9 -0
- package/dist/cli/cmux.js +274 -0
- package/dist/cli/comment.d.ts +2 -0
- package/dist/cli/comment.js +91 -0
- package/dist/cli/github.d.ts +84 -0
- package/dist/cli/github.js +364 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +397 -0
- package/dist/cli/turns.d.ts +14 -0
- package/dist/cli/turns.js +333 -0
- package/dist/cli/utils.d.ts +27 -0
- package/dist/cli/utils.js +204 -0
- package/dist/client/assets/arc-CHYjdFTk.js +1 -0
- package/dist/client/assets/architecture-7EHR7CIX-weHBYDgM.js +1 -0
- package/dist/client/assets/architectureDiagram-3BPJPVTR-DRa2msuJ.js +36 -0
- package/dist/client/assets/array-BifhSqXX.js +1 -0
- package/dist/client/assets/blockDiagram-GPEHLZMM-BTdKsXy5.js +132 -0
- package/dist/client/assets/c4Diagram-AAUBKEIU-CwTvCkOg.js +10 -0
- package/dist/client/assets/channel-Cv40nQW1.js +1 -0
- package/dist/client/assets/chunk-2J33WTMH-BFsjrTtc.js +1 -0
- package/dist/client/assets/chunk-3OPIFGDE-V_xVw1dq.js +62 -0
- package/dist/client/assets/chunk-4BX2VUAB-DoLO6LLy.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-CHgBwbdB.js +1 -0
- package/dist/client/assets/chunk-5ZQYHXKU-DMixAgQG.js +2 -0
- package/dist/client/assets/chunk-727SXJPM-C-3FZTmm.js +206 -0
- package/dist/client/assets/chunk-AQP2D5EJ-DpQZhXt-.js +231 -0
- package/dist/client/assets/chunk-BSJP7CBP-BnO9E_G4.js +1 -0
- package/dist/client/assets/chunk-CSCIHK7Q-BxItphyO.js +124 -0
- package/dist/client/assets/chunk-FMBD7UC4-4hEcfvfT.js +15 -0
- package/dist/client/assets/chunk-KSCS5N6A-DnArkpOI.js +10 -0
- package/dist/client/assets/chunk-L5ZTLDWV-DQoYJ1BW.js +1 -0
- package/dist/client/assets/chunk-LZXEDZCA-CdCevBX-.js +2 -0
- package/dist/client/assets/chunk-ND2GUHAM-Dt89U_nU.js +1 -0
- package/dist/client/assets/chunk-NNHCCRGN-DlpIbxXb.js +159 -0
- package/dist/client/assets/chunk-NZK2D7GU-C2Ev_f_w.js +1 -0
- package/dist/client/assets/chunk-O5CBEL6O-BeZ3MFnJ.js +70 -0
- package/dist/client/assets/chunk-QZHKN3VN-BmDOSWHp.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-gLuInTk4.js +1 -0
- package/dist/client/assets/chunk-XPW4576I-DPbDc8_T.js +32 -0
- package/dist/client/assets/classDiagram-4FO5ZUOK-DOpVKUrb.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DOpVKUrb.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-CCPyalms.js +1 -0
- package/dist/client/assets/cytoscape.esm-FqbQrHcz.js +321 -0
- package/dist/client/assets/dagre-BM42HDAG-6jrYMjX3.js +4 -0
- package/dist/client/assets/dagre-Bx709z4p.js +1 -0
- package/dist/client/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/dist/client/assets/diagram-2AECGRRQ-dCQ_KoXl.js +43 -0
- package/dist/client/assets/diagram-5GNKFQAL-B3Xj4-XE.js +10 -0
- package/dist/client/assets/diagram-KO2AKTUF-DaGgF2yL.js +3 -0
- package/dist/client/assets/diagram-LMA3HP47-CF_c4tPT.js +24 -0
- package/dist/client/assets/diagram-OG6HWLK6-BgBHbJkT.js +24 -0
- package/dist/client/assets/dist-7wVkzZne.js +1 -0
- package/dist/client/assets/erDiagram-TEJ5UH35-BZgX1grR.js +85 -0
- package/dist/client/assets/eventmodeling-FCH6USID-BaI6RNKr.js +1 -0
- package/dist/client/assets/flowDiagram-I6XJVG4X-BFNUa12V.js +162 -0
- package/dist/client/assets/ganttDiagram-6RSMTGT7-C8t6BThI.js +292 -0
- package/dist/client/assets/gitGraph-WXDBUCRP-BlicfDkM.js +1 -0
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-BmnIXuXP.js +106 -0
- package/dist/client/assets/graphlib-B8gBHxth.js +1 -0
- package/dist/client/assets/index-BfVtbKTZ.css +2 -0
- package/dist/client/assets/index-p8zzfjdu.js +87 -0
- package/dist/client/assets/info-J43DQDTF-DHLG38N3.js +1 -0
- package/dist/client/assets/infoDiagram-5YYISTIA-oQ-lq-45.js +2 -0
- package/dist/client/assets/init-D6jRqBbL.js +1 -0
- package/dist/client/assets/ishikawaDiagram-YF4QCWOH-DrODlBLD.js +70 -0
- package/dist/client/assets/journeyDiagram-JHISSGLW-Bxg5wCQz.js +139 -0
- package/dist/client/assets/kanban-definition-UN3LZRKU-DAdvUDIB.js +89 -0
- package/dist/client/assets/katex-Vhh-h91d.js +257 -0
- package/dist/client/assets/line-D8kNd46u.js +1 -0
- package/dist/client/assets/linear-jwGZSrg4.js +1 -0
- package/dist/client/assets/mermaid-parser.core-PVPfUfyU.js +4 -0
- package/dist/client/assets/mermaid.core-DwdP6CFg.js +9 -0
- package/dist/client/assets/mindmap-definition-RKZ34NQL-DeOoL56Q.js +96 -0
- package/dist/client/assets/ordinal-hYBb2elL.js +1 -0
- package/dist/client/assets/packet-YPE3B663-BBEaxdJP.js +1 -0
- package/dist/client/assets/path-BWPyau1x.js +1 -0
- package/dist/client/assets/pie-LRSECV5Y-fvTRFm-2.js +1 -0
- package/dist/client/assets/pieDiagram-4H26LBE5-oep1px2r.js +30 -0
- package/dist/client/assets/prism-bash-D6zCJ74D.js +1 -0
- package/dist/client/assets/prism-clojure-_z-zoNcE.js +1 -0
- package/dist/client/assets/prism-csharp-XPn2bw0d.js +1 -0
- package/dist/client/assets/prism-dart-CDv16Fbu.js +1 -0
- package/dist/client/assets/prism-elixir-DhHhV5Rj.js +1 -0
- package/dist/client/assets/prism-haskell-5hq1Nh9c.js +1 -0
- package/dist/client/assets/prism-hcl-B6Z0Ouoo.js +1 -0
- package/dist/client/assets/prism-java-6wtusvIl.js +1 -0
- package/dist/client/assets/prism-markup-templating-KkSMBj6Y.js +1 -0
- package/dist/client/assets/prism-nix-C88dTX93.js +1 -0
- package/dist/client/assets/prism-perl-Lsbi34sH.js +1 -0
- package/dist/client/assets/prism-php-Co4fM40K.js +1 -0
- package/dist/client/assets/prism-protobuf-yzSHlhwy.js +1 -0
- package/dist/client/assets/prism-ruby-DFCASkuD.js +1 -0
- package/dist/client/assets/prism-scala-VkM3wCOL.js +1 -0
- package/dist/client/assets/prism-solidity-DTom4k5p.js +1 -0
- package/dist/client/assets/prism-sql-CYhVDMEE.js +1 -0
- package/dist/client/assets/prism-vim-BgpkjCK5.js +1 -0
- package/dist/client/assets/quadrantDiagram-W4KKPZXB-D9l66CHb.js +7 -0
- package/dist/client/assets/radar-GUYGQ44K-DAU5EPVd.js +1 -0
- package/dist/client/assets/requirementDiagram-4Y6WPE33-helpQlwb.js +84 -0
- package/dist/client/assets/rough.esm-CSKSodPl.js +1 -0
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-C9sNuuvA.js +40 -0
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-BP0bhCwQ.js +162 -0
- package/dist/client/assets/src-CDAPGf2l.js +1 -0
- package/dist/client/assets/stateDiagram-AJRCARHV-CsFizpla.js +1 -0
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Bvn8tanl.js +1 -0
- package/dist/client/assets/timeline-definition-PNZ67QCA-BnkmHs1F.js +120 -0
- package/dist/client/assets/treeView-BLDUP644-DD9HZO5W.js +1 -0
- package/dist/client/assets/treemap-LRROVOQU-BBKuQ1lo.js +1 -0
- package/dist/client/assets/vennDiagram-CIIHVFJN-BPFTHflF.js +34 -0
- package/dist/client/assets/wardley-L42UT6IY-y88gDkwb.js +1 -0
- package/dist/client/assets/wardleyDiagram-YWT4CUSO-BlcA7IVh.js +78 -0
- package/dist/client/assets/xychartDiagram-2RQKCTM6-DX5vUCRH.js +7 -0
- package/dist/client/favicon.png +0 -0
- package/dist/client/index.html +14 -0
- package/dist/client/logo.png +0 -0
- package/dist/client/site-data/blobs/080c0e6/cHVibGljL3NpdGUtZGF0YS9vZy1pbWFnZS5wbmc.png +0 -0
- package/dist/client/site-data/blobs/55f23a1/bGFuZGluZy9wdWJsaWMvZGlmaXQvbG9nby5wbmc.png +0 -0
- package/dist/client/site-data/blobs/66ff7c6/cHVibGljL2xvZ28ucG5n.png +0 -0
- package/dist/client/site-data/blobs/e6977fe/cHVibGljL2xvZ28ucG5n.png +0 -0
- package/dist/client/site-data/manifest.json +1 -0
- package/dist/client/site-data/og-image.png +0 -0
- package/dist/client/site-data/snapshots/55f23a1...080c0e6.json +1 -0
- package/dist/client/site-data/snapshots/66ff7c6...e6977fe.json +1 -0
- package/dist/client/site-data/snapshots/7d40fd4...a72112f-comments.json +1 -0
- package/dist/client/site-data/snapshots/7d40fd4...a72112f.json +1 -0
- package/dist/server/file-watcher.d.ts +33 -0
- package/dist/server/file-watcher.js +340 -0
- package/dist/server/generated-file-check.d.ts +17 -0
- package/dist/server/generated-file-check.js +280 -0
- package/dist/server/git-diff.d.ts +94 -0
- package/dist/server/git-diff.js +909 -0
- package/dist/server/grouping/cache.d.ts +3 -0
- package/dist/server/grouping/cache.js +22 -0
- package/dist/server/grouping/claudeCli.d.ts +10 -0
- package/dist/server/grouping/claudeCli.js +95 -0
- package/dist/server/grouping/digest.d.ts +15 -0
- package/dist/server/grouping/digest.js +38 -0
- package/dist/server/grouping/reconcile.d.ts +6 -0
- package/dist/server/grouping/reconcile.js +34 -0
- package/dist/server/grouping/types.d.ts +9 -0
- package/dist/server/grouping/types.js +1 -0
- package/dist/server/server.d.ts +37 -0
- package/dist/server/server.js +1283 -0
- package/dist/shared/grouping.d.ts +4 -0
- package/dist/shared/grouping.js +170 -0
- package/dist/types/diff.d.ts +263 -0
- package/dist/types/diff.js +1 -0
- package/dist/types/watch.d.ts +59 -0
- package/dist/types/watch.js +8 -0
- package/dist/utils/commentFormatting.d.ts +6 -0
- package/dist/utils/commentFormatting.js +90 -0
- package/dist/utils/commentImports.d.ts +11 -0
- package/dist/utils/commentImports.js +386 -0
- package/dist/utils/createId.d.ts +1 -0
- package/dist/utils/createId.js +5 -0
- package/dist/utils/diffMode.d.ts +3 -0
- package/dist/utils/diffMode.js +13 -0
- package/dist/utils/diffSelection.d.ts +13 -0
- package/dist/utils/diffSelection.js +39 -0
- package/dist/utils/editorOptions.d.ts +60 -0
- package/dist/utils/editorOptions.js +171 -0
- package/dist/utils/fileUtils.d.ts +12 -0
- package/dist/utils/fileUtils.js +21 -0
- package/dist/utils/hubConfig.d.ts +32 -0
- package/dist/utils/hubConfig.js +51 -0
- package/dist/utils/suggestionUtils.d.ts +19 -0
- package/dist/utils/suggestionUtils.js +31 -0
- package/dist/utils/turnLog.d.ts +47 -0
- package/dist/utils/turnLog.js +133 -0
- package/package.json +105 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DwdP6CFg.js","assets/chunk-O5CBEL6O-BeZ3MFnJ.js","assets/src-CDAPGf2l.js","assets/chunk-5ZQYHXKU-DMixAgQG.js","assets/dist-7wVkzZne.js","assets/chunk-CSCIHK7Q-BxItphyO.js","assets/chunk-3OPIFGDE-V_xVw1dq.js","assets/chunk-L5ZTLDWV-DQoYJ1BW.js","assets/chunk-NZK2D7GU-C2Ev_f_w.js","assets/rough.esm-CSKSodPl.js","assets/chunk-BSJP7CBP-BnO9E_G4.js","assets/chunk-KSCS5N6A-DnArkpOI.js","assets/line-D8kNd46u.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-LZXEDZCA-CdCevBX-.js","assets/chunk-WU5MYG2G-gLuInTk4.js","assets/chunk-XPW4576I-DPbDc8_T.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=`data-theme`,d={dark:{"--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)`},light:{"--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)`}},f=`reviewit-appearance-settings`,p=e=>e===`light`||e===`dark`||e===`auto`,m=e=>e===`normal`||e===`deuteranopia`,h=e=>e===`light`||e===`dark`,g=()=>{if(!(typeof window>`u`))try{return window.localStorage}catch{return}},_=()=>{if(!(typeof window>`u`))return window};function v(e=g()){if(!e)return null;try{let t=e.getItem(f);if(!t)return null;let n=JSON.parse(t);if(n&&typeof n==`object`){let e={},t=n;return p(t.theme)&&(e.theme=t.theme),m(t.colorVision)&&(e.colorVision=t.colorVision),e}}catch{return null}return null}function y(e=_()){return e?.matchMedia(`(prefers-color-scheme: dark)`).matches??!0?`dark`:`light`}function b(e,t=y()){return e===`light`||e===`dark`?e:t}function x(e=typeof document>`u`?void 0:document,t=g(),n=_()){let r=e?.documentElement.getAttribute(u)??null;return h(r)?r:b(v(t)?.theme,y(n))}var S={dark:{"--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`},light:{"--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`}};function C(e,t=`normal`,n=document){let r=n.documentElement;r.setAttribute(u,e),r.setAttribute(`data-color-vision`,t);let i=d[e];if(Object.entries(i).forEach(([e,t])=>{r.style.setProperty(e,t)}),t===`deuteranopia`){let t=S[e];Object.entries(t).forEach(([e,t])=>{r.style.setProperty(e,t)})}n.body&&(n.body.style.backgroundColor=`var(--color-github-bg-primary)`,n.body.style.color=`var(--color-github-text-primary)`)}function w(e=typeof document>`u`?void 0:document,t=g(),n=_()){if(!e)return null;let r=v(t),i=b(r?.theme,y(n));return C(i,r?.colorVision??`normal`,e),i}w();var T=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),E=o(((e,t)=>{t.exports=T()})),D=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),O=o(((e,t)=>{t.exports=D()})),k=o((e=>{var t=E();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),A=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=k()})),j=o((e=>{var t=O(),n=E(),r=A();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function oe(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function I(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),le=ae(null),ue=ae(null);function L(e,t){switch(I(le,t),I(ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}oe(se),I(se,e)}function de(){oe(se),oe(ce),oe(le)}function R(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=Hd(t,e.type);t!==n&&(I(ce,e),I(se,n))}function fe(e){ce.current===e&&(oe(se),oe(ce)),ue.current===e&&(oe(ue),Qf._currentValue=ne)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:z,Re=Math.log,ze=Math.LN2;function z(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Be=256,Ve=262144,He=4194304;function Ue(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function We(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ue(n))):i=Ue(o):i=Ue(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ue(n))):i=Ue(o)):i=Ue(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ke(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 qe(){var e=He;return He<<=1,!(He&62914560)&&(He=4194304),e}function Je(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ye(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Le(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ze(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ze(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function $e(e,t){var n=t&-t;return n=n&42?1:et(n),(n&(e.suspendedLanes|t))===0?n:0}function et(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function tt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function nt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function rt(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var it=Math.random().toString(36).slice(2),at=`__reactFiber$`+it,ot=`__reactProps$`+it,st=`__reactContainer$`+it,ct=`__reactEvents$`+it,lt=`__reactListeners$`+it,ut=`__reactHandles$`+it,dt=`__reactResources$`+it,ft=`__reactMarker$`+it;function pt(e){delete e[at],delete e[ot],delete e[ct],delete e[lt],delete e[ut]}function mt(e){var t=e[at];if(t)return t;for(var n=e.parentNode;n;){if(t=n[st]||n[at]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[at])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function ht(e){if(e=e[at]||e[st]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function _t(e){var t=e[dt];return t||=e[dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function vt(e){e[ft]=!0}var yt=new Set,bt={};function xt(e,t){St(e,t),St(e+`Capture`,t)}function St(e,t){for(bt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var Ct=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]*$`),wt={},Tt={};function Et(e){return be.call(Tt,e)?!0:be.call(wt,e)?!1:Ct.test(e)?Tt[e]=!0:(wt[e]=!0,!1)}function Dt(e,t,n){if(Et(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ot(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function kt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function At(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function jt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Mt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nt(e){if(!e._valueTracker){var t=jt(e)?`checked`:`value`;e._valueTracker=Mt(e,t,``+e[t])}}function Pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=jt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ft(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var It=/[\n"\\]/g;function Lt(e){return e.replace(It,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+At(t)):e.value!==``+At(t)&&(e.value=``+At(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,At(n)):Bt(e,o,At(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+At(s):e.removeAttribute(`name`)}function zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Nt(e);return}n=n==null?``:``+At(n),t=t==null?n:``+At(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Nt(e)}function Bt(e,t,n){t===`number`&&Ft(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Vt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+At(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ht(e,t,n){if(t!=null&&(t=``+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+At(n)}function Ut(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=At(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Nt(e)}function Wt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gt=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 Kt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Gt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Kt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Kt(e,o,t[o])}function Jt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 Yt=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`]]),Xt=/^[\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 Zt(e){return Xt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Qt(){}var $t=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,nn=null;function rn(e){var t=ht(e);if(t&&(e=t.stateNode)){var n=e[ot]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Lt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ot]||null;if(!a)throw Error(i(90));Rt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Pt(r)}break a;case`textarea`:Ht(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Vt(e,!!n.multiple,t,!1)}}}var an=!1;function on(e,t,n){if(an)return e(t,n);an=!0;try{return e(t)}finally{if(an=!1,(tn!==null||nn!==null)&&(yu(),tn&&(t=tn,e=nn,nn=tn=null,rn(t),e)))for(t=0;t<e.length;t++)rn(e[t])}}function sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ot]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),ln=!1;if(cn)try{var un={};Object.defineProperty(un,"passive",{get:function(){ln=!0}}),window.addEventListener(`test`,un,un),window.removeEventListener(`test`,un,un)}catch{ln=!1}var dn=null,fn=null,pn=null;function mn(){if(pn)return pn;var e,t=fn,n=t.length,r,i=`value`in dn?dn.value:dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return pn=i.slice(e,1<r?1-r:void 0)}function hn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gn(){return!0}function _n(){return!1}function vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?gn:_n,this.isPropagationStopped=_n,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=f({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=f({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(f({},En,{dataTransfer:0})),kn=vn(f({},xn,{relatedTarget:0})),An=vn(f({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(f({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(f({},yn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(f({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(f({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(f({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(f({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(f({},En,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Un=vn(f({},yn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=cn&&`CompositionEvent`in window,Kn=null;cn&&`documentMode`in document&&(Kn=document.documentMode);var qn=cn&&`TextEvent`in window&&!Kn,Jn=cn&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,Xn=!1;function Zn(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var $n=!1;function er(e,t){switch(e){case`compositionend`:return Qn(t);case`keypress`:return t.which===32?(Xn=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&Xn?null:e;default:return null}}function tr(e,t){if($n)return e===`compositionend`||!Gn&&Zn(e,t)?(e=mn(),pn=fn=dn=null,$n=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Jn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){tn?nn?nn.push(r):nn=[r]:tn=r,t=Td(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function B(e){vd(e,0)}function sr(e){if(Pt(gt(e)))return e}function cr(e,t){if(e===`change`)return t}var lr=!1;if(cn){var ur;if(cn){var dr=`oninput`in document;if(!dr){var fr=document.createElement(`div`);fr.setAttribute(`oninput`,`return;`),dr=typeof fr.oninput==`function`}ur=dr}else ur=!1;lr=ur&&(!document.documentMode||9<document.documentMode)}function pr(){ar&&(ar.detachEvent(`onpropertychange`,mr),or=ar=null)}function mr(e){if(e.propertyName===`value`&&sr(or)){var t=[];ir(t,or,e,en(e)),on(B,t)}}function hr(e,t,n){e===`focusin`?(pr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return sr(or)}function _r(e,t){if(e===`click`)return sr(t)}function vr(e,t){if(e===`input`||e===`change`)return sr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function xr(e,t){if(br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!be.call(t,i)||!br(e[i],t[i]))return!1}return!0}function Sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=Sr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ft(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ft(e.document)}return t}function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Dr=cn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==Ft(r)||(r=Or,`selectionStart`in r&&Er(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&xr(Ar,r)||(Ar=r,r=Td(kr,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};cn&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionrun`),Hr=Lr(`transitionstart`),Ur=Lr(`transitioncancel`),Wr=Lr(`transitionend`),Gr=new Map,Kr=`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(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),xt(t,[e])}var Jr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function li(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=oi(31,n,t,a),e.elementType=D,e.lanes=o,e;case g:return di(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=oi(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=oi(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=oi(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-Le(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,Mi=null,V=!1,Ni=null,Pi=!1,Fi=Error(i(519));function Ii(e){throw Hi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Fi}function Li(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[at]=e,t[ot]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Ut(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||Ii(e,!0)}function Ri(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:ji=ji.return}}function zi(e){if(e!==ji)return!1;if(!V)return Ri(e),V=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Mi&&Ii(e),Ri(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Mi=uf(e)}else t===27?(t=Mi,Zd(e.type)?(e=lf,lf=null,Mi=e):Mi=t):Mi=ji?cf(e.stateNode.nextSibling):null;return!0}function Bi(){Mi=ji=null,V=!1}function Vi(){var e=Ni;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Ni=null),e}function Hi(e){Ni===null?Ni=[e]:Ni.push(e)}var Ui=ae(null),Wi=null,Gi=null;function Ki(e,t,n){I(Ui,t._currentValue),t._currentValue=n}function qi(e){e._currentValue=Ui.current,oe(Ui)}function Ji(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Yi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ji(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ji(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Xi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Yi(t,e,n,r),t.flags|=262144}function H(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Wi=e,Gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return $i(Wi,e)}function U(e,t){return Wi===null&&Zi(e),$i(e,t)}function $i(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gi===null){if(e===null)throw Error(i(308));Gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gi=Gi.next=t;return n}var ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ta=t.unstable_scheduleCallback,na=t.unstable_NormalPriority,ra={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ia(){return{controller:new ea,data:new Map,refCount:0}}function aa(e){e.refCount--,e.refCount===0&&ta(na,function(){e.controller.abort()})}var oa=null,sa=0,ca=0,la=null;function ua(e,t){if(oa===null){var n=oa=[];sa=0,ca=ud(),la={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return sa++,t.then(da,da),t}function da(){if(--sa===0&&oa!==null){la!==null&&(la.status=`fulfilled`);var e=oa;oa=null,ca=0,la=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var pa=P.S;P.S=function(e,t){$l=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&ua(e,t),pa!==null&&pa(e,t)};var ma=ae(null);function ha(){var e=ma.current;return e===null?Il.pooledCache:e}function ga(e,t){t===null?I(ma,ma.current):I(ma,t.pool)}function _a(){var e=ha();return e===null?null:{parent:ra._currentValue,pool:e}}var va=Error(i(460)),ya=Error(i(474)),ba=Error(i(542)),xa={then:function(){}};function Sa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ca(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Da(e),e;default:if(typeof t.status==`string`)t.then(Qt,Qt);else{if(e=Il,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Da(e),e}throw Ta=t,va}}function wa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ta=e,va):e}}var Ta=null;function Ea(){if(Ta===null)throw Error(i(459));var e=Ta;return Ta=null,e}function Da(e){if(e===va||e===ba)throw Error(i(483))}var Oa=null,ka=0;function Aa(e){var t=ka;return ka+=1,Oa===null&&(Oa=[]),Ca(Oa,e,t)}function ja(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ma(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Na(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&wa(i)===t.type)?(t=a(t,n.props),ja(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),ja(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ui(t.type,t.key,t.props,null,e.mode,n),ja(n,t),n.return=e,n;case h:return t=mi(t,e.mode,n),t.return=e,t;case T:return t=wa(t),f(e,t,n)}if(te(t)||M(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Aa(t),n);if(t.$$typeof===b)return f(e,U(e,t),n);Ma(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=wa(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Aa(n),r);if(n.$$typeof===b)return p(e,t,U(e,n),r);Ma(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=wa(r),_(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Aa(r),i);if(r.$$typeof===b)return _(e,t,n,U(t,r),i);Ma(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),V&&Ei(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return V&&Ei(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),V&&Ei(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),V&&Ei(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return V&&Ei(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),V&&Ei(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&wa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ja(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),ja(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=wa(o),x(e,r,o,c)}if(te(o))return v(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Aa(o),c);if(o.$$typeof===b)return x(e,r,U(e,o),c);Ma(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ka=0;var i=x(e,t,n,r);return Oa=null,i}catch(t){if(t===va||t===ba)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=Na(!0),Fa=Na(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Y&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=la;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Z&p)===p:(r&p)===p){p!==0&&p===ca&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ia=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=ae(null),Ya=ae(0);function Xa(e,t){e=Hl,I(Ya,e),I(Ja,t),Hl=e|t.baseLanes}function Za(){I(Ya,Hl),I(Ja,Ja.current)}function Qa(){Hl=Ya.current,oe(Ja),oe(Ya)}var $a=ae(null),eo=null;function to(e){var t=e.alternate;I(oo,oo.current&1),I($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){I(oo,oo.current),I($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(I(oo,oo.current),I($a,e),eo===null&&(eo=e)):io(e)}function io(){I(oo,oo.current),I($a,$a.current)}function ao(e){oe($a),eo===e&&(eo=null),oe(oo)}var oo=ae(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=0,W=null,lo=null,uo=null,fo=!1,po=!1,mo=!1,ho=0,go=0,_o=null,vo=0;function yo(){throw Error(i(321))}function bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function xo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ps:Fs,mo=!1,a=n(r,i),mo=!1,po&&(a=Co(t,n,r,i)),So(e),a}function So(e){P.H=Ns;var t=lo!==null&&lo.next!==null;if(co=0,uo=lo=W=null,fo=!1,go=0,_o=null,t)throw Error(i(300));e===null||Qs||(e=e.dependencies,e!==null&&H(e)&&(Qs=!0))}function Co(e,t,n,r){W=e;var a=0;do{if(po&&(_o=null),go=0,po=!1,25<=a)throw Error(i(301));if(a+=1,uo=lo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Is,o=t(n,r)}while(po);return o}function wo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(lo===null?null:lo.memoizedState)!==e&&(W.flags|=1024),t}function To(){var e=ho!==0;return ho=0,e}function Eo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Do(e){if(fo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fo=!1}co=0,uo=lo=W=null,po=!1,go=ho=0,_o=null}function Oo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return uo===null?W.memoizedState=uo=e:uo=uo.next=e,uo}function G(){if(lo===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=lo.next;var t=uo===null?W.memoizedState:uo.next;if(t!==null)uo=t,lo=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));lo=e,e={memoizedState:lo.memoizedState,baseState:lo.baseState,baseQueue:lo.baseQueue,queue:lo.queue,next:null},uo===null?W.memoizedState=uo=e:uo=uo.next=e}return uo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=go;return go+=1,_o===null&&(_o=[]),e=Ca(_o,e,t),t=W,(uo===null?t.memoizedState:uo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ps:Fs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===b)return Qi(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function K(e){return Po(G(),lo,e)}function Po(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Z&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ca&&(d=!0);else if((co&p)===p){u=u.next,p===ca&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,Wl|=p;f=u.action,mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!br(o,e.memoizedState)&&(Qs=!0,d&&(n=la,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function q(e){var t=G(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);br(o,t.memoizedState)||(Qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=W,a=G(),o=V;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!br((lo||a).memoizedState,n);if(s&&(a.memoizedState=n,Qs=!0),a=a.queue,as(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||uo!==null&&uo.memoizedState.tag&1){if(r.flags|=2048,es(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Il===null)throw Error(i(349));o||co&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,J(t)&&zo(e)}function Ro(e,t,n){return n(function(){J(t)&&zo(e)})}function J(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function zo(e){var t=ti(e,2);t!==null&&mu(t,e,2)}function Bo(e){var t=Oo();if(typeof e==`function`){var n=e;if(e=n(),mo){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Vo(e,t,n,r){return e.baseState=n,Po(e,lo,typeof r==`function`?r:No)}function Ho(e,t,n,r,a){if(As(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Uo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Uo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Wo(e,t,s)}catch(n){Ko(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Wo(e,t,a)}catch(n){Ko(e,t,n)}}function Wo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Go(e,t,n)},function(n){return Ko(e,t,n)}):Go(e,t,n)}function Go(e,t,n){t.status=`fulfilled`,t.value=n,qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Uo(e,n)))}function Ko(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,qo(t),t=t.next;while(t!==r)}e.action=null}function qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Yo(e,t){if(V){var n=Il.formState;if(n!==null){a:{var r=W;if(V){if(Mi){b:{for(var i=Mi,a=Pi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Mi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ii(r)}r=!1}r&&(t=n[0])}}return n=Oo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},n.queue=r,n=Ds.bind(null,W,r),r.dispatch=n,r=Bo(!1),a=ks.bind(null,W,!1,r.queue),r=Oo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ho.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Xo(e){return Zo(G(),lo,e)}function Zo(e,t,n){if(t=Po(e,t,Jo)[0],e=K(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===va?ba:e}else r=t;t=G();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,es(9,{destroy:void 0},Qo.bind(null,i,n),null)),[r,a,e]}function Qo(e,t){e.action=t}function $o(e){var t=G(),n=lo;if(n!==null)return Zo(t,n,e);G(),t=t.memoizedState,n=G();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function es(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ts(){return G().memoizedState}function ns(e,t,n,r){var i=Oo();W.flags|=e,i.memoizedState=es(1|t,{destroy:void 0},n,r===void 0?null:r)}function rs(e,t,n,r){var i=G();r=r===void 0?null:r;var a=i.memoizedState.inst;lo!==null&&r!==null&&bo(r,lo.memoizedState.deps)?i.memoizedState=es(t,a,n,r):(W.flags|=e,i.memoizedState=es(1|t,a,n,r))}function is(e,t){ns(8390656,8,e,t)}function as(e,t){rs(2048,8,e,t)}function os(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=G().memoizedState;return os({ref:t,nextImpl:e}),function(){if(Y&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return rs(4,2,e,t)}function ls(e,t){return rs(4,4,e,t)}function us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ds(e,t,n){n=n==null?null:n.concat([e]),rs(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=G();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=G();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&bo(t,r[1]))return r[0];if(r=e(),mo){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||co&1073741824&&!(Z&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),W.lanes|=e,Wl|=e,n)}function gs(e,t,n,r){return br(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Z&261930)?(Qs=!0,e.memoizedState=n):(e=pu(),W.lanes|=e,Wl|=e,t):(e=hs(e,n,r),br(e,t)||(Qs=!0),e)}function _s(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,ks(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,fa(c,r),fu(e)):Os(e,t,r,fu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=bs(e).queue;_s(e,a,t,ne,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},fu())}function Ss(){return Qi(Qf)}function Cs(){return G().memoizedState}function ws(){return G().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=za(n);var r=Ba(t,e,n);r!==null&&(mu(r,t,n),Va(r,t,n)),t={cache:ia()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=ei(e,t,n,r),n!==null&&(mu(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,fu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return $r(e,t,i,0),Il===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return mu(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&mu(t,e,2)}function As(e){var t=e.alternate;return e===W||t!==null&&t===W}function js(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qe(e,n)}}var Ns={readContext:Qi,use:jo,useCallback:yo,useContext:yo,useEffect:yo,useImperativeHandle:yo,useLayoutEffect:yo,useInsertionEffect:yo,useMemo:yo,useReducer:yo,useRef:yo,useState:yo,useDebugValue:yo,useDeferredValue:yo,useTransition:yo,useSyncExternalStore:yo,useId:yo,useHostTransitionStatus:yo,useFormState:yo,useActionState:yo,useOptimistic:yo,useMemoCache:yo,useCacheRefresh:yo};Ns.useEffectEvent=yo;var Ps={readContext:Qi,use:jo,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=Oo();t=t===void 0?null:t;var r=e();if(mo){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Oo();if(n!==void 0){var i=n(t);if(mo){Ie(!0);try{n(t)}finally{Ie(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,n=Ds.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(Oo(),e,t)},useTransition:function(){var e=Bo(!1);return e=_s.bind(null,W,e.queue,!0,!1),Oo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Oo();if(V){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Il===null)throw Error(i(349));Z&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Ro.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=Oo(),t=Il.identifierPrefix;if(V){var n=Ti,r=wi;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=vo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ss,useFormState:Yo,useActionState:Yo,useOptimistic:function(e){var t=Oo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ks.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Oo().memoizedState=Ts.bind(null,W)},useEffectEvent:function(e){var t=Oo(),n={impl:e};return t.memoizedState=n,function(){if(Y&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:Qi,use:jo,useCallback:ps,useContext:Qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:K,useRef:ts,useState:function(){return K(No)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(G(),lo.memoizedState,e,t)},useTransition:function(){var e=K(No)[0],t=G().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Fo,useId:Cs,useHostTransitionStatus:Ss,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){return Vo(G(),lo,e,t)},useMemoCache:Mo,useCacheRefresh:ws};Fs.useEffectEvent=ss;var Is={readContext:Qi,use:jo,useCallback:ps,useContext:Qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:q,useRef:ts,useState:function(){return q(No)},useDebugValue:fs,useDeferredValue:function(e,t){var n=G();return lo===null?hs(n,e,t):gs(n,lo.memoizedState,e,t)},useTransition:function(){var e=q(No)[0],t=G().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Fo,useId:Cs,useHostTransitionStatus:Ss,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){var n=G();return lo===null?(n.baseState=e,[e,n.queue.dispatch]):Vo(n,lo,e,t)},useMemoCache:Mo,useCacheRefresh:ws};Is.useEffectEvent=ss;function Ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=za(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(mu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(mu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=za(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(mu(t,e,n),Va(t,e,n))}};function zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!xr(n,r)||!xr(i,a):!0}function Bs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rs.enqueueReplaceState(t,t.state,null)}function Vs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Hs(e){Jr(e)}function Us(e){console.error(e)}function Ws(e){Jr(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function Js(e){return e=za(e),e.tag=3,e}function Ys(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ks(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ks(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Xs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Xi(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Eu(),!1}if(V)return t=$a.current,t===null?(r!==Fi&&(t=Error(i(423),{cause:r}),Hi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=qs(e.stateNode,r,a),Ha(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Fi&&(e=Error(i(422),{cause:r}),Hi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=qs(n.stateNode,r,e),Ha(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Js(a),Ys(a,e,n,r),Ha(n,a),!1}n=n.return}while(n!==null);return!1}var Zs=Error(i(461)),Qs=!1;function $s(e,t,n,r){t.child=e===null?Fa(t,null,n,r):Pa(t,e.child,n,r)}function ec(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=xo(e,t,n,o,a,i),s=To(),e!==null&&!Qs?(Eo(e,t,i),wc(e,t,i)):(V&&s&&Oi(t),t.flags|=1,$s(e,t,r,i),t.child)}function tc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Tc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?xr:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(xr(a,r)&&e.ref===t.ref)if(Qs=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&(Qs=!0);else return t.lanes=e.lanes,wc(e,t,i)}return uc(e,t,n,r,i)}function rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ac(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ga(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,ac(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ga(t,null),Za(),io(t)):(ga(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return $s(e,t,i,n),t.child}function ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ac(e,t,n,r,i){var a=ha();return a=a===null?null:{parent:ra._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ga(t,null),Za(),ro(t),e!==null&&Xi(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return Pa(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(V){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ic(null,e);if(no(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a)if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Qs||Xi(e,t,n,!1),a=(n&e.childLanes)!==0,Qs||a){if(r=Il,r!==null&&(s=$e(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),mu(r,e,s),Zs;Eu(),t=sc(e,t,n)}else e=o.treeContext,Mi=cf(s.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=oc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function uc(e,t,n,r,i){return Zi(t),n=xo(e,t,n,r,void 0,i),r=To(),e!==null&&!Qs?(Eo(e,t,i),wc(e,t,i)):(V&&r&&Oi(t),t.flags|=1,$s(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=Co(t,r,n,i),So(e),r=To(),e!==null&&!Qs?(Eo(e,t,a),wc(e,t,a)):(V&&r&&Oi(t),t.flags|=1,$s(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Rs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},La(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ls(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Rs.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Vs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Bs(t,a,r,o),Ia=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||Ia?(typeof d==`function`&&(Ls(t,n,d,r),l=t.memoizedState),(c=Ia||zs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ra(e,t),o=t.memoizedProps,u=Vs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Bs(t,a,r,c),Ia=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||Ia||e!==null&&e.dependencies!==null&&H(e.dependencies)?(typeof s==`function`&&(Ls(t,n,s,r),p=t.memoizedState),(u=Ia||zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&H(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Pa(t,e.child,null,i),t.child=Pa(t,null,n,i)):$s(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function pc(e,t,n,r){return Bi(),t.flags|=256,$s(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:_a()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function _c(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(V){if(a?to(t):io(t),(e=Mi)?(e=rf(e,Pi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,Mi=null)):e=null,e===null)throw Ii(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=yc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(null,r)):(to(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=yc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Pa(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=ic(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Hi({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(Qs||Xi(e,t,n,!1),s=(n&e.childLanes)!==0,Qs||s){if(s=Il,s!==null&&(r=$e(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),mu(s,e,r),Zs;af(c)||Eu(),t=bc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Mi=cf(c.nextSibling),ji=t,V=!0,Ni=null,Pi=!1,e!==null&&Ai(t,e),t=vc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ic(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(a=c.cachePool,a===null?a=_a():(l=ra._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(e.child,r)):(to(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function vc(e,t){return t=yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return Pa(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ji(e.return,t,n)}function Sc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,I(oo,o),$s(e,t,r,n),r=V?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function wc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Xi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&H(e))):!0}function Ec(e,t,n){switch(t.tag){case 3:L(t,t.stateNode.containerInfo),Ki(t,ra,e.memoizedState.cache),Bi();break;case 27:case 5:R(t);break;case 4:L(t,t.stateNode.containerInfo);break;case 10:Ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=wc(e,t,n),e===null?null:e.sibling):_c(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Xi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),I(oo,oo.current),r)break;return null;case 22:return t.lanes=0,rc(e,t,n,t.pendingProps);case 24:Ki(t,ra,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qs=!0;else{if(!Tc(e,n)&&!(t.flags&128))return Qs=!1,Ec(e,t,n);Qs=!!(e.flags&131072)}else Qs=!1,V&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=wa(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Vs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=ec(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=tc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Vs(r,t.pendingProps),fc(e,t,r,a,n);case 3:a:{if(L(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ra(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ki(t,ra,r),r!==o.cache&&Yi(t,[ra],n,!0),Wa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pc(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Hi(a),t=pc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Mi=cf(e.firstChild),ji=t,V=!0,Ni=null,Pi=!0,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Bi(),r===a){t=wc(e,t,n);break a}$s(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:V||(n=t.type,e=t.pendingProps,r=Bd(le.current).createElement(n),r[at]=t,r[ot]=e,Pd(r,n,e),vt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return R(t),e===null&&V&&(r=t.stateNode=ff(t.type,t.pendingProps,le.current),ji=t,Pi=!0,a=Mi,Zd(t.type)?(lf=a,Mi=cf(r.firstChild)):Mi=a),$s(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((a=r=Mi)&&(r=tf(r,t.type,t.pendingProps,Pi),r===null?a=!1:(t.stateNode=r,ji=t,Mi=cf(r.firstChild),Pi=!1,a=!0)),a||Ii(t)),R(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=xo(e,t,wo,null,null,n),Qf._currentValue=a),lc(e,t),$s(e,t,r,n),t.child;case 6:return e===null&&V&&((e=n=Mi)&&(n=nf(n,t.pendingProps,Pi),n===null?e=!1:(t.stateNode=n,ji=t,Mi=null,e=!0)),e||Ii(t)),null;case 13:return _c(e,t,n);case 4:return L(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pa(t,null,r,n):$s(e,t,r,n),t.child;case 11:return ec(e,t,t.type,t.pendingProps,n);case 7:return $s(e,t,t.pendingProps,n),t.child;case 8:return $s(e,t,t.pendingProps.children,n),t.child;case 12:return $s(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ki(t,t.type,r.value),$s(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,$s(e,t,r,n),t.child;case 14:return tc(e,t,t.type,t.pendingProps,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return cc(e,t,n);case 22:return rc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ra),e===null?(a=ha(),a===null&&(a=Il,o=ia(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},La(t),Ki(t,ra,a)):((e.lanes&n)!==0&&(Ra(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ki(t,ra,r),r!==a.cache&&Yi(t,[ra],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ki(t,ra,r))),$s(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Oc(e){e.flags|=4}function kc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw Ta=xa,ya}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Cu())e.flags|=8192;else throw Ta=xa,ya}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:qe(),e.lanes|=t,Jl|=t)}function Mc(e,t){if(!V)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nc(t),null;case 1:return Nc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),qi(ra),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zi(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vi())),Nc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Oc(t),o===null?(Nc(t),kc(t,a,null,r,n)):(Nc(t),Ac(t,o))):o?o===e.memoizedState?(Nc(t),t.flags&=-16777217):(Oc(t),Nc(t),Ac(t,o)):(e=e.memoizedProps,e!==r&&Oc(t),Nc(t),kc(t,a,e,r,n)),null;case 27:if(fe(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}e=se.current,zi(t)?Li(t,e):(e=ff(a,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Nc(t),null}if(o=se.current,zi(t))Li(t,o);else{var s=Bd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[at]=t,o[ot]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,zi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ii(t,!0)}else e=Bd(e).createTextNode(r),e[at]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=zi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[at]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[at]=t}else Bi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),a=!1}else a=Vi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),jc(t,t.updateQueue),Nc(t),null);case 4:return de(),e===null&&xd(t.stateNode.containerInfo),Nc(t),null;case 10:return qi(t.type),Nc(t),null;case 19:if(oe(oo),r=t.memoizedState,r===null)return Nc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Mc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return I(oo,oo.current&1|2),V&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>eu&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!V)return Nc(t),null}else 2*Te()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Mc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=oo.current,I(oo,a?n&1|2:n&1),V&&Ei(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&oe(ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),qi(ra),Nc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Fc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qi(ra),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(oo),null;case 4:return de(),null;case 10:return qi(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&oe(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return qi(ra),null;case 25:return null;default:return null}}function Ic(e,t){switch(ki(t),t.tag){case 3:qi(ra),de();break;case 26:case 27:case 5:fe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:oe(oo);break;case 10:qi(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&oe(ma);break;case 24:qi(ra)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Q(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Q(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Q(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Q(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Q(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Q(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Q(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Q(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ot]=t}catch(t){Q(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[at]=e,t[ot]=n}catch(t){Q(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Rd=sp,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Vs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Q(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Lc(5,n);break;case 1:if(_l(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Q(n,n.return,e)}else{var i=Vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Q(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(_l(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{qa(e,t)}catch(e){Q(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&cl(e,n);break;case 13:_l(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?yl(e,n,(n.subtreeFlags&8772)!=0):_l(e,n),Xc=i,Zc=a}break;case 30:break;default:_l(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;Zd(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),pf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null)if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){Q(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Q(n,t,e)}break;case 18:il!==null&&(al?(e=il,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Q(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Q(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=pl;if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ft]||o[at]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[at]=e,vt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[at]=e,vt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){a=e.stateNode;try{Wt(a,``)}catch(t){Q(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Q(e,e.return,t)}}break;case 3:if(Bf=null,a=pl,pl=gf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Q(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=gf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,fl(t,e),Zc=d,Xc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||vl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Q(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Q(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Wt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),vl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),vl(t);break;case 27:pf(t.stateNode);case 26:case 5:Hc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:yl(i,a,n),Lc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Q(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ka(c[i],s)}catch(e){Q(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&cl(i,a);break;case 13:yl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Vc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&aa(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e)));break;case 12:if(i&2048){Sl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Q(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:wl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Gf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=gf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Pl={getCacheForType:function(e){var t=Qi(ra),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ra).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Y=0,Il=null,X=null,Z=0,Ll=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return Y&2&&Z!==0?Z&-Z:P.T===null?nt():ud()}function pu(){if(ql===0)if(!(Z&536870912)||V){var e=Ve;Ve<<=1,!(Ve&3932160)&&(Ve=262144),ql=e}else ql=536870912;return e=$a.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Il&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,Z,ql,!1)),Ye(e,n),(!(Y&2)||e!==Il)&&(e===Il&&(!(Y&2)&&(Gl|=n),Ul===4&&vu(e,Z,ql,!1)),nd(e))}function hu(e,t,n){if(Y&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ge(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-Te(),10<a)){if(vu(r,t,ql,!zl),We(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Kd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);nd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Ol(t,a,d);var m=(a&62914560)===a?Ql-Te():(a&4194048)===a?$l-Te():0;if(m=qf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!br(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ze(e,n,t)}function yu(){return Y&6?!0:(rd(0,!1),!1)}function bu(){if(X!==null){if(Ll===0)var e=X.return;else e=X,Gi=Wi=null,Do(e),Oa=null,ka=0,e=X;for(;e!==null;)Ic(e.alternate,e),e=e.return;X=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Il=e,X=n=ci(e.current,null),Z=t,Ll=0,Rl=null,zl=!1,Bl=Ge(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,Qr(),n}function Su(e,t){W=null,P.H=Ns,t===va||t===ba?(t=Ea(),Ll=3):t===ya?(t=Ea(),Ll=4):Ll=t===Zs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,X===null&&(Ul=1,Gs(e,gi(t,e.current)))}function Cu(){var e=$a.current;return e===null?!0:(Z&4194048)===Z?eo===null:(Z&62914560)===Z||Z&536870912?e===eo:!1}function wu(){var e=P.H;return P.H=Ns,e===null?Ns:e}function Tu(){var e=P.A;return P.A=Pl,e}function Eu(){Ul=4,zl||(Z&4194048)!==Z&&$a.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Il===null||vu(Il,Z,ql,!1)}function Du(e,t,n){var r=Y;Y|=2;var i=wu(),a=Tu();(Il!==e||Z!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Ll!==0&&X!==null){var s=X,c=Rl;switch(Ll){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=Ll;if(Ll=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Ll,Ll=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Gi=Wi=null,Y=r,P.H=i,P.A=a,X===null&&(Il=null,Z=0,Qr()),o}function Ou(){for(;X!==null;)ju(X)}function ku(e,t){var n=Y;Y|=2;var r=wu(),a=Tu();Il!==e||Z!==t?(tu=null,eu=Te()+500,xu(e,t)):Bl=Ge(e,t);a:do try{if(Ll!==0&&X!==null){t=X;var o=Rl;b:switch(Ll){case 1:Ll=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(Sa(o)){Ll=0,Rl=null,Mu(t);break}t=function(){Ll!==2&&Ll!==9||Il!==e||(Ll=7),nd(e)},o.then(t,t);break a;case 3:Ll=7;break a;case 4:Ll=5;break a;case 7:Sa(o)?(Ll=0,Rl=null,Mu(t)):(Ll=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(X.tag){case 26:s=X.memoizedState;case 5:case 27:var c=X;if(s?Wf(s):c.stateNode.complete){Ll=0,Rl=null;var l=c.sibling;if(l!==null)X=l;else{var u=c.return;u===null?X=null:(X=u,Pu(u))}break b}}Ll=0,Rl=null,Nu(e,t,o,5);break;case 6:Ll=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Gi=Wi=null,P.H=r,P.A=a,Y=n,X===null?(Il=null,Z=0,Qr(),Ul):0}function Au(){for(;X!==null&&!Ce();)ju(X)}function ju(e){var t=Dc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):X=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dc(n,t,t.pendingProps,t.type,void 0,Z);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,Z);break;case 5:Do(t);default:Ic(n,t),t=X=li(t,Hl),t=Dc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):X=t}function Nu(e,t,n,r){Gi=Wi=null,Do(t),Oa=null,ka=0;var i=t.return;try{if(Xs(e,i,t,n,Z)){Ul=1,Gs(e,gi(n,e.current)),X=null;return}}catch(t){if(i!==null)throw X=i,t;Ul=1,Gs(e,gi(n,e.current)),X=null;return}t.flags&32768?(V||r===1?e=!0:Bl||Z&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Pc(t.alternate,t,Hl);if(n!==null){X=n;return}if(t=t.sibling,t!==null){X=t;return}X=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,X=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){X=e;return}X=e=n}while(e!==null);Ul=6,X=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(Y&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,Xe(e,n,o,s,c,l),e===Il&&(X=Il=null,Z=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(ke,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Y,Y|=4;try{tl(e,t,n)}finally{Y=s,F.p=a,P.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Y;Y|=4;try{ml(t,e);var a=zd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Cr(s,h),v=Cr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Y=i,F.p=r,P.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Y;Y|=4;try{nl(e,t.alternate,t)}finally{Y=i,F.p=r,P.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,we();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),tt(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}ou&3&&Vu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,rd(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,aa(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=tt(ou),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,Y&6)throw Error(i(331));var c=Y;if(Y|=4,jl(o.current),Cl(o,o.current,s,n),Y=c,rd(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{F.p=a,P.T=r,Bu(e,t)}}function Uu(e,t,n){t=gi(n,t),t=qs(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Ye(e,2),nd(e))}function Q(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=gi(n,e),n=Js(2),r=Ba(t,n,2),r!==null&&(Ys(n,r,t,e),Ye(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Vl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Il===e&&(Z&n)===n&&(Ul===4||Ul===3&&(Z&62914560)===Z&&300>Te()-Ql?!(Y&2)&&xu(e,0):Kl|=n,Jl===Z&&(Jl=0)),nd(e)}function Ku(e,t){t===0&&(t=qe()),e=ti(e,t),e!==null&&(Ye(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return xe(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Z,a=We(r,r===Il?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ge(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Te(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}ru!==0&&ru!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ke(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Il,n=Z,n=We(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ge(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),tt(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=sd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=Z;return r=We(e,e===Il?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),od(e,Te()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Vu())return null;hu(e,t,!0)}function ld(){Yd(function(){Y&6?xe(De,id):ad()})}function ud(){if(td===0){var e=ca;e===0&&(e=Be,Be<<=1,!(Be&261888)&&(Be=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Zt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[ot]||null).action),o=r.submitter;o&&(t=(t=o[ot]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Kr.length;md++){var hd=Kr[md];qr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),St(`onMouseEnter`,[`mouseout`,`mouseover`]),St(`onMouseLeave`,[`mouseout`,`mouseover`]),St(`onPointerEnter`,[`pointerout`,`pointerover`]),St(`onPointerLeave`,[`pointerout`,`pointerover`]),xt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),xt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),xt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),xt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),xt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[ct];n===void 0&&(n=t[ct]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,yt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!ln||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=mt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}on(function(){var r=a,i=en(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=bn,u=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case Rr:case zr:case Br:l=An;break;case Wr:l=Vn;break;case`scroll`:case`scrollend`:l=Sn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=sn(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==$t&&(u=n.relatedTarget||n.fromElement)&&(mt(u)||u[st]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?mt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:gt(l),h=u==null?c:gt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,mt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?gt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=cr;else if(rr(c))if(lr)v=vr;else{v=gr;var y=hr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Jt(r.elementType)&&(v=cr):v=_r;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Bt(c,`number`,c.value)}switch(y=r?gt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(s,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(s,n,i)}var b;if(Gn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else $n?Zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&($n||x!==`onCompositionStart`?x===`onCompositionEnd`&&$n&&(b=mn()):(dn=i,fn=`value`in dn?dn.value:dn.textContent,$n=!0)),y=Td(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Qn(n),b!==null&&(x.data=b)))),(b=qn?er(e,n):tr(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=sn(e,n),i!=null&&r.unshift(wd(e,i,a)),i=sn(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=sn(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=sn(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
|
|
10
|
+
`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Wt(e,``+r);break;case`className`:Ot(e,`class`,r);break;case`tabIndex`:Ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ot(e,n,r);break;case`style`:qt(e,r,o);break;case`data`:if(t!==`object`){Ot(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Zt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Zt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),Dt(e,`popover`,r);break;case`xlinkActuate`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:kt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:kt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Dt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Yt.get(n)||n,Dt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:qt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Wt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Wt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Qt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ot]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Dt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Vt(e,!!r,n,!0):Vt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Ut(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Jt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Rt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Vt(e,!!n,n?[]:``,!1):Vt(e,!!n,t,!0)):Vt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Ht(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Jt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ft])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=F.d;F.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=yu();return e||t}function yf(e){var t=ht(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Lt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Lt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Lt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Lt(n.imageSizes)+`"]`)):i+=`[href="`+Lt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),vt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Lt(r)+`"][href="`+Lt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),vt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=_t(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);vt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=_t(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),vt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=le.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=_t(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=_t(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=_t(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Lt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),vt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Lt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Lt(n.href)+`"]`);if(r)return t.instance=r,vt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),vt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,vt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),vt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,vt(a),a):(r=n,(a=mf.get(o))&&(r=f({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),vt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ft]||a[at]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,vt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),vt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:b,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=Je(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Je(0),this.hiddenUpdates=Je(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},La(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(mu(n,e,t),Va(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=et(t);var n=ti(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,up(e,t,n,r)}finally{F.p=a,P.T=i}}function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,up(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=ht(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ue(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Y&6)&&(eu=Te()+500,rd(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=en(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=mt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){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(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case je:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ht(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=mt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,rt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,rt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$t=r,n.target.dispatchEvent(r),$t=null}else return t=ht(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=ht(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ot]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ot]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),yu(),t[st]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=nt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Pe=zp.inject(Rp),Fe=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Hs,s=Us,c=Ws;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[st]=t.current,xd(e),new Fp(t)}})),M=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=j()})),N=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ee=o(((e,t)=>{t.exports=N()})),te=l(M(),1),P=l(E(),1),F=ee(),ne=[`shift`,`alt`,`meta`,`mod`,`ctrl`,`control`];function re(){return typeof navigator>`u`?!1:/mac/i.test(navigator.userAgent)&&!/iphone|ipad|ipod/i.test(navigator.userAgent)}var ie={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 ae(e){return(ie[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,``)}function oe(e){return ne.includes(e)}function I(e,t=`,`){return e.toLowerCase().split(t)}function se(e,t=`+`,n=`>`,r=!1,i,a){let o=[],s=!1;e=e.trim(),e.includes(n)?(s=!0,o=e.toLocaleLowerCase().split(n).map(e=>ae(e))):o=e.toLocaleLowerCase().split(t).map(e=>ae(e));let c={alt:o.includes(`alt`),ctrl:o.includes(`ctrl`)||o.includes(`control`),shift:o.includes(`shift`),meta:o.includes(`meta`),mod:o.includes(`mod`),useKey:r},l=o.filter(e=>!ne.includes(e));return{...c,keys:l,description:i,isSequence:s,hotkey:e,metadata:a}}typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.code!==void 0&&L([ae(e.code)])}),document.addEventListener(`keyup`,e=>{e.code!==void 0&&de([ae(e.code)])})),typeof window<`u`&&(window.addEventListener(`blur`,()=>{ce.clear()}),window.addEventListener(`focus`,()=>{ce.clear()}),window.addEventListener(`contextmenu`,()=>{setTimeout(()=>{ce.clear()},0)})),typeof document<`u`&&document.addEventListener(`visibilitychange`,()=>{ce.clear()});var ce=new Set;function le(e){return Array.isArray(e)}function ue(e,t=`,`){return(le(e)?e:e.split(t)).every(e=>ce.has(e.trim().toLowerCase()))}function L(e){let t=Array.isArray(e)?e:[e];ce.has(`meta`)&&ce.forEach(e=>{oe(e)||ce.delete(e.toLowerCase())}),t.forEach(e=>{ce.add(e.toLowerCase())})}function de(e){e===`meta`?ce.clear():(Array.isArray(e)?e:[e]).forEach(e=>{ce.delete(e.toLowerCase())})}function R(e,t,n){(typeof n==`function`&&n(e,t)||n===!0)&&e.preventDefault()}function fe(e,t,n){return typeof n==`function`?n(e,t):n===!0||n===void 0}var pe=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`];function me(e){return he(e,pe)}function he(e,t=!1){let{target:n,composed:r}=e,i,a;return ge(n)&&r?(i=e.composedPath()[0]&&e.composedPath()[0].tagName,a=e.composedPath()[0]&&e.composedPath()[0].role):(i=n&&n.tagName,a=n&&n.role),le(t)?!!(i&&t?.some(e=>e.toLowerCase()===i.toLowerCase()||e===a)):!!(i&&t&&t)}function ge(e){return!!e.tagName&&!e.tagName.startsWith(`-`)&&e.tagName.includes(`-`)}function _e(e,t){return e.length===0&&t?!1:t?e.some(e=>t.includes(e))||e.includes(`*`):!0}var ve=(e,t,n=!1)=>{let{alt:r,meta:i,mod:a,shift:o,ctrl:s,keys:c,useKey:l}=t,{code:u,key:d,ctrlKey:f,metaKey:p,shiftKey:m,altKey:h}=e,g=ae(u);if(l&&c?.length===1&&c.includes(d.toLowerCase()))return!0;if(!c?.includes(g)&&![`ctrl`,`control`,`unknown`,`meta`,`alt`,`shift`,`os`].includes(g))return!1;if(!n){if(r!==h&&g!==`alt`||o!==m&&g!==`shift`)return!1;if(a){if(re()?!p:!f)return!1}else if(i!==p&&g!==`meta`&&g!==`os`||s!==f&&g!==`ctrl`&&g!==`control`)return!1}return c&&c.length===1&&c.includes(g)?!0:c&&c.length>0?c.includes(g)?ue(c):!1:!c||c.length===0},ye=(0,P.createContext)(void 0),be=()=>(0,P.useContext)(ye);function xe({addHotkey:e,removeHotkey:t,children:n}){return(0,F.jsx)(ye.Provider,{value:{addHotkey:e,removeHotkey:t},children:n})}function Se(e,t){return e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&Se(e[r],t[r]),!0):e===t}var Ce=(0,P.createContext)({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),we=()=>(0,P.useContext)(Ce),Te=({initiallyActiveScopes:e=[`*`],children:t})=>{let[n,r]=(0,P.useState)(e),[i,a]=(0,P.useState)([]),o=(0,P.useCallback)(e=>{r(t=>t.includes(`*`)?[e]:Array.from(new Set([...t,e])))},[]),s=(0,P.useCallback)(e=>{r(t=>t.filter(t=>t!==e))},[]),c=(0,P.useCallback)(e=>{r(t=>t.includes(e)?t.filter(t=>t!==e):t.includes(`*`)?[e]:Array.from(new Set([...t,e])))},[]),l=(0,P.useCallback)(e=>{a(t=>[...t,e])},[]),u=(0,P.useCallback)(e=>{a(t=>t.filter(t=>!Se(t,e)))},[]);return(0,F.jsx)(Ce.Provider,{value:{activeScopes:n,hotkeys:i,enableScope:o,disableScope:s,toggleScope:c},children:(0,F.jsx)(xe,{addHotkey:l,removeHotkey:u,children:t})})};function Ee(e){let t=(0,P.useRef)(void 0);return Se(t.current,e)||(t.current=e),t.current}var De=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},Oe=typeof window<`u`?P.useLayoutEffect:P.useEffect;function ke(e){if(!e)return;let{enabled:t,preventDefault:n,ignoreEventWhen:r,...i}=e;return typeof t==`function`?i:{...i,enabled:t}}function Ae(e,t,n,r){let[i,a]=(0,P.useState)(null),o=(0,P.useCallback)(e=>(a(e),()=>a(null)),[]),s=(0,P.useRef)(!1),c=Array.isArray(n)?Array.isArray(r)?void 0:r:n,l=le(e)?e.join(c?.delimiter):e,u=Array.isArray(n)?n:Array.isArray(r)?r:void 0,d=(0,P.useCallback)(t,u??[]),f=(0,P.useRef)(d);u?f.current=d:f.current=t;let p=Ee(ke(c)),m=(0,P.useRef)(c?.enabled);m.current=c?.enabled;let h=(0,P.useRef)(c?.preventDefault);h.current=c?.preventDefault;let g=(0,P.useRef)(c?.ignoreEventWhen);g.current=c?.ignoreEventWhen;let{activeScopes:_}=we(),v=be();return Oe(()=>{if(m.current===!1||!_e(_,p?.scopes))return;let e=[],t,n=(n,r=!1)=>{if(!(me(n)&&!he(n,p?.enableOnFormTags))){if(i!==null){let e=i.getRootNode();if((e instanceof Document||e instanceof ShadowRoot)&&e.activeElement!==i&&!i.contains(e.activeElement)){De(n);return}}n.target?.isContentEditable&&!p?.enableOnContentEditable||I(l,p?.delimiter).forEach(i=>{if(i.includes(p?.splitKey??`+`)&&i.includes(p?.sequenceSplitKey??`>`)){console.warn(`Hotkey ${i} contains both ${p?.splitKey??`+`} and ${p?.sequenceSplitKey??`>`} which is not supported.`);return}let a=se(i,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata);if(a.isSequence){t=setTimeout(()=>{e=[]},p?.sequenceTimeoutMs??1e3);let r=a.useKey?n.key:ae(n.code);if(oe(r.toLowerCase()))return;if(e.push(r),r!==a.keys?.[e.length-1]){e=[],t&&clearTimeout(t);return}e.length===a.keys?.length&&(f.current(n,a),t&&clearTimeout(t),e=[])}else if(ve(n,a,p?.ignoreModifiers)||a.keys?.includes(`*`)){if(g.current?.(n)||r&&s.current||(R(n,a,h.current),!fe(n,a,m.current)))return;f.current(n,a),r||(s.current=!0)}})}},r=e=>{e.code!==void 0&&(L(ae(e.code)),(p?.keydown===void 0&&p?.keyup!==!0||p?.keydown)&&n(e))},a=e=>{e.code!==void 0&&(de(ae(e.code)),s.current=!1,p?.keyup&&n(e,!0))},o=i||c?.document||document;return o.addEventListener(`keyup`,a,c?.eventListenerOptions),o.addEventListener(`keydown`,r,c?.eventListenerOptions),v&&I(l,p?.delimiter).forEach(e=>{v.addHotkey(se(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),()=>{o.removeEventListener(`keyup`,a,c?.eventListenerOptions),o.removeEventListener(`keydown`,r,c?.eventListenerOptions),v&&I(l,p?.delimiter).forEach(e=>{v.removeHotkey(se(e,p?.splitKey,p?.sequenceSplitKey,p?.useKey,p?.description,p?.metadata))}),e=[],t&&clearTimeout(t)}},[i,p,_,l]),o}var je=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Me=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ne=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Pe=e=>{let t=Ne(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fe={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`},Ie=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Le=(0,P.createContext)({}),Re=()=>(0,P.useContext)(Le),ze=(0,P.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Re()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,P.createElement)(`svg`,{ref:c,...Fe,width:t??l??Fe.width,height:t??l??Fe.height,stroke:e??f,strokeWidth:m,className:je(`lucide`,p,i),...!a&&!Ie(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,P.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),z=(e,t)=>{let n=(0,P.forwardRef)(({className:n,...r},i)=>(0,P.createElement)(ze,{ref:i,iconNode:t,className:je(`lucide-${Me(Pe(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Pe(e),n},Be=z(`arrow-down-from-line`,[[`path`,{d:`M19 3H5`,key:`1236rx`}],[`path`,{d:`M12 21V7`,key:`gj6g52`}],[`path`,{d:`m6 15 6 6 6-6`,key:`h15q88`}]]),Ve=z(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),He=z(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),Ue=z(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),We=z(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),Ge=z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Ke=z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),qe=z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Je=z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ye=z(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xe=z(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),Ze=z(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Qe=z(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),$e=z(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),et=z(`copy`,[[`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`}]]),tt=z(`eraser`,[[`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`}]]),nt=z(`external-link`,[[`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`}]]),rt=z(`eye`,[[`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`}]]),it=z(`file-diff`,[[`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`}]]),at=z(`file-pen`,[[`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`}]]),ot=z(`file-plus`,[[`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`}]]),st=z(`file-x`,[[`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`}]]),ct=z(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),lt=z(`folder-open`,[[`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`}]]),ut=z(`folder`,[[`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`}]]),dt=z(`git-branch`,[[`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`}]]),ft=z(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),pt=z(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),mt=z(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),ht=z(`keyboard`,[[`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`}]]),gt=z(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),_t=z(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),vt=z(`list`,[[`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`}]]),yt=z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),bt=z(`message-square-reply`,[[`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`}],[`path`,{d:`m10 8-3 3 3 3`,key:`fp6dz7`}],[`path`,{d:`M17 14v-1a2 2 0 0 0-2-2H7`,key:`1tkjnz`}]]),xt=z(`message-square`,[[`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`}]]),St=z(`panel-left-close`,[[`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`}]]),Ct=z(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),wt=z(`pen`,[[`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`}]]),Tt=z(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Et=z(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Dt=z(`refresh-cw`,[[`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`}]]),Ot=z(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),kt=z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),At=z(`settings`,[[`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`}]]),jt=z(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Mt=z(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Nt=z(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),Pt=z(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Ft=z(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),It=z(`unfold-vertical`,[[`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`}]]),Lt=z(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Rt=z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),zt=`split`;function Bt(e){switch(e){case`split`:case`side-by-side`:return`split`;case`unified`:case`inline`:return`unified`;default:return zt}}var Vt=`abcdefghijklmnopqrstuvwxyz0123456789`,Ht=16;function Ut(){return Array.from({length:Ht},()=>Vt[Math.floor(Math.random()*36)]).join(``)}function Wt(e){return typeof e.line==`number`?`${e.side}:${e.line}`:`${e.side}:${e.line.start}-${e.line.end}`}function Gt(e,t){return Wt(e)===Wt(t)}function Kt(e){return e?.trim()||``}function qt(e,t,n=!0){return n&&t.id&&e.id===t.id?!0:!(Kt(e.author)!==Kt(t.author)||e.body!==t.body||t.createdAt&&e.createdAt!==t.createdAt)}function Jt(e,t){if(t.id&&e.id===t.id)return!0;if(e.filePath!==t.filePath||!Gt(e.position,t.position))return!1;let n=e.messages[0];return n?qt(n,t,!0):!1}function Yt(e,t){let n=e.createdAt??t;return{createdAt:n,updatedAt:e.updatedAt??n}}function Xt(e,t){return e.localeCompare(t)>=0?e:t}function Zt(e,t){return t.updatedAt.localeCompare(e.updatedAt)}function Qt(e,t){let{createdAt:n,updatedAt:r}=Yt(e,t),i=e.id??Ut();return{id:i,filePath:e.filePath,createdAt:n,updatedAt:r,position:e.position,codeSnapshot:e.codeSnapshot,messages:[{id:e.id??i,body:e.body,author:e.author,createdAt:n,updatedAt:r}]}}function $t(e,t){let{createdAt:n,updatedAt:r}=Yt(e,t);return{id:e.id??Ut(),body:e.body,author:e.author,createdAt:n,updatedAt:r}}function en(e){return typeof e==`number`?e:{start:e.start,end:e.end}}function tn(e){return{side:e.side,line:en(e.line)}}function nn(e){if(e)return{content:e.content,language:e.language}}function rn(e){return{id:e.id,body:e.body,author:e.author,createdAt:e.createdAt,updatedAt:e.updatedAt}}function an(e){return{id:e.id,filePath:e.filePath,createdAt:e.createdAt,updatedAt:e.updatedAt,position:tn(e.position),codeSnapshot:nn(e.codeSnapshot),messages:e.messages.map(rn)}}function on(e,t){return e.id===t.id?!0:Kt(e.author)===Kt(t.author)?e.body===t.body&&e.createdAt===t.createdAt:!1}function sn(e,t){if(e.id===t.id)return!0;if(e.filePath!==t.filePath||!Gt(e.position,t.position))return!1;let n=e.messages[0],r=t.messages[0];return!n||!r?!1:on(n,r)}function cn(e,t){let n=e.createdAt.localeCompare(t.createdAt);return n===0?e.id.localeCompare(t.id):n}function ln(e,t){return t.updatedAt.localeCompare(e.updatedAt)>=0?rn(t):rn(e)}function un(e,t){let n=e.messages.map(rn);for(let e of t.messages){let t=n.findIndex(t=>on(t,e));if(t>=0){n[t]=ln(n[t],e);continue}n.push(rn(e))}let[r,...i]=n,a=r?[r,...i.sort(cn)]:i.sort(cn),o=a.reduce((e,t)=>Xt(e,t.updatedAt),Xt(e.updatedAt,t.updatedAt));return{...an(e),createdAt:e.createdAt.localeCompare(t.createdAt)<=0?e.createdAt:t.createdAt,updatedAt:o,position:tn(e.position),codeSnapshot:nn(t.codeSnapshot??e.codeSnapshot),messages:a}}function dn(e,t){let n=e.map(an);for(let e of t){let t=n.findIndex(t=>sn(t,e));if(t<0){n.push(an(e));continue}n[t]=un(n[t],e)}return{threads:n,warnings:[]}}function fn(e,t){let n=e.map(an),r=[];for(let e of t){let t=new Date().toISOString();if(e.type===`thread`){if(n.some(t=>Jt(t,e)))continue;n.push(Qt(e,t));continue}let i=n.filter(t=>t.filePath===e.filePath&&Gt(t.position,e.position)).sort(Zt)[0];if(!i){r.push(`Skipped reply import for ${e.filePath}:${Wt(e.position)} because no matching thread was found.`);continue}if(i.messages.some(t=>qt(t,e,!0)))continue;let a=$t(e,t);i.messages=[...i.messages,a],i.updatedAt=Xt(i.updatedAt,a.updatedAt)}return{threads:n,warnings:r}}function pn(e){return e??`direct`}function mn(e,t,n){return pn(n)===`merge-base`?{baseCommitish:e,targetCommitish:t,baseMode:`merge-base`}:{baseCommitish:e,targetCommitish:t}}function hn(e,t){return e?.baseCommitish===t?.baseCommitish&&e?.targetCommitish===t?.targetCommitish&&pn(e?.baseMode)===pn(t?.baseMode)}function gn(e){return`${e.baseCommitish}:${e.targetCommitish}:${pn(e.baseMode)}`}function _n(e){return e===`.`||e===`staged`||e===`working`}function vn({checked:e,onChange:t,label:n,className:r=``,title:i}){return(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${r}`,title:i,onClick:n=>{n.stopPropagation(),t(!e)},onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),n.stopPropagation(),t(!e))},role:`checkbox`,"aria-checked":e,tabIndex:0,children:[(0,F.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&&(0,F.jsx)(Ge,{size:10,className:`text-white`})}),n&&(0,F.jsx)(`span`,{className:`select-none`,children:n})]})}function yn(e){if(typeof document>`u`||typeof document.execCommand!=`function`)throw Error(`Clipboard is unavailable in this environment`);let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.setAttribute(`aria-hidden`,`true`),t.style.position=`fixed`,t.style.top=`0`,t.style.left=`-9999px`,t.style.opacity=`0`;let n=document.getSelection(),r=n?.rangeCount?n.getRangeAt(0):null,i=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.append(t),t.focus(),t.select(),t.setSelectionRange(0,e.length);let a=document.execCommand(`copy`);if(t.remove(),n&&r&&(n.removeAllRanges(),n.addRange(r)),i?.focus(),!a)throw Error(`Failed to copy text`)}async function bn(e){try{if(typeof navigator>`u`||typeof navigator.clipboard?.writeText!=`function`)throw Error(`Modern clipboard API is unavailable`);await navigator.clipboard.writeText(e);return}catch{yn(e)}}function xn(e){if(e==null)return``;try{return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}catch{return``}}function Sn(e){if(!e)return``;try{return new Date(e).toLocaleDateString([],{month:`short`,day:`numeric`})}catch{return``}}function Cn(e,t){if(e.kind===`turn`){let{turn:n,turnNumber:r}=e,i=n.promptPreview??`(no prompt captured)`,a=n.prompt??``,o=xn(n.endedAt??n.startedAt),s=t;return{icon:jt,pillLabel:`Turn ${r}`,pillClass:`text-[#79c0ff] border-[#388bfd66]`,stripTint:`from-[#388bfd10]`,preview:i,full:a,expandable:!!a.trim()&&a.trim()!==i.trim(),copyLabel:`Copy prompt`,meta:o?(0,F.jsx)(`span`,{children:o}):null,metaExpanded:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{children:[`session`,` `,(0,F.jsx)(`span`,{className:`font-mono text-github-text-secondary`,children:n.sessionId.slice(0,8)})]}),o?(0,F.jsxs)(`span`,{children:[`ended `,o]}):null]}),isLive:s}}let{commit:n}=e,r=n.body?.trim()?`${n.message}\n\n${n.body.trim()}`:n.message;return{icon:ft,pillLabel:`Commit`,pillClass:`text-[#d2a8ff] border-[#a371f766]`,stripTint:`from-[#a371f712]`,preview:n.message,full:r,expandable:!!n.body?.trim(),copyLabel:`Copy message`,meta:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`font-mono text-github-text-secondary`,children:n.shortHash}),n.author?(0,F.jsx)(`span`,{children:n.author}):null,n.date?(0,F.jsx)(`span`,{children:Sn(n.date)}):null]}),metaExpanded:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`font-mono text-github-text-secondary`,children:n.shortHash}),n.author?(0,F.jsx)(`span`,{children:n.author}):null,n.date?(0,F.jsx)(`span`,{children:Sn(n.date)}):null]}),isLive:!1}}function wn({context:e,liveMode:t,fileCount:n,additions:r,deletions:i,onStepPrev:a,onStepNext:o,canStepPrev:s,canStepNext:c}){let[l,u]=(0,P.useState)(!1),[d,f]=(0,P.useState)(!1),p=(0,P.useRef)(null);if((0,P.useEffect)(()=>{u(!1),f(!1)},[e?e.kind===`turn`?`turn:${e.turn.id}`:`commit:${e.commit.hash}`:`none`]),(0,P.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),!e)return null;let m=Cn(e,t),h=m.icon,g=n>0?(0,F.jsxs)(`span`,{children:[n,` file`,n===1?``:`s`,(0,F.jsxs)(`span`,{className:`ml-1 text-github-accent`,children:[`+`,r]}),` `,(0,F.jsxs)(`span`,{className:`text-github-danger`,children:[`−`,i]})]}):null,_=(0,F.jsxs)(`span`,{className:`flex flex-none items-center gap-1.5 rounded-full border bg-github-bg-secondary px-2 py-0.5 text-[11px] font-semibold ${m.pillClass}`,children:[(0,F.jsx)(h,{size:12}),m.pillLabel]}),v=m.isLive?(0,F.jsxs)(`span`,{className:`flex flex-none items-center gap-1 text-[11px] font-medium text-github-accent`,children:[(0,F.jsx)(Et,{size:11}),`Live`]}):null,y=async()=>{try{await bn(m.full),f(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>f(!1),1500)}catch{}};return l?(0,F.jsxs)(`div`,{role:`region`,"aria-label":`Diff context`,className:`border-b border-github-border bg-github-bg-secondary px-4 py-3`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-center gap-3`,children:[_,v,(0,F.jsxs)(`div`,{className:`flex flex-1 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-github-text-muted`,children:[m.metaExpanded,g]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>u(!1),className:`flex flex-none items-center gap-1 rounded px-2 py-1 text-xs text-github-text-secondary hover:bg-github-bg-tertiary hover:text-github-text-primary`,children:[`Collapse`,(0,F.jsx)(Ye,{size:13})]})]}),(0,F.jsx)(`div`,{className:`max-h-[150px] overflow-auto whitespace-pre-wrap rounded border border-github-border bg-github-bg-primary px-3 py-2 text-sm leading-relaxed text-github-text-primary`,children:m.full}),(0,F.jsx)(`div`,{className:`mt-2 flex gap-2`,children:(0,F.jsxs)(`button`,{type:`button`,onClick:()=>void y(),className:`flex items-center gap-1.5 rounded border border-github-border bg-github-bg-tertiary px-2.5 py-1 text-xs text-github-text-primary hover:border-github-text-muted`,children:[d?(0,F.jsx)(Ge,{size:13}):(0,F.jsx)(et,{size:13}),d?`Copied`:m.copyLabel]})})]}):(0,F.jsxs)(`div`,{role:`region`,"aria-label":`Diff context`,className:`flex items-center gap-3 border-b border-github-border bg-gradient-to-b ${m.stripTint} to-transparent px-4 py-2 text-sm`,children:[_,(a||o)&&(0,F.jsxs)(`div`,{className:`flex flex-none items-center gap-0.5`,children:[(0,F.jsx)(`button`,{type:`button`,"aria-label":`Previous turn or commit`,disabled:!s,onClick:a,className:`rounded p-1 text-github-text-secondary hover:bg-github-bg-tertiary disabled:opacity-30`,children:(0,F.jsx)(qe,{size:14})}),(0,F.jsx)(`button`,{type:`button`,"aria-label":`Next turn or commit`,disabled:!c,onClick:o,className:`rounded p-1 text-github-text-secondary hover:bg-github-bg-tertiary disabled:opacity-30`,children:(0,F.jsx)(Je,{size:14})})]}),v,(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-github-text-primary`,title:m.preview,children:m.preview}),(0,F.jsxs)(`div`,{className:`flex flex-none items-center gap-3 text-xs text-github-text-muted`,children:[m.meta,g]}),m.expandable&&(0,F.jsxs)(`button`,{type:`button`,onClick:()=>u(!0),className:`flex flex-none items-center gap-1 rounded px-2 py-1 text-xs text-github-text-secondary hover:bg-github-bg-tertiary hover:text-github-text-primary`,children:[`View more`,(0,F.jsx)(Ke,{size:13})]})]})}function Tn({tabs:e,activeTabId:t,onActivate:n,onClose:r,onNew:i}){return(0,F.jsxs)(`div`,{role:`tablist`,"aria-label":`Open workspaces`,className:`flex items-center gap-1 overflow-x-auto border-b border-github-border bg-github-bg-secondary px-2 py-1`,children:[e.map(e=>{let i=e.id===t,a=e.kind===`pr`?pt:ct;return(0,F.jsxs)(`div`,{role:`tab`,"aria-selected":i,"aria-label":e.label,tabIndex:0,onClick:()=>n(e.id),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e.id))},className:`group flex max-w-[200px] cursor-pointer items-center gap-1.5 rounded border px-2.5 py-1 text-xs transition-colors ${i?`border-github-accent bg-github-accent/10 text-github-text-primary`:`border-github-border bg-github-bg-tertiary text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,F.jsx)(a,{size:13,className:`shrink-0 text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap`,children:e.label}),(0,F.jsx)(`button`,{type:`button`,"aria-label":`Close ${e.label}`,onClick:t=>{t.stopPropagation(),r(e.id)},className:`ml-0.5 shrink-0 rounded p-0.5 text-github-text-muted opacity-60 hover:bg-github-bg-tertiary hover:text-github-text-primary group-hover:opacity-100`,children:(0,F.jsx)(Rt,{size:12})})]},e.id)}),(0,F.jsx)(`button`,{type:`button`,"aria-label":`Open a repo or PR`,title:`Open a repo or PR`,onClick:i,className:`sticky right-0 shrink-0 rounded bg-github-bg-secondary p-1 text-github-text-secondary hover:bg-github-bg-tertiary hover:text-github-text-primary`,children:(0,F.jsx)(Tt,{size:15})})]})}function En({commentsCount:e,isCopiedAll:t,onCopyAll:n,onDeleteAll:r,onViewAll:i,direction:a=`down`,compact:o=!1}){let[s,c]=(0,P.useState)(!1),l=(0,P.useRef)(null),u=o,d=a===`up`;(0,P.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let f=()=>{n(),c(!1)},p=()=>{r(),c(!1)},m=()=>{i?.(),c(!1)},h=u?t?`Copied`:`Copy All (${e})`:t?`Copied All!`:`Copy All Prompt (${e})`;return(0,F.jsxs)(`div`,{className:`relative`,ref:l,children:[(0,F.jsxs)(`div`,{className:`flex`,children:[(0,F.jsxs)(`button`,{onClick:f,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${u?`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:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},title:`Copy all ${e} comments to AI coding agent`,children:[t?(0,F.jsx)(Ge,{size:12}):(0,F.jsx)(et,{size:12}),h]}),(0,F.jsx)(`button`,{onClick:()=>c(!s),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:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},title:`More options`,children:(0,F.jsx)(Ke,{size:12,className:`transition-transform duration-200 ${s?`rotate-180`:``}`})})]}),s&&(0,F.jsxs)(`div`,{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${d?`bottom-full rounded-t`:`top-full rounded-b`}`,style:{borderTop:d?void 0:`none`,borderBottom:d?`none`:void 0},children:[i&&(0,F.jsxs)(`button`,{onClick:m,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:[(0,F.jsx)(vt,{size:12}),`View All Comments`]}),(0,F.jsxs)(`button`,{onClick:p,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:[(0,F.jsx)(tt,{size:12}),`Cleanup All Prompt`]})]})]})}function Dn(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function On(e){let t=[],n=/```suggestion\n([\s\S]*?)```/g,r;for(;(r=n.exec(e))!==null;)t.push({suggestedCode:r[1].replace(/\n$/,``),startIndex:r.index,endIndex:r.index+r[0].length});return t}function kn(e){return`\`\`\`suggestion\n${e.endsWith(`
|
|
11
|
+
`)?e:e+`
|
|
12
|
+
`}\`\`\``}var An=(0,P.createContext)({getOldTokens:null,getNewTokens:null});function jn({value:e,children:t}){return(0,F.jsx)(An.Provider,{value:e,children:t})}function Mn(){return(0,P.useContext)(An)}var Nn=2,Pn=100;function Fn(e){return!(e.length<Nn||e.length>Pn)}function In(e){return e.toLowerCase()}function Ln(e){let t=e.trim();return t?t.match(/^\w+$/)!==null&&Fn(t):!1}var Rn=200,zn=(0,P.createContext)(void 0);function Bn({children:e}){let[t,n]=(0,P.useState)(null),r=(0,P.useRef)(null),i=(0,P.useCallback)(()=>{r.current&&=(clearTimeout(r.current),null)},[]),a=(0,P.useCallback)(e=>{let t=e.target;if(!t.classList.contains(`word-token`))return;i();let a=t.getAttribute(`data-word`);a&&(r.current=setTimeout(()=>{n(a)},Rn))},[i]),o=(0,P.useCallback)(()=>{i(),n(null)},[i]),s=(0,P.useCallback)(e=>t?In(e)===In(t):!1,[t]);(0,P.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);let c=(0,P.useMemo)(()=>({highlightedWord:t,handleMouseOver:a,handleMouseOut:o,isWordHighlighted:s}),[t,a,o,s]);return(0,F.jsx)(zn.Provider,{value:c,children:e})}function Vn(){let e=(0,P.useContext)(zn);if(!e)throw Error(`useWordHighlight must be used within a WordHighlightProvider`);return e}function Hn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Un(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hn(e))&&(r&&(r+=` `),r+=t);return r}var Wn=Object.create,Gn=Object.defineProperty,Kn=Object.defineProperties,qn=Object.getOwnPropertyDescriptor,Jn=Object.getOwnPropertyDescriptors,Yn=Object.getOwnPropertyNames,Xn=Object.getOwnPropertySymbols,Zn=Object.getPrototypeOf,Qn=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,er=(e,t,n)=>t in e?Gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tr=(e,t)=>{for(var n in t||={})Qn.call(t,n)&&er(e,n,t[n]);if(Xn)for(var n of Xn(t))$n.call(t,n)&&er(e,n,t[n]);return e},nr=(e,t)=>Kn(e,Jn(t)),rr=(e,t)=>{var n={};for(var r in e)Qn.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xn)for(var r of Xn(e))t.indexOf(r)<0&&$n.call(e,r)&&(n[r]=e[r]);return n},ir=(e,t)=>function(){return t||(0,e[Yn(e)[0]])((t={exports:{}}).exports,t),t.exports},ar=(e,t)=>{for(var n in t)Gn(e,n,{get:t[n],enumerable:!0})},or=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Yn(t))!Qn.call(e,i)&&i!==n&&Gn(e,i,{get:()=>t[i],enumerable:!(r=qn(t,i))||r.enumerable});return e},B=((e,t,n)=>(n=e==null?{}:Wn(Zn(e)),or(t||!e||!e.__esModule?Gn(n,`default`,{value:e,enumerable:!0}):n,e)))(ir({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&`).replace(/</g,`<`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){n||={};var i,a;switch(r.util.type(t)){case`Object`:if(a=r.util.objId(t),n[a])return n[a];for(var o in i={},n[a]=i,t)t.hasOwnProperty(o)&&(i[o]=e(t[o],n));return i;case`Array`:return a=r.util.objId(t),n[a]?n[a]:(i=[],n[a]=i,t.forEach(function(t,r){i[r]=e(t,n)}),i);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return`none`},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,`gi`),``),t.classList.add(`language-`+n)},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var i in t)n[i]=t[i];return n},insertBefore:function(e,t,n,i){i||=r.languages;var a=i[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=i[e];return i[e]=o,r.languages.DFS(r.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,i,a){a||={};var o=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],i||s);var c=t[s],l=r.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};if(r.hooks.run(`before-tokenize`,a),!a.grammar)throw Error(`The language "`+a.language+`" has no grammar.`);return a.tokens=r.tokenize(a.code,a.grammar),r.hooks.run(`after-tokenize`,a),i.stringify(r.util.encode(a.tokens),a.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new s;return c(i,i.head,e),o(e,i,t,i.head,0),u(i)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(!(!n||!n.length))for(var i=0,a;a=n[i++];)a(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}i.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var i=``;return t.forEach(function(t){i+=e(t,n)}),i}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),r.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`"`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function a(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function o(e,t,n,s,u,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=s.next,C=u;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof i)){var T=1,E;if(v){if(E=a(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof i)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=a(x,0,w,_),!E)continue;var D=E.index,j=E[0],M=w.slice(0,D),N=w.slice(D+j.length),ee=C+w.length;d&&ee>d.reach&&(d.reach=ee);var te=S.prev;M&&(te=c(t,te,M),C+=M.length),l(t,te,T);var P=new i(f,g?r.tokenize(j,g):j,y,j);if(S=c(t,te,P),N&&c(t,S,N),T>1){var F={cause:f+`,`+m,reach:ee};o(e,t,n,S.prev,C,F),d&&F.reach>d.reach&&(d.reach=F.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function l(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function u(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}return r}();t.exports=n,n.default=n}})());B.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]},B.languages.markup.tag.inside[`attr-value`].inside.entity=B.languages.markup.entity,B.languages.markup.doctype.inside[`internal-subset`].inside=B.languages.markup,B.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&/,`&`))}),Object.defineProperty(B.languages.markup.tag,"addInlined",{value:function(e,t){var n={},n=(n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:B.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),t=(n[`language-`+t]={pattern:/[\s\S]+/,inside:B.languages[t]},{});t[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:n},B.languages.insertBefore(`markup`,`cdata`,t)}}),Object.defineProperty(B.languages.markup.tag,"addAttribute",{value:function(e,t){B.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:B.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),B.languages.html=B.languages.markup,B.languages.mathml=B.languages.markup,B.languages.svg=B.languages.markup,B.languages.xml=B.languages.extend(`markup`,{}),B.languages.ssml=B.languages.xml,B.languages.atom=B.languages.xml,B.languages.rss=B.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:`escape`},n=/\\(?: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]|.)/,r=`(?:[^\\\\-]|`+n.source+`)`,r=RegExp(r+`-`+r),i={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:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:`operator`}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:`class-name`},escape:n}},"special-escape":t,"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":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:`function`},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:`punctuation`,inside:{"group-name":i}},{pattern:/\)/,alias:`punctuation`}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:`number`},alternation:{pattern:/\|/,alias:`keyword`}}}(B),B.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:/[{}[\];(),.:]/},B.languages.javascript=B.languages.extend(`clike`,{"class-name":[B.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$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),B.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,B.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:B.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:B.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:B.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:B.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:B.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),B.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:B.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`}}),B.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),B.languages.markup&&(B.languages.markup.tag.addInlined(`script`,`javascript`),B.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)`,`javascript`)),B.languages.js=B.languages.javascript,B.languages.actionscript=B.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),B.languages.actionscript[`class-name`].alias=`function`,delete B.languages.actionscript.parameter,delete B.languages.actionscript[`literal-property`],B.languages.markup&&B.languages.insertBefore(`actionscript`,`string`,{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:B.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:`variable`};e.languages.coffeescript=e.languages.extend(`javascript`,{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],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:t,interpolation:n}}}),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:n}}]}),e.languages.insertBefore(`coffeescript`,`keyword`,{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript[`template-string`],e.languages.coffee=e.languages.coffeescript}(B),function(e){var t=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(t,"addSupport",{value:function(t,n){(t=typeof t==`string`?[t]:t).forEach(function(t){var r=function(e){e.inside||={},e.inside.rest=n},i=`doc-comment`;if(a=e.languages[t]){var a,o=a[i];if((o||=(a=e.languages.insertBefore(t,`comment`,{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:`comment`}}))[i])instanceof RegExp&&(o=a[i]={pattern:o}),Array.isArray(o))for(var s=0,c=o.length;s<c;s++)o[s]instanceof RegExp&&(o[s]={pattern:o[s]}),r(o[s]);else r(o)}})}}),t.addSupport([`java`,`javascript`,`php`],t)}(B),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),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\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,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);t&&(t.tag.addInlined(`style`,`css`),t.tag.addAttribute(`style`,`css`))}(B),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.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":[t,{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=t,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}),n={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:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(B),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r=`(?:`+n.source+`(?:[ ]+`+t.source+`)?|`+t.source+`(?:[ ]+`+n.source+`)?)`,i=`(?:[^\\s\\x00-\\x08\\x0e-\\x1f!"#%&'*,\\-:>?@[\\]\`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*`.replace(/<PLAIN>/g,function(){return`[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]`}),a=`"(?:[^"\\\\\\r\\n]|\\\\.)*"|'(?:[^'\\\\\\r\\n]|\\\\.)*'`;function o(e,t){t=(t||``).replace(/m/g,``)+`m`;var n=`([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))`.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)`.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)`.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return`(?:`+i+`|`+a+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:o(`\\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*)?)?`),lookbehind:!0,alias:`number`},boolean:{pattern:o(`false|true`,`i`),lookbehind:!0,alias:`important`},null:{pattern:o(`null|~`,`i`),lookbehind:!0,alias:`important`},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(`[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)`,`i`),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(B),function(e){var t=`(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))`;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(`((?:^|[^\\\\])(?:\\\\{2})*)(?:`+e+`)`)}var r="(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+",i=`\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))`.replace(/__/g,function(){return r}),a=`\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)`,o=(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(`^`+i+a+`(?:`+i+`)*`,`m`),inside:{"table-data-rows":{pattern:RegExp(`^(`+i+a+`)(?:`+i+`)*$`),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp(`^(`+i+`)`+a+`$`),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp(`^`+i+`$`),inside:{"table-header":{pattern:RegExp(r),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:n(`\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(`\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(`(~~?)(?:(?!~)<inner>)+\\2`),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:n(`!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])`),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(t){[`url`,`bold`,`italic`,`strike`,`code-snippet`].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add(`after-tokenize`,function(e){e.language!==`markdown`&&e.language!==`md`||function e(t){if(t&&typeof t!=`string`)for(var n=0,r=t.length;n<r;n++){var i,a=t[n];a.type===`code`?(i=a.content[1],a=a.content[3],i&&a&&i.type===`code-language`&&a.type===`code-block`&&typeof i.content==`string`&&(i=i.content.replace(/\b#/g,`sharp`).replace(/\b\+\+/g,`pp`),i=`language-`+(i=(/[a-z][\w-]*/i.exec(i)||[``])[0].toLowerCase()),a.alias?typeof a.alias==`string`?a.alias=[a.alias,i]:a.alias.push(i):a.alias=[i])):e(a.content)}}(e.tokens)}),e.hooks.add(`wrap`,function(t){if(t.type===`code-block`){for(var n=``,r=0,i=t.classes.length;r<i;r++){var a=t.classes[r],a=/language-(.+)/.exec(a);if(a){n=a[1];break}}var l,u=e.languages[n];u?t.content=e.highlight(function(e){return e=e.replace(o,``),e=e.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;return(t=t.toLowerCase())[0]===`#`?(n=t[1]===`x`?parseInt(t.slice(2),16):Number(t.slice(1)),c(n)):s[t]||e})}(t.content),u,n):n&&n!==`none`&&e.plugins.autoloader&&(l=`md-`+new Date().valueOf()+`-`+Math.floor(0x2386f26fc10000*Math.random()),t.attributes.id=l,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(l);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}),RegExp(e.languages.markup.tag.pattern.source,`gi`)),s={amp:`&`,lt:`<`,gt:`>`,quot:`"`},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(B),B.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:B.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+/},B.hooks.add(`after-tokenize`,function(e){if(e.language===`graphql`)for(var t=e.tokens.filter(function(e){return typeof e!=`string`&&e.type!==`comment`&&e.type!==`scalar`}),n=0;n<t.length;){var r=t[n++];if(r.type===`keyword`&&r.content===`mutation`){var i=[];if(d([`definition-mutation`,`punctuation`])&&u(1).content===`(`){n+=2;var a=f(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=u(0);o.type===`variable`&&(p(o,`variable-input`),i.push(o.content))}n=a+1}if(d([`punctuation`,`property-query`])&&u(0).content===`{`&&(n++,p(u(0),`property-mutation`),0<i.length)){var s=f(/^\{$/,/^\}$/);if(s!==-1)for(var c=n;c<s;c++){var l=t[c];l.type===`variable`&&0<=i.indexOf(l.content)&&p(l,`variable-input`)}}}}function u(e){return t[n+e]}function d(e,t){t||=0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function f(e,r){for(var i=1,a=n;a<t.length;a++){var o=t[a],s=o.content;if(o.type===`punctuation`&&typeof s==`string`){if(e.test(s))i++;else if(r.test(s)&&--i===0)return a}}return-1}function p(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}}),B.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 t=e.languages.javascript[`template-string`],n=t.pattern.source,r=t.inside.interpolation,i=r.inside[`interpolation-punctuation`],a=r.pattern.source;function o(t,r){if(e.languages[t])return{pattern:RegExp(`((?:`+r+`)\\s*)`+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run(`before-tokenize`,t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run(`after-tokenize`,t),t.tokens}function c(t,n,o){var c=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),l=0,u={},c=s(c.map(function(e){if(typeof e==`string`)return e;for(var n,r,e=e.content;t.indexOf((r=l++,n=`___`+o.toUpperCase()+`_`+r+`___`))!==-1;);return u[n]=e,n}).join(``),n,o),d=Object.keys(u);return l=0,function t(n){for(var a=0;a<n.length;a++){if(l>=d.length)return;var o,c,f,p,m,h,g,_=n[a];typeof _==`string`||typeof _.content==`string`?(o=d[l],(g=(h=typeof _==`string`?_:_.content).indexOf(o))!==-1&&(++l,c=h.substring(0,g),m=u[o],f=void 0,(p={})[`interpolation-punctuation`]=i,(p=e.tokenize(m,p)).length===3&&((f=[1,1]).push.apply(f,s(p[1],e.languages.javascript,`javascript`)),p.splice.apply(p,f)),f=new e.Token(`interpolation`,p,r.alias,m),p=h.substring(g+o.length),m=[],c&&m.push(c),m.push(f),p&&(t(h=[p]),m.push.apply(m,h)),typeof _==`string`?(n.splice.apply(n,[a,1].concat(m)),a+=m.length-1):_.content=m)):(g=_.content,t(Array.isArray(g)?g:[g]))}}(c),new e.Token(o,c,`language-`+o,t)}e.languages.javascript[`template-string`]=[o(`css`,`\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)`),o(`html`,`\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?=`),o(`svg`,`\\bsvg`),o(`markdown`,`\\b(?:markdown|md)`),o(`graphql`,`\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)`),o(`sql`,`\\bsql`),t].filter(Boolean);var l={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return typeof e==`string`?e:Array.isArray(e)?e.map(u).join(``):u(e.content)}e.hooks.add(`after-tokenize`,function(t){t.language in l&&function t(n){for(var r=0,i=n.length;r<i;r++){var a,o,s,l=n[r];typeof l!=`string`&&(a=l.content,Array.isArray(a)?l.type===`template-string`?(l=a[1],a.length===3&&typeof l!=`string`&&l.type===`embedded-code`&&(o=u(l),l=l.alias,l=Array.isArray(l)?l[0]:l,s=e.languages[l])&&(a[1]=c(o,s,l))):t(a):typeof a!=`string`&&t([a]))}}(t.tokens)})}(B),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 t=e.languages.extend(`typescript`,{});delete t[`class-name`],e.languages.typescript[`class-name`].inside=t,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:t}}}}),e.languages.ts=e.languages.typescript}(B),function(e){var t=e.languages.javascript,n=`\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})+\\}`,r=`(@(?:arg|argument|param|property)\\s+(?:`+n+`\\s+)?)`;e.languages.jsdoc=e.languages.extend(`javadoclike`,{parameter:{pattern:RegExp(r+`(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?=\\s|$)`),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore(`jsdoc`,`keyword`,{"optional-parameter":{pattern:RegExp(r+`\\[(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?:=[^[\\]]+)?\\](?=\\s|$)`),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,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*)*`.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp(`(@[a-z]+\\s+)`+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.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:t,alias:`language-javascript`}}}}),e.languages.javadoclike.addSupport(`javascript`,e.languages.jsdoc)}(B),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})}(B),B.languages.n4js=B.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/}),B.languages.insertBefore(`n4js`,`constant`,{annotation:{pattern:/@+\w+/,alias:`operator`}}),B.languages.n4jsd=B.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,function(){return`(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*`}),t)}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:t(`(\\bimport\\b\\s*)(?:<ID>(?:\\s*,\\s*(?:\\*\\s*as\\s+<ID>|\\{[^{}]*\\}))?|\\*\\s*as\\s+<ID>|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)`),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(`(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+<ID>)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})`),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:t(`(\\.\\s*)#?<ID>`),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 n=[`function`,`function-variable`,`method`,`method-variable`,`property-access`],r=0;r<n.length;r++){var i=n[r],a=e.languages.javascript[i],i=(a=e.util.type(a)===`RegExp`?e.languages.javascript[i]={pattern:a}:a).inside||{};(a.inside=i)[`maybe-class-name`]=/^[A-Z][\s\S]*/}}(B),function(e){var t=e.util.clone(e.languages.javascript),n=`(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)`,r=`(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})`,i=`(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})`;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,e.languages.jsx=e.languages.extend(`markup`,t),e.languages.jsx.tag.pattern=a(`<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[\\s\\S]|[^\\\\"])*"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>`),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=t.comment,e.languages.insertBefore(`inside`,`attr-name`,{spread:{pattern:a(`<SPREAD>`),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore(`inside`,`special-attr`,{script:{pattern:a(`=<BRACES>`),alias:`language-javascript`,inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:`punctuation`},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],a=!1;typeof i!=`string`&&(i.type===`tag`&&i.content[0]&&i.content[0].type===`tag`?i.content[0].content[0].content===`</`?0<n.length&&n[n.length-1].tagName===s(i.content[0].content[1])&&n.pop():i.content[i.content.length-1].content!==`/>`&&n.push({tagName:s(i.content[0].content[1]),openedBraces:0}):0<n.length&&i.type===`punctuation`&&i.content===`{`?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&i.type===`punctuation`&&i.content===`}`?n[n.length-1].openedBraces--:a=!0),(a||typeof i==`string`)&&0<n.length&&n[n.length-1].openedBraces===0&&(a=s(i),r<t.length-1&&(typeof t[r+1]==`string`||t[r+1].type===`plain-text`)&&(a+=s(t[r+1]),t.splice(r+1,1)),0<r&&(typeof t[r-1]==`string`||t[r-1].type===`plain-text`)&&(a=s(t[r-1])+a,t.splice(r-1,1),r--),t[r]=new e.Token(`plain-text`,a,null,a)),i.content&&typeof i.content!=`string`&&o(i.content)}}var s=function(e){return e?typeof e==`string`?e:typeof e.content==`string`?e.content:e.content.map(s).join(``):``};e.hooks.add(`after-tokenize`,function(e){e.language!==`jsx`&&e.language!==`tsx`||o(e.tokens)})}(B),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend(`jsx`,t),delete e.languages.tsx.parameter,delete e.languages.tsx[`literal-property`],e.languages.tsx.tag);t.pattern=RegExp(`(^|[^\\w$]|(?=<\\/))(?:`+t.pattern.source+`)`,t.pattern.flags),t.lookbehind=!0}(B),B.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(`(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:`punctuation`},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(`(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:`punctuation`},string:/[\s\S]+/}}],directive:{pattern:RegExp(`#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)`),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:/[{}[\]();,.:\\]/},B.languages.swift[`string-literal`].forEach(function(e){e.inside.interpolation.inside=B.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 t={"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:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:`singleline`,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},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}(B),B.languages.c=B.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|[?:~]|[-+*/%&|^!=<>]=?/}),B.languages.insertBefore(`c`,`string`,{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),B.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},B.languages.c.string],char:B.languages.c.char,comment:B.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:B.languages.c}}}}),B.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 B.languages.c.boolean,B.languages.objectivec=B.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 B.languages.objectivec[`class-name`],B.languages.objc=B.languages.objectivec,B.languages.reason=B.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/}),B.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 B.languages.reason.function,function(e){for(var t=`\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/`,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return`[^\\s\\S]`}),e.languages.rust={comment:[{pattern:RegExp(`(^|[^\\\\])`+t),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}(B),B.languages.go=B.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/}),B.languages.insertBefore(`go`,`string`,{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete B.languages.go[`class-name`],function(e){var t=/\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/,n=`\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b`.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend(`c`,{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+`.replace(/<keyword>/g,function(){return t.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:t,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+)(?:"(?:\\\\(?:\\r\\n|[\\s\\S])|[^"\\\\\\r\\n])*"|<[^<>\\r\\n]*>|`+`<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>`.replace(/<mod-name>/g,function(){return n})+`)`),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`])}(B),B.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://,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:/[{}[\];(),.:]/},B.languages.python[`string-interpolation`].inside.interpolation.inside.rest=B.languages.python,B.languages.py=B.languages.python,B.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`}},B.languages.webmanifest=B.languages.json;var sr={};ar(sr,{dracula:()=>cr,duotoneDark:()=>lr,duotoneLight:()=>ur,github:()=>dr,gruvboxMaterialDark:()=>Dr,gruvboxMaterialLight:()=>Or,jettwaveDark:()=>Cr,jettwaveLight:()=>wr,nightOwl:()=>fr,nightOwlLight:()=>pr,oceanicNext:()=>hr,okaidia:()=>gr,oneDark:()=>Tr,oneLight:()=>Er,palenight:()=>_r,shadesOfPurple:()=>vr,synthwave84:()=>yr,ultramin:()=>br,vsDark:()=>xr,vsLight:()=>Sr});var cr={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)`}}]},lr={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`}}]},ur={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`}}]},dr={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`}}]},fr={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)`}}]},pr={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)`}}]},mr={char:`#D8DEE9`,comment:`#999999`,keyword:`#c5a5c5`,primitive:`#5a9bcf`,string:`#8dc891`,variable:`#d7deea`,boolean:`#ff8b50`,punctuation:`#5FB3B3`,tag:`#fc929e`,function:`#79b6f2`,className:`#FAC863`,method:`#6699CC`,operator:`#fc929e`},hr={plain:{backgroundColor:`#282c34`,color:`#ffffff`},styles:[{types:[`attr-name`],style:{color:mr.keyword}},{types:[`attr-value`],style:{color:mr.string}},{types:[`comment`,`block-comment`,`prolog`,`doctype`,`cdata`,`shebang`],style:{color:mr.comment}},{types:[`property`,`number`,`function-name`,`constant`,`symbol`,`deleted`],style:{color:mr.primitive}},{types:[`boolean`],style:{color:mr.boolean}},{types:[`tag`],style:{color:mr.tag}},{types:[`string`],style:{color:mr.string}},{types:[`punctuation`],style:{color:mr.string}},{types:[`selector`,`char`,`builtin`,`inserted`],style:{color:mr.char}},{types:[`function`],style:{color:mr.function}},{types:[`operator`,`entity`,`url`,`variable`],style:{color:mr.variable}},{types:[`keyword`],style:{color:mr.keyword}},{types:[`atrule`,`class-name`],style:{color:mr.className}},{types:[`important`],style:{fontWeight:`400`}},{types:[`bold`],style:{fontWeight:`bold`}},{types:[`italic`],style:{fontStyle:`italic`}},{types:[`namespace`],style:{opacity:.7}}]},gr={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`}}]},_r={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)`}}]},vr={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)`}}]},yr={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`}}]},br={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)`}}]},xr={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)`}}]},Sr={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)`}}]},Cr={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`}}]},wr={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`}}]},Tr={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%)`}}]},Er={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%)`}}]},Dr={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`}}]},Or={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`}}]},kr=e=>(0,P.useCallback)(t=>{var n=t,{className:r,style:i,line:a}=n;let o=nr(tr({},rr(n,[`className`,`style`,`line`])),{className:Un(`token-line`,r)});return typeof e==`object`&&`plain`in e&&(o.style=e.plain),typeof i==`object`&&(o.style=tr(tr({},o.style||{}),i)),o},[e]),Ar=e=>{let t=(0,P.useCallback)(({types:t,empty:n})=>{if(e!=null)return t.length===1&&t[0]===`plain`?n==null?void 0:{display:`inline-block`}:t.length===1&&n!=null?e[t[0]]:Object.assign(n==null?{}:{display:`inline-block`},...t.map(t=>e[t]))},[e]);return(0,P.useCallback)(e=>{var n=e,{token:r,className:i,style:a}=n;let o=nr(tr({},rr(n,[`token`,`className`,`style`])),{className:Un(`token`,...r.types,i),children:r.content,style:t(r)});return a!=null&&(o.style=tr(tr({},o.style||{}),a)),o},[t])},jr=/\r\n|\r|\n/,Mr=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)},Nr=(e,t)=>{let n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Pr=e=>{let t=[[]],n=[e],r=[0],i=[e.length],a=0,o=0,s=[],c=[s];for(;o>-1;){for(;(a=r[o]++)<i[o];){let e,l=t[o],u=n[o][a];if(typeof u==`string`?(l=o>0?l:[`plain`],e=u):(l=Nr(l,u.type),u.alias&&(l=Nr(l,u.alias)),e=u.content),typeof e!=`string`){o++,t.push(l),n.push(e),r.push(0),i.push(e.length);continue}let d=e.split(jr),f=d.length;s.push({types:l,content:d[0]});for(let e=1;e<f;e++)Mr(s),c.push(s=[]),s.push({types:l,content:d[e]})}o--,t.pop(),n.pop(),r.pop(),i.pop()}return Mr(s),c},Fr=({prism:e,code:t,grammar:n,language:r})=>(0,P.useMemo)(()=>{if(n==null)return Pr([t]);let i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run(`before-tokenize`,i),i.tokens=e.tokenize(t,n),e.hooks.run(`after-tokenize`,i),Pr(i.tokens)},[t,n,r,e]),Ir=(e,t)=>{let{plain:n}=e,r=e.styles.reduce((e,n)=>{let{languages:r,style:i}=n;return r&&!r.includes(t)||n.types.forEach(t=>{e[t]=tr(tr({},e[t]),i)}),e},{});return r.root=n,r.plain=nr(tr({},n),{backgroundColor:void 0}),r},Lr=({children:e,language:t,code:n,theme:r,prism:i})=>{let a=t.toLowerCase(),o=Ir(r,a),s=kr(o),c=Ar(o),l=i.languages[a];return e({tokens:Fr({prism:i,language:a,code:n,grammar:l}),className:`prism-code language-${a}`,style:o==null?{}:o.root,getLineProps:s,getTokenProps:c})},Rr=e=>(0,P.createElement)(Lr,nr(tr({},e),{prism:e.prism||B,theme:e.theme||xr,code:e.code,language:e.language})),zr=`modulepreload`,Br=function(e){return`/`+e},Vr={},Hr=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Br(t,n),t in Vr)return;Vr[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:zr,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ur={};function Wr(e){if(!Ur[e]){let t={bash:()=>Hr(()=>import(`./prism-bash-D6zCJ74D.js`),[]),sh:()=>Hr(()=>import(`./prism-bash-D6zCJ74D.js`),[]),shell:()=>Hr(()=>import(`./prism-bash-D6zCJ74D.js`),[]),php:async()=>(await Hr(()=>import(`./prism-markup-templating-KkSMBj6Y.js`),[]),Hr(()=>import(`./prism-php-Co4fM40K.js`),[])),sql:()=>Hr(()=>import(`./prism-sql-CYhVDMEE.js`),[]),ruby:()=>Hr(()=>import(`./prism-ruby-DFCASkuD.js`),[]),java:()=>Hr(()=>import(`./prism-java-6wtusvIl.js`),[]),scala:async()=>(await Wr(`java`),Hr(()=>import(`./prism-scala-VkM3wCOL.js`),[])),solidity:()=>Hr(()=>import(`./prism-solidity-DTom4k5p.js`),[]),vim:()=>Hr(()=>import(`./prism-vim-BgpkjCK5.js`),[]),dart:()=>Hr(()=>import(`./prism-dart-CDv16Fbu.js`),[]),csharp:()=>Hr(()=>import(`./prism-csharp-XPn2bw0d.js`),[]),protobuf:()=>Hr(()=>import(`./prism-protobuf-yzSHlhwy.js`),[]),hcl:()=>Hr(()=>import(`./prism-hcl-B6Z0Ouoo.js`),[]),perl:()=>Hr(()=>import(`./prism-perl-Lsbi34sH.js`),[]),elixir:()=>Hr(()=>import(`./prism-elixir-DhHhV5Rj.js`),[]),nix:()=>Hr(()=>import(`./prism-nix-C88dTX93.js`),[]),haskell:()=>Hr(()=>import(`./prism-haskell-5hq1Nh9c.js`),[]),clojure:()=>Hr(()=>import(`./prism-clojure-_z-zoNcE.js`),[])}[e];if(!t)return console.warn(`No loader available for language: ${e}`),Promise.reject(Error(`Unsupported language: ${e}`));Ur[e]=t().then(()=>void 0).catch(t=>{throw delete Ur[e],console.warn(`Failed to load language: ${e}`,t),t})}return Ur[e]}typeof global<`u`?global.Prism=B:typeof window<`u`&&(window.Prism=B);var Gr=B,Kr=`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`.split(`.`);function qr(e,t){let[n,r]=(0,P.useState)(()=>Kr.includes(t)||!!Gr.languages[t]);return(0,P.useEffect)(()=>{if(!n){if(Kr.includes(t)){r(!0);return}Wr(t).then(()=>{r(!0)}).catch(()=>{r(!1)})}},[t,n]),{ready:n,actualLang:n?t:`text`}}function Jr(e){return e&&e.split(`.`).pop()?.toLowerCase()||null}function Yr(e){return e&&e.split(`/`).pop()||``}var Xr={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`,vue:`html`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,md:`markdown`,markdown:`markdown`,tex:`latex`,vim:`vim`,ex:`elixir`,exs:`elixir`,heex:`elixir`,nix:`nix`,hs:`haskell`,lhs:`haskell`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,edn:`clojure`},Zr={ts:`typescript`,tsx:`tsx`,mts:`typescript`,cts:`typescript`,js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,json:`json`,css:`css`,scss:`css`,html:`html`,vue:`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`,nix:`nix`,hs:`haskell`,lhs:`haskell`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,edn:`clojure`},Qr={dockerfile:`docker`,makefile:`makefile`,".gitignore":`git`,".env":`bash`,".bashrc":`bash`,".zshrc":`bash`,".bash_profile":`bash`,".profile":`bash`};function $r(e,t){if(e)return t[e.toLowerCase()]}function ei(e){return $r(Jr(e),Xr)}function ti(e){return Qr[Yr(e).toLowerCase()]||$r(Jr(e),Zr)||`text`}var ni=new Set([`vue`,`svelte`,`astro`]);function ri(e){let t=Jr(e);return t!=null&&ni.has(t)}function ii(e){return{...e,styles:e.styles.map(e=>({...e,style:{...e.style,background:void 0,backgroundColor:void 0}}))}}function ai(e){let t;switch(e){case`github`:t=sr.github;break;case`vsLight`:t=sr.vsLight;break;case`oneLight`:t=sr.oneLight;break;case`gruvboxMaterialLight`:t=sr.gruvboxMaterialLight;break;case`nightOwlLight`:t=sr.nightOwlLight;break;case`vsDark`:t=sr.vsDark;break;case`oneDark`:t=sr.oneDark;break;case`gruvboxMaterialDark`:t=sr.gruvboxMaterialDark;break;case`nightOwl`:t=sr.nightOwl;break;case`dracula`:t=sr.dracula;break;case`okaidia`:t=sr.okaidia;break;default:t=sr.vsDark}return ii(t)}var oi=P.memo(function({code:e,language:t,className:n,syntaxTheme:r=`vsDark`,filename:i=``,precomputedTokens:a,renderToken:o,onMouseOver:s,onMouseOut:c}){let{actualLang:l}=qr(e,t||(i?ti(i):`text`)),u=ai(r),d=!!a,f=(0,P.useCallback)(({style:e,tokens:t,getLineProps:r,getTokenProps:i})=>{let l=a??t;return(0,F.jsx)(`span`,{className:n,style:{...e,background:`transparent`,backgroundColor:`transparent`},onMouseOver:s,onMouseOut:c,children:l.map((e,t)=>(0,F.jsx)(`span`,{...r({line:e}),children:e.map((e,t)=>o?o(e,t,i):(0,F.jsx)(`span`,{...i({token:e})},t))},t))})},[n,s,c,o,a]);return(0,F.jsx)(Rr,{code:d?``:e,language:l,theme:u,prism:Gr,children:f})}),si=P.memo(function(e){let{handleMouseOver:t,handleMouseOut:n,isWordHighlighted:r}=Vn(),i=(0,P.useCallback)((e,t,n)=>{let i=n({token:e}),a=e.content.split(/( +)/);if(a.length===1&&a[0]&&!Ln(a[0]))return(0,F.jsx)(`span`,{...i},t);let o=a.map((e,n)=>{if(!e)return null;if(Ln(e)){let i=e.trim();return(0,F.jsx)(`span`,{className:`word-token ${r(i)?`word-highlight`:``}`,"data-word":i,children:e},`${t}-${n}`)}return(0,F.jsx)(`span`,{children:e},`${t}-${n}`)});return(0,F.jsx)(`span`,{...i,children:o},t)},[r]);return(0,F.jsx)(oi,{...e,renderToken:i,onMouseOver:t,onMouseOut:n})}),ci=P.memo(function({segments:e,className:t=``}){return(0,F.jsx)(`span`,{className:t,children:(0,P.useMemo)(()=>e.map((e,t)=>(0,F.jsx)(`span`,{className:e.type===`added`?`word-diff-added`:e.type===`removed`?`word-diff-removed`:``,children:e.value},t)),[e])})}),li=e=>{switch(e){case`add`:return`+`;case`delete`:return`-`;default:return` `}},ui=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 di({line:e,syntaxTheme:t,filename:n,diffSegments:r,showPrefixBorder:i=!0}){let{getOldTokens:a,getNewTokens:o}=Mn();return(0,F.jsxs)(`div`,{className:`flex items-center relative min-h-[16px]`,children:[(0,F.jsx)(`span`,{className:`w-5 text-center flex-shrink-0 ${i?`border-r border-github-border`:``} ${ui(e.type)}`,children:li(e.type)}),(0,F.jsx)(`span`,{"data-diff-search-text":`true`,style:{display:`contents`},children:r?(0,F.jsx)(ci,{segments:r,className:`flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,F.jsx)(si,{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:t,filename:n,precomputedTokens:(()=>{let t=e.oldLineNumber==null?null:a?.(e.oldLineNumber)??null;if(e.type===`delete`)return t?[t]:null;let n=e.newLineNumber==null?t:o?.(e.newLineNumber)??null;return n?[n]:null})()})})]})}var fi=e=>e===`add`?`bg-diff-addition-bg`:`bg-diff-deletion-bg`,pi=(e,t)=>({type:e,content:t});function mi({code:e,type:t,filename:n,keyPrefix:r,syntaxTheme:i}){return(0,F.jsx)(F.Fragment,{children:e.split(`
|
|
15
|
+
`).map((e,a)=>(0,F.jsx)(`div`,{className:fi(t),children:(0,F.jsx)(di,{line:pi(t,e),filename:n,syntaxTheme:i,showPrefixBorder:!1})},`${r}-${a}`))})}function hi(e){return Dn(e)}function gi({body:e,originalCode:t,filename:n,syntaxTheme:r}){return(0,F.jsx)(`div`,{className:`text-github-text-primary text-sm leading-6`,children:(0,P.useMemo)(()=>{let n=On(e);if(n.length===0)return[{type:`text`,content:e}];let r=[],i=0;for(let a of n)a.startIndex>i&&r.push({type:`text`,content:e.slice(i,a.startIndex)}),r.push({type:`suggestion`,code:a.suggestedCode,original:t||``}),i=a.endIndex;return i<e.length&&r.push({type:`text`,content:e.slice(i)}),r},[e,t]).map((e,t)=>e.type===`text`?(0,F.jsx)(`span`,{className:`whitespace-pre-wrap`,children:e.content},t):(0,F.jsx)(`div`,{className:`my-2 border border-github-border rounded-md overflow-hidden`,children:(0,F.jsxs)(`div`,{className:`font-mono text-sm`,children:[e.original&&(0,F.jsx)(mi,{code:e.original,type:`delete`,filename:n,keyPrefix:`orig-${t}`,syntaxTheme:r}),(0,F.jsx)(mi,{code:e.code,type:`add`,filename:n,keyPrefix:`sugg-${t}`,syntaxTheme:r})]})},t))})}var _i=`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 vi({selectedCode:e,value:t,onChange:n,textareaRef:r,className:i=_i}){return e?(0,F.jsxs)(`button`,{type:`button`,onClick:()=>{let i=kn(e),a=r?.current;if(!a){n(`${t}${t?`
|
|
16
|
+
|
|
17
|
+
`:``}${i}\n\n`);return}let o=a.selectionStart,s=a.selectionEnd,c=t.slice(0,o),l=t.slice(s),u=`${c?`
|
|
18
|
+
|
|
19
|
+
`:``}${i}\n\n`;n(c+u+l);let d=c.length+u.length;requestAnimationFrame(()=>{a.focus(),a.setSelectionRange(d,d)})},className:i,title:`Add code suggestion`,children:[(0,F.jsx)(Qe,{size:12}),`Add suggestion`]}):null}function yi({onSubmit:e,onCancel:t,selectedCode:n,syntaxTheme:r,filename:i,initialValue:a=``,embedded:o=!1,title:s=`Add a comment`,submitLabel:c=`Submit`,placeholder:l=`Leave a comment...`}){let[u,d]=(0,P.useState)(a),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(`edit`),g=(0,P.useRef)(null),_=hi(u),v=_?m:`edit`,y=async t=>{if(t.preventDefault(),u.trim()){p(!0);try{await e(u.trim()),d(``),h(`edit`)}catch(e){console.error(`Failed to submit comment:`,e)}finally{p(!1)}}};return(0,F.jsxs)(`form`,{className:o?`bg-transparent font-sans`:`m-2 mx-3 rounded-lg border border-github-border bg-github-bg-tertiary p-3.5 shadow-lg shadow-black/30 font-sans`,onSubmit:y,onClick:e=>e.stopPropagation(),"data-empty":!u.trim(),children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsx)(`span`,{className:`text-sm font-semibold text-github-text-primary`,children:s}),_?(0,F.jsxs)(`div`,{className:`flex items-center border border-github-border rounded-md overflow-hidden`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>h(`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`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>h(`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`})]}):(0,F.jsx)(vi,{selectedCode:n,value:u,onChange:d,textareaRef:g})]}),_&&v===`preview`?(0,F.jsx)(`div`,{className:`min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2`,children:(0,F.jsx)(gi,{body:u,originalCode:n,filename:i,syntaxTheme:r})}):(0,F.jsx)(`textarea`,{ref:g,className:`w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded-md px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-github-accent focus:ring-2 focus:ring-github-accent/30 focus:min-h-[80px] disabled:opacity-50`,value:u,onChange:e=>d(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)?y(e):e.key===`Escape`&&t()},placeholder:l,rows:Math.max(3,u.split(`
|
|
20
|
+
`).length),autoFocus:!0,disabled:f}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`mr-auto text-[11px] text-github-text-muted`,children:`Markdown · ⌘⏎ to submit`}),(0,F.jsx)(`button`,{type:`button`,onClick:t,className:`text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded-md hover:bg-github-bg-secondary transition-all disabled:opacity-50`,disabled:f,children:`Cancel`}),(0,F.jsx)(`button`,{type:`submit`,className:`text-xs font-medium px-3 py-1.5 rounded-md bg-github-accent text-white border border-github-accent/20 shadow-sm hover:bg-github-accent/90 transition-all disabled:cursor-not-allowed disabled:opacity-50`,disabled:!u.trim()||f,children:f?`Submitting…`:c})]})]})}function bi({message:e,isRootMessage:t=!1,showAuthorBadge:n,syntaxTheme:r,filename:i,originalCode:a,onUpdate:o,onResolveOrDelete:s,actionLabel:c,confirmMessage:l,onClick:u}){let[d,f]=(0,P.useState)(!1),p=n&&!!e.author,m=e.author?.trim()===`User`;return(0,F.jsx)(`div`,{className:d?``:`flex min-w-0 items-start gap-3`,onClick:u,children:d?(0,F.jsx)(yi,{onSubmit:t=>(t!==e.body&&o(t),f(!1),Promise.resolve()),onCancel:()=>{f(!1)},selectedCode:a,syntaxTheme:r,filename:i,initialValue:e.body,embedded:!0,title:`Edit comment`,submitLabel:`Save`,placeholder:`Edit your message...`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[p&&(0,F.jsx)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 pr-2 text-xs text-github-text-secondary`,children:(0,F.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-github-border bg-github-bg-primary px-2 py-0.5 text-[11px] font-medium text-github-text-primary`,children:e.author})}),(0,F.jsx)(gi,{body:e.body,originalCode:a,filename:i,syntaxTheme:r})]}),(t||m)&&(0,F.jsxs)(`div`,{className:`flex shrink-0 items-start gap-2 pt-0.5`,children:[m&&(0,F.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),f(!0)},className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 text-github-text-primary transition-all hover:bg-github-bg-primary`,title:`Edit message`,children:(0,F.jsx)(wt,{size:12})}),(0,F.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),!(l&&!confirm(l))&&s()},className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 transition-all hover:bg-github-bg-primary ${t?`text-green-700 hover:text-green-800`:`text-github-danger`}`,title:c,"aria-label":c,children:t?(0,F.jsx)(Ge,{size:12}):(0,F.jsx)(Pt,{size:12})})]})]})})}function xi({thread:e,showAuthorBadges:t=!1,confirmRootAction:n=!0,onGeneratePrompt:r,onRemoveThread:i,onReplyToThread:a,onRemoveMessage:o,onUpdateMessage:s,onClick:c,syntaxTheme:l}){let[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(!1),m=Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line,h=async t=>{t.stopPropagation();try{await bn(r(e)),d(!0),setTimeout(()=>d(!1),2e3)}catch(e){console.error(`Failed to copy thread prompt:`,e)}},g=e.messages[0];return g?(0,F.jsxs)(`div`,{id:`comment-thread-${e.id}`,className:`rounded-md border border-yellow-600/50 border-l-4 border-l-yellow-400 bg-github-bg-tertiary p-3 shadow-sm transition-all ${c?`cursor-pointer hover:shadow-md`:``}`,onClick:c,children:[(0,F.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-xs text-github-text-secondary`,children:[(0,F.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,`:`,m]}),e.isOutdated&&(0,F.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded-full border border-github-text-muted px-2 text-[10px] font-medium text-github-text-muted`,title:`Code has changed since this comment was made`,"aria-label":`Outdated comment`,children:`Outdated`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:h,className:`whitespace-nowrap rounded px-2 py-1 text-xs transition-all`,style:{backgroundColor:`var(--color-yellow-btn-bg)`,color:`var(--color-yellow-btn-text)`,border:`1px solid var(--color-yellow-btn-border)`},title:`Copy thread prompt for AI coding agent`,children:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,F.jsx)(et,{size:12}),u?`Copied!`:`Copy Prompt`]})}),(0,F.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),p(e=>!e)},"aria-label":`Reply`,className:`rounded border border-github-border bg-github-bg-tertiary p-1.5 text-github-text-primary transition-all hover:bg-github-bg-primary`,title:`Reply to thread`,children:(0,F.jsx)(bt,{size:14})})]})]}),(0,F.jsxs)(`div`,{className:`space-y-3`,children:[(0,F.jsx)(bi,{message:g,isRootMessage:!0,showAuthorBadge:t,syntaxTheme:l,filename:e.file,originalCode:e.codeContent,onUpdate:t=>s(e.id,g.id,t),onResolveOrDelete:()=>i(e.id),actionLabel:`Resolve thread`,confirmMessage:n?`Resolve this thread?\n\n"${g.body}"`:void 0}),e.messages.slice(1).map(n=>(0,F.jsx)(`div`,{className:`ml-4 border-l border-github-border pl-3`,children:(0,F.jsx)(bi,{message:n,showAuthorBadge:t,syntaxTheme:l,filename:e.file,originalCode:e.codeContent,onUpdate:t=>s(e.id,n.id,t),onResolveOrDelete:()=>o(e.id,n.id),actionLabel:`Delete reply`,confirmMessage:`Delete this reply?\n\n"${n.body}"`})},n.id)),f&&(0,F.jsx)(`div`,{className:`ml-4 border-l border-github-border pl-3`,onClick:e=>e.stopPropagation(),children:(0,F.jsx)(yi,{onSubmit:async t=>{await a(e.id,t),p(!1)},onCancel:()=>p(!1),selectedCode:e.codeContent,syntaxTheme:l,filename:e.file,embedded:!0,title:`Reply to thread`,submitLabel:`Reply`,placeholder:`Write a reply...`})})]})]}):null}function Si({isOpen:e,onClose:t,onNavigate:n,comments:r,showAuthorBadges:i=!1,onRemoveThread:a,onGenerateThreadPrompt:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u}){let[d,f]=(0,P.useState)(0),p=(0,P.useRef)([]),{enableScope:m,disableScope:h}=we(),g=[...r].sort((e,t)=>{let n=e.file.localeCompare(t.file);if(n!==0)return n;let r=Array.isArray(e.line)?e.line[0]:e.line,i=Array.isArray(t.line)?t.line[0]:t.line;return r===i?e.createdAt.localeCompare(t.createdAt):r-i}),_=(0,P.useCallback)(e=>{n(e),t()},[t,n]),v=(0,P.useCallback)(e=>{let t=e.messages[0]?.body||``;confirm(`Resolve this thread?\n\n"${t}"`)&&(a(e.id),d>=g.length-1&&d>0&&f(d-1))},[a,d,g.length]);(0,P.useEffect)(()=>(e?(m(`comments-list`),h(`navigation`)):(m(`navigation`),h(`comments-list`),f(0)),()=>{m(`navigation`),h(`comments-list`)}),[h,m,e]);let y={scopes:`comments-list`,enableOnFormTags:!1};return Ae(`escape`,()=>t(),y,[t]),Ae(`j, down`,()=>f(e=>Math.min(e+1,g.length-1)),y,[g.length]),Ae(`k, up`,()=>f(e=>Math.max(e-1,0)),y,[]),Ae(`enter`,()=>{g[d]&&_(g[d])},y,[_,d,g]),Ae(`d`,()=>{g[d]&&v(g[d])},y,[v,d,g]),(0,P.useEffect)(()=>{p.current[d]&&p.current[d]?.scrollIntoView({block:`nearest`})},[d]),e?(0,F.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,F.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,F.jsxs)(`div`,{className:`relative max-h-[80vh] w-full max-w-4xl overflow-hidden rounded-lg border border-github-border bg-github-bg-primary shadow-lg`,children:[(0,F.jsxs)(`div`,{className:`sticky top-0 border-b border-github-border bg-github-bg-primary px-6 py-4`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`All Comments`}),(0,F.jsx)(`button`,{onClick:t,className:`text-github-text-secondary transition-colors hover:text-github-text-primary`,"aria-label":`Close comments list`,children:(0,F.jsx)(Rt,{size:20})})]}),(0,F.jsxs)(`div`,{className:`text-xs text-github-text-secondary`,children:[(0,F.jsx)(`span`,{className:`font-mono`,children:`j/k`}),` or `,(0,F.jsx)(`span`,{className:`font-mono`,children:`↑/↓`}),` to navigate • `,(0,F.jsx)(`span`,{className:`font-mono`,children:`Enter`}),` to jump •`,` `,(0,F.jsx)(`span`,{className:`font-mono`,children:`d`}),` to resolve • `,(0,F.jsx)(`span`,{className:`font-mono`,children:`Esc`}),` `,`to close`]})]}),(0,F.jsx)(`div`,{className:`max-h-[calc(80vh-120px)] overflow-y-auto`,children:(0,F.jsx)(`div`,{className:`p-6`,children:g.length===0?(0,F.jsx)(`p`,{className:`text-center text-github-text-secondary`,children:`No comments yet`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`space-y-2`,children:g.map((e,t)=>(0,F.jsx)(`div`,{ref:e=>{p.current[t]=e},className:d===t?`rounded ring-2 ring-blue-500`:``,children:(0,F.jsx)(xi,{thread:e,showAuthorBadges:i,confirmRootAction:!1,onGeneratePrompt:o,onRemoveThread:t=>{t===e.id&&v(e)},onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u,onClick:n=>{n.stopPropagation(),f(t),_(e)}})},e.id))}),(0,F.jsxs)(`div`,{className:`mt-4 border-t border-github-border pt-4 text-center text-xs text-github-text-secondary`,children:[d+1,` of `,g.length,` threads`]})]})})})]})]}):null}function Ci({search:e}){let t=(0,P.useRef)(null);if((0,P.useEffect)(()=>{e.isOpen&&(t.current?.focus(),t.current?.select())},[e.isOpen]),!e.isOpen)return null;let n=t=>{t.key===`Enter`?(t.preventDefault(),t.shiftKey?e.prev():e.next()):t.key===`Escape`&&(t.preventDefault(),e.close())},r=e.matchCount===0?e.query?`No results`:``:`${e.currentIndex+1}/${e.matchCount}`;return(0,F.jsxs)(`div`,{className:`absolute top-2 right-4 z-50 flex items-center gap-1 rounded-md border border-github-border bg-github-bg-secondary px-2 py-1 shadow-lg`,children:[(0,F.jsx)(`input`,{ref:t,type:`text`,placeholder:`Search in diff...`,value:e.query,onChange:t=>e.setQuery(t.target.value),onKeyDown:n,className:`w-48 bg-transparent px-1 py-0.5 text-sm text-github-text-primary placeholder-github-text-muted focus:outline-none`}),(0,F.jsx)(`span`,{className:`min-w-[56px] text-right text-xs text-github-text-muted tabular-nums`,children:r}),(0,F.jsx)(`button`,{onClick:e.toggleCaseSensitive,title:`Match case`,className:`rounded p-1 transition-colors hover:bg-github-bg-tertiary ${e.caseSensitive?`text-github-accent`:`text-github-text-muted`}`,children:(0,F.jsx)(We,{size:16})}),(0,F.jsx)(`button`,{onClick:e.prev,disabled:e.matchCount===0,title:`Previous match (Shift+Enter)`,className:`rounded p-1 text-github-text-secondary transition-colors hover:bg-github-bg-tertiary disabled:opacity-40`,children:(0,F.jsx)(Ye,{size:16})}),(0,F.jsx)(`button`,{onClick:e.next,disabled:e.matchCount===0,title:`Next match (Enter)`,className:`rounded p-1 text-github-text-secondary transition-colors hover:bg-github-bg-tertiary disabled:opacity-40`,children:(0,F.jsx)(Ke,{size:16})}),(0,F.jsx)(`button`,{onClick:e.close,title:`Close (Esc)`,className:`rounded p-1 text-github-text-secondary transition-colors hover:bg-github-bg-tertiary`,children:(0,F.jsx)(Rt,{size:16})})]})}var wi={getOldTokens:null,getNewTokens:null},Ti=2e3;async function Ei(e,t){try{let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);return n.ok?await n.text():null}catch{return null}}function Di(e,t){if(e.split(`
|
|
21
|
+
`).length>Ti)return null;let n=Gr.languages[t];if(!n)return null;try{return Pr(Gr.tokenize(e,n))}catch{return null}}function Oi({file:e,enabled:t,baseCommitish:n,targetCommitish:r,reloadKey:i}){let a=(0,P.useMemo)(()=>ti(e.path),[e.path]),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(()=>!t||!!Gr.languages[a]);(0,P.useEffect)(()=>{if(!t)return;if(Gr.languages[a]){d(!0);return}let e=!1;return Wr(a).then(()=>{e||d(!0)}).catch(()=>{e||d(!1)}),()=>{e=!0}},[t,a]),(0,P.useEffect)(()=>{if(!t){s(null),l(null);return}let i=!1,a=e.status!==`added`&&!!n,o=e.status!==`deleted`&&!!r;return s(null),l(null),a&&Ei(e.oldPath||e.path,n).then(e=>{i||s(e)}),o&&Ei(e.path,r).then(e=>{i||l(e)}),()=>{i=!0}},[t,e.path,e.oldPath,e.status,n,r,i]);let f=(0,P.useMemo)(()=>!t||!u||o==null?null:Di(o,a),[t,u,o,a]),p=(0,P.useMemo)(()=>!t||!u||c==null?null:Di(c,a),[t,u,c,a]);return(0,P.useMemo)(()=>t?{getOldTokens:f?e=>f[e-1]??null:null,getNewTokens:p?e=>p[e-1]??null:null}:wi,[t,f,p])}var ki=[`jpg`,`jpeg`,`png`,`gif`,`bmp`,`svg`,`webp`,`ico`,`tiff`,`tif`,`avif`,`heic`,`heif`];function Ai(e){if(!e)return!1;let t=Jr(e);return t?ki.includes(t):!1}var ji=[`md`,`markdown`];function Mi(e){if(!e)return!1;let t=Jr(e);return t?ji.includes(t):!1}var V=[`ipynb`];function Ni(e){if(!e)return!1;let t=Jr(e);return t?V.includes(t):!1}var Pi=(e,t)=>`${e.slice(0,7)}:${t}`,Fi=(e,t)=>window.__DIFIT_STATIC_BLOB_URLS__?.[Pi(t,e)]??`/api/blob/${e}?ref=${t}`;function Ii({file:e,diffMode:t,baseCommitish:n,targetCommitish:r}){let i=t??`split`,a=e.status===`deleted`,o=e.status===`added`,s=e.status===`modified`||e.status===`renamed`,c=n||`HEAD~1`,l=r||`HEAD`,[u,d]=(0,P.useState)({}),[f,p]=(0,P.useState)({}),m=async(e,t)=>{try{let n=e.naturalWidth,r=e.naturalHeight,i=(await(await fetch(e.src)).blob()).size;t({width:n,height:r,size:i})}catch(e){console.error(`Failed to get image info:`,e)}},h=e=>e?e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`:``,g=e=>!e.width||!e.height?``:`W: ${e.width}px | H: ${e.height}px`,_={backgroundImage:`
|
|
22
|
+
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
|
|
23
|
+
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
|
|
24
|
+
`,backgroundSize:`20px 20px`,backgroundPosition:`0 0, 10px 10px`,backgroundColor:`white`};return a?(0,F.jsx)(`div`,{className:`bg-github-bg-primary p-4`,children:(0,F.jsxs)(`div`,{className:`text-center`,children:[(0,F.jsx)(`div`,{className:`mb-2`,children:(0,F.jsx)(`span`,{className:`text-github-danger font-medium`,children:`Deleted Image`})}),(0,F.jsxs)(`div`,{className:`inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,F.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,F.jsx)(`img`,{src:Fi(e.oldPath||e.path,c),alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,F.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,F.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})]})}):o?(0,F.jsx)(`div`,{className:`bg-github-bg-primary p-4`,children:(0,F.jsxs)(`div`,{className:`text-center`,children:[(0,F.jsx)(`div`,{className:`mb-2`,children:(0,F.jsx)(`span`,{className:`text-github-accent font-medium`,children:`Added Image`})}),(0,F.jsxs)(`div`,{className:`inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,F.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`New file:`}),(0,F.jsx)(`img`,{src:Fi(e.path,l),alt:`New image ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,F.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,F.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})]})}):s?i===`split`?(0,F.jsxs)(`div`,{className:`bg-github-bg-primary p-4`,children:[(0,F.jsx)(`div`,{className:`text-center mb-4`,children:(0,F.jsx)(`span`,{className:`text-github-text-primary font-medium`,children:`Modified Image`})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,F.jsx)(`div`,{className:`text-center`,children:(0,F.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,F.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,F.jsx)(`img`,{src:Fi(e.oldPath||e.path,c),alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,F.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,F.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})}),(0,F.jsx)(`div`,{className:`text-center`,children:(0,F.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary`,children:[(0,F.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Current version:`}),(0,F.jsx)(`img`,{src:Fi(e.path,l),alt:`Current version of ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,F.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,F.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})})]})]}):(0,F.jsxs)(`div`,{className:`bg-github-bg-primary p-4`,children:[(0,F.jsx)(`div`,{className:`text-center mb-4`,children:(0,F.jsx)(`span`,{className:`text-github-text-primary font-medium`,children:`Modified Image`})}),(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(`div`,{className:`text-center`,children:(0,F.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block`,children:[(0,F.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Previous version:`}),(0,F.jsx)(`img`,{src:Fi(e.oldPath||e.path,c),alt:`Previous version of ${e.oldPath||e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,d),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,F.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(u.width||u.size)&&(0,F.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(u),g(u)&&h(u.size)&&` | `,h(u.size)]})]})}),(0,F.jsx)(`div`,{className:`text-center`,children:(0,F.jsxs)(`div`,{className:`border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block`,children:[(0,F.jsx)(`div`,{className:`text-github-text-muted mb-2`,style:{fontSize:`14px`},children:`Current version:`}),(0,F.jsx)(`img`,{src:Fi(e.path,l),alt:`Current version of ${e.path}`,className:`max-w-full max-h-96 border border-github-border rounded mx-auto`,style:_,onLoad:e=>m(e.currentTarget,p),onError:e=>{let t=e.target;t.style.display=`none`,t.nextElementSibling?.classList.remove(`hidden`)}}),(0,F.jsx)(`div`,{className:`hidden text-github-text-muted text-sm mt-2`,children:`Image could not be loaded`}),(f.width||f.size)&&(0,F.jsxs)(`div`,{className:`text-github-text-muted mt-2`,style:{fontSize:`14px`},children:[g(f),g(f)&&h(f.size)&&` | `,h(f.size)]})]})})]})]}):null}function Li(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ri=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zi=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Bi={};function Vi(e,t){return((t||Bi).jsx?zi:Ri).test(e)}var Hi=/[ \t\n\f\r]/g;function Ui(e){return typeof e==`object`?e.type===`text`?Wi(e.value):!1:Wi(e)}function Wi(e){return e.replace(Hi,``)===``}var Gi=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Gi.prototype.normal={},Gi.prototype.property={},Gi.prototype.space=void 0;function Ki(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Gi(n,r,t)}function qi(e){return e.toLowerCase()}var Ji=class{constructor(e,t){this.attribute=t,this.property=e}};Ji.prototype.attribute=``,Ji.prototype.booleanish=!1,Ji.prototype.boolean=!1,Ji.prototype.commaOrSpaceSeparated=!1,Ji.prototype.commaSeparated=!1,Ji.prototype.defined=!1,Ji.prototype.mustUseProperty=!1,Ji.prototype.number=!1,Ji.prototype.overloadedBoolean=!1,Ji.prototype.property=``,Ji.prototype.spaceSeparated=!1,Ji.prototype.space=void 0;var Yi=s({boolean:()=>H,booleanish:()=>Zi,commaOrSpaceSeparated:()=>ta,commaSeparated:()=>ea,number:()=>U,overloadedBoolean:()=>Qi,spaceSeparated:()=>$i}),Xi=0,H=na(),Zi=na(),Qi=na(),U=na(),$i=na(),ea=na(),ta=na();function na(){return 2**++Xi}var ra=Object.keys(Yi),ia=class extends Ji{constructor(e,t,n,r){let i=-1;if(super(e,t),aa(this,`space`,r),typeof n==`number`)for(;++i<ra.length;){let e=ra[i];aa(this,ra[i],(n&Yi[e])===Yi[e])}}};ia.prototype.defined=!0;function aa(e,t,n){n&&(e[t]=n)}function oa(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ia(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[qi(r)]=r,n[qi(a.attribute)]=r}return new Gi(t,n,e.space)}var sa=oa({properties:{ariaActiveDescendant:null,ariaAtomic:Zi,ariaAutoComplete:null,ariaBusy:Zi,ariaChecked:Zi,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:$i,ariaCurrent:null,ariaDescribedBy:$i,ariaDetails:null,ariaDisabled:Zi,ariaDropEffect:$i,ariaErrorMessage:null,ariaExpanded:Zi,ariaFlowTo:$i,ariaGrabbed:Zi,ariaHasPopup:null,ariaHidden:Zi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$i,ariaLevel:U,ariaLive:null,ariaModal:Zi,ariaMultiLine:Zi,ariaMultiSelectable:Zi,ariaOrientation:null,ariaOwns:$i,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Zi,ariaReadOnly:Zi,ariaRelevant:null,ariaRequired:Zi,ariaRoleDescription:$i,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Zi,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ca(e,t){return t in e?e[t]:t}function la(e,t){return ca(e,t.toLowerCase())}var ua=oa({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ea,acceptCharset:$i,accessKey:$i,action:null,allow:null,allowFullScreen:H,allowPaymentRequest:H,allowUserMedia:H,alt:null,as:null,async:H,autoCapitalize:null,autoComplete:$i,autoFocus:H,autoPlay:H,blocking:$i,capture:null,charSet:null,checked:H,cite:null,className:$i,cols:U,colSpan:null,content:null,contentEditable:Zi,controls:H,controlsList:$i,coords:U|ea,crossOrigin:null,data:null,dateTime:null,decoding:null,default:H,defer:H,dir:null,dirName:null,disabled:H,download:Qi,draggable:Zi,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:H,formTarget:null,headers:$i,height:U,hidden:Qi,high:U,href:null,hrefLang:null,htmlFor:$i,httpEquiv:$i,id:null,imageSizes:null,imageSrcSet:null,inert:H,inputMode:null,integrity:null,is:null,isMap:H,itemId:null,itemProp:$i,itemRef:$i,itemScope:H,itemType:$i,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:H,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:H,muted:H,name:null,nonce:null,noModule:H,noValidate:H,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:H,optimum:U,pattern:null,ping:$i,placeholder:null,playsInline:H,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:H,referrerPolicy:null,rel:$i,required:H,reversed:H,rows:U,rowSpan:U,sandbox:$i,scope:null,scoped:H,seamless:H,selected:H,shadowRootClonable:H,shadowRootDelegatesFocus:H,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Zi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:H,useMap:null,value:Zi,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$i,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:H,declare:H,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:H,noHref:H,noShade:H,noWrap:H,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Zi,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:H,disableRemotePlayback:H,prefix:null,property:null,results:U,security:null,unselectable:null},space:`html`,transform:la}),da=oa({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:ta,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:$i,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:H,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:ea,g2:ea,glyphName:ea,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:ta,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$i,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ta,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ta,rev:ta,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ta,requiredFeatures:ta,requiredFonts:ta,requiredFormats:ta,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:ta,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ta,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ta,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ca}),fa=oa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),pa=oa({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:la}),ma=oa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ha={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`},ga=/[A-Z]/g,_a=/-[a-z]/g,va=/^data[-\w.:]+$/i;function ya(e,t){let n=qi(t),r=t,i=Ji;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&va.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(_a,xa);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!_a.test(e)){let n=e.replace(ga,ba);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ia}return new i(r,t)}function ba(e){return`-`+e.toLowerCase()}function xa(e){return e.charAt(1).toUpperCase()}var Sa=Ki([sa,ua,fa,pa,ma],`html`),Ca=Ki([sa,da,fa,pa,ma],`svg`);function wa(e){return e.join(` `).trim()}var Ta=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
25
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Ea=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Ta());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Da=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Oa=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Ea()),r=Da();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),ka=ja(`end`),Aa=ja(`start`);function ja(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ma(e){let t=Aa(e),n=ka(e);if(t&&n)return{start:t,end:n}}function Na(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Fa(e.position):`start`in e||`end`in e?Fa(e):`line`in e||`column`in e?Pa(e):``}function Pa(e){return Ia(e&&e.line)+`:`+Ia(e&&e.column)}function Fa(e){return Pa(e&&e.start)+`-`+Pa(e&&e.end)}function Ia(e){return e&&typeof e==`number`?e:1}var La=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Na(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};La.prototype.file=``,La.prototype.name=``,La.prototype.reason=``,La.prototype.message=``,La.prototype.stack=``,La.prototype.column=void 0,La.prototype.line=void 0,La.prototype.ancestors=void 0,La.prototype.cause=void 0,La.prototype.fatal=void 0,La.prototype.place=void 0,La.prototype.ruleId=void 0,La.prototype.source=void 0;var Ra=l(Oa(),1),za={}.hasOwnProperty,Ba=new Map,Va=/[A-Z]/g,Ha=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ua=new Set([`td`,`th`]);function Wa(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=to(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=eo(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Ca:Sa,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ga(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ga(e,t,n){if(t.type===`element`)return Ka(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return qa(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Ya(e,t,n);if(t.type===`mdxjsEsm`)return Ja(e,t);if(t.type===`root`)return Xa(e,t,n);if(t.type===`text`)return Za(e,t)}function Ka(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Ca,e.schema=i),e.ancestors.push(t);let a=so(e,t.tagName,!1),o=no(e,t),s=io(e,t);return Ha.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Ui(e):!0})),Qa(e,o,a,t),$a(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qa(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}co(e,t.position)}function Ja(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);co(e,t.position)}function Ya(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Ca,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:so(e,t.name,!0),o=ro(e,t),s=io(e,t);return Qa(e,o,a,t),$a(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Xa(e,t,n){let r={};return $a(r,io(e,t)),e.create(t,e.Fragment,r,n)}function Za(e,t){return t.value}function Qa(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $a(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function eo(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function to(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Aa(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function no(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&za.call(t.properties,i)){let a=ao(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ua.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function ro(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else co(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else co(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function io(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ba;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Ga(e,a,o);s!==void 0&&n.push(s)}return n}function ao(e,t,n){let r=ya(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Li(n):wa(n)),r.property===`style`){let t=typeof n==`object`?n:oo(e,String(n));return e.stylePropertyNameCase===`css`&&(t=W(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ha[r.property]||r.property:r.attribute,n]}}function oo(e,t){try{return(0,Ra.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new La("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function so(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Vi(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Vi(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return za.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);co(e)}function co(e,t){let n=new La("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function W(e){let t={},n;for(n in e)za.call(e,n)&&(t[lo(n)]=e[n]);return t}function lo(e){let t=e.replace(Va,uo);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function uo(e){return`-`+e.toLowerCase()}var fo={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`]},po={};function mo(e,t){let n=t||po;return ho(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function ho(e,t,n){if(_o(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return go(e.children,t,n)}return Array.isArray(e)?go(e,t,n):``}function go(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ho(e[i],t,n);return r.join(``)}function _o(e){return!!(e&&typeof e==`object`)}var vo=document.createElement(`i`);function yo(e){let t=`&`+e+`;`;vo.innerHTML=t;let n=vo.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function bo(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function xo(e,t){return e.length>0?(bo(e,e.length,0,t),e):t}var So={}.hasOwnProperty;function Co(e){let t={},n=-1;for(;++n<e.length;)wo(t,e[n]);return t}function wo(e,t){let n;for(n in t){let r=(So.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){So.call(r,a)||(r[a]=[]);let e=i[a];To(r[a],Array.isArray(e)?e:e?[e]:[])}}}function To(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);bo(e,0,0,r)}function Eo(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Do(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Oo=Lo(/[A-Za-z]/),G=Lo(/[\dA-Za-z]/),ko=Lo(/[#-'*+\--9=?A-Z^-~]/);function Ao(e){return e!==null&&(e<32||e===127)}var jo=Lo(/\d/),Mo=Lo(/[\dA-Fa-f]/),No=Lo(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function Po(e){return e!==null&&(e<0||e===32)}function q(e){return e===-2||e===-1||e===32}var Fo=Lo(/\p{P}|\p{S}/u),Io=Lo(/\s/);function Lo(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ro(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&G(e.charCodeAt(n+1))&&G(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function J(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return q(r)?(e.enter(n),s(r)):t(r)}function s(r){return q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var zo={tokenize:Bo};function Bo(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return K(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Vo={tokenize:Uo},Ho={tokenize:Wo};function Uo(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return bo(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ho,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ho,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return K(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;bo(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Wo(e,t,n){return J(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Go(e){if(e===null||Po(e)||Io(e))return 1;if(Fo(e))return 2}function Ko(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var qo={name:`attention`,resolveAll:Jo,tokenize:Yo};function Jo(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Xo(d,-c),Xo(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=xo(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=xo(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=xo(l,Ko(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=xo(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=xo(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,bo(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Yo(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Go(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Go(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Xo(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Zo={name:`autolink`,tokenize:Qo};function Qo(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Oo(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||G(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||G(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Ao(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ko(t)?(e.consume(t),l):n(t)}function u(e){return G(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||G(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var $o={partial:!0,tokenize:es};function es(e,t,n){return r;function r(t){return q(t)?J(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K(e)?t(e):n(e)}}var ts={continuation:{tokenize:rs},exit:is,name:`blockQuote`,tokenize:ns};function ns(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function rs(e,t,n){let r=this;return i;function i(t){return q(t)?J(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ts,t,n)(r)}}function is(e){e.exit(`blockQuote`)}var as={name:`characterEscape`,tokenize:os};function os(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return No(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var ss={name:`characterReference`,tokenize:cs};function cs(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=G,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Mo,u):(e.enter(`characterReferenceValue`),a=7,o=jo,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===G&&!yo(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var ls={partial:!0,tokenize:fs},us={concrete:!0,name:`codeFenced`,tokenize:ds};function ds(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),q(t)?J(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ls,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),J(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&q(t)?J(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(ls,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),q(t)?J(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),q(t)?J(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function fs(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ps={name:`codeIndented`,tokenize:hs},ms={partial:!0,tokenize:gs};function hs(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),J(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):K(t)?e.attempt(ms,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||K(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function gs(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):J(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):K(e)?i(e):n(e)}}var _s={name:`codeText`,previous:ys,resolve:vs,tokenize:bs};function vs(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ys(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function bs(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||K(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var xs=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Ss(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Ss(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ss(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Ss(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ss(this.left,t.reverse())}}};function Ss(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Cs(e){let t={},n=-1,r,i,a,o,s,c,l,u=new xs(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,ws(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return bo(e,0,1/0,u.slice(0)),!l}function ws(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Ts={resolve:Ds,tokenize:Os},Es={partial:!0,tokenize:ks};function Ds(e){return Cs(e),e}function Os(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):K(t)?e.check(Es,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function ks(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,a,`linePrefix`)}function a(i){if(i===null||K(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function As(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Ao(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Po(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Ao(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function js(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Ms(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Ns(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):q(i)?J(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Ps={name:`definition`,tokenize:Is},Fs={partial:!0,tokenize:Ls};function Is(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return js.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Do(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Po(t)?Ns(e,l)(t):l(t)}function l(t){return As(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Fs,d,d)(t)}function d(t){return q(t)?J(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ls(e,t,n){return r;function r(t){return Po(t)?Ns(e,i)(t):n(t)}function i(t){return Ms(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return q(t)?J(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}var Rs={name:`hardBreakEscape`,tokenize:zs};function zs(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Bs={name:`headingAtx`,resolve:Vs,tokenize:Hs};function Vs(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},bo(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Hs(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Po(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):q(n)?J(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Po(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Us=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ws=[`pre`,`script`,`style`,`textarea`],Gs={concrete:!0,name:`htmlFlow`,resolveTo:Js,tokenize:Ys},Ks={partial:!0,tokenize:Zs},qs={partial:!0,tokenize:Xs};function Js(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ys(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):Oo(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Oo(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Oo(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Po(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ws.includes(l)?(i=1,r.interrupt?t(s):O(s)):Us.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||G(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return q(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Oo(t)?(e.consume(t),b):q(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||G(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):q(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Po(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||q(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||K(t)?O(t):q(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ks,ne,k)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(qs,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||K(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),P):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return Ws.includes(n)?(e.consume(t),F):O(t)}return Oo(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||K(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function Xs(e,t,n){let r=this;return i;function i(t){return K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Zs(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt($o,t,n)}}var Qs={name:`htmlText`,tokenize:$s};function $s(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Oo(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Oo(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):K(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Oo(t)?(e.consume(t),S):n(t)}function S(t){return t===45||G(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,N(t)):q(t)?(e.consume(t),C):M(t)}function w(t){return t===45||G(t)?(e.consume(t),w):t===47||t===62||Po(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Oo(t)?(e.consume(t),E):K(t)?(o=T,N(t)):q(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||G(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):K(t)?(o=D,N(t)):q(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):K(t)?(o=O,N(t)):q(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):K(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Po(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Po(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return q(t)?J(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var ec={name:`labelEnd`,resolveAll:ic,resolveTo:ac,tokenize:oc},tc={tokenize:sc},nc={tokenize:cc},rc={tokenize:lc};function ic(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&bo(e,0,e.length,n),e}function ac(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=xo(s,e.slice(a+1,a+r+3)),s=xo(s,[[`enter`,u,t]]),s=xo(s,Ko(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=xo(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=xo(s,e.slice(o+1)),s=xo(s,[[`exit`,c,t]]),bo(e,a,e.length,s),e}function oc(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Do(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(tc,u,o?u:d)(t):t===91?e.attempt(nc,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(rc,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function sc(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Po(t)?Ns(e,a)(t):a(t)}function a(t){return t===41?u(t):As(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Po(t)?Ns(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Ms(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Po(t)?Ns(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function cc(e,t,n){let r=this;return i;function i(t){return js.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Do(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function lc(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var uc={name:`labelStartImage`,resolveAll:ec.resolveAll,tokenize:dc};function dc(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var fc={name:`labelStartLink`,resolveAll:ec.resolveAll,tokenize:pc};function pc(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var mc={name:`lineEnding`,tokenize:hc};function hc(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J(e,t,`linePrefix`)}}var gc={name:`thematicBreak`,tokenize:_c};function _c(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),q(t)?J(e,s,`whitespace`)(t):s(t))}}var vc={continuation:{tokenize:Sc},exit:wc,name:`list`,tokenize:xc},yc={partial:!0,tokenize:Tc},bc={partial:!0,tokenize:Cc};function xc(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:jo(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(gc,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return jo(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check($o,r.interrupt?n:u,e.attempt(yc,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Sc(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check($o,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,J(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bc,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,J(e,e.attempt(vc,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Cc(e,t,n){let r=this;return J(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function wc(e){e.exit(this.containerState.type)}function Tc(e,t,n){let r=this;return J(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ec={name:`setextUnderline`,resolveTo:Dc,tokenize:Oc};function Dc(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Oc(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),q(t)?J(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var kc={tokenize:Ac};function Ac(e){let t=this,n=e.attempt($o,r,e.attempt(this.parser.constructs.flowInitial,i,J(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ts,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var jc={resolveAll:Fc()},Mc=Pc(`string`),Nc=Pc(`text`);function Pc(e){return{resolveAll:Fc(e===`text`?Ic:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Fc(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Ic(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Lc=s({attentionMarkers:()=>Gc,contentInitial:()=>zc,disable:()=>Kc,document:()=>Rc,flow:()=>Vc,flowInitial:()=>Bc,insideSpan:()=>Wc,string:()=>Hc,text:()=>Uc}),Rc={42:vc,43:vc,45:vc,48:vc,49:vc,50:vc,51:vc,52:vc,53:vc,54:vc,55:vc,56:vc,57:vc,62:ts},zc={91:Ps},Bc={[-2]:ps,[-1]:ps,32:ps},Vc={35:Bs,42:gc,45:[Ec,gc],60:Gs,61:Ec,95:gc,96:us,126:us},Hc={38:ss,92:as},Uc={[-5]:mc,[-4]:mc,[-3]:mc,33:uc,38:ss,42:qo,60:[Zo,Qs],91:fc,92:[Rs,as],93:ec,95:qo,96:_s},Wc={null:[qo,jc]},Gc={null:[42,95]},Kc={null:[]};function qc(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=xo(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Ko(a,l.events,l),l.events):[]}function f(e,t){return Yc(p(e),t)}function p(e){return Jc(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){K(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&bo(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Jc(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Yc(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
26
|
+
`;break;case-3:o=`\r
|
|
27
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Xc(e){let t={constructs:Co([Lc,...(e||{}).extensions||[]]),content:n(zo),defined:[],document:n(Vo),flow:n(kc),lazy:{},string:n(Mc),text:n(Nc)};return t;function n(e){return n;function n(n){return qc(t,e,n)}}}function Zc(e){for(;!Cs(e););return e}var Qc=/[\0\t\n\r]/g;function $c(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Qc.lastIndex=u,c=Qc.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var el=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tl(e){return e.replace(el,nl)}function nl(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Eo(n.slice(t?2:1),t?16:10)}return yo(n)||e}var rl={}.hasOwnProperty;function il(e,t,n){return typeof t!=`string`&&(n=t,t=void 0),al(n)(Zc(Xc(n).document().write($c()(e,t,!0))))}function al(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ge),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(fe),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(L,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(R),hardBreakEscape:a(pe),hardBreakTrailing:a(pe),htmlFlow:a(me,o),htmlFlowData:T,htmlText:a(me,o),htmlTextData:T,image:a(he),label:o,link:a(ge),listItem:a(ve),listItemValue:f,listOrdered:a(_e,d),listUnordered:a(_e),paragraph:a(ye),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(fe),strong:a(be),thematicBreak:a(Se)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:I,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:te,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};sl(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];rl.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ll).call(a,void 0,e[0])}for(r.position={start:ol(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ol(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ol(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ll).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ol(e.end)}function u(){return mo(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Do(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:ol(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ol(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ol(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=tl(t),n.identifier=Do(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Do(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Eo(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=yo(t);let i=this.stack[this.stack.length-1];i.value+=r}function I(e){let t=this.stack.pop();t.position.end=ol(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function L(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function R(){return{type:`emphasis`,children:[]}}function fe(){return{type:`heading`,depth:0,children:[]}}function pe(){return{type:`break`}}function me(){return{type:`html`,value:``}}function he(){return{type:`image`,title:null,url:``,alt:null}}function ge(){return{type:`link`,title:null,url:``,children:[]}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ye(){return{type:`paragraph`,children:[]}}function be(){return{type:`strong`,children:[]}}function xe(){return{type:`text`,value:``}}function Se(){return{type:`thematicBreak`}}}function ol(e){return{line:e.line,column:e.column,offset:e.offset}}function sl(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?sl(e,r):cl(e,r)}}function cl(e,t){let n;for(n in t)if(rl.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ll(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+`) is still open`)}function ul(e){let t=this;t.parser=n;function n(n){return il(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function dl(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function fl(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
28
|
+
`}]}function pl(e,t){let n=t.value?t.value+`
|
|
29
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ml(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hl(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gl(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Ro(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function _l(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vl(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function yl(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function bl(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yl(e,t);let i={src:Ro(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function xl(e,t){let n={src:Ro(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Sl(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Cl(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yl(e,t);let i={href:Ro(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wl(e,t){let n={href:Ro(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Tl(e,t,n){let r=e.all(t),i=n?El(n):Dl(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
30
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
31
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function El(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Dl(n[r])}return t}function Dl(e){return e.spread??e.children.length>1}function Ol(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function kl(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Al(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function jl(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ml(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Aa(t.children[1]),o=ka(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Nl(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Pl(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Fl=9,Y=32;function Il(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(X(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(X(t.slice(i),i>0,!1)),a.join(``)}function X(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Fl||t===Y;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Fl||t===Y;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Z(e,t){let n={type:`text`,value:Il(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ll(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Rl={blockquote:dl,break:fl,code:pl,delete:ml,emphasis:hl,footnoteReference:gl,heading:_l,html:vl,imageReference:bl,image:xl,inlineCode:Sl,linkReference:Cl,link:wl,listItem:Tl,list:Ol,paragraph:kl,root:Al,strong:jl,table:Ml,tableCell:Pl,tableRow:Nl,text:Z,thematicBreak:Ll,toml:zl,yaml:zl,definition:zl,footnoteDefinition:zl};function zl(){}var Bl=typeof self==`object`?self:globalThis,Vl=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Bl[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Bl[a](o),i)};return r},Hl=e=>Vl(new Map,e)(0),Ul=``,{toString:Wl}={},{keys:Gl}=Object,Kl=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Wl.call(e).slice(8,-1);switch(n){case`Array`:return[1,Ul];case`Object`:return[2,Ul];case`Date`:return[3,Ul];case`RegExp`:return[4,Ul];case`Map`:return[5,Ul];case`Set`:return[6,Ul];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},ql=([e,t])=>e===0&&(t===`function`||t===`symbol`),Jl=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Kl(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Gl(r))(e||!ql(Kl(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(ql(Kl(n))||ql(Kl(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!ql(Kl(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Yl=(e,{json:t,lossy:n}={})=>{let r=[];return Jl(!(t||n),!!t,new Map,r)(e),r},Xl=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Hl(Yl(e,t)):structuredClone(e):(e,t)=>Hl(Yl(e,t));function Zl(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ql(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function $l(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Zl,r=e.options.footnoteBackLabel||Ql,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Ro(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Xl(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
32
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
33
|
+
`}]}}var eu=(function(e){if(e==null)return au;if(typeof e==`function`)return iu(e);if(typeof e==`object`)return Array.isArray(e)?tu(e):nu(e);if(typeof e==`string`)return ru(e);throw Error(`Expected function, string, or object as test`)});function tu(e){let t=[],n=-1;for(;++n<e.length;)t[n]=eu(e[n]);return iu(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function nu(e){let t=e;return iu(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ru(e){return iu(t);function t(t){return t&&t.type===e}}function iu(e){return t;function t(t,n,r){return!!(ou(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function au(){return!0}function ou(e){return typeof e==`object`&&!!e&&`type`in e}function su(e){return e}var cu=[];function lu(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=eu(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+su(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=cu,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=uu(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function uu(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?cu:[e]}function du(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),lu(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var fu={}.hasOwnProperty,pu={};function mu(e,t){let n=t||pu,r=new Map,i=new Map,a={all:s,applyData:gu,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Rl,...n.handlers},one:o,options:n,patch:hu,wrap:vu};return du(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(fu.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Xl(n);return r.children=a.all(e),r}return Xl(e)}return(a.options.unknownHandler||_u)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=yu(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=yu(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function hu(e,t){e.position&&(t.position=Ma(e))}function gu(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Xl(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function _u(e,t){let n=t.data||{},r=`value`in t&&!(fu.call(n,`hProperties`)||fu.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function vu(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
34
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
35
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
36
|
+
`}),n}function yu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bu(e,t){let n=mu(e,t),r=n.one(e,void 0),i=$l(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
37
|
+
`},i)),a}function xu(e,t){return e&&`run`in e?async function(n,r){let i=bu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bu(n,{file:r,...e||t})}}function Su(e){if(e)throw e}var Cu=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wu(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Tu(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Eu(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Eu(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Du={basename:Ou,dirname:ku,extname:Au,join:ju,sep:`/`};function Ou(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Pu(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ku(e){if(Pu(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Au(e){Pu(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function ju(...e){let t=-1,n;for(;++t<e.length;)Pu(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Mu(n)}function Mu(e){Pu(e);let t=e.codePointAt(0)===47,n=Nu(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Nu(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Pu(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Fu={cwd:Iu};function Iu(){return`/`}function Lu(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ru(e){if(typeof e==`string`)e=new URL(e);else if(!Lu(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zu(e)}function zu(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Bu=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Vu=class{constructor(e){let t;t=e?Lu(e)?{path:e}:typeof e==`string`||Wu(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Fu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Bu.length;){let e=Bu[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Bu.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Du.basename(this.path):void 0}set basename(e){Uu(e,`basename`),Hu(e,`basename`),this.path=Du.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Du.dirname(this.path):void 0}set dirname(e){Q(this.basename,`dirname`),this.path=Du.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Du.extname(this.path):void 0}set extname(e){if(Hu(e,`extname`),Q(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Du.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Lu(e)&&(e=Ru(e)),Uu(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Du.basename(this.path,this.extname):void 0}set stem(e){Uu(e,`stem`),Hu(e,`stem`),this.path=Du.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new La(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Hu(e,t){if(e&&e.includes(Du.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Du.sep+"`")}function Uu(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Q(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Wu(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Gu=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Ku=l(Cu(),1),qu={}.hasOwnProperty,Ju=new class e extends Gu{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=Tu()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Ku.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Zu(`data`,this.frozen),this.namespace[e]=t,this):qu.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Zu(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=ed(e),n=this.parser||this.Parser;return Yu(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Yu(`process`,this.parser||this.Parser),Xu(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=ed(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);nd(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Yu(`processSync`,this.parser||this.Parser),Xu(`processSync`,this.compiler||this.Compiler),this.process(e,r),$u(`processSync`,`process`,t),n;function r(e,r){t=!0,Su(e),n=r}}run(e,t,n){Qu(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=ed(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),$u(`runSync`,`run`,n),r;function i(e,t){Su(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=ed(t),r=this.compiler||this.Compiler;return Xu(`stringify`,r),Qu(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Zu(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,Ku.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wu(o)&&wu(r)&&(r=(0,Ku.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Yu(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Xu(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Zu(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qu(e){if(!wu(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function $u(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function ed(e){return td(e)?e:new Vu(e)}function td(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function nd(e){return typeof e==`string`||rd(e)}function rd(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var id=[],ad={allowDangerousHtml:!0},od=/^(https?|ircs?|mailto|xmpp)$/i,sd=[{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 cd(e){let t=ld(e),n=ud(e);return dd(t.runSync(t.parse(n),n),e)}function ld(e){let t=e.rehypePlugins||id,n=e.remarkPlugins||id,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ad}:ad;return Ju().use(ul).use(n).use(xu,r).use(t)}function ud(e){let t=e.children||``,n=new Vu;return typeof t==`string`?n.value=t:``+t,n}function dd(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||fd;for(let e of sd)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return du(e,l),Wa(e,{Fragment:F.Fragment,components:i,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in fo)if(Object.hasOwn(fo,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=fo[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function fd(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||od.test(e.slice(0,t))?e:``}function pd(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function md(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function hd(e,t,n){let r=eu((n||{}).ignore||[]),i=gd(t),a=-1;for(;++a<i.length;)lu(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function gd(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([_d(e[0]),vd(e[1])])}return t}function _d(e){return typeof e==`string`?new RegExp(md(e),`g`):e}function vd(e){return typeof e==`function`?e:function(){return e}}var $=`phrasing`,yd=[`autolink`,`link`,`image`,`label`];function bd(){return{transforms:[Od],enter:{literalAutolink:Sd,literalAutolinkEmail:Cd,literalAutolinkHttp:Cd,literalAutolinkWww:Cd},exit:{literalAutolink:Dd,literalAutolinkEmail:Ed,literalAutolinkHttp:wd,literalAutolinkWww:Td}}}function xd(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:$,notInConstruct:yd},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:$,notInConstruct:yd},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:$,notInConstruct:yd}]}}function Sd(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Cd(e){this.config.enter.autolinkProtocol.call(this,e)}function wd(e){this.config.exit.autolinkProtocol.call(this,e)}function Td(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Ed(e){this.config.exit.autolinkEmail.call(this,e)}function Dd(e){this.exit(e)}function Od(e){hd(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,kd],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ad]],{ignore:[`link`,`linkReference`]})}function kd(e,t,n,r,i){let a=``;if(!Nd(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!jd(n)))return!1;let o=Md(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Ad(e,t,n,r){return!Nd(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function jd(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Md(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=pd(e,`(`),a=pd(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Nd(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Io(n)||Fo(n))&&(!t||n!==47)}Ud.peek=Hd;function Pd(){this.buffer()}function Fd(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Id(){this.buffer()}function Ld(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Rd(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Do(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zd(e){this.exit(e)}function Bd(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Do(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vd(e){this.exit(e)}function Hd(){return`[`}function Ud(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Wd(){return{enter:{gfmFootnoteCallString:Pd,gfmFootnoteCall:Fd,gfmFootnoteDefinitionLabelString:Id,gfmFootnoteDefinition:Ld},exit:{gfmFootnoteCallString:Rd,gfmFootnoteCall:zd,gfmFootnoteDefinitionLabelString:Bd,gfmFootnoteDefinition:Vd}}}function Gd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ud},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
38
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?qd:Kd))),s(),o}}function Kd(e,t,n){return t===0?e:qd(e,t,n)}function qd(e,t,n){return(n?``:` `)+e}var Jd=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];$d.peek=ef;function Yd(){return{canContainEols:[`delete`],enter:{strikethrough:Zd},exit:{strikethrough:Qd}}}function Xd(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Jd}],handlers:{delete:$d}}}function Zd(e){this.enter({type:`delete`,children:[]},e)}function Qd(e){this.exit(e)}function $d(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function ef(){return`~`}function tf(e){return e.length}function nf(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||tf,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=rf(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=af(r[d]);else{let e=af(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
39
|
+
`)}function rf(e){return e==null?``:String(e)}function af(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function of(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),sf);return i(),o}function sf(e,t,n){return`>`+(n?``:` `)+e}function cf(e,t){return lf(e,t.inConstruct,!0)&&!lf(e,t.notInConstruct,!1)}function lf(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function uf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
40
|
+
`&&cf(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
41
|
+
`}function df(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function ff(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function pf(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function mf(e,t,n,r){let i=pf(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(ff(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,hf);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(df(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
42
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
43
|
+
`),a&&(u+=s.move(a+`
|
|
44
|
+
`)),u+=s.move(c),l(),u}function hf(e,t,n){return(n?``:` `)+e}function gf(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _f(e,t,n,r){let i=gf(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
45
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function vf(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function yf(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function bf(e,t,n){let r=Go(e),i=Go(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}xf.peek=Sf;function xf(e,t,n,r){let i=vf(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=bf(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=yf(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=bf(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+yf(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Sf(e,t,n){return n.options.emphasis||`*`}function Cf(e,t){let n=!1;return du(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&mo(e)&&(t.options.setext||n))}function wf(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Cf(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
46
|
+
`,after:`
|
|
47
|
+
`});return r(),t(),o+`
|
|
48
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
49
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
50
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=yf(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Tf.peek=Ef;function Tf(e){return e.value||``}function Ef(){return`<`}Df.peek=Of;function Df(e,t,n,r){let i=gf(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Of(){return`!`}kf.peek=Af;function kf(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Af(){return`!`}jf.peek=Mf;function jf(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Mf(){return"`"}function Nf(e,t){let n=mo(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Pf.peek=Ff;function Pf(e,t,n,r){let i=gf(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Nf(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Ff(e,t,n){return Nf(e,n)?`<`:`[`}If.peek=Lf;function If(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Lf(){return`[`}function Rf(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function zf(e){let t=Rf(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Bf(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Vf(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Hf(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Bf(n):Rf(n),s=e.ordered?o===`.`?`)`:`.`:zf(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Vf(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Uf(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Wf(e,t,n,r){let i=Uf(n),a=n.bulletCurrent||Rf(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Gf(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Kf=eu([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function qf(e,t,n,r){return(e.children.some(function(e){return Kf(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Jf(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Yf.peek=Xf;function Yf(e,t,n,r){let i=Jf(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=bf(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=yf(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=bf(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+yf(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Xf(e,t,n){return n.options.strong||`*`}function Zf(e,t,n,r){return n.safe(e.value,r)}function Qf(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $f(e,t,n){let r=(Vf(n)+(n.options.ruleSpaces?` `:``)).repeat(Qf(n));return n.options.ruleSpaces?r.slice(0,-1):r}var ep={blockquote:of,break:uf,code:mf,definition:_f,emphasis:xf,hardBreak:uf,heading:wf,html:Tf,image:Df,imageReference:kf,inlineCode:jf,link:Pf,linkReference:If,list:Hf,listItem:Wf,paragraph:Gf,root:qf,strong:Yf,text:Zf,thematicBreak:$f};function tp(){return{enter:{table:np,tableData:op,tableHeader:op,tableRow:ip},exit:{codeText:sp,table:rp,tableData:ap,tableHeader:ap,tableRow:ap}}}function np(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function rp(e){this.exit(e),this.data.inTable=void 0}function ip(e){this.enter({type:`tableRow`,children:[]},e)}function ap(e){this.exit(e)}function op(e){this.enter({type:`tableCell`,children:[]},e)}function sp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cp));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cp(e,t){return t===`|`?t:e}function lp(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
51
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
52
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return nf(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ep.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function up(){return{exit:{taskListCheckValueChecked:fp,taskListCheckValueUnchecked:fp,paragraph:pp}}}function dp(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:mp}}}function fp(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function pp(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function mp(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=ep.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function hp(){return[bd(),Wd(),Yd(),tp(),up()]}function gp(e){return{extensions:[xd(),Gd(e),Xd(),lp(e),dp()]}}var _p={tokenize:jp,partial:!0},vp={tokenize:Mp,partial:!0},yp={tokenize:Np,partial:!0},bp={tokenize:Pp,partial:!0},xp={tokenize:Fp,partial:!0},Sp={name:`wwwAutolink`,tokenize:kp,previous:Ip},Cp={name:`protocolAutolink`,tokenize:Ap,previous:Lp},wp={name:`emailAutolink`,tokenize:Op,previous:Rp},Tp={};function Ep(){return{text:Tp}}for(var Dp=48;Dp<123;)Tp[Dp]=wp,Dp++,Dp===58?Dp=65:Dp===91&&(Dp=97);Tp[43]=wp,Tp[45]=wp,Tp[46]=wp,Tp[95]=wp,Tp[72]=[wp,Cp],Tp[104]=[wp,Cp],Tp[87]=[wp,Sp],Tp[119]=[wp,Sp];function Op(e,t,n){let r=this,i,a;return o;function o(t){return!zp(t)||!Rp.call(r,r.previous)||Bp(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return zp(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(xp,u,l)(t):t===45||t===95||G(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Oo(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function kp(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ip.call(r,r.previous)||Bp(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(_p,e.attempt(vp,e.attempt(yp,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Ap(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Lp.call(r,r.previous)&&!Bp(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Oo(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Ao(t)||Po(t)||Io(t)||Fo(t)?n(t):e.attempt(vp,e.attempt(yp,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function jp(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Mp(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(bp,c,s)(t):t===null||Po(t)||Io(t)||t!==45&&Fo(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Np(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(bp,t,a)(o):o===null||Po(o)||Io(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Pp(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Po(o)||Io(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Po(e)||Io(e)?t(e):r(e)}function a(e){return Oo(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Oo(t)?(e.consume(t),o):n(t)}}function Fp(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return G(e)?n(e):t(e)}}function Ip(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Po(e)}function Lp(e){return!Oo(e)}function Rp(e){return!(e===47||zp(e))}function zp(e){return e===43||e===45||e===46||e===95||G(e)}function Bp(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Vp={tokenize:Yp,partial:!0};function Hp(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Kp,continuation:{tokenize:qp},exit:Jp}},text:{91:{name:`gfmFootnoteCall`,tokenize:Gp},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Up,resolveTo:Wp}}}}function Up(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Do(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Wp(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Gp(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Po(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Do(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Po(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Kp(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Po(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Do(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Po(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),J(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function qp(e,t,n){return e.check($o,t,e.attempt(Vp,t,n))}function Jp(e){e.exit(`gfmFootnoteDefinition`)}function Yp(e,t,n){let r=this;return J(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Xp(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&bo(o,o.length,0,Ko(s,e.slice(r+1,n),t)),bo(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),bo(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Go(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Go(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Zp=class{constructor(){this.map=[]}add(e,t,n){Qp(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Qp(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function $p(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function em(){return{flow:{null:{name:`table`,tokenize:tm,resolveAll:nm}}}}function tm(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):K(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):q(t)?J(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Po(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,q(t)?J(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return q(t)?J(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return q(t)?J(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||K(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K(n)?(e.exit(`tableRow`),t(n)):q(n)?J(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Po(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function nm(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Zp;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(im(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=rm(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=rm(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=rm(f,t,o,i,n,d)):(o[0]=o[1],d=rm(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&im(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=$p(t.events,n))}return e}function rm(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},am(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=am(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=am(t.events,n[2]),a=am(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},am(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function im(e,t,n,r,i){let a=[],o=am(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function am(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var om={name:`tasklistCheck`,tokenize:cm};function sm(){return{text:{91:om}}}function cm(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Po(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K(r)?t(r):q(r)?e.check({tokenize:lm},t,n)(r):n(r)}}function lm(e,t,n){return J(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function um(e){return Co([Ep(),Hp(),Xp(e),em(),sm()])}var dm={};function fm(e){let t=this,n=e||dm,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(um(n)),a.push(hp()),o.push(gp(n))}var pm=null,mm=()=>(pm??=Hr(()=>import(`./mermaid.core-DwdP6CFg.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])),pm),hm=e=>e===`light`?`default`:`dark`;function gm({chart:e}){let t=(0,P.useRef)(null),n=(0,P.useId)().replace(/:/g,`-`),[r,i]=(0,P.useState)(()=>x()),[a,o]=(0,P.useState)(null),s=hm(r);return(0,P.useEffect)(()=>{let e=document.documentElement,t=()=>{let e=x();i(t=>t===e?t:e)};t();let n=new MutationObserver(e=>{e.some(e=>e.attributeName===`data-theme`)&&t()});return n.observe(e,{attributes:!0,attributeFilter:[`data-theme`]}),()=>{n.disconnect()}},[]),(0,P.useEffect)(()=>{let r=!1,i=t.current;return(async()=>{if(i){i.innerHTML=``,o(null);try{let{default:t}=await mm();t.initialize({startOnLoad:!1,securityLevel:`strict`,theme:s});let{svg:a,bindFunctions:o}=await t.render(`mermaid-diagram-${n}`,e);if(r)return;i.innerHTML=a,o?.(i)}catch(e){if(r)return;i.innerHTML=``,o(e instanceof Error?e.message:`Failed to render Mermaid diagram`)}}})(),()=>{r=!0,i&&(i.innerHTML=``)}},[e,n,s]),a?(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsx)(`div`,{className:`text-sm text-github-danger`,title:a,children:`Unable to render Mermaid diagram.`}),(0,F.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})]}):(0,F.jsx)(`div`,{ref:t,"aria-label":`Mermaid diagram`,className:`mermaid-diagram overflow-x-auto rounded border border-github-border bg-github-bg-secondary p-3`})}var _m=({mode:e,hasFullPreview:t,onModeChange:n})=>(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsxs)(`button`,{onClick:()=>n(`diff`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${e===`diff`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Code Diff`,children:[(0,F.jsx)(it,{size:14}),`Diff`]}),(0,F.jsxs)(`button`,{onClick:()=>n(`diff-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${e===`diff-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Diff Preview`,children:[(0,F.jsx)(rt,{size:14}),`Diff Preview`]}),t&&(0,F.jsxs)(`button`,{onClick:()=>n(`full-preview`),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${e===`full-preview`?`text-github-text-primary`:`text-github-text-secondary hover:text-github-text-primary`}`,title:`Full Preview`,children:[(0,F.jsx)(rt,{size:14}),`Full Preview`]})]}),vm=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends vm{};function ym(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function bm(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function xm(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function Sm(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Cm(e,t){return xm(e,t,``)}function wm(e,t){return Sm(e,t,``)}function Tm(e,t){return t.slice(0,Em(e,t))}function Em(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function Dm(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function Om(e,t){if(t)return Am(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function km(e,t){if(t)return Am(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function Am(e,t){if(!t)return[km(e),Om(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=Dm(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var jm=`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}`,Mm=RegExp(`[${jm}]+|\\s+|[^${jm}]`,`ug`),Nm=new class extends vm{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=Dm(e,r)}else n=e.match(Mm)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&Fm(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&Fm(n,i,r,null,t.intlSegmenter),e}};function Pm(e,t,n){return n?.ignoreWhitespace!=null&&!n.ignoreWhitespace?Lm(e,t,n):Nm.diff(e,t,n)}function Fm(e,t,n,r,i){if(t&&n){let[a,o]=Am(t.value,i),[s,c]=Am(n.value,i);if(e){let r=ym(a,s);e.value=Sm(e.value,s,r),t.value=Cm(t.value,r),n.value=Cm(n.value,r)}if(r){let e=bm(o,c);r.value=xm(r.value,c,e),t.value=wm(t.value,e),n.value=wm(n.value,e)}}else if(n){if(e){let e=km(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=km(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=km(r.value,i),[a,o]=Am(t.value,i),s=ym(n,a);t.value=Cm(t.value,s);let c=bm(Cm(n,s),o);t.value=wm(t.value,c),r.value=xm(r.value,n,c),e.value=Sm(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=km(r.value,i),n=Tm(Om(t.value,i),e);t.value=wm(t.value,n)}else if(e){let n=Tm(Om(e.value,i),km(t.value,i));t.value=Cm(t.value,n)}}var Im=new class extends vm{tokenize(e){let t=RegExp(`(\\r?\\n)|[${jm}]+|[^\\S\\n\\r]+|[^${jm}]`,`ug`);return e.match(t)||[]}};function Lm(e,t,n){return Im.diff(e,t,n)}var Rm=new class extends vm{constructor(){super(...arguments),this.tokenize=Bm}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
53
|
+
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
54
|
+
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|
|
55
|
+
`)&&(e=e.slice(0,-1)),t.endsWith(`
|
|
56
|
+
`)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function zm(e,t,n){return Rm.diff(e,t,n)}function Bm(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
57
|
+
`));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function Vm(e){return e==`.`||e==`!`||e==`?`}new class extends vm{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(Vm(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends vm{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends vm{constructor(){super(...arguments),this.tokenize=Bm}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(Hm(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function Hm(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=Hm(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=Hm(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends vm{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function Um(e,t){let n=Lm(e,t),r=[],i=[];for(let e of n)e.added?i.push({value:e.value,type:`added`}):e.removed?r.push({value:e.value,type:`removed`}):(r.push({value:e.value,type:`unchanged`}),i.push({value:e.value,type:`unchanged`}));return{oldSegments:r,newSegments:i}}function Wm(e,t){if(!e.trim()||!t.trim()||e===t)return!1;let n=Pm(e,t),r=0,i=0;for(let e of n)i+=e.value.length,!e.added&&!e.removed&&(r+=e.value.length);return r/i>=.2}var Gm=P.memo(({onMouseDown:e,onMouseUp:t,title:n=`Add a comment`})=>(0,F.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:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-yellow-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-yellow-btn-border)`},onMouseDown:e,onMouseUp:t,title:n,children:(0,F.jsx)(xt,{className:`w-4 h-4`})}));Gm.displayName=`CommentButton`;var Km=P.memo(({onClick:e,title:t=`Open in editor`,className:n})=>(0,F.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 ${n||``}`,"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:e=>{e.currentTarget.style.backgroundColor=`var(--color-editor-btn-hover-bg)`,e.currentTarget.style.borderColor=`var(--color-editor-btn-hover-border)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`var(--color-editor-btn-bg)`,e.currentTarget.style.borderColor=`var(--color-editor-btn-border)`},onMouseDown:e=>{e.stopPropagation()},onClick:t=>{t.stopPropagation(),e(t)},title:t,children:(0,F.jsx)(nt,{className:`w-4 h-4 opacity-80`})}));Km.displayName=`OpenInEditorButton`;var qm=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`}},Jm=P.memo(({line:e,index:t,lineId:n,isCurrentLine:r=!1,hoveredLineIndex:i,selectedLineStyle:a,onMouseEnter:o,onMouseLeave:s,onMouseMove:c,onCommentButtonMouseDown:l,onCommentButtonMouseUp:u,onOpenInEditor:d,syntaxTheme:f,onClick:p,filename:m,diffSegments:h})=>{let g=e.newLineNumber||e.oldLineNumber,_=i===t&&g,v=r?`keyboard-cursor`:``;return(0,F.jsxs)(`tr`,{id:n,className:`group ${qm(e)} relative ${a} ${v} cursor-pointer`,onMouseEnter:o,onMouseLeave:s,onMouseMove:c,onClick:p,children:[(0,F.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||``}),(0,F.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:[(0,F.jsx)(`span`,{children:e.newLineNumber||``}),_&&(0,F.jsxs)(F.Fragment,{children:[d&&(0,F.jsx)(Km,{onClick:d}),(0,F.jsx)(Gm,{onMouseDown:l,onMouseUp:u})]})]}),(0,F.jsx)(`td`,{className:`p-0 w-full relative align-top`,children:(0,F.jsx)(di,{line:e,syntaxTheme:f,filename:m,diffSegments:h})})]})});Jm.displayName=`DiffLineRow`;var Ym=e=>e!==void 0&&`isExpanded`in e&&e.isExpanded===!0,Xm=(e,t)=>t?`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 Zm({chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r=!1,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u,cursor:d=null,fileIndex:f=0,onLineClick:p,commentTrigger:m,onCommentTriggerHandled:h,filename:g,onOpenInEditor:_}){let{getOldTokens:v,getNewTokens:y}=Mn(),[b,x]=(0,P.useState)(null),[S,C]=(0,P.useState)(null),[w,T]=(0,P.useState)(!1),[E,D]=(0,P.useState)(null),[O,k]=(0,P.useState)(null);(0,P.useEffect)(()=>{if(m?.lineIndex!==void 0){let t=e.lines[m.lineIndex];if(t&&t.type!==`delete`){let e=t.newLineNumber;e&&(D({side:`new`,lineNumber:e}),h?.())}}},[m,e.lines,h]),(0,P.useEffect)(()=>{if(w){let e=()=>{T(!1),x(null),C(null)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}}},[w]);let A=(0,P.useCallback)((e,t)=>{E?.side===e&&E?.lineNumber===t?D(null):D({side:e,lineNumber:t})},[E]),j=(0,P.useCallback)(()=>{D(null)},[]),M=(0,P.useCallback)(()=>{if(!E)return``;let{side:t,lineNumber:n}=E,r=e.lines;if(typeof n==`number`)return r.find(e=>t===`old`?e.oldLineNumber===n:e.newLineNumber===n)?.content??``;{let[e,i]=n;return r.filter(n=>{let r=t===`old`?n.oldLineNumber:n.newLineNumber;return r!==void 0&&r>=e&&r<=i}).map(e=>e.content??``).join(`
|
|
58
|
+
`)}},[E,e.lines]),N=(0,P.useCallback)(async e=>{if(E!==null){let t=M();await i(E.lineNumber,e,t,E.side),D(null)}},[E,i,M]),ee=(0,P.useCallback)((e,t)=>{if(t==null)return null;let n=e?.(t)??null;return n?[n]:null},[]),te=(e,t)=>n.filter(n=>{let r=Array.isArray(n.line)?n.line[1]===e:n.line===e,i=!n.side||n.side===t;return r&&i}).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),ne=e=>e.oldLine?.type===`delete`&&e.newLine?.type===`add`?e.newLineNumber?`right`:`left`:e.oldLine?.type===`delete`?`left`:e.newLine?.type===`add`?`right`:`full`,re=(e,t)=>{let n=e===`old`?t.oldLineNumber:t.newLineNumber;if(!n)return``;if(w&&b&&S&&b.side===e&&S.side===e){let e=Math.min(b.lineNumber,S.lineNumber),t=Math.max(b.lineNumber,S.lineNumber);if(n>=e&&n<=t){let r=`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 n===e&&(r+=` after:border-t-2`),n===t&&(r+=` after:border-b-2`),r}}if(E&&E.side===e){let e=Array.isArray(E.lineNumber)?E.lineNumber:[E.lineNumber,E.lineNumber],t=e[0],r=e[1];if(t!==void 0&&r!==void 0&&n>=t&&n<=r)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``},ie=(0,P.useCallback)(t=>{let n=[],r=e.oldStart,i=e.newStart,a=0;for(;a<t.length;){let e=t[a];if(!e){a++;continue}if(e.type===`normal`)n.push({oldLine:e,newLine:{...e},oldLineNumber:e.oldLineNumber??r,newLineNumber:e.newLineNumber??i,oldLineOriginalIndex:a,newLineOriginalIndex:a}),r++,i++,a++;else if(e.type===`delete`){let e=a+1;for(;e<t.length&&t[e]?.type===`delete`;)e++;let o=t.slice(a,e),s=a,c=[],l=e;for(;e<t.length&&t[e]?.type===`add`;){let n=t[e];n&&c.push(n),e++}let u=Math.max(o.length,c.length);for(let e=0;e<u;e++){let t=o[e],a=c[e],u;t&&a&&Wm(t.content,a.content)&&(u=Um(t.content,a.content)),n.push({oldLine:t,newLine:a,oldLineNumber:t?t.oldLineNumber??r+e:void 0,newLineNumber:a?a.newLineNumber??i+e:void 0,oldLineOriginalIndex:t?s+e:void 0,newLineOriginalIndex:a?l+e:void 0,wordLevelDiff:u})}r+=o.length,i+=c.length,a=e}else e.type===`add`&&(n.push({newLine:e,newLineNumber:e.newLineNumber??i,newLineOriginalIndex:a}),i++,a++)}return n},[e.oldStart,e.newStart]);return(0,F.jsx)(`div`,{className:`bg-github-bg-primary overflow-hidden`,children:(0,F.jsx)(`table`,{className:`w-full table-fixed border-collapse font-mono text-sm leading-5`,children:(0,F.jsx)(`tbody`,{children:(0,P.useMemo)(()=>ie(e.lines),[e.lines,ie]).map((e,n)=>{let i=e.oldLineNumber?te(e.oldLineNumber,`old`):[],m=e.newLineNumber?te(e.newLineNumber,`new`):[],h=[...i,...m],D=e.oldLineOriginalIndex??-1,ie=e.newLineOriginalIndex??-1,ae=d?d.side===`left`&&D>=0?d.chunkIndex===t&&d.lineIndex===D:d.side===`right`&&ie>=0?d.chunkIndex===t&&d.lineIndex===ie:!1:!1,oe=D>=0?`file-${f}-chunk-${t}-line-${D}-left`:void 0,I=ie>=0?`file-${f}-chunk-${t}-line-${ie}-right`:void 0,se=ae&&d?.side===`left`,ce=ae&&d?.side===`right`,le=`keyboard-cursor`;return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsxs)(`tr`,{className:`group cursor-pointer`,onClick:e=>{if(!w){let n=e.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&D>=0?p?.(f,t,D,`left`):i&&ie>=0&&p?.(f,t,ie,`right`)}},onMouseEnter:t=>{let n=t.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&e.oldLineNumber?k({side:`old`,lineNumber:e.oldLineNumber}):i&&e.newLineNumber&&k({side:`new`,lineNumber:e.newLineNumber})},onMouseMove:t=>{let n=t.target;if(!(n instanceof HTMLElement))return;let r=n.closest(`td:nth-child(1)`)||n.closest(`td:nth-child(2)`),i=n.closest(`td:nth-child(3)`)||n.closest(`td:nth-child(4)`);r&&e.oldLineNumber?(O?.side!==`old`||O?.lineNumber!==e.oldLineNumber)&&k({side:`old`,lineNumber:e.oldLineNumber}):i&&e.newLineNumber&&(O?.side!==`new`||O?.lineNumber!==e.newLineNumber)&&k({side:`new`,lineNumber:e.newLineNumber}),w&&b&&(b.side===`old`&&e.oldLineNumber?C({side:`old`,lineNumber:e.oldLineNumber}):b.side===`new`&&e.newLineNumber&&C({side:`new`,lineNumber:e.newLineNumber}))},onMouseLeave:()=>k(null),children:[(0,F.jsxs)(`td`,{id:oe,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 ${se?le:``}`,children:[(0,F.jsx)(`span`,{children:e.oldLineNumber||``}),O?.side===`old`&&O?.lineNumber===e.oldLineNumber&&(0,F.jsxs)(F.Fragment,{children:[_&&g&&e.oldLine?.type!==`delete`&&e.newLineNumber!==void 0&&(0,F.jsx)(Km,{onClick:()=>{let t=e.newLineNumber;!g||t===void 0||_(g,t)}}),(0,F.jsx)(Gm,{onMouseDown:t=>{t.stopPropagation(),e.oldLineNumber&&(x({side:`old`,lineNumber:e.oldLineNumber}),C({side:`old`,lineNumber:e.oldLineNumber}),T(!0))},onMouseUp:t=>{if(t.stopPropagation(),!e.oldLineNumber||!b){T(!1),x(null),C(null);return}let n=S&&S.side===`old`?S.lineNumber:e.oldLineNumber;b.side!==`old`||b.lineNumber===n?A(`old`,e.oldLineNumber):A(`old`,[Math.min(b.lineNumber,n),Math.max(b.lineNumber,n)]),T(!1),x(null),C(null)}})]})]}),(0,F.jsx)(`td`,{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Xm(e.oldLine,Ym(e.oldLine))} ${re(`old`,e)} ${se?le:``}`,children:e.oldLine&&(0,F.jsx)(`div`,{"data-diff-search-text":`true`,className:`flex items-center relative min-h-[20px] px-3`,children:e.wordLevelDiff?(0,F.jsx)(ci,{segments:e.wordLevelDiff.oldSegments,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,F.jsx)(si,{code:e.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:u,filename:g,precomputedTokens:ee(v,e.oldLine.oldLineNumber)})})}),(0,F.jsxs)(`td`,{id:I,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 ${ce?le:``}`,children:[(0,F.jsx)(`span`,{children:e.newLineNumber||``}),O?.side===`new`&&O?.lineNumber===e.newLineNumber&&(0,F.jsxs)(F.Fragment,{children:[_&&g&&e.newLineNumber!==void 0&&(0,F.jsx)(Km,{onClick:()=>{let t=e.newLineNumber;!g||t===void 0||_(g,t)}}),(0,F.jsx)(Gm,{onMouseDown:t=>{t.stopPropagation(),e.newLineNumber&&(x({side:`new`,lineNumber:e.newLineNumber}),C({side:`new`,lineNumber:e.newLineNumber}),T(!0))},onMouseUp:t=>{if(t.stopPropagation(),!e.newLineNumber||!b){T(!1),x(null),C(null);return}let n=S&&S.side===`new`?S.lineNumber:e.newLineNumber;b.side!==`new`||b.lineNumber===n?A(`new`,e.newLineNumber):A(`new`,[Math.min(b.lineNumber,n),Math.max(b.lineNumber,n)]),T(!1),x(null),C(null)}})]})]}),(0,F.jsx)(`td`,{className:`w-1/2 p-0 align-top relative ${Xm(e.newLine,Ym(e.newLine))} ${re(`new`,e)} ${ce?le:``}`,children:e.newLine&&(0,F.jsx)(`div`,{"data-diff-search-text":`true`,className:`flex items-center relative min-h-[20px] px-3`,children:e.wordLevelDiff?(0,F.jsx)(ci,{segments:e.wordLevelDiff.newSegments,className:`flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text`}):(0,F.jsx)(si,{code:e.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:u,filename:g,precomputedTokens:ee(y,e.newLine.newLineNumber)})})})]}),h.length>0&&(0,F.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,F.jsx)(`td`,{colSpan:4,className:`p-0 border-t border-github-border`,children:h.map(t=>{let n=t.side||`new`,i;return i=n===`old`&&e.oldLineNumber?`left`:n===`new`&&e.newLineNumber?`right`:ne(e),(0,F.jsx)(`div`,{className:`flex ${i===`left`?`justify-start`:i===`right`?`justify-end`:`justify-center`}`,children:(0,F.jsx)(`div`,{className:`${i===`full`?`w-full`:`w-1/2`}`,children:(0,F.jsx)(`div`,{className:`m-2 mx-3`,children:(0,F.jsx)(xi,{thread:t,showAuthorBadges:r,onGeneratePrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:u})})})},t.id)})})}),E&&(E.side===`old`&&E.lineNumber===e.oldLineNumber||E.side===`new`&&E.lineNumber===e.newLineNumber||Array.isArray(E.lineNumber)&&(E.side===`new`&&E.lineNumber[1]===e.newLineNumber||E.side===`old`&&E.lineNumber[1]===e.oldLineNumber))&&(0,F.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,F.jsx)(`td`,{colSpan:4,className:`p-0`,children:(0,F.jsx)(`div`,{className:`flex ${E.side===`old`?`justify-start`:E.side===`new`?`justify-end`:`justify-center`}`,children:(0,F.jsx)(`div`,{className:`w-1/2`,children:(0,F.jsx)(yi,{onSubmit:N,onCancel:j,selectedCode:M(),syntaxTheme:u,filename:g})})})})})]},n)})})})})}var Qm=(0,P.memo)(function({chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r=!1,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,mode:u=zt,syntaxTheme:d,cursor:f=null,fileIndex:p=0,onLineClick:m,commentTrigger:h,onCommentTriggerHandled:g,filename:_,onOpenInEditor:v}){let[y,b]=(0,P.useState)(null),[x,S]=(0,P.useState)(null),[C,w]=(0,P.useState)(!1),[T,E]=(0,P.useState)(null),[D,O]=(0,P.useState)(null);(0,P.useEffect)(()=>{if(h?.lineIndex!==void 0){let t=e.lines[h.lineIndex];if(t){let e=t.newLineNumber||t.oldLineNumber,n=t.type===`delete`?`old`:`new`;e&&(E({side:n,lineNumber:e}),g?.())}}},[h,e.lines,g]),(0,P.useEffect)(()=>{if(C){let e=()=>{w(!1),b(null),S(null)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}}},[C]);let k=(0,P.useCallback)((e,t)=>{T?.side===e&&T?.lineNumber===t?E(null):E({side:e,lineNumber:t})},[T]),A=(0,P.useCallback)(()=>{E(null)},[]),j=(0,P.useCallback)(()=>{if(!T)return``;let{side:t,lineNumber:n}=T,r=e.lines;if(typeof n==`number`)return r.find(e=>t===`old`?e.oldLineNumber===n:e.newLineNumber===n)?.content??``;{let[e,i]=n;return r.filter(n=>{let r=t===`old`?n.oldLineNumber:n.newLineNumber;return r!==void 0&&r>=e&&r<=i}).map(e=>e.content??``).join(`
|
|
59
|
+
`)}},[T,e.lines]),M=(0,P.useCallback)(async e=>{if(T!==null){let t=j();await i(T.lineNumber,e,t,T.side),E(null)}},[T,i,j]),N=(e,t)=>n.filter(n=>{let r=Array.isArray(n.line)?n.line[1]===e:n.line===e,i=!n.side||n.side===t;return r&&i}).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),ee=e=>{if(u===`unified`)return`full`;switch(e.type){case`delete`:return`left`;case`add`:return`right`;default:return`full`}},te=(e,t)=>{if(!e)return``;if(C&&y&&x&&e>=Math.min(y,x)&&e<=Math.max(y,x))return`diff-line-dragging`;if(T&&T.side===t){let t=Array.isArray(T.lineNumber)?T.lineNumber[0]:T.lineNumber,n=Array.isArray(T.lineNumber)?T.lineNumber[1]:T.lineNumber;if(e>=t&&e<=n)return`diff-line-selected`}return``},ne=(0,P.useMemo)(()=>{let t=new Map,n=e.lines,r=0;for(;r<n.length;){let e=n[r];if(!e){r++;continue}if(e.type===`delete`){let e=r+1;for(;e<n.length&&n[e]?.type===`delete`;)e++;let i=n.slice(r,e),a=r,o=[];for(;e<n.length&&n[e]?.type===`add`;){let t=n[e];t&&o.push({line:t,index:e}),e++}let s=Math.max(i.length,o.length);for(let e=0;e<s;e++){let n=i[e],r=o[e];if(n&&r&&Wm(n.content,r.line.content)){let i=Um(n.content,r.line.content);t.set(a+e,i.oldSegments),t.set(r.index,i.newSegments)}}r=e}else r++}return t},[e.lines]);return u===`split`?(0,F.jsx)(Zm,{chunk:e,chunkIndex:t,threads:n,showAuthorBadges:r,onAddComment:i,onGenerateThreadPrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,onOpenInEditor:v,syntaxTheme:d,cursor:f,fileIndex:p,onLineClick:m,filename:_,commentTrigger:h,onCommentTriggerHandled:g}):(0,F.jsx)(`div`,{className:`bg-github-bg-primary`,children:(0,F.jsx)(`table`,{className:`w-full table-fixed border-collapse font-mono text-sm leading-5`,children:(0,F.jsx)(`tbody`,{children:e.lines.map((e,n)=>{let i=e.newLineNumber||e.oldLineNumber||0,u=e.type===`delete`?`old`:`new`,h=T?Array.isArray(T.lineNumber)?T.lineNumber[1]:T.lineNumber:null,g=e.type===`delete`?e.oldLineNumber:e.newLineNumber,E=e.type===`delete`?`old`:`new`,re=g?N(g,E):[],ie=`file-${p}-chunk-${t}-line-${n}`,ae=f&&f.chunkIndex===t&&f.lineIndex===n;return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(Jm,{line:e,index:n,lineId:ie,isCurrentLine:ae||!1,hoveredLineIndex:D,selectedLineStyle:te(e.newLineNumber||e.oldLineNumber,e.type===`delete`?`old`:`new`),onMouseEnter:()=>{O(n)},onMouseLeave:()=>O(null),onMouseMove:()=>{if(C&&y){let t=e.newLineNumber||e.oldLineNumber;t&&S(t)}},onCommentButtonMouseDown:t=>{t.stopPropagation();let n=e.newLineNumber||e.oldLineNumber;n&&(b(n),S(n),w(!0))},onCommentButtonMouseUp:t=>{t.stopPropagation();let n=e.newLineNumber||e.oldLineNumber,r=e.type===`delete`?`old`:`new`;if(!n||!y){w(!1),b(null),S(null);return}let i=x||n;y===i?k(r,n):k(r,[Math.min(y,i),Math.max(y,i)]),w(!1),b(null),S(null)},onOpenInEditor:v&&_&&e.type!==`delete`&&(e.newLineNumber||e.oldLineNumber)?()=>{let t=e.newLineNumber||e.oldLineNumber;t&&_&&v(_,t)}:void 0,syntaxTheme:d,filename:_,diffSegments:ne.get(n),onClick:()=>{let r=e.type===`delete`?`left`:`right`;m?.(p,t,n,r)}}),re.map(t=>{let n=ee(e);return(0,F.jsx)(`tr`,{className:`bg-github-bg-secondary`,children:(0,F.jsx)(`td`,{colSpan:3,className:`p-0 border-t border-github-border`,children:(0,F.jsx)(`div`,{className:`flex ${n===`left`?`justify-start`:n===`right`?`justify-end`:`justify-center`}`,children:(0,F.jsx)(`div`,{className:`${n===`full`?`w-full`:`w-1/2`} m-2 mx-4`,children:(0,F.jsx)(xi,{thread:t,showAuthorBadges:r,onGeneratePrompt:a,onRemoveThread:o,onReplyToThread:s,onRemoveMessage:c,onUpdateMessage:l,syntaxTheme:d})})})})},t.id)}),T&&T.side===u&&h===i&&(0,F.jsx)(`tr`,{className:`bg-[var(--bg-secondary)]`,children:(0,F.jsx)(`td`,{colSpan:3,className:`p-0`,children:(0,F.jsx)(`div`,{className:`flex ${ee(e)===`left`?`justify-start`:ee(e)===`right`?`justify-end`:`justify-center`}`,children:(0,F.jsx)(`div`,{className:`${ee(e)===`full`?`w-full`:`w-1/2`}`,children:(0,F.jsx)(yi,{onSubmit:M,onCancel:A,selectedCode:j(),syntaxTheme:d,filename:_})})})})})]},n)})})})})}),$m=20,eh=(0,P.memo)(function({direction:e,hiddenLines:t,onExpandUp:n,onExpandDown:r,onExpandAll:i,isLoading:a=!1}){if(t<=0)return null;let o=`${t} ${t===1?`line`:`lines`}`,s=t<=$m,c=[];return s?c.push({key:`all`,onClick:i,ariaLabel:`Expand all ${t} hidden lines`,icon:(0,F.jsx)(It,{size:16,"aria-hidden":`true`})}):((e===`up`||e===`both`)&&c.push({key:`up`,onClick:n,ariaLabel:`Expand ${$m} hidden lines above`,icon:(0,F.jsx)(He,{size:12,"aria-hidden":`true`,className:`translate-y-0.5`})}),(e===`down`||e===`both`)&&c.push({key:`down`,onClick:r,ariaLabel:`Expand ${$m} hidden lines below`,icon:(0,F.jsx)(Be,{size:12,"aria-hidden":`true`,className:`-translate-y-0.5`})})),(0,F.jsxs)(`div`,{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm grid-cols-[var(--line-number-width)_1fr]`,children:[(0,F.jsx)(`div`,{className:`flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border`,children:a?(0,F.jsx)(yt,{size:14,className:`animate-spin text-github-text-muted self-center`,"aria-hidden":`true`}):c.map(e=>(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,disabled:a||!e.onClick,className:`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`,title:e.ariaLabel,"aria-label":e.ariaLabel,children:e.icon},e.key))}),(0,F.jsx)(`div`,{className:`flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none`,children:o})]})});function th({file:e,threads:t,showAuthorBadges:n,diffMode:r,syntaxTheme:i,cursor:a,fileIndex:o,mergedChunks:s,isExpandLoading:c,expandHiddenLines:l,expandAllBetweenChunks:u,onAddComment:d,onGenerateThreadPrompt:f,onRemoveThread:p,onReplyToThread:m,onRemoveMessage:h,onUpdateMessage:g,onLineClick:_,onOpenInEditor:v,commentTrigger:y,onCommentTriggerHandled:b}){let x=(t,n,r,i)=>t===`top`&&n.hiddenLinesBefore>0?(0,F.jsx)(eh,{direction:`down`,hiddenLines:n.hiddenLinesBefore,onExpandDown:()=>l(e,r,`up`),onExpandAll:()=>u(e,r,n.hiddenLinesBefore),isLoading:c}):t===`middle`&&n.hiddenLinesBefore>0?(0,F.jsx)(eh,{direction:`both`,hiddenLines:n.hiddenLinesBefore,onExpandUp:()=>l(e,r-1,`down`),onExpandDown:()=>l(e,r,`up`),onExpandAll:()=>u(e,r,n.hiddenLinesBefore),isLoading:c}):t===`bottom`&&n.hiddenLinesAfter>0?(0,F.jsx)(eh,{direction:`up`,hiddenLines:n.hiddenLinesAfter,onExpandUp:()=>l(e,i,`down`),onExpandAll:()=>l(e,i,`down`,n.hiddenLinesAfter),isLoading:c}):null;return(0,F.jsx)(F.Fragment,{children:s.map((c,l)=>{let u=l===0,S=l===s.length-1,C=c.originalIndices[0]??0,w=c.originalIndices[c.originalIndices.length-1]??0;return(0,F.jsxs)(P.Fragment,{children:[u&&x(`top`,c,C,w),!u&&x(`middle`,c,C,w),(0,F.jsx)(`div`,{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,`-`)}-${l}`,children:(0,F.jsx)(Qm,{chunk:c,chunkIndex:l,threads:t,showAuthorBadges:n,onAddComment:d,onGenerateThreadPrompt:f,onRemoveThread:p,onReplyToThread:m,onRemoveMessage:h,onUpdateMessage:g,onOpenInEditor:v,mode:r,syntaxTheme:i,cursor:a&&a.chunkIndex===l?a:null,fileIndex:o,onLineClick:_,commentTrigger:y&&y.chunkIndex===l?y:null,onCommentTriggerHandled:b,filename:e.path})}),S&&x(`bottom`,c,C,w)]},l)})})}var nh=e=>!!(e&&e!==`stdin`),rh=[`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`],ih=e=>e.type===`delete`||e.type===`remove`,ah=e=>e.type===`normal`||e.type===`context`,oh=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),sh=(e,t,n)=>{let r=e[e.length-1];if(r&&r.type===t){r.lines.push(n);return}e.push({type:t,lines:[n]})},ch=(e,t)=>{t.forEach(t=>sh(e,`delete`,t)),t.length=0},lh=e=>{let t=[],n=[],r=!1;return e.forEach(e=>{e.lines.forEach(e=>{if(!(e.type===`header`||e.type===`hunk`)){if(ih(e)){n.push(e.content);return}if(e.type===`add`){n.length>0&&(ch(t,n),r=!0),sh(t,r?`change`:`add`,e.content);return}ah(e)&&(ch(t,n),r=!1,sh(t,`context`,e.content))}}),ch(t,n),r=!1}),t},uh=e=>P.isValidElement(e),dh=e=>P.isValidElement(e),fh=e=>e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(fh).join(``):uh(e)?fh(e.props.children):``,ph=e=>({h1:({children:e})=>(0,F.jsx)(`h1`,{className:`${rh[0]} mt-6 mb-2 first:mt-0`,children:e}),h2:({children:e})=>(0,F.jsx)(`h2`,{className:`${rh[1]} mt-6 mb-2 first:mt-0`,children:e}),h3:({children:e})=>(0,F.jsx)(`h3`,{className:`${rh[2]} mt-6 mb-2 first:mt-0`,children:e}),h4:({children:e})=>(0,F.jsx)(`h4`,{className:`${rh[3]} mt-6 mb-2 first:mt-0`,children:e}),h5:({children:e})=>(0,F.jsx)(`h5`,{className:`${rh[4]} mt-6 mb-2 first:mt-0`,children:e}),h6:({children:e})=>(0,F.jsx)(`h6`,{className:`${rh[5]} mt-6 mb-2 first:mt-0`,children:e}),p:({children:e})=>(0,F.jsx)(`p`,{className:`text-base leading-7`,children:e}),ul:({children:e})=>(0,F.jsx)(`ul`,{className:`list-disc pl-6 text-base space-y-1`,children:e}),ol:({children:e})=>(0,F.jsx)(`ol`,{className:`list-decimal pl-6 text-base space-y-1`,children:e}),li:({children:e})=>(0,F.jsx)(`li`,{children:e}),blockquote:({children:e})=>(0,F.jsx)(`blockquote`,{className:`border-l-4 border-github-border pl-4 text-github-text-muted italic`,children:e}),hr:()=>(0,F.jsx)(`hr`,{className:`border-github-border`}),a:({href:e,children:t})=>{let n=e??``;if(!n||!oh(n))return(0,F.jsx)(`span`,{children:t});let r=n.startsWith(`http`);return(0,F.jsx)(`a`,{href:n,target:r?`_blank`:void 0,rel:r?`noreferrer`:void 0,className:`text-sky-400 hover:text-sky-300 underline underline-offset-4`,children:t})},img:({src:e,alt:t})=>{let n=e??``;return!n||!oh(n)?null:(0,F.jsx)(`img`,{src:n,alt:t??``,loading:`lazy`,className:`max-w-full rounded border border-github-border`})},pre:({children:t})=>{let n=(Array.isArray(t)?t:[t]).find(dh),r=fh(n??t),i=/language-(\S+)/.exec(n?.props.className??``)?.[1],a=r.replace(/\n$/,``);return i===`mermaid`&&a.trim()?(0,F.jsx)(gm,{chart:a}):r.trim()?(0,F.jsx)(`pre`,{className:`markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm`,children:(0,F.jsx)(oi,{code:a,language:i,syntaxTheme:e,className:`font-mono text-github-text-primary`})}):(0,F.jsx)(`pre`,{className:`markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm`,children:t})},code:({className:e,children:t})=>e?(0,F.jsx)(`code`,{className:e,children:t}):(0,F.jsx)(`code`,{className:`px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono`,children:t}),table:({children:e})=>(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:e})}),thead:({children:e})=>(0,F.jsx)(`thead`,{className:`bg-github-bg-secondary`,children:e}),tbody:({children:e})=>(0,F.jsx)(`tbody`,{children:e}),tr:({children:e})=>(0,F.jsx)(`tr`,{className:`border-b border-github-border`,children:e}),th:({children:e})=>(0,F.jsx)(`th`,{className:`px-3 py-2 text-left font-semibold border border-github-border`,children:e}),td:({children:e})=>(0,F.jsx)(`td`,{className:`px-3 py-2 border border-github-border`,children:e})}),mh=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`}},hh=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),gh=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),_h=e=>{let t=e.trim();return t.length>=7&&t.startsWith(`<!--`)&&t.endsWith(`-->`)},vh=e=>e.trim()===``||hh(e)||gh(e)||_h(e),yh=e=>e.every(vh),bh=e=>{let t=e.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!t)return null;let n=t[1];return n?{marker:n[0],length:n.length,raw:e}:null},xh=(e,t)=>{let n=e.match(/^\s{0,3}(`{3,}|~{3,})\s*$/);return n?.[1]?n[1][0]===t.marker&&n[1].length>=t.length:!1},Sh=e=>{let t=[],n=null,r=null,i=()=>{n&&=(t.push(n),null)},a=(e,t)=>{if(n?.type===e){n.lines.push(t);return}i(),n={kind:`markdown`,type:e,lines:[t]}},o=e=>{if(!r)return;let n=r.lines.every(e=>e.type===`context`);e&&n?(a(`context`,r.fence.raw),r.lines.forEach(e=>{a(`context`,e.content)}),a(`context`,e)):(i(),t.push({kind:`fenced-code`,lines:r.lines})),r=null};return e.forEach(e=>{e.lines.forEach(t=>{if(r){if(xh(t,r.fence)){o(t);return}r.lines.push({type:e.type,content:t});return}let n=bh(t);if(n){i(),r={fence:n,lines:[]};return}a(e.type,t)})}),o(),i(),t},Ch=e=>{switch(e){case`add`:case`change`:return`border-l-4 border-diff-addition-border bg-diff-addition-bg`;case`delete`:return`border-l-4 border-diff-deletion-border bg-diff-deletion-bg`;default:return`border-l-4 border-transparent`}},wh=({blocks:e,syntaxTheme:t})=>{let n=(0,P.useMemo)(()=>ph(t),[t]);return(0,F.jsx)(`div`,{className:`space-y-4`,children:(0,P.useMemo)(()=>Sh(e),[e]).map((e,t)=>{if(e.kind===`fenced-code`)return(0,F.jsx)(`div`,{className:`px-4`,children:(0,F.jsx)(`div`,{className:`markdown-preview-code overflow-x-auto rounded border border-github-border bg-github-bg-secondary text-sm font-mono text-github-text-primary`,children:e.lines.map((e,n)=>(0,F.jsx)(`div`,{className:`${Ch(e.type)} whitespace-pre px-3 py-1`,children:e.content||` `},`preview-code-line-${t}-${n}`))})},`preview-block-${t}`);let r=e.lines.join(`
|
|
60
|
+
`).trim();if(!r)return null;let i=yh(e.lines);return(0,F.jsx)(`div`,{className:`px-4 ${mh(e.type)}`,children:i?(0,F.jsx)(`pre`,{className:`whitespace-pre-wrap text-sm text-github-text-primary font-mono`,children:r}):(0,F.jsx)(cd,{remarkPlugins:[fm],urlTransform:e=>oh(e)?e:``,components:n,children:r})},`preview-block-${t}`)})})},Th=({content:e,syntaxTheme:t})=>{let n=(0,P.useMemo)(()=>ph(t),[t]);return(0,F.jsx)(`div`,{className:`space-y-4`,children:(0,F.jsx)(cd,{remarkPlugins:[fm],urlTransform:e=>oh(e)?e:``,components:n,children:e})})};function Eh(e){let{file:t,baseCommitish:n,targetCommitish:r,mergedChunks:i,syntaxTheme:a}=e,[o,s]=(0,P.useState)(`diff-preview`),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(null),[m,h]=(0,P.useState)(null),g=(0,P.useMemo)(()=>lh(i),[i]),_=(0,P.useMemo)(()=>!n&&!r?null:t.status===`added`?r?{path:t.path,ref:r}:null:t.status===`deleted`?n?{path:t.oldPath||t.path,ref:n}:null:r?{path:t.path,ref:r}:n?{path:t.oldPath||t.path,ref:n}:null,[n,r,t.path,t.oldPath,t.status]),v=(0,P.useMemo)(()=>_?`${_.ref}:${_.path}`:null,[_]);(0,P.useEffect)(()=>{if(!_||!v||!nh(_.ref)){l(null),h(null),p(null),d(!1);return}let e=!1;return(v!==m||c===null)&&(async()=>{v!==m&&l(null),d(!0),p(null);try{let t=encodeURIComponent(_.path),n=await fetch(`/api/blob/${t}?ref=${encodeURIComponent(_.ref)}`);if(!n.ok)throw Error(`Failed to fetch preview: ${n.statusText}`);let r=await n.text();e||(l(r),h(v))}catch(t){e||(l(null),h(null),p(t instanceof Error?t.message:`Failed to load preview`))}finally{e||d(!1)}})(),()=>{e=!0}},[c,m,_,v]);let y=(0,P.useMemo)(()=>v===m&&c!==null,[c,m,v]);return(0,P.useEffect)(()=>{o===`full-preview`&&!y&&s(`diff-preview`)},[y,o]),(0,F.jsxs)(`div`,{className:`bg-github-bg-primary`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between border-b border-github-border px-4 py-2`,children:(0,F.jsx)(_m,{mode:o,hasFullPreview:y,onModeChange:s})}),o===`diff`&&(0,F.jsx)(th,{...e}),o===`diff-preview`&&(0,F.jsx)(`div`,{className:`p-4`,children:(0,F.jsx)(wh,{blocks:g,syntaxTheme:a})}),o===`full-preview`&&(0,F.jsxs)(`div`,{className:`p-4`,children:[u&&(0,F.jsx)(`div`,{className:`text-sm text-github-text-muted mb-3`,children:`Loading preview...`}),f&&(0,F.jsx)(`div`,{className:`text-sm text-github-danger mb-3`,children:f}),!u&&!f&&c!==null&&(0,F.jsx)(Th,{content:c,syntaxTheme:a}),!u&&!f&&c===null&&(0,F.jsx)(`div`,{className:`text-sm text-github-text-muted`,children:`Preview unavailable.`})]})]})}var Dh=[`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`],Oh={markdown:`Markdown`,code:`Code`,raw:`Raw`,unknown:`Cell`},kh=/"cell_type"\s*:\s*"([^"]+)"/,Ah=/"source"\s*:/,jh=/"execution_count"\s*:\s*(null|[0-9]+)/,Mh=/"id"\s*:\s*"([^"]+)"/,Nh=e=>e.type===`delete`||e.type===`remove`,Ph=e=>e.type===`normal`||e.type===`context`,Fh=e=>e.type===`add`?`add`:Nh(e)?`delete`:Ph(e)?`context`:null,Ih=e=>e===`markdown`||e===`code`||e===`raw`?e:`unknown`,Lh=e=>{let t=e.trim();if(!t.startsWith(`"`))return null;let n=t;n.endsWith(`,`)&&(n=n.slice(0,-1));try{let e=JSON.parse(n);return typeof e==`string`?e:null}catch{return n.replace(/^"/,``).replace(/"$/,``).replace(/\\n/g,`
|
|
61
|
+
`).replace(/\\t/g,` `).replace(/\\"/g,`"`).replace(/\\\\/g,`\\`)}},Rh=e=>{let t=e.indexOf(`"source"`);if(t===-1)return null;let n=e.indexOf(`:`,t);if(n===-1)return null;let r=e.slice(n+1).trim();if(!r)return null;if(r.endsWith(`,`)&&(r=r.slice(0,-1).trim()),r.startsWith(`[`)){let e=r.lastIndexOf(`]`);if(e===-1)return null;let t=r.slice(0,e+1);try{let e=JSON.parse(t);if(Array.isArray(e))return e.filter(e=>typeof e==`string`)}catch{return null}return[]}if(r.startsWith(`"`))try{let e=JSON.parse(r);return typeof e==`string`?[e]:null}catch{return null}return null},zh=e=>{let t=Bh(e);if(t)return t;let n=[],r=null,i=!1,a=!1,o=!1,s=()=>{r&&(r.status=i&&a?`change`:i?`add`:a?`delete`:`context`,n.push(r),r=null,i=!1,a=!1,o=!1)},c=e=>{s(),r={cellType:e,sourceLines:[],status:`context`}};return e.forEach(e=>{e.lines.forEach(e=>{let t=Fh(e);if(!t)return;let n=e.content.match(kh);if(n?c(Ih(n[1]??``)):!r&&Ah.test(e.content)&&c(`unknown`),!r)return;if(t===`add`&&(i=!0),t===`delete`&&(a=!0),!r.id){let t=e.content.match(Mh);t&&(r.id=t[1])}if(r.executionCount===void 0){let t=e.content.match(jh);t&&(r.executionCount=t[1]===`null`?null:t[1])}if(Ah.test(e.content)){let n=Rh(e.content);if(n){n.forEach(e=>{r?.sourceLines.push({type:t,content:e})}),o=!1;return}o=!0;return}if(!o)return;if(e.content.trim().startsWith(`]`)){o=!1;return}let s=Lh(e.content);s!==null&&r.sourceLines.push({type:t,content:s})})}),s(),{cells:n}},Bh=e=>{let t=Vh(e,[`add`,`context`]),n=Vh(e,[`delete`,`context`]),r=Hh(t),i=Hh(n);if(!r&&!i||r&&r.cells.length===0&&!i)return null;let a=r?.language??i?.language;return{cells:Kh(i?.cells??[],r?.cells??[]),language:a}},Vh=(e,t)=>e.flatMap(e=>e.lines).map(e=>{let n=Fh(e);return!n||!t.includes(n)?null:e.content}).filter(e=>e!==null).join(`
|
|
62
|
+
`),Hh=e=>{if(!e.trim())return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||!(`cells`in t))return null;let n=t.cells;if(!Array.isArray(n))return null;let r=t.metadata,i=Uh(r);return{cells:n.map(e=>Wh(e)),language:i}}catch{return null}},Uh=e=>{if(!e||typeof e!=`object`)return;let t=e,n=t.language_info;if(n&&typeof n==`object`){let e=n.name;if(typeof e==`string`&&e.trim())return e}let r=t.kernelspec;if(r&&typeof r==`object`){let e=r.language;if(typeof e==`string`&&e.trim())return e}},Wh=e=>{let t=typeof e==`object`&&e?e:{},n=Ih(typeof t.cell_type==`string`?t.cell_type:``),r=typeof t.id==`string`?t.id:void 0,i=t.execution_count,a=i===null?null:typeof i==`number`?String(i):typeof i==`string`?i:void 0;return{cellType:n,sourceText:Gh(t.source),id:r,executionCount:a}},Gh=e=>typeof e==`string`?e:Array.isArray(e)?e.filter(e=>typeof e==`string`).join(``):``,Kh=(e,t)=>{let n=[];if(e.some(e=>!!e.id)||t.some(e=>!!e.id)){let r=new Map;e.forEach((e,t)=>{e.id&&r.set(e.id,{cell:e,index:t})});let i=new Set;return t.forEach(e=>{let t=e.id?r.get(e.id):void 0;t&&i.add(t.index),n.push(qh(t?.cell??null,e))}),e.forEach((e,t)=>{i.has(t)||n.push(qh(e,null))}),n}let r=Math.max(e.length,t.length);for(let i=0;i<r;i+=1){let r=e[i]??null,a=t[i]??null;n.push(qh(r,a))}return n},qh=(e,t)=>{if(!t&&e)return{cellType:e.cellType,sourceLines:Jh(e.sourceText,`delete`),status:`delete`,id:e.id,executionCount:e.executionCount};if(t&&!e)return{cellType:t.cellType,sourceLines:Jh(t.sourceText,`add`),status:`add`,id:t.id,executionCount:t.executionCount};let n=e?.sourceText??``,r=t?.sourceText??``,i=t?.cellType??e?.cellType??`unknown`,a=t?.id??e?.id,o=t?.executionCount??e?.executionCount;return n===r&&(e?.cellType??``)===(t?.cellType??``)?{cellType:i,sourceLines:Jh(r,`context`),status:`context`,id:a,executionCount:o}:{cellType:i,sourceLines:[...Jh(n,`delete`),...Jh(r,`add`)],status:`change`,id:a,executionCount:o}},Jh=(e,t)=>e?[{type:t,content:e}]:[],Yh=e=>!!(e&&e!==`stdin`),Xh=async(e,t)=>{let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);return n.ok?n.text():null},Zh=(e,t)=>e.filter(e=>t.includes(e.type)).map(e=>e.content).join(``),Qh=e=>{if(!e)return[];let t=e.split(`
|
|
63
|
+
`);return t.length>0&&t[t.length-1]===``&&t.pop(),t},$h=(e,t)=>!e&&!t?[]:e?t?zm(e,t).flatMap(e=>{let t=e.added?`add`:e.removed?`delete`:`context`;return Qh(e.value).map(e=>({type:t,content:e}))}):Qh(e).map(e=>({type:`delete`,content:e})):Qh(t).map(e=>({type:`add`,content:e})),eg=e=>P.isValidElement(e),tg=e=>P.isValidElement(e),ng=e=>e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(ng).join(``):eg(e)?ng(e.props.children):``,rg=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`}},ig=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`}},ag=e=>{switch(e){case`add`:return`bg-diff-addition-bg`;case`delete`:return`bg-diff-deletion-bg`;default:return`bg-transparent`}},og=e=>{switch(e){case`add`:return`+`;case`delete`:return`-`;default:return` `}},sg=e=>{switch(e){case`add`:return`text-github-accent`;case`delete`:return`text-github-danger`;default:return`text-github-text-muted`}},cg=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),lg=e=>({h1:({children:e})=>(0,F.jsx)(`h1`,{className:`${Dh[0]} mb-2`,children:e}),h2:({children:e})=>(0,F.jsx)(`h2`,{className:`${Dh[1]} mb-2`,children:e}),h3:({children:e})=>(0,F.jsx)(`h3`,{className:`${Dh[2]} mb-2`,children:e}),h4:({children:e})=>(0,F.jsx)(`h4`,{className:`${Dh[3]} mb-2`,children:e}),h5:({children:e})=>(0,F.jsx)(`h5`,{className:`${Dh[4]} mb-2`,children:e}),h6:({children:e})=>(0,F.jsx)(`h6`,{className:`${Dh[5]} mb-2`,children:e}),p:({children:e})=>(0,F.jsx)(`p`,{className:`text-sm leading-7`,children:e}),ul:({children:e})=>(0,F.jsx)(`ul`,{className:`list-disc pl-6 text-sm space-y-1`,children:e}),ol:({children:e})=>(0,F.jsx)(`ol`,{className:`list-decimal pl-6 text-sm space-y-1`,children:e}),li:({children:e})=>(0,F.jsx)(`li`,{children:e}),blockquote:({children:e})=>(0,F.jsx)(`blockquote`,{className:`border-l-4 border-github-border pl-4 text-github-text-muted italic`,children:e}),hr:()=>(0,F.jsx)(`hr`,{className:`border-github-border`}),a:({href:e,children:t})=>{let n=e??``;if(!n||!cg(n))return(0,F.jsx)(`span`,{children:t});let r=n.startsWith(`http`);return(0,F.jsx)(`a`,{href:n,target:r?`_blank`:void 0,rel:r?`noreferrer`:void 0,className:`text-sky-400 hover:text-sky-300 underline underline-offset-4`,children:t})},img:({src:e,alt:t})=>{let n=e??``;return!n||!cg(n)?null:(0,F.jsx)(`img`,{src:n,alt:t??``,loading:`lazy`,className:`max-w-full rounded border border-github-border`})},pre:({children:t})=>{let n=(Array.isArray(t)?t:[t]).find(tg),r=ng(n??t),i=/language-(\S+)/.exec(n?.props.className??``)?.[1];return r.trim()?(0,F.jsx)(`pre`,{className:`border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs`,children:(0,F.jsx)(oi,{code:r.replace(/\n$/,``),language:i,syntaxTheme:e,className:`font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre`})}):(0,F.jsx)(`pre`,{className:`border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs`,children:t})},code:({className:e,children:t})=>e?(0,F.jsx)(`code`,{className:e,children:t}):(0,F.jsx)(`code`,{className:`px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono`,children:t}),table:({children:e})=>(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsx)(`table`,{className:`min-w-full border border-github-border`,children:e})}),th:({children:e})=>(0,F.jsx)(`th`,{className:`border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm`,children:e}),td:({children:e})=>(0,F.jsx)(`td`,{className:`border border-github-border px-2 py-1 text-sm`,children:e})}),ug=e=>{let t=Zh(e.sourceLines,[`context`,`delete`]),n=Zh(e.sourceLines,[`context`,`add`]),r=[];return e.status===`change`?(t.trim()&&r.push({label:`Before`,content:t,tone:`before`}),n.trim()&&r.push({label:`After`,content:n,tone:`after`}),r.length===0&&r.push({label:`After`,content:n,tone:`after`}),r):e.status===`delete`?(r.push({label:`Before`,content:t||n,tone:`before`}),r):(r.push({label:`After`,content:n||t,tone:`after`}),r)},dg=(e,t,n,r)=>{if(!t.trim())return(0,F.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`Empty cell`});if(e===`markdown`){let e=lg(n);return(0,F.jsx)(cd,{remarkPlugins:[fm],urlTransform:e=>cg(e)?e:``,components:e,children:t})}return e===`raw`?(0,F.jsx)(`pre`,{className:`whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary`,children:t}):(0,F.jsx)(`pre`,{className:`overflow-x-auto text-xs`,children:(0,F.jsx)(si,{code:t.replace(/\n$/,``),language:r||`python`,syntaxTheme:n,className:`font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre`})})},fg=({lines:e,syntaxTheme:t,language:n})=>e.length===0?(0,F.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`Empty cell`}):(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsx)(`div`,{className:`font-mono text-xs`,children:e.map((e,r)=>(0,F.jsxs)(`div`,{className:`flex items-start min-h-[16px] ${ag(e.type)}`,children:[(0,F.jsx)(`span`,{className:`w-5 text-center flex-shrink-0 select-none ${sg(e.type)}`,children:og(e.type)}),(0,F.jsx)(si,{code:e.content||` `,language:n||`python`,syntaxTheme:t,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-${r}`))})}),pg=({cells:e,syntaxTheme:t,language:n})=>(0,F.jsx)(`div`,{className:`space-y-4`,children:e.map((e,r)=>{let i=ug(e),a=e.cellType===`code`&&e.executionCount!==void 0?`In[${e.executionCount??` `}]`:null,o=e.cellType===`code`,s=o?$h(Zh(e.sourceLines,[`context`,`delete`]),Zh(e.sourceLines,[`context`,`add`])).filter(e=>e.type!==`context`):[];return o&&s.length===0?null:(0,F.jsxs)(`div`,{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${rg(e.status)}`,children:[(0,F.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 mb-3`,children:(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wide text-github-text-muted`,children:Oh[e.cellType]}),a&&(0,F.jsx)(`span`,{className:`text-xs font-mono text-github-text-secondary`,children:a}),e.id&&(0,F.jsx)(`span`,{className:`text-xs font-mono text-github-text-muted`,children:e.id})]})}),(0,F.jsx)(`div`,{className:`space-y-3`,children:o?(0,F.jsx)(`div`,{className:`px-4 py-3 ${ig(e.status===`delete`?`before`:`after`)}`,children:(0,F.jsx)(fg,{lines:s,syntaxTheme:t,language:n})}):i.map((i,a)=>(0,F.jsx)(`div`,{className:`px-4 py-3 ${ig(i.tone)}`,children:(0,F.jsx)(`div`,{className:`text-sm text-github-text-primary`,children:dg(e.cellType,i.content,t,n)})},`notebook-cell-${r}-section-${a}`))})]},`notebook-cell-${r}`)})}),mg=({cells:e,syntaxTheme:t,language:n})=>(0,F.jsx)(`div`,{className:`space-y-4`,children:e.map((e,r)=>{let i=e.cellType===`code`&&e.executionCount!==void 0?`In[${e.executionCount??` `}]`:null;return(0,F.jsxs)(`div`,{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 mb-3`,children:[(0,F.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wide text-github-text-muted`,children:Oh[e.cellType]}),i&&(0,F.jsx)(`span`,{className:`text-xs font-mono text-github-text-secondary`,children:i}),e.id&&(0,F.jsx)(`span`,{className:`text-xs font-mono text-github-text-muted`,children:e.id})]}),(0,F.jsx)(`div`,{className:`text-sm text-github-text-primary`,children:dg(e.cellType,e.sourceText,t,n)})]},`notebook-full-cell-${r}`)})});function hg(e){let{file:t,baseCommitish:n,targetCommitish:r}=e,[i,a]=(0,P.useState)(`diff`),o=(0,P.useMemo)(()=>zh(e.mergedChunks),[e.mergedChunks]),[s,c]=(0,P.useState)({status:`idle`,cells:o.cells,language:o.language}),l=(0,P.useMemo)(()=>s.cells.filter(e=>e.status===`context`?!1:e.cellType===`code`?$h(Zh(e.sourceLines,[`context`,`delete`]),Zh(e.sourceLines,[`context`,`add`])).filter(e=>e.type!==`context`).length>0:!0),[s.cells]),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(o.language),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(null),b=(0,P.useMemo)(()=>!n&&!r?null:t.status===`added`?r?{path:t.path,ref:r}:null:t.status===`deleted`?n?{path:t.oldPath||t.path,ref:n}:null:r?{path:t.path,ref:r}:n?{path:t.oldPath||t.path,ref:n}:null,[n,r,t.oldPath,t.path,t.status]),x=(0,P.useMemo)(()=>b?`${b.ref}:${b.path}`:null,[b]);(0,P.useEffect)(()=>{let e=!1;return(async()=>{let i=n||`HEAD~1`,a=r||`HEAD`,s=t.oldPath||t.path,l=t.status!==`added`&&Yh(i),u=t.status!==`deleted`&&Yh(a);if(b&&x&&Yh(b?.ref)?(d(null),_(null),h(!0)):(d(null),y(null),_(null),h(!1)),!l&&!u){c({status:`ready`,cells:o.cells,language:o.language,source:`diff`,message:`Notebook content could not be loaded, falling back to diff preview.`});return}c(e=>({...e,status:`loading`}));try{let[n,r]=await Promise.all([l?Xh(s,i):Promise.resolve(null),u?Xh(t.path,a):Promise.resolve(null)]),f=n?Hh(n):null,m=r?Hh(r):null;if(!f&&!m){e||c({status:`ready`,cells:o.cells,language:o.language,source:`diff`,message:`Notebook content could not be parsed, falling back to diff preview.`});return}let h=m?.language??f?.language??o.language,g=Kh(f?.cells??[],m?.cells??[]),v=b?.ref===a&&b.path===t.path?m:b?.ref===i&&b.path===s?f:null;e||(c({status:`ready`,cells:g,source:`blob`,language:h}),v&&x?(d(v.cells),p(v.language??o.language),y(x),_(null)):(d(null),y(null),_(null)))}catch(t){e||(c({status:`error`,cells:o.cells,language:o.language,source:`diff`,message:t instanceof Error?t.message:`Failed to load notebook preview.`}),d(null),y(null),_(t instanceof Error?t.message:`Failed to load preview`))}finally{e||h(!1)}})(),()=>{e=!0}},[n,t.oldPath,t.path,t.status,e.mergedChunks,b,x,r,o]),(0,P.useEffect)(()=>{if(i!==`full-preview`)return;if(!b||!x||!Yh(b.ref)){d(null),y(null),_(null),h(!1);return}let e=!1;return(x!==v||!u)&&(async()=>{x!==v&&d(null),h(!0),_(null);try{let t=await Xh(b.path,b.ref);if(!t)throw Error(`Failed to load preview.`);let n=Hh(t);if(!n)throw Error(`Notebook content could not be parsed.`);e||(d(n.cells),p(n.language??o.language),y(x))}catch(t){e||(d(null),y(null),_(t instanceof Error?t.message:`Failed to load preview`))}finally{e||h(!1)}})(),()=>{e=!0}},[o.language,u,v,i,b,x]);let S=(0,P.useMemo)(()=>x===v&&u!==null,[u,v,x]);return(0,P.useEffect)(()=>{i===`full-preview`&&!S&&a(`diff-preview`)},[S,i]),(0,F.jsxs)(`div`,{className:`bg-github-bg-primary`,children:[(0,F.jsx)(`div`,{className:`flex items-center justify-between border-b border-github-border px-4 py-2`,children:(0,F.jsx)(_m,{mode:i,hasFullPreview:S,onModeChange:a})}),i===`diff`&&(0,F.jsx)(th,{...e}),i===`diff-preview`&&(0,F.jsxs)(`div`,{className:`p-4`,children:[s.status===`loading`&&(0,F.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:`Loading notebook preview…`}),s.message&&(0,F.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:s.message}),l.length===0?(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-xs text-github-text-muted mb-3`,children:`No changed notebook cells were found. Showing raw diff instead.`}),(0,F.jsx)(th,{...e})]}):(0,F.jsx)(pg,{cells:l,syntaxTheme:e.syntaxTheme,language:s.language})]}),i===`full-preview`&&(0,F.jsxs)(`div`,{className:`p-4`,children:[m&&(0,F.jsx)(`div`,{className:`text-sm text-github-text-muted mb-3`,children:`Loading preview...`}),g&&(0,F.jsx)(`div`,{className:`text-sm text-github-danger mb-3`,children:g}),!m&&!g&&u&&(0,F.jsx)(mg,{cells:u,syntaxTheme:e.syntaxTheme,language:f??o.language}),!m&&!g&&!u&&(0,F.jsx)(`div`,{className:`text-sm text-github-text-muted`,children:`Preview unavailable.`})]})]})}var gg=[{id:`image`,match:e=>Ai(e.path),Component:Ii,canExpandHiddenLines:()=>!1},{id:`markdown`,match:e=>Mi(e.path),Component:Eh,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`},{id:`notebook`,match:e=>Ni(e.path),Component:hg,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`},{id:`default`,match:()=>!0,Component:th,canExpandHiddenLines:e=>e.status!==`added`&&e.status!==`deleted`}],_g=e=>{let t=gg[gg.length-1];if(!t)throw Error(`No diff viewers registered`);return gg.find(t=>t.match(e))??t},vg=e=>{switch(e){case`added`:return(0,F.jsx)(ot,{size:16,className:`text-github-accent`});case`deleted`:return(0,F.jsx)(st,{size:16,className:`text-github-danger`});case`renamed`:return(0,F.jsx)(at,{size:16,className:`text-github-warning`});default:return(0,F.jsx)(it,{size:16,className:`text-github-text-secondary`})}},yg=({file:e,isCollapsed:t,isReviewed:n,isChangedSinceViewed:r=!1,onToggleCollapsed:i,onToggleAllCollapsed:a,onToggleReviewed:o})=>{let[s,c]=(0,P.useState)(!1);return(0,F.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:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0`,children:[(0,F.jsx)(`button`,{onClick:n=>{n.altKey?a(!t):i(e.path)},className:`text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer`,title:t?`Expand file (Alt+Click to expand all)`:`Collapse file (Alt+Click to collapse all)`,children:t?(0,F.jsx)(Je,{size:16}):(0,F.jsx)(Ke,{size:16})}),vg(e.status),(0,F.jsx)(`h2`,{className:`text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap`,children:e.path}),(0,F.jsx)(`button`,{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${s?`text-github-accent`:`text-github-text-secondary hover:text-github-text-primary`}`,onClick:()=>{bn(e.path).then(()=>{console.log(`File path copied to clipboard:`,e.path),c(!0),setTimeout(()=>c(!1),2e3)}).catch(e=>{console.error(`Failed to copy file path:`,e)})},title:`Copy file path`,children:s?(0,F.jsx)(Ge,{size:14}):(0,F.jsx)(et,{size:14})}),e.oldPath&&e.oldPath!==e.path&&(0,F.jsxs)(`span`,{className:`text-xs text-github-text-muted italic`,children:[`(renamed from `,e.oldPath,`)`]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[r&&!n&&(0,F.jsx)(`span`,{className:`inline-flex h-6 items-center rounded-full border border-github-warning px-2.5 text-xs font-medium text-github-warning`,title:`Updated since you last viewed this file`,"aria-label":`Updated since you last viewed this file`,children:`Updated`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,F.jsxs)(`span`,{className:`font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10`,children:[`+`,e.additions]}),(0,F.jsxs)(`span`,{className:`font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10`,children:[`-`,e.deletions]})]}),(0,F.jsxs)(`button`,{onClick:()=>o(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${n?`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:n?`Mark as not reviewed`:`Mark as reviewed`,children:[n?(0,F.jsx)(Ge,{size:14}):(0,F.jsx)(Mt,{size:14}),`Viewed`]})]})]})},bg=e=>{let t={old:[],new:[]};return e.forEach(e=>{let n=e.side??`new`,[r,i]=Array.isArray(e.line)?[e.line[0],e.line[1]]:[e.line,e.line];r<=0||i<=0||t[n].push({start:Math.min(r,i),end:Math.max(r,i)})}),t},xg=(e,t)=>e.chunks.map((e,n)=>{let r=t===`old`?e.oldStart:e.newStart,i=t===`old`?e.oldLines:e.newLines;return!r||i<=0?null:{start:r,end:r+i-1,index:n}}).filter(e=>!!e),Sg=e=>{let t=[],n=e[0];if(!n)return t;n.start>1&&t.push({type:`before`,start:1,end:n.start-1,nextChunkIndex:n.index});for(let n=1;n<e.length;n+=1){let r=e[n-1],i=e[n];!r||!i||i.start>r.end+1&&t.push({type:`between`,start:r.end+1,end:i.start-1,prevChunkIndex:r.index,nextChunkIndex:i.index})}let r=e[e.length-1];return r&&t.push({type:`after`,start:r.end+1,end:1/0,prevChunkIndex:r.index}),t},Cg=e=>{let t=new Map;return e.forEach(e=>{let n=e.originalIndices[0];n!==void 0&&t.set(n,e)}),t},wg=e=>{let t=e[e.length-1];return t?.originalIndices[t.originalIndices.length-1]??null},Tg=(0,P.memo)(function({file:e,threads:t,showAuthorBadges:n=!1,diffMode:r,reviewedFiles:i,isChangedSinceViewed:a=!1,onToggleReviewed:o,collapsedFiles:s,onToggleCollapsed:c,onToggleAllCollapsed:l,onAddComment:u,onGenerateThreadPrompt:d,onRemoveThread:f,onReplyToThread:p,onRemoveMessage:m,onUpdateMessage:h,onOpenInEditor:g,syntaxTheme:_,baseCommitish:v,targetCommitish:y,cursor:b=null,fileIndex:x=0,onLineClick:S,commentTrigger:C,onCommentTriggerHandled:w,mergedChunks:T,expandLines:E,expandAllBetweenChunks:D,prefetchFileContent:O,isExpandLoading:k,diffVersion:A}){let j=s.has(e.path),M=(0,P.useRef)(null),[N,ee]=(0,P.useState)(!1),te=_g(e),ne=te.canExpandHiddenLines?.(e)??!1,re=te.id==="default"&&ri(e.path);(0,P.useEffect)(()=>{if(!ne)return;let e=M.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e?.isIntersecting&&ee(!0)},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[ne]),(0,P.useEffect)(()=>{N&&!j&&ne&&O(e)},[N,j,ne,e,O]);let ie=(0,P.useCallback)(async(t,n,r,i)=>{try{await u(e.path,t,n,r,i)}catch(e){console.error(`Failed to add comment:`,e)}},[e.path,u]);(0,P.useEffect)(()=>{if(j||k||!ne||t.length===0||e.chunks.length===0||T.length===0)return;let n=bg(t),r=Cg(T),i=wg(T),a=T[T.length-1],o=new Set,s=(e,t)=>{o.has(e)||(o.add(e),t())};[`old`,`new`].forEach(t=>{let o=n[t];o.length!==0&&Sg(xg(e,t)).forEach(t=>{if(!o.some(e=>e.start<=t.end&&e.end>=t.start))return;if(t.type===`after`&&a&&i!==null){a.hiddenLinesAfter>0&&s(`after-${i}`,()=>{E(e,i,`down`,a.hiddenLinesAfter)});return}let n=t.nextChunkIndex;if(n===void 0)return;let c=r.get(n);!c||c.hiddenLinesBefore<=0||(t.type===`before`?s(`before-${n}`,()=>{E(e,n,`up`,c.hiddenLinesBefore)}):t.type===`between`&&s(`between-${n}`,()=>{D(e,n,c.hiddenLinesBefore)}))})})},[t,D,E,e,j,k,T,ne]);let ae=Oi({file:e,enabled:re,baseCommitish:v,targetCommitish:y,reloadKey:A}),oe=te.Component,I={file:e,threads:t,showAuthorBadges:n,diffMode:r,syntaxTheme:_,baseCommitish:v,targetCommitish:y,cursor:b,fileIndex:x,mergedChunks:T,isExpandLoading:k,expandHiddenLines:E,expandAllBetweenChunks:D,onAddComment:ie,onGenerateThreadPrompt:d,onRemoveThread:f,onReplyToThread:p,onRemoveMessage:m,onUpdateMessage:h,onOpenInEditor:g,onLineClick:S,commentTrigger:C,onCommentTriggerHandled:w};return(0,F.jsxs)(`div`,{ref:M,className:`bg-github-bg-primary`,style:{"--line-number-width":`4em`},children:[(0,F.jsx)(yg,{file:e,isCollapsed:j,isReviewed:i.has(e.path),isChangedSinceViewed:a,onToggleCollapsed:c,onToggleAllCollapsed:l,onToggleReviewed:o}),!j&&(0,F.jsx)(jn,{value:ae,children:(0,F.jsx)(`div`,{className:`overflow-y-auto`,children:(0,F.jsx)(oe,{...I})})})]})});function Eg(e){return mn(e,`.`,`merge-base`)}function Dg(e){return mn(`${e}^`,e)}var Og=mn(`HEAD`,`.`),kg=[{key:`uncommitted`,label:`Working tree`,selection:Og},{key:`lastcommit`,label:`Last commit`,selection:mn(`HEAD^`,`HEAD`)}],Ag=new Set(kg.map(e=>`${e.selection.baseCommitish}:${e.selection.targetCommitish}`));function jg(e){return pn(e.baseMode)!==`merge-base`&&Ag.has(`${e.baseCommitish}:${e.targetCommitish}`)}function Mg(e){return pn(e.baseMode)===`merge-base`&&e.targetCommitish===`.`}var Ng=mn(`HEAD^`,`HEAD`);function Pg(e){return pn(e.baseMode)===`merge-base`&&e.targetCommitish===`.`?`current-branch`:hn(e,Og)?`working`:hn(e,Ng)?`lastcommit`:null}function Fg(e,t){switch(e){case`working`:return Og;case`lastcommit`:return t.commitCount>=2?Ng:null;case`current-branch`:return t.branchBase?Eg(t.branchBase):null}}function Ig(e,t){return jg(e)?{kind:`none`}:Mg(e)?t.hasTurns?{kind:`both`,base:e.baseCommitish,target:`.`}:{kind:`commits`,base:e.baseCommitish,target:`.`}:{kind:`commits`,base:e.baseCommitish,target:e.targetCommitish}}function Lg(e,t){return e.findIndex(e=>e.commitAfter==null?e.commitBefore===t.baseCommitish&&t.targetCommitish===`.`:e.commitBefore===t.baseCommitish&&e.commitAfter===t.targetCommitish)}function Rg(e,t){return e.length-t}function zg(e,t){return`${t===0?`latest`:`#${t+1}`} · ${e.slice(0,8)}`}var Bg=e=>`flex w-full items-center gap-2 px-3 py-2 text-left text-sm transition-colors hover:bg-github-bg-tertiary ${e?`bg-github-bg-tertiary font-medium`:``}`,Vg=`px-3 py-2 text-xs font-semibold uppercase tracking-wide text-github-text-muted`,Hg=15,Ug=()=>(0,F.jsx)(`span`,{className:`ml-auto flex items-center`,"aria-label":`active`,children:(0,F.jsx)(Ge,{size:15,className:`text-github-accent`,"aria-hidden":`true`})});function Wg({options:e,selection:t,navigator:n,buttonLabel:r,isCustomCompare:i,turns:a,rangeCommits:o,activeSession:s,sessions:c,onSelectCurrentBranch:l,onSelectPreset:u,onSelectTurn:d,onSelectCommit:f,onSelectSession:p,onClearCustomCompare:m,onOpenCompare:h}){let[g,_]=(0,P.useState)(!1),[v,y]=(0,P.useState)(`turns`),[b,x]=(0,P.useState)(Hg),S=(0,P.useRef)(null);(0,P.useEffect)(()=>{x(Hg)},[g,v,n.kind]),(0,P.useEffect)(()=>{if(!g)return;let e=e=>{S.current&&!S.current.contains(e.target)&&_(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[g]),(0,P.useEffect)(()=>{if(!g)return;let e=e=>{e.key===`Escape`&&_(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[g]);let C=()=>_(!1),w=e=>e<=b?null:(0,F.jsxs)(`button`,{onClick:()=>x(e=>e+25),className:`w-full px-3 py-2 text-center text-xs text-github-text-secondary transition-colors hover:bg-github-bg-tertiary hover:text-github-text-primary`,children:[`Load more (`,e-b,` more)`]}),T=()=>c.length>1?(0,F.jsx)(`div`,{className:`border-b border-github-border px-3 py-1.5`,children:(0,F.jsx)(`select`,{"aria-label":`Agent session`,value:s??``,onChange:e=>p(e.target.value),className:`w-full rounded border border-github-border bg-github-bg-tertiary px-2 py-1 text-xs text-github-text-secondary`,children:c.map((e,t)=>(0,F.jsx)(`option`,{value:e,children:zg(e,t)},e))})}):null,E=()=>{let e=Lg(a,t);return(0,F.jsxs)(F.Fragment,{children:[a.slice(0,b).map((t,n)=>{let r=t.commitAfter==null;return(0,F.jsxs)(`button`,{onClick:()=>{d(t),C()},title:t.promptPreview??`(no prompt)`,className:Bg(n===e),children:[r?(0,F.jsx)(Et,{size:15,className:`animate-pulse text-github-warning`}):(0,F.jsx)(jt,{size:15,className:`text-github-text-secondary`}),(0,F.jsxs)(`span`,{className:`flex-none whitespace-nowrap ${r?`text-github-warning`:`text-github-text-primary`}`,children:[`Turn `,Rg(a,n)]}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-right text-xs text-github-text-muted`,children:t.promptPreview??``})]},t.id)}),w(a.length)]})},D=()=>(0,F.jsxs)(F.Fragment,{children:[o.slice(0,b).map(e=>{let n=t.baseCommitish===`${e.shortHash}^`&&(t.targetCommitish===e.shortHash||t.targetCommitish===e.hash);return(0,F.jsxs)(`button`,{onClick:()=>{f(e),C()},title:e.message,className:Bg(n),children:[(0,F.jsx)(ft,{size:15,className:`text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`font-mono text-xs text-github-text-secondary`,children:e.shortHash}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-github-text-primary`,children:e.message})]},e.hash)}),w(o.length)]}),O=n.kind===`both`&&v===`turns`,k=n.kind===`commits`||n.kind===`both`&&v===`commits`;return(0,F.jsxs)(`div`,{ref:S,className:`relative`,children:[(0,F.jsxs)(`button`,{onClick:()=>_(e=>!e),className:`flex items-center gap-1.5 rounded border border-github-border bg-github-bg-tertiary px-2 py-1 text-sm text-github-text-primary transition-colors hover:border-github-text-secondary`,title:r,"aria-haspopup":`menu`,"aria-expanded":g,"aria-label":`Review menu: ${r}`,children:[(0,F.jsx)(`span`,{className:`max-w-[220px] overflow-hidden text-ellipsis whitespace-nowrap`,children:r}),(0,F.jsx)(Ke,{size:14,className:`text-github-text-secondary`})]}),g&&(0,F.jsxs)(`div`,{className:`absolute right-0 top-full z-50 mt-1 max-h-[70vh] w-[340px] overflow-y-auto rounded-md border border-github-border bg-github-bg-secondary shadow-xl`,children:[i&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:Vg,children:`Comparing`}),(0,F.jsxs)(`div`,{className:`${Bg(!0)} border-b border-github-border`,role:`presentation`,children:[(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-github-text-primary`,children:r}),(0,F.jsx)(Ug,{}),(0,F.jsx)(`button`,{"aria-label":`Clear custom compare`,onClick:e=>{e.stopPropagation(),m()},className:`text-github-text-secondary hover:text-github-text-primary`,children:(0,F.jsx)(Rt,{size:14})})]})]}),(0,F.jsx)(`div`,{className:Vg,children:`Reviewing`}),(()=>{let n=!i&&t.baseMode===`merge-base`&&t.targetCommitish===`.`;return(0,F.jsxs)(`button`,{onClick:()=>{l(),C()},className:Bg(n),children:[(0,F.jsx)(ft,{size:15,className:`text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`text-github-text-primary`,children:`Current branch`}),e.branchBase&&(0,F.jsxs)(`span`,{className:`ml-auto text-xs text-github-text-muted`,title:e.branchBaseSource&&e.branchBaseSource!==`pgit`?`Base inferred (no pgit parent set) — open Compare to pick a different base.`:void 0,children:[`vs `,e.branchBase,e.branchBaseSource&&e.branchBaseSource!==`pgit`&&` (inferred)`]}),n&&(0,F.jsx)(Ug,{})]})})(),n.kind===`both`&&(0,F.jsxs)(`div`,{role:`tablist`,"aria-label":`Navigate by`,className:`flex gap-1 px-3 py-1.5`,children:[(0,F.jsx)(`button`,{role:`tab`,"aria-selected":v===`turns`,onClick:()=>y(`turns`),className:`flex-1 rounded border px-2 py-1 text-xs transition-colors ${v===`turns`?`border-github-accent bg-github-accent/10 text-github-text-primary`:`border-github-border bg-github-bg-tertiary text-github-text-secondary hover:text-github-text-primary`}`,children:`Turns`}),(0,F.jsx)(`button`,{role:`tab`,"aria-selected":v===`commits`,onClick:()=>y(`commits`),className:`flex-1 rounded border px-2 py-1 text-xs transition-colors ${v===`commits`?`border-github-accent bg-github-accent/10 text-github-text-primary`:`border-github-border bg-github-bg-tertiary text-github-text-secondary hover:text-github-text-primary`}`,children:`Commits`})]}),O&&T(),n.kind===`commits`&&(0,F.jsx)(`div`,{className:Vg,children:`Commits`}),(O||k)&&(0,F.jsxs)(`div`,{className:`max-h-[300px] overflow-y-auto`,children:[O&&E(),k&&D()]}),(0,F.jsx)(`div`,{className:`${Vg} border-t border-github-border`,children:`Quick modes`}),kg.map(e=>{let n=hn(e.selection,t);return(0,F.jsxs)(`button`,{onClick:()=>{u(e.selection),C()},className:Bg(n),children:[(0,F.jsx)(ft,{size:15,className:`text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`text-github-text-primary`,children:e.label}),n&&(0,F.jsx)(Ug,{})]},e.key)}),(0,F.jsxs)(`button`,{onClick:()=>{h(),C()},className:`${Bg(!1)} border-t border-github-border`,children:[(0,F.jsx)(ft,{size:15,className:`text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`text-github-text-primary`,children:`Compare…`}),(0,F.jsxs)(`span`,{className:`ml-auto text-xs text-github-text-muted`,children:[e.branches.length+e.commits.length,` refs`]})]})]})]})}function Gg(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`safari`)&&!t.includes(`chrome`)&&!t.includes(`chromium`)&&!t.includes(`crios`)&&!t.includes(`fxios`)&&!t.includes(`edg/`)&&!t.includes(`android`)}var Kg={extensions:new Set,status:`all`,include:``,exclude:``};function qg(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0?`(none)`:t.slice(n+1).toLowerCase()}var Jg=new Set(".+^${}()|[]\\");function Yg(e){let t=e.includes(`/`),n=``;for(let r=0;r<e.length;r++){let i=e[r];i===`*`?e[r+1]===`*`?(n+=`.*`,r++):n+=t?`[^/]*`:`.*`:i===`?`?n+=t?`[^/]`:`.`:Jg.has(i)?n+=`\\${i}`:n+=i}return`${t?`^`:`^(?:.*/)?`}${n}$`}function Xg(e){if(e===``)return null;try{return new RegExp(Yg(e),`i`)}catch{return null}}function Zg(e){return e===``||Xg(e)!==null}function Qg(e){return e.extensions.size>0||e.status!==`all`||e.include!==``||e.exclude!==``}function $g(e){let{extensions:t,status:n}=e,r=Xg(e.include),i=Xg(e.exclude);return e=>{let a=e.path;return!(t.size>0&&!t.has(qg(a))||n!==`all`&&e.status!==n||r&&!r.test(a)||i&&i.test(a))}}var e_=6,t_={tree:{label:`Tree`,desc:`Folder hierarchy`,Icon:_t},smart:{label:`Smart`,desc:`Group related files`,Icon:Lt},module:{label:`Module`,desc:`By top-level area`,Icon:Ue},ai:{label:`AI`,desc:`Semantic (Claude)`,Icon:jt}},n_=[`tree`,`smart`,`module`,`ai`];function r_({mode:e,status:t,onSelect:n}){let[r,i]=(0,P.useState)(!1),a=t_[e],o=t===`loading`&&e===`ai`;return(0,P.useEffect)(()=>{if(!r)return;let e=e=>{e.key===`Escape`&&i(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsxs)(`button`,{onClick:()=>i(e=>!e),"aria-haspopup":`menu`,"aria-expanded":r,className:`flex items-center gap-1.5 rounded border border-github-border bg-github-bg-tertiary px-2 py-1 text-xs text-github-text-primary hover:border-github-text-secondary`,title:`Choose how files are organized`,children:[(0,F.jsx)(a.Icon,{size:13,className:`text-github-text-secondary`}),(0,F.jsxs)(`span`,{children:[`Organize: `,(0,F.jsx)(`span`,{className:`font-medium`,children:a.label})]}),o?(0,F.jsx)(yt,{size:12,className:`animate-spin text-github-text-secondary`}):(0,F.jsx)(Ke,{size:12,className:`text-github-text-secondary`})]}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`fixed inset-0 z-10`,onClick:()=>i(!1)}),(0,F.jsxs)(`div`,{role:`menu`,className:`absolute left-0 z-20 mt-1 w-60 overflow-hidden rounded-md border border-github-border bg-github-bg-secondary shadow-lg`,children:[(0,F.jsx)(`div`,{className:`border-b border-github-border bg-github-bg-tertiary px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wide text-github-text-muted`,children:`Organize files by`}),n_.map(t=>{let r=t_[t],a=t===e;return(0,F.jsxs)(`button`,{role:`menuitemradio`,"aria-checked":a,onClick:()=>{i(!1),n(t)},className:`flex w-full items-center gap-2.5 px-3 py-2 text-left transition-colors ${a?`bg-github-bg-tertiary`:`hover:bg-github-bg-tertiary`}`,children:[(0,F.jsx)(r.Icon,{size:15,className:a?`text-github-accent`:`text-github-text-secondary`}),(0,F.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`span`,{className:`block text-xs font-medium text-github-text-primary`,children:r.label}),(0,F.jsx)(`span`,{className:`block text-[11px] leading-tight text-github-text-secondary`,children:r.desc})]}),t===`ai`&&o?(0,F.jsx)(yt,{size:13,className:`animate-spin text-github-text-secondary`}):a?(0,F.jsx)(Ge,{size:14,className:`text-github-accent`}):null]},t)})]})]})]})}var i_=16,a_=24,o_=`difit.filtersOpen`;function s_(){return typeof window>`u`?!1:window.localStorage.getItem(o_)===`true`}function c_(e){return`${e*a_+i_}px`}function l_(e){if(!e.isDirectory||!e.children)return[];let t=[];return e.path&&t.push(e.path),e.children.forEach(e=>{t.push(...l_(e))}),t}function u_(e,t){let n=new Set,r=e=>{if(e.file)return t.has(e.file.path);if(!e.isDirectory||!e.children||e.children.length===0)return!1;let i=e.children.map(e=>r(e)).every(Boolean);return i&&e.path&&n.add(e.path),i};return r(e),n}function d_(e){let t={name:``,path:``,isDirectory:!0,children:[]};e.forEach(e=>{let n=e.path.split(`/`),r=t;for(let t=0;t<n.length;t++){let i=n[t];if(!i)continue;let a=t===n.length-1,o=n.slice(0,t+1).join(`/`);r.children||=[];let s=r.children.find(e=>e.name===i);s||(s={name:i,path:o,isDirectory:!a,children:a?void 0:[],file:a?e:void 0},r.children.push(s)),r=s}});let n=e=>{if(!e.isDirectory||!e.children)return e;if(e.children=e.children.map(n),e.children.length===1&&e.children[0]?.isDirectory&&e.children[0]?.children){let t=e.children[0];if(t)return e.name?{...e,name:`${e.name}/${t.name}`,path:t.path,children:t.children}:e}return e};return n(t)}var f_=(0,P.memo)(function({files:e,allFiles:t,filter:n,onFilterChange:r,onScrollToFile:i,onFileSelected:a,comments:o,reviewedFiles:s,onToggleReviewed:c,selectedFileIndex:l,grouping:u,groupingMode:d=`tree`,groupingStatus:f=`idle`,fileCount:p,onSelectMode:m,onReorganize:h}){let g=(0,P.useMemo)(()=>d_(e),[e]),_=(0,P.useMemo)(()=>!Gg(typeof navigator>`u`?``:navigator.userAgent),[]),v=(0,P.useRef)(null),y=(0,P.useRef)(new Map),b={"--dir-row-height":`calc(var(--spacing, 0.25rem) * 9)`},[x,S]=(0,P.useState)(()=>new Set(l_(g))),[C,w]=(0,P.useState)(n.exclude!==``),[T,E]=(0,P.useState)(s_);(0,P.useEffect)(()=>{try{window.localStorage.setItem(o_,String(T))}catch{}},[T]);let D=(0,P.useMemo)(()=>{let e=new Map;return t.forEach(t=>{let n=qg(t.path);e.set(n,(e.get(n)??0)+1)}),[...e.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))},[t]),O=(0,P.useMemo)(()=>{let e=new Map;return t.forEach(t=>{e.set(t.status,(e.get(t.status)??0)+1)}),[...e.entries()].sort((e,t)=>t[1]-e[1])},[t]),k=e=>{let t=new Set(n.extensions);t.has(e)?t.delete(e):t.add(e),r({extensions:t})},A=(0,P.useMemo)(()=>{let e=new Map;return o.forEach(t=>{e.set(t.file,(e.get(t.file)??0)+1)}),e},[o]),j=(0,P.useMemo)(()=>{let t=new Map;return e.forEach((e,n)=>{t.set(e.path,n)}),t},[e]),M=(0,P.useMemo)(()=>{let e=new Map;return t.forEach(t=>e.set(t.path,t)),e},[t]),N=(0,P.useMemo)(()=>e.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0}),[e]),ee=(0,P.useMemo)(()=>u_(g,s),[g,s]),te=e.length!==t.length,ne=(0,P.useMemo)(()=>new Set(e.map(e=>e.path)),[e]),re=Qg(n),ie=Zg(n.include),ae=Zg(n.exclude),oe=e=>{switch(e){case`added`:return(0,F.jsx)(ot,{size:16,className:`text-github-accent`});case`deleted`:return(0,F.jsx)(st,{size:16,className:`text-github-danger`});case`renamed`:return(0,F.jsx)(at,{size:16,className:`text-github-warning`});default:return(0,F.jsx)(it,{size:16,className:`text-github-text-secondary`})}},I=(e,t=0)=>{let n=M.get(e);if(!n)return null;let r=e.split(`/`).pop()??e,o=A.get(n.path)??0,u=s.has(n.path),d=j.get(n.path)??-1;return(0,F.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${u?`opacity-70`:``} ${l!==null&&l===d?`bg-github-bg-tertiary`:``}`,"data-file-row":`true`,"data-tree-row":`true`,"data-depth":t,style:{paddingLeft:c_(t)},onClick:()=>{i(n.path),a?.()},children:[(0,F.jsx)(vn,{checked:u,onChange:()=>{c(n.path)},title:u?`Mark as not reviewed`:`Mark as reviewed`,className:`z-10`}),oe(n.status),(0,F.jsx)(`span`,{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${u?`line-through text-github-text-muted`:``}`,title:n.path,children:r}),o>0&&(0,F.jsxs)(`span`,{className:`text-github-warning text-sm font-medium ml-auto flex items-center gap-1`,children:[(0,F.jsx)(xt,{size:14}),o]})]},n.path)},se=e=>{S(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ce=(0,P.useMemo)(()=>l_(g),[g]),le=x.size===ce.length&&ce.length>0,ue=()=>{S(le?new Set:new Set(ce))},L=d!==`tree`&&f===`ready`&&!!u,[de,R]=(0,P.useState)(new Set);(0,P.useEffect)(()=>R(new Set),[u]);let fe=e=>R(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),pe=L?de.size===0:le,me=()=>{if(L){let e=u?.groups.map(e=>e.id)??[];R(t=>t.size===0?new Set(e):new Set)}else ue()},he=(e,t)=>{if(!_){se(t);return}let n=v.current,r=e.currentTarget;if(!n){se(t);return}let i=n.getBoundingClientRect(),a=r.getBoundingClientRect(),o=Number.parseFloat(getComputedStyle(r).top||`0`);if(a.top-i.top<=o+1){let e=y.current.get(t)?.querySelector(`[data-tree-row="true"]:not([data-dir-header="true"])`),i=r.getBoundingClientRect().height||0,a=e??r,o=i*Number.parseInt(a.dataset.depth||r.dataset.depth||`0`,10),s=Math.max(0,a.offsetTop-o);if(Math.abs(n.scrollTop-s)<=1){se(t);return}n.scrollTo({top:s});return}se(t)},ge=(e,t=0)=>{if(e.isDirectory&&e.children){let n=x.has(e.path),r=ee.has(e.path);return(0,F.jsxs)(`div`,{"data-dir-container":e.path||void 0,ref:t=>{e.path&&(t?y.current.set(e.path,t):y.current.delete(e.path))},children:[e.name&&(0,F.jsxs)(`div`,{className:`${_?`sticky `:``}flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer ${r?`opacity-70`:``}`,"data-dir-header":`true`,"data-tree-row":`true`,"data-depth":t,style:{paddingLeft:c_(t),top:_?`calc(${t} * var(--dir-row-height))`:void 0,zIndex:_?1e3-t:void 0},onClick:t=>he(t,e.path),children:[n?(0,F.jsx)(Ke,{size:16}):(0,F.jsx)(Je,{size:16}),n?(0,F.jsx)(lt,{size:16,className:`text-github-text-secondary`}):(0,F.jsx)(ut,{size:16,className:`text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${r?`line-through text-github-text-muted`:``}`,title:e.name,children:e.name})]}),(n||!e.name)&&e.children.map(n=>ge(n,e.name?t+1:t))]},e.path)}else if(e.file)return I(e.file.path,t);return null},_e=e=>`w-full px-2 py-1.5 text-xs font-mono bg-github-bg-primary border rounded-md focus:outline-none text-github-text-primary placeholder-github-text-muted ${e?`border-github-border focus:border-github-accent`:`border-github-danger`}`;return(0,F.jsxs)(`div`,{className:`h-full flex flex-col`,children:[(0,F.jsxs)(`div`,{className:`px-4 py-3 border-b border-github-border bg-github-bg-tertiary`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-3 gap-y-1`,children:[(0,F.jsxs)(`h3`,{className:`text-sm font-semibold text-github-text-primary m-0 whitespace-nowrap`,children:[`Files changed (`,te?`${e.length}/${t.length}`:t.length,`)`]}),(0,F.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,F.jsxs)(`span`,{className:`inline-flex gap-1 text-right text-xs font-medium whitespace-nowrap`,title:`Total additions and deletions`,"aria-label":`${N.additions} additions and ${N.deletions} deletions`,children:[(0,F.jsxs)(`span`,{className:`text-github-accent`,children:[`+`,N.additions]}),(0,F.jsxs)(`span`,{className:`text-github-danger`,children:[`-`,N.deletions]})]}),(0,F.jsxs)(`button`,{onClick:()=>E(e=>!e),className:`relative p-1 hover:bg-github-bg-primary rounded transition-colors`,title:T?`Hide filters`:`Show filters`,"aria-label":T?`Hide filters`:`Show filters`,"aria-expanded":T,children:[(0,F.jsx)(gt,{size:16,className:T?`text-github-text-primary`:`text-github-text-secondary`}),re&&(0,F.jsx)(`span`,{className:`absolute right-0.5 top-0.5 h-2 w-2 rounded-full bg-github-accent ring-1 ring-github-bg-tertiary`,"aria-hidden":`true`})]}),(0,F.jsx)(`button`,{onClick:me,className:`p-1 hover:bg-github-bg-primary rounded transition-colors`,title:pe?`Collapse all`:`Expand all`,children:pe?(0,F.jsx)(Xe,{size:16,className:`text-github-text-secondary`}):(0,F.jsx)(Ze,{size:16,className:`text-github-text-secondary`})})]})]}),((p??0)>=e_||d!==`tree`)&&m&&(0,F.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-1.5`,children:[(0,F.jsx)(r_,{mode:d,status:f,onSelect:m}),d===`ai`&&h&&(0,F.jsxs)(`button`,{onClick:h,disabled:f===`loading`,className:`flex items-center gap-1 rounded border border-github-border px-2 py-1 text-xs text-github-text-secondary hover:bg-github-bg-primary hover:text-github-text-primary disabled:opacity-60`,title:`Re-run AI grouping`,children:[(0,F.jsx)(Ot,{size:13}),`Reorganize`]})]}),d!==`tree`&&u?.fallbackFrom===`ai`&&(0,F.jsxs)(`div`,{className:`mt-2 flex items-start gap-1.5 rounded border border-github-warning/40 bg-github-warning/10 px-2 py-1.5 text-[11px] text-github-warning`,children:[(0,F.jsx)(Ft,{size:12,className:`mt-0.5 shrink-0`}),(0,F.jsx)(`span`,{children:`AI grouping unavailable — showing Smart grouping.`})]}),T&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`label`,{className:`mt-3 block text-[10px] uppercase tracking-wide text-github-text-muted mb-1`,children:`Include (glob)`}),(0,F.jsx)(`input`,{type:`text`,spellCheck:!1,placeholder:`e.g. src/** or *.ts`,value:n.include,onChange:e=>r({include:e.target.value}),className:_e(ie)}),C?(0,F.jsxs)(`div`,{className:`mt-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`label`,{className:`block text-[10px] uppercase tracking-wide text-github-text-muted`,children:`Exclude (glob)`}),n.exclude===``&&(0,F.jsx)(`button`,{onClick:()=>w(!1),className:`text-[10px] text-github-text-muted hover:text-github-text-primary`,title:`Hide exclude`,children:`hide`})]}),(0,F.jsx)(`input`,{type:`text`,spellCheck:!1,placeholder:`e.g. *test* or **/__mocks__/**`,value:n.exclude,onChange:e=>r({exclude:e.target.value}),className:_e(ae)})]}):(0,F.jsx)(`div`,{className:`mt-1 flex justify-end`,children:(0,F.jsx)(`button`,{onClick:()=>w(!0),className:`px-1 text-sm leading-none text-github-text-muted hover:text-github-text-primary`,title:`Add an exclude glob`,"aria-label":`Add an exclude glob`,children:`…`})}),(!ie||!ae)&&(0,F.jsx)(`p`,{className:`mt-1 text-[11px] text-github-danger`,children:`Invalid glob — ignored.`}),O.length>1&&(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 mt-2`,children:[(0,F.jsx)(`button`,{onClick:()=>r({status:`all`}),className:`px-2 py-0.5 text-xs rounded-full border transition-colors ${n.status===`all`?`bg-github-accent text-white border-github-accent`:`border-github-border text-github-text-secondary hover:bg-github-bg-tertiary`}`,children:`All`}),O.map(([e,t])=>(0,F.jsxs)(`button`,{onClick:()=>r({status:n.status===e?`all`:e}),className:`px-2 py-0.5 text-xs rounded-full border transition-colors capitalize ${n.status===e?`bg-github-accent text-white border-github-accent`:`border-github-border text-github-text-secondary hover:bg-github-bg-tertiary`}`,children:[e,` `,t]},e))]}),D.length>1&&(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 mt-2`,children:[D.map(([e,t])=>(0,F.jsxs)(`button`,{onClick:()=>k(e),className:`px-2 py-0.5 text-xs rounded-full border transition-colors font-mono ${n.extensions.has(e)?`bg-github-accent text-white border-github-accent`:`border-github-border text-github-text-secondary hover:bg-github-bg-tertiary`}`,title:`${t} file${t===1?``:`s`} with .${e}`,children:[e===`(none)`?`no-ext`:`.${e}`,` `,t]},e)),n.extensions.size>0&&(0,F.jsx)(`button`,{onClick:()=>r({extensions:new Set}),className:`px-2 py-0.5 text-xs rounded-full text-github-text-muted hover:text-github-text-primary`,children:`clear`})]})]})]}),(0,F.jsx)(`div`,{className:`flex-1 overflow-y-auto relative z-0`,style:b,ref:v,children:d!==`tree`&&f===`ready`&&u?(()=>{let e=u.groups.map(e=>({group:e,files:te?e.files.filter(e=>ne.has(e)):e.files})).filter(e=>e.files.length>0),t=te?u.noise.filter(e=>ne.has(e)):u.noise;return e.length===0&&t.length===0?(0,F.jsx)(`div`,{className:`px-4 py-6 text-center text-sm text-github-text-muted`,children:`No files match the filter.`}):(0,F.jsxs)(F.Fragment,{children:[e.map(({group:e,files:t},n)=>(0,F.jsxs)(`details`,{open:!de.has(e.id),onToggle:t=>{t.currentTarget.open===de.has(e.id)&&fe(e.id)},className:`group/cohort`,children:[(0,F.jsxs)(`summary`,{className:`flex h-9 cursor-pointer list-none items-center gap-2 bg-github-bg-secondary px-4`,children:[(0,F.jsx)(Je,{size:14,className:`flex-none text-github-text-muted transition-transform group-open/cohort:rotate-90`}),(0,F.jsx)(`span`,{className:`flex h-4 w-4 flex-none items-center justify-center rounded-full bg-github-accent text-[10px] font-semibold text-white`,children:n+1}),(0,F.jsx)(`span`,{className:`text-sm font-medium text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap`,title:e.rationale??``,children:e.label}),(0,F.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:t.length})]}),t.map(e=>I(e))]},e.id)),t.length>0&&(0,F.jsxs)(`details`,{className:`group/noise`,children:[(0,F.jsxs)(`summary`,{className:`flex h-9 cursor-pointer list-none items-center gap-2 bg-github-bg-secondary px-4 text-sm font-medium text-github-text-secondary`,children:[(0,F.jsx)(Je,{size:14,className:`flex-none text-github-text-muted transition-transform group-open/noise:rotate-90`}),`Noise`,(0,F.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:t.length})]}),t.map(e=>I(e))]})]})})():d!==`tree`&&f===`loading`?(0,F.jsx)(`div`,{className:`px-4 py-3 text-sm text-github-text-secondary`,children:`Grouping…`}):g.children?.map(e=>ge(e))})]})});function p_({isOpen:e,onClose:t}){let{enableScope:n,disableScope:r}=we();return Ae(`escape`,()=>t(),{enabled:e},[t,e]),(0,P.useEffect)(()=>(e?r(`navigation`):n(`navigation`),()=>{n(`navigation`)}),[e,n,r]),e?(0,F.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,F.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,onClick:t}),(0,F.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:[(0,F.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:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`Keyboard Shortcuts`}),(0,F.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary transition-colors`,"aria-label":`Close help modal`,children:(0,F.jsx)(Rt,{size:20})})]}),(0,F.jsxs)(`div`,{className:`px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6`,children:[(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Line Navigation`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`j`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`↓`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next line`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`k`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`↑`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous line`})]})]})]}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`File Navigation`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`]`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next file`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`[`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous file`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`[`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Jump to first file`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`]`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Jump to last file`})]})]})]}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Chunk Navigation`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`n`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next change chunk (added/deleted lines)`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`p`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous change chunk (added/deleted lines)`})]})]})]}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Comment Navigation`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`N`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Next comment`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`P`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Previous comment`})]})]})]}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Side Navigation (Side-by-side mode)`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`h`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`←`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Focus left side`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`l`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`→`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Focus right side`})]})]})]}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Comment Management`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`L`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`View all comments list`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`C`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Copy all comments prompt`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`D`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Delete all comments`})]})]})]}),(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h3`,{className:`text-sm font-semibold text-github-text-primary mb-2`,children:`Actions`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`v`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Toggle viewed state of current file`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`Shift`}),(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`+`}),(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`R`})]}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Refresh diff when changes detected`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`c`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Add comment at current line`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`.`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Move cursor to center of viewport`})]}),(0,F.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,F.jsx)(`kbd`,{className:`px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono`,children:`?`}),(0,F.jsx)(`span`,{className:`text-github-text-secondary`,children:`Show/hide this help`})]})]})]}),(0,F.jsx)(`div`,{className:`pt-4 border-t border-github-border lg:col-span-2`,children:(0,F.jsx)(`p`,{className:`text-xs text-github-text-secondary`,children:`Shortcuts are disabled when typing in input fields.`})})]})]})]}):null}function m_({style:e}){return(0,F.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:`6px`,...e},"aria-label":`diff-easy`,role:`img`,children:[(0,F.jsx)(`img`,{src:`/logo.png`,alt:``,style:{height:`100%`,width:`auto`}}),(0,F.jsx)(`span`,{style:{fontWeight:600,letterSpacing:`-0.01em`},children:`diff-easy`})]})}function h_({shouldReload:e,isReloading:t,onReload:n,changeType:r,className:i=``,compact:a=!1}){return e?(0,F.jsxs)(`button`,{onClick:n,disabled:t,className:`
|
|
64
|
+
flex items-center gap-1.5 text-xs rounded-md border ${i} ${a?`px-2 py-2`:`px-3 py-1.5`}
|
|
65
|
+
${t?`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`}
|
|
66
|
+
`,title:`${(()=>{switch(r){case`commit`:return`New commits available`;case`staging`:return`Staging changes detected`;case`file`:return`File changes detected`;default:return`Changes detected`}})()} - Click to refresh`,"aria-label":a?`Refresh`:void 0,children:[(0,F.jsx)(Dt,{size:12,className:`${t?`animate-spin`:``}`}),a?(0,F.jsx)(`span`,{className:`sr-only`,children:`Refresh`}):`Refresh`]}):null}var g_=`Working tree (all changes)`;function __(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleDateString()}function v_({isOpen:e,onClose:t,options:n,selection:r,resolvedBaseRevision:i,resolvedTargetRevision:a,onApply:o}){let[s,c]=(0,P.useState)(r.baseCommitish),[l,u]=(0,P.useState)(r.targetCommitish),[d,f]=(0,P.useState)(r.baseCommitish?`target`:`base`),[p,m]=(0,P.useState)(`branches`),[h,g]=(0,P.useState)(``),{enableScope:_,disableScope:v}=we();(0,P.useEffect)(()=>{e&&(c(r.baseCommitish),u(r.targetCommitish),f(r.baseCommitish?`target`:`base`),g(``))},[e,r]),(0,P.useEffect)(()=>(e?v(`navigation`):_(`navigation`),()=>{_(`navigation`)}),[e,_,v]),(0,P.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e,t]);let y=h.trim().toLowerCase(),b=(0,P.useMemo)(()=>y?n.branches.filter(e=>e.name.toLowerCase().includes(y)):n.branches,[y,n.branches]),x=(0,P.useMemo)(()=>y?n.commits.filter(e=>e.shortHash.toLowerCase().includes(y)||e.message.toLowerCase().includes(y)):n.commits,[y,n.commits]),S=(e,t)=>{if(!e)return``;if(e===`.`)return g_;let r=n.branches.find(t=>t.name===e);if(r)return r.name;let i=n.commits.find(t=>t.shortHash===e||t.hash===e);return i?i.shortHash:t||e},C=S(s,i),w=S(l,a),T=d===`base`?s:l,E=e=>{d===`base`?(c(e),f(`target`)):u(e)};if(!e)return null;let D=!!s&&!!l&&s!==l,O=()=>{o(mn(s,l)),t()},k=e=>[`flex-1 rounded-lg border px-3 py-2.5 text-left transition-colors cursor-pointer`,d===e?`border-github-accent ring-2 ring-github-accent/40 bg-github-bg-primary`:`border-github-border bg-github-bg-primary hover:border-github-text-secondary`].join(` `),A=e=>[`flex-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors`,p===e?`bg-github-accent text-white`:`text-github-text-secondary hover:text-github-text-primary`].join(` `),j=e=>T===e,M=e=>[`flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors`,e?`bg-github-accent/15 text-github-text-primary`:`text-github-text-primary hover:bg-github-bg-tertiary`].join(` `);return(0,F.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,F.jsx)(`div`,{className:`absolute inset-0 bg-black/40`,onClick:t}),(0,F.jsxs)(`div`,{className:`relative mx-4 w-full max-w-2xl rounded-xl border border-github-border bg-github-bg-secondary shadow-2xl`,role:`dialog`,"aria-modal":`true`,"aria-label":`Compare`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between border-b border-github-border px-5 py-4`,children:[(0,F.jsx)(`h2`,{className:`text-lg font-semibold text-github-text-primary`,children:`Compare`}),(0,F.jsx)(`button`,{onClick:t,className:`p-1 text-github-text-secondary transition-colors hover:text-github-text-primary`,"aria-label":`Close`,type:`button`,children:(0,F.jsx)(Rt,{size:18})})]}),(0,F.jsxs)(`div`,{className:`flex items-stretch gap-3 px-5 pt-4`,children:[(0,F.jsxs)(`button`,{type:`button`,className:k(`base`),onClick:()=>f(`base`),children:[(0,F.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-wide text-github-text-muted`,children:`Base`}),(0,F.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-sm font-semibold text-github-text-primary`,children:[(0,F.jsx)(dt,{size:14,className:`flex-none text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`truncate`,children:C||(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`Select…`})})]})]}),(0,F.jsx)(`div`,{className:`flex items-center text-github-text-muted`,children:(0,F.jsx)(Ve,{size:20})}),(0,F.jsxs)(`button`,{type:`button`,className:k(`target`),onClick:()=>f(`target`),children:[(0,F.jsx)(`div`,{className:`text-[10px] font-bold uppercase tracking-wide text-github-text-muted`,children:`Target`}),(0,F.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-sm font-semibold text-github-text-primary`,children:[(0,F.jsx)(dt,{size:14,className:`flex-none text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`truncate`,children:w||(0,F.jsx)(`span`,{className:`text-github-text-muted`,children:`Select…`})})]})]})]}),(0,F.jsx)(`div`,{className:`px-5 pt-4`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-github-border bg-github-bg-primary px-3 py-2 focus-within:border-github-accent`,children:[(0,F.jsx)(kt,{size:16,className:`flex-none text-github-text-muted`}),(0,F.jsx)(`input`,{value:h,onChange:e=>g(e.target.value),placeholder:`Filter branches & commits…`,"aria-label":`Filter branches and commits`,autoFocus:!0,spellCheck:!1,className:`w-full bg-transparent text-sm text-github-text-primary placeholder-github-text-muted focus:outline-none`})]})}),d===`target`&&(0,F.jsx)(`div`,{className:`px-5 pt-3`,children:(0,F.jsxs)(`button`,{type:`button`,onClick:()=>E(`.`),className:M(j(`.`)),children:[(0,F.jsx)(it,{size:16,className:`flex-none text-github-text-secondary`}),(0,F.jsx)(`span`,{children:g_})]})}),(0,F.jsxs)(`div`,{className:`flex gap-1 px-5 pt-3`,children:[(0,F.jsx)(`button`,{type:`button`,className:A(`branches`),onClick:()=>m(`branches`),children:`Branches`}),(0,F.jsx)(`button`,{type:`button`,className:A(`commits`),onClick:()=>m(`commits`),children:`Commits`})]}),(0,F.jsxs)(`div`,{className:`max-h-[280px] overflow-y-auto px-3 pt-2`,children:[p===`branches`&&b.map(e=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>E(e.name),className:M(j(e.name)),children:[(0,F.jsx)(dt,{size:16,className:`flex-none text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),e.current&&(0,F.jsx)(`span`,{className:`flex-none rounded-full bg-github-accent/15 px-2 py-0.5 text-[10px] font-bold text-github-accent`,children:`current`}),e.name===n.originDefaultBranch&&(0,F.jsx)(`span`,{className:`flex-none rounded-full bg-github-bg-tertiary px-2 py-0.5 text-[10px] font-bold text-github-text-secondary`,children:`default`})]},e.name)),p===`commits`&&x.map(e=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>E(e.shortHash),className:M(j(e.shortHash)||j(e.hash)),children:[(0,F.jsx)(ft,{size:16,className:`flex-none text-github-text-secondary`}),(0,F.jsx)(`code`,{className:`flex-none font-mono text-xs text-github-accent`,children:e.shortHash}),(0,F.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-github-text-secondary`,children:e.message}),__(e.date)&&(0,F.jsx)(`span`,{className:`flex-none text-xs text-github-text-muted`,children:__(e.date)})]},e.hash))]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-github-border px-5 py-4`,children:[(0,F.jsxs)(`span`,{className:`min-w-0 truncate text-sm text-github-text-muted`,children:[`Comparing`,` `,(0,F.jsx)(`span`,{className:`font-mono text-github-text-secondary`,children:C||`…`}),` → `,(0,F.jsx)(`span`,{className:`font-mono text-github-text-secondary`,children:w||`…`})]}),(0,F.jsxs)(`div`,{className:`flex flex-none items-center gap-2`,children:[(0,F.jsx)(`button`,{onClick:t,className:`rounded-md px-3 py-2 text-sm font-medium text-github-text-secondary transition-colors hover:text-github-text-primary`,type:`button`,children:`Cancel`}),(0,F.jsx)(`button`,{onClick:O,disabled:!D,className:`rounded-md bg-github-accent px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-github-accent/90 disabled:cursor-not-allowed disabled:opacity-50`,type:`button`,children:`Compare`})]})]})]})]})}var y_=[{id:`vscode`,label:`VS Code`,command:`code`,argsTemplate:`-g %file:%line`},{id:`cursor`,label:`Cursor`,command:`cursor`,argsTemplate:`-g %file:%line`},{id:`zed`,label:`Zed`,command:`zed`,argsTemplate:`%file:%line`},{id:`textmate`,label:`TextMate`,command:`mate`,argsTemplate:`-l %line %file`},{id:`bbedit`,label:`BBEdit`,command:`bbedit`,argsTemplate:`+%line %file`},{id:`emacs`,label:`Emacs`,command:`emacsclient`,argsTemplate:`--no-wait +%line %file`},{id:`macvim`,label:`MacVim`,command:`mvim`,argsTemplate:`--remote-silent +%line %file`},{id:`sublime`,label:`Sublime Text`,command:`subl`,argsTemplate:`%file:%line`},{id:`nova`,label:`Nova`,command:`nova`,argsTemplate:`open %file -l %line`},{id:`custom`,label:`Custom…`,command:``,argsTemplate:``},{id:`none`,label:`Hide “Open in editor” button`,command:``,argsTemplate:``}],b_=y_.find(e=>e.id===`vscode`)??y_[0],x_=e=>{let t=(e??`vscode`).toLowerCase();return y_.find(e=>e.id===t)??b_};function S_(e){return e.replaceAll(`\\`,`/`).replace(/^\.\/+/,``)}function C_(e){return e.replace(/[|\\{}()[\]^$+?.]/g,`\\$&`)}function w_(e){let t=new Set;return e.forEach(e=>{let n=e.trim();n&&t.add(S_(n))}),[...t]}function T_(e){return S_(e).split(`/`).filter(e=>e.length>0)}function E_(e,t){let n=`^`;for(let e of t){if(e===`*`){n+=`.*`;continue}if(e===`?`){n+=`.`;continue}n+=C_(e)}return n+=`$`,new RegExp(n).test(e)}function D_(e,t,n=0,r=0){if(r>=t.length)return n>=e.length;let i=t[r];if(!i)return n>=e.length;if(i===`**`){let i=r+1;if(i>=t.length)return!0;for(let r=n;r<=e.length;r+=1)if(D_(e,t,r,i))return!0;return!1}let a=e[n];return!a||!E_(a,i)?!1:D_(e,t,n+1,r+1)}function O_(e){return Array.isArray(e)?w_(e.filter(e=>typeof e==`string`)):[]}function k_(e){return w_(e.split(/\r?\n/))}function A_(e){return O_(e).join(`
|
|
67
|
+
`)}function j_(e,t){let n=S_(t.trim());if(!n)return!1;let r=S_(e);return n.includes(`/`)?D_(T_(r),T_(n)):E_(r.split(`/`).pop()??r,n)}function M_(e,t){return O_(t).some(t=>j_(e,t))}var N_=[{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`}],P_=[{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`}],F_=e=>e===`light`?N_:P_,I_=(e,t)=>F_(t).some(t=>t.id===e),L_=e=>F_(e)[0];function R_(){return typeof window<`u`}function z_(e){return H_(e)?(e.nodeName||``).toLowerCase():`#document`}function B_(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V_(e){return((H_(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function H_(e){return R_()?e instanceof Node||e instanceof B_(e).Node:!1}function U_(e){return R_()?e instanceof Element||e instanceof B_(e).Element:!1}function W_(e){return R_()?e instanceof HTMLElement||e instanceof B_(e).HTMLElement:!1}function G_(e){return!R_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof B_(e).ShadowRoot}function K_(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=rv(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function q_(e){return/^(table|td|th)$/.test(z_(e))}function J_(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Y_=/transform|translate|scale|rotate|perspective|filter/,X_=/paint|layout|strict|content/,Z_=e=>!!e&&e!==`none`,Q_;function $_(e){let t=U_(e)?rv(e):e;return Z_(t.transform)||Z_(t.translate)||Z_(t.scale)||Z_(t.rotate)||Z_(t.perspective)||!tv()&&(Z_(t.backdropFilter)||Z_(t.filter))||Y_.test(t.willChange||``)||X_.test(t.contain||``)}function ev(e){let t=av(e);for(;W_(t)&&!nv(t);){if($_(t))return t;if(J_(t))return null;t=av(t)}return null}function tv(){return Q_??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Q_}function nv(e){return/^(html|body|#document)$/.test(z_(e))}function rv(e){return B_(e).getComputedStyle(e)}function iv(e){return U_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function av(e){if(z_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||G_(e)&&e.host||V_(e);return G_(t)?t.host:t}function ov(e){let t=av(e);return nv(t)?e.ownerDocument?e.ownerDocument.body:e.body:W_(t)&&K_(t)?t:ov(t)}function sv(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ov(e),i=r===e.ownerDocument?.body,a=B_(r);if(i){let e=cv(a);return t.concat(a,a.visualViewport||[],K_(r)?r:[],e&&n?sv(e):[])}else return t.concat(r,sv(r,[],n))}function cv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var lv=Math.min,uv=Math.max,dv=Math.round,fv=Math.floor,pv=e=>({x:e,y:e}),mv={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function hv(e,t,n){return uv(e,lv(t,n))}function gv(e,t){return typeof e==`function`?e(t):e}function _v(e){return e.split(`-`)[0]}function vv(e){return e.split(`-`)[1]}function yv(e){return e===`x`?`y`:`x`}function bv(e){return e===`y`?`height`:`width`}function xv(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Sv(e){return yv(xv(e))}function Cv(e,t,n){n===void 0&&(n=!1);let r=vv(e),i=Sv(e),a=bv(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Mv(o)),[o,Mv(o)]}function wv(e){let t=Mv(e);return[Tv(e),t,Tv(t)]}function Tv(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ev=[`left`,`right`],Dv=[`right`,`left`],Ov=[`top`,`bottom`],kv=[`bottom`,`top`];function Av(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Dv:Ev:t?Ev:Dv;case`left`:case`right`:return t?Ov:kv;default:return[]}}function jv(e,t,n,r){let i=vv(e),a=Av(_v(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Tv)))),a}function Mv(e){let t=_v(e);return mv[t]+e.slice(t.length)}function Nv(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pv(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Nv(e)}function Fv(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var Iv=[`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] *)`].join(`,`),Lv=typeof Element>`u`,Rv=Lv?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zv=!Lv&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},Bv=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):Bv(e.parentNode))},Vv=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Hv=function(e,t,n){if(Bv(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Iv));return t&&Rv.call(e,Iv)&&r.unshift(e),r=r.filter(n),r},Uv=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!Bv(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=Uv(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Rv.call(a,Iv)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!Bv(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=Uv(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},Wv=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},Gv=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Vv(e))&&!Wv(e)?0:e.tabIndex},Kv=function(e,t){var n=Gv(e);return n<0&&t&&!Wv(e)?0:n},qv=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Jv=function(e){return e.tagName===`INPUT`},Yv=function(e){return Jv(e)&&e.type===`hidden`},Xv=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Zv=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Qv=function(e){if(!e.name)return!0;var t=e.form||zv(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){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`,e.message),!1}var i=Zv(r,e.form);return!i||i===e},$v=function(e){return Jv(e)&&e.type===`radio`},ey=function(e){return $v(e)&&!Qv(e)},ty=function(e){var t=e&&zv(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=zv(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},ny=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},ry=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=Rv.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Rv.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=zv(e);if(o&&!o.shadowRoot&&r(o)===!0)return ny(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(ty(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return ny(e);return!1},iy=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Rv.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},ay=function(e,t){return!(t.disabled||Yv(t)||ry(t,e)||Xv(t)||iy(t))},oy=function(e,t){return!(ey(t)||Gv(t)<0||!ay(e,t))},sy=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},cy=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=Kv(a,i),s=i?cy(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(qv).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},ly=function(e,t){return t||={},cy(t.getShadowRoot?Uv([e],t.includeContainer,{filter:oy.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:sy}):Hv(e,t.includeContainer,oy.bind(null,t)))};function uy(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function dy(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function fy(){return/apple/i.test(navigator.vendor)}function py(){return uy().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function my(){return dy().includes(`jsdom/`)}var hy=`data-floating-ui-focusable`,gy=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function _y(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function vy(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&G_(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function yy(e){return`composedPath`in e?e.composedPath()[0]:e.target}function by(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function xy(e){return e.matches(`html,body`)}function Sy(e){return e?.ownerDocument||document}function Cy(e){return W_(e)&&e.matches(gy)}function wy(e){if(!e||my())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ty(e){return e?e.hasAttribute(hy)?e:e.querySelector(`[data-floating-ui-focusable]`)||e:null}function Ey(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Ey(e,t.id,n)])}function Dy(e){return`nativeEvent`in e}function Oy(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var ky=typeof document<`u`?P.useLayoutEffect:function(){},Ay={...P};function jy(e){let t=P.useRef(e);return ky(()=>{t.current=e}),t}var My=Ay.useInsertionEffect||(e=>e());function Ny(e){let t=P.useRef(()=>{});return My(()=>{t.current=e}),P.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var Py=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function Fy(e,t){let n=ly(e,Py()),r=n.length;if(r===0)return;let i=_y(Sy(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Iy(e){return Fy(Sy(e).body,1)||e}function Ly(e){return Fy(Sy(e).body,-1)||e}function Ry(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!vy(n,r)}function zy(e){ly(e,Py()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function By(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Vy=l(A(),1);function Hy(e,t,n){let{reference:r,floating:i}=e,a=xv(t),o=Sv(t),s=bv(o),c=_v(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(vv(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Uy(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=gv(t,e),p=Pv(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Fv(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Fv(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Wy=50,Gy=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Uy},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Hy(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Wy&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Hy(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ky=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=gv(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=_v(r),_=xv(o),v=_v(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Mv(o)]:wv(o)),x=p!==`none`;!d&&x&&b.push(...jv(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Cv(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==xv(t))||T.every(e=>xv(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=xv(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},qy=new Set([`left`,`top`]);async function Jy(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=_v(n),s=vv(n),c=xv(n)===`y`,l=qy.has(o)?-1:1,u=a&&c?-1:1,d=gv(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Yy=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Jy(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Xy=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=gv(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=xv(_v(i)),p=yv(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=hv(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=hv(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}};function Zy(e){let t=rv(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=W_(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=dv(n)!==a||dv(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Qy(e){return U_(e)?e:e.contextElement}function $y(e){let t=Qy(e);if(!W_(t))return pv(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Zy(t),o=(a?dv(n.width):n.width)/r,s=(a?dv(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var eb=pv(0);function tb(e){let t=B_(e);return!tv()||!t.visualViewport?eb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B_(e)?!1:t}function rb(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Qy(e),o=pv(1);t&&(r?U_(r)&&(o=$y(r)):o=$y(e));let s=nb(a,n,r)?tb(a):pv(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=B_(a),t=r&&U_(r)?B_(r):r,n=e,i=cv(n);for(;i&&r&&t!==n;){let e=$y(i),t=i.getBoundingClientRect(),r=rv(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=B_(i),i=cv(n)}}return Fv({width:u,height:d,x:c,y:l})}function ib(e,t){let n=iv(e).scrollLeft;return t?t.left+n:rb(V_(e)).left+n}function ab(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ib(e,n),y:n.top+t.scrollTop}}function ob(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=V_(r),s=t?J_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=pv(1),u=pv(0),d=W_(r);if((d||!d&&!a)&&((z_(r)!==`body`||K_(o))&&(c=iv(r)),d)){let e=rb(r);l=$y(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ab(o,c):pv(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function sb(e){return Array.from(e.getClientRects())}function cb(e){let t=V_(e),n=iv(e),r=e.ownerDocument.body,i=uv(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=uv(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ib(e),s=-n.scrollTop;return rv(r).direction===`rtl`&&(o+=uv(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var lb=25;function ub(e,t){let n=B_(e),r=V_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=tv();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ib(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=lb&&(a-=o)}else l<=lb&&(a+=l);return{width:a,height:o,x:s,y:c}}function db(e,t){let n=rb(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=W_(e)?$y(e):pv(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function fb(e,t,n){let r;if(t===`viewport`)r=ub(e,n);else if(t===`document`)r=cb(V_(e));else if(U_(t))r=db(t,n);else{let n=tb(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fv(r)}function pb(e,t){let n=av(e);return n===t||!U_(n)||nv(n)?!1:rv(n).position===`fixed`||pb(n,t)}function mb(e,t){let n=t.get(e);if(n)return n;let r=sv(e,[],!1).filter(e=>U_(e)&&z_(e)!==`body`),i=null,a=rv(e).position===`fixed`,o=a?av(e):e;for(;U_(o)&&!nv(o);){let t=rv(o),n=$_(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||K_(o)&&!n&&pb(e,o))?r=r.filter(e=>e!==o):i=t,o=av(o)}return t.set(e,r),r}function hb(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?J_(t)?[]:mb(t,this._c):[].concat(n),r],o=fb(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=fb(t,a[e],i);s=uv(n.top,s),c=lv(n.right,c),l=lv(n.bottom,l),u=uv(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function gb(e){let{width:t,height:n}=Zy(e);return{width:t,height:n}}function _b(e,t,n){let r=W_(t),i=V_(t),a=n===`fixed`,o=rb(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=pv(0);function l(){c.x=ib(i)}if(r||!r&&!a)if((z_(t)!==`body`||K_(i))&&(s=iv(t)),r){let e=rb(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ab(i,s):pv(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function vb(e){return rv(e).position===`static`}function yb(e,t){if(!W_(e)||rv(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return V_(e)===n&&(n=n.ownerDocument.body),n}function bb(e,t){let n=B_(e);if(J_(e))return n;if(!W_(e)){let t=av(e);for(;t&&!nv(t);){if(U_(t)&&!vb(t))return t;t=av(t)}return n}let r=yb(e,t);for(;r&&q_(r)&&vb(r);)r=yb(r,t);return r&&nv(r)&&vb(r)&&!$_(r)?n:r||ev(e)||n}var xb=async function(e){let t=this.getOffsetParent||bb,n=this.getDimensions,r=await n(e.floating);return{reference:_b(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sb(e){return rv(e).direction===`rtl`}var Cb={convertOffsetParentRelativeRectToViewportRelativeRect:ob,getDocumentElement:V_,getClippingRect:hb,getOffsetParent:bb,getElementRects:xb,getClientRects:sb,getDimensions:gb,getScale:$y,isElement:U_,isRTL:Sb};function wb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tb(e,t){let n=null,r,i=V_(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=fv(d),h=fv(i.clientWidth-(u+f)),g=fv(i.clientHeight-(d+p)),_=fv(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:uv(0,lv(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!wb(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Eb(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Qy(e),u=i||a?[...l?sv(l):[],...t?sv(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Tb(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?rb(e):null;c&&g();function g(){let t=rb(e);h&&!wb(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Db=Yy,Ob=Xy,kb=Ky,Ab=(e,t,n)=>{let r=new Map,i={platform:Cb,...n},a={...i.platform,_c:r};return Gy(e,t,{...i,platform:a})},jb=typeof document<`u`?P.useLayoutEffect:function(){};function Mb(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Mb(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Mb(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Nb(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pb(e,t){let n=Nb(e);return Math.round(t*n)/n}function Fb(e){let t=P.useRef(e);return jb(()=>{t.current=e}),t}function Ib(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);Mb(f,r)||p(r);let[m,h]=P.useState(null),[g,_]=P.useState(null),v=P.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=P.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=P.useRef(null),C=P.useRef(null),w=P.useRef(u),T=c!=null,E=Fb(c),D=Fb(i),O=Fb(l),k=P.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Ab(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Mb(w.current,t)&&(w.current=t,Vy.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);jb(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=P.useRef(!1);jb(()=>(A.current=!0,()=>{A.current=!1}),[]),jb(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=P.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=P.useMemo(()=>({reference:b,floating:x}),[b,x]),N=P.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Pb(M.floating,u.x),r=Pb(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Nb(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Lb=(e,t)=>{let n=Db(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rb=(e,t)=>{let n=Ob(e);return{name:n.name,fn:n.fn,options:[e,t]}},zb=(e,t)=>{let n=kb(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bb=`data-floating-ui-focusable`,Vb=`active`,Hb=`selected`,Ub=`ArrowLeft`,Wb=`ArrowRight`,Gb=`ArrowUp`,Kb=`ArrowDown`,qb=[Ub,Wb],Jb=[Gb,Kb];[...qb,...Jb];var Yb={...P},Xb=!1,Zb=0,Qb=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ Zb++;function $b(){let[e,t]=P.useState(()=>Xb?Qb():void 0);return ky(()=>{e??t(Qb())},[]),P.useEffect(()=>{Xb=!0},[]),e}var ex=Yb.useId||$b;function tx(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var nx=P.createContext(null),rx=P.createContext(null),ix=()=>P.useContext(nx)?.id||null,ax=()=>P.useContext(rx);function ox(e){return`data-floating-ui-`+e}function sx(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var cx=ox(`safe-polygon`);function lx(e,t,n){if(n&&!Oy(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function ux(e){return typeof e==`function`?e():e}function dx(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=ax(),m=ix(),h=jy(l),g=jy(c),_=jy(n),v=jy(d),y=P.useRef(),b=P.useRef(-1),x=P.useRef(),S=P.useRef(-1),C=P.useRef(!0),w=P.useRef(!1),T=P.useRef(()=>{}),E=P.useRef(!1),D=Ny(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});P.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(sx(b),sx(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),P.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=Sy(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=P.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=lx(g.current,`close`,y.current);i&&!x.current?(sx(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(sx(b),r(!1,e,n))},[g,r]),k=Ny(()=>{T.current(),x.current=void 0}),A=Ny(()=>{if(w.current){let e=Sy(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(cx),w.current=!1}}),j=Ny(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);P.useEffect(()=>{if(!s)return;function e(e){if(sx(b),C.current=!1,u&&!Oy(y.current)||ux(v.current)>0&&!lx(g.current,`open`))return;let t=lx(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=Sy(o.floating);if(sx(S),E.current=!1,h.current&&i.current.floatingContext){n||sx(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!vy(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){sx(b)}function l(e){j()||O(e,!1)}if(U_(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),ky(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(U_(o.domReference)&&e){var t;let n=Sy(o.floating).body;n.setAttribute(cx,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),ky(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),P.useEffect(()=>()=>{k(),sx(b),sx(S),A()},[s,o.domReference,k,A]);let M=P.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}u&&!Oy(y.current)||n||ux(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(sx(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,ux(v.current))))}}},[u,r,n,_,v]);return P.useMemo(()=>s?{reference:M}:{},[s,M])}var fx={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},px=P.forwardRef(function(e,t){let[n,r]=P.useState();ky(()=>{fy()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[ox(`focus-guard`)]:``,style:fx};return(0,F.jsx)(`span`,{...e,...i})}),mx={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},hx=P.createContext(null),gx=ox(`portal`);function _x(e){e===void 0&&(e={});let{id:t,root:n}=e,r=ex(),i=yx(),[a,o]=P.useState(null),s=P.useRef(null);return ky(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),ky(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(gx,``),e.appendChild(n),s.current=n,o(n)},[t,r]),ky(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!H_(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(gx,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function vx(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=_x({id:n,root:r}),[o,s]=P.useState(null),c=P.useRef(null),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return P.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&Ry(e)&&(e.type===`focusin`?By:zy)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),P.useEffect(()=>{a&&(p||By(a))},[p,a]),(0,F.jsxs)(hx.Provider,{value:P.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,F.jsx)(px,{"data-type":`outside`,ref:c,onFocus:e=>{if(Ry(e,a)){var t;(t=u.current)==null||t.focus()}else Ly(o?o.domReference:null)?.focus()}}),m&&a&&(0,F.jsx)(`span`,{"aria-owns":a.id,style:mx}),a&&Vy.createPortal(t,a),m&&a&&(0,F.jsx)(px,{"data-type":`outside`,ref:l,onFocus:e=>{if(Ry(e,a)){var t;(t=d.current)==null||t.focus()}else Iy(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var yx=()=>P.useContext(hx),bx={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},xx={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Sx=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Cx(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=ax(),g=Ny(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=P.useRef(!1),{escapeKey:y,outsidePress:b}=Sx(p),{escapeKey:x,outsidePress:S}=Sx(m),C=P.useRef(!1),w=Ny(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?Ey(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,Dy(e)?e.nativeEvent:e,`escape-key`)}),T=Ny(e=>{var t;let n=()=>{var t;w(e),(t=yy(e))==null||t.removeEventListener(`keydown`,n)};(t=yy(e))==null||t.addEventListener(`keydown`,n)}),E=Ny(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=yy(e),s=`[`+ox(`inert`)+`]`,c=Sy(i.floating).querySelectorAll(s),u=U_(o)?o:null;for(;u&&!nv(u);){let e=av(u);if(nv(e)||!U_(e))break;u=e}if(c.length&&U_(o)&&!xy(o)&&!vy(o,i.floating)&&Array.from(c).every(e=>!vy(u,e)))return;if(W_(o)&&k){let t=nv(o),n=rv(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&Ey(h.nodesRef.current,d).some(t=>by(e,t.context?.elements.floating));if(by(e,i.floating)||by(e,i.domReference)||f)return;let p=h?Ey(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=Ny(e=>{var t;let n=()=>{var t;E(e),(t=yy(e))==null||t.removeEventListener(l,n)};(t=yy(e))==null||t.addEventListener(l,n)});P.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},tv()?5:0)}let d=Sy(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(U_(i.domReference)&&(p=sv(i.domReference)),U_(i.floating)&&(p=p.concat(sv(i.floating))),!U_(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(sv(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),P.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=P.useMemo(()=>({onKeyDown:w,...u&&{[bx[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=P.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[xx[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return P.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function wx(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=ex(),a=P.useRef({}),[o]=P.useState(()=>tx()),s=ix()!=null,[c,l]=P.useState(r.reference),u=Ny((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=P.useMemo(()=>({setPositionReference:l}),[]),f=P.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return P.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Tx(e){e===void 0&&(e={});let{nodeId:t}=e,n=wx({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=P.useState(null),[s,c]=P.useState(null),l=i?.domReference||a,u=P.useRef(null),d=ax();ky(()=>{l&&(u.current=l)},[l]);let f=Ib({...e,elements:{...i,...s&&{reference:s}}}),p=P.useCallback(e=>{let t=U_(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=P.useCallback(e=>{(U_(e)||e===null)&&(u.current=e,o(e)),(U_(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!U_(e))&&f.refs.setReference(e)},[f.refs]),h=P.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=P.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=P.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return ky(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),P.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function Ex(){return py()&&fy()}function Dx(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!s)return;let e=B_(o.domReference);function t(){!n&&W_(o.domReference)&&o.domReference===_y(Sy(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Ex()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Ex()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),P.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),P.useEffect(()=>()=>{sx(u)},[]);let f=P.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=yy(e.nativeEvent);if(c&&U_(t)){if(Ex()&&!e.relatedTarget){if(!d.current&&!Cy(t))return}else if(!wy(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=U_(t)&&t.hasAttribute(ox(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=_y(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||vy(a.current.floatingContext?.refs.floating.current,e)||vy(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return P.useMemo(()=>s?{reference:f}:{},[s,f])}function Ox(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Vb]:t,[Hb]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Bb]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Vb,Hb].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function kx(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=P.useCallback(t=>Ox(t,e,`reference`),t),a=P.useCallback(t=>Ox(t,e,`floating`),n),o=P.useCallback(t=>Ox(t,e,`item`),r);return P.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Ax=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function jx(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=ex(),c=r.domReference?.id||s,l=P.useMemo(()=>Ty(r.floating)?.id||i,[r.floating,i]),u=Ax.get(o)??o,d=ix()!=null,f=P.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=P.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=P.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return P.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}var Mx=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e.toLowerCase());function Nx(e,t){return typeof e==`function`?e(t):e}function Px(e,t){let[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){let e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}function Fx(e,t){t===void 0&&(t={});let{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=(typeof i==`number`?i:i.close)||0,[o,s]=P.useState(`unmounted`),c=Px(n,a);return!c&&o===`close`&&s(`unmounted`),ky(()=>{if(r){if(n){s(`initial`);let e=requestAnimationFrame(()=>{Vy.flushSync(()=>{s(`open`)})});return()=>{cancelAnimationFrame(e)}}s(`close`)}},[n,r]),{isMounted:c,status:o}}function Ix(e,t){t===void 0&&(t={});let{initial:n={opacity:0},open:r,close:i,common:a,duration:o=250}=t,s=e.placement,c=s.split(`-`)[0],l=P.useMemo(()=>({side:c,placement:s}),[c,s]),u=typeof o==`number`,d=(u?o:o.open)||0,f=(u?o:o.close)||0,[p,m]=P.useState(()=>({...Nx(a,l),...Nx(n,l)})),{isMounted:h,status:g}=Fx(e,{duration:o}),_=jy(n),v=jy(r),y=jy(i),b=jy(a);return ky(()=>{let e=Nx(_.current,l),t=Nx(y.current,l),n=Nx(b.current,l),r=Nx(v.current,l)||Object.keys(e).reduce((e,t)=>(e[t]=``,e),{});if(g===`initial`&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),g===`open`&&m({transitionProperty:Object.keys(r).map(Mx).join(`,`),transitionDuration:d+`ms`,...n,...r}),g===`close`){let r=t||e;m({transitionProperty:Object.keys(r).map(Mx).join(`,`),transitionDuration:f+`ms`,...n,...r})}},[f,y,_,v,b,d,g,l]),{isMounted:h,styles:p}}var Lx=e=>e===`top`?`translateY(4px)`:e===`bottom`?`translateY(-4px)`:e===`left`?`translateX(4px)`:`translateX(-4px)`,Rx=(e,t)=>{if(typeof e==`function`){e(t);return}e&&`current`in e&&(e.current=t)};function zx({content:e,children:t,placement:n=`top`,className:r=``}){let[i,a]=(0,P.useState)(!1),o=(0,P.useId)(),{refs:s,floatingStyles:c,context:l}=Tx({open:i,onOpenChange:a,placement:n,middleware:[Lb(8),zb(),Rb({padding:8})],whileElementsMounted:Eb}),u=dx(l,{move:!1}),d=Dx(l),f=Cx(l),p=jx(l,{role:`tooltip`}),{isMounted:m,styles:h}=Ix(l,{duration:{open:180,close:120},initial:({side:e})=>({opacity:0,transform:Lx(e)}),open:{opacity:1,transform:`translate(0, 0)`},close:({side:e})=>({opacity:0,transform:Lx(e)}),common:{willChange:`opacity, transform`}}),{getReferenceProps:g,getFloatingProps:_}=kx([u,d,f,p]),v=t.props,y=g({...v,"aria-describedby":i?o:void 0}),b=[`w-64 rounded-md border border-github-border bg-github-bg-primary px-3 py-2 text-xs text-github-text-primary`,r].filter(Boolean).join(` `);return(0,F.jsxs)(F.Fragment,{children:[(0,P.cloneElement)(t,{...y,ref:e=>{Rx(v.ref,e),s.setReference(e)}}),m?(0,F.jsx)(vx,{children:(0,F.jsx)(`div`,{ref:s.setFloating,..._(),id:o,style:c,className:`z-[60]`,children:(0,F.jsx)(`div`,{style:h,className:b,children:e})})}):null]})}var Bx={fontSize:14,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,theme:`dark`,syntaxTheme:`vsDark`,editor:{id:b_.id,command:b_.command,argsTemplate:b_.argsTemplate},colorVision:`normal`,autoViewedPatterns:[],autoReload:!1},Vx=[{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`}],Hx=[{id:`normal`,label:`Normal`},{id:`deuteranopia`,label:`Deuteranopia`,tooltip:`Deuteranopia mode uses blue/orange instead of green/red for diffs.`}],Ux=[{id:`appearance`,label:`Appearance`},{id:`system`,label:`System`}];function Wx({isOpen:e,onClose:t,settings:n,onSettingsChange:r}){let[i,a]=(0,P.useState)(A_(n.autoViewedPatterns)),[o,s]=(0,P.useState)(`appearance`),{enableScope:c,disableScope:l}=we();(0,P.useEffect)(()=>(e?l(`navigation`):c(`navigation`),()=>{c(`navigation`)}),[e,c,l]);let u=()=>n.theme===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:n.theme,d=()=>F_(u()),f=e=>{let t={...n,theme:e},i=e===`auto`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:e;if(!I_(n.syntaxTheme,i)){let e=L_(i);e&&(t.syntaxTheme=e.id)}r(t)};return e?(0,F.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center z-50 pointer-events-none`,children:(0,F.jsxs)(`div`,{className:`bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-3xl mx-4 pointer-events-auto overflow-hidden`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-b border-github-border`,children:[(0,F.jsxs)(`h2`,{className:`text-lg font-semibold text-github-text-primary flex items-center gap-2`,children:[(0,F.jsx)(At,{size:20}),`Settings`]}),(0,F.jsx)(`button`,{onClick:t,className:`text-github-text-secondary hover:text-github-text-primary p-1`,children:(0,F.jsx)(Rt,{size:18})})]}),(0,F.jsxs)(`div`,{className:`flex flex-col sm:flex-row min-h-[420px]`,children:[(0,F.jsx)(`nav`,{"aria-label":`Settings sections`,className:`sm:w-40 border-b sm:border-b-0 sm:border-r border-github-border px-3 py-2`,children:(0,F.jsx)(`div`,{className:`flex sm:flex-col gap-1`,children:Ux.map(e=>{let t=e.id===o;return(0,F.jsx)(`button`,{type:`button`,onClick:()=>s(e.id),"aria-pressed":t,className:`flex-1 sm:flex-none text-left px-3 py-2 text-sm font-medium transition-colors border-b-2 sm:border-b-0 sm:border-l-2 ${t?`text-github-text-primary border-github-accent`:`text-github-text-secondary border-transparent hover:text-github-text-primary`}`,children:e.label},e.id)})})}),(0,F.jsxs)(`div`,{className:`flex-1 p-4 sm:p-6 overflow-y-auto`,children:[o===`appearance`&&(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Font Size`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`input`,{type:`range`,min:`10`,max:`20`,step:`1`,value:n.fontSize,onChange:e=>r({...n,fontSize:Number.parseInt(e.target.value,10)}),className:`flex-1 accent-github-accent`}),(0,F.jsxs)(`span`,{className:`text-sm text-github-text-secondary w-8 text-right`,children:[n.fontSize,`px`]})]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Font Family`}),(0,F.jsx)(`select`,{value:n.fontFamily,onChange:e=>r({...n,fontFamily:e.target.value}),className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:Vx.map(e=>(0,F.jsx)(`option`,{value:e.value,children:e.name},e.value))})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Theme`}),(0,F.jsx)(`div`,{className:`flex gap-2`,children:[`light`,`dark`,`auto`].map(e=>(0,F.jsx)(`button`,{type:`button`,onClick:()=>f(e),className:`px-3 py-2 text-sm rounded border transition-colors ${n.theme===e?`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:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Color Vision`}),(0,F.jsx)(`div`,{className:`flex gap-2`,children:Hx.map(e=>{let t=(0,F.jsx)(`button`,{type:`button`,onClick:()=>r({...n,colorVision:e.id}),className:`px-3 py-2 text-sm rounded border transition-colors ${(n.colorVision??`normal`)===e.id?`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:e.label},e.id);return`tooltip`in e?(0,F.jsx)(zx,{content:e.tooltip,children:t},e.id):t})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Syntax Highlighting Theme`}),(0,F.jsx)(`select`,{value:n.syntaxTheme,onChange:e=>r({...n,syntaxTheme:e.target.value}),className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:d().map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))})]})]}),o===`system`&&(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`label`,{htmlFor:`auto-reload`,className:`flex items-center gap-3 text-sm font-medium text-github-text-primary`,children:[(0,F.jsx)(`input`,{id:`auto-reload`,type:`checkbox`,checked:n.autoReload,onChange:e=>r({...n,autoReload:e.target.checked}),className:`accent-github-accent`}),`Auto-reload diffs on file changes`]}),(0,F.jsx)(`p`,{className:`mt-2 text-sm text-github-text-secondary`,children:`When on, every diff refreshes automatically on file changes and the manual Refresh button is hidden. When off, changes surface a Refresh button you click. Applies to all diffs and is remembered.`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{htmlFor:`auto-viewed-patterns`,className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Auto-Mark Viewed Patterns`}),(0,F.jsx)(`p`,{className:`text-sm text-github-text-secondary mb-2`,children:`Files matching these glob patterns are marked as Viewed automatically. Enter one pattern per line.`}),(0,F.jsx)(`textarea`,{id:`auto-viewed-patterns`,value:i,onChange:e=>{a(e.target.value),r({...n,autoViewedPatterns:k_(e.target.value)})},rows:6,spellCheck:!1,placeholder:`*.test.ts
|
|
68
|
+
*.stories.tsx
|
|
69
|
+
src/generated/**`,className:`w-full p-3 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm font-mono`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:`block text-sm font-medium text-github-text-primary mb-2`,children:`Open In Editor`}),(0,F.jsx)(`select`,{value:n.editor.id,onChange:e=>{let t=e.target.value,i=y_.find(e=>e.id===t);r({...n,editor:{id:t,command:i?.command??``,argsTemplate:i?.argsTemplate??``}})},className:`w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm`,children:y_.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))}),n.editor.id!==`none`&&(()=>{let e=n.editor.id===`custom`,t=e&&n.editor.command.trim()===``,i=e&&n.editor.argsTemplate.trim()===``,a=e?``:` opacity-60 cursor-not-allowed`;return(0,F.jsxs)(`div`,{"aria-label":`Editor command configuration`,className:`mt-3 p-3 bg-github-bg-tertiary border border-github-border rounded space-y-3`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{htmlFor:`editor-command`,className:`block text-sm font-medium text-github-text-primary mb-1`,children:`Command`}),(0,F.jsx)(`input`,{id:`editor-command`,type:`text`,value:n.editor.command,disabled:!e,required:e,"aria-invalid":t||void 0,onChange:e=>r({...n,editor:{...n.editor,command:e.target.value}}),placeholder:`e.g. mate`,spellCheck:!1,autoComplete:`off`,className:`w-full p-2 bg-github-bg-secondary border rounded text-github-text-primary text-sm font-mono${t?` border-red-500`:` border-github-border`}${a}`}),t&&(0,F.jsx)(`p`,{className:`mt-1 text-xs text-red-400`,children:`Command is required.`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{htmlFor:`editor-args`,className:`block text-sm font-medium text-github-text-primary mb-1`,children:`Arguments`}),(0,F.jsx)(`input`,{id:`editor-args`,type:`text`,value:n.editor.argsTemplate,disabled:!e,required:e,"aria-invalid":i||void 0,onChange:e=>r({...n,editor:{...n.editor,argsTemplate:e.target.value}}),placeholder:`-l %line %file`,spellCheck:!1,autoComplete:`off`,className:`w-full p-2 bg-github-bg-secondary border rounded text-github-text-primary text-sm font-mono${i?` border-red-500`:` border-github-border`}${a}`}),i&&(0,F.jsx)(`p`,{className:`mt-1 text-xs text-red-400`,children:`Arguments are required.`}),(0,F.jsx)(`p`,{className:`mt-2 text-xs text-github-text-secondary`,children:e?`Use %file and %line as placeholders. Wrap arguments containing spaces in single or double quotes. Arguments are passed directly to the command without a shell.`:`Select Custom… above to edit these fields.`})]})]})})()]})]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between p-4 border-t border-github-border`,children:[(0,F.jsx)(`button`,{onClick:()=>{if(o===`appearance`){r({...n,fontSize:Bx.fontSize,fontFamily:Bx.fontFamily,theme:Bx.theme,syntaxTheme:Bx.syntaxTheme,colorVision:Bx.colorVision});return}r({...n,editor:{...Bx.editor},autoViewedPatterns:Bx.autoViewedPatterns,autoReload:Bx.autoReload}),a(A_(Bx.autoViewedPatterns))},className:`px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary`,children:o===`appearance`?`Reset Appearance Defaults`:`Reset System Defaults`}),(0,F.jsx)(`button`,{onClick:t,className:`px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600`,children:`Close`})]})]})}):null}var Gx={position:`absolute`,fontSize:`16px`,pointerEvents:`none`,zIndex:100,transform:`translateY(20px) scale(0.5)`,opacity:0},Kx=({isActive:e})=>e?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`animate-sparkle-rise`,style:{...Gx,left:`-12px`,animationDelay:`0s`},children:`✨`}),(0,F.jsx)(`div`,{className:`animate-sparkle-rise`,style:{...Gx,right:`-12px`,animationDelay:`0.3s`},children:`✨`})]}):null;function qx(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(!0),i=(0,P.useCallback)(async()=>{r(!0);try{let e=await fetch(`/api/workspaces`);e.ok&&t(await e.json())}catch{}finally{r(!1)}},[]);return(0,P.useEffect)(()=>{i()},[i]),{data:e,loading:n,refetch:i,swap:(0,P.useCallback)(async e=>{try{let t=await fetch(`/api/workspace`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(t.ok){let e=await t.json();return e.active?{ok:!0,active:e.active}:{ok:!1,error:`Malformed swap response`}}try{return{ok:!1,error:(await t.json()).error??`HTTP ${t.status}`}}catch{return{ok:!1,error:`HTTP ${t.status}`}}}catch(e){return{ok:!1,error:e instanceof Error?e.message:`Failed to switch workspace`}}},[])}}function Jx({onOpened:e,onClose:t}){let{data:n,loading:r,swap:i}=qx(),[a,o]=(0,P.useState)(`folders`),[s,c]=(0,P.useState)(``),[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(null),[p,m]=(0,P.useState)(null),h=async(t,n)=>{f(n),m(null);let r=await i(t);if(f(null),!r.ok){m(r.error);return}let a=t.type===`repo`?t.path.replace(/\/+$/,``).split(`/`).pop()??r.active.label:r.active.label;e(t.type===`repo`?{id:r.active.repoId,kind:`repo`,label:a,path:t.path}:{id:r.active.repoId,kind:`pr`,label:a,url:t.url})},g=n?.activity??{},_=(e,t,n)=>(0,F.jsxs)(`button`,{onClick:()=>o(e),className:`flex items-center gap-1.5 px-4 py-2 text-sm transition-colors ${a===e?`border-b-2 border-github-accent font-medium text-github-text-primary`:`border-b-2 border-transparent text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,F.jsx)(n,{size:14}),t]}),v=e=>{let t=g[e.repoId]??0;return(0,F.jsxs)(`button`,{onClick:()=>void h({type:`repo`,path:e.path},e.repoId),disabled:d!==null,className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-github-bg-tertiary disabled:opacity-50`,children:[(0,F.jsx)(ct,{size:15,className:`text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-github-text-primary`,children:e.name}),t>0&&(0,F.jsxs)(`span`,{className:`flex items-center gap-1 text-xs font-medium text-github-accent`,children:[`● `,t]}),d===e.repoId&&(0,F.jsx)(`span`,{className:`text-xs text-github-text-muted`,children:`opening…`})]},e.repoId)};return(0,F.jsx)(`div`,{className:`flex h-screen items-center justify-center bg-github-bg-primary p-6 font-sans`,children:(0,F.jsxs)(`div`,{className:`relative w-full max-w-xl overflow-hidden rounded-xl border border-github-border bg-github-bg-secondary shadow-2xl`,children:[t&&(0,F.jsx)(`button`,{onClick:t,className:`absolute right-3 top-3 rounded p-1 text-github-text-muted hover:bg-github-bg-tertiary hover:text-github-text-primary`,"aria-label":`Close`,children:(0,F.jsx)(Rt,{size:16})}),(0,F.jsxs)(`div`,{className:`px-5 pb-2 pt-5`,children:[(0,F.jsx)(`h1`,{className:`text-lg font-semibold text-github-text-primary`,children:`Open a diff`}),(0,F.jsx)(`p`,{className:`mt-0.5 text-sm text-github-text-muted`,children:`Pick a folder or paste a GitHub PR URL to review.`})]}),(0,F.jsxs)(`div`,{className:`flex border-b border-github-border px-3`,children:[_(`folders`,`Folders`,ct),_(`pr`,`PR`,pt)]}),(0,F.jsxs)(`div`,{className:`max-h-[60vh] overflow-y-auto p-3`,children:[p&&(0,F.jsx)(`p`,{className:`mb-3 rounded-md border border-github-danger/50 bg-github-danger/10 px-3 py-2 text-sm text-github-danger`,children:p}),a===`folders`?(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),s.trim()&&h({type:`repo`,path:s.trim()},`paste`)},className:`flex gap-2`,children:[(0,F.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`Paste an absolute folder path…`,spellCheck:!1,className:`flex-1 rounded-md border border-github-border bg-github-bg-primary px-3 py-1.5 font-mono text-xs text-github-text-primary placeholder-github-text-muted focus:border-github-accent focus:outline-none`}),(0,F.jsx)(`button`,{type:`submit`,disabled:!s.trim()||d!==null,className:`rounded-md bg-github-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-github-accent/90 disabled:opacity-50`,children:`Open`})]}),r&&(0,F.jsx)(`p`,{className:`px-1 text-sm text-github-text-muted`,children:`Scanning…`}),n&&n.recents.length>0&&(0,F.jsxs)(`section`,{children:[(0,F.jsxs)(`h2`,{className:`mb-1 flex items-center gap-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-github-text-muted`,children:[(0,F.jsx)(mt,{size:11}),` Recent`]}),n.recents.map(v)]}),n?.roots.map(e=>(0,F.jsxs)(`section`,{children:[(0,F.jsx)(`h2`,{className:`mb-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-github-text-muted`,children:e.root}),e.repos.length>0?e.repos.map(v):(0,F.jsx)(`p`,{className:`px-3 py-1 text-xs text-github-text-muted`,children:`No git repos found.`})]},e.root)),n&&n.roots.length===0&&n.recents.length===0&&(0,F.jsxs)(`p`,{className:`px-1 py-2 text-sm text-github-text-muted`,children:[`No roots configured. Paste a folder path above, or start the hub with`,` `,(0,F.jsx)(`code`,{className:`text-github-text-secondary`,children:`diff-easy hub --root ~/projects`}),`.`]})]}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),l.trim()&&h({type:`pr`,url:l.trim()},`pr`)},className:`flex gap-2`,children:[(0,F.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`https://github.com/owner/repo/pull/123`,spellCheck:!1,className:`flex-1 rounded-md border border-github-border bg-github-bg-primary px-3 py-1.5 font-mono text-xs text-github-text-primary placeholder-github-text-muted focus:border-github-accent focus:outline-none`}),(0,F.jsx)(`button`,{type:`submit`,disabled:!l.trim()||d!==null,className:`rounded-md bg-github-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-github-accent/90 disabled:opacity-50`,children:d===`pr`?`Opening…`:`Open`})]}),n&&n.recentPrs.length>0&&(0,F.jsxs)(`section`,{children:[(0,F.jsxs)(`h2`,{className:`mb-1 flex items-center gap-1 px-1 text-[10px] font-semibold uppercase tracking-wide text-github-text-muted`,children:[(0,F.jsx)(mt,{size:11}),` Recent PRs`]}),n.recentPrs.map(e=>(0,F.jsxs)(`button`,{onClick:()=>void h({type:`pr`,url:e.url},e.url),disabled:d!==null,className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-github-bg-tertiary disabled:opacity-50`,children:[(0,F.jsx)(pt,{size:15,className:`text-github-text-secondary`}),(0,F.jsx)(`span`,{className:`flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-github-text-primary`,children:e.label})]},e.url))]})]})]})]})})}var Yx={fontSize:14,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif`,theme:`dark`,syntaxTheme:`vsDark`,editor:{id:b_.id,command:b_.command,argsTemplate:b_.argsTemplate},colorVision:`normal`,autoViewedPatterns:[],autoReload:!1},Xx=e=>{if(typeof e==`string`){let t=x_(e);return{id:t.id,command:t.command,argsTemplate:t.argsTemplate}}if(e&&typeof e==`object`){let t=e,n=x_(typeof t.id==`string`?t.id:void 0);return{id:n.id,command:typeof t.command==`string`?t.command:n.command,argsTemplate:typeof t.argsTemplate==`string`?t.argsTemplate:n.argsTemplate}}return Yx.editor};function Zx(){let[e,t]=(0,P.useState)(()=>{try{let e=localStorage.getItem(f);if(e){let t=JSON.parse(e);return{...Yx,...t,editor:Xx(t.editor),autoViewedPatterns:O_(t.autoViewedPatterns)}}}catch(e){console.warn(`Failed to load appearance settings from localStorage:`,e)}return Yx}),n=(0,P.useCallback)((e,t=`normal`)=>{C(e,t)},[]),r=(0,P.useCallback)(e=>{try{localStorage.setItem(f,JSON.stringify(e))}catch(e){console.warn(`Failed to save appearance settings to localStorage:`,e)}},[]),i=(0,P.useCallback)((e,t)=>{if(I_(e.syntaxTheme,t))return e;let n=L_(t);return n?{...e,syntaxTheme:n.id}:e},[]);(0,P.useEffect)(()=>{let a=document.documentElement;a.style.setProperty(`--app-font-size`,`${e.fontSize}px`),a.style.setProperty(`--app-font-family`,e.fontFamily);let o=e.colorVision??`normal`,s=a=>{n(a,o);let s=i(e,a);s!==e&&(t(s),r(s))};if(e.theme===`auto`){let e=window.matchMedia(`(prefers-color-scheme: dark)`);s(b(`auto`,e.matches?`dark`:`light`));let t=e=>{s(b(`auto`,e.matches?`dark`:`light`))};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)}else{s(e.theme);return}},[e,n,i,r]);let a=(0,P.useCallback)(e=>{t(e),r(e)},[r]);return(0,P.useMemo)(()=>({settings:e,updateSettings:a}),[e,a])}function Qx(e){return typeof e==`number`?`L${e}`:`L${e[0]}-L${e[1]}`}function $x(e,t){if(Dn(e)){let n=On(e);if(n.length>0){let r=``,i=0;for(let a of n){let n=e.slice(i,a.startIndex).trim();n&&(r+=`${r?`
|
|
70
|
+
`:``}${n}`),t&&(r+=`${r?`
|
|
71
|
+
`:``}ORIGINAL:\n\`\`\`\n${t}\n\`\`\``),r+=`${r?`
|
|
72
|
+
`:``}SUGGESTED:\n\`\`\`\n${a.suggestedCode}\n\`\`\``,i=a.endIndex}let a=e.slice(i).trim();return a&&(r+=`${r?`
|
|
73
|
+
`:``}${a}`),r}}return e}function eS(e){let t=[`${e.file||`<unknown file>`}:${Qx(e.line)}`];return e.messages.forEach((n,r)=>{if(r===0){t.push($x(n.body,e.codeContent));return}let i=r,a=n.author?.trim()||`Unknown`;t.push(`Reply ${i} (${a})`),t.push($x(n.body,e.codeContent))}),t.filter(Boolean).join(`
|
|
74
|
+
`)}function tS(e){return e.length===0?``:e.map(e=>eS(e)).join(`
|
|
75
|
+
=====
|
|
76
|
+
`)}var nS=`difit-storage-v1`,rS=`difit-viewed-index-v1`,iS=`difit-autoview-optout-v1`,aS=`__default__`,oS=5e3;function sS(e,t){return`${e} ${t}`}function cS(e){return{id:e.id,filePath:e.filePath,createdAt:e.createdAt,updatedAt:e.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot,messages:[{id:e.id,body:e.body,author:e.author,createdAt:e.createdAt,updatedAt:e.updatedAt}]}}function lS(e){let t=e.messages[0];return t?{id:e.id,filePath:e.filePath,body:t.body,author:t.author,createdAt:t.createdAt,updatedAt:t.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}var uS=new class{generateStorageKey(e,t,n){let r=e=>e.replace(/[^a-zA-Z0-9-_]/g,e=>`_${e.charCodeAt(0).toString(16)}_`),i=`${r(e)}-${r(t)}`;return pn(n)===`merge-base`?`${i}-merge-base`:i}getFullStorageKey(e,t){return e?`${nS}/${e}/${t}`:`${nS}/${t}`}normalizeCommitish(e,t,n){if(e===`.`||e===`working`)return`WORKING`;if(e===`staged`)return`STAGED`;if((e===`HEAD`||e===`@`)&&t)return t;if(n?.has(e)){let t=n.get(e);if(t)return t}return(e.startsWith(`@`)||e.includes(`^`)||e.includes(`~`)||e.includes(`HEAD`))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${e}' - may cause key collision. currentCommitHash=${t}`),e}getStorageKey(e,t,n,r,i,a){let o=this.normalizeStorageBase(e,t,n,r),s=this.normalizeStorageTarget(e,t,n,r),c=this.generateStorageKey(o,s,a);return this.getFullStorageKey(i,c)}getDiffContextData(e,t,n,r,i,a){try{let o=this.getStorageKey(e,t,n,r,i,a),s=localStorage.getItem(o);if(!s)return null;let c=JSON.parse(s);return c.version===2&&`threads`in c?c:c.version===1&&`comments`in c?{version:2,baseCommitish:c.baseCommitish,targetCommitish:c.targetCommitish,createdAt:c.createdAt,lastModifiedAt:c.lastModifiedAt,threads:c.comments.map(cS),viewedFiles:c.viewedFiles,appliedCommentImportIds:[]}:(console.warn(`Unknown storage version: ${String(c.version)}`),null)}catch(e){return console.error(`Error reading diff context data:`,e),null}}normalizeStorageBase(e,t,n,r){return t===`.`||t===`working`||t===`staged`?n||e:this.normalizeCommitish(e,n,r)}normalizeStorageTarget(e,t,n,r){return t===`.`||t===`working`?`WORKING`:t===`staged`?`STAGED`:this.normalizeCommitish(t,n,r)}saveDiffContextData(e,t,n,r,i,a,o){try{let s=this.getStorageKey(e,t,r,i,a,o),c={...n,version:2,baseCommitish:e,targetCommitish:t,baseMode:o,lastModifiedAt:new Date().toISOString(),appliedCommentImportIds:n.appliedCommentImportIds||[]};localStorage.setItem(s,JSON.stringify(c))}catch(e){e instanceof DOMException&&e.name===`QuotaExceededError`?console.error(`localStorage quota exceeded`):console.error(`Error saving diff context data:`,e)}}getCommentThreads(e,t,n,r,i,a){return this.getDiffContextData(e,t,n,r,i,a)?.threads||[]}getComments(e,t,n,r,i,a){return this.getCommentThreads(e,t,n,r,i,a).map(e=>lS(e)).filter(e=>e!==null)}saveCommentThreads(e,t,n,r,i,a,o){let s=this.getDiffContextData(e,t,r,i,a,o)||{version:2,baseCommitish:e,targetCommitish:t,baseMode:o,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};s.threads=n,this.saveDiffContextData(e,t,s,r,i,a,o)}saveComments(e,t,n,r,i,a,o){this.saveCommentThreads(e,t,n.map(cS),r,i,a,o)}getViewedFiles(e,t,n,r,i,a){return this.getDiffContextData(e,t,n,r,i,a)?.viewedFiles||[]}saveViewedFiles(e,t,n,r,i,a,o){let s=this.getDiffContextData(e,t,r,i,a,o)||{version:2,baseCommitish:e,targetCommitish:t,baseMode:o,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),threads:[],viewedFiles:[],appliedCommentImportIds:[]};s.viewedFiles=n,this.saveDiffContextData(e,t,s,r,i,a,o)}getViewedHashIndexKey(e){return`${rS}/${e??aS}`}getViewedHashIndex(e){let t={version:1,lastModifiedAt:new Date(0).toISOString(),entries:[]};try{let n=localStorage.getItem(this.getViewedHashIndexKey(e));if(!n)return t;let r=JSON.parse(n);return r.version!==1||!Array.isArray(r.entries)?t:r}catch(e){return console.error(`Error reading viewed hash index:`,e),t}}writeViewedHashIndex(e,t){try{localStorage.setItem(this.getViewedHashIndexKey(e),JSON.stringify({...t,lastModifiedAt:new Date().toISOString()}))}catch(e){e instanceof DOMException&&e.name===`QuotaExceededError`?console.error(`localStorage quota exceeded while writing viewed hash index`):console.error(`Error saving viewed hash index:`,e)}}recordViewedHashes(e,t){if(t.length===0)return;let n=this.getViewedHashIndex(e),r=new Map(n.entries.map(e=>[sS(e.filePath,e.diffContentHash),e]));for(let e of t)r.set(sS(e.filePath,e.diffContentHash),e);let i=Array.from(r.values());i.length>oS&&(i.sort((e,t)=>e.viewedAt<t.viewedAt?1:-1),i=i.slice(0,oS)),this.writeViewedHashIndex(e,{version:1,lastModifiedAt:n.lastModifiedAt,entries:i})}removeViewedHashes(e,t){if(t.length===0)return;let n=this.getViewedHashIndex(e),r=new Set(t.map(e=>sS(e.filePath,e.diffContentHash))),i=n.entries.filter(e=>!r.has(sS(e.filePath,e.diffContentHash)));i.length!==n.entries.length&&this.writeViewedHashIndex(e,{version:1,lastModifiedAt:n.lastModifiedAt,entries:i})}clearViewedHashIndex(e){try{localStorage.removeItem(this.getViewedHashIndexKey(e))}catch(e){console.error(`Error clearing viewed hash index:`,e)}}getAutoViewOptOutKey(e){return`${iS}/${e??aS}`}getAutoViewOptOut(e){try{let t=localStorage.getItem(this.getAutoViewOptOutKey(e));if(!t)return[];let n=JSON.parse(t);return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]}catch{return[]}}writeAutoViewOptOut(e,t){try{localStorage.setItem(this.getAutoViewOptOutKey(e),JSON.stringify(t))}catch(e){console.error(`Error saving auto-view opt-out:`,e)}}addAutoViewOptOut(e,t){let n=new Set(this.getAutoViewOptOut(e));n.has(t)||(n.add(t),this.writeAutoViewOptOut(e,[...n]))}removeAutoViewOptOut(e,t){let n=new Set(this.getAutoViewOptOut(e));n.delete(t)&&this.writeAutoViewOptOut(e,[...n])}clearAutoViewOptOut(e){try{localStorage.removeItem(this.getAutoViewOptOutKey(e))}catch(e){console.error(`Error clearing auto-view opt-out:`,e)}}cleanupOldData(e){let t=new Date;t.setDate(t.getDate()-e);let n=t.getTime(),r=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);if(!t)continue;let i=t.startsWith(nS),a=t.startsWith(rS);if(!(!i&&!a))try{let e=localStorage.getItem(t);if(!e)continue;let i=JSON.parse(e).lastModifiedAt;if(!i)continue;let a=new Date(i).getTime();Number.isFinite(a)&&a<n&&r.push(t)}catch{}}r.forEach(e=>localStorage.removeItem(e))}getStorageSize(){let e=0;for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(!n||!n.startsWith(nS)&&!n.startsWith(rS))continue;let r=localStorage.getItem(n);r&&(e+=(n.length+r.length)*2)}return e}};async function dS(e){try{let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch{return console.warn(`Crypto API not available, using fallback hash`),fS(e)}}function fS(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t).toString(16)}function pS(e){let t=e.chunks.map(e=>{let t=e.lines.filter(e=>e.type!==`hunk`&&e.type!==`header`).map(e=>`${e.type}:${e.content}`).join(`
|
|
77
|
+
`);return`${e.header}\n${t}`}).join(`
|
|
78
|
+
|
|
79
|
+
`);return`${e.path}\n${e.status}\n${t}`}function mS(e){return{id:e.id,file:e.filePath,line:typeof e.position.line==`number`?e.position.line:[e.position.line.start,e.position.line.end],side:e.position.side,createdAt:e.createdAt,updatedAt:e.updatedAt,codeContent:e.codeSnapshot?.content,messages:e.messages}}function hS(e){let t=e.messages[0];return t?{id:e.id,filePath:e.filePath,body:t.body,author:t.author,createdAt:t.createdAt,updatedAt:t.updatedAt,position:e.position,codeSnapshot:e.codeSnapshot}:null}function gS(e,t,n,r,i,a){let[o,s]=(0,P.useState)([]),[c,l]=(0,P.useState)(!1),u=(0,P.useCallback)(()=>!e||!t?null:uS.getDiffContextData(e,t,n,r,i,a),[e,t,n,r,i,a]),d=(0,P.useCallback)(()=>{if(!e||!t)return null;let n=new Date().toISOString();return{version:2,baseCommitish:e,targetCommitish:t,baseMode:a,createdAt:n,lastModifiedAt:n,threads:[],viewedFiles:[],appliedCommentImportIds:[]}},[e,t,a]);(0,P.useEffect)(()=>{if(!e||!t){s([]),l(!1);return}s(u()?.threads||uS.getCommentThreads(e,t,n,r,i,a)),l(!0)},[e,t,n,r,i,a,u]);let f=(0,P.useCallback)(o=>{!e||!t||(uS.saveCommentThreads(e,t,o,n,r,i,a),s(o),l(!0))},[e,t,n,r,i,a]),p=(0,P.useCallback)(e=>{f(e)},[f]),m=(0,P.useCallback)(e=>{let t=new Date().toISOString(),n=Ut(),r={id:n,filePath:e.filePath,createdAt:t,updatedAt:t,position:{side:e.side,line:e.line},codeSnapshot:e.codeSnapshot||{content:``,language:ei(e.filePath)},messages:[{id:n,body:e.body,author:`User`,createdAt:t,updatedAt:t}]};return f([...o,r]),r},[f,o]),h=(0,P.useCallback)(e=>{let t=hS(m(e));if(!t)throw Error(`Failed to create root comment`);return t},[m]),g=(0,P.useCallback)(({threadId:e,body:t})=>{let n=new Date().toISOString();f(o.map(r=>r.id===e?{...r,updatedAt:n,messages:[...r.messages,{id:Ut(),body:t,author:`User`,createdAt:n,updatedAt:n}]}:r))},[f,o]),_=(0,P.useCallback)(e=>{f(o.filter(t=>t.id!==e))},[f,o]),v=(0,P.useCallback)(e=>{_(e)},[_]),y=(0,P.useCallback)((e,t)=>{let n=o.find(t=>t.id===e);if(!n)return;let r=n.messages.findIndex(e=>e.id===t);if(r<0)return;if(r===0){_(e);return}let i=new Date().toISOString();f(o.map(n=>n.id===e?{...n,updatedAt:i,messages:n.messages.filter(e=>e.id!==t)}:n))},[_,f,o]),b=(0,P.useCallback)((e,t,n)=>{let r=new Date().toISOString();f(o.map(i=>i.id===e?{...i,updatedAt:r,messages:i.messages.map(e=>e.id===t?{...e,body:n,updatedAt:r}:e)}:i))},[f,o]),x=(0,P.useCallback)((e,t)=>{b(e,e,t)},[b]),S=(0,P.useCallback)(()=>{f([])},[f]),C=(0,P.useCallback)(o=>{if(!o?.resetAppliedCommentImportIds){S();return}let c=u()||d();if(!c||!e||!t)return;let l={...c,threads:[],appliedCommentImportIds:[]};uS.saveDiffContextData(e,t,l,n,r,i,a),s([])},[e,t,r,S,d,n,u,i,a]),w=(0,P.useCallback)((o,c)=>{if(!e||!t||o.length===0||c.length===0)return[];let l=u()||d();if(!l)return[];if(l.appliedCommentImportIds.includes(c))return s(l.threads),[];let f=fn(l.threads,o),p={...l,threads:f.threads,appliedCommentImportIds:[...l.appliedCommentImportIds,c]};return uS.saveDiffContextData(e,t,p,n,r,i,a),s(f.threads),f.warnings},[e,t,r,d,n,u,i,a]),T=(0,P.useCallback)(e=>{let t=o.find(t=>t.id===e);return t?eS(mS(t)):``},[o]),E=(0,P.useCallback)(e=>T(e),[T]),D=(0,P.useCallback)(()=>tS(o.map(mS)),[o]);return{hasLoadedComments:c,comments:o.map(e=>hS(e)).filter(e=>e!==null),threads:o,replaceThreads:p,addComment:h,addThread:m,removeComment:v,replyToThread:g,removeThread:_,updateComment:x,removeMessage:y,updateMessage:b,clearAllComments:C,applyCommentImports:w,generatePrompt:E,generateThreadPrompt:T,generateAllCommentsPrompt:D}}var _S=20;async function vS(e,t){let n=await fetch(`/api/blob/${encodeURIComponent(e)}?ref=${encodeURIComponent(t)}`);if(!n.ok)throw Error(`Failed to fetch file content: ${n.statusText}`);let r=(await n.text()).split(`
|
|
80
|
+
`);return r.length>0&&r[r.length-1]===``&&r.pop(),{lines:r,totalLines:r.length}}async function yS(e,t,n,r){let i=encodeURIComponent(e),a=new URLSearchParams;t&&a.set(`oldRef`,t),n&&a.set(`newRef`,n),r&&r!==e&&a.set(`oldPath`,r);let o=await fetch(`/api/line-count/${i}?${a}`);if(!o.ok)throw Error(`Failed to fetch line count: ${o.statusText}`);return o.json()}function bS({baseCommitish:e,targetCommitish:t,diffIdentity:n}){let[r,i]=(0,P.useState)({}),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(0),d=(0,P.useRef)(new Map),f=(0,P.useRef)({});f.current=r;let p=(0,P.useRef)(0);(0,P.useEffect)(()=>{p.current+=1,d.current.clear(),f.current={},i({}),o(!1),c(null),u(0)},[e,t,n]);let m=(0,P.useCallback)(async n=>{let r=p.current,i=`${r}:${n.path}`,a=d.current.get(i);if(a)return a;let o=(async()=>{let i=f.current[n.path];if(i?.oldContent&&i?.newContent)return i;let a={...i,expandedRanges:i?.expandedRanges||[]};if(n.status!==`added`&&e){let t=n.oldPath||n.path;try{let{lines:n,totalLines:i}=await vS(t,e);if(p.current!==r)return null;a.oldContent=n,a.oldTotalLines=i}catch(e){console.error(`Failed to fetch old file content:`,e),a.oldContent=[],a.oldTotalLines=0}}if(n.status!==`deleted`&&t)try{let{lines:e,totalLines:i}=await vS(n.path,t);if(p.current!==r)return null;a.newContent=e,a.newTotalLines=i}catch(e){console.error(`Failed to fetch new file content:`,e),a.newContent=[],a.newTotalLines=0}return a})();d.current.set(i,o);try{return await o}finally{d.current.delete(i)}},[e,t]),h=(0,P.useCallback)(e=>{c(e),u(e=>e+1)},[]),g=(0,P.useCallback)(async(e,t,n,r=_S)=>{let a=p.current;o(!0);try{let o=await m(e);if(!o||p.current!==a)return;i(i=>{let a=i[e.path],s=a?.expandedRanges||o.expandedRanges||[],c=s.findIndex(e=>e.chunkIndex===t&&e.direction===n),l=[...s];if(c>=0&&l[c]){let e=l[c];l[c]={chunkIndex:e.chunkIndex,direction:e.direction,count:e.count+r}}else l.push({chunkIndex:t,direction:n,count:r});return{...i,[e.path]:{oldContent:a?.oldContent??o.oldContent,newContent:a?.newContent??o.newContent,oldTotalLines:a?.oldTotalLines??o.oldTotalLines,newTotalLines:a?.newTotalLines??o.newTotalLines,expandedRanges:l}}}),h(e.path)}finally{o(!1)}},[m,h]),_=(0,P.useCallback)(async(e,t,n)=>{let r=p.current;o(!0);try{let a=await m(e);if(!a||p.current!==r)return;i(r=>{let i=r[e.path],o=[...i?.expandedRanges||a.expandedRanges||[]],s=o.findIndex(e=>e.chunkIndex===t&&e.direction===`up`),c=o.findIndex(e=>e.chunkIndex===t-1&&e.direction===`down`),l=0,u=0;s>=0&&o[s]&&(l=o[s].count),c>=0&&o[c]&&(u=o[c].count);let d=l+u+n,f=o.filter(e=>!(e.chunkIndex===t-1&&e.direction===`down`)),p=f.findIndex(e=>e.chunkIndex===t&&e.direction===`up`);return p>=0&&f[p]?f[p]={chunkIndex:t,direction:`up`,count:d}:f.push({chunkIndex:t,direction:`up`,count:d}),{...r,[e.path]:{oldContent:i?.oldContent??a.oldContent,newContent:i?.newContent??a.newContent,oldTotalLines:i?.oldTotalLines??a.oldTotalLines,newTotalLines:i?.newTotalLines??a.newTotalLines,expandedRanges:f}}}),h(e.path)}finally{o(!1)}},[m,h]),v=(0,P.useCallback)(async n=>{let r=p.current,a=f.current[n.path];if(a?.oldTotalLines!==void 0||a?.newTotalLines!==void 0)return;let o=n.status===`added`?void 0:e,s=n.status===`deleted`?void 0:t;if(!(!o&&!s))try{let{oldLineCount:e,newLineCount:t}=await yS(n.path,o,s,n.oldPath);if(p.current!==r)return;i(r=>{let i=r[n.path];return i?.oldTotalLines!==void 0||i?.newTotalLines!==void 0?r:{...r,[n.path]:{...i,expandedRanges:i?.expandedRanges||[],oldTotalLines:e,newTotalLines:t}}}),h(n.path)}catch(e){console.error(`Failed to prefetch line count:`,e)}},[e,t,h]),y=(0,P.useCallback)((e,t,n)=>{let i=r[e];return i&&i.expandedRanges.find(e=>e.chunkIndex===t&&e.direction===n)?.count||0},[r]),b=(0,P.useCallback)((e,t,n)=>{if(e.status===`added`||e.status===`deleted`)return 0;let r=e.chunks[n-1],i;if(!r)i=t.oldStart-1;else{let e=r.oldStart+r.oldLines;i=t.oldStart-e}let a=y(e.path,n,`up`),o=n>0?y(e.path,n-1,`down`):0;return Math.max(0,i-a-o)},[y]),x=(0,P.useCallback)((e,t,n)=>{if(e.status===`added`||e.status===`deleted`)return 0;let i=r[e.path],a=i?.oldTotalLines||i?.newTotalLines;if(a===void 0)return e.chunks[n+1]?0:-1;if(e.chunks[n+1])return 0;let o=a-(t.oldStart+t.oldLines-1),s=y(e.path,n,`down`);return Math.max(0,o-s)},[r,y]),S=(0,P.useCallback)((e,t,n)=>{let i=r[e.path];if(!i)return t;let a=y(e.path,n,`up`),o=y(e.path,n,`down`);if(a===0&&o===0)return t;let s=i.oldContent||[],c=i.newContent||[],l=[];if(a>0){let r=e.chunks[n-1],i;i=r?r.oldStart+r.oldLines-1:Math.max(0,t.oldStart-1-a);let o=t.oldStart-1,u=t.newStart-1,d=Math.min(a,o-i),f=o-d,p=u-d;for(let e=0;e<d;e++){let t=f+e+1,n=p+e+1,r=s[t-1]??c[n-1]??``;l.push({type:`normal`,content:r,oldLineNumber:t,newLineNumber:n,isExpanded:!0})}}if(l.push(...t.lines),o>0){let r=t.oldStart+t.oldLines-1,a=t.newStart+t.newLines-1,u=e.chunks[n+1],d=u?u.oldStart-1:i.oldTotalLines||r,f=Math.min(o,d-r);for(let e=0;e<f;e++){let t=r+e+1,n=a+e+1,i=s[t-1]??c[n-1]??``;l.push({type:`normal`,content:i,oldLineNumber:t,newLineNumber:n,isExpanded:!0})}}let u=l[0],d=l[l.length-1];return{...t,lines:l,oldStart:u?.oldLineNumber??t.oldStart,newStart:u?.newLineNumber??t.newStart,oldLines:(d?.oldLineNumber??t.oldStart+t.oldLines-1)-(u?.oldLineNumber??t.oldStart)+1,newLines:(d?.newLineNumber??t.newStart+t.newLines-1)-(u?.newLineNumber??t.newStart)+1}},[r,y]);return{expandedState:r,isLoading:a,lastUpdatedFilePath:s,lastUpdatedAt:l,expandLines:g,expandAllBetweenChunks:_,prefetchFileContent:v,getMergedChunks:(0,P.useCallback)(e=>{let t=[];for(let n=0;n<e.chunks.length;n++){let r=e.chunks[n];if(!r)continue;let i=S(e,r,n),a=b(e,r,n),o=x(e,r,n),s=t[t.length-1];if(s&&a===0){s.lines=[...s.lines,...i.lines],s.originalIndices.push(n),s.hiddenLinesAfter=o;let e=s.lines[s.lines.length-1];s.oldLines=(e?.oldLineNumber??s.oldStart+s.oldLines-1)-s.oldStart+1,s.newLines=(e?.newLineNumber??s.newStart+s.newLines-1)-s.newStart+1}else t.push({...i,originalIndices:[n],hiddenLinesBefore:a,hiddenLinesAfter:o})}return t},[S,b,x]),getHiddenLinesBefore:b,getHiddenLinesAfter:x}}var xS=function(e){return e.DEFAULT=`default`,e.WORKING=`working`,e.STAGED=`staged`,e.DOT=`dot`,e.SPECIFIC=`specific`,e}({});function SS(e){return e}function CS(e,t,n,r){let i=(0,P.useRef)(null),a=(0,P.useRef)(null),o=(0,P.useRef)(0),s=1e3,c=3e4,l=(0,P.useRef)(t);l.current=t;let u=(0,P.useRef)(n);u.current=n;let d=(0,P.useRef)(r);d.current=r;let[f,p]=(0,P.useState)({isWatchEnabled:!1,diffMode:xS.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:`disconnected`}),[m,h]=(0,P.useState)(null),g=(0,P.useCallback)(()=>{if(!i.current)try{let e=new EventSource(SS(`/api/watch`));i.current=e,e.onopen=()=>{console.log(`Connected to file watch service`),p(e=>({...e,connectionStatus:`connected`})),o.current=0,h(null)},e.onmessage=e=>{try{let t=JSON.parse(e.data);switch(t.type){case`connected`:p(e=>({...e,isWatchEnabled:!0,diffMode:t.diffMode,connectionStatus:`connected`}));break;case`reload`:console.log(`File changes detected, showing reload button:`,t.changeType),p(e=>({...e,shouldReload:!0,lastChangeTime:new Date,lastChangeType:t.changeType}));break;case`error`:console.error(`File watch error:`,t.message),h(t.message||`File watch error occurred`);break;case`commentsChanged`:l.current&&l.current();break;case`turn-complete`:u.current?.();break;case`workspace-changed`:p(e=>({...e,shouldReload:!1,lastChangeTime:null,lastChangeType:null})),d.current?.();break}}catch(e){console.error(`Error parsing watch event:`,e)}},e.onerror=()=>{console.log(`File watch connection lost`),p(e=>({...e,connectionStatus:`disconnected`})),i.current&&=(i.current.close(),null),p(e=>({...e,connectionStatus:`reconnecting`}));let e=Math.min(s*2**o.current,c);o.current+=1,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (attempt ${o.current})...`),g()},e)}}catch(e){console.error(`Failed to connect to file watch service:`,e),h(`Failed to connect to file watch service`)}},[s,c]),_=(0,P.useCallback)(async()=>{if(!f.isReloading){p(e=>({...e,isReloading:!0}));try{e&&await e(),p(e=>({...e,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(e){console.error(`Reload failed:`,e),h(`Failed to reload diff data`),p(e=>({...e,isReloading:!1}))}}},[e,f.isReloading]),v=(0,P.useCallback)(()=>{p(e=>({...e,shouldReload:!1,lastChangeTime:null,lastChangeType:null}))},[]),y=()=>{i.current&&=(i.current.close(),null),a.current&&=(clearTimeout(a.current),null)};return(0,P.useEffect)(()=>(g(),y),[g]),(0,P.useEffect)(()=>{let e=()=>{i.current||document.visibilityState!==`hidden`&&(a.current&&=(clearTimeout(a.current),null),o.current=0,g())};return window.addEventListener(`online`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`online`,e),document.removeEventListener(`visibilitychange`,e)}},[g]),(0,P.useEffect)(()=>y,[]),{shouldReload:f.shouldReload,isConnected:f.connectionStatus===`connected`,error:m,reload:_,resetReload:v,watchState:f}}var wS=e=>e.reduce((e,t)=>e+t.additions+t.deletions,0);function TS(e){let t=[],n=[];for(let r of e)r.isGenerated?t.push(r.path):n.push(r);return{noise:t,kept:n}}function ES(e){if(e.length===0)return``;let t=e.map(e=>e.split(`/`)),n=t[0]??[],r=0;for(;r<n.length-1;r++){let e=n[r];if(!t.every(t=>t.length-1>r&&t[r]===e))break}return r>0?n.slice(0,r).join(`/`)+`/`:``}function DS(e){let{noise:t,kept:n}=TS(e),r=ES(n.map(e=>e.path)),i=new Map;for(let e of n){let t=e.path.slice(r.length),n=t.indexOf(`/`),a=n===-1?`(root)`:t.slice(0,n),o=i.get(a)??[];o.push(e),i.set(a,o)}return{mode:`module`,groups:[...i.entries()].map(([e,t])=>({label:e,fs:t,weight:wS(t)})).sort((e,t)=>t.weight-e.weight||e.label.localeCompare(t.label)).map((e,t)=>({id:`g${t+1}`,label:e.label,files:e.fs.map(e=>e.path).sort((e,t)=>e.localeCompare(t))})),noise:t,generatedAt:Date.now()}}var OS=new Set([`index`,`main`,`mod`,`utils`,`types`,`helpers`,`constants`]),kS=[`Tests`,`Styles`,`Config`,`Docs`];function AS(e){return e.split(`/`).pop()??e}function jS(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function MS(e){let t=AS(e).toLowerCase(),n=t.indexOf(`.`);return n===-1?t:t.slice(0,n)}function NS(e){return e.length?e.charAt(0).toUpperCase()+e.slice(1):e}function PS(e){let t=AS(e).toLowerCase();return/\.(test|spec)\.[cm]?[jt]sx?$/.test(t)||/_test\.go$/.test(t)||/test\.(java|kt|scala)$/.test(t)||/(^|\/)(tests?|__tests__|spec)\//.test(e)?`test`:/\.(css|scss|sass|less|styl)$/.test(t)?`style`:/\.(json|ya?ml|toml|ini)$/.test(t)||/(^|\/)\.env/.test(e)||/^dockerfile$/.test(t)||/^makefile$/.test(t)||/\.config\.[cm]?[jt]s$/.test(t)||/(^|\/)\.(github|circleci)\//.test(e)?`config`:/\.(md|mdx|markdown|rst|txt)$/.test(t)||/^(readme|changelog|license)/.test(t)?`doc`:`source`}var FS={test:`Tests`,style:`Styles`,config:`Config`,doc:`Docs`},IS=e=>e.some(e=>PS(e.path)===`test`)&&e.some(e=>PS(e.path)===`source`);function LS(e){let{noise:t,kept:n}=TS(e),r=e=>{let t=MS(e.path);return t.length>=4&&!OS.has(t)?`stem:${t}`:`dir:${jS(e.path)}:${t}`},i=new Map;for(let e of n){let t=r(e),n=i.get(t)??[];n.push(e),i.set(t,n)}let a=new Set,o=[];for(let e of i.values()){if(e.length<2)continue;let t=e[0];if(t){o.push({label:NS(MS(t.path)),files:e});for(let t of e)a.add(t.path)}}let s=new Map,c=[];for(let e of n){if(a.has(e.path))continue;let t=FS[PS(e.path)];if(t){let n=s.get(t)??[];n.push(e),s.set(t,n)}else c.push(e)}let l=new Map;for(let e of c){let t=jS(e.path)||`(root)`,n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[...l.entries()].map(([e,t])=>({label:e,files:t})),d=[...o,...u].sort((e,t)=>{let n=Number(IS(t.files))-Number(IS(e.files));if(n!==0)return n;let r=wS(t.files)-wS(e.files);return r===0?e.label.localeCompare(t.label):r}),f=kS.filter(e=>s.get(e)?.length).map(e=>({label:e,files:s.get(e)??[]}));return{mode:`smart`,groups:[...d,...f].map((e,t)=>({id:`g${t+1}`,label:e.label,files:e.files.map(e=>e.path).sort((e,t)=>e.localeCompare(t))})),noise:t,generatedAt:Date.now()}}var RS=e=>`difit.repoPrefs.${e}`;function zS(e){if(!e)return{};try{let t=localStorage.getItem(RS(e));if(!t)return{};let n=JSON.parse(t);return n&&typeof n==`object`?n:{}}catch{return{}}}function BS(e,t){if(e)try{let n={...zS(e),...t};localStorage.setItem(RS(e),JSON.stringify(n))}catch{}}var VS={status:`idle`,result:null};function HS({base:e,target:t,baseMode:n,intent:r,files:i,repositoryId:a}){let[o,s]=(0,P.useState)(`tree`),[c,l]=(0,P.useState)(VS),u=(0,P.useRef)(new Map),d=`${e} ${t} ${n??``}`,f=(0,P.useRef)(0),p=(0,P.useRef)(void 0);(0,P.useEffect)(()=>{if(f.current+=1,l(VS),p.current!==a){p.current=a,u.current.clear();let e=zS(a).organizeMode;s(e&&e!==`ai`?e:`tree`)}else s(`tree`)},[a,d]);let m=(0,P.useMemo)(()=>o===`smart`?LS(i):o===`module`?DS(i):null,[o,i]),h=(0,P.useCallback)(async a=>{let o=f.current;if(!a){let e=u.current.get(d);if(e){l({status:`ready`,result:e});return}}l({status:`loading`,result:null});try{let i=await fetch(`/api/grouping`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({base:e,target:t,baseMode:n,intent:r,mode:`ai`,force:a})});if(!i.ok)throw Error(`grouping ${i.status}`);let s=await i.json();if(o!==f.current)return;u.current.set(d,s),l({status:`ready`,result:s})}catch{if(o!==f.current)return;l({status:`ready`,result:{...LS(i),fallbackFrom:`ai`}})}},[e,t,n,r,d,i]);return{mode:o,select:(0,P.useCallback)(e=>{s(e),BS(a,{organizeMode:e}),e===`ai`&&h(!1)},[h,a]),reorganize:(0,P.useCallback)(()=>{o===`ai`&&h(!0)},[o,h]),state:o===`ai`?c:o===`tree`?VS:{status:`ready`,result:m}}}var US={SCROLL_CONTAINER:`main.overflow-y-auto`};function WS(e,t){let n=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return t===`split`?`${n}-${e.side}`:n}function GS(e,t,n){return`${e}:${t}:${n??`any`}`}function KS(e,t){let n=t[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return n&&(n.type===`add`||n.type===`delete`||n.type===`normal`)?n.type:null}function qS(e,t){let n=KS(e,t);return n?n===`normal`?!0:n===`delete`?e.side===`left`:n===`add`?e.side===`right`:!1:!1}function JS(e,t){return qS(e,t)?e:{...e,side:e.side===`left`?`right`:`left`}}var YS={VIEWPORT_OFFSET_RATIO:1/3};function XS(e,t,n){let r=[];return t.oldLineNumber!==void 0&&(r.push(GS(e,t.oldLineNumber,`old`)),r.push(GS(e,t.oldLineNumber))),t.newLineNumber!==void 0&&(r.push(GS(e,t.newLineNumber,`new`)),r.push(GS(e,t.newLineNumber))),r.some(e=>n.has(e))}function ZS(e,t,n,r){return{line:t=>{let i=e[t.fileIndex];return!i||r?.has(i.path)?!1:n===`unified`||qS(t,e)},chunk:t=>{let n=e[t.fileIndex];if(!n||r?.has(n.path))return!1;let i=n.chunks[t.chunkIndex]?.lines[t.lineIndex];if(!i||i.type===`normal`)return!1;if(t.lineIndex===0)return!0;let a=n.chunks[t.chunkIndex]?.lines[t.lineIndex-1];return!a||a.type===`normal`},comment:n=>{let i=e[n.fileIndex];if(!i||r?.has(i.path))return!1;let a=i.chunks[n.chunkIndex]?.lines[n.lineIndex];return a?XS(i.path,a,t):!1},file:e=>e.chunkIndex===0&&e.lineIndex===0}}function QS(){return e=>{let t=document.getElementById(e);if(!t)return;let n=document.querySelector(US.SCROLL_CONTAINER);if(!n)throw Error(`Scrollable container (${US.SCROLL_CONTAINER}) not found`);let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=n.clientHeight,o=n.scrollTop,s=Math.max(i.top,0),c=Math.min(i.bottom,window.innerHeight);if(!(r.top>=s&&r.bottom<=c)){let e=$S(t,n)-a*YS.VIEWPORT_OFFSET_RATIO;n.scrollTop=Math.max(0,e);return}let l=r.bottom>Math.min(i.bottom,window.innerHeight),u=t.offsetTop-n.offsetTop-a*YS.VIEWPORT_OFFSET_RATIO;l&&u>o&&(n.scrollTop=Math.max(0,u))}}function $S(e,t){let n=e,r=0;for(;n&&n!==t&&n.offsetParent;)r+=n.offsetTop,n=n.offsetParent;return n&&n!==t&&(r+=n.offsetTop),r}function eC(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:`right`}}function tC(e,t,n){return n&&e.fileIndex===t.fileIndex&&e.chunkIndex===t.chunkIndex&&e.lineIndex===t.lineIndex}function nC(e,t,n){let{fileIndex:r,chunkIndex:i,lineIndex:a}=e,o=n.length,s=0;if(t===`next`)for(a++;s<o;){if(n[r]?.chunks[i]?.lines[a])return{...e,fileIndex:r,chunkIndex:i,lineIndex:a};i++,a=0,n[r]?.chunks[i]||(r++,i=0,a=0,r>=o&&(r=0,s++))}else for(a--;s<o;){if(a<0)if(i--,i<0){r--,r<0&&(r=o-1,s++);let e=n[r];if(e&&e.chunks.length>0){i=e.chunks.length-1;let t=e.chunks[i];a=t&&t.lines.length>0?t.lines.length-1:-1}else i=-1,a=-1}else{let e=n[r]?.chunks[i];a=e&&e.lines.length>0?e.lines.length-1:-1}if(a>=0&&n[r]?.chunks[i]?.lines[a])return{...e,fileIndex:r,chunkIndex:i,lineIndex:a};a<0||a--}return null}function rC(e,t,n,r,i){let a=e,o=!1;for(;a;){let s=nC(a,t,r);if(!s||(a=s,tC(a,e,o)))break;if(o=!0,n(a,r)){let e=JS(a,r);return{position:e,scrollTarget:WS(e,i)}}}return{position:null,scrollTarget:null}}function iC({files:e,comments:t,viewMode:n=zt,reviewedFiles:r,onToggleReviewed:i,onCreateComment:a,onCopyAllComments:o,onDeleteAllComments:s,onShowCommentsList:c,onRefresh:l}){let[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(!1),m=(0,P.useMemo)(()=>QS(),[]),h=(0,P.useMemo)(()=>{let e=new Map;return t.forEach(t=>{let n=Array.isArray(t.line)?t.line[0]:t.line,r=GS(t.file,n,t.side);e.has(r)||e.set(r,[]),e.get(r)?.push(t)}),e},[t]),g=(0,P.useMemo)(()=>ZS(e,h,n,r),[e,h,n,r]),_=(0,P.useCallback)((t,r)=>e.length===0?{position:null,scrollTarget:null}:rC(eC(u),t,r,e,n),[u,e,n]),v=(0,P.useCallback)(e=>t=>{let n=_(t,e);n.position&&(d(n.position),n.scrollTarget&&m(n.scrollTarget))},[_,m]),y=(0,P.useMemo)(()=>v(g.line),[v,g.line]),b=(0,P.useMemo)(()=>v(g.chunk),[v,g.chunk]),x=(0,P.useMemo)(()=>v(g.file),[v,g.file]),S=(0,P.useMemo)(()=>v(g.comment),[v,g.comment]),C=(0,P.useCallback)(t=>{if(!u||n!==`split`)return;let r={...u,side:t},i=e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex];if(i){if(t===`left`&&i.type===`add`&&u.lineIndex>0){if(e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex-1]?.type===`delete`){r={...r,lineIndex:u.lineIndex-1},d(r),m(WS(r,n));return}}else if(t===`right`&&i.type===`delete`&&e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex+1]?.type===`add`){r={...r,lineIndex:u.lineIndex+1},d(r),m(WS(r,n));return}}if(!qS(r,e)){let t=e[u.fileIndex];if(!t)return;let n=t.chunks[u.chunkIndex];if(n){for(let t=u.lineIndex+1;t<n.lines.length;t++){let n={...r,lineIndex:t};if(qS(n,e)){r=n;break}}if(!qS(r,e))for(let t=u.lineIndex-1;t>=0;t--){let n={...r,lineIndex:t};if(qS(n,e)){r=n;break}}}if(!qS(r,e)){for(let n=u.chunkIndex+1;n<t.chunks.length;n++){let i=t.chunks[n];if(i){for(let t=0;t<i.lines.length;t++){let i={...r,chunkIndex:n,lineIndex:t};if(qS(i,e)){r=i;break}}if(qS(r,e))break}}if(!qS(r,e))for(let n=u.chunkIndex-1;n>=0;n--){let i=t.chunks[n];if(i){for(let t=i.lines.length-1;t>=0;t--){let i={...r,chunkIndex:n,lineIndex:t};if(qS(i,e)){r=i;break}}if(qS(r,e))break}}}}d(r),m(WS(r,n))},[u,n,m,e]),w=(0,P.useCallback)(()=>{let t=document.querySelector(US.SCROLL_CONTAINER);if(!t)return;let r=t.getBoundingClientRect(),i=r.top+r.height/2,a=1/0,o=null;e.forEach((t,s)=>{t.chunks.forEach((t,c)=>{t.lines.forEach((t,l)=>{let u=n===`split`?[`left`,`right`]:[`right`];for(let t of u){let u={fileIndex:s,chunkIndex:c,lineIndex:l,side:t};if(n===`split`&&!qS(u,e))continue;let d=WS(u,n),f=document.getElementById(d);if(f){let e=f.getBoundingClientRect(),t=e.top+e.height/2,n=Math.abs(t-i);e.top<r.bottom&&e.bottom>r.top&&n<a&&(a=n,o=u)}}})})}),o&&d(o)},[e,n,d]),T=(0,P.useCallback)(t=>{if(!t){d(null);return}let r=JS(t,e);d(r),m(WS(r,n))},[e,n,m]),E={scopes:`navigation`,enableOnFormTags:!1,preventDefault:!0};return Ae(`j, down`,()=>y(`next`),E,[y]),Ae(`k, up`,()=>y(`prev`),E,[y]),Ae(`n`,()=>b(`next`),E,[b]),Ae(`p`,()=>b(`prev`),E,[b]),Ae(`shift+n`,()=>S(`next`),E,[S]),Ae(`shift+p`,()=>S(`prev`),E,[S]),Ae(`]`,()=>x(`next`),{...E,useKey:!0},[x]),Ae(`[`,()=>x(`prev`),{...E,useKey:!0},[x]),Ae(`{`,()=>{e.length>0&&(d({fileIndex:0,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`}),m(WS({fileIndex:0,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`},n)))},{...E,useKey:!0},[e,n,m]),Ae(`}`,()=>{if(e.length>0){let t=e.length-1,r=e[t];r&&r.chunks.length>0&&(d({fileIndex:t,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`}),m(WS({fileIndex:t,chunkIndex:0,lineIndex:0,side:n===`split`?`left`:`right`},n)))}},{...E,useKey:!0},[e,n,m]),Ae(`h, left`,()=>C(`left`),{...E,enabled:n===`split`},[C,n]),Ae(`l, right`,()=>C(`right`),{...E,enabled:n===`split`},[C,n]),Ae(`v`,()=>{if(u){let t=e[u.fileIndex];t&&i(t.path)}},E,[u,e,i]),Ae(`shift+r`,()=>{l&&l()},E,[l]),Ae(`c`,()=>{if(u&&a){let t=e[u.fileIndex]?.chunks[u.chunkIndex]?.lines[u.lineIndex];t&&t.type!==`delete`&&a()}},E,[u,e,a]),Ae(`?`,()=>p(!f),{...E,useKey:!0},[f]),Ae(`.`,e=>{e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(w(),e.preventDefault())},{...E,useKey:!0,preventDefault:!1},[w]),Ae(`shift+c`,()=>{o&&o()},{...E,scopes:[`navigation`,`comments-list`]},[o]),Ae(`shift+d`,()=>{s&&s()},{...E,scopes:[`navigation`,`comments-list`]},[s]),Ae(`shift+l`,()=>{c&&c()},E,[c]),{cursor:u,isHelpOpen:f,setIsHelpOpen:p,setCursorPosition:T}}var aC=new Map,oC=0;function sC(e){return aC.has(e)||aC.set(e,`file-${++oC}`),aC.get(e)??``}var cC=8,lC=`1200px 0px`,uC=60,dC=180;function fC({diffData:e,diffScrollContainerRef:t,setDiffData:n}){let[r,i]=(0,P.useState)(new Set),a=(0,P.useRef)(new Set),o=(0,P.useRef)(null),s=(0,P.useRef)(new Map),c=(0,P.useRef)(new Set),l=(0,P.useRef)(null),u=(0,P.useRef)(0);(0,P.useEffect)(()=>{if(!e){let e=new Set;a.current=e,i(e),c.current.clear(),l.current=null;return}let t=`${e.requestedBaseCommitish??``}:${e.requestedTargetCommitish??``}:${e.requestedBaseMode??`direct`}`;if(l.current===t)return;l.current=t;let n=e.files.slice(0,cC).map(e=>e.path),r=new Set(n);a.current=r,i(r),c.current.clear()},[e]);let d=(0,P.useCallback)(e=>{let t=s.current.get(e);t&&o.current&&o.current.unobserve(t),i(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),a.current=n,n})},[]),f=(0,P.useCallback)((e,t)=>{let n=o.current,r=s.current.get(e);if(r&&n&&n.unobserve(r),!t){s.current.delete(e);return}s.current.set(e,t),!(a.current.has(e)||!n)&&n.observe(t)},[]);(0,P.useEffect)(()=>{if(o.current&&o.current.disconnect(),!e){o.current=null;return}let n=new IntersectionObserver(e=>{i(t=>{let r=!1,i=new Set(t);return e.forEach(e=>{if(!e.isIntersecting)return;let t=e.target.dataset.filePath;!t||i.has(t)||(i.add(t),n.unobserve(e.target),r=!0)}),r&&(a.current=i),r?i:t})},{root:t.current,rootMargin:lC});return o.current=n,s.current.forEach((e,t)=>{a.current.has(t)||n.observe(e)}),()=>{n.disconnect(),o.current=null}},[e,t]);let p=(0,P.useCallback)(t=>{if(!e)return;let n=e.files.findIndex(e=>e.path===t);if(n<0)return;let r=o.current;i(t=>{let i=!1,o=new Set(t);for(let t=0;t<=n;t++){let n=e.files[t]?.path;if(n&&!o.has(n)){o.add(n),i=!0;let e=s.current.get(n);e&&r&&r.unobserve(e)}}return i&&(a.current=o),i?o:t})},[e]),m=(0,P.useCallback)(n=>{p(n);let r=e?.files.findIndex(e=>e.path===n)??-1,i=e&&r>=0?e.files.slice(0,r+1).map(e=>sC(e.path)):[sC(n)],a=u.current+1;u.current=a;let o=()=>{for(let e of i){let t=document.getElementById(e);if(!t||t.dataset.rendered!==`true`)return!1}return!0},s=()=>{let e=t.current,r=document.getElementById(sC(n));if(!e||!r)return!1;let i=e.getBoundingClientRect(),a=r.getBoundingClientRect(),o=e.scrollTop+(a.top-i.top);return e.scrollTo({top:Math.max(0,o)}),!0},c=0,l=()=>{requestAnimationFrame(()=>{if(u.current===a){if(!o()){c<uC&&(c++,l());return}if(!s()){c<uC&&(c++,l());return}window.setTimeout(()=>{u.current===a&&s()},dC)}})};l()},[e,t,p]);return(0,P.useEffect)(()=>{if(!e||e.targetCommitish===`stdin`)return;let t=e.targetCommitish||`HEAD`,i=`${e.requestedBaseCommitish??``}...${e.requestedTargetCommitish??``}:${e.requestedBaseMode??`direct`}`;e.files.forEach(a=>{if(!r.has(a.path)||a.isGenerated!==!1||a.status===`deleted`)return;let o=`${i}:${t}:${a.path}`;if(c.current.has(o))return;c.current.add(o);let s=encodeURIComponent(a.path);fetch(`/api/generated-status/${s}?ref=${encodeURIComponent(t)}`).then(e=>e.ok?e.json():null).then(t=>{!t||t.isGenerated!==!0||n(t=>{if(!t||t.requestedBaseCommitish!==e.requestedBaseCommitish||t.requestedTargetCommitish!==e.requestedTargetCommitish||t.requestedBaseMode!==e.requestedBaseMode)return t;let n=!1,r=t.files.map(e=>e.path!==a.path||e.isGenerated?e:(n=!0,{...e,isGenerated:!0}));return n?{...t,files:r}:t})}).catch(()=>{})})},[e,r,n]),{renderedFilePaths:r,ensureFileRendered:d,ensureFilesRenderedUpTo:p,registerLazyFileContainer:f,scrollFileIntoDiffContainer:m}}var pC=`diff-search`,mC=`diff-search-current`,hC=200,gC=`diff-search-highlight-styles`;function _C(){if(typeof document>`u`||document.getElementById(gC))return;let e=document.createElement(`style`);e.id=gC,e.textContent=`
|
|
81
|
+
::highlight(${pC}) { background-color: rgba(255, 214, 0, 0.35); color: inherit; }
|
|
82
|
+
::highlight(${mC}) { background-color: rgba(255, 145, 0, 0.9); color: #1f2328; }
|
|
83
|
+
`,document.head.appendChild(e)}function vC(){if(typeof CSS>`u`)return null;let e=CSS.highlights;return!e||globalThis.Highlight===void 0?null:e}function yC(e){let t=globalThis.Highlight;return new t(...e)}function bC(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(!r)continue;let i=r.start+r.node.data.length;if(t>=r.start&&t<=i){if(t===i&&n<e.length-1)continue;return{node:r.node,offset:t-r.start}}}let n=e[e.length-1];return n?{node:n.node,offset:n.node.data.length}:null}function xC(e,t,n){let r=[],i=n?t:t.toLowerCase();return i&&e.querySelectorAll(`[data-diff-search-text]`).forEach(e=>{let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),a=[],o=``,s=t.nextNode();for(;s;){let e=s;a.push({node:e,start:o.length}),o+=e.data,s=t.nextNode()}if(!o)return;let c=n?o:o.toLowerCase(),l=c.indexOf(i);for(;l!==-1;){let e=bC(a,l),t=bC(a,l+i.length);if(e&&t){let n=document.createRange();try{n.setStart(e.node,e.offset),n.setEnd(t.node,t.offset),r.push(n)}catch{}}l=c.indexOf(i,l+i.length)}}),r}function SC({containerRef:e,ensureAllRendered:t,renderSignal:n,resetKey:r}){let[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(0),[f,p]=(0,P.useState)(-1),m=(0,P.useRef)([]),h=(0,P.useRef)(-1),g=(0,P.useCallback)(()=>{let e=vC();e&&(e.delete(pC),e.delete(mC))},[]),_=(0,P.useCallback)(()=>{let e=vC();if(!e)return;let t=m.current,n=h.current,r=n>=0?t[n]:void 0;r?e.set(mC,yC([r])):e.delete(mC)},[]),v=(0,P.useCallback)(()=>{let e=h.current;((e>=0?m.current[e]:void 0)?.startContainer.parentElement)?.scrollIntoView({block:`center`,inline:`nearest`})},[]),y=(0,P.useCallback)(t=>{let n=e.current,r=vC();if(!n||!o){m.current=[],d(0),p(-1),h.current=-1,g();return}let i=xC(n,o,c);m.current=i,d(i.length);let a=h.current;(t?.resetCurrent||a<0||a>=i.length)&&(a=i.length>0?0:-1),h.current=a,p(a),r&&(i.length>0?r.set(pC,yC(i)):r.delete(pC),_())},[c,g,e,_,o]);(0,P.useEffect)(()=>{if(!i)return;if(!o){y({resetCurrent:!0});return}let e=window.setTimeout(()=>{t(),window.requestAnimationFrame(()=>y({resetCurrent:!0}))},hC);return()=>window.clearTimeout(e)},[i,o,c,t,y]),(0,P.useEffect)(()=>{if(!i||!o)return;let e=window.setTimeout(()=>{window.requestAnimationFrame(()=>y())},hC);return()=>window.clearTimeout(e)},[n,i,o,y]),(0,P.useEffect)(()=>{f>=0&&v()},[f]),(0,P.useEffect)(()=>{s(``),d(0),p(-1),h.current=-1,m.current=[],g()},[r,g]),(0,P.useEffect)(()=>g,[g]);let b=(0,P.useCallback)(()=>{_C(),a(!0)},[]),x=(0,P.useCallback)(()=>{a(!1),s(``),m.current=[],d(0),p(-1),h.current=-1,g()},[g]),S=(0,P.useCallback)(e=>s(e),[]),C=(0,P.useCallback)(()=>l(e=>!e),[]),w=(0,P.useCallback)(e=>{let t=m.current.length;if(t===0)return;let n=((h.current<0?0:h.current)+e+t)%t;h.current=n,p(n),_(),v()},[_,v]),T=(0,P.useCallback)(()=>w(1),[w]),E=(0,P.useCallback)(()=>w(-1),[w]);return(0,P.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`f`&&(e.preventDefault(),_C(),a(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),{isOpen:i,query:o,caseSensitive:c,matchCount:u,currentIndex:f,open:b,close:x,setQuery:S,toggleCaseSensitive:C,next:T,prev:E}}function CC(){let e=new URLSearchParams(window.location.search).get(`repo`);return e&&e.trim()?e:null}function wC(){let e=new URL(window.location.href);e.searchParams.delete(`repo`),window.history.replaceState({},``,`${e.pathname}${e.search}${e.hash}`)}function TC({swap:e,onOpened:t,onError:n}){let r=(0,P.useRef)(!1),i=(0,P.useRef)(e),a=(0,P.useRef)(t),o=(0,P.useRef)(n);i.current=e,a.current=t,o.current=n,(0,P.useEffect)(()=>{if(r.current)return;r.current=!0;let e=CC();e&&(async()=>{let t=await i.current({type:`repo`,path:e});if(wC(),!t.ok){o.current?.(t.error);return}let n=e.replace(/\/+$/,``).split(`/`).pop()??t.active.label;a.current({id:t.active.repoId,kind:`repo`,label:n,path:e})})()},[])}var EC=`difit.tabs.v1`;function DC(){if(typeof window>`u`)return{tabs:[],activeTabId:null};try{let e=window.localStorage.getItem(EC);if(!e)return{tabs:[],activeTabId:null};let t=JSON.parse(e),n=Array.isArray(t.tabs)?t.tabs:[];return{tabs:n,activeTabId:typeof t.activeTabId==`string`&&n.some(e=>e.id===t.activeTabId)?t.activeTabId:n[0]?.id??null}}catch{return{tabs:[],activeTabId:null}}}function OC(e){let t=Array.isArray(e.tabs)?e.tabs:[];return{tabs:t,activeTabId:typeof e.activeTabId==`string`&&t.some(t=>t.id===e.activeTabId)?e.activeTabId:t[0]?.id??null}}function kC(){let[e,t]=(0,P.useState)(DC),n=(0,P.useRef)(null);(0,P.useEffect)(()=>{try{let t=JSON.stringify(e);if(t===n.current)return;n.current=t,window.localStorage.setItem(EC,t)}catch{}},[e]),(0,P.useEffect)(()=>{let e=e=>{if(!(e.key!==`difit.tabs.v1`||e.newValue==null))try{let r=OC(JSON.parse(e.newValue));n.current=JSON.stringify(r),t(r)}catch{}};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let r=(0,P.useCallback)(e=>{t(t=>{let n=t.tabs.findIndex(t=>t.id===e.id)>=0?t.tabs.map(t=>t.id===e.id?{...t,...e}:t):[...t.tabs,e];return{...t,tabs:n}})},[]),i=(0,P.useCallback)(e=>{t(t=>({...t,tabs:t.tabs.filter(t=>t.id!==e)}))},[]),a=(0,P.useCallback)(e=>{t(t=>({...t,activeTabId:e}))},[]);return{...e,upsertTab:r,removeTab:i,setActiveTabId:a}}function AC(){let[e,t]=(0,P.useState)([]),[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(null),o=(0,P.useRef)(null),s=(0,P.useRef)(0),c=(0,P.useCallback)(async()=>{let e=++s.current;try{let n=o.current,i=n?`/api/turns?session=${encodeURIComponent(n)}`:`/api/turns`,c=await fetch(i);if(!c.ok)return[];let l=await c.json();if(e!==s.current)return[];let u=Array.isArray(l.turns)?l.turns:[];return t(u),r(Array.isArray(l.sessions)?l.sessions:[]),!o.current&&l.activeSession&&(o.current=l.activeSession,a(l.activeSession)),u}catch{return[]}},[]),l=(0,P.useCallback)(e=>{o.current=e,a(e),c()},[c]),u=(0,P.useCallback)(()=>{s.current++,o.current=null,a(null),t([]),r([])},[]);return(0,P.useEffect)(()=>{c()},[c]),{turns:e,sessions:n,activeSession:i,setActiveSession:l,refetch:c,reset:u}}function jC(e,t,n,r,i,a,o=[],s){let[c,l]=(0,P.useState)([]),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(new Map),[m,h]=(0,P.useState)(new Set),g=e&&t?`${a??`default`}:${gn({baseCommitish:e,targetCommitish:t,baseMode:s})}:${n??`no-commit`}`:null,_=g!==null&&u===g;(0,P.useEffect)(()=>{if(!e||!t||!g)return;let c=!1,u=uS.getViewedFiles(e,t,n,r,a,s);return(async()=>{let f=[];if(i&&i.length>0){let e=new Set(u.map(e=>e.filePath)),t=new Set(uS.getAutoViewOptOut(a)),n=new Map;await Promise.all(i.map(async e=>{try{let t=await dS(pS(e));n.set(e.path,t)}catch(t){console.error(`Failed to generate hash for file:`,e.path,t)}}));for(let r of i){if(e.has(r.path)||t.has(r.path)||!(r.isGenerated||r.status===`deleted`||M_(r.path,o)))continue;let i=n.get(r.path);i&&(f.push({filePath:r.path,viewedAt:new Date().toISOString(),diffContentHash:i}),e.add(r.path))}let r=uS.getViewedHashIndex(a),s=new Map,l=new Set;for(let e of r.entries)e.hashVersion===1&&(s.set(`${e.filePath} ${e.diffContentHash}`,e),l.add(e.filePath));for(let t of i){if(e.has(t.path))continue;let r=n.get(t.path);if(!r)continue;let i=s.get(`${t.path} ${r}`);i&&(f.push({filePath:t.path,viewedAt:i.viewedAt,diffContentHash:r}),e.add(t.path))}let d=new Set;for(let t of i){if(!l.has(t.path)||e.has(t.path))continue;let r=n.get(t.path);r&&(s.has(`${t.path} ${r}`)||d.add(t.path))}c||h(d)}else c||h(new Set);if(f.length>0){let i=[...u,...f];uS.saveViewedFiles(e,t,i,n,r,a,s),c||(l(i),d(g));return}c||(l(u),d(g))})(),()=>{c=!0}},[e,t,n,r,a,g,s]);let v=(0,P.useCallback)(i=>{!e||!t||(uS.saveViewedFiles(e,t,i,n,r,a,s),l(i))},[e,t,n,r,a,s]),y=(0,P.useMemo)(()=>new Set(c.map(e=>e.filePath)),[c]),b=(0,P.useCallback)(e=>c.find(t=>t.filePath===e),[c]),x=(0,P.useCallback)(async e=>{let t=f.get(e.path);if(t)return t;let n=await dS(pS(e));return p(t=>new Map(t).set(e.path,n)),n},[f]),S=(0,P.useCallback)(async(e,t)=>{let n=b(e);if(!n)return!1;let r=await x(t);return n.diffContentHash!==r},[b,x]);return{viewedFiles:y,changedSinceViewedFiles:m,hasLoadedInitialViewedFiles:_,toggleFileViewed:(0,P.useCallback)(async(e,t)=>{let n=b(e);if(n)v(c.filter(t=>t.filePath!==e)),uS.removeViewedHashes(a,[{filePath:e,diffContentHash:n.diffContentHash}]),uS.addAutoViewOptOut(a,e);else{let n=await x(t),r=new Date().toISOString(),i={filePath:e,viewedAt:r,diffContentHash:n};v([...c,i]);let o={filePath:e,diffContentHash:n,hashVersion:1,viewedAt:r};uS.recordViewedHashes(a,[o]),uS.removeAutoViewOptOut(a,e)}},[c,b,x,v,a]),isFileContentChanged:S,getViewedFileRecord:b,clearViewedFiles:(0,P.useCallback)(()=>{v([]),p(new Map),h(new Set),uS.clearViewedHashIndex(a),uS.clearAutoViewOptOut(a)},[v,a])}}var MC={mobileMax:767,desktopMin:1024},NC={mobile:`(max-width: ${MC.mobileMax}px)`,desktop:`(min-width: ${MC.desktopMin}px)`},PC=()=>typeof window>`u`?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(NC.mobile).matches,isDesktop:window.matchMedia(NC.desktop).matches};function FC(){let[e,t]=(0,P.useState)(()=>PC());return(0,P.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(NC.mobile),n=window.matchMedia(NC.desktop),r=()=>{t({isMobile:e.matches,isDesktop:n.matches})};return r(),e.addEventListener(`change`,r),n.addEventListener(`change`,r),()=>{e.removeEventListener(`change`,r),n.removeEventListener(`change`,r)}},[]),e}function IC(e){let t=new Set;return e.forEach(e=>{let n=e.author?.trim();n&&t.add(n)}),[...t]}function LC(e){return IC(e).length>=2}function RC(e,t,n,r){for(let i=0;i<e.chunks.length;i++){let a=e.chunks[i];if(a)for(let e=0;e<a.lines.length;e++){let o=a.lines[e];if(o&&(r===`old`?o.oldLineNumber:r===`new`?o.newLineNumber:o.newLineNumber??o.oldLineNumber)===n)return{fileIndex:t,chunkIndex:i,lineIndex:e,side:r===`old`?`left`:r===`new`||o.newLineNumber?`right`:`left`}}}return null}function zC(e,t){let n=t.findIndex(t=>t.path===e.file);if(n===-1)return null;let r=t[n];if(!r)return null;let i=Array.isArray(e.line)?e.line[1]:e.line,a=e.side;return RC(r,n,i,a)||RC(r,n,i,`new`)||RC(r,n,i,`old`)}var BC={diffVersion:null,byFile:new Map};function VC(e,t,n,r){let i=new Map;return t.forEach(e=>{let t=n.get(e);t&&i.set(e,r(t))}),{diffVersion:e,byFile:i}}function HC(e,t,n){if(e.diffVersion===t)return e.byFile.get(n)}function UC(e){return e.replace(/[ \t]+$/,``)}function WC(e){return e.replace(/\r\n/g,`
|
|
84
|
+
`).split(`
|
|
85
|
+
`).map(UC)}function GC(e){let t=new Map,n=new Map;for(let r of e.chunks)for(let e of r.lines)e.oldLineNumber!==void 0&&t.set(e.oldLineNumber,e.content),e.newLineNumber!==void 0&&n.set(e.newLineNumber,e.content);return{old:t,new:n}}function KC(e,t){let n=e.codeSnapshot?.content;if(n===void 0)return!1;if(!t)return!0;let r=e.position.side===`old`?t.old:t.new,i=typeof e.position.line==`number`?{start:e.position.line,end:e.position.line}:e.position.line,a=WC(n);for(let e=0;e<=i.end-i.start;e++){let t=r.get(i.start+e);if(t===void 0)continue;let n=a[e]??``;if(UC(t)!==n)return!0}return!1}var qC={".":`Working tree`,staged:`Staging Area`,working:`Working Directory`};function JC(e){return pn(e.baseMode)===`merge-base`?!1:!!e.targetCommitish&&e.baseCommitish===`${e.targetCommitish}^`}function YC(e,t){return e?e===t.shortHash||e===t.hash:!1}function XC(e,t){return t?`${e.shortHash}^`:e.shortHash}function ZC(e,t,n){if(!t)return`Select...`;let r=t.endsWith(`^`),i=r?t.slice(0,-1):t;if(i.startsWith(`HEAD`))return t;let a=qC[t];if(a)return a;let o=e.specialOptions.find(e=>e.value===t);if(o)return o.label;let s=e.branches.find(e=>e.name===i);if(s)return r?`${s.name}^`:s.name;let c=e.commits.find(e=>e.shortHash===i||e.hash===i);if(c)return XC(c,r);if(n){let t=e.commits.find(e=>e.shortHash===n||e.hash===n);if(t)return XC(t,!1)}return t}function QC(e,t,n,r){let i=JC(t),a=e.commits.find(e=>i?YC(t.targetCommitish,e)||YC(r,e):!1);return a?`${a.shortHash} ${a.message}`:`${ZC(e,t.baseCommitish,n)}...${ZC(e,t.targetCommitish,r)}${pn(t.baseMode)===`merge-base`?` (merge-base)`:``}`}function $C(e,t){return e?e===t.shortHash||e===t.hash:!1}function ew(e){return pn(e.baseMode)!==`merge-base`&&!!e.targetCommitish&&e.baseCommitish===`${e.targetCommitish}^`}function tw(e,t,n,r){let i=Lg(e,t),a=i===-1?void 0:e[i];if(a)return{kind:`turn`,turn:a,turnNumber:Rg(e,i)};if(ew(t)){let e=n.find(e=>$C(t.targetCommitish,e)||$C(r,e));if(e)return{kind:`commit`,commit:e}}return null}function nw(e,t){let n=e?.trim()??``,r=t?.trim()??``;return!n&&!r?null:[n,r].filter(e=>e.length>0).join(`
|
|
86
|
+
|
|
87
|
+
`)}function rw({target:e,base:t,enabled:n}){let[r,i]=(0,P.useState)([]),[a,o]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{if(!n||!e){i([]);return}let r=!1;o(!0);let a=new URLSearchParams({target:e});return t&&a.set(`base`,t),fetch(`/api/commits?${a.toString()}`).then(e=>e.ok?e.json():{commits:[]}).then(e=>{r||i(Array.isArray(e.commits)?e.commits:[])}).catch(()=>{r||i([])}).finally(()=>{r||o(!1)}),()=>{r=!0}},[n,e,t]),{commits:r,loading:a}}var iw=[],aw=[],ow=`difit.diffViewMode`,sw=`difit.sidebarWidth`,cw=`difit.sidebarOpen`,lw=200,uw=600,dw=280,fw=()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(ow);if(e===null)return null;switch(e){case`split`:case`side-by-side`:case`unified`:case`inline`:return Bt(e);default:return null}}catch{return null}},pw=()=>fw()??`split`,mw=e=>e.kind===`pr`?{type:`pr`,url:e.url??``}:{type:`repo`,path:e.path??``},hw=()=>{if(typeof window>`u`)return dw;let e=window.localStorage.getItem(sw);if(!e)return dw;let t=Number.parseInt(e,10);return Number.isFinite(t)?Math.min(uw,Math.max(lw,t)):dw},gw=()=>{if(typeof window>`u`)return!0;let e=window.localStorage.getItem(cw);return e===null||e===`true`?!0:e!==`false`};function _w(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(0),[i,a]=(0,P.useState)(Kg),o=(0,P.useCallback)(e=>{a(t=>({...t,...e}))},[]),s=(0,P.useCallback)(()=>a(Kg),[]),c=(0,P.useMemo)(()=>{if(!e)return[];let t=$g(i);return e.files.filter(t)},[e,i]),l=(0,P.useMemo)(()=>e?{...e,files:c}:null,[e,c]),[u,d]=(0,P.useState)(pw),[f,p]=(0,P.useState)(!0),[m,h]=(0,P.useState)(!0),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(!1),[b,x]=(0,P.useState)(!1),[S,C]=(0,P.useState)(null),[w,T]=(0,P.useState)(!1),[E,D]=(0,P.useState)(hw),[O,k]=(0,P.useState)(!1),[A,j]=(0,P.useState)(gw),[M,N]=(0,P.useState)(!1),[ee,te]=(0,P.useState)(!1),[ne,re]=(0,P.useState)(!1),[ie,ae]=(0,P.useState)(!1),[oe,I]=(0,P.useState)(!1),[se,ce]=(0,P.useState)(new Set),le=(0,P.useRef)(!1),ue=(0,P.useRef)(null),[L,de]=(0,P.useState)(null),[R,fe]=(0,P.useState)(mn(``,``)),[pe,me]=(0,P.useState)(mn(``,``)),[he,ge]=(0,P.useState)(``),[_e,ve]=(0,P.useState)(``),[ye,be]=(0,P.useState)(!1),xe=(0,P.useMemo)(()=>L?.branches.find(e=>e.current)?.name??null,[L]),Se=(0,P.useRef)(!1),Ce=(0,P.useRef)(R.baseMode);Ce.current=e?.requestedBaseMode??R.baseMode;let we=(0,P.useRef)(R);we.current=R;let Te=(0,P.useRef)(0),Ee=(0,P.useRef)(null),De=(0,P.useMemo)(()=>!e?.baseCommitish||!e?.targetCommitish?null:mn(e.baseCommitish,e.targetCommitish,e.requestedBaseMode),[e]),Oe=(0,P.useMemo)(()=>De?gn(De):null,[De]),{settings:ke,updateSettings:Ae}=Zx(),{isMobile:je}=FC(),{tabs:Me,activeTabId:Ne,upsertTab:Pe,removeTab:Fe,setActiveTabId:Ie}=kC(),{data:Le,loading:Re,swap:ze}=qx(),z=typeof window<`u`&&window.__DIFIT_STATIC_BLOB_URLS__!==void 0,{hasLoadedComments:Be,threads:Ve,replaceThreads:He,addThread:Ue,replyToThread:We,removeThread:Ge,removeMessage:Ke,updateMessage:qe,clearAllComments:Je,generateThreadPrompt:Ye,generateAllCommentsPrompt:Xe}=gS(De?.baseCommitish,De?.targetCommitish,e?.commit,void 0,e?.repositoryId,De?.baseMode),Ze=je&&Ve.length>0,Qe=(0,P.useMemo)(()=>Oe?`${e?.repositoryId??`default`}:${Oe}`:null,[e?.repositoryId,Oe]),et=(0,P.useMemo)(()=>{if(!De)return null;let e=new URLSearchParams({base:De.baseCommitish,target:De.targetCommitish});return De.baseMode===`merge-base`&&e.set(`baseMode`,De.baseMode),e.toString()},[De]),tt=(0,P.useCallback)(e=>et?`${e}?${et}`:e,[et]),[nt,rt]=(0,P.useState)(null),it=Qe!==null&&Qe===nt,at=(0,P.useRef)(null),ot=(0,P.useRef)(!1),st=(0,P.useRef)(null),ct=(0,P.useRef)(!1);(0,P.useEffect)(()=>{Qe!==nt&&(ot.current=!1)},[nt,Qe]);let lt=(0,P.useCallback)(async()=>{let e=await fetch(tt(`/api/comments-json`));if(!e.ok)throw Error(`Failed to fetch comments: ${e.status} ${e.statusText}`);let t=await e.json();return typeof t.version==`number`&&(st.current=t.version),Array.isArray(t.threads)?t.threads:[]},[tt]),ft=(0,P.useCallback)(async e=>{let t=await fetch(tt(`/api/comments`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({threads:e,baseVersion:st.current??void 0})});if(!t.ok)return;let n=await t.json();typeof n.version==`number`&&(st.current=n.version),n.merged&&Array.isArray(n.threads)&&(ot.current=!0,He(n.threads))},[tt,He]),{viewedFiles:pt,changedSinceViewedFiles:mt,hasLoadedInitialViewedFiles:gt,toggleFileViewed:_t,clearViewedFiles:vt}=jC(De?.baseCommitish,De?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId,ke.autoViewedPatterns,De?.baseMode);(0,P.useEffect)(()=>{le.current=!1},[e?.repositoryId,Oe,e?.commit]),(0,P.useEffect)(()=>{!le.current&>&&(ce(new Set(pt)),le.current=!0)},[pt,gt]);let{renderedFilePaths:yt,ensureFileRendered:bt,ensureFilesRenderedUpTo:xt,registerLazyFileContainer:wt,scrollFileIntoDiffContainer:Tt}=fC({diffData:l,diffScrollContainerRef:ue,setDiffData:t}),Et=SC({containerRef:ue,ensureAllRendered:(0,P.useCallback)(()=>{let t=e?.files[e.files.length-1];t&&xt(t.path)},[e,xt]),renderSignal:yt.size,resetKey:`${e?.repositoryId??``}:${e?.commit??``}`}),Dt=(0,P.useCallback)(async t=>{if(!e)return;let n=e.files.find(e=>e.path===t);if(!n)return;let r=pt.has(t);await _t(t,n),ce(e=>{let n=new Set(e);return r?n.delete(t):n.add(t),n}),r||setTimeout(()=>{Tt(t)},100)},[e,Tt,_t,pt]),Ot=(0,P.useCallback)(e=>{ce(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),jt=(0,P.useCallback)(t=>{e&&ce(t?new Set(e.files.map(e=>e.path)):new Set)},[e]),Mt=(0,P.useCallback)(()=>{j(!1)},[]),Pt=(0,P.useCallback)(e=>{d(e);try{window.localStorage.setItem(ow,e)}catch{}},[]),{isLoading:Ft,expandLines:It,expandAllBetweenChunks:Lt,prefetchFileContent:Rt,getMergedChunks:zt,lastUpdatedAt:Bt}=bS({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish,diffIdentity:n}),Vt=(0,P.useRef)(zt);(0,P.useEffect)(()=>{Vt.current=zt},[zt]);let[Ht,Ut]=(0,P.useState)(BC),Wt=(0,P.useMemo)(()=>{let t=new Map;return e?.files.forEach(e=>{t.set(e.path,e)}),t},[e]);(0,P.useEffect)(()=>{if(!e){Ut(BC);return}Ut(VC(n,yt,Wt,e=>Vt.current(e)))},[e,n,Wt,yt,Bt]);let Gt=(0,P.useMemo)(()=>c.map(e=>({...e,chunks:HC(Ht,n,e.path)||e.chunks})),[c,n,Ht]),Kt=(0,P.useMemo)(()=>c.filter(e=>pt.has(e.path)).length,[c,pt]),qt=(0,P.useMemo)(()=>{let t=new Map;if(!e||Ve.length===0)return t;let n=new Set(Ve.map(e=>e.filePath));for(let r of e.files)n.has(r.path)&&t.set(r.path,GC(r));return t},[e,Ve]),Jt=(0,P.useMemo)(()=>Ve.map(e=>({id:e.id,file:e.filePath,line:typeof e.position.line==`number`?e.position.line:[e.position.line.start,e.position.line.end],side:e.position.side,createdAt:e.createdAt,updatedAt:e.updatedAt,codeContent:e.codeSnapshot?.content,isOutdated:KC(e,qt.get(e.filePath)),messages:e.messages})),[Ve,qt]),Yt=(0,P.useMemo)(()=>LC(Jt.flatMap(e=>e.messages)),[Jt]),Xt=(0,P.useMemo)(()=>{let e=new Map;return Jt.forEach(t=>{let n=e.get(t.file);n?n.push(t):e.set(t.file,[t])}),e},[Jt]),[Zt,Qt]=(0,P.useState)(null),$t=(0,P.useRef)(null),en=(0,P.useCallback)(async()=>{await $t.current?.()},[]),tn=(0,P.useCallback)(async()=>{try{let e=await lt();ot.current=!0,He(e),Qe&&rt(Qe)}catch(e){console.error(`Failed to refresh comments from server:`,e)}},[Qe,lt,He]),nn=(0,P.useRef)(null),rn=(0,P.useRef)(null),{shouldReload:an,reload:on,resetReload:sn,watchState:cn}=CS(en,tn,()=>nn.current?.(),()=>rn.current?.()),{cursor:ln,isHelpOpen:un,setIsHelpOpen:fn,setCursorPosition:yn}=iC({files:Gt,comments:Jt,viewMode:u,reviewedFiles:pt,onToggleReviewed:Dt,onCreateComment:()=>{ln&&Qt({fileIndex:ln.fileIndex,chunkIndex:ln.chunkIndex,lineIndex:ln.lineIndex})},onCopyAllComments:()=>{Ve.length>0&&pr()},onDeleteAllComments:()=>{Ve.length>0&&confirm(`Delete all comments?`)&&Je()},onShowCommentsList:()=>{ae(!0)},onRefresh:()=>{on()}});(0,P.useEffect)(()=>{if(!e||!ln)return;let t=c[ln.fileIndex]?.path;!t||yt.has(t)||(xt(t),requestAnimationFrame(()=>{yn(ln)}))},[ln,e,c,xt,yt,yn]);let xn=(0,P.useCallback)((e,t,n,r)=>{yn({fileIndex:e,chunkIndex:t,lineIndex:n,side:r})},[yn]),Sn=(0,P.useCallback)(()=>{Qt(null)},[Qt]),Cn=(0,P.useCallback)(e=>Ye(e.id),[Ye]),Dn=e=>{e.preventDefault(),N(!0);let t=e.clientX,n=E,r=e=>{D(Math.max(lw,Math.min(uw,n+(e.clientX-t))))},i=()=>{N(!1),document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)},On=(0,P.useCallback)(async e=>{let n=Te.current+1;Te.current=n,Ee.current?.abort();let i=new AbortController;Ee.current=i;try{let a=e??(Se.current?we.current:void 0),o=new URLSearchParams({ignoreWhitespace:String(f)});a?.baseCommitish&&o.set(`base`,a.baseCommitish),a?.targetCommitish&&o.set(`target`,a.targetCommitish),a?.baseMode===`merge-base`&&o.set(`baseMode`,a.baseMode);let s=await fetch(`/api/diff?${o}`,{signal:i.signal});if(!s.ok){let e=`HTTP ${s.status} ${s.statusText}`.trim();try{let t=(await s.text()).trim();t&&(e+=`\n\n${t.slice(0,500)}`)}catch{}throw Error(e)}let c=await s.json();if(Te.current!==n)return;if(c.needsWorkspace){y(!0),_(null);return}if(y(!1),t(c),r(e=>e+1),ge(c.baseCommitish&&c.requestedBaseMode!==`merge-base`?c.baseCommitish:``),c.targetCommitish&&ve(c.targetCommitish),!Se.current){let e=c.requestedBaseCommitish??c.baseCommitish,t=c.requestedTargetCommitish??c.targetCommitish;e&&t&&fe(mn(e,t,c.requestedBaseMode))}}catch(e){if(e?.name===`AbortError`||Te.current!==n)return;_(e instanceof Error?e.message:`Unknown error`)}finally{Ee.current===i&&(Ee.current=null),Te.current===n&&h(!1)}},[f]);$t.current=On,(0,P.useEffect)(()=>{On()},[On]),(0,P.useEffect)(()=>()=>{Ee.current?.abort()},[]),(0,P.useEffect)(()=>{je&&u!==`unified`&&d(`unified`)},[u,je]),(0,P.useEffect)(()=>{try{window.localStorage.setItem(sw,String(E))}catch{}},[E]),(0,P.useEffect)(()=>{try{window.localStorage.setItem(cw,String(A))}catch{}},[A]);let kn=(0,P.useCallback)(()=>{fetch(`/api/revisions`).then(e=>e.ok?e.json():null).then(e=>{if(!e||e.needsWorkspace||!Array.isArray(e.commits)){de(null);return}de(e),e.resolvedBase&&pn(Ce.current)!==`merge-base`&&ge(t=>t||e.resolvedBase||``),e.resolvedTarget&&ve(t=>t||e.resolvedTarget||``)}).catch(()=>de(null))},[]);(0,P.useEffect)(()=>{kn()},[kn]);let An=(0,P.useCallback)(async e=>{hn(e,R)&&!_n(e.targetCommitish)||(Se.current=!0,we.current=e,fe(e),h(!0),_(null),await On(e))},[On,R]),[jn,Mn]=(0,P.useState)(!1),Nn=(0,P.useRef)(jn);Nn.current=jn;let{turns:Pn,sessions:Fn,activeSession:In,setActiveSession:Ln,refetch:Rn,reset:zn}=AC(),Vn=(0,P.useCallback)((e,t)=>{be(!1),Mn(t?.live??!1),An(e)},[An]),Hn=(0,P.useCallback)((t,n)=>{me(t);let r=Pg(t);r&&BS(e?.repositoryId,{diffPreset:r}),Vn(t,n)},[Vn,e?.repositoryId]),Un=(0,P.useCallback)((e,t)=>Vn(e,t),[Vn]),Wn=(0,P.useCallback)(e=>e.commitAfter?mn(e.commitBefore,e.commitAfter):mn(e.commitBefore,`.`),[]),Gn=(0,P.useCallback)(e=>{Vn(Wn(e),{live:!e.commitAfter})},[Vn,Wn]);(0,P.useEffect)(()=>{if(!L||Se.current)return;let e=zS(L.repositoryId).diffPreset,t=e?Fg(e,{branchBase:L.branchBase,commitCount:L.commits.length}):null;if(t){Hn(t),be(!1);return}let n=L.branchBase;n?(Hn(Eg(n)),be(!1)):(Hn(Og),be(!0))},[L]);let Kn=(0,P.useMemo)(()=>({currentBranch:L?.currentBranch??null,pgitParent:L?.pgitParent??null,hasTurns:Pn.length>0}),[L?.currentBranch,L?.pgitParent,Pn.length]),qn=(0,P.useMemo)(()=>Ig(pe,Kn),[pe,Kn]),Jn=(0,P.useMemo)(()=>{if(qn.kind===`both`)return!1;let e=kg.some(e=>hn(e.selection,pe)),t=pn(pe.baseMode)===`merge-base`&&pe.targetCommitish===`.`;return!e&&!t},[qn.kind,pe]),Yn=rw({base:qn.kind===`none`?void 0:qn.kind===`both`?pe.baseCommitish:qn.base,target:qn.kind===`none`?null:qn.kind===`both`?L?.currentBranch??`HEAD`:qn.target,enabled:qn.kind!==`none`}),Xn=(0,P.useMemo)(()=>{let e=Lg(Pn,R);if(e>=0)return`Turn ${Rg(Pn,e)}`;let t=Yn.commits.find(e=>R.targetCommitish===e.shortHash||R.targetCommitish===e.hash);if(t&&R.baseCommitish===`${t.shortHash}^`)return t.shortHash;if(qn.kind===`both`)return L?.branchBase?`Current branch · vs ${L.branchBase}`:`Current branch`;let n=kg.find(e=>hn(e.selection,pe));return n?n.label:L?QC(L,pe,he,_e):`Select…`},[Pn,R,Yn.commits,qn.kind,pe,L,he,_e]),Zn=(0,P.useMemo)(()=>L?tw(Pn,R,L.commits,_e):null,[L,Pn,R,_e]),Qn=(0,P.useMemo)(()=>Zn?Zn.kind===`turn`?Zn.turn.prompt:Zn.commit.message:nw(e?.prTitle,e?.prBody),[Zn,e?.prTitle,e?.prBody]),$n=HS({base:he||R.baseCommitish,target:_e||R.targetCommitish,baseMode:e?.requestedBaseMode??R.baseMode,intent:Qn,files:e?.files??[],repositoryId:e?.repositoryId}),er=(0,P.useMemo)(()=>{let t=e?.files??[];return{fileCount:t.length,additions:t.reduce((e,t)=>e+(t.additions??0),0),deletions:t.reduce((e,t)=>e+(t.deletions??0),0)}},[e]),tr=$n.state.status===`ready`?$n.state.result:null,nr=(0,P.useMemo)(()=>{if($n.mode===`tree`||!tr)return c;let e=new Map;return[...tr.groups.flatMap(e=>e.files),...tr.noise].forEach((t,n)=>{e.has(t)||e.set(t,n)}),[...c].sort((t,n)=>(e.get(t.path)??2**53-1)-(e.get(n.path)??2**53-1))},[c,$n.mode,tr]),rr=(0,P.useCallback)(()=>{x(!1),y(!1),Mn(!1),a(Kg),C(null),sn(),Se.current=!1,be(!1),me(mn(``,``)),h(!0),zn(),On(),Rn(),kn()},[On,Rn,kn,zn,sn]),ir=(0,P.useCallback)(e=>{let t=[...Le?.recents??[],...(Le?.roots??[]).flatMap(e=>e.repos)].find(t=>t.repoId===e);if(t)return{id:e,kind:`repo`,label:t.name,path:t.path};let n=(Le?.recentPrs??[]).find(t=>t.repoId===e);return n?{id:e,kind:`pr`,label:n.label,url:n.url}:null},[Le]);rn.current=rr;let ar=(0,P.useCallback)(e=>{Pe(e),Ie(e.id),rr()},[Pe,Ie,rr]);TC({swap:ze,onOpened:ar,onError:C});let or=(0,P.useCallback)(async e=>{if(e===Ne||sr.current)return;let t=Me.find(t=>t.id===e);if(!t)return;let n=Ne;sr.current=!0,Ie(e);try{let e=await ze(mw(t));e.ok?rr():(Ie(n),C(e.error))}finally{sr.current=!1}},[Ne,Me,Ie,ze,rr]),B=(0,P.useCallback)(async e=>{if(sr.current)return;let t=Me.findIndex(t=>t.id===e),n=Me.filter(t=>t.id!==e);if(Fe(e),e!==Ne)return;let r=n[t]??n[t-1]??null;if(!r){Ie(null),y(!0);return}Ie(r.id),sr.current=!0;try{let e=await ze(mw(r));e.ok?rr():C(e.error)}finally{sr.current=!1}},[Me,Ne,Fe,Ie,ze,rr]),sr=(0,P.useRef)(!1),cr=(0,P.useRef)(!1),lr=(0,P.useRef)(typeof window<`u`&&new URLSearchParams(window.location.search).has(`repo`));(0,P.useEffect)(()=>{if(!cr.current||sr.current)return;let t=e?.repositoryId;if(!t||t===Ne)return;let n=ir(t)??(e?.repoName?{id:t,kind:`repo`,label:e.repoName}:null);n&&Pe(n),Ie(t)},[e?.repositoryId,e?.repoName,Ne,ir,Pe,Ie]),(0,P.useEffect)(()=>{if(cr.current||e===null&&!v||Re||(cr.current=!0,lr.current))return;let t=e?.repositoryId??null,n=Me;if(t&&!Me.some(e=>e.id===t)){let r=[...Le?.recents??[],...(Le?.roots??[]).flatMap(e=>e.repos)].find(e=>e.repoId===t),i=(Le?.recentPrs??[]).find(e=>e.repoId===t),a=null;r?a={id:t,kind:`repo`,label:r.name,path:r.path}:i?a={id:t,kind:`pr`,label:i.label,url:i.url}:e?.repoName&&(a={id:t,kind:`repo`,label:e.repoName}),a&&(Pe(a),n=[...Me,a])}let r=(Ne&&n.some(e=>e.id===Ne)?Ne:null)??t??n[0]?.id??null;if(r&&(r!==Ne&&Ie(r),r!==t)){let e=n.find(e=>e.id===r);e&&ze(mw(e)).then(e=>{e.ok?rr():C(e.error)})}},[e,v,Re]),nn.current=()=>{Rn().then(e=>{if(!Nn.current)return;let t=e[0];if(!t)return;let n=Wn(t);hn(we.current,n)||Vn(n,{live:!0})})};let ur=_n(R.targetCommitish);(0,P.useEffect)(()=>{an&&(ke.autoReload||ur)&&on()},[an,ke.autoReload,ur,on]);let dr=(0,P.useRef)(!1);(0,P.useEffect)(()=>{e?.clearComments&&!dr.current&&(dr.current=!0,ct.current=!0,Je({resetAppliedCommentImportIds:!0}),vt(),console.log(`✅ All existing comments and viewed files cleared as requested via --clean flag`))},[e?.clearComments,Je,vt]),(0,P.useEffect)(()=>{if(!Qe||!Be||nt===Qe||at.current===Qe)return;let e=ct.current;ct.current=!1,at.current=Qe;let t=!1;return(async()=>{try{let n=await lt(),r=e?n:dn(n,Ve).threads;if(t)return;ot.current=!0,He(r),!e&&JSON.stringify(n)!==JSON.stringify(r)&&await ft(r)}catch(e){t||console.error(`Failed to bootstrap comments from server:`,e)}finally{t||rt(Qe),at.current===Qe&&(at.current=null)}})(),()=>{t=!0,at.current===Qe&&(at.current=null)}},[nt,Qe,lt,Be,He,ft,Ve]),(0,P.useEffect)(()=>{e&&(c.length===0||Kt<c.length?re(!1):Kt===c.length&&!ne&&(te(!0),re(!0),setTimeout(()=>{te(!1)},1e3)))},[Kt,c.length,e,ne]),(0,P.useEffect)(()=>{if(!it)return;let e=JSON.stringify({threads:Ve,baseVersion:st.current??void 0}),t=tt(`/api/comments`),n=()=>{navigator.sendBeacon(t,e)};return window.addEventListener(`beforeunload`,n),ot.current?(ot.current=!1,()=>{window.removeEventListener(`beforeunload`,n)}):(ft(Ve).catch(e=>{console.error(`Failed to sync comments:`,e)}),()=>{window.removeEventListener(`beforeunload`,n)})},[tt,it,ft,Ve]),(0,P.useEffect)(()=>{let e=new EventSource(SS(`/api/heartbeat`));return e.onopen=()=>{console.log(`Connected to server heartbeat`)},e.onerror=()=>{console.log(`Server connection lost`),e.close()},()=>{e.close()}},[]);let fr=(0,P.useCallback)((e,t,n,r,i)=>(Ue({filePath:e,body:n,side:i||`new`,line:typeof t==`number`?t:{start:t[0],end:t[1]},codeSnapshot:r===void 0?void 0:{content:r,language:void 0}}),Promise.resolve()),[Ue]),pr=async()=>{try{await bn(Xe()),T(!0),setTimeout(()=>T(!1),2e3)}catch(e){console.error(`Failed to copy all comments prompt:`,e)}},mr=(0,P.useCallback)((e,t)=>(We({threadId:e,body:t}),Promise.resolve()),[We]),hr=t=>{if(!e)return;let n=zC(t,e.files);n&&yn(n)},gr=(0,P.useCallback)(async(e,t)=>{try{let n=await fetch(`/api/open-in-editor`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:e,line:t,editor:ke.editor})});if(!n.ok){let e=await n.json().catch(()=>null),t=n.statusText;e&&typeof e==`object`&&`error`in e&&typeof e.error==`string`&&(t=e.error),console.error(`Failed to open file in editor:`,t)}}catch(e){console.error(`Failed to open file in editor:`,e)}},[ke.editor]),_r=e=>{yn(null);let t=e.target,n=t.closest(`[data-comment-button="true"]`),r=t.closest(`[data-open-in-editor-button="true"]`);!n&&!r&&vr(e)},vr=e=>{document.querySelectorAll(`form[data-empty="true"]`).forEach(t=>{t.contains(e.target)||t.querySelector(`button[type="button"]`)?.click()})};if(m)return(0,F.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-github-bg-primary`,children:(0,F.jsx)(`div`,{className:`text-github-text-secondary text-base`,children:`Loading diff...`})});if(g)return(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-github-bg-primary px-6 text-center gap-3`,children:[(0,F.jsx)(`h2`,{className:`text-github-danger text-2xl`,children:`Couldn’t load the diff`}),(0,F.jsx)(`pre`,{className:`max-w-2xl max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md border border-github-border bg-github-bg-secondary px-4 py-3 text-left text-xs text-github-text-secondary`,children:g}),(0,F.jsxs)(`p`,{className:`max-w-md text-xs text-github-text-muted`,children:[`If this was an agent turn, its snapshot may have been pruned by`,` `,(0,F.jsx)(`code`,{className:`text-github-text-secondary`,children:`git gc`}),`. Otherwise check that the server is still running.`]}),(0,F.jsx)(`button`,{onClick:()=>{_(null),h(!0),On()},className:`rounded-md border border-github-border px-4 py-1.5 text-sm text-github-text-primary transition-colors hover:bg-github-bg-tertiary`,children:`Retry`})]});if(!z&&(v||Me.length===0))return(0,F.jsx)(Jx,{onOpened:ar});if(!e)return(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2`,children:[(0,F.jsx)(`h2`,{className:`text-github-danger text-2xl mb-2`,children:`No data`}),(0,F.jsx)(`p`,{className:`text-github-text-secondary text-base`,children:`No diff data available`})]});let yr=e.openInEditorAvailable!==!1&&ke.editor.id!==`none`&&ke.editor.command.trim()!==``&&ke.editor.argsTemplate.trim()!==``,br=Lg(Pn,R),xr=e=>R.targetCommitish===e.shortHash||R.targetCommitish===e.hash,Sr=qn.kind===`none`?null:qn.kind===`both`&&br>=0?`turns`:`commits`,Cr=Sr===`turns`?Pn:Sr===`commits`?Yn.commits:[],wr=Sr===`turns`?br:Sr===`commits`?Yn.commits.findIndex(xr):-1,Tr=e=>{let t=Cr[e];t&&(Sr===`turns`?Gn(t):Un(Dg(t.shortHash)))};return(0,F.jsxs)(Bn,{children:[b&&(0,F.jsx)(`div`,{className:`fixed inset-0 z-[60]`,children:(0,F.jsx)(Jx,{onOpened:e=>{x(!1),ar(e)},onClose:()=>x(!1)})}),(0,F.jsxs)(`div`,{className:`h-screen flex flex-col`,onClickCapture:_r,children:[!z&&(0,F.jsx)(Tn,{tabs:Me,activeTabId:Ne,onActivate:e=>void or(e),onClose:B,onNew:()=>x(!0)}),S&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-github-danger/40 bg-github-danger/10 px-3 py-1.5 text-xs text-github-danger`,children:[(0,F.jsx)(`span`,{className:`overflow-hidden text-ellipsis whitespace-nowrap`,children:S}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>C(null),className:`shrink-0 rounded px-1.5 py-0.5 hover:bg-github-danger/20`,children:`Dismiss`})]}),(0,F.jsxs)(`header`,{className:`bg-github-bg-secondary border-b border-github-border flex ${je?`flex-col`:`flex-row items-center`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between w-full ${je?`px-3 py-2 gap-3`:`px-4 py-3 gap-4 w-auto`} ${M?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:je?`100%`:A?`${E}px`:`auto`,minWidth:je?`0px`:A?`200px`:`auto`,maxWidth:je?`none`:A?`600px`:`none`},children:[(0,F.jsx)(`h1`,{children:(0,F.jsx)(m_,{style:{height:`18px`,color:`var(--color-github-text-secondary)`}})}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`button`,{onClick:()=>j(!A),className:`p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors`,title:A?`Collapse file tree`:`Expand file tree`,"aria-expanded":A,"aria-controls":`file-tree-panel`,"aria-label":`Toggle file tree panel`,children:A?(0,F.jsx)(St,{size:18}):(0,F.jsx)(Ct,{size:18})}),(0,F.jsx)(`button`,{onClick:()=>Et.open(),className:`p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors`,title:`Search in diff (Cmd/Ctrl+F)`,children:(0,F.jsx)(kt,{size:18})}),(0,F.jsx)(`button`,{onClick:()=>k(!0),className:`p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors`,title:`Settings`,children:(0,F.jsx)(At,{size:18})})]})]}),!je&&(0,F.jsx)(`div`,{className:`border-r border-github-border ${M?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:A?`4px`:`0px`,height:`calc(100% - 16px)`,margin:`8px 0`,transform:`translateX(-2px)`}}),(0,F.jsxs)(`div`,{className:`flex-1 flex flex-wrap items-center justify-between ${je?`px-3 pb-2 gap-3`:`px-4 py-3 gap-4`}`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center ${je?`gap-2`:`gap-3`}`,children:[!je&&(0,F.jsxs)(`div`,{className:`flex bg-github-bg-tertiary border border-github-border rounded-md p-1`,children:[(0,F.jsxs)(`button`,{onClick:()=>Pt(`split`),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${u===`split`?`bg-github-bg-primary text-github-text-primary shadow-sm`:`text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,F.jsx)($e,{size:14}),`Split`]}),(0,F.jsxs)(`button`,{onClick:()=>Pt(`unified`),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${u===`unified`?`bg-github-bg-primary text-github-text-primary shadow-sm`:`text-github-text-secondary hover:text-github-text-primary`}`,children:[(0,F.jsx)(Nt,{size:14}),`Unified`]})]}),(0,F.jsx)(vn,{checked:f,onChange:p,label:`Ignore Whitespace`,title:f?`Show whitespace changes`:`Ignore whitespace changes`}),!ke.autoReload&&!ur&&(0,F.jsx)(h_,{shouldReload:an,isReloading:cn.isReloading,onReload:on,changeType:cn.lastChangeType,compact:je})]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${je?`gap-3`:`gap-4`}`,children:[!je&&Ve.length>0&&(0,F.jsx)(En,{commentsCount:Ve.length,isCopiedAll:w,onCopyAll:pr,onDeleteAll:Je,onViewAll:()=>ae(!0)}),c.length>0&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1 items-center`,children:[(0,F.jsxs)(`div`,{className:`text-xs relative`,children:[Kt===c.length?`All diffs reviewed!`:`${Kt} / ${c.length} files viewed`,(0,F.jsx)(Kx,{isActive:ee})]}),(0,F.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:(0,F.jsx)(`div`,{className:`absolute top-0 left-0 h-full bg-github-accent transition-all duration-300 ease-out`,style:{width:`${Kt/c.length*100}%`}})})]}),e.repoName&&(0,F.jsxs)(`div`,{className:`hidden items-center gap-2 rounded border border-github-border bg-github-bg-tertiary px-2 py-1 text-sm text-github-text-secondary md:flex`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5`,title:e.repoPath||e.repoName,children:[(0,F.jsx)(ut,{size:14,className:`text-github-text-muted`}),(0,F.jsx)(`span`,{className:`font-medium text-github-text-primary`,children:e.repoName})]}),xe&&(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 border-l border-github-border pl-2`,title:`On branch ${xe}`,children:[(0,F.jsx)(dt,{size:14,className:`text-github-text-muted`}),(0,F.jsx)(`span`,{className:`max-w-[180px] truncate`,children:xe})]})]}),L?(0,F.jsx)(Wg,{options:L,selection:R,navigator:qn,buttonLabel:Xn,isCustomCompare:Jn,turns:Pn,rangeCommits:Yn.commits,sessions:Fn,activeSession:In,onSelectCurrentBranch:()=>{let e=L.branchBase;e?Hn(Eg(e)):I(!0)},onSelectPreset:e=>Hn(e),onSelectTurn:e=>Un(Wn(e),{live:!e.commitAfter}),onSelectCommit:e=>Un(Dg(e.shortHash)),onSelectSession:e=>Ln(e),onClearCustomCompare:()=>{let e=L.branchBase;Hn(e?Eg(e):Og)},onOpenCompare:()=>I(!0)}):(0,F.jsxs)(`span`,{className:`text-xs`,children:[`Reviewing:`,` `,(0,F.jsx)(`code`,{className:`bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary`,children:e.commit.includes(`...`)?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:`text-github-text-secondary font-medium`,children:[e.commit.split(`...`)[0],`...`]}),(0,F.jsx)(`span`,{className:`font-medium`,children:e.commit.split(`...`)[1]})]}):e.commit})]}),(0,F.jsx)(`button`,{onClick:()=>fn(!0),title:`Keyboard shortcuts (Shift+?)`,"aria-label":`Keyboard shortcuts`,className:`flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary`,children:(0,F.jsx)(ht,{size:15})})]})]})]}),(0,F.jsx)(wn,{context:Zn,liveMode:jn,fileCount:er.fileCount,additions:er.additions,deletions:er.deletions,...qn.kind===`none`?{}:{onStepPrev:()=>Tr(wr-1),onStepNext:()=>Tr(wr+1),canStepPrev:wr>0,canStepNext:wr>=0&&wr<Cr.length-1}}),ye&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-github-border bg-github-warning/10 px-4 py-2 text-sm text-github-text-primary`,children:[(0,F.jsx)(`span`,{children:`Showing uncommitted changes. Pick a base to see the full branch diff.`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>I(!0),className:`rounded border border-github-border bg-github-bg-tertiary px-2 py-0.5 text-xs hover:border-github-text-secondary`,children:`Pick a base…`})]}),L&&(0,F.jsx)(v_,{isOpen:oe,onClose:()=>I(!1),options:L,selection:R,resolvedBaseRevision:he,resolvedTargetRevision:_e,onApply:e=>{be(!1),Hn(e)}},oe?gn(R):`closed`),je&&A&&(0,F.jsx)(`button`,{type:`button`,"aria-label":`Close file tree`,className:`fixed inset-0 bg-black/40 z-30`,onClick:()=>j(!1)}),(0,F.jsxs)(`div`,{className:`flex flex-1 overflow-hidden relative`,children:[(0,F.jsx)(`div`,{className:`relative overflow-hidden ${M?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:je?`0px`:A?`${E}px`:`0px`},children:(0,F.jsx)(`aside`,{id:`file-tree-panel`,className:`bg-github-bg-secondary overflow-y-auto flex flex-col ${je?`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:je?`min(85vw, 360px)`:`${E}px`,minWidth:je?`0px`:`200px`,maxWidth:je?`none`:`600px`,height:`100%`,transform:je?A?`translateX(0)`:`translateX(100%)`:void 0},children:(0,F.jsx)(`div`,{className:`flex-1 overflow-y-auto`,children:(0,F.jsx)(f_,{files:c,allFiles:e.files,filter:i,onFilterChange:o,onScrollToFile:Tt,onFileSelected:je?Mt:void 0,comments:Jt,reviewedFiles:pt,onToggleReviewed:Dt,selectedFileIndex:ln?.fileIndex??null,grouping:$n.state.result,groupingMode:$n.mode,groupingStatus:$n.state.status,fileCount:e.files.length,onSelectMode:$n.select,onReorganize:$n.reorganize})})})}),!je&&(0,F.jsx)(`div`,{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${M?``:`!transition-all !duration-300 !ease-in-out`}`,style:{width:A?`4px`:`0px`},onMouseDown:Dn,title:`Drag to resize file list`}),(0,F.jsxs)(`div`,{className:`relative flex flex-1 flex-col min-w-0`,children:[(0,F.jsx)(Ci,{search:Et}),(0,F.jsxs)(`main`,{ref:ue,className:`flex-1 overflow-y-auto ${Ze?`pb-16`:``}`,children:[c.length===0&&(e.diffError?(0,F.jsxs)(`div`,{className:`flex h-full min-h-[300px] flex-col items-center justify-center px-6 text-center`,children:[(0,F.jsx)(`p`,{className:`text-lg font-medium text-github-danger`,children:`Couldn’t load this diff`}),(0,F.jsx)(`p`,{className:`mt-1 max-w-md text-sm text-github-text-muted`,children:e.diffError}),(0,F.jsxs)(`p`,{className:`mt-2 text-xs text-github-text-muted`,children:[`If this is an agent turn, its snapshot may have been pruned by`,` `,(0,F.jsx)(`code`,{className:`text-github-text-secondary`,children:`git gc`}),`. Pick another source from the selector.`]})]}):e.files.length>0&&Qg(i)?(0,F.jsxs)(`div`,{className:`flex h-full min-h-[300px] flex-col items-center justify-center px-6 text-center`,children:[(0,F.jsx)(`p`,{className:`text-lg font-medium text-github-text-primary`,children:`No files match the current filters`}),(0,F.jsxs)(`p`,{className:`mt-1 text-sm text-github-text-muted`,children:[e.files.length,` changed file`,e.files.length===1?``:`s`,` `,`hidden by your filters.`]}),(0,F.jsx)(`button`,{onClick:s,className:`mt-3 rounded-md border border-github-border px-3 py-1.5 text-sm text-github-text-secondary transition-colors hover:bg-github-bg-tertiary hover:text-github-text-primary`,children:`Clear filters`})]}):(0,F.jsxs)(`div`,{className:`flex h-full min-h-[300px] flex-col items-center justify-center px-6 text-center`,children:[(0,F.jsx)(`p`,{className:`text-lg font-medium text-github-text-primary`,children:`No changes`}),(0,F.jsx)(`p`,{className:`mt-1 text-sm text-github-text-muted`,children:jn||Pn.some(e=>e.commitAfter!=null&&e.commitBefore===R.baseCommitish&&e.commitAfter===R.targetCommitish)?`This turn produced no file changes.`:`Nothing to show for this selection.`})]})),nr.map((t,r)=>{let i=Xt.get(t.path)??iw,a=HC(Ht,n,t.path)??aw,o=yt.has(t.path);return(0,F.jsx)(`div`,{id:sC(t.path),"data-file-path":t.path,"data-rendered":o?`true`:`false`,ref:e=>wt(t.path,e),className:`mb-6`,children:o?(0,F.jsx)(Tg,{file:t,threads:i,showAuthorBadges:Yt,diffMode:u,reviewedFiles:pt,isChangedSinceViewed:mt.has(t.path),onToggleReviewed:Dt,collapsedFiles:se,onToggleCollapsed:Ot,onToggleAllCollapsed:jt,onAddComment:fr,onGenerateThreadPrompt:Cn,onRemoveThread:Ge,onReplyToThread:mr,onRemoveMessage:Ke,onUpdateMessage:qe,onOpenInEditor:yr?gr:void 0,syntaxTheme:ke.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:ln?.fileIndex===r?ln:null,fileIndex:r,onLineClick:xn,commentTrigger:Zt?.fileIndex===r?Zt:null,onCommentTriggerHandled:Sn,mergedChunks:a,expandLines:It,expandAllBetweenChunks:Lt,prefetchFileContent:Rt,isExpandLoading:Ft,diffVersion:n}):(0,F.jsx)(`div`,{className:`bg-github-bg-secondary border border-github-border rounded-md px-4 py-3`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-github-text-muted`,children:`Deferred Rendering`}),(0,F.jsx)(`div`,{className:`text-sm font-mono text-github-text-primary truncate`,children:t.path})]}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>bt(t.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`})]})})},t.path)})]})]})]}),Ze&&(0,F.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:(0,F.jsx)(En,{commentsCount:Ve.length,isCopiedAll:w,onCopyAll:pr,onDeleteAll:Je,onViewAll:()=>ae(!0),direction:`up`,compact:!0})}),O&&(0,F.jsx)(Wx,{isOpen:O,onClose:()=>k(!1),settings:ke,onSettingsChange:Ae}),(0,F.jsx)(p_,{isOpen:un,onClose:()=>fn(!1)}),(0,F.jsx)(Si,{isOpen:ie,onClose:()=>ae(!1),onNavigate:hr,comments:Jt,showAuthorBadges:Yt,onRemoveThread:Ge,onGenerateThreadPrompt:Cn,onReplyToThread:mr,onRemoveMessage:Ke,onUpdateMessage:qe,syntaxTheme:ke.syntaxTheme})]})]})}var vw=document.getElementById(`root`);if(!vw)throw Error(`Root element not found`);te.createRoot(vw).render((0,F.jsx)(P.StrictMode,{children:(0,F.jsx)(Te,{initiallyActiveScopes:[`navigation`],children:(0,F.jsx)(_w,{})})}));export{o as n,l as r,Hr as t};
|