import{C as h}from"./ContentLayout.5465dc16.js";import{d as f,e as d,W as m,aq as b,r as v,o as l,X as w,c as _,Y as x,$ as I,ea as k,ag as C,w as c,b as r,aF as p,u as i,d9 as A,d7 as T,dd as M}from"./vue-router.324eaed2.js";import{l as S}from"./fetch.42a41b34.js";import{L as W}from"./CircularLoading.08cb4e45.js";import"./gateway.edd4374b.js";import{P as z}from"./project.a5f62f99.js";import"./tables.842b993f.js";import"./popupNotifcation.5a82bc93.js";import"./record.cff1707c.js";import"./string.d698465c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="806f9a1c-fde5-472f-96bd-afec33ceec00",e._sentryDebugIdIdentifier="sentry-dbid-806f9a1c-fde5-472f-96bd-afec33ceec00")}catch{}})();const B={class:"carousel"},D=f({__name:"TextCarousel",props:{texts:{type:Array,required:!0},period:{type:Number,required:!0},fontSize:{type:Number,default:18}},setup(e){const t=e,o=d(""),a=d(void 0);function s(){let n;do n=t.texts[Math.floor(Math.random()*t.texts.length)];while(n===o.value);o.value=n}function u(){a.value=window.setInterval(s,t.period*1e3)}return m(()=>{s(),u()}),b(()=>{a.value&&clearInterval(a.value)}),(n,y)=>{const g=v("Markdown");return l(),w("div",B,[(l(),_(g,{key:o.value,class:"text-item",source:o.value,style:x({fontSize:`${e.fontSize}px`})},null,8,["source","style"]))])}}});const E=I(D,[["__scopeId","data-v-1b2302ac"]]),G=f({__name:"WebEditor",setup(e){const t=["Did you know Abstra is open-source? You can star us on GitHub!","Python is the most popular language among non-developers",'You can use the "Fork" button to create a copy of a script run',"With our AI, you can create a full project in less than a minute!","Breaking your process into smaller steps can help debug it","Ask anything to Smart Console, our AI assistant","Check our documentation to learn more about Abstra","You can retry a failed step in the workflow using the Kanban","Customize your workspace by changing the theme in the settings"];return m(async()=>{const a=k().params.projectId,{redirect:s,ping:u}=await z.startWebEditor(a),n=setInterval(async()=>{(await S(u,{signal:AbortSignal.timeout(500)})).status===200&&window.location.replace(s)},2e3);C(()=>{clearInterval(n)})}),(o,a)=>(l(),_(h,null,{default:c(()=>[r(i(A),null,{default:c(()=>[p("Web Editor")]),_:1}),r(i(T),null,{default:c(()=>[p("We are getting things ready. This may take a few seconds.")]),_:1}),r(i(M),{gap:"large",align:"center",vertical:""},{default:c(()=>[r(E,{texts:t,period:5}),r(W)]),_:1})]),_:1}))}});export{G as default};
//# sourceMappingURL=WebEditor.2c0cf334.js.map
