import{l as m}from"./logger.js";import{b as n,j as e,r as t,d as o,u as c,C as d,e as p,A as l}from"./utils.js";import{e as u}from"./index.js";import"./index2.js";import"./SettingsForm.js";import{l as w}from"./lowCodeApi.js";import"./SaveOutlined.js";import"./preload-helper.js";import"./FormOutlined.js";import"./LowCode2.js";const x=()=>{const[i,s]=t.useState(null),a=t.useCallback(async()=>{try{await o.init(),window.$editorContext={$utils:c,$ga:o,$chrome:o.chrome};const r=await w();s(r)}catch(r){m.error("lowcode-preview init error",r)}},[]);return t.useEffect(()=>{a()},[]),e.jsx(d,{theme:{token:{colorPrimary:p}},children:e.jsx(l,{children:i&&e.jsx(u,{tree:i})})})};n.createRoot(document.getElementById("root")).render(e.jsx(x,{}));
