import{r as l,a6 as M,j as a,l as k,a7 as p,k as w,I as L,a8 as T,a9 as j,t as E,s as O,H as _,aa as N,ab as S,ac as B,ad as P}from"./vendor-b663d29a.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))c(t);new MutationObserver(t=>{for(const n of t)if(n.type==="childList")for(const i of n.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&c(i)}).observe(document,{childList:!0,subtree:!0});function o(t){const n={};return t.integrity&&(n.integrity=t.integrity),t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?n.credentials="include":t.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function c(t){if(t.ep)return;t.ep=!0;const n=o(t);fetch(t.href,n)}})();const R="_markdown_40u5t_1",q={markdown:R},I="_syntax_cr44n_25",z={syntax:I},H=e=>{const r=l.useRef(null);l.useEffect(function(){e.language&&M.highlightElement(r.current)},[e.language,e.children]);const o=e.language?"language-"+e.language:"";return a.jsxs("div",{className:k("relative overflow-hidden flex p-2",z.syntax,{highlighter:e.language},e.className),children:[a.jsxs("div",{className:"!absolute right-3 top-1",children:[e.buttons,e.copyButton!==!1&&a.jsx(A,{children:e.children})]}),a.jsx("div",{className:"flex-1 max-w-full overflow-auto",children:a.jsx("pre",{children:a.jsx("code",{ref:r,className:o,children:e.children})})})]})},A=e=>{const[r,o]=l.useState("复制"),c=l.useRef(-1),t=l.useCallback(function(){e.children&&(p(e.children),o("复制成功"))},[e.children]),n=l.useCallback(function(){c.current=setTimeout(()=>{o("复制")},300)},[]),i=l.useCallback(function(){clearTimeout(c.current)},[]);return a.jsx(w,{title:a.jsx("div",{onMouseLeave:n,onMouseEnter:i,children:r}),onMouseLeave:n,onMouseEnter:i,children:a.jsx(L,{onClick:t,children:a.jsx(T,{fontSize:"small"})})})},d=new j(window,acquireVsCodeApi());var b;(e=>{function r(s){d.unregisterMethod(s)}e.unregisterMethod=r;function o(s,...u){return d.invoke(s,u)}e.invoke=o;function c(s,...u){return d.invoke("executeCommand",[s,...u])}e.invokeCommand=c;function t(s){return d.registerMethod(s)}e.registerMethod=t;const n=new Map;function i(s,...u){u.forEach(m=>{const h=n.get(m)||[];h.push(s),n.set(m,h),n.size>1});const g={name:"callback",func(m){Array.from(n.keys()).forEach(y=>{const v=E(m,y);v&&(n.get(y)||[]).forEach(C=>{C(v,y)})})}};return d.registerMethod(g),()=>{}}e.registerCallback=i})(b||(b={}));function K(e){return __pageData[e]}const U=O(_)({color:"var(--vscode-editor-foreground)",opacity:.7,"&.Mui-selected":{color:"var(--vscode-editor-foreground)"}}),V={"--vscode-focusBorder":"#0078d4"};var f;(e=>{function r(t,n){return getComputedStyle(document.documentElement).getPropertyValue(t)||n||V[t]}e.getColor=r;function o(){return document.body.classList.contains("vscode-dark")?"dark":"light"}e.getMode=o;function c(t){return(()=>{const i=function(u){u.forEach(function(g){g.type==="attributes"&&g.attributeName==="class"&&t(o())})},s=new MutationObserver(i);return s.observe(document.body,{attributes:!0,attributeFilter:["class"]}),{removeListener(){s.disconnect()}}})()}e.addChangeListen=c})(f||(f={}));function x(e){return P({palette:{mode:e,primary:{main:f.getColor("--vscode-focusBorder")}},components:{MuiTypography:{styleOverrides:{root:{fontSize:"1em"}}},MuiButton:{defaultProps:{size:"small"}},MuiTabs:{styleOverrides:{root:{borderColor:e==="dark"?"rgba(255,255,255,.12)":"rgba(0,0,0,.12)"}}}}})}function $(e){const[r,o]=l.useState(x(f.getMode()));return l.useEffect(()=>f.addChangeListen(t=>{o(x(t))}).removeListener,[]),a.jsx(B,{theme:r,children:e.children})}function G(e){N.createRoot(document.getElementById("root")).render(a.jsx(S.StrictMode,{children:e.children}))}export{$ as L,H as S,U as T,G as a,K as g,b as r,q as s};
