try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`c5b1e909-7e5b-41d1-97e2-f6e598b2a1e8`,e._sentryDebugIdIdentifier=`sentry-dbid-c5b1e909-7e5b-41d1-97e2-f6e598b2a1e8`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{$m as t,Ag as n,Bt as r,Hm as i,Qh as a,Qm as o,Um as s,Yh as c,Zm as l,_r as u,jg as d,ng as f,xr as p,yr as m}from"./entry.client-mpghtlrl.js";import{n as h}from"./responsive-toolkit-jup4yedr.js";import{Et as g}from"./workspace-leaf-files-oergw4h0.js";var _=e(d(),1),v=n(),y=f(),b=e=>{let t=(0,v.c)(5),{handlePress:n}=e,{locGotIt:r}=i(),a;t[0]===r?a=t[1]:(a=r(),t[0]=r,t[1]=a);let o;return t[2]!==n||t[3]!==a?(o=(0,y.jsx)(p,{as:`button`,size:`large`,onPress:n,className:g,kind:`brand`,children:a}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o},x=u(b,()=>{let{dialog:{mutations:{goBack:e}},settings:t}=l(),{mutate:n}=c(e.getOptions()),{mutate:r}=c(t.mutations.setHasSeenPreviewWelcomeSetting);return{handlePress:()=>{r({settingValue:!0}),n()}}}),S=()=>{let e=(0,v.c)(2),t=x.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(t,{}),e[0]=t,e[1]=n),n},C=e=>{let t=new URL(`/migration/clear`,window.location.origin);return t.searchParams.set(`returnUrl`,e),t.toString()},w=()=>{let e=(0,v.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsx)(r,{}),e[0]=t):t=e[0],t},T=u(w,()=>{let{systems:{insiderPreviewGate:e}}=s(),{data:t}=a(e.queries.returnURL.getOptions()),{trackUserAction:n}=o();return(0,_.useEffect)(()=>{t&&(n(`NavigateToLink`,{destinationUrl:t,linkType:`external`},`Press`),window.location.href=C(t))},[t,n]),{}}),E=()=>{let e=(0,v.c)(2),t=T.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(t,{}),e[0]=t,e[1]=n),n},D=`/assets/welcome-o23agywh.mp4`,O=e=>{let n=(0,v.c)(18),{handleLoaded:r}=e,{t:i}=t(`PreviewWelcomeDialog`),a=h(),o,s;n[0]===r?(o=n[1],s=n[2]):(o=()=>{r()},s=[r],n[0]=r,n[1]=o,n[2]=s),(0,_.useEffect)(o,s);let c;n[3]===a?c=n[4]:(c=(0,y.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-hidden`,children:(0,y.jsx)(`video`,{className:`h-auto max-h-full min-h-0 w-full max-w-[496px] flex-shrink object-contain`,src:D,width:496,height:290,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,onLoadedMetadata:a})}),n[3]=a,n[4]=c);let l;n[5]===i?l=n[6]:(l=i(`Welcome to the new experience!`,{shortKey:`welcome_title_2b5815`}),n[5]=i,n[6]=l);let u;n[7]===i?u=n[8]:(u=i(`We're still polishing things. Spot an issue? Send us feedback. You can switch back anytime in settings.`,{shortKey:`welcome_body_3fa99a`}),n[7]=i,n[8]=u);let d;n[9]!==l||n[10]!==u?(d=(0,y.jsx)(m,{title:l,subtitle:u}),n[9]=l,n[10]=u,n[11]=d):d=n[11];let f;n[12]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,y.jsx)(S,{}),n[12]=f):f=n[12];let p;n[13]===d?p=n[14]:(p=(0,y.jsxs)(`div`,{className:`flex flex-shrink-0 flex-col items-center gap-layout-vertical-group-of-items-tight`,children:[d,f]}),n[13]=d,n[14]=p);let g;return n[15]!==c||n[16]!==p?(g=(0,y.jsxs)(`div`,{className:`p-template-overlays-modal-container-padding-regular flex h-full min-h-0 flex-col items-center self-stretch overflow-hidden`,children:[c,p]}),n[15]=c,n[16]=p,n[17]=g):g=n[17],g},k=u(O,()=>{let{settings:e}=l(),{data:t}=a(e.queries.hasSeenPreviewWelcomeSetting.getOptions()),{mutate:n}=c(e.mutations.setHasSeenPreviewWelcomeSetting);return{handleLoaded:(0,_.useCallback)(()=>{t!==!0&&n({settingValue:!0})},[t,n])}}),A=()=>{let e=(0,v.c)(2),t=k.useComponent(),n;return e[0]===t?n=e[1]:(n=(0,y.jsx)(t,{}),e[0]=t,e[1]=n),n};export{b as a,w as i,O as n,E as r,A as t};