(()=>{"use strict";var t={15:function(t,e,n){var r,o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||(r=function(t){return r=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},r(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=r(t),a=0;a<n.length;a++)"default"!==n[a]&&o(e,t,n[a]);return i(e,t),e});Object.defineProperty(e,"__esModule",{value:!0}),e.activate=function(t){t.subscriptions.push(c.lm.registerTool("renderMermaidDiagram",{invoke:async(t,e)=>function(t){const e=new c.LanguageModelToolResult([new c.LanguageModelTextPart(t)]);return e.toolResultDetails2={mime:l,value:(new TextEncoder).encode(t)},e}(t.input.markup)})),t.subscriptions.push(c.chat.registerChatOutputRenderer(s,{async renderChatOutput({value:e},n,r,o){const i=(new TextDecoder).decode(e),a=c.Uri.joinPath(t.extensionUri,"chat-webview-out");n.options={enableScripts:!0,localResourceRoots:[a]};const s=(0,u.generateUuid)(),l=c.Uri.joinPath(a,"index.js");var d;n.html=`\n\t\t\t\t\t<!DOCTYPE html>\n\t\t\t\t\t<html lang="en">\n\n\t\t\t\t\t<head>\n\t\t\t\t\t\t<meta charset="UTF-8">\n\t\t\t\t\t\t<meta name="viewport" content="width=device-width, initial-scale=1.0">\n\t\t\t\t\t\t<title>Mermaid Diagram</title>\n\t\t\t\t\t\t<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src ${n.cspSource} 'nonce-${s}'; style-src 'self' 'unsafe-inline';" />\n\t\t\t\t\t</head>\n\n\t\t\t\t\t<body>\n\t\t\t\t\t\t<pre class="mermaid">\n\t\t\t\t\t\t\t${d=i,d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}\n\t\t\t\t\t\t</pre>\n\n\t\t\t\t\t\t<script type="module" nonce="${s}" src="${n.asWebviewUri(l)}"><\/script>\n\t\t\t\t\t</body>\n\t\t\t\t\t</html>`}}))};const c=a(n(398)),u=n(639),s="vscode.chatMermaidDiagram",l="text/vnd.mermaid"},398:t=>{t.exports=require("vscode")},639:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=function(){if("function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto)();const t=new Uint8Array(16),e=[];for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));crypto.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128;let n=0,r="";return r+=e[t[n++]],r+=e[t[n++]],r+=e[t[n++]],r+=e[t[n++]],r+="-",r+=e[t[n++]],r+=e[t[n++]],r+="-",r+=e[t[n++]],r+=e[t[n++]],r+="-",r+=e[t[n++]],r+=e[t[n++]],r+="-",r+=e[t[n++]],r+=e[t[n++]],r+=e[t[n++]],r+=e[t[n++]],r+=e[t[n++]],r+=e[t[n++]],r}}},e={},n=function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}(15),r=exports;for(var o in n)r[o]=n[o];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
//# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/e0b7a2bcf575cfba10528c4e7c10bd3ce2d7769a/extensions/mermaid-chat-features/dist/extension.js.map