var O=Object.defineProperty;var P=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var C=(o,e,t)=>e in o?O(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,g=(o,e)=>{for(var t in e||(e={}))V.call(e,t)&&C(o,t,e[t]);if(P)for(var t of P(e))W.call(e,t)&&C(o,t,e[t]);return o};var f=(o,e,t)=>new Promise((_,i)=>{var l=n=>{try{r(t.next(n))}catch(c){i(c)}},a=n=>{try{r(t.throw(n))}catch(c){i(c)}},r=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,a);r((t=t.apply(o,e)).next())});import{useRoute as z}from"./vue-router-BfFk43nw.js";import{w as I}from"./@vueuse-DmJSJ3Sc.js";import{O as J,k as U,R as j,b as D,d as E,i as G,w as k}from"./Editor-BuEQalqM-DucWgUTD.js";import"./element-plus-MdtkBKvq.js";import"./vxe-mp8c2cud.js";import{E as K,a as v,n as S,l as L}from"./utils-CEJpjMok.js";import{d as M,e as Q,az as A,h as X,c as Y,o as Z}from"./vue-CEtC17Vu.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./monaco-editor-xcHgnT1C.js";import"./@element-plus-icons-vue-CtYczY4K.js";import"./html2canvas-DNSjNh3_.js";import"./mockjs-B1eBEK5l.js";import"./dayjs-C1e0w4cr.js";import"./marked-BQZxLJfc.js";import"./lodash-es-BaeSyToa.js";import"./shared-CiMZBXIr.js";const te=M({__name:"index",setup(o){return f(this,null,function*(){let e,t;const _=z(),i=Q(),l=new J(U(S)),a=([e,t]=A(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e||{}),r=j({loading:L,notify:S,useTitle:I,alert:v,access:a==null?void 0:a.access}),n=D(g({alert:v},a==null?void 0:a.__ACCESS__)),c=a?([e,t]=A(()=>new K(a).load()),e=yield e,t(),e):{},{__BASE_PATH__:h="/",history:B="hash",base:w="/",pageRouteName:y="page",remote:R,auth:b,checkVersion:F=!0,enhance:T}=a||{},q=()=>B==="hash",H=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);E.set("Switcher",{props:{onClick:s=>{const u=s.platform==="uniapp",p=location.pathname;let m=p===`${h}__vtj__/`?h:p;const d=s.currentFile;if(d&&d.type==="page"&&s.homepage!==d.id){const N=a.pageBasePath?`/${y}`:"",x=`${H(w)}${u?`pages${N}`:y}/${d.id}`;m=q()?`${m}#/${x}`:`${m}${x}`}window.open(m,"VTJProject")}}}),E.set("Previewer",{props:{path:(s,u)=>{const p=location.pathname;return u.platform==="uniapp"?`${p}uni/#/pages/${s.id}`:`${p}#/preview/${s.id}`}}});const $=new G(g({container:i,service:l,materialPath:h,pageBasePath:w==="/"?"":w,adapter:r,access:n,remote:R,auth:b,checkVersion:F,enhance:T},c));return $.ready(()=>f(null,null,function*(){yield k(300),$.openFile(_.query.id)})),X(()=>_.query.id,s=>f(null,null,function*(){yield k(300),$.openFile(s)})),(s,u)=>(Z(),Y("div",{class:"designer",ref_key:"container",ref:i},null,512))})}}),ge=ee(te,[["__scopeId","data-v-79f08aff"]]);export{ge as default};
