"use strict";(globalThis.webpackChunkextendify=globalThis.webpackChunkextendify||[]).push([[847],{7722(e,t,a){var n=a(6001);const i=n._H3({name:n.YjP(),code:n.YjP(),patternTypes:n.YOg(n.YjP())}),s=n._H3({id:n.YjP(),slug:n.YjP(),headerCode:n.YjP().optional(),footerCode:n.YjP().optional(),patterns:n.YOg(i)}),o=n._H3({home:s}),r=n._H3({siteImages:n.YOg(n.YjP())}),l=n._H3({logoUrl:n.OZ5()}),c=n._H3({id:n.YjP(),slug:n.YjP(),name:n.YjP(),patterns:n.YOg(i),siteStyle:n.Ikc()}),d=n._H3({pages:n.YOg(c)}),u=n._H3({name:n.YjP(),wordpressSlug:n.YjP()}),p=n.Ikc({sitePlugins:n.YOg(u)}),g=n._H3({type:n.YjP(),title:n.YjP(),description:n.YjP(),objective:n.YjP(),category:n.YjP().optional(),structure:n.YjP(),imageSearchTerms:n.YOg(n.YjP()),tone:n.YjP(),logoObjectName:n.YjP(),products:n.KCZ([n.YjP(),n.euz(!1)]),appointments:n.zMY(),events:n.zMY(),donations:n.zMY(),multilingual:n.zMY(),contact:n.zMY(),address:n.KCZ([n.zMY(),n.YjP()]),blog:n.zMY(),landingPage:n.zMY(),landingPageCTALink:n.KCZ([n.euz(!1),n.YjP()])}),h=n._H3({aiHeaders:n.YOg(n.YjP()),aiBlogTitles:n.YOg(n.YjP())}),f=n._H3({vibe:n.YjP(),fonts:n._H3(),variation:n._H3(),colorPalette:n.YjP(),animation:n.YjP()}),m=n.Ikc({siteStyle:f.extend({variation:n._H3().optional()})});var w=a(7723),y=a(1621),x=a(7134),b=a(6528);const v=n.Ikc({title:n.YjP().optional().default("").catch(()=>""),description:n.YjP().optional().default("").catch(()=>""),type:n.YjP().optional().catch(()=>""),objective:n.YjP().optional().catch(()=>""),category:n.YjP().optional().catch(()=>""),structure:n.YjP().optional().catch(()=>""),tone:n.YjP().optional().catch(()=>""),products:n.KCZ([n.YjP(),n.euz(!1)]).optional().catch(()=>!1),appointments:n.zMY().optional().catch(()=>!1),events:n.zMY().optional().catch(()=>!1),donations:n.zMY().optional().catch(()=>!1),multilingual:n.zMY().optional().catch(()=>!1),contact:n.zMY().optional().catch(()=>!1),address:n.KCZ([n.zMY(),n.YjP()]).optional().catch(()=>!1),blog:n.zMY().optional().catch(()=>!1),"landing-page":n.zMY().optional().catch(()=>!1),"cta-link":n.KCZ([n.zMY(),n.YjP()]).optional().catch(()=>!1)}),j=v.parse((0,b.N)(window.extLaunchData.urlParams)||{}),C=new URL(window.location.href);Object.keys(j).forEach(e=>{C.searchParams.delete(e)}),window.history.replaceState({},"",C.toString());const P=e=>{const{"landing-page":t,"cta-link":a,...n}=e,i={...n,landingPage:t,landingPageCTALink:a};return Object.fromEntries(Object.entries(i).filter(([,e])=>void 0!==e&&""!==e))},_=e=>Object.fromEntries(Object.keys(e.shape).map(e=>[e,void 0])),S={
// translators: this is for a action log UI. Keep it short
statusMessages:[(0,w.__)("Booting things up...","extendify-local")],errorMessage:null,errorCount:0,description:null,descriptionBackup:void 0,urlParams:{},siteProfile:{..._(g)},..._(l),..._(p),..._(m),..._(h),..._(r),..._(o),..._(d)},k=(e,t)=>({...S,urlParams:{...S.urlParams,...j},title:j.title||void 0,description:j.description||void 0,descriptionBackup:j.description||void 0,pulse:!1,setPulse:t=>e({pulse:t}),setData:(a,n)=>{O(a)&&t()[a]!==n&&e({[a]:n})},addStatusMessage:a=>{const n=t().statusMessages.filter(e=>e!==a);e({statusMessages:[...n,a]})},setErrorMessage:t=>{e(e=>({errorMessage:t,errorCount:e.errorCount+1}))},needToStall:()=>t().errorCount>6,resetErrorCount:()=>{e({errorCount:0})},reset:({exclude:a})=>{const n={...S};a&&Array.isArray(a)&&a.forEach(e=>{O(e)&&(n[e]=t()[e])}),e(n)}}),O=e=>Object.keys(S).includes(e),T={urlParams:v,siteProfile:g,...Object.fromEntries([l,p,m,h,r,o,d].flatMap(e=>Object.entries(e.shape)))},N=(0,y.vt)((0,x.Zr)((0,x.lt)(k,{name:"Extendify Launch Data"}),{name:`extendify-launch-data-${window.extSharedData.siteId}`,merge:(e,t)=>{if(!e||"object"!=typeof e)return t;const a=Object.fromEntries(Object.entries(e).filter(([e])=>e in T).map(([e,t])=>{const a=T[e].safeParse(t);return[e,a.success?a.data:void 0]})),{title:n,description:i,...s}=P(j);return{...t,...e,...a,title:n||t.title,description:i||t.description,urlParams:{...t.urlParams,...e.urlParams,...a.urlParams,...s}}},partialize:e=>{const{statusMessages:t,errorMessage:a,errorCount:n,pulse:i,description:s,title:o,...r}=e;return Object.fromEntries(Object.entries(r).filter(([,e])=>Array.isArray(e)?e.length>0:Boolean(e)))}}),k);var M=a(1455),$=a.n(M);const L=["partnerId","devbuild","version","siteId","homeUrl","wpLanguage","wpVersion","siteCreatedAt"],E={...Object.fromEntries(Object.entries(window.extSharedData).filter(([e])=>L.includes(e)))},Y=e=>{N.getState().addStatusMessage(e)},D=e=>{N.getState().setErrorMessage(e)},H=async e=>{try{return await e()}catch(t){D(
// translators: This is an error message shown to the user when a network request fails and is being retried
// translators: This is an error message shown to the user when a network request fails and is being retried
(0,w.__)("The network seems unstable. Retrying...","extendify-local")),await I(1e3);const a=await e();return D(null),a}},A=async(e,t)=>{try{return await e()}catch(e){return console.error("failWithFallback:",e),t}},I=e=>new Promise(t=>setTimeout(t,e));async function F(e={},t=3e4){const a=new AbortController,{signal:n}=a,i=setTimeout(()=>a.abort(),t);try{return await $()({...e,signal:n})}finally{clearTimeout(i)}}const z=async(e,t={},a=6e4)=>{const n=new AbortController,{signal:i}=n,s=setTimeout(()=>n.abort(),a);try{return await fetch(e,{...t,signal:i})}finally{clearTimeout(s)}};var B=a(1522),V=a(3832);const R=["header","header-with-center-nav-and-social"],U=["footer","footer-social-icons","footer-with-center-logo-and-menu"],Z=["footer-with-nav","footer-with-center-logo-social-nav"],J=(e,t)=>$()({path:"/extendify/v1/auto-launch/options",method:"POST",data:{option:e,value:t}}),W=e=>$()({path:(0,V.addQueryArgs)("/extendify/v1/auto-launch/options",{option:e})}),Q=e=>{try{return $()({path:`/wp/v2/pages/${e}`})}catch{return null}},G=async(e,t)=>{try{const n=e=>new Promise((t,a)=>{e.onload=()=>t(),e.onerror=()=>a(new Error("Failed to load image."))}),i=new Image;i.src=e,i.crossOrigin="anonymous",await n(i);const s=document.createElement("canvas");s.width=i.width,s.height=i.height;const o=s.getContext("2d");if(!o)return null;o.drawImage(i,0,0);const r=await new Promise((e,t)=>{s.toBlob(a=>{a?e(a):t(new Error("Failed to convert canvas to Blob."))},"image/jpeg")}),l=new FormData;return l.append("file",new File([r],t.filename,{type:"image/jpeg"})),l.append("alt_text",t.alt||""),l.append("caption",t.caption||""),l.append("status","publish"),await(a=l,$()({path:"wp/v2/media",data:a,method:"POST"}))}catch(e){return null}var a},K=e=>$()({path:"/wp/v2/posts",method:"POST",data:e}),q=e=>$()({path:"/wp/v2/tags",method:"POST",data:e}),X=e=>$()({path:"/wp/v2/categories",method:"POST",data:e});var ee=a(8969);const{wpLanguage:te,showImprint:ae}=window.extSharedData,ne=`${ee.zL}/api/home`,ie={"Content-Type":"application/json"},se=async({siteProfile:e,sitePlugins:t,siteImages:a})=>{
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Preparing your home page","extendify"));const n=JSON.stringify({...E,siteProfile:e,siteImages:a,sitePlugins:t}),i=await H(()=>z(ne,{method:"POST",headers:ie,body:n})),r=s.parse(await i.json()),l=!!Array.isArray(ae)&&ae.includes(te??"")&&"Business"===e.category,{headers:c,footers:d}=await(async(e=!1)=>{const t=await $()({path:"/wp/v2/template-parts"}),a=t.filter(({theme:e})=>"extendable"===e),n=a?.filter(({slug:e})=>R.includes(e)),i=e&&t?.some(({slug:e})=>Z.includes(e))?Z:U;return{headers:n,footers:a.filter(({slug:e})=>i.includes(e))}})(l),u=c[0]?.content?.raw?.trim()??"",p=d[0]?.content?.raw?.trim()??"";return o.parse({home:{...r,headerCode:u,footerCode:p}})},oe={siteImages:[]},re=`${ee.a3}/api/search`,le={"Content-Type":"application/json"},ce=async({siteProfile:e})=>{
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Finding the perfect images","extendify"));const t=JSON.stringify({...E,siteProfile:e,source:"auto-launch"}),a=await H(()=>z(re,{method:"POST",headers:le,body:t}));return a?.ok?A(async()=>r.parse(await a.json()),oe):oe};var de=a(6940),ue=a(6480);const{showAILogo:pe}=window.extSharedData,ge={logoUrl:"https://images.extendify-cdn.com/demo-content/logos/ext-custom-logo-default.webp"},he=`${ee.AY}/api/site-profile/generate-logo`,fe={"Content-Type":"application/json"},me=async({siteProfile:e})=>{if(!pe)return ge;
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Generating a logo","extendify"));const{logoObjectName:t}=e,a=JSON.stringify({...E,objectName:t}),n=await H(()=>z(he,{method:"POST",headers:fe,body:a}));if(!n?.ok)return ge;const i=await A(async()=>{const{logoUrl:e}=l.parse(await n.json());return await(0,de.y)(e,{size:{width:256,height:256},mimeType:"image/webp"})},ge.logoUrl);return await we(i),l.parse({logoUrl:i})},we=async e=>{const t=await(await fetch(e)).blob(),a=t.type,n=a.replace("image/",""),i=`ext-custom-logo-${Date.now()}`,s=new File([t],`${i}.${n}`,{type:a});await(0,ue.uploadMedia)({filesList:[s],onFileChange:async([e])=>{e?.id&&await J("site_logo",e.id)},onError:console.error})},ye=`${ee.zL}/api/page-templates`,xe={"Content-Type":"application/json"},be=n._H3({recommended:n.YOg(c)}),ve=async({siteProfile:e,sitePlugins:t,siteStyle:a,siteImages:n})=>{if("multi-page"!==e.structure)return{pages:[]};
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Preparing your pages","extendify"));const i=JSON.stringify({...E,siteProfile:e,siteStyle:a,siteImages:{siteImages:n},sitePlugins:t,includeOptional:!1}),s=await H(()=>z(ye,{method:"POST",headers:xe,body:i})),o=be.parse(await s.json());return d.parse({pages:[...o.recommended]})};var je=a(1380);const Ce=()=>$()({path:"extendify/v1/auto-launch/active-plugins"}),Pe=(e,t)=>e?.filter(e=>e.includes(t))?.length,_e=async e=>{const t=(e=e.map(e=>e.patternTypes.includes("blog-section")&&e.patternReplacementCode?{...e,code:e.patternReplacementCode}:e)).filter(e=>e.patternReplacementCode);if(!t?.length)return e;const a=(await Ce())?.data?.map(e=>e.split("/")[0])||[],n=e.filter(e=>e.pluginDependency).map(e=>e.pluginDependency).filter(e=>!a.includes(e));for(const e of n)(0,je.yB)({slug:e,source:"auto-launch"});try{return await Se(e)}catch(t){return await Se(e).catch(()=>e)}},Se=e=>$()({path:"/extendify/v1/shared/process-placeholders",method:"POST",data:{patterns:e}}),{pluginGroupId:ke}=window.extSharedData,Oe={sitePlugins:[]},Te=`${ee.AY}/api/site-plugins`,Ne={"Content-Type":"application/json"},Me=n.Ikc({selectedPlugins:n.YOg(u)}),$e=async({siteProfile:e})=>{
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Setting up site functionality","extendify"));const t=JSON.stringify({...E,...e,siteObjective:e.objective,pluginGroupId:ke}),a=await H(()=>z(Te,{method:"POST",headers:Ne,body:t}));if(!a?.ok)return Oe;const n=await A(async()=>{const e=await a.json(),t=Me.parse(e).selectedPlugins.toSorted(({wordpressSlug:e})=>"give"===e?-1:1);return p.parse({sitePlugins:t})},Oe),i=await Ce(),s=n.sitePlugins.filter(({wordpressSlug:e})=>!Pe(i,e));return Y(
// translators: this is for a action log UI. Keep it short
// translators: this is for a action log UI. Keep it short
(0,w.__)("Setting up functionality for your website","extendify-local")),await Promise.all(s.map(async({wordpressSlug:e})=>{const t=await(async e=>{const t=async()=>{const t=await $()({path:"/wp/v2/plugins",method:"POST",data:{slug:e}});return await(0,je.yB)({slug:e,source:"auto-launch"}),t};try{return await t()}catch(a){console.error(`Error installing ${e}. Retrying...`,a);try{return await t()}catch(t){console.error(`Failed ${e} again. Giving up`,t)}}})(e);await(async e=>{const t=e=>$()({path:`/wp/v2/plugins/${e}`,method:"POST",data:{status:"active"}});try{await t(e)}catch(a){console.error(a);const{plugin:n}=await(async e=>{const t=await $()({path:(0,V.addQueryArgs)("/wp/v2/plugins",{search:e})});return t?.[0]})(e);await t(n)}})(t?.plugin??e)})),n},Le=n.Ikc({siteProfile:g}),Ee=`${ee.AY}/api/site-profile`,Ye={"Content-Type":"application/json"},De=async({title:e,description:t,urlParams:a})=>{
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Creating a site profile","extendify"));const n=JSON.stringify({...E,title:e||window.extSharedData.siteTitle,description:t,autoLaunch:!0}),i=await z(Ee,{method:"POST",headers:Ye,body:n},2e4);if(!i?.ok)throw new Error("Failed to fetch site profile");const{profile:s}=await i.json(),o={...g.parse(s),...P(a)};return await J("extendify_site_profile",JSON.stringify(o)),Le.parse({siteProfile:o})},He={aiHeaders:[],aiBlogTitles:[]},Ae=`${ee.AY}/api/site-strings`,Ie={"Content-Type":"application/json"},Fe=async({siteProfile:e})=>{
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Generating site content ideas","extendify"));const t=JSON.stringify({...E,siteProfile:e}),a=await H(()=>z(Ae,{method:"POST",headers:Ie,body:t}));return a?.ok?A(async()=>h.parse(await a.json()),He):He};var ze=a(365);const Be={siteStyle:[]},Ve=`${ee.AY}/api/styles`,Re={"Content-Type":"application/json"},Ue=n.YOg(f.omit({variation:!0})),Ze=async({siteProfile:e})=>{
// translators: this is for a action log UI. Keep it short
Y((0,w.__)("Picking the perfect design","extendify"));const t=JSON.stringify({...E,siteProfile:e,count:1}),a=await H(()=>z(Ve,{method:"POST",headers:Re,body:t},2e4));return a?.ok?A(async()=>{const e=await a.json(),t=Ue.parse(e)[0],n=await(async({slug:e,fonts:t},a)=>{const{fallback:n=!1}=a||{},i=await F({path:"wp/v2/global-styles/themes/extendable/variations"});let s=i.find(t=>(t.slug||t.title.toLowerCase().trim().replace(/\s+/g,"-"))===e);const o=Object.keys(s.settings||{}),r=Object.keys(s.styles||{}),l=new Set([...o,...r]);return l.has("color")&&l.has("typography")||(s=null),!s&&n&&(s=i.sort(()=>Math.random()-.5).find(e=>{const t=Object.keys(e.settings||{}),a=Object.keys(e.styles||{}),n=new Set([...t,...a]);return n.has("color")&&n.has("typography")})),t?(0,ze.$N)(s,{styles:{elements:{heading:{typography:{fontFamily:`var(--wp--preset--font-family--${t.heading.slug})`}}},typography:{fontFamily:`var(--wp--preset--font-family--${t.body.slug})`}},settings:{typography:{fontFamilies:{custom:[t.heading,t.body].filter(e=>!!e.host)}}}}):s})({slug:t.colorPalette,fonts:t.fonts},{fallback:!0}),i={...t,variation:n};return await J("extendify_site_style",i),await J("extendify_animation_settings",{type:t.animation??"fade",speed:"medium"}),m.parse({siteStyle:i})},Be):Be},Je=async({fontFamilyId:e,...t})=>{const a=`${t.fontFamilySlug}-${t.fontWeight}`;for(let n=0;n<=2;n++)try{n>0&&await(0,ze.yy)(1e3);const a=await $()({path:`/wp/v2/font-families/${e}/font-faces`,method:"POST",body:Ke(t)});return{id:a.id,...a.font_face_settings}}catch(e){if(n<=2){console.error(`Failed attempt to upload font file ${a}:`,e.message);continue}return void console.error(`Failed to upload font file ${a} after 3 attempts.`)}},We=async e=>{const t=e.fontFace.map(async e=>{const t=await Qe(e.src);if(t)return{...e,file:t}}),a=(await Promise.all(t)).filter(Boolean);if(!a.length)return;const n=await(async e=>{try{const t=(await $()({path:(0,V.addQueryArgs)("/wp/v2/font-families",{slug:e.slug,_embed:!0})}))?.[0];if(t)return{id:t.id,...t.font_family_settings,fontFace:t._embedded.font_faces.map(({id:e,font_face_settings:t})=>({id:e,...t}))};const a=await $()({path:"/wp/v2/font-families",method:"POST",body:Ge(e)});return{id:a.id,...a.font_family_settings,fontFace:a.fontFaces}}catch(e){return void console.error("Failed to register font family:",e.message)}})(e);if(!n)return;if(n?.fontFace?.length)return n;const i=a.map(e=>({fontFamilyId:n.id,fontFamilySlug:n.slug,...e})),s=[];for(const e of i)s.push(await Je(e));return{...n,fontFace:s.filter(Boolean)}},Qe=async e=>{for(let t=0;t<=2;t++)try{t>0&&await(0,ze.yy)(1e3);const a=await fetch(e);if(!a.ok)throw new Error("Failed to fetch font file.");const n=await a.blob(),i=e.split("/").pop();return new File([n],i,{type:n.type})}catch(e){if(t<=2)continue;return}},Ge=({name:e,slug:t,fontFamily:a})=>{const n=new FormData,i={name:e,slug:t,fontFamily:a};return n.append("font_family_settings",JSON.stringify(i)),n},Ke=({fontFamilySlug:e,fontFamily:t,fontStyle:a,fontWeight:n,fontDisplay:i,unicodeRange:s,src:o=[],file:r=[]})=>{const l=new FormData,c={fontFamily:t,fontStyle:a,fontWeight:n,fontDisplay:i,unicodeRange:null==s?"":s,src:Array.isArray(o)?o:[o]};return(Array.isArray(r)?r:[r]).forEach(t=>{const i=`${e}-${n}-${a}`;l.append(i,t,t.name),o?.length?c.src=[i]:c.src.push(i)}),l.append("font_face_settings",JSON.stringify(c)),l},qe={"Content-type":"application/json",Accept:"application/json","X-Extendify":"true"},{urlParams:Xe}=window.extLaunchData,et=({stage:e,siteProfile:t={},sitePlugins:a=[],siteStyle:n={}}={})=>{const{type:i,category:s,structure:o,objective:r}=t,{siteId:l,partnerId:c,homeUrl:d,wpLanguage:u}=E;return fetch(`${ee.Dq}/api/v1/launch`,{method:"POST",headers:qe,body:JSON.stringify({...E,autoLaunch:!0,stage:e,skippedDescription:Boolean(Xe?.title||Xe?.description),insightsId:l,hostpartner:c,siteURL:d,language:u,sitePlugins:a?.map(e=>e?.name),urlParameters:Xe,siteStyle:n,style:n?.colorPalette,siteProfile:t,siteType:i,siteCategory:s,siteStructure:o,siteObjective:r,extra:{userAgent:window?.navigator?.userAgent,vendor:window?.navigator?.vendor||"unknown",platform:window?.navigator?.userAgentData?.platform||window?.navigator?.platform||"unknown",mobile:window?.navigator?.userAgentData?.mobile,width:window.innerWidth,height:window.innerHeight,screenHeight:window.screen.height,screenWidth:window.screen.width,orientation:window.screen.orientation?.type,touchSupport:"ontouchstart"in window||navigator.maxTouchPoints>0}})})};var tt=a(8512),at=a(4997);const nt=async(e,{stickyNav:t})=>{const a=[];for(const n of e){const e=[],i=new Set;for(const[t,a]of n.patterns.entries()){const t=a.code,n=a.patternTypes?.[0],{slug:s}=Object.values(tt.Q).find(({alias:e})=>e.includes(n))||{};!i.has(s)&&s?(i.add(s),e.push(it(t,s))):e.push(t)}const s={title:n.name,status:"publish",content:e.join(""),template:t?"no-title-sticky-header":"home"===n.slug?"no-title":"page-with-title",meta:{made_with_extendify_launch:!0}};let o;try{o=await st(s)}catch(e){s.template="no-title",o=await st(s)}a.push({...o,originalSlug:n.slug})}const n=a.find(({originalSlug:e})=>"home"===e);n&&(await J("show_on_front","page"),await J("page_on_front",n.id));const i=a.find(({originalSlug:e})=>"blog"===e);return i&&await J("page_for_posts",i.id),a},it=(e,t)=>e.replace(/(<div\s[^>]*class="[^"]*\bwp-block-group\b[^"]*")/,`$1 id="${t}"`),st=e=>$()({path:"wp/v2/pages",data:e,method:"POST"}),ot=e=>$()({path:`wp/v2/pages/${e.id}`,data:e,method:"POST"}),{homeUrl:rt}=window.extSharedData,lt=/href="(#extendify-[\w-]+)"/gi,ct=e=>e?.content?.raw?.match(lt),dt=async({pageContent:e,availablePages:t})=>{try{const a=await fetch(`${ee.AY}/api/link-pages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...E,pageContent:e,availablePages:t})});if(!a.ok)throw new Error("Bad response from server");return await a.json()}catch(e){return{}}},ut=async({content:e="",title:t,slug:a})=>{const n=await $()({path:(0,V.addQueryArgs)("extendify/v1/auto-launch/get-navigation",{slug:a})}).catch(()=>{});return n?.id?n:await $()({path:"extendify/v1/auto-launch/create-navigation",method:"POST",data:{title:t,slug:a,content:e}})},pt=(e,t)=>$()({path:`wp/v2/navigation/${e}`,method:"POST",data:{content:t}}),gt=async(e,t,a,n=[])=>{const i=({slug:e})=>a.find(({originalSlug:t})=>t===e)||{},s=t.filter(e=>i(e)?.id).filter(({slug:e})=>"home"!==e).map(e=>i(e)),o=e=>e.originalSlug??e.slug,r=e=>{const t=o(e);return tt.Q[t]?.navOrder??Object.values(tt.Q).find(e=>e.alias?.includes(t))?.navOrder??Object.keys(tt.Q).length+1},l=[...s,...n],c=l.find(e=>{const t=o(e);return"contact"===t||tt.Q.contact?.alias?.includes(t)}),d=l.filter(e=>e!==c).sort((e,t)=>r(e)-r(t)),u=(c?(()=>{const e=5===d.length?5:Math.min(4,d.length);return[...d.slice(0,e),c,...d.slice(e)]})():d).map(({id:e,title:t,link:a,type:n})=>`\x3c!-- wp:navigation-link ${JSON.stringify({label:t.rendered,id:e,type:n,url:a,kind:e?"post-type":"custom",isTopLevelLink:!0})} /--\x3e`),p=u.slice(0,5).join(""),g=u.slice(5),h=g.length>1?` \x3c!-- wp:navigation-submenu ${JSON.stringify({
// translators: "More" here is used for a navigation menu item that contains additional links.
label:(0,w.__)("More","extendify-local"),url:"#",kind:"custom"})} --\x3e ${g.join("")} \x3c!-- /wp:navigation-submenu --\x3e`:g.join("");await pt(e,p+h)},ht=e=>{try{return JSON.parse(e.match(/<!-- wp:navigation([\s\S]*?)-->/)[1])}catch(e){return{}}},ft=(e,t)=>{const a=JSON.stringify({...ht(e),...t});return e.replace(/(<!--\s*wp:navigation\b[^>]*>)([^]*?)(<!--\s*\/wp:navigation\s*-->)/gi,`\x3c!-- wp:navigation ${a} /--\x3e`)};var mt=a(7143);const{globalStylesPostID:wt}=window.extSharedData,yt=(e,t)=>$()({path:`wp/v2/template-parts/${e}`,method:"POST",data:{slug:e,theme:"extendable",type:"wp_template_part",status:"publish",
// translators: Launch is the product name. Unless otherwise specified by the glossary, do not translate this name.
description:(0,w.__)("Added by Launch","extendify-local"),content:t}});var xt=a(6087),bt=a(7581),vt=a(4225);const{homeUrl:jt,showImprint:Ct,wpLanguage:Pt}=window.extSharedData,_t=()=>{const{setErrorMessage:e,addStatusMessage:t,needToStall:a,...n}=N(),{setUserGaveConsent:i}=(0,bt.D)(),s=(0,xt.useRef)(!1),[o,r]=(0,xt.useState)(!a()),[l,c]=(0,xt.useState)(!1);return((e=!0,t)=>{(0,xt.useEffect)(()=>{if(!e)return;const a=e=>(e.preventDefault(),t?.(),e.returnValue="",""),n={capture:!0};return window.addEventListener("beforeunload",a,n),()=>{window.removeEventListener("beforeunload",a,n)}},[e])})(o,()=>{}),St("siteProfile",()=>n.description||n.title?n:null,De),St("siteLogo",()=>n.siteProfile?.title?n:null,me),St("sitePlugins",()=>n.siteProfile?.title?n:null,$e),St("siteStyle",()=>n.siteProfile?.title?n:null,Ze),St("siteStrings",()=>n.siteProfile?.title?n:null,Fe),St("siteImages",()=>n.siteProfile?.title?n:null,ce),St("home",()=>[n.siteProfile,n.siteStyle,n.siteImages,n.sitePlugins].every(e=>void 0!==e)?n:null,se),St("pages",()=>[n.siteProfile,n.siteStyle,n.siteImages,n.sitePlugins].every(e=>void 0!==e)?n:null,ve),St("basicUpdates",()=>[n.siteProfile,n.home,n.pages].every(e=>void 0!==e)?n:null,async({siteProfile:e,sitePlugins:a,siteStyle:n})=>{const{title:s}=e;
// translators: this is for a action log UI. Keep it short
t((0,w.__)("Adding admin configurations","extendify-local")),await J("permalink_structure","/%postname%/"),i(!0),s&&await J("blogname",s),et({stage:"basic_updates",siteProfile:e,sitePlugins:a,siteStyle:n})}),St("pluginConfigurations",()=>n.sitePlugins?n:null,async()=>{const e=await Ce();if(Pe(e,"wpforms-lite")&&await J("wpforms_activation_redirect","skip"),Pe(e,"all-in-one-seo-pack")&&await J("aioseo_activation_redirect","skip"),Pe(e,"google-analytics-for-wordpress")){const e="_transient__monsterinsights_activation_redirect";await J(e,null)}}),(0,xt.useEffect)(()=>{if(a())return;const{home:i,pages:o,siteProfile:l,sitePlugins:d,siteStyle:u,addSiteStrings:p,siteImages:g}=n;i&&o&&(s.current||(s.current=!0,(async()=>{const{objective:e,structure:a,category:s}=l,h=!!Array.isArray(Ct)&&Ct.includes(Pt??"")&&"Business"===s,f=u?.variation?.settings?.typography?.fontFamilies?.custom;let m=u?.variation;if(f?.length){
// translators: this is for a action log UI. Keep it short
t((0,w.__)("Installing fonts locally","extendify-local"));const e=await(async e=>{const t=[];for(const a of e)t.push(await We(a));return t.filter(Boolean)})(f).catch(()=>[]);m=((e,t)=>(0,ze.$N)(e,{settings:{typography:{fontFamilies:{custom:null}}}},{settings:{typography:{fontFamilies:{custom:t.filter(Boolean)}}}}))(u.variation,e)}await(e=>((e,t={})=>{const{settings:a,styles:n}=t;if(a&&n)return $()({path:`wp/v2/global-styles/${e}`,method:"POST",data:{id:e,settings:a,styles:n}})})(wt,e))(m),"natural-1"!==u?.vibe&&(
// translators: vibe in this context is a noun - the feeling of their site design.
t((0,w.__)("Setting the website style","extendify-local")),await(async e=>{if(!e||"string"!=typeof e||""===e.trim()||"natural-1"===e)return;const t=(e,t)=>Object.fromEntries(Object.entries(e).map(([a,n])=>{if(!a.includes("--natural-1--"))return[a,{...n}];const i=((e,t)=>e.replace("--natural-1--",`--${t}--`))(a,t),s=e[i];return[a,s?{...s}:{...n}]}));try{const{styles:n}=await $()({path:"wp/v2/global-styles/themes/extendable?context=edit"});if(!n?.blocks)throw new Error("No block styles found in theme global styles");const i=Object.fromEntries(Object.entries(n.blocks).map(([a,n])=>{if(!n?.variations)return[a,n];const{variations:i,...s}=n;return Object.keys(i).some(e=>e.includes("--natural-1--"))?[a,{...s,variations:t(i,e)}]:[a,n]}));await(a={styles:{...n,blocks:i}},$()({path:`wp/v2/global-styles/${wt}`,method:"POST",data:a}))}catch(e){throw new Error(`Vibe update failed: ${e?.response?.data?.message||e?.message||"Unknown error"}`)}var a})(u?.vibe)),t((0,w.__)("Working on the navigation","extendify-local"));const{id:y}=await ut({title:(0,w.__)("Header Navigation","extendify-local"),slug:"site-navigation"});let x=ft(i.headerCode||"",{ref:y});if("landing-page"===e){
// translators: this is for a action log UI. Keep it short
t((0,w.__)("Perfecting a landing page","extendify-local"));const e=/<!--\s*wp:social-links\b[^>]*>.*?<!--\s*\/wp:social-links\s*-->/gis;x=x.replace(/<!--\s*wp:navigation\b[^>]*.*\/-->/gis,"").replace(e,"")}await yt("extendable/header",x);let b=null,v=i.footerCode||"";h&&(b=(await ut({title:(0,w.__)("Footer Navigation","extendify-local"),slug:"footer-navigation"})).id,v=ft(v,{ref:b})),await yt("extendable/footer",v),
// translators: this is for a action log UI. Keep it short
t((0,w.__)("Creating pages","extendify-local"));const j=(e=>{const{home:t,pages:a,siteProfile:n}=e,i={id:"home",name:tt.Q.home.title,slug:"home",patterns:t.patterns},s="blog"===n.objective?{name:tt.Q.blog.title,id:"blog",patterns:[],slug:"blog"}:null,o=e=>!e.patternTypes?.includes("page-title");return[i,...a.map(e=>({...e,patterns:e.patterns.filter(o)})),s].filter(Boolean)})(n),C=o?.[0]?.patterns?.find(e=>e.patternTypes?.includes("page-title"));C&&await(async e=>{const t=`\n\t\t\x3c!-- wp:template-part {"slug":"header","tagName":"header"} /--\x3e\n\t\t\x3c!-- wp:group {"tagName":"main","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"},"blockGap":"0"}}} --\x3e\n\t\t<main class="wp-block-group" style="margin-top:0px;margin-bottom:0px">\n\t\t\t${(e=>{let t=!1;const a=e=>{if(t)return e;if("core/heading"===e.name){t=!0;const a={level:e.attributes.level,textAlign:e.attributes.textAlign,textColor:e.attributes.textColor,backgroundColor:e.attributes.backgroundColor,isLink:e.attributes.isLink,linkTarget:e.attributes.linkTarget,rel:e.attributes.rel};e.attributes.fontSize&&(a.fontSize=e.attributes.fontSize);const n=e.attributes.style?.typography?.fontSize,i=e.attributes.style?.elements?.link;return(n||i)&&(a.style={},n&&(a.style.typography={fontSize:n}),i&&(a.style.elements={link:i})),(0,at.createBlock)("core/post-title",a)}return e.innerBlocks?.length&&(e.innerBlocks=e.innerBlocks.map(a)),e};return(0,at.serialize)((0,at.parse)(e).map(a))})(e)}\n\t\t\t\x3c!-- wp:post-content {"layout":{"type":"constrained"}} /--\x3e\n\t\t</main>\n\t\t\x3c!-- /wp:group --\x3e\n\t\t\x3c!-- wp:template-part {"slug":"footer","tagName":"footer"} /--\x3e\n\t\t`;try{await $()({path:"/wp/v2/templates/extendable/page-with-title",method:"POST",data:{slug:"page-with-title",theme:"extendable",type:"wp_template",status:"publish",description:(0,w.__)("Added by Launch","extendify-local"),content:t}})}catch{}})(C.code);const P=[];for(const e of j){const t=await _e(e.patterns),a={...e,patterns:t};P.push(a)}const _=await(async(e,t)=>{const a=await Promise.allSettled(e.map(e=>(async(e,t)=>{const{siteProfile:a}=t,n=await fetch(`${ee.AY}/api/patterns`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...E,siteProfile:a,page:e})});return await n.json()})(e,t).then(e=>e).catch(()=>e)));return a?.map((t,a)=>t.value||e[a])})(P,n),S="single-page"===a&&"landing-page"!==e,k=await nt(_,{stickyNav:S}),O=i?.patterns?.some(e=>e.patternTypes.includes("blog-section"));("blog"===e||O)&&(
// translators: this is for a action log UI. Keep it short
t((0,w.__)("Creating blog sample data","extendify-local")),await(async(e,t)=>{const a=B[window.extSharedData?.wpLanguage||"en_US"]||B.en_US,n=await(async e=>{const t=[];for(const a of e){const e={name:a.name,slug:a.slug,description:a.description};let n;try{n=await X(e)}catch(e){}n?.id&&n?.slug&&t.push({id:n.id,slug:n.slug})}return t})(a.categories)||[],i=await(async e=>{const t=[];for(const a of e){const e={name:a.name,slug:a.slug,description:a.description};let n;try{n=await q(e)}catch(e){}n?.id&&n?.slug&&t.push({id:n.id,slug:n.slug})}return t})(a.tags)||[],s=e=>e?.includes("?q=80&w=1470")?e:`${e}?q=80&w=1470`,o=(t?.siteImages||[]).sort(()=>Math.random()-.5),r=Array.from({length:8},(t,n)=>{return{name:e?.aiBlogTitles?.[n]||
// translators: %s is a post number
// translators: %s is a post number
(0,w.sprintf)((0,w.__)("Blog Post %s","extendify-local"),n+1),featured_image:o[n%o.length]?s(o[n%o.length]):null,post_content:(i=a.post_content,r=o,(i.match(/https:\/\/images\.unsplash\.com\/[^\s"]+/g)||[]).reduce((e,t,a)=>e.replace(t,s(r[a]||t)),i))};var i,r});for(const[e,t]of r.entries())try{const a=t.featured_image&&(await G(t.featured_image,{alt:"",filename:`featured-image-${e}.jpg`,caption:""}))?.id||null,s=n.length?n[e%n.length]?.id:[],o=e<4?[i.find(e=>"featured"===e.slug)?.id].filter(Boolean):[],r={title:t.name,content:t.post_content,status:"publish",featured_media:a||null,categories:s,tags:o,meta:{made_with_extendify_launch:!0}};await K(r)}catch(e){}})(p,g)),g?.length&&await(async e=>{try{const t=window.extLaunchData?.helloWorldPostSlug;let a=await $()({path:`wp/v2/posts?slug=${t}`});if(a.length||(a=await $()({path:"wp/v2/posts?slug=hello-world"})),!a.length)return;const n=a[0];if(n.featured_media&&parseInt(n.featured_media,10)>0)return;if(!Array.isArray(e)||0===e.length)return void console.error("No image URLs provided.");const i=e[e.length-1],s=await G(i,{alt:(0,w.__)("Hello World Featured Image","extendify-local"),filename:"hello-world-featured.jpg",caption:""});if(!s||!s.id)return void console.error("Image upload failed.");await $()({path:`wp/v2/posts/${n.id}`,method:"POST",data:{featured_media:s.id}})}catch(e){console.error("Failed to set Hello World featured image:",e)}})(g);const T=await(async({siteStyle:e})=>{try{const t=await(async({siteStyle:e})=>{const t=await fetch(`${ee.zL}/api/page-imprint`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...E,siteStyle:e})});return{...(await t.json()).template}})({siteStyle:e}),[a]=await nt([t],{stickyNav:!1});return a}catch(e){return console.error("Failed to add imprint page:",e),null}})({siteStyle:u}).catch(()=>null),N=await Ce(),M=[];if(Pe(N,"woocommerce")){t(
// translators: this is for a action log UI. Keep it short
// translators: this is for a action log UI. Keep it short
(0,w.__)("Setting up your online store","extendify-local")),await F({path:"/extendify/v1/auto-launch/import-woocommerce"}).catch(()=>null);const e=await W("woocommerce_shop_page_id"),a=e?await Q(e):null;a&&M.push(a)}Pe(N,"the-events-calendar")&&M.push({title:{rendered:(0,w.__)("Events","extendify-local")},slug:"events",link:`${jt}/events`});const L="single-page"===a?await(async(e,t,a)=>{let n=e?.[0]?.content?.raw;if(!n)return e;const{objective:i,activePlugins:s}=a;if("landing-page"===i)return e[0]=ot({id:e[0].id,content:n.replaceAll(/href="(#extendify-[\w|-]+)"/gi,'href="#"')}),e;const o=t?.[0]?.patterns?.map(e=>e?.patternTypes?.[0])?.filter(e=>"hero-header"!==e)?.map(e=>{const{slug:t}=Object.values(tt.Q).find(({alias:t})=>t.includes(e))||{};return t})?.filter(Boolean)?.flat(),r=t?.filter(e=>"home"!==e.slug)?.map(e=>e.slug)?.filter(Boolean)??[],l=[];if(Pe(s,"woocommerce")){const e=await Q(await W("woocommerce_shop_page_id")).catch(()=>null);e?.slug&&l.push(e.slug)}Pe(s,"the-events-calendar")&&l.push("events");const{suggestedLinks:c}=await dt({pageContent:n,availablePages:o.concat(l)})||{};return n=Object.keys(c).reduce((e,t)=>{const a=c[t];if(!a)return e;const n=l.concat(r).includes(a)?`"${rt}/${a}"`:`"${rt}/#${a}"`;return e.replaceAll(`"${t}"`,n)},n),e[0]=ot({id:e[0].id,content:n}),e})(k,_,{objective:e,activePlugins:N}):await(async(e,t)=>{const a=e.find(({originalSlug:e})=>e?.startsWith("contact"))?.slug,n=e.filter(ct).map(({content:e})=>(0,at.parse)(e.raw||"").map(e=>(0,at.getBlockContent)(e)).filter(e=>e.match(lt)).join("")),i=e.concat(t).filter(({slug:e})=>!e.startsWith("home")).map(({slug:e})=>`/${e}`),s=(await Promise.allSettled(n.map(e=>dt({pageContent:e,availablePages:i})||{}))).filter(e=>"fulfilled"===e.status).map(e=>e.value?.suggestedLinks||[]).reduce((e,t)=>{for(const a in t)e[a]=t[a];return e},{}),o=Object.keys(s).filter(e=>i.includes(`/${s[e].replace(/^\//,"")}`)).map(e=>`\\"${e}\\"`).join("|"),r=(await Promise.allSettled(e.filter(ct).map(e=>{const t=o?e.content.raw.replace(new RegExp(o,"g"),t=>{if(!t||0===s.length)return"";const n=s[t.replace(/"/g,"")];return[e.slug,`/${e.slug}`,"/"].includes(n)?`"${rt}/${a??""}"`:`"${rt}/${n.replace(/^\//,"")}"`}):e.content.raw.replace(new RegExp(lt,"g"),e=>e?'href="#"':"");return ot({id:e.id,content:t})}))).filter(e=>"fulfilled"===e.status).map(e=>e.value);return e.map(e=>r.find(({id:t})=>t===e.id)||e).map(t=>{const{originalSlug:a}=e.find(({id:e})=>e===t.id)||{};return{...t,originalSlug:a}})})(k,M),Y=[];if(b&&T?.title){const{originalSlug:e,title:t}=T;Y.push({id:e,name:t.rendered,slug:e,patterns:[]})}"landing-page"!==e&&("single-page"===a?await(async(e,t=[],a=[],n=[])=>{const i=a.map(({title:e})=>e?.rendered?.toLowerCase()),s=n?.filter(e=>"home"!==e?.slug)?.map(e=>e.slug)?.filter(Boolean)??[],o=t.map(({patternTypes:e})=>e?.[0]).filter(Boolean).filter(e=>{const{slug:t}=Object.values(tt.Q).find(({alias:t})=>t.includes(e))||{};return t&&!i.includes(t)}),r=new Set,l=o.map(e=>{const{title:t,slug:a}=Object.values(tt.Q).find(({alias:t})=>t.includes(e))||{};if(!a)return"";if(r.has(a))return"";r.add(a);const n=s.includes(a)?`${window.extSharedData.homeUrl}/${a}`:`${window.extSharedData.homeUrl}/#${a}`;return`\x3c!-- wp:navigation-link ${JSON.stringify({label:t,type:"custom",url:n,kind:"custom",isTopLevelLink:!0})} /--\x3e`}),c=a.map(({title:e,id:t,type:a,link:n})=>`\x3c!-- wp:navigation-link ${JSON.stringify({label:e.rendered,id:t,type:a,url:n,kind:t?"post-type":"custom",isTopLevelLink:!0})} /--\x3e`),d=l.concat(c).join("");await pt(e,d)})(y,i?.patterns,M,k):await gt(y,j,L,M),b&&await gt(b,Y,L,[])),await(async()=>await $()({path:"extendify/v1/auto-launch/prefetch-assist-data"}))(),await $()({path:"/extendify/v1/launch/post-launch-functions",method:"POST"}),await(e=>{const t=(0,mt.select)("core/preferences").get("core","renderingModes")||{};t?.extendable?.page!==e&&(0,mt.dispatch)("core/preferences").set("core","renderingModes",{...t,extendable:{...t.extendable||{},page:e}})})("template-locked"),await J("extendify_onboarding_completed",(new Date).toISOString()),
// translators: this is for a action log UI. Keep it short
t((0,w.__)("All done!","extendify-local")),await et({stage:"finished",siteProfile:l,sitePlugins:d,siteStyle:u}),r(!1),c(!0)})().catch(t=>{console.error(t),s.current=!1,a(!0),e((0,w.__)("Something went wrong during the final steps. We will try again but you may need to refresh the page.","extendify-local"))})))},[n,a,i]),{done:l}},St=(e,t,a)=>{const{setData:n,setErrorMessage:i,needToStall:s}=N(),o=t?.()??null,{data:r,error:l}=(0,vt.A)(o&&!s()?e:null,()=>a(t()));(0,xt.useEffect)(()=>{r&&Object.entries(r).forEach(([e,t])=>{n(e,t)})},[r,n]),(0,xt.useEffect)(()=>{l&&!s()&&(console.error(l),i((0,w.__)("Having some trouble with this step. Trying again...","extendify-local")))},[l,i,s])};var kt=a(790);const Ot=(0,kt.jsxs)("svg",{viewBox:"0 0 2524 492",xmlns:"http://www.w3.org/2000/svg",children:[(0,kt.jsx)("title",{children:(0,w.__)("Extendify Logo","extendify-local")}),(0,kt.jsx)("path",{d:"M609.404 378.5C585.07 378.5 563.404 373 544.404 362C525.737 350.667 511.07 335.333 500.404 316C489.737 296.333 484.404 273.833 484.404 248.5C484.404 222.833 489.57 200.167 499.904 180.5C510.237 160.833 524.737 145.5 543.404 134.5C562.07 123.167 583.404 117.5 607.404 117.5C632.404 117.5 653.904 122.833 671.904 133.5C689.904 143.833 703.737 158.333 713.404 177C723.404 195.667 728.404 218 728.404 244V262.5L516.404 263L517.404 224H667.904C667.904 207 662.404 193.333 651.404 183C640.737 172.667 626.237 167.5 607.904 167.5C593.57 167.5 581.404 170.5 571.404 176.5C561.737 182.5 554.404 191.5 549.404 203.5C544.404 215.5 541.904 230.167 541.904 247.5C541.904 274.167 547.57 294.333 558.904 308C570.57 321.667 587.737 328.5 610.404 328.5C627.07 328.5 640.737 325.333 651.404 319C662.404 312.667 669.57 303.667 672.904 292H729.404C724.07 319 710.737 340.167 689.404 355.5C668.404 370.833 641.737 378.5 609.404 378.5Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M797.529 372H728.029L813.029 251L728.029 125H799.029L853.529 209L906.029 125H974.529L890.529 250.5L972.029 372H902.029L849.029 290.5L797.529 372Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M994.142 125H1150.14V176H994.142V125ZM1102.64 372H1041.64V48H1102.64V372Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M1278.62 378.5C1254.29 378.5 1232.62 373 1213.62 362C1194.96 350.667 1180.29 335.333 1169.62 316C1158.96 296.333 1153.62 273.833 1153.62 248.5C1153.62 222.833 1158.79 200.167 1169.12 180.5C1179.46 160.833 1193.96 145.5 1212.62 134.5C1231.29 123.167 1252.62 117.5 1276.62 117.5C1301.62 117.5 1323.12 122.833 1341.12 133.5C1359.12 143.833 1372.96 158.333 1382.62 177C1392.62 195.667 1397.62 218 1397.62 244V262.5L1185.62 263L1186.62 224H1337.12C1337.12 207 1331.62 193.333 1320.62 183C1309.96 172.667 1295.46 167.5 1277.12 167.5C1262.79 167.5 1250.62 170.5 1240.62 176.5C1230.96 182.5 1223.62 191.5 1218.62 203.5C1213.62 215.5 1211.12 230.167 1211.12 247.5C1211.12 274.167 1216.79 294.333 1228.12 308C1239.79 321.667 1256.96 328.5 1279.62 328.5C1296.29 328.5 1309.96 325.333 1320.62 319C1331.62 312.667 1338.79 303.667 1342.12 292H1398.62C1393.29 319 1379.96 340.167 1358.62 355.5C1337.62 370.833 1310.96 378.5 1278.62 378.5Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M1484.44 372H1423.44V125H1479.94L1484.94 157C1492.61 144.667 1503.44 135 1517.44 128C1531.78 121 1547.28 117.5 1563.94 117.5C1594.94 117.5 1618.28 126.667 1633.94 145C1649.94 163.333 1657.94 188.333 1657.94 220V372H1596.94V234.5C1596.94 213.833 1592.28 198.5 1582.94 188.5C1573.61 178.167 1560.94 173 1544.94 173C1525.94 173 1511.11 179 1500.44 191C1489.78 203 1484.44 219 1484.44 239V372Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M1798.38 378.5C1774.38 378.5 1753.71 373.167 1736.38 362.5C1719.38 351.5 1706.04 336.333 1696.38 317C1687.04 297.667 1682.38 275.167 1682.38 249.5C1682.38 223.833 1687.04 201.167 1696.38 181.5C1706.04 161.5 1719.88 145.833 1737.88 134.5C1755.88 123.167 1777.21 117.5 1801.88 117.5C1819.21 117.5 1835.04 121 1849.38 128C1863.71 134.667 1874.71 144.167 1882.38 156.5V0H1942.88V372H1886.88L1882.88 333.5C1875.54 347.5 1864.21 358.5 1848.88 366.5C1833.88 374.5 1817.04 378.5 1798.38 378.5ZM1811.88 322.5C1826.21 322.5 1838.54 319.5 1848.88 313.5C1859.21 307.167 1867.21 298.333 1872.88 287C1878.88 275.333 1881.88 262.167 1881.88 247.5C1881.88 232.5 1878.88 219.5 1872.88 208.5C1867.21 197.167 1859.21 188.333 1848.88 182C1838.54 175.333 1826.21 172 1811.88 172C1797.88 172 1785.71 175.333 1775.38 182C1765.04 188.333 1757.04 197.167 1751.38 208.5C1746.04 219.833 1743.38 232.833 1743.38 247.5C1743.38 262.167 1746.04 275.167 1751.38 286.5C1757.04 297.833 1765.04 306.667 1775.38 313C1785.71 319.333 1797.88 322.5 1811.88 322.5Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M1996.45 372V125H2057.45V372H1996.45ZM2026.45 75.5C2016.11 75.5 2007.28 72 1999.95 65C1992.95 57.6667 1989.45 48.8333 1989.45 38.5C1989.45 28.1667 1992.95 19.5 1999.95 12.5C2007.28 5.50001 2016.11 2.00002 2026.45 2.00002C2036.78 2.00002 2045.45 5.50001 2052.45 12.5C2059.78 19.5 2063.45 28.1667 2063.45 38.5C2063.45 48.8333 2059.78 57.6667 2052.45 65C2045.45 72 2036.78 75.5 2026.45 75.5Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M2085.97 125H2240.97V176H2085.97V125ZM2241.47 2.5V54.5C2238.14 54.5 2234.64 54.5 2230.97 54.5C2227.64 54.5 2224.14 54.5 2220.47 54.5C2205.14 54.5 2194.8 58.1667 2189.47 65.5C2184.47 72.8333 2181.97 82.6667 2181.97 95V372H2121.47V95C2121.47 72.3333 2125.14 54.1667 2132.47 40.5C2139.8 26.5 2150.14 16.3333 2163.47 10C2176.8 3.33334 2192.3 0 2209.97 0C2214.97 0 2220.14 0.166671 2225.47 0.5C2231.14 0.833329 2236.47 1.49999 2241.47 2.5Z",fill:"currentColor"}),(0,kt.jsx)("path",{d:"M2330.4 125L2410.9 353L2377.9 415.5L2265.9 125H2330.4ZM2272.4 486.5V436H2308.9C2316.9 436 2323.9 435 2329.9 433C2335.9 431.333 2341.24 428 2345.9 423C2350.9 418 2355.07 410.667 2358.4 401L2460.9 125H2523.9L2402.9 427C2393.9 449.667 2382.57 466.167 2368.9 476.5C2355.24 486.833 2338.24 492 2317.9 492C2309.24 492 2301.07 491.5 2293.4 490.5C2286.07 489.833 2279.07 488.5 2272.4 486.5Z",fill:"currentColor"}),(0,kt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M226.926 25.1299H310.197C333.783 25.1299 342.32 27.5938 350.948 32.1932C359.576 36.8108 366.326 43.5822 370.941 52.1969C375.556 60.8298 378 69.3715 378 92.9707V176.289C378 199.888 375.537 208.43 370.941 217.063C366.326 225.696 359.558 232.449 350.948 237.066C347.091 239.131 343.244 240.83 338.064 242.047V308.355C338.064 344.802 334.261 357.994 327.162 371.327C320.034 384.66 309.583 395.09 296.285 402.221C282.96 409.353 269.775 413.13 233.349 413.13H104.744C68.3172 413.13 55.1327 409.325 41.8073 402.221C28.4819 395.09 18.0583 384.632 10.9308 371.327C3.80323 358.023 0 344.802 0 308.355V179.706C0 143.259 3.80323 130.067 10.9026 116.734C18.0301 103.401 28.4819 92.9431 41.8073 85.8116C55.1045 78.7082 68.3172 74.9028 104.744 74.9028H159.808C160.841 64.0747 162.996 58.1666 166.165 52.2151C170.78 43.5822 177.547 36.8108 186.175 32.1932C194.785 27.5938 203.34 25.1299 226.926 25.1299ZM184.128 78.1641C184.128 62.7001 196.658 50.1641 212.114 50.1641H324.991C340.448 50.1641 352.978 62.7001 352.978 78.1641V191.096C352.978 206.56 340.448 219.096 324.991 219.096H212.114C196.658 219.096 184.128 206.56 184.128 191.096V78.1641Z",fill:"currentColor"})]}),Tt=(0,kt.jsxs)("svg",{viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,kt.jsx)("title",{children:(0,w._x)("Loading animation","icon","extendify-local")}),(0,kt.jsxs)("circle",{cx:"12",cy:"12",r:"0",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",children:[(0,kt.jsx)("animate",{attributeName:"r",calcMode:"spline",dur:"2s",keySplines:".52,.6,.25,.99",repeatCount:"indefinite",values:"0;11"}),(0,kt.jsx)("animate",{attributeName:"opacity",calcMode:"spline",dur:"2s",keySplines:".52,.6,.25,.99",repeatCount:"indefinite",values:"1;0"})]})]}),Nt=(0,kt.jsxs)("svg",{viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,kt.jsx)("title",{children:(0,w.__)("Checkmark","extendify-local")}),(0,kt.jsx)("path",{d:"M8.72912 13.7449L5.77536 10.7911L4.76953 11.7899L8.72912 15.7495L17.2291 7.24948L16.2304 6.25073L8.72912 13.7449Z",fill:"currentColor"})]});var Mt=a(319),$t=a(6070),Lt=a(6221),Et=a(8845);const Yt={enter:{opacity:0,y:20},center:{opacity:1,y:0},exit:{opacity:0,y:-20}},{adminUrl:Dt,homeUrl:Ht}=window.extSharedData,At=({height:e})=>{const{done:t}=_t(),a=(0,xt.useRef)(0),[n,i]=(0,xt.useState)([]),[s,o]=(0,xt.useState)(!1),r=n.slice(-6),{statusMessages:l,errorMessage:c,setErrorMessage:d,errorCount:u,needToStall:p,resetErrorCount:g,setPulse:h}=N();return((e,t=2e3,a=[])=>{const n=(0,xt.useRef)(0),i=(0,xt.useRef)(null);(0,xt.useEffect)(()=>{const a=()=>{clearTimeout(i.current);const s=Date.now(),o=Math.max(0,n.current+t-s),r=()=>{n.current=Date.now(),e()&&a()};0===o?r():i.current=setTimeout(r,o)};return a(),()=>{clearTimeout(i.current),i.current=null}},[e,t,...a])})(()=>{if(c)return!1;if(a.current>=l.length)return!1;l.length-a.current>3&&a.current>0&&(a.current=l.length-3);const e=[50,100,150,200,250,300,350].filter(e=>e!==n[n.length-1]?.hue),t=e[Math.floor(Math.random()*e.length)],s={text:l[a.current],hue:t};return a.current+=1,i(e=>[...e,s]),a.current<l.length},Math.floor(2500+750*Math.random()),[l.length]),(0,xt.useEffect)(()=>{if(!c)return;const e=setTimeout(()=>{d(null)},5e3);return()=>clearTimeout(e)},[c,d]),(0,xt.useEffect)(()=>{h(!t)},[t]),(0,xt.useEffect)(()=>{if(!t)return;o(!0);const e=setTimeout(()=>{window.location.replace(`${Ht}?extendify-launch-success=1&extendify-agent-onboarding=1`)},3e3);return()=>clearTimeout(e)},[t]),(0,xt.useEffect)(()=>{if(!p())return;const e=setTimeout(()=>{g()},1e4);return()=>clearTimeout(e)},[p,u,g]),p()?(0,kt.jsxs)("div",{className:"bg-white w-full h-full p-6 lg:p-12 lg:py-8 overflow-hidden text-gray-900 flex flex-col rounded-lg",children:[(0,kt.jsx)("h2",{className:"text-lg text-center text-gray-900 font-semibold px-4 py-0 m-0",children:(0,w.__)("We are experiencing some delays","extendify-local")}),(0,kt.jsx)("div",{className:"grow flex items-center justify-center",children:(0,kt.jsx)(Mt.A,{icon:$t.A,size:90,fill:"var(--ext-design-main)"})}),(0,kt.jsx)("div",{className:"m-0 p-0 leading-tight text-sm text-center",children:(0,w.__)("Pausing for a few seconds","extendify-local")})]}):(0,kt.jsxs)("div",{className:"w-full overflow-hidden items-center justify-end flex flex-col p-6",style:{height:e||"auto"},children:[(0,kt.jsxs)(Lt.N,{initial:!1,mode:"popLayout",children:[Array.from({length:6-r.length}).map((e,t)=>(0,kt.jsx)(Et.P.div,{layout:!0,variants:Yt,initial:"enter",animate:"center",exit:"exit",transition:{duration:.3},className:"m-0 mb-2 p-0 leading-tight h-7 text-lg",children:" "},`spacer-${t}`)),r.map(({text:e,hue:t},a)=>{const n=a===r.length-1;return(0,kt.jsx)(Et.P.div,{layout:!0,variants:Yt,initial:"enter",animate:"center",exit:"exit",transition:{duration:.3},className:"m-0 mb-2 p-0 leading-tight h-7 text-lg",children:(0,kt.jsxs)(Et.P.span,{layout:!0,initial:!1,animate:{fontSize:n?"1.125rem":"0.875rem",fontWeight:n?600:300,filter:n?void 0:"blur(0.85px)"},transition:{duration:.5},className:"inline-flex text-banner-text items-center gap-1",children:[(0,kt.jsx)("span",{className:"inline-flex w-5 h-5 items-center justify-center",children:n?(0,kt.jsx)(Mt.A,{icon:Tt,style:{color:`hsl(${t} 100% 35% / 1)`}}):(0,kt.jsx)(Mt.A,{icon:Nt})}),e]})},e)})]}),c?(0,kt.jsx)("div",{className:"absolute -bottom-12 left-0 text-center w-full text-red-600 text-xs p-2 rounded-md bg-white",children:c}):null,s?(0,kt.jsx)(It,{}):null]})},It=()=>(0,kt.jsx)("iframe",{title:"Admin Loader",src:Dt,style:{display:"none"},sandbox:"allow-same-origin allow-scripts allow-forms"});var Ft=a(5367);const zt=()=>{const{setData:e,descriptionBackup:t}=N(),[a,n]=(0,xt.useState)(t||""),i=(0,xt.useRef)(null),{consentTerms:s}=(0,bt.D)(),o=(0,xt.useCallback)(()=>{const e=i.current;if(!e)return;e.style.height="auto";const t=e.getBoundingClientRect(),a=window.innerHeight,n=Math.max(0,a-t.top-120),s=e.scrollHeight,o=Math.min(s,n);e.style.height=`${o}px`,e.style.overflowY=s>n?"auto":"hidden",window.dispatchEvent(new Event("launch-textarea-resize"))},[]);return(0,xt.useEffect)(()=>{e("descriptionBackup",a.trim())},[a,e]),(0,xt.useEffect)(()=>{const e=new AbortController,{signal:t}=e,a=()=>{o();const e=i.current;e?.scrollTo(0,e.scrollHeight)};return window.addEventListener("resize",a,{signal:t}),window.addEventListener("orientationchange",a,{signal:t}),o(),()=>e.abort()},[o]),(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)("form",{onSubmit:t=>{t.preventDefault(),e("description",a.trim())},onClick:()=>i.current?.focus(),className:"relative flex w-full flex-col p-6",children:(0,kt.jsxs)("div",{className:"focus-within:border-design-main focus-within:ring-design-main w-full bg-white rounded-md text-gray-900 shadow-xl",children:[(0,kt.jsx)("textarea",{ref:i,id:"extendify-launch-chat-textarea",className:"flex min-h-36 w-full resize-none bg-transparent p-4 text-base placeholder:text-gray-700 focus:shadow-none focus:outline-hidden disabled:opacity-50 border-none text-gray-900",rows:"1",autoFocus:!0,value:a,onChange:e=>{n(e.target.value),o()}}),(0,kt.jsx)("div",{className:"flex justify-between gap-4 p-2.5",children:(0,kt.jsx)("div",{className:"ms-auto flex items-center",children:(0,kt.jsx)(Bt,{disabled:0===a.trim().length})})})]})}),(0,kt.jsx)("div",{className:"text-pretty px-4 mt-4 text-center text-xss leading-none opacity-70 text-banner-text [&>a]:text-xss [&>a]:text-banner-text [&>a]:underline w-full absolute",dangerouslySetInnerHTML:{__html:s}}),(0,kt.jsx)("a",{className:"text-sm font-medium underline text-banner-text fixed left-4 bottom-4 opacity-70 hover:opacity-100 transition-opacity",href:window.extSharedData.adminUrl,children:(0,w.__)("Exit to WP-Admin","extendify-local")})]})},Bt=(0,xt.forwardRef)((e,t)=>(0,kt.jsxs)("button",{ref:t,type:"submit",className:"inline-flex h-fit items-center justify-center gap-0.5 whitespace-nowrap border-0 bg-design-main p-2 py-1 text-sm font-medium text-white transition-colors focus-visible:ring-design-main disabled:opacity-20 rounded-md focus:outline-none focus-visible:ring-1 focus-visible:ring-offset-2 group",...e,children:[(0,w.__)("Next","extendify-local"),(0,kt.jsx)("span",{className:"transition-transform group-hover:translate-x-0.5",children:(0,kt.jsx)(Mt.A,{fill:"currentColor",icon:Ft.A,size:24})})]})),Vt=({needsDescription:e,lastHeight:t})=>e?(0,kt.jsx)(Et.P.div,{animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:(0,kt.jsx)(zt,{})}):(0,kt.jsx)(Et.P.div,{initial:{opacity:0,height:t||"auto"},animate:{opacity:1,height:248},transition:{duration:.4},children:(0,kt.jsx)(At,{height:248})}),Rt=()=>window.extSharedData?.partnerLogo?(0,kt.jsx)("div",{className:"flex h-10 max-w-52 items-center overflow-hidden md:max-w-72",children:(0,kt.jsx)("img",{className:"max-h-full max-w-full object-contain",src:window.extSharedData.partnerLogo,alt:window.extSharedData?.partnerName??""})}):(0,kt.jsx)(Mt.A,{width:void 0,icon:Ot,className:"h-8 w-auto text-banner-text"});var Ut=a(3640),Zt=a(9384),Jt=a(8638),Wt=a(5979);const Qt=()=>{const e=(0,Zt.z)(),t=(0,Jt.I)(),a=(0,xt.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-banner-main").trim(),[]),n=(0,xt.useMemo)(()=>(0,Ut.Mj)(a).desaturate(.3).lighten(.4).alpha(.25).toRgbString(),[a]),i=(0,xt.useMemo)(()=>(0,Ut.Mj)(a).isLight(),[a]),s=(0,xt.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-design-main").trim(),[]),o=(0,xt.useMemo)(()=>(0,Ut.Mj)(s).desaturate(.3).alpha(.25).toRgbString(),[s]),r=(0,xt.useMemo)(()=>Math.random(),[]),l=(0,Wt.G)(e,e=>(e/24e3+r)%1),c=(0,Wt.G)(l,e=>180*Math.sin(e*Math.PI*2)),d=(0,Wt.G)(l,e=>180*Math.cos(e*Math.PI*2));return t?null:i?(0,kt.jsx)(Et.P.div,{style:{background:`radial-gradient(circle at center, ${o}, transparent 40%)`,x:c,y:d},className:"pointer-events-none absolute inset-0 h-full w-full scale-200"}):(0,kt.jsx)(Et.P.div,{style:{background:`radial-gradient(circle at center, ${n}, transparent 40%)`,x:c,y:d},className:"pointer-events-none absolute inset-0 h-full w-full scale-200"})},Gt=()=>(0,kt.jsxs)("div",{className:"flex w-full flex-col max-w-5xl p-6 lg:p-10",children:[(0,kt.jsx)("h2",{className:"text-lg text-center text-gray-900 font-semibold px-4 py-0 m-0",children:(0,w.__)("One more thing before we start.","extendify-local")}),(0,kt.jsxs)("div",{className:"relative mx-auto w-full max-w-xl text-gray-900",children:[(0,kt.jsx)("p",{className:"text-base",children:(0,w.__)("Hey there, Launch is powered by Extendable and is required to proceed. You can install it from the link below and start over once activated.","extendify-local")}),(0,kt.jsx)("a",{className:"mt-4 text-base font-medium text-design-main underline",href:`${window.extSharedData.adminUrl}theme-install.php?theme=extendable`,children:(0,w.__)("Take me there","extendify-local")})]})]});var Kt=a(6427);const qt=({pages:e})=>{const{resetSiteInformation:t}=window.extLaunchData,{navigationIds:a,templatePartsIds:n,pageWithTitleTemplateId:i}=t||{},s=window.extSharedData.globalStylesPostID,{reset:o}=N(),[r,l]=(0,xt.useState)(!1);return(0,kt.jsxs)("div",{className:"flex w-full flex-col max-w-5xl p-6 lg:p-10",children:[(0,kt.jsx)("h2",{className:"text-lg text-center text-gray-900 font-semibold px-4 py-0 m-0 mb-4",children:(0,w.__)("Start Over?","extendify-local")}),(0,kt.jsxs)("div",{className:"relative mx-auto w-full max-w-xl text-gray-900",children:[(0,kt.jsx)("p",{className:"m-0 mb-4 text-base",children:(0,w.__)("It looks like you have been here before. We need to clean up some things before we can continue.","extendify-local")}),(0,kt.jsx)("p",{children:(0,kt.jsx)("strong",{children:(0,w.sprintf)(
// translators: %3$s is the number of old pages
// translators: %3$s is the number of old pages
(0,w.__)("%s pages/posts will be deleted.","extendify-local"),e.length)})})]}),(0,kt.jsx)("div",{className:"flex justify-end gap-2",children:(0,kt.jsx)(Xt,{handleOk:async()=>{l(!0),o({exclude:["descriptionBackup"]});for(const t of e)try{await $()({path:`/wp/v2/pages/${t}`,method:"DELETE"})}catch(e){console.warn(`delete pages failed to delete a page (id: ${t}) with the following error`,e)}for(const t of e)try{await $()({path:`/wp/v2/posts/${t}`,method:"DELETE"})}catch(e){console.warn(`delete posts failed to delete a page (id: ${t}) with the following error`,e)}for(const e of a||[])try{await $()({path:`/wp/v2/navigation/${e}`,method:"DELETE"})}catch(t){console.warn(`delete navigation failed to delete a navigation (id: ${e}) with the following error`,t)}for(const e of n||[])try{await $()({path:`/wp/v2/template-parts/${e}?force=true`,method:"DELETE"})}catch(t){console.warn(`delete template failed to delete template (id: ${e}) with the following error`,t)}try{i&&await $()({path:`/wp/v2/templates/${i}?force=true`,method:"DELETE"})}catch(e){console.warn("Failed to delete page-with-title template:",e)}try{s&&await $()({path:`/wp/v2/global-styles/${s}`,method:"POST",body:JSON.stringify({settings:{},styles:{}})})}catch(e){console.warn("Failed to reset global styles with the following error:",e)}window.location.reload()},handleExit:()=>{window.location.href=`${window.extSharedData.adminUrl}admin.php?page=extendify-assist`},processing:r})})]})},Xt=({handleOk:e,handleExit:t,processing:a})=>a?(0,kt.jsxs)(Kt.Button,{variant:"primary",onClick:e,disabled:a,className:"flex gap-2 items-center",children:[(0,kt.jsx)(Kt.Spinner,{className:"m-0"}),(0,kt.jsx)("div",{children:(0,w.__)("Processing...","extendify-local")})]}):(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(Kt.Button,{variant:"secondary",size:"",onClick:t,disabled:a,children:(0,w.__)("Exit","extendify-local")}),(0,kt.jsx)(Kt.Button,{variant:"primary",onClick:e,disabled:a,children:(0,w.__)("Delete and start over","extendify-local")})]}),ea=()=>{const e=(0,Jt.I)(),t=(0,xt.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-banner-main").trim(),[]),a=(0,xt.useMemo)(()=>(0,Ut.Mj)(t).desaturate(.3).lighten(.4).alpha(.2).toRgbString(),[t]),n=(0,xt.useMemo)(()=>(0,Ut.Mj)(t).isLight(),[t]),i=(0,xt.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-design-main").trim(),[]),s=(0,xt.useMemo)(()=>(0,Ut.Mj)(i).desaturate(.3).alpha(.2).toRgbString(),[i]);if(e)return null;const o=n?s:a;return(0,kt.jsx)(Et.P.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse at center, transparent 70%, ${o} 100%)`},animate:{opacity:[0,1,0]},transition:{duration:2.5,repeatDelay:4,repeat:1/0,ease:"linear"}})};var ta=a(9363);const aa=()=>{const e=(0,mt.useSelect)(e=>e("core").getCurrentTheme()),t=e&&"extendable"!==e?.textdomain,a=window.extLaunchData.resetSiteInformation.pagesIds??[],n=a.length>0,{title:i,description:s}=N(),o=!(i||s),r=(0,xt.useRef)(null);return(0,xt.useEffect)(()=>{
// translators: Launch is a noun.
document.title=(0,w.__)("Launch - AI-Powered Web Creation","extendify-local"),J("extendify_launch_loaded",(new Date).toISOString()),0===(0,at.getBlockTypes)().length&&(0,ta.registerCoreBlocks)(),et({stage:"launch_page"})},[]),t?(0,kt.jsx)(na,{children:(0,kt.jsx)("div",{className:"bg-white w-full max-w-3xl rounded-lg border border-design-main/60 relative z-10",children:(0,kt.jsx)(Gt,{})})}):n?(0,kt.jsx)(na,{children:(0,kt.jsx)("div",{className:"bg-white w-full max-w-3xl rounded-lg border border-design-main/60 relative z-10",children:(0,kt.jsx)(qt,{pages:a})})}):(0,kt.jsxs)(na,{children:[(0,kt.jsx)(Lt.N,{mode:"wait",initial:!1,children:(0,kt.jsx)(ia,{needsDescription:o})}),(0,kt.jsx)("div",{ref:r,className:"w-full max-w-3xl relative z-10 border border-design-main/60 rounded-md",children:(0,kt.jsx)(Lt.N,{mode:"wait",children:(0,kt.jsx)(Vt,{needsDescription:o,lastHeight:r.current?.offsetHeight},o?"description-launch":"creating-launch")})})]})},na=({children:e})=>{const{pulse:t}=N();return(0,kt.jsxs)("div",{style:{zIndex:1e5},className:"fixed inset-0 bg-white",children:[(0,kt.jsx)("div",{className:"relative h-dvh bg-banner-main text-banner-text text-base flex items-center justify-center",children:(0,kt.jsxs)("div",{className:"relative w-full flex items-center justify-center",children:[(0,kt.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -top-16 z-50",children:(0,kt.jsx)(Rt,{})}),(0,kt.jsx)("div",{className:"flex flex-col w-full items-center",children:e})]})}),(0,kt.jsx)(Qt,{}),t?(0,kt.jsx)(ea,{}):null]})},ia=({needsDescription:e})=>e?(0,kt.jsx)(Et.P.h2,{className:"text-3xl text-pretty text-banner-text font-semibold px-4 py-0 m-0 mb-4",animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:(0,w.__)("Describe the website you want to build","extendify-local")}):(0,kt.jsx)(Et.P.h2,{className:"text-3xl text-pretty text-banner-text font-semibold px-4 py-0 m-0 mb-4",animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:(0,w.__)("Creating your site now","extendify-local")});requestAnimationFrame(()=>{const e=document.getElementById("extendify-auto-launch-page");e&&(0,xt.createRoot)(e).render((0,kt.jsx)(aa,{}))})},1609(e){e.exports=window.React},790(e){e.exports=window.ReactJSXRuntime},1455(e){e.exports=window.wp.apiFetch},9363(e){e.exports=window.wp.blockLibrary},4997(e){e.exports=window.wp.blocks},6427(e){e.exports=window.wp.components},7143(e){e.exports=window.wp.data},6087(e){e.exports=window.wp.element},7723(e){e.exports=window.wp.i18n},6480(e){e.exports=window.wp.mediaUtils},5573(e){e.exports=window.wp.primitives},3832(e){e.exports=window.wp.url}},e=>{e.O(0,[65,223],()=>e(e.s=7722)),e.O()}]);