import{r as f,j as o,s as m,a as C,F as ne,T as B,S as J,B as Se,R as ht,b as Ue,c as vt,d as pt}from"./index.c53a5999.js";const Ge=f.exports.createContext({height:0,width:0});var Je=(e=>(e[e.BP1=520]="BP1",e[e.BP2=900]="BP2",e))(Je||{});const mt=({children:e})=>{const[a,t]=f.exports.useState(window.innerWidth),[i,n]=f.exports.useState(window.innerHeight),r=()=>{t(window.innerWidth),n(window.innerHeight)};return f.exports.useEffect(()=>(window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[]),o(Ge.Provider,{value:{width:a,height:i},children:e})};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function qe(e,a,t,i){function n(r){return r instanceof t?r:new t(function(u){u(r)})}return new(t||(t=Promise))(function(r,u){function d(c){try{s(i.next(c))}catch(h){u(h)}}function p(c){try{s(i.throw(c))}catch(h){u(h)}}function s(c){c.done?r(c.value):n(c.value).then(d,p)}s((i=i.apply(e,a||[])).next())})}function Ke(e,a){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,u;return u={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function d(s){return function(c){return p([s,c])}}function p(s){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(r=s[0]&2?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[s[0]&2,r.value]),s[0]){case 0:case 1:r=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,n=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){t.label=s[1];break}if(s[0]===6&&t.label<r[1]){t.label=r[1],r=s;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(s);break}r[2]&&t.ops.pop(),t.trys.pop();continue}s=a.call(e,t)}catch(c){s=[6,c],n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}var A=function(){},w=A(),ee=Object,x=function(e){return e===w},F=function(e){return typeof e=="function"},_=function(e,a){return ee.assign({},e,a)},Ee="undefined",De=function(){return typeof window!=Ee},gt=function(){return typeof document!=Ee},bt=function(){return De()&&typeof window.requestAnimationFrame!=Ee},ue=new WeakMap,wt=0,ae=function(e){var a=typeof e,t=e&&e.constructor,i=t==Date,n,r;if(ee(e)===e&&!i&&t!=RegExp){if(n=ue.get(e),n)return n;if(n=++wt+"~",ue.set(e,n),t==Array){for(n="@",r=0;r<e.length;r++)n+=ae(e[r])+",";ue.set(e,n)}if(t==ee){n="#";for(var u=ee.keys(e).sort();!x(r=u.pop());)x(e[r])||(n+=r+":"+ae(e[r])+",");ue.set(e,n)}}else n=i?e.toJSON():a=="symbol"?e.toString():a=="string"?JSON.stringify(e):""+e;return n},ye=!0,yt=function(){return ye},Xe=De(),Te=gt(),xe=Xe&&window.addEventListener?window.addEventListener.bind(window):A,xt=Te?document.addEventListener.bind(document):A,Ce=Xe&&window.removeEventListener?window.removeEventListener.bind(window):A,Ct=Te?document.removeEventListener.bind(document):A,$t=function(){var e=Te&&document.visibilityState;return x(e)||e!=="hidden"},Rt=function(e){return xt("visibilitychange",e),xe("focus",e),function(){Ct("visibilitychange",e),Ce("focus",e)}},St=function(e){var a=function(){ye=!0,e()},t=function(){ye=!1};return xe("online",a),xe("offline",t),function(){Ce("online",a),Ce("offline",t)}},Et={isOnline:yt,isVisible:$t},Dt={initFocus:Rt,initReconnect:St},ce=!De()||"Deno"in window,Tt=function(e){return bt()?window.requestAnimationFrame(e):setTimeout(e,1)},te=ce?f.exports.useEffect:f.exports.useLayoutEffect,ge=typeof navigator!="undefined"&&navigator.connection,Ie=!ce&&ge&&(["slow-2g","2g"].includes(ge.effectiveType)||ge.saveData),Ye=function(e){if(F(e))try{e=e()}catch{e=""}var a=[].concat(e);e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ae(e):"";var t=e?"$swr$"+e:"";return[e,a,t]},N=new WeakMap,Qe=0,Ze=1,et=2,re=function(e,a,t,i,n,r,u){u===void 0&&(u=!0);var d=N.get(e),p=d[0],s=d[1],c=d[3],h=p[a],v=s[a];if(u&&v)for(var W=0;W<v.length;++W)v[W](t,i,n);return r&&(delete c[a],h&&h[0])?h[0](et).then(function(){return e.get(a)}):e.get(a)},kt=0,$e=function(){return++kt},tt=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return qe(void 0,void 0,void 0,function(){var t,i,n,r,u,d,p,s,c,h,v,W,ie,$,g,l,q,P,V,T,L;return Ke(this,function(M){switch(M.label){case 0:if(t=e[0],i=e[1],n=e[2],r=e[3],u=typeof r=="boolean"?{revalidate:r}:r||{},d=x(u.populateCache)?!0:u.populateCache,p=u.revalidate!==!1,s=u.rollbackOnError!==!1,c=u.optimisticData,h=Ye(i),v=h[0],W=h[2],!v)return[2];if(ie=N.get(t),$=ie[2],e.length<3)return[2,re(t,v,t.get(v),w,w,p,!0)];if(g=n,q=$e(),$[v]=[q,0],P=!x(c),V=t.get(v),P&&(T=F(c)?c(V):c,t.set(v,T),re(t,v,T)),F(g))try{g=g(t.get(v))}catch(z){l=z}return g&&F(g.then)?[4,g.catch(function(z){l=z})]:[3,2];case 1:if(g=M.sent(),q!==$[v][0]){if(l)throw l;return[2,g]}else l&&P&&s&&(d=!0,g=V,t.set(v,V));M.label=2;case 2:return d&&(l||(F(d)&&(g=d(g,V)),t.set(v,g)),t.set(W,_(t.get(W),{error:l}))),$[v][1]=$e(),[4,re(t,v,g,l,w,p,!!d)];case 3:if(L=M.sent(),l)throw l;return[2,d?L:g]}})})},_e=function(e,a){for(var t in e)e[t][0]&&e[t][0](a)},rt=function(e,a){if(!N.has(e)){var t=_(Dt,a),i={},n=tt.bind(w,e),r=A;if(N.set(e,[i,{},{},{},n]),!ce){var u=t.initFocus(setTimeout.bind(w,_e.bind(w,i,Qe))),d=t.initReconnect(setTimeout.bind(w,_e.bind(w,i,Ze)));r=function(){u&&u(),d&&d(),N.delete(e)}}return[e,n,r]}return[e,N.get(e)[4]]},Ot=function(e,a,t,i,n){var r=t.errorRetryCount,u=n.retryCount,d=~~((Math.random()+.5)*(1<<(u<8?u:8)))*t.errorRetryInterval;!x(r)&&u>r||setTimeout(i,d,n)},nt=rt(new Map),at=nt[0],At=nt[1],it=_({onLoadingSlow:A,onSuccess:A,onError:A,onErrorRetry:Ot,onDiscarded:A,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ie?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Ie?5e3:3e3,compare:function(e,a){return ae(e)==ae(a)},isPaused:function(){return!1},cache:at,mutate:At,fallback:{}},Et),ot=function(e,a){var t=_(e,a);if(a){var i=e.use,n=e.fallback,r=a.use,u=a.fallback;i&&r&&(t.use=i.concat(r)),n&&u&&(t.fallback=_(n,u))}return t},Re=f.exports.createContext({}),Wt=function(e){var a=e.value,t=ot(f.exports.useContext(Re),a),i=a&&a.provider,n=f.exports.useState(function(){return i?rt(i(t.cache||at),a):w})[0];return n&&(t.cache=n[0],t.mutate=n[1]),te(function(){return n?n[2]:w},[]),f.exports.createElement(Re.Provider,_(e,{value:t}))},Vt=function(e,a){var t=f.exports.useState({})[1],i=f.exports.useRef(e),n=f.exports.useRef({data:!1,error:!1,isValidating:!1}),r=f.exports.useCallback(function(u){var d=!1,p=i.current;for(var s in u){var c=s;p[c]!==u[c]&&(p[c]=u[c],n.current[c]&&(d=!0))}d&&!a.current&&t({})},[]);return te(function(){i.current=e}),[i,n.current,r]},It=function(e){return F(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},_t=function(){return _(it,f.exports.useContext(Re))},Mt=function(e){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=_t(),r=It(t),u=r[0],d=r[1],p=r[2],s=ot(n,p),c=e,h=s.use;if(h)for(var v=h.length;v-- >0;)c=h[v](c);return c(u,d||s.fetcher,s)}},Me=function(e,a,t){var i=a[e]||(a[e]=[]);return i.push(t),function(){var n=i.indexOf(t);n>=0&&(i[n]=i[i.length-1],i.pop())}},be={dedupe:!0},jt=function(e,a,t){var i=t.cache,n=t.compare,r=t.fallbackData,u=t.suspense,d=t.revalidateOnMount,p=t.refreshInterval,s=t.refreshWhenHidden,c=t.refreshWhenOffline,h=N.get(i),v=h[0],W=h[1],ie=h[2],$=h[3],g=Ye(e),l=g[0],q=g[1],P=g[2],V=f.exports.useRef(!1),T=f.exports.useRef(!1),L=f.exports.useRef(l),M=f.exports.useRef(a),z=f.exports.useRef(t),b=function(){return z.current},de=function(){return b().isVisible()&&b().isOnline()},oe=function(E){return i.set(P,_(i.get(P),E))},ke=i.get(l),ct=x(r)?t.fallback[l]:r,I=x(ke)?ct:ke,Oe=i.get(P)||{},K=Oe.error,Ae=!V.current,We=function(){return Ae&&!x(d)?d:b().isPaused()?!1:u?x(I)?!1:t.revalidateIfStale:x(I)||t.revalidateIfStale},dt=function(){return!l||!a?!1:Oe.isValidating?!0:Ae&&We()},fe=dt(),he=Vt({data:I,error:K,isValidating:fe},T),U=he[0],ve=he[1],se=he[2],H=f.exports.useCallback(function(E){return qe(void 0,void 0,void 0,function(){var R,S,D,X,Y,k,y,j,O,pe,Q,G,me;return Ke(this,function(Z){switch(Z.label){case 0:if(R=M.current,!l||!R||T.current||b().isPaused())return[2,!1];X=!0,Y=E||{},k=!$[l]||!Y.dedupe,y=function(){return!T.current&&l===L.current&&V.current},j=function(){var Ve=$[l];Ve&&Ve[1]===D&&delete $[l]},O={isValidating:!1},pe=function(){oe({isValidating:!1}),y()&&se(O)},oe({isValidating:!0}),se({isValidating:!0}),Z.label=1;case 1:return Z.trys.push([1,3,,4]),k&&(re(i,l,U.current.data,U.current.error,!0),t.loadingTimeout&&!i.get(l)&&setTimeout(function(){X&&y()&&b().onLoadingSlow(l,t)},t.loadingTimeout),$[l]=[R.apply(void 0,q),$e()]),me=$[l],S=me[0],D=me[1],[4,S];case 2:return S=Z.sent(),k&&setTimeout(j,t.dedupingInterval),!$[l]||$[l][1]!==D?(k&&y()&&b().onDiscarded(l),[2,!1]):(oe({error:w}),O.error=w,Q=ie[l],!x(Q)&&(D<=Q[0]||D<=Q[1]||Q[1]===0)?(pe(),k&&y()&&b().onDiscarded(l),[2,!1]):(n(U.current.data,S)?O.data=U.current.data:O.data=S,n(i.get(l),S)||i.set(l,S),k&&y()&&b().onSuccess(S,l,t),[3,4]));case 3:return G=Z.sent(),j(),b().isPaused()||(oe({error:G}),O.error=G,k&&y()&&(b().onError(G,l,t),(typeof t.shouldRetryOnError=="boolean"&&t.shouldRetryOnError||F(t.shouldRetryOnError)&&t.shouldRetryOnError(G))&&de()&&b().onErrorRetry(G,l,t,H,{retryCount:(Y.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return X=!1,pe(),y()&&k&&re(i,l,O.data,O.error,!1),[2,!0]}})})},[l]),ft=f.exports.useCallback(tt.bind(w,i,function(){return L.current}),[]);if(te(function(){M.current=a,z.current=t}),te(function(){if(!!l){var E=l!==L.current,R=H.bind(w,be),S=function(y,j,O){se(_({error:j,isValidating:O},n(U.current.data,y)?w:{data:y}))},D=0,X=function(y){if(y==Qe){var j=Date.now();b().revalidateOnFocus&&j>D&&de()&&(D=j+b().focusThrottleInterval,R())}else if(y==Ze)b().revalidateOnReconnect&&de()&&R();else if(y==et)return H()},Y=Me(l,W,S),k=Me(l,v,X);return T.current=!1,L.current=l,V.current=!0,E&&se({data:I,error:K,isValidating:fe}),We()&&(x(I)||ce?R():Tt(R)),function(){T.current=!0,Y(),k()}}},[l,H]),te(function(){var E;function R(){var D=F(p)?p(I):p;D&&E!==-1&&(E=setTimeout(S,D))}function S(){!U.current.error&&(s||b().isVisible())&&(c||b().isOnline())?H(be).then(R):R()}return R(),function(){E&&(clearTimeout(E),E=-1)}},[p,s,c,H]),f.exports.useDebugValue(I),u&&x(I)&&l)throw M.current=a,z.current=t,T.current=!1,x(K)?H(be):K;return{mutate:ft,get data(){return ve.data=!0,I},get error(){return ve.error=!0,K},get isValidating(){return ve.isValidating=!0,fe}}};ee.defineProperty(Wt,"default",{value:it});var Ft=Mt(jt);const je=m("h2",{color:"$primaryDark",variants:{size:{small:{fontSize:"$2",fontWeight:"$big"},medium:{fontSize:"$3",fontWeight:"$big"},large:{fontSize:"$5",lineHeight:"24px",fontWeight:"$big"}}},defaultVariants:{size:"medium"}}),we=m("h1",{fontWeight:"$big",fontSize:"$4",variants:{color:{dark:{color:"$primaryDark"},light:{color:"$white"}},margin:{none:{margin:0}}},defaultVariants:{color:"dark"}}),Pt=m("h2",{fontWeight:"$big",fontSize:"$3",variants:{color:{dark:{color:"$primaryDark"},light:{color:"$white"}},margin:{none:{margin:0}}},defaultVariants:{color:"dark"}}),le=m("a",{textDecoration:"none",fontSize:"inherit",fontWeight:"inherit",variants:{color:{white:{color:"$white","&:hover":{color:"$primaryPurple",transition:"color 0.1s ease"}},blue:{color:"$linkBlue"},purple:{color:"$primaryPurple"}}}}),Fe=m("div",{width:"fit-content",backgroundColor:"$lightGray",padding:"$2",whiteSpace:"pre-wrap",fontFamily:"monospace",fontSize:"$3"}),Lt=`import databutton as db
import streamlit as st

@db.apps.streamlit(route="/app", name="My App")
def app():
    st.title("My app")

@db.jobs.repeat_every(seconds=60, name="My Job")
def job():
    # Something amazing here
    print("Success!")
`,zt="$ databutton deploy",Ht=({localOrCloud:e})=>e==="local"?C(ne,{children:[o(je,{size:"large",children:"Oh, this project seems a bit empty"}),o(B,{children:"In order to add components to your project add one of the following decorators to any of your .py-files and they will magically appear here"}),o(J,{height:"small"}),o(Fe,{children:Lt}),o(J,{height:"small"}),C(B,{children:["To learn more about Databutton head over to our"," ",o(le,{href:"https://docs.databutton.com",target:"_blank",rel:"noreferrer",color:"blue",children:"documentation"})]})]}):C(ne,{children:[o(je,{size:"large",children:"Oh, this project seems to not have been deployed yet"}),o(B,{children:"In order to deploy your project, navigate to your project folder and write the following"}),o(J,{height:"small"}),o(Fe,{children:zt}),o(J,{height:"small"}),C(B,{children:["To learn more about Databutton head over to our"," ",o(le,{color:"blue",href:"https://docs.databutton.com",target:"_blank",rel:"noreferrer",children:"documentation"})]})]}),Bt=m("div",{display:"flex",flexFlow:"column",padding:"$2",variants:{width:{full:{width:"100%"},"one-half":{width:"50%"},"one-third":{width:"33%"},"one-fourth":{width:"25%"}},align:{center:{margin:"0 auto"}}},defaultVariants:{width:"full"}}),Pe=m(Se,{borderRadius:"5px",backgroundColor:"purple",padding:"$2",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",width:"100%",variants:{color:{purple:{background:"$darkPurpleGradient",color:"$white"},black:{background:"$blackGradient",color:"$white"},gray:{background:"$lightGray",color:"$primaryDark"}},state:{focused:{outline:"1px solid $purpleStroke"},none:{}}},defaultVariants:{color:"purple"}}),Nt=m("div",{borderRadius:"4px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)",background:"$lightGray",cursor:"pointer",variants:{state:{focused:{outline:"1px solid $purpleStroke"},none:{}},clickable:{yes:{cursor:"pointer"},no:{cursor:"not-allowed"}}}}),Ut=m("div",{$$borderRadius:"4px",borderTopLeftRadius:"$$borderRadius",borderTopRightRadius:"$$borderRadius",fontSize:"$2",color:"$white",padding:"$1 $2",variants:{component:{app:{background:"$appCardColor"},job:{background:"$jobCardColor"},data:{background:"$dataCardColor"}}}}),Gt=m("div",{$$borderRadius:"4px",background:"$gray7CardBackground",padding:"$3 $2",borderBottomRightRadius:"$$borderRadius",borderBottomLeftRadius:"$$borderRadius"}),st=({type:e,metadata:a,title:t,isSelected:i,onClick:n})=>C(Nt,{state:i?"focused":"none",role:"button",onClick:n,clickable:n?"yes":"no",children:[o(Ut,{component:e,children:a}),o(Gt,{children:o(Pt,{margin:"none",children:t})})]}),ut=m("div",{variants:{width:{mobile:{width:"100%"},tablet:{width:"45%"},desktop:{width:"320px"}}}}),Le=40,Jt=({app:e,onClick:a,isSelected:t})=>{var n;const i=r=>r.length>Le?`${r.slice(0,Le)}...`:r;return o(ut,{width:{"@initial":"mobile","@bp1":"tablet","@bp2":"desktop"},children:o(st,{type:"app",isSelected:t,metadata:`${e.memory} / ${e.cpu} CPU`,title:i((n=e.name)!=null?n:e.filename),onClick:()=>a(e)})})},lt=m("div",{variants:{width:{mobile:{width:"100%"},tablet:{width:"45%"},desktop:{width:"320px"}}}}),qt=({schedule:e})=>o(lt,{width:{"@initial":"mobile","@bp1":"tablet","@bp2":"desktop"},children:o(st,{type:"job",title:e.name,metadata:`Runs every ${e.seconds} seconds`})}),Kt=()=>{const{width:e,height:a}=f.exports.useContext(Ge);return{width:e,height:a}},Xt=m("img"),ze=m("div",{display:"flex",flexWrap:"wrap",gap:"$4"}),Yt=m("div",{display:"grid",gridTemplateColumns:"320px auto",gap:"$3"}),Qt=m("div",{$$height:"90vh",height:"$$height",width:"100%","&>iframe":{border:0,height:"$$height",width:"100%"}}),He=m("div",{}),Zt=m("div",{width:"650px"}),er=e=>e.length>0?e[0]:null,tr=({projectUrl:e,apps:a,schedules:t,headerContent:i,shouldAutoFocusFirstComponent:n})=>{const[r,u]=f.exports.useState(null),{width:d}=Kt();f.exports.useEffect(()=>{n&&u(er(a))},[n,a]);const p=c=>{window.location.replace(`${e}${c.route}`)},s=d>=Je.BP2;return C(Yt,{children:[C("div",{children:[!s&&C(ne,{children:[i,o(J,{})]}),o(we,{children:"Apps"}),a.length>0?o(ze,{children:a.map(c=>{const h=(r==null?void 0:r.uid)===c.uid;return o(Jt,{isSelected:h,onClick:()=>{s?u(h?null:c):p(c)},app:c},c.uid)})}):o(ut,{width:{"@initial":"mobile","@bp1":"tablet","@bp2":"desktop"},children:o(Pe,{color:"gray",css:{textAlign:"center"},children:o(B,{weight:"big",margin:"none",children:"No apps"})})}),o(J,{}),o(we,{children:"Jobs"}),t.length>0?o(ze,{children:t.map(c=>o(qt,{schedule:c},c.uid))}):o(lt,{width:{"@initial":"mobile","@bp1":"tablet","@bp2":"desktop"},children:o(Pe,{color:"gray",css:{textAlign:"center"},children:o(B,{weight:"big",margin:"none",children:"No jobs"})})})]}),s&&o(Qt,{children:r?C(ne,{children:[C(ht,{css:{justifyContent:"space-between"},children:[o(He,{css:{display:"flex",alignItems:"center",gap:"$1"},children:o(we,{children:r.name})}),o(He,{css:{display:"flex",gap:"$1",alignItems:"flex-start"},children:o(Ue,{intent:"plain",onClick:()=>u(null),children:o(Xt,{src:"/cross.svg",alt:"Close application"})})})]}),o("iframe",{src:`${e}${r.route}`,title:r.name})]}):o(Zt,{children:i})})]})},Be=m(Se,{display:"flex",justifyContent:"center",alignItems:"center",gap:"$3"}),rr=m(Se,{display:"flex",paddingX:"$3",height:"60px",backgroundColor:"$primaryDark",flexDirection:"row",alignItems:"center",justifyContent:"space-between",transition:"0.2s ease-in",width:"100%"}),nr=({projectName:e})=>C(rr,{children:[C(Be,{children:[o("img",{src:"/logo.png",height:"30px",width:"30px",alt:"Databutton"}),e&&o(B,{color:"white",children:e})]}),C(Be,{children:[o(le,{href:"https://docs.databutton.com",target:"_blank",rel:"noreferrer",color:"white",children:"Documentation"}),o(le,{href:"https://next.databutton.com",target:"_blank",rel:"noreferrer",children:o(Ue,{children:"databutton.com"})})]})]}),Ne="http://localhost:8000";function ar(){const{data:e}=Ft(`${Ne}/static/artifacts.json`,i=>fetch(i).then(n=>n.json()),{refreshInterval:500}),a=f.exports.useMemo(()=>e?e.streamlit_apps:[],[e]),t=(e==null?void 0:e.streamlit_apps.length)===0&&e.schedules.length===0;return C(ne,{children:[o(nr,{}),o(Bt,{children:t?o(Ht,{localOrCloud:"local"}):o(tr,{projectUrl:Ne,shouldAutoFocusFirstComponent:a.length===1,apps:a,schedules:e?e.schedules:[]})})]})}vt.createRoot(document.getElementById("root")).render(o(pt.StrictMode,{children:o(mt,{children:o(ar,{})})}));
