@marimo-team/frontend 0.19.8-dev27 → 0.19.8-dev31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/assets/{JsonOutput-C_t8B-xQ.js → JsonOutput-BUok9dqY.js} +10 -10
  2. package/dist/assets/{add-cell-with-ai-DTMAOlkD.js → add-cell-with-ai-J44RQi7o.js} +1 -1
  3. package/dist/assets/{agent-panel-BQWRqcBj.js → agent-panel-Cf8Ij8-7.js} +1 -1
  4. package/dist/assets/{cell-editor-C4bhmN3u.js → cell-editor-DqRAVfCm.js} +1 -1
  5. package/dist/assets/{chat-display-Dedd6zEp.js → chat-display-ChS1NL3o.js} +1 -1
  6. package/dist/assets/chat-panel-Duk4139r.js +3 -0
  7. package/dist/assets/{column-preview-IX0-zOoY.js → column-preview-BUTci9vI.js} +1 -1
  8. package/dist/assets/{command-palette-BaX0f9YY.js → command-palette-BBecgDwg.js} +1 -1
  9. package/dist/assets/{edit-page-BFy7-9nT.js → edit-page-CZzL95NE.js} +3 -3
  10. package/dist/assets/{file-explorer-panel-F8-eoh69.js → file-explorer-panel-BqVToUzC.js} +1 -1
  11. package/dist/assets/{hooks-Bgh-jwSl.js → hooks-STSuFYve.js} +1 -1
  12. package/dist/assets/{index-B-JW_HH0.js → index-CQLP3a6_.js} +3 -3
  13. package/dist/assets/index-GcHhnSIR.css +2 -0
  14. package/dist/assets/{layout-GyIOuVm5.js → layout-DWzvYkJc.js} +1 -1
  15. package/dist/assets/markdown-renderer-Dotqbx_q.js +10 -0
  16. package/dist/assets/{panels-D-kXh5nx.js → panels-DkQNKTXx.js} +1 -1
  17. package/dist/assets/{run-page-DjwqTE-H.js → run-page-CyMNZt0d.js} +1 -1
  18. package/dist/assets/{scratchpad-panel-CWiPnU_2.js → scratchpad-panel-eznTRPdo.js} +1 -1
  19. package/dist/assets/{session-panel-Wc77QQAX.js → session-panel-BCN5AHky.js} +1 -1
  20. package/dist/assets/{useNotebookActions-sLQZ6EH9.js → useNotebookActions-wEv3D5Ih.js} +1 -1
  21. package/dist/assets/{utilities.esm-D4qckmuF.js → utilities.esm-OH_d3CNC.js} +1 -1
  22. package/dist/index.html +8 -8
  23. package/package.json +2 -2
  24. package/src/components/chat/chat-panel.tsx +33 -13
  25. package/dist/assets/chat-panel-Wa5eI-d0.js +0 -3
  26. package/dist/assets/index-3CaNzO41.css +0 -2
  27. package/dist/assets/markdown-renderer-Bfr8vdW8.js +0 -10
@@ -1,10 +0,0 @@
1
- import{s as A}from"./chunk-LvLJmgfZ.js";import{u as ne}from"./useEvent-BhXAndur.js";import{t as re}from"./react-Bj1aDYRI.js";import{Mt as ae,w as ie,wt as oe}from"./cells-CiFhRLUd.js";import{t as q}from"./compiler-runtime-B3qBwwSJ.js";import{o as le}from"./utils-YqBXNpsM.js";import{t as se}from"./jsx-runtime-ZmTK25f3.js";import{t as D}from"./button-CZ3Cs4qb.js";import{at as ue}from"./dist-DBwNzi3C.js";import{t as ce}from"./createLucideIcon-BCdY6lG5.js";import{n as he,t as me}from"./LazyAnyLanguageCodeMirror-BqosdyZU.js";import{r as pe}from"./useTheme-CTORu22_.js";import{t as fe}from"./copy-BaRrAFL-.js";import{c as v,d as de,f as ge,g as xe,h as ye,l as we,m as T,o as ve,p as ke,s as N}from"./chunk-5FQGJX7Z-T2jyw7ZD.js";import{c as P}from"./katex-CbllUrnh.js";import{r as be}from"./html-to-image-BKGhRUqR.js";import{o as Fe}from"./focus-CtXToHnV.js";var Ne=ce("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ce=q(),b=A(re(),1),I={};function Te(e){let t=(0,Ce.c)(5),[r,n]=(0,b.useState)(I[e]??!1),a;t[0]===e?a=t[1]:(a=o=>{n(o),I[e]=o},t[0]=e,t[1]=a);let i;return t[2]!==r||t[3]!==a?(i=[r,a],t[2]=r,t[3]=a,t[4]=i):i=t[4],i}function Ee(e){return e==null||e.data==null||e.data===""}function Se(e,t){return`data:${t};base64,${e}`}function je(e){return e.startsWith("data:")&&e.includes(";base64,")}function Me(e){return e.split(",")[1]}function _(e){let t=window.atob(e);return Uint8Array.from(t,r=>r.charCodeAt(0))}function z(e){let t=_(e);return new DataView(t.buffer)}function $e(e){let t=Array.from(e,r=>String.fromCharCode(r));return window.btoa(t.join(""))}function Ae(e){return $e(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function qe(e){return(e.buffers??[]).map(z)}function De(e,t){return B(e,t||{})||{type:"root",children:[]}}function B(e,t){let r=Pe(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function Pe(e,t){switch(e.nodeType){case 1:return Be(e,t);case 3:return _e(e);case 8:return ze(e);case 9:return O(e,t);case 10:return Ie();case 11:return O(e,t);default:return}}function O(e,t){return{type:"root",children:V(e,t)}}function Ie(){return{type:"doctype"}}function _e(e){return{type:"text",value:e.nodeValue||""}}function ze(e){return{type:"comment",value:e.nodeValue||""}}function Be(e,t){let r=e.namespaceURI,n=r===T.svg?xe:ye,a=r===T.html?e.tagName.toLowerCase():e.tagName,i=r===T.html&&a==="template"?e.content:e,o=e.getAttributeNames(),s={},l=-1;for(;++l<o.length;)s[o[l]]=e.getAttribute(o[l])||"";return n(a,s,V(i,t))}function V(e,t){let r=e.childNodes,n=[],a=-1;for(;++a<r.length;){let i=B(r[a],t);i!==void 0&&n.push(i)}return n}var Oe=new DOMParser;function Ve(e,t){return De(t!=null&&t.fragment?Le(e):Oe.parseFromString(e,"text/html"))}function Le(e){let t=document.createElement("template");return t.innerHTML=e,t.content}const L=(function(e,t,r){let n=ke(r);if(!e||!e.type||!e.children)throw Error("Expected parent node");if(typeof t=="number"){if(t<0||t===1/0)throw Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]}),k=(function(e){if(e==null)return We;if(typeof e=="string")return Ue(e);if(typeof e=="object")return Re(e);if(typeof e=="function")return E(e);throw Error("Expected function, string, or array as `test`")});function Re(e){let t=[],r=-1;for(;++r<e.length;)t[r]=k(e[r]);return E(n);function n(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Ue(e){return E(t);function t(r){return r.tagName===e}}function E(e){return t;function t(r,n,a){return!!(He(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function We(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function He(e){return typeof e=="object"&&!!e&&"type"in e&&"tagName"in e}var R=/\n/g,U=/[\t ]+/g,S=k("br"),W=k(et),Ke=k("p"),H=k("tr"),Qe=k(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Ze,tt]),K=k("address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp".split("."));function Xe(e,t){let r=t||{},n="children"in e?e.children:[],a=K(e),i=G(e,{whitespace:r.whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...X(e,{whitespace:i,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<n.length;)o.push(...Q(n[s],e,{whitespace:i,breakBefore:s?void 0:a,breakAfter:s<n.length-1?S(n[s+1]):a}));let l=[],h;for(s=-1;++s<o.length;){let m=o[s];typeof m=="number"?h!==void 0&&m>h&&(h=m):m&&(h!==void 0&&h>-1&&l.push(`
2
- `.repeat(h)||" "),h=-1,l.push(m))}return l.join("")}function Q(e,t,r){return e.type==="element"?Ge(e,t,r):e.type==="text"?r.whitespace==="normal"?X(e,r):Je(e):[]}function Ge(e,t,r){let n=G(e,r),a=e.children||[],i=-1,o=[];if(Qe(e))return o;let s,l;for(S(e)||H(e)&&L(t,e,H)?l=`
3
- `:Ke(e)?(s=2,l=2):K(e)&&(s=1,l=1);++i<a.length;)o=o.concat(Q(a[i],e,{whitespace:n,breakBefore:i?void 0:s,breakAfter:i<a.length-1?S(a[i+1]):l}));return W(e)&&L(t,e,W)&&o.push(" "),s&&o.unshift(s),l&&o.push(l),o}function X(e,t){let r=String(e.value),n=[],a=[],i=0;for(;i<=r.length;){R.lastIndex=i;let l=R.exec(r),h=l&&"index"in l?l.index:r.length;n.push(Ye(r.slice(i,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),i===0?t.breakBefore:!0,h===r.length?t.breakAfter:!0)),i=h+1}let o=-1,s;for(;++o<n.length;)n[o].charCodeAt(n[o].length-1)===8203||o<n.length-1&&n[o+1].charCodeAt(0)===8203?(a.push(n[o]),s=void 0):n[o]?(typeof s=="number"&&a.push(s),a.push(n[o]),s=0):(o===0||o===n.length-1)&&a.push(0);return a}function Je(e){return[String(e.value)]}function Ye(e,t,r){let n=[],a=0,i;for(;a<e.length;){U.lastIndex=a;let o=U.exec(e);i=o?o.index:e.length,!a&&!i&&o&&!t&&n.push(""),a!==i&&n.push(e.slice(a,i)),a=o?i+o[0].length:i}return a!==i&&!r&&n.push(""),n.join(" ")}function G(e,t){if(e.type==="element"){let r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap";default:}}return t.whitespace}function Ze(e){return!!(e.properties||{}).hidden}function et(e){return e.tagName==="td"||e.tagName==="th"}function tt(e){return e.tagName==="dialog"&&!(e.properties||{}).open}var nt={},rt=[];function at(e){let t=e||nt;return function(r,n){ge(r,"element",function(a,i){let o=Array.isArray(a.properties.className)?a.properties.className:rt,s=o.includes("language-math"),l=o.includes("math-display"),h=o.includes("math-inline"),m=l;if(!s&&!l&&!h)return;let p=i[i.length-1],d=a;if(a.tagName==="code"&&s&&p&&p.type==="element"&&p.tagName==="pre"&&(d=p,p=i[i.length-2],m=!0),!p)return;let f=Xe(d,{whitespace:"pre"}),u;try{u=P.renderToString(f,{...t,displayMode:m,throwOnError:!0})}catch(w){let F=w,c=F.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...i,a],cause:F,place:a.position,ruleId:c,source:"rehype-katex"});try{u=P.renderToString(f,{...t,displayMode:m,strict:"ignore",throwOnError:!1})}catch{u=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(w)},children:[{type:"text",value:f}]}]}}typeof u=="string"&&(u=Ve(u,{fragment:!0}).children);let g=p.children.indexOf(d);return p.children.splice(g,1,...u),de})}}function it(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:i},exit:{mathFlow:a,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:s,mathText:o,mathTextData:s}};function e(l){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},l)}function t(){this.buffer()}function r(){let l=this.resume(),h=this.stack[this.stack.length-1];h.type,h.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(l){let h=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),m=this.stack[this.stack.length-1];m.type,this.exit(l),m.value=h;let p=m.data.hChildren[0];p.type,p.tagName,p.children.push({type:"text",value:h}),this.data.mathFlowInside=void 0}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function o(l){let h=this.resume(),m=this.stack[this.stack.length-1];m.type,this.exit(l),m.value=h,m.data.hChildren.push({type:"text",value:h})}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function ot(e){let t=(e||{}).singleDollarTextMath;return t??(t=!0),n.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
4
- `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(i,o,s,l){let h=i.value||"",m=s.createTracker(l),p="$".repeat(Math.max(we(h,"$")+1,2)),d=s.enter("mathFlow"),f=m.move(p);if(i.meta){let u=s.enter("mathFlowMeta");f+=m.move(s.safe(i.meta,{after:`
5
- `,before:f,encode:["$"],...m.current()})),u()}return f+=m.move(`
6
- `),h&&(f+=m.move(h+`
7
- `)),f+=m.move(p),d(),f}function n(i,o,s){let l=i.value||"",h=1;for(t||h++;RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(l);)h++;let m="$".repeat(h);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let p=-1;for(;++p<s.unsafe.length;){let d=s.unsafe[p];if(!d.atBreak)continue;let f=s.compilePattern(d),u;for(;u=f.exec(l);){let g=u.index;l.codePointAt(g)===10&&l.codePointAt(g-1)===13&&g--,l=l.slice(0,g)+" "+l.slice(u.index+1)}}return m+l+m}function a(){return"$"}}const lt={tokenize:st,concrete:!0,name:"mathFlow"};var J={tokenize:ut,partial:!0};function st(e,t,r){let n=this,a=n.events[n.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return s;function s(c){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(c)}function l(c){return c===36?(e.consume(c),o++,l):o<2?r(c):(e.exit("mathFlowFenceSequence"),N(e,h,"whitespace")(c))}function h(c){return c===null||v(c)?p(c):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(c))}function m(c){return c===null||v(c)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),p(c)):c===36?r(c):(e.consume(c),m)}function p(c){return e.exit("mathFlowFence"),n.interrupt?t(c):e.attempt(J,d,w)(c)}function d(c){return e.attempt({tokenize:F,partial:!0},w,f)(c)}function f(c){return(i?N(e,u,"linePrefix",i+1):u)(c)}function u(c){return c===null?w(c):v(c)?e.attempt(J,d,w)(c):(e.enter("mathFlowValue"),g(c))}function g(c){return c===null||v(c)?(e.exit("mathFlowValue"),u(c)):(e.consume(c),g)}function w(c){return e.exit("mathFlow"),t(c)}function F(c,Z,j){let M=0;return N(c,ee,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function ee(y){return c.enter("mathFlowFence"),c.enter("mathFlowFenceSequence"),$(y)}function $(y){return y===36?(M++,c.consume(y),$):M<o?j(y):(c.exit("mathFlowFenceSequence"),N(c,te,"whitespace")(y))}function te(y){return y===null||v(y)?(c.exit("mathFlowFence"),Z(y)):j(y)}}}function ut(e,t,r){let n=this;return a;function a(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function ct(e){let t=(e||{}).singleDollarTextMath;return t??(t=!0),{tokenize:r,resolve:ht,previous:mt,name:"mathText"};function r(n,a,i){let o=0,s,l;return h;function h(u){return n.enter("mathText"),n.enter("mathTextSequence"),m(u)}function m(u){return u===36?(n.consume(u),o++,m):o<2&&!t?i(u):(n.exit("mathTextSequence"),p(u))}function p(u){return u===null?i(u):u===36?(l=n.enter("mathTextSequence"),s=0,f(u)):u===32?(n.enter("space"),n.consume(u),n.exit("space"),p):v(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),p):(n.enter("mathTextData"),d(u))}function d(u){return u===null||u===32||u===36||v(u)?(n.exit("mathTextData"),p(u)):(n.consume(u),d)}function f(u){return u===36?(n.consume(u),s++,f):s===o?(n.exit("mathTextSequence"),n.exit("mathText"),a(u)):(l.type="mathTextData",d(u))}}}function ht(e){let t=e.length-4,r=3,n,a;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)a===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(a=n):(n===t||e[n][1].type==="lineEnding")&&(e[a][1].type="mathTextData",n!==a+2&&(e[a][1].end=e[n-1][1].end,e.splice(a+2,n-a-2),t-=n-a-2,n=a+2),a=void 0);return e}function mt(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function pt(e){return{flow:{36:lt},text:{36:ct(e)}}}var ft={};function dt(e){let t=this,r=e||ft,n=t.data(),a=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);a.push(pt(r)),i.push(it()),o.push(ot(r))}function gt(e={}){return{name:"katex",type:"math",remarkPlugin:[dt,{singleDollarTextMath:e.singleDollarTextMath??!1}],rehypePlugin:[at,{errorColor:e.errorColor??"var(--color-muted-foreground)"}],getStyles(){return"katex/dist/katex.min.css"}}}var xt=gt(),C=q(),x=A(se(),1),yt=[ue.lineWrapping],wt=new Set(["python","markdown","sql","json","yaml","toml","shell","javascript","typescript","jsx","tsx","css","html"]);function vt(e,t){return e?e==="python"?{language:e,code:t}:e==="sql"?{language:"python",code:oe.fromQuery(t)}:e==="markdown"?{language:"python",code:ae.fromMarkdown(t)}:e==="shell"||e==="bash"?{language:"python",code:`import subprocess
8
- subprocess.run("${t}")`}:{language:"python",code:`_${e} = """
9
- ${t}
10
- """`}:{language:"python",code:t}}var kt=e=>{let t=(0,C.c)(9),{code:r,language:n}=e,{createNewCell:a}=ie(),i=Fe(),o=ne(le),s;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==i?(s=()=>{let p=vt(n,r);n==="sql"&&be({autoInstantiate:o,createNewCell:a,fromCellId:i}),a({code:p.code,before:!1,cellId:i??"__end__"})},t[0]=o,t[1]=r,t[2]=a,t[3]=n,t[4]=i,t[5]=s):s=t[5];let l=s,h;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,x.jsx)(he,{className:"ml-2 h-4 w-4"}),t[6]=h):h=t[6];let m;return t[7]===l?m=t[8]:(m=(0,x.jsxs)(D,{size:"xs",variant:"outline",onClick:l,children:["Add to Notebook",h]}),t[7]=l,t[8]=m),m},bt=e=>{let t=(0,C.c)(17),{code:r,language:n}=e,{theme:a}=pe(),[i,o]=(0,b.useState)(r);i!==r&&o(r);let s;t[0]===i?s=t[1]:(s=async()=>{await fe(i)},t[0]=i,t[1]=s);let l=s,h=a==="dark"?"dark":"light",m=n&&wt.has(n)?n:void 0,p;t[2]!==h||t[3]!==m||t[4]!==i?(p=(0,x.jsx)(b.Suspense,{children:(0,x.jsx)(me,{theme:h,language:m,className:"cm border rounded overflow-hidden",extensions:yt,value:i,onChange:o})}),t[2]=h,t[3]=m,t[4]=i,t[5]=p):p=t[5];let d;t[6]===l?d=t[7]:(d=(0,x.jsx)(Ft,{size:"xs",variant:"outline",onClick:l,children:"Copy"}),t[6]=l,t[7]=d);let f;t[8]!==n||t[9]!==i?(f=(0,x.jsx)(kt,{code:i,language:n}),t[8]=n,t[9]=i,t[10]=f):f=t[10];let u;t[11]!==d||t[12]!==f?(u=(0,x.jsxs)("div",{className:"flex justify-end mt-2 space-x-2",children:[d,f]}),t[11]=d,t[12]=f,t[13]=u):u=t[13];let g;return t[14]!==p||t[15]!==u?(g=(0,x.jsxs)("div",{className:"relative",children:[p,u]}),t[14]=p,t[15]=u,t[16]=g):g=t[16],g},Ft=e=>{let t=(0,C.c)(9),r,n;t[0]===e?(r=t[1],n=t[2]):({onClick:r,...n}=e,t[0]=e,t[1]=r,t[2]=n);let[a,i]=(0,b.useState)(!1),o;t[3]===r?o=t[4]:(o=h=>{r==null||r(h),i(!0),setTimeout(()=>i(!1),1e3)},t[3]=r,t[4]=o);let s=a?"Copied":"Copy",l;return t[5]!==n||t[6]!==o||t[7]!==s?(l=(0,x.jsx)(D,{...n,onClick:o,children:s}),t[5]=n,t[6]=o,t[7]=s,t[8]=l):l=t[8],l},Nt={code:({children:e,className:t})=>{let r=t==null?void 0:t.replace("language-","");if(r&&typeof e=="string"){let n=e.trim();return(0,x.jsxs)("div",{children:[(0,x.jsx)("div",{className:"text-xs text-muted-foreground pl-1",children:r}),(0,x.jsx)(bt,{code:n,language:r})]})}return(0,x.jsx)("code",{className:t,children:e})}};const Y=(0,b.memo)(e=>{let t=(0,C.c)(3),{content:r}=e,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={math:xt},t[0]=n):n=t[0];let a;return t[1]===r?a=t[2]:(a=(0,x.jsx)(ve,{components:Nt,plugins:n,className:"mo-markdown-renderer",children:r}),t[1]=r,t[2]=a),a});Y.displayName="MarkdownRenderer";export{Ae as a,qe as c,Ne as d,_ as i,Ee as l,Se as n,Me as o,z as r,je as s,Y as t,Te as u};