const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../css/frontend-openapi-swagger.DfAFjc7U.css"])))=>i.map(i=>d[i]);
import{t as e}from"./preload-helper.CV77j2BA.js";var t={"viewer-3d":()=>e(()=>import(`./frontend-viewer-3d.2ed1gkdW.js`),[],import.meta.url),"openapi-swagger":()=>e(()=>import(`./frontend-openapi-swagger.kauCDZLe.js`),__vite__mapDeps([0]),import.meta.url),asciicast:()=>e(()=>import(`./frontend-asciicast.dF-4gV37.js`),[],import.meta.url)},n=class{constructor(e,t,n,r){this.cachedBytes=null,this.cachedString=null,this.container=e,this.treePath=t,this.rawEncoding=n,this.rawString=r}decodeBase64(){return Uint8Array.from(atob(this.rawString),e=>e.charCodeAt(0))}contentBytes(){return this.cachedBytes===null&&(this.cachedBytes=this.rawEncoding===`base64`?this.decodeBase64():new TextEncoder().encode(this.rawString)),this.cachedBytes}contentString(){return this.cachedString===null&&(this.cachedString=this.rawEncoding===`base64`?new TextDecoder(`utf-8`).decode(this.decodeBase64()):this.rawString),this.cachedString}};async function r(){let e=document.querySelector(`#frontend-render-viewer`),r=e.getAttribute(`data-frontend-renders`).split(` `),i=e.getAttribute(`data-file-tree-path`);e.setAttribute(`data-window-origin`,window.origin);let a=document.querySelector(`#frontend-render-data`);a.remove();let o=a.value,s=new n(e,i,a.getAttribute(`data-content-encoding`),o),c=``,l=!1;for(let e of r){if(!(e in t))continue;let n=await t[e]();if(c=e,l=await n.frontendRender(s),l)break}c?l?e.setAttribute(`data-frontend-render-name`,c):e.textContent=`Failed to render by ${c}`:e.textContent=`No frontend render plugin found for this file, but backend declares that there must be one, there must be a bug`}r();
//# sourceMappingURL=external-render-frontend.CDyw1akG.js.map