"use strict";(globalThis.webpackChunkextendify=globalThis.webpackChunkextendify||[]).push([[847],{5638(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)}),p=n._H3({name:n.YjP(),wordpressSlug:n.YjP()}),u=n.Ikc({sitePlugins:n.YOg(p)}),g=n._H3({type:n.YjP(),title:n.YjP(),description:n.YjP(),descriptionRaw:n.YjP().optional(),objective:n.YjP(),category:n.YjP().optional(),structure:n.YjP(),imageSearchTerms:n.YOg(n.YjP()),tone:n.YOg(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()]),phoneNumber:n.KCZ([n.zMY(),n.YjP()]).optional()}),m=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()}),h=n.Ikc({siteStyle:f.extend({variation:n._H3().optional()})});var y=a(7723),w=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.YOg(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.YjP().optional().catch(()=>""),"cta-link":n.KCZ([n.zMY(),n.YjP()]).optional().catch(()=>!1),go:n.zMY().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 _=e=>{const{"landing-page":t,"cta-link":a,...n}=e,i={...n,landingPage:"clickthrough"===t||void 0,landingPageCTALink:a};return Object.fromEntries(Object.entries(i).filter(([,e])=>void 0!==e&&""!==e))},S=e=>Object.fromEntries(Object.keys(e.shape).map(e=>[e,void 0])),P={go:!1,
// translators: this is for a action log UI. Keep it short
statusMessages:[(0,y.__)("Booting things up","extendify-local")],errorMessage:null,errorCount:0,description:null,descriptionBackup:void 0,descriptionRaw:null,urlParams:{},siteProfile:{...S(g)},...S(l),...S(u),...S(h),...S(m),...S(r),...S(o),...S(d),attempt:1},k=(e,t)=>({...P,urlParams:{...P.urlParams,...j},title:void 0,description:void 0,descriptionBackup:void 0,descriptionRaw:void 0,pulse:!1,setPulse:t=>e({pulse:t}),setData:(a,n)=>{T(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={...P,attempt:t().attempt+1};a&&Array.isArray(a)&&a.forEach(e=>{T(e)&&(n[e]=t()[e])}),e(n)}}),T=e=>Object.keys(P).includes(e),O={urlParams:v,siteProfile:g,...Object.fromEntries([l,u,h,m,r,o,d].flatMap(e=>Object.entries(e.shape)))},N=(0,w.vt)((0,x.Zr)((0,x.lt)(k,{name:"Extendify Launch Data"}),{name:`extendify-launch-data-${window.extSharedData.siteId}`,merge:(e,t)=>{const a=e&&"object"==typeof e?e:{},n=Object.fromEntries(Object.entries(a).filter(([e])=>e in O).map(([e,t])=>{const a=O[e].safeParse(t);return[e,a.success?a.data:void 0]})),{title:i,description:s,go:o,...r}=_(j);return{...t,...a,...n,title:i||a.title,description:s||a.description,descriptionRaw:s||a.descriptionRaw,descriptionBackup:a.descriptionBackup||s||i,go:o||a.go,urlParams:{title:i,description:s,go:o,...r}}},onRehydrateStorage:()=>e=>{e&&queueMicrotask(()=>{N.setState(e)})},partialize:e=>{const{statusMessages:t,errorMessage:a,errorCount:n,pulse:i,description:s,descriptionRaw:o,title:r,...l}=e;return Object.fromEntries(Object.entries(l).filter(([,e])=>Array.isArray(e)?e.length>0:Boolean(e)))}}),k);var M=a(1455),$=a.n(M);const Y=e=>{N.getState().addStatusMessage(e)},L=e=>{N.getState().setErrorMessage(e)},A=async e=>{try{return await e()}catch(t){L(
// 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,y.__)("The network seems unstable. Retrying...","extendify-local")),await D(1e3);const a=await e();return L(null),a}},E=async(e,t)=>{try{return await e()}catch(e){return console.error("failWithFallback:",e),t}},D=e=>new Promise(t=>setTimeout(t,e));async function H(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 F=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 I=a(1522),B=a(3832);const R=["header","header-with-center-nav-and-social","header-atlas-beacon","header-ember-harbor","header-catalina-skyline","header-ceadar-peak"],z=["header-center-nav-with-phone"],V=["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}}),U=e=>$()({path:(0,B.addQueryArgs)("/extendify/v1/auto-launch/options",{option:e})}),W=e=>{try{return $()({path:`/wp/v2/pages/${e}`})}catch{return null}},G=async(e,t)=>{try{const a=e=>new Promise((t,a)=>{e.onload=()=>t(),e.onerror=()=>a(new Error("Failed to load image."))}),n=new Image;n.src=e,n.crossOrigin="anonymous",await a(n);const i=document.createElement("canvas");i.width=n.width,i.height=n.height;const s=i.getContext("2d");if(!s)return null;s.drawImage(n,0,0);const o=await new Promise((e,t)=>{i.toBlob(a=>{a?e(a):t(new Error("Failed to convert canvas to Blob."))},"image/jpeg")}),r=new FormData;return r.append("file",new File([o],t.filename,{type:"image/jpeg"})),r.append("alt_text",t.alt||""),r.append("caption",t.caption||""),r.append("status","publish"),await(e=>$()({path:"wp/v2/media",body:e,method:"POST"}))(r)}catch(e){return null}},Q=e=>$()({path:"/wp/v2/posts",method:"POST",data:e}),q=e=>$()({path:"/wp/v2/tags",method:"POST",data:e}),K=e=>$()({path:"/wp/v2/categories",method:"POST",data:e});var X=a(8969),ee=a(1994);const{wpLanguage:te,showImprint:ae}=window.extSharedData,ne=`${X.zL}/api/home`,ie={"Content-Type":"application/json"},se={siteImages:[]},oe=`${X.a3}/api/search`,re={"Content-Type":"application/json"};var le=a(6940),ce=a(6480);const{showAILogo:de}=window.extSharedData,pe={logoUrl:"https://images.extendify-cdn.com/demo-content/logos/ext-custom-logo-default.webp"},ue=`${X.AY}/api/site-profile/generate-logo`,ge={"Content-Type":"application/json"},me=`${X.zL}/api/page-templates`,fe={"Content-Type":"application/json"},he=n._H3({recommended:n.YOg(c)});var ye=a(6935);const we=()=>$()({path:"extendify/v1/auto-launch/active-plugins"}),xe=(e,t)=>e?.filter(e=>e.includes(t))?.length,be=async e=>{const t=async()=>{const t=await $()({path:"/wp/v2/plugins",method:"POST",data:{slug:e}});return await(0,ye.yB)({slug:e,source:"auto-launch"}),t};try{return await t()}catch(a){if("folder_exists"===a?.code)return console.warn(`Plugin ${e} already installed. Attempting to activate...`),await ve(e);console.error(`Error installing ${e}. Retrying...`,a);try{return await t()}catch(t){console.error(`Failed ${e} again. Giving up`,t)}}},ve=async e=>{const t=await $()({path:(0,B.addQueryArgs)("/wp/v2/plugins",{search:e})});return t?.[0]},je=async e=>{const t=e=>$()({path:`/wp/v2/plugins/${e}`,method:"POST",data:{status:"active"}});try{await t(e)}catch(a){console.warn(`Error activating ${e}. Retrying with fresh data...`);const{plugin:n}=await ve(e);try{await t(n)}catch(t){console.error(`Failed to activate ${e} again. Giving up`,t)}}},Ce=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 we())?.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,ye.yB)({slug:e,source:"auto-launch"});try{return await _e(e)}catch(t){return await _e(e).catch(()=>e)}},_e=e=>$()({path:"/extendify/v1/shared/process-placeholders",method:"POST",data:{patterns:e}}),{pluginGroupId:Se,installedPluginsSlugs:Pe}=window.extSharedData,ke={sitePlugins:[]},Te=`${X.AY}/api/site-plugins`,Oe={"Content-Type":"application/json"},Ne=n.Ikc({selectedPlugins:n.YOg(p)}),Me=async({siteProfile:e={},requiredOnly:t=!1,showStatus:a=!0})=>{a&&
// translators: this is for a action log UI. Keep it short
Y((0,y.__)("Setting up site functionality","extendify-local"));const n=JSON.stringify({...ee.m,...e,siteProfile:e,siteObjective:e.objective,pluginGroupId:Se,requiredOnly:t}),i=await A(()=>F(Te,{method:"POST",headers:Oe,body:n}));if(!i?.ok)return ke;const s=await E(async()=>{const e=await i.json(),t=["give","woocommerce"],a=Ne.parse(e).selectedPlugins.toSorted((e,a)=>{const n=t.indexOf(e.wordpressSlug),i=t.indexOf(a.wordpressSlug);return-1!==n&&-1!==i?n-i:-1!==n?-1:-1!==i?1:0});return u.parse({sitePlugins:a})},ke),o=s.sitePlugins.filter(({wordpressSlug:e})=>!Pe?.includes(e));a&&o.length>0&&Y(
// translators: this is for a action log UI. Keep it short
// translators: this is for a action log UI. Keep it short
(0,y.__)("Setting up functionality for your website","extendify-local"));for(const{wordpressSlug:e}of o){const t=await be(e);await je(t?.plugin??e)}return s},$e=n.Ikc({siteProfile:g}),Ye=`${X.AY}/api/site-profile`,Le={"Content-Type":"application/json"},Ae={aiHeaders:[],aiBlogTitles:[]},Ee=`${X.AY}/api/site-strings`,De={"Content-Type":"application/json"};var He=a(365);const Fe={siteStyle:{}},Ie=`${X.AY}/api/styles`,Be={"Content-Type":"application/json"},Re=n.YOg(f.omit({variation:!0})),ze=async({fontFamilyId:e,...t})=>{const a=`${t.fontFamilySlug}-${t.fontWeight}`;for(let n=0;n<=2;n++)try{n>0&&await(0,He.yy)(1e3);const a=await $()({path:`/wp/v2/font-families/${e}/font-faces`,method:"POST",body:Ue(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.`)}},Ve=async e=>{const t=e.fontFace.map(async e=>{const t=await Ze(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,B.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:Je(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 ze(e));return{...n,fontFace:s.filter(Boolean)}},Ze=async e=>{for(let t=0;t<=2;t++)try{t>0&&await(0,He.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}},Je=({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},Ue=({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},We={"Content-type":"application/json",Accept:"application/json","X-Extendify":"true"},{urlParams:Ge}=window.extLaunchData,Qe=({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:p}=ee.m,u=N.getState()?.attempt||1,g=JSON.stringify({...ee.m,autoLaunch:!0,stage:e,attempt:u,skippedDescription:Boolean(Ge?.title||Ge?.description),insightsId:l,hostpartner:c,siteURL:d,language:p,sitePlugins:a?.map(e=>e?.name),urlParameters:Ge,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}});return fetch(`${X.Dq}/api/v1/launch`,{method:"POST",headers:We,body:g,keepalive:!0})};var qe=a(8512),Ke=a(4997);const Xe=async(e,{stickyNav:t})=>{const a=[];for(const n of e){const e=[],i=new Set;Y((0,y.sprintf)((0,y.__)("Adding page: %s","extendify-local"),n.name));for(const[t,a]of n.patterns.entries()){const t=a.code,n=a.patternTypes?.[0],{slug:s}=Object.values(qe.Q).find(({alias:e})=>e.includes(n))||{};!i.has(s)&&s?(i.add(s),e.push(et(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 tt(s)}catch(e){s.template="no-title",o=await tt(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},et=(e,t)=>e.replace(/(<div\s[^>]*class="[^"]*\bwp-block-group\b[^"]*")/,`$1 id="${t}"`),tt=e=>$()({path:"wp/v2/pages",data:e,method:"POST"}),at=e=>$()({path:`wp/v2/pages/${e.id}`,data:e,method:"POST"}),{homeUrl:nt}=window.extSharedData,it=/href="(#extendify-[\w-]+)"/gi,st=e=>e?.content?.raw?.match(it),ot=async({pageContent:e,availablePages:t})=>{try{const a=await fetch(`${X.AY}/api/link-pages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ee.m,pageContent:e,availablePages:t})});if(!a.ok)throw new Error("Bad response from server");return await a.json()}catch(e){return{}}},rt=async({content:e="",title:t,slug:a})=>{const n=await $()({path:(0,B.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}})},lt=(e,t)=>$()({path:`wp/v2/navigation/${e}`,method:"POST",data:{content:t}}),ct=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 qe.Q[t]?.navOrder??Object.values(qe.Q).find(e=>e.alias?.includes(t))?.navOrder??Object.keys(qe.Q).length+1},l=[...s,...n],c=l.find(e=>{const t=o(e);return"contact"===t||qe.Q.contact?.alias?.includes(t)}),d=l.filter(e=>e!==c).sort((e,t)=>r(e)-r(t)),p=(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`),u=p.slice(0,5).join(""),g=p.slice(5),m=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,y.__)("More","extendify-local"),url:"#",kind:"custom"})} --\x3e ${g.join("")} \x3c!-- /wp:navigation-submenu --\x3e`:g.join("");await lt(e,u+m)},dt=e=>{try{return JSON.parse(e.match(/<!-- wp:navigation([\s\S]*?)-->/)[1])}catch(e){return{}}},pt=(e,t)=>{const a=JSON.stringify({...dt(e),...t});return e.replace(/(<!--\s*wp:navigation\b[^>]*>)([^]*?)(<!--\s*\/wp:navigation\s*-->)/gi,`\x3c!-- wp:navigation ${a} /--\x3e`)};var ut=a(7143);const{globalStylesPostID:gt}=window.extSharedData,mt=(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,y.__)("Added by Launch","extendify-local"),content:t}}),ft=(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}]}));var ht=a(6087),yt=a(7581),wt=a(4225);const{homeUrl:xt,showImprint:bt,wpLanguage:vt}=window.extSharedData,jt=()=>{const{setErrorMessage:e,addStatusMessage:t,needToStall:a,...n}=N(),{setUserGaveConsent:i}=(0,yt.D)(),c=(0,ht.useRef)(!1),[p,u]=(0,ht.useState)(!a()),[f,w]=(0,ht.useState)(!1);return((e=!0,t)=>{(0,ht.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])})(p,()=>{Qe({stage:"exit_early"})}),Ct("siteProfile",()=>n.descriptionRaw||n.title?n:null,async e=>(Qe({stage:"get_profile"}),await(async({title:e,descriptionRaw:t,urlParams:a})=>{
// translators: this is for a action log UI. Keep it short
Y((0,y.__)("Creating a site profile","extendify-local"));const n=JSON.stringify({...ee.m,title:e||window.extSharedData.siteTitle,description:t,autoLaunch:!0}),i=await F(Ye,{method:"POST",headers:Le,body:n},2e4);if(!i?.ok)throw new Error("Failed to fetch site profile");const{profile:s}=await i.json(),o={...g.parse(s),..._(a),descriptionRaw:t};return await J("extendify_site_profile",JSON.stringify(o)),$e.parse({siteProfile:o})})(e))),Ct("siteLogo",()=>n.siteProfile?.title?n:null,async e=>(Qe({stage:"get_logo"}),await(async({siteProfile:e})=>{if(!de)return pe;
// translators: this is for a action log UI. Keep it short
Y((0,y.__)("Generating a logo","extendify-local"));const{logoObjectName:t}=e,a=JSON.stringify({...ee.m,objectName:t}),n=await A(()=>F(ue,{method:"POST",headers:ge,body:a}));if(!n?.ok)return pe;const i=await E(async()=>{const{logoUrl:e}=l.parse(await n.json());return await(0,le.y)(e,{size:{width:256,height:256},mimeType:"image/webp"})},pe.logoUrl);return await(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,ce.uploadMedia)({filesList:[s],onFileChange:async([e])=>{e?.id&&await J("site_logo",e.id)},onError:console.error})})(i),l.parse({logoUrl:i})})(e))),Ct("sitePlugins",()=>n.siteProfile?.title?n:null,async e=>(Qe({stage:"get_plugins"}),await Me(e))),Ct("siteStyle",()=>n.siteProfile?.title?n:null,async e=>(Qe({stage:"get_style"}),await(async({siteProfile:e})=>{
// translators: this is for a action log UI. Keep it short
Y((0,y.__)("Picking the perfect design","extendify-local"));const t=JSON.stringify({...ee.m,siteProfile:e,count:1}),a=await A(()=>F(Ie,{method:"POST",headers:Be,body:t},2e4));return a?.ok?E(async()=>{const e=await a.json(),t=Re.parse(e)[0],n=await(async({slug:e,fonts:t},a)=>{const{fallback:n=!1}=a||{},i=(await H({path:"wp/v2/global-styles/themes/extendable/variations"})).filter(e=>(e.settings?.color||e.styles?.color)&&(e.settings?.typography||e.styles?.typography));let s=i.find(t=>(t.slug||t.title.toLowerCase().trim().replace(/\s+/g,"-"))===e);return!s&&n&&(s=i.sort(()=>Math.random()-.5)[0]),t?(0,He.$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"}),h.parse({siteStyle:i})},Fe):Fe})(e))),Ct("siteStrings",()=>n.siteProfile?.title?n:null,async e=>(Qe({stage:"get_strings"}),await(async({siteProfile:e})=>{
// translators: this is for a action log UI. Keep it short
Y((0,y.__)("Generating site content ideas","extendify-local"));const t=JSON.stringify({...ee.m,siteProfile:e}),a=await A(()=>F(Ee,{method:"POST",headers:De,body:t}));return a?.ok?E(async()=>m.parse(await a.json()),Ae):Ae})(e))),Ct("siteImages",()=>n.siteProfile?.title?n:null,async e=>(Qe({stage:"get_images"}),await(async({siteProfile:e})=>{
// translators: this is for a action log UI. Keep it short
Y((0,y.__)("Finding the perfect images","extendify-local"));const t=JSON.stringify({...ee.m,siteProfile:e,source:"auto-launch"}),a=await A(()=>F(oe,{method:"POST",headers:re,body:t}));return a?.ok?E(async()=>r.parse(await a.json()),se):se})(e))),Ct("home",()=>[n.siteProfile,n.siteStyle,n.siteImages,n.sitePlugins,n.aiHeaders].every(e=>void 0!==e)?n:null,async e=>(Qe({stage:"get_home"}),await(async({siteProfile:e,sitePlugins:t,siteImages:a,aiHeaders:n})=>{
// translators: this is for a action log UI. Keep it short
Y((0,y.__)("Preparing your home page","extendify-local"));const i=JSON.stringify({...ee.m,siteProfile:e,siteImages:a,sitePlugins:t,aiHeaders:n}),r=await A(()=>F(ne,{method:"POST",headers:ie,body:i})),l=s.parse(await r.json()),c=!!Array.isArray(ae)&&ae.includes(te??"")&&"Business"===e.category,{headers:d,footers:p}=await(async({useNavFooter:e=!1,siteProfile:t={}}={})=>{const a=await $()({path:"/wp/v2/template-parts"}),n=a.filter(({theme:e})=>"extendable"===e),i="home services"===t.type?z:R,s=n?.filter(({slug:e})=>i.includes(e)),o=e&&a?.some(({slug:e})=>Z.includes(e))?Z:V;return{headers:s,footers:n.filter(({slug:e})=>o.includes(e))}})({useNavFooter:c,siteProfile:e}),u=d[0]?.content?.raw?.trim()??"",g=p[0]?.content?.raw?.trim()??"";return o.parse({home:{...l,headerCode:u,footerCode:g}})})(e))),Ct("pages",()=>[n.siteProfile,n.siteStyle,n.siteImages,n.sitePlugins].every(e=>void 0!==e)?n:null,async e=>(Qe({stage:"get_pages"}),await(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,y.__)("Preparing your pages","extendify-local"));const i=JSON.stringify({...ee.m,siteProfile:e,siteStyle:a,siteImages:{siteImages:n},sitePlugins:t,includeOptional:!1}),s=await A(()=>F(me,{method:"POST",headers:fe,body:i})),o=he.parse(await s.json());return d.parse({pages:[...o.recommended]})})(e))),Ct("generalUpdates",()=>[n.siteProfile,n.home,n.pages].every(e=>void 0!==e)?n:null,async({siteProfile:e,sitePlugins:a,siteStyle:n})=>{Qe({stage:"set_general",siteProfile:e,sitePlugins:a,siteStyle:n});const{title:s}=e;
// translators: this is for a action log UI. Keep it short
t((0,y.__)("Adding admin configurations","extendify-local")),await J("permalink_structure","/%postname%/"),i(!0),s&&await J("blogname",s)}),Ct("pluginConfigurations",()=>n.sitePlugins?n:null,async()=>{Qe({stage:"set_plugin_config"});const e=await we();if(xe(e,"wpforms-lite")&&await J("wpforms_activation_redirect","skip"),xe(e,"all-in-one-seo-pack")&&await J("aioseo_activation_redirect","skip"),xe(e,"google-analytics-for-wordpress")){const e="_transient__monsterinsights_activation_redirect";await J(e,null)}}),(0,ht.useEffect)(()=>{if(a())return;const{home:i,pages:s,siteProfile:o,sitePlugins:r,siteStyle:l,aiBlogTitles:d,siteImages:p}=n;i&&s&&(c.current||(c.current=!0,(async()=>{const{objective:e,structure:a,category:c}=o,g=!!Array.isArray(bt)&&bt.includes(vt??"")&&"Business"===c,m=l?.variation?.settings?.typography?.fontFamilies?.custom;let f=l?.variation;if(m?.length){Qe({stage:"install_fonts"}),
// translators: this is for a action log UI. Keep it short
t((0,y.__)("Installing fonts locally","extendify-local"));const e=await(async e=>{const t=[];for(const a of e)t.push(await Ve(a));return t.filter(Boolean)})(m).catch(()=>[]);f=((e,t)=>(0,He.$N)(e,{settings:{typography:{fontFamilies:{custom:null}}}},{settings:{typography:{fontFamilies:{custom:t.filter(Boolean)}}}}))(l.variation,e)}if(l?.vibe&&"natural-1"!==l.vibe){
// translators: vibe in this context is a noun - the feeling of their site design.
t((0,y.__)("Setting the website style","extendify-local")),Qe({stage:"compute_vibe"});const e=await(async e=>{if(!(e=>!!e&&"string"==typeof e&&""!==e.trim()&&"natural-1"!==e)(e))return null;const{styles:t}=await $()({path:"wp/v2/global-styles/themes/extendable?context=edit"});return t?.blocks?Object.fromEntries(Object.entries(t.blocks).map(([t,a])=>{if(!a?.variations)return[t,a];const{variations:n,...i}=a;return Object.keys(n).some(e=>e.includes("--natural-1--"))?[t,{...i,variations:ft(n,e)}]:[t,a]})):null})(l.vibe).catch(()=>null);e&&(f={...f,styles:{...f.styles,blocks:e}})}Qe({stage:"set_vibe"}),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}})})(gt,e))(f),t((0,y.__)("Working on the navigation","extendify-local"));const{id:h}=await rt({title:(0,y.__)("Header Navigation","extendify-local"),slug:"site-navigation"});let x=pt(i.headerCode||"",{ref:h});if("landing-page"===e){
// translators: this is for a action log UI. Keep it short
t((0,y.__)("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,"")}"string"==typeof o.phoneNumber&&(x=x.replaceAll("206-555-0100",o.phoneNumber||
// translators: Use a number that is appropriate for the locale. It does not need to be this exact number. This is a placeholder phone number. For example, in pt_BR you could use (11) 91234-5678.
// translators: Use a number that is appropriate for the locale. It does not need to be this exact number. This is a placeholder phone number. For example, in pt_BR you could use (11) 91234-5678.
(0,y.__)("206-555-0100","extendify-local"))),Qe({stage:"set_navigation"}),await mt("extendable/header",x);let b=null,v=i.footerCode||"";g&&(b=(await rt({title:(0,y.__)("Footer Navigation","extendify-local"),slug:"footer-navigation"})).id,v=pt(v,{ref:b})),Qe({stage:"set_footer"}),await mt("extendable/footer",v),
// translators: this is for a action log UI. Keep it short
t((0,y.__)("Creating pages","extendify-local"));const j=(e=>{const{home:t,pages:a,siteProfile:n}=e,i={id:"home",name:qe.Q.home.title,slug:"home",patterns:t.patterns},s="blog"===n.objective?{name:qe.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=s?.[0]?.patterns?.find(e=>e.patternTypes?.includes("page-title"));C&&(Qe({stage:"set_page_title_pattern"}),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,Ke.createBlock)("core/post-title",a)}return e.innerBlocks?.length&&(e.innerBlocks=e.innerBlocks.map(a)),e};return(0,Ke.serialize)((0,Ke.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,y.__)("Added by Launch","extendify-local"),content:t}})}catch{}})(C.code));const _=[];Qe({stage:"replace_placeholder_patterns"});for(const e of j){const t=await Ce(e.patterns),a={...e,patterns:t};_.push(a)}Qe({stage:"generate_page_content"});const S=await(async(e,t)=>{const a=await Promise.allSettled(e.map(e=>(async(e,t)=>{const{siteProfile:a}=t;return await A(async()=>{const t=await fetch(`${X.AY}/api/patterns`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ee.m,siteProfile:a,page:e})});if(!t.ok)throw new Error(`Pattern generation failed with status ${t.status}`);return await t.json()})})(e,t).then(e=>e).catch(()=>e)));return a?.map((t,a)=>t.value||e[a])})(_,n),P="single-page"===a&&"landing-page"!==e,k=await Xe(S,{stickyNav:P}),T=i?.patterns?.some(e=>e.patternTypes.includes("blog-section"));("blog"===e||T)&&(Qe({stage:"create_blog_sample_data"}),
// translators: this is for a action log UI. Keep it short
t((0,y.__)("Creating blog sample data","extendify-local")),await(async(e,t)=>{const a=I[window.extSharedData?.wpLanguage||"en_US"]||I.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 K(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||[]).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,y.sprintf)((0,y.__)("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 Q(r)}catch(e){}})({aiBlogTitles:d},p)),p?.length&&(Qe({stage:"set_hello_world_image"}),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,y.__)("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)}})(p));let O={};g&&(Qe({stage:"create_imprint"}),O=await(async({siteStyle:e})=>{try{const t=await(async({siteStyle:e})=>{const t=await fetch(`${X.zL}/api/page-imprint`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ee.m,siteStyle:e})});return{...(await t.json()).template}})({siteStyle:e}),[a]=await Xe([t],{stickyNav:!1});return a}catch(e){return console.error("Failed to add imprint page:",e),null}})({siteStyle:l}).catch(()=>null));const N=await we(),M=[];if(xe(N,"woocommerce")){Qe({stage:"import_woocommerce_products"}),t(
// translators: this is for a action log UI. Keep it short
// translators: this is for a action log UI. Keep it short
(0,y.__)("Setting up your online store","extendify-local")),await H({path:"/extendify/v1/auto-launch/import-woocommerce"}).catch(()=>null);const e=await U("woocommerce_shop_page_id"),a=e?await W(e):null;a&&M.push(a)}xe(N,"the-events-calendar")&&M.push({title:{rendered:(0,y.__)("Events","extendify-local")},slug:"events",link:`${xt}/events`}),Qe({stage:"set_page_links"});const Y="single-page"===a?await(async(e,t,a)=>{let n=e?.[0]?.content?.raw;if(!n)return e;const{objective:i,activePlugins:s,landingPageCTALink:o}=a;if("landing-page"===i){const t=o&&"string"==typeof o?o:"#";return e[0]=at({id:e[0].id,content:n.replaceAll(/href="(#extendify-[\w|-]+)"/gi,`href="${t}"`)}),e}const r=t?.[0]?.patterns?.map(e=>e?.patternTypes?.[0])?.filter(e=>"hero-header"!==e)?.map(e=>{const{slug:t}=Object.values(qe.Q).find(({alias:t})=>t.includes(e))||{};return t})?.filter(Boolean)?.flat(),l=t?.filter(e=>"home"!==e.slug)?.map(e=>e.slug)?.filter(Boolean)??[],c=[];if(xe(s,"woocommerce")){const e=await W(await U("woocommerce_shop_page_id")).catch(()=>null);e?.slug&&c.push(e.slug)}xe(s,"the-events-calendar")&&c.push("events");const d=(r??[]).concat(c);if(!d.length)return e[0]=at({id:e[0].id,content:n.replaceAll(/href="(#extendify-[\w|-]+)"/gi,'href="#"')}),e;const{suggestedLinks:p}=await ot({pageContent:n,availablePages:d})||{};return n=Object.keys(p??{}).reduce((e,t)=>{const a=p[t];if(!a)return e;const n=c.concat(l).includes(a)?`"${nt}/${a}"`:`"${nt}/#${a}"`;return e.replaceAll(`"${t}"`,n)},n),e[0]=at({id:e[0].id,content:n}),e})(k,S,{objective:e,activePlugins:N,landingPageCTALink:o.landingPageCTALink}):await(async(e,t)=>{const a=e.find(({originalSlug:e})=>e?.startsWith("contact"))?.slug,n=e.filter(st).map(({content:e})=>(0,Ke.parse)(e.raw||"").map(e=>(0,Ke.getBlockContent)(e)).filter(e=>e.match(it)).join("")),i=e.concat(t).filter(({slug:e})=>!e.startsWith("home")).map(({slug:e})=>`/${e}`),s=(await Promise.allSettled(n.map(e=>ot({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(st).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)?`"${nt}/${a??""}"`:`"${nt}/${n.replace(/^\//,"")}"`}):e.content.raw.replace(new RegExp(it,"g"),e=>e?'href="#"':"");return at({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),L=[];if(b&&O?.title){const{originalSlug:e,title:t}=O;L.push({id:e,name:t.rendered,slug:e,patterns:[]})}Qe({stage:"set_navigation_links"}),"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(qe.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(qe.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 lt(e,d)})(h,i?.patterns,M,k):await ct(h,j,Y,M),b&&await ct(b,L,O?.id?[...Y,O]:Y,[])),Qe({stage:"prefetch_assist_data"}),await(async()=>await $()({path:"extendify/v1/auto-launch/prefetch-assist-data"}))(),Qe({stage:"final_steps"}),await(e=>{const t=(0,ut.select)("core/preferences").get("core","renderingModes")||{};t?.extendable?.page!==e&&(0,ut.dispatch)("core/preferences").set("core","renderingModes",{...t,extendable:{...t.extendable||{},page:e}})})("template-locked"),await $()({path:"/extendify/v1/launch/post-launch-functions",method:"POST"}),
// translators: this is for a action log UI. Keep it short
t((0,y.__)("All done!","extendify-local")),await Qe({stage:"finished",siteProfile:o,sitePlugins:r,siteStyle:l}),u(!1),w(!0)})().catch(t=>{console.error(t),c.current=!1,a(!0),e((0,y.__)("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:f}},Ct=(e,t,a)=>{const{setData:n,setErrorMessage:i,needToStall:s}=N(),o=t?.()??null,{data:r,error:l}=(0,wt.A)(o&&!s()?e:null,()=>a(t()));(0,ht.useEffect)(()=>{r&&Object.entries(r).forEach(([e,t])=>{n(e,t)})},[r,n]),(0,ht.useEffect)(()=>{l&&!s()&&(console.error(l),i((0,y.__)("Having some trouble with this step. Trying again...","extendify-local")))},[l,i,s])};var _t=a(790);const St=(0,_t.jsxs)("svg",{viewBox:"0 0 2524 492",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("title",{children:(0,y.__)("Extendify Logo","extendify-local")}),(0,_t.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,_t.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,_t.jsx)("path",{d:"M994.142 125H1150.14V176H994.142V125ZM1102.64 372H1041.64V48H1102.64V372Z",fill:"currentColor"}),(0,_t.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,_t.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,_t.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,_t.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,_t.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,_t.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,_t.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"})]}),Pt=((0,y._x)("Loading animation","icon","extendify-local"),(0,y.__)("Checkmark","extendify-local"),(0,_t.jsxs)("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("title",{children:(0,y.__)("Three bars loading animation","extendify-local")}),(0,_t.jsxs)("rect",{x:"6",y:"20",width:"6",height:"6",rx:"3",fill:"currentColor",fillOpacity:"0.5",children:[(0,_t.jsx)("animate",{attributeName:"y",values:"20;8;8;8;8;8;20",keyTimes:"0;0.167;0.333;0.5;0.667;0.833;1",dur:"2500ms",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.25 0.1 0.25 1; 0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 0; 0.25 0.1 0.25 1"}),(0,_t.jsx)("animate",{attributeName:"height",values:"6;32;32;32;32;32;6",keyTimes:"0;0.167;0.333;0.5;0.667;0.833;1",dur:"2500ms",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.25 0.1 0.25 1; 0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 0; 0.25 0.1 0.25 1"})]}),(0,_t.jsxs)("rect",{x:"20",y:"20",width:"6",height:"6",rx:"3",fill:"currentColor",fillOpacity:"0.5",children:[(0,_t.jsx)("animate",{attributeName:"y",values:"20;20;8;8;8;20;20",keyTimes:"0;0.167;0.333;0.5;0.667;0.833;1",dur:"2500ms",repeatCount:"indefinite",calcMode:"spline",keySplines:"0 0 0 0; 0.25 0.1 0.25 1; 0 0 0 0; 0 0 0 0; 0.25 0.1 0.25 1; 0 0 0 0"}),(0,_t.jsx)("animate",{attributeName:"height",values:"6;6;32;32;32;6;6",keyTimes:"0;0.167;0.333;0.5;0.667;0.833;1",dur:"2500ms",repeatCount:"indefinite",calcMode:"spline",keySplines:"0 0 0 0; 0.25 0.1 0.25 1; 0 0 0 0; 0 0 0 0; 0.25 0.1 0.25 1; 0 0 0 0"})]}),(0,_t.jsxs)("rect",{x:"34",y:"20",width:"6",height:"6",rx:"3",fill:"currentColor",fillOpacity:"0.5",children:[(0,_t.jsx)("animate",{attributeName:"y",values:"20;20;20;8;20;20;20",keyTimes:"0;0.167;0.333;0.5;0.667;0.833;1",dur:"2500ms",repeatCount:"indefinite",calcMode:"spline",keySplines:"0 0 0 0; 0 0 0 0; 0.25 0.1 0.25 1; 0.25 0.1 0.25 1; 0 0 0 0; 0 0 0 0"}),(0,_t.jsx)("animate",{attributeName:"height",values:"6;6;6;32;6;6;6",keyTimes:"0;0.167;0.333;0.5;0.667;0.833;1",dur:"2500ms",repeatCount:"indefinite",calcMode:"spline",keySplines:"0 0 0 0; 0 0 0 0; 0.25 0.1 0.25 1; 0.25 0.1 0.25 1; 0 0 0 0; 0 0 0 0"})]})]})),kt=(0,_t.jsxs)("svg",{width:"172",height:"118",viewBox:"0 0 172 118",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,_t.jsx)("title",{children:(0,y.__)("Site creation loading animation","extendify-local")}),(0,_t.jsx)("rect",{x:"1",y:"1",width:"170",height:"116",rx:"12",stroke:"currentColor",strokeOpacity:"0.5",strokeWidth:"2",strokeLinecap:"round"}),(0,_t.jsxs)("g",{clipPath:"url(#clip0)",children:[(0,_t.jsxs)("rect",{rx:"6",fill:"url(#gradTL)",children:[(0,_t.jsx)("animate",{attributeName:"x",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"9;9;9;9;9;9;9;9;9;9;9;9;9;9;9",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"y",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"9;9;9;9;9;9;9;9;9;9;9;9;9;9;9",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"width",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"100;100;48;48;48;48;48;48;74;74;74;74;74;74;100",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"height",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"100;100;100;100;100;100;47;47;47;47;47;47;100;100;100",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"})]}),(0,_t.jsxs)("rect",{rx:"6",fill:"url(#gradTR)",children:[(0,_t.jsx)("animate",{attributeName:"x",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"115;115;63;63;63;63;63;63;89;89;89;89;89;89;115",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"y",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"9;9;9;9;9;9;9;9;9;9;9;9;9;9;9",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"width",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"48;48;100;100;100;100;100;100;74;74;74;74;74;74;48",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"height",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"100;100;100;100;47;47;47;47;47;47;47;47;100;100;100",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"})]}),(0,_t.jsxs)("rect",{rx:"6",fill:"url(#gradBL)",children:[(0,_t.jsx)("animate",{attributeName:"x",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"9;9;9;9;9;9;9;9;9;9;9;9;9;9;9",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"y",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"109;109;109;109;109;109;62;62;62;62;62;109;109;109;109",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"width",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"48;48;48;48;48;48;48;48;80;80;0;0;0;0;48",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"height",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"0;0;0;0;0;0;47;47;47;47;47;0;0;0;0",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"})]}),(0,_t.jsxs)("rect",{rx:"6",fill:"url(#gradBR)",children:[(0,_t.jsx)("animate",{attributeName:"x",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"63;63;63;63;63;63;63;63;95;95;9;9;89;89;63",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"y",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"115;115;115;115;62;62;62;62;62;62;62;62;115;115;115",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"width",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"100;100;100;100;100;100;100;100;68;68;154;154;74;74;100",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"}),(0,_t.jsx)("animate",{attributeName:"height",dur:"4900ms",repeatCount:"indefinite",calcMode:"spline",values:"47;47;47;47;47;47;47;47;47;47;47;47;47;47;47",keyTimes:"0;0.041;0.143;0.184;0.286;0.327;0.429;0.469;0.571;0.612;0.714;0.755;0.857;0.898;1",keySplines:"0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1;0 0 1 1;0 0 0.58 1"})]})]}),(0,_t.jsxs)("defs",{children:[(0,_t.jsxs)("linearGradient",{id:"gradTL",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,_t.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.5"}),(0,_t.jsx)("stop",{offset:"50%",stopColor:"currentColor",stopOpacity:"0.35"}),(0,_t.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.5"})]}),(0,_t.jsxs)("linearGradient",{id:"gradTR",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,_t.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.5"}),(0,_t.jsx)("stop",{offset:"50%",stopColor:"currentColor",stopOpacity:"0.35"}),(0,_t.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.5"})]}),(0,_t.jsxs)("linearGradient",{id:"gradBL",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,_t.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.5"}),(0,_t.jsx)("stop",{offset:"50%",stopColor:"currentColor",stopOpacity:"0.35"}),(0,_t.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.5"})]}),(0,_t.jsxs)("linearGradient",{id:"gradBR",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,_t.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.5"}),(0,_t.jsx)("stop",{offset:"50%",stopColor:"currentColor",stopOpacity:"0.35"}),(0,_t.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.5"})]}),(0,_t.jsx)("clipPath",{id:"clip0",children:(0,_t.jsx)("rect",{width:"154",height:"100",fill:"white",transform:"translate(9 9)"})})]})]});var Tt=a(319),Ot=a(3473),Nt=a(6221),Mt=a(8845);const{adminUrl:$t,homeUrl:Yt}=window.extSharedData,Lt=({height:e})=>{const{done:t}=jt(),a=(0,ht.useRef)(0),[n,i]=(0,ht.useState)(null),[s,o]=(0,ht.useState)(!1),{statusMessages:r,errorMessage:l,setErrorMessage:c,errorCount:d,needToStall:p,resetErrorCount:u,setPulse:g}=N();return((e,t=2e3,a=[])=>{const n=(0,ht.useRef)(0),i=(0,ht.useRef)(null);(0,ht.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])})(()=>!l&&(!(a.current>=r.length)&&(r.length-a.current>3&&a.current>0&&(a.current=r.length-3),i(r[a.current]),a.current+=1,a.current<r.length)),Math.floor(2500+750*Math.random()),[r.length]),(0,ht.useEffect)(()=>{if(!l)return;const e=setTimeout(()=>{c(null)},5e3);return()=>clearTimeout(e)},[l,c]),(0,ht.useEffect)(()=>{g(!t)},[t]),(0,ht.useEffect)(()=>{if(!t)return;o(!0);const e=setTimeout(()=>{window.location.replace(`${Yt}?extendify-launch-success=1`)},3e3);return()=>clearTimeout(e)},[t]),(0,ht.useEffect)(()=>{if(!p())return;const e=setTimeout(()=>{u()},1e4);return()=>clearTimeout(e)},[p,d,u]),p()?(0,_t.jsx)("div",{className:"w-full rounded-3xl border border-gray-300 bg-[#F0F0F0CC]/80 backdrop-blur-[80px] p-6 flex items-center gap-2",style:{boxShadow:"0px 4px 30px 0px #0000001A"},children:(0,_t.jsxs)("div",{className:"flex gap-2",children:[(0,_t.jsx)("div",{className:"w-6 shrink-0 pt-0.5",children:(0,_t.jsx)(Tt.A,{icon:Ot.A,size:24})}),(0,_t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,_t.jsx)("span",{className:"text-lg font-semibold leading-7 text-gray-900",children:(0,y.__)("We are experiencing some delays","extendify-local")}),(0,_t.jsx)("span",{className:"text-base font-normal leading-6 text-gray-900",children:(0,y.__)("Pausing for a few seconds","extendify-local")})]})]})}):(0,_t.jsxs)("div",{className:"w-full rounded-3xl border border-gray-300 bg-gray-100/80 backdrop-blur-2xl shadow-md flex flex-col items-center justify-center gap-3 relative",style:{height:e||"auto"},children:[(0,_t.jsx)("div",{className:"text-design-main",children:kt}),(0,_t.jsx)("div",{className:"h-5 overflow-hidden",children:(0,_t.jsx)(Nt.N,{mode:"wait",children:n?(0,_t.jsx)(Mt.P.p,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.25},className:"m-0 text-sm font-medium leading-5 text-center status-animation",children:n},n):null})}),l?(0,_t.jsxs)("div",{className:"absolute left-0 w-full rounded-3xl border border-gray-300 bg-[#F0F0F0CC] backdrop-blur-[80px] px-6 py-3 flex items-center gap-2",style:{top:"calc(100% + 24px)",boxShadow:"0px 4px 30px 0px #0000001A"},children:[(0,_t.jsx)(Tt.A,{icon:Ot.A,size:24}),(0,_t.jsx)("span",{className:"text-sm font-medium leading-5 text-gray-900",children:l})]}):null,s?(0,_t.jsx)(At,{}):null]})},At=()=>(0,_t.jsx)("iframe",{title:"Admin Loader",src:$t,style:{display:"none"},sandbox:"allow-same-origin allow-scripts allow-forms"});var Et=a(5367),Dt=a(1450);const Ht=()=>{const{setData:e,descriptionBackup:t,urlParams:a}=N();(()=>{const{data:e,error:t}=(0,wt.A)("required-plugins",()=>Me({requiredOnly:!0,showStatus:!1}))})();const[n,i]=(0,ht.useState)(a.description||a.title||t||""),[s,o]=(0,ht.useState)(!1),[r,l]=(0,ht.useState)(null),c=(0,ht.useRef)(null),{consentTerms:d}=(0,yt.D)(),p=(0,ht.useCallback)(()=>{const e=c.current;if(!e)return;e.style.height="auto";const t=e.getBoundingClientRect(),a=window.innerHeight,n=Math.max(0,a-t.top-120),i=e.scrollHeight,s=Math.min(i,n);e.style.height=`${s}px`,e.style.overflowY=i>n?"auto":"hidden",window.dispatchEvent(new Event("launch-textarea-resize"))},[]);return(0,ht.useEffect)(()=>{e("descriptionBackup",n.trim());const t=requestAnimationFrame(()=>{p()});return()=>cancelAnimationFrame(t)},[n,e]),(0,ht.useEffect)(()=>{const e=new AbortController,{signal:t}=e,a=()=>{p();const e=c.current;e?.scrollTo(0,e.scrollHeight)};return window.addEventListener("resize",a,{signal:t}),window.addEventListener("orientationchange",a,{signal:t}),p(),()=>e.abort()},[p]),(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("form",{onSubmit:t=>{t.preventDefault(),e("descriptionRaw",n.trim()),e("go",!0)},onClick:()=>c.current?.focus(),className:"relative flex w-full flex-col",children:(0,_t.jsx)("div",{className:"w-full rounded-3xl border border-gray-300 bg-gray-100/80 text-gray-900 backdrop-blur-2xl focus-within:border-gray-500 focus-within:ring-gray-500 shadow-md overflow-hidden",children:s?(0,_t.jsxs)("div",{className:"flex h-49 flex-col items-center justify-center gap-4",children:[(0,_t.jsx)("div",{className:"h-12 w-12 text-design-main",children:Pt}),(0,_t.jsx)("p",{className:"m-0 text-base leading-6 text-center text-gray-800",children:(0,y.__)("Enhancing the website description...","extendify-local")})]}):(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("textarea",{ref:c,id:"extendify-launch-chat-textarea",className:"flex min-h-20 md:min-h-24 w-full resize-none bg-transparent text-base leading-6 placeholder:text-gray-700 focus:shadow-none focus:outline-hidden border-none text-gray-900 p-6 pb-0",rows:"1",autoFocus:!0,value:n,onChange:e=>{i(e.target.value)},placeholder:(0,y.__)("E.g., A personal photography portfolio featuring a collection of landscape, portrait, and street photography, capturing moments from around the world.","extendify-local")}),(0,_t.jsxs)("div",{className:"flex justify-between items-end gap-4 p-6",children:[(0,_t.jsx)("div",{children:(0,_t.jsx)(It,{disabled:0===n.trim().length||n.trim()===r,onClick:async()=>{o(!0);const e=`${X.AY}/api/prompt/improve`,t=await F(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ee.m,description:n.trim(),title:window.extSharedData.siteTitle})}).then(e=>e.ok&&e.json()).catch(()=>null),a=t?.improvedPrompt;if(o(!1),a){l(a);const e=c.current;if(!e)return i(a);requestAnimationFrame(()=>{e.focus(),e.select(),document.execCommand("insertText",!1,a)||i(a)})}}})}),(0,_t.jsx)(Ft,{disabled:0===n.trim().length})]})]})})}),(0,_t.jsx)("div",{className:"text-pretty mt-4 text-center text-xs leading-4 opacity-70 text-banner-text [&>a]:text-xs [&>a]:text-banner-text [&>a]:underline w-full",dangerouslySetInnerHTML:{__html:d}})]})},Ft=(0,ht.forwardRef)((e,t)=>(0,_t.jsxs)("button",{ref:t,type:"submit",className:"inline-flex items-center justify-center rounded-full border-0 bg-design-main px-3 py-2 text-sm leading-5 font-normal text-design-text focus-visible:ring-design-main disabled:opacity-40 focus:outline-none focus-visible:ring-1 focus-visible:ring-offset-2 group hover:opacity-90 transition-opacity",...e,children:[(0,_t.jsx)("span",{className:"px-1",children:(0,y.__)("Next","extendify-local")}),(0,_t.jsx)(Tt.A,{fill:"currentColor",icon:Et.A,size:24})]})),It=e=>(0,_t.jsxs)("button",{type:"button",className:"inline-flex items-center rounded-full ring-1 ring-gray-800 px-3 py-2 text-sm leading-5 font-normal text-gray-800 transition-colors hover:bg-gray-600/5 disabled:opacity-40",...e,children:[(0,_t.jsx)(Tt.A,{icon:Dt.A,size:24}),(0,_t.jsx)("span",{className:"px-1",children:(0,y.__)("Enhance with AI","extendify-local")})]}),Bt=({skipDescription:e,lastHeight:t})=>e?(0,_t.jsx)(Mt.P.div,{initial:{opacity:0,height:t||"auto"},animate:{opacity:1,height:400},transition:{duration:.4},children:(0,_t.jsx)(Lt,{height:400})}):(0,_t.jsx)(Mt.P.div,{animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:(0,_t.jsx)(Ht,{})}),Rt=()=>window.extSharedData?.partnerLogo?(0,_t.jsx)("div",{className:"flex h-10 max-w-52 items-center overflow-hidden md:max-w-72",children:(0,_t.jsx)("img",{className:"h-full w-auto max-w-full object-contain",src:window.extSharedData.partnerLogo,alt:window.extSharedData?.partnerName??""})}):(0,_t.jsx)(Tt.A,{width:void 0,icon:St,className:"h-8 w-auto text-banner-text"});var zt=a(3640),Vt=a(9384),Zt=a(8638),Jt=a(5979);const Ut=()=>{const e=(0,Vt.z)(),t=(0,Zt.I)(),a=(0,ht.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-banner-main").trim(),[]),n=(0,ht.useMemo)(()=>(0,zt.Mj)(a).desaturate(.3).lighten(.4).alpha(.25).toRgbString(),[a]),i=(0,ht.useMemo)(()=>(0,zt.Mj)(a).isLight(),[a]),s=(0,ht.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-design-main").trim(),[]),o=(0,ht.useMemo)(()=>(0,zt.Mj)(s).desaturate(.3).alpha(.25).toRgbString(),[s]),r=(0,ht.useMemo)(()=>Math.random(),[]),l=(0,Jt.G)(e,e=>(e/24e3+r)%1),c=(0,Jt.G)(l,e=>180*Math.sin(e*Math.PI*2)),d=(0,Jt.G)(l,e=>180*Math.cos(e*Math.PI*2));return t?null:i?(0,_t.jsx)(Mt.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,_t.jsx)(Mt.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"})},Wt=()=>(0,_t.jsxs)("div",{className:"flex w-full flex-col max-w-5xl p-6 lg:p-10",children:[(0,_t.jsx)("h2",{className:"text-lg text-center text-gray-900 font-semibold px-4 py-0 m-0",children:(0,y.__)("One more thing before we start.","extendify-local")}),(0,_t.jsxs)("div",{className:"relative mx-auto w-full max-w-xl text-gray-900",children:[(0,_t.jsx)("p",{className:"text-base",children:(0,y.__)("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,_t.jsx)("a",{className:"mt-4 text-base font-medium text-design-main underline",href:`${window.extSharedData.adminUrl}theme-install.php?theme=extendable`,children:(0,y.__)("Take me there","extendify-local")})]})]});var Gt=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,ht.useState)(!1);return(0,_t.jsxs)("div",{className:"flex w-full flex-col gap-6 p-6",children:[(0,_t.jsx)("h2",{className:"text-2xl leading-8 text-left text-gray-900 font-medium py-0 m-0",children:(0,y.__)("Start Over?","extendify-local")}),(0,_t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,_t.jsx)("p",{className:"text-base leading-6 text-left text-gray-900 m-0",children:(0,y.__)("It looks like you have been here before. We need to clean up some things before we can continue.","extendify-local")}),(0,_t.jsx)("p",{className:"text-base leading-6 text-left text-gray-900 font-medium m-0",children:(0,y.sprintf)(
// translators: %3$s is the number of old pages
// translators: %3$s is the number of old pages
(0,y.__)("%s pages/posts will be deleted.","extendify-local"),e.length)})]}),(0,_t.jsx)("div",{className:"flex justify-between items-center mt-2",children:(0,_t.jsx)(qt,{handleOk:async()=>{l(!0),o({exclude:["descriptionBackup"]}),localStorage.removeItem(`extendify-agent-workflows-${window.extSharedData.siteId}`);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})})]})},qt=({handleOk:e,handleExit:t,processing:a})=>(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("button",{type:"button",onClick:t,disabled:a,className:"inline-flex items-center gap-2 rounded-full ring-1 ring-gray-800 px-3 py-2.5 text-sm leading-5 font-normal text-gray-800 transition-colors hover:bg-gray-600/5 disabled:opacity-40",children:(0,_t.jsx)("span",{className:"px-1",children:(0,y.__)("Exit","extendify-local")})}),a?(0,_t.jsxs)("button",{type:"button",disabled:!0,className:"inline-flex items-center justify-center gap-2 rounded-full border-0 bg-design-main px-3 py-2 text-sm leading-5 font-normal text-design-text disabled:opacity-40",children:[(0,_t.jsx)(Gt.Spinner,{className:"m-0"}),(0,_t.jsx)("span",{className:"px-1",children:(0,y.__)("Processing...","extendify-local")})]}):(0,_t.jsxs)("button",{type:"button",onClick:e,className:"inline-flex items-center justify-center rounded-full border-0 bg-design-main px-3 py-2 text-sm leading-5 font-normal text-design-text group hover:opacity-90 transition-opacity",children:[(0,_t.jsx)("span",{className:"px-1",children:(0,y.__)("Delete and start over","extendify-local")}),(0,_t.jsx)(Tt.A,{fill:"currentColor",icon:Et.A,size:24})]})]}),Kt=()=>{const e=(0,Zt.I)(),t=(0,ht.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-banner-main").trim(),[]),a=(0,ht.useMemo)(()=>(0,zt.Mj)(t).desaturate(.3).lighten(.4).alpha(.2).toRgbString(),[t]),n=(0,ht.useMemo)(()=>(0,zt.Mj)(t).isLight(),[t]),i=(0,ht.useMemo)(()=>getComputedStyle(document.documentElement).getPropertyValue("--ext-design-main").trim(),[]),s=(0,ht.useMemo)(()=>(0,zt.Mj)(i).desaturate(.3).alpha(.2).toRgbString(),[i]);if(e)return null;const o=n?s:a;return(0,_t.jsx)(Mt.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 Xt=a(9363),ea=a(5492);const ta=()=>{const e=(0,ut.useSelect)(e=>e("core").getCurrentTheme()),t=e&&"extendable"!==e?.textdomain,a=window.extLaunchData.resetSiteInformation.pagesIds??[],n=a.length>0,{title:i,descriptionRaw:s,go:o}=N(),r=(i||s)&&o,l=(0,ht.useRef)(null);return(0,ht.useEffect)(()=>{
// translators: Launch is a noun.
document.title=(0,y.__)("Launch - AI-Powered Web Creation","extendify-local"),J("extendify_launch_loaded",(new Date).toISOString()),0===(0,Ke.getBlockTypes)().length&&(0,Xt.registerCoreBlocks)(),Qe({stage:"launch_page"})},[]),t?(0,_t.jsx)(aa,{children:(0,_t.jsx)("div",{className:"bg-white w-full max-w-3xl rounded-lg border border-design-main/60 relative z-10",children:(0,_t.jsx)(Wt,{})})}):n?(0,_t.jsx)(aa,{children:(0,_t.jsx)("div",{className:"w-full max-w-2xl rounded-3xl border bg-gray-100/80 backdrop-blur-2xl shadow-md relative z-10 border-gray-300",children:(0,_t.jsx)(Qt,{pages:a})})}):(0,_t.jsxs)(aa,{children:[(0,_t.jsx)(Nt.N,{mode:"wait",initial:!1,children:(0,_t.jsx)(na,{skipDescription:r})}),(0,_t.jsx)("div",{ref:l,className:"w-full max-w-2xl relative z-10",children:(0,_t.jsx)(Nt.N,{mode:"wait",children:(0,_t.jsx)(Bt,{skipDescription:r,lastHeight:l.current?.offsetHeight},r?"description-launch":"creating-launch")})}),r?null:(0,_t.jsx)("div",{className:"flex w-full p-6 md:p-8 absolute bottom-0 left-0",children:(0,_t.jsxs)("a",{className:"inline-flex items-center gap-0.5 text-sm text-banner-text opacity-70 hover:opacity-100 transition-opacity p-2",href:window.extSharedData.adminUrl,children:[(0,_t.jsx)(Tt.A,{fill:"currentColor",icon:ea.A,size:20}),(0,y.__)("WP Admin Dashboard","extendify-local")]})})]})},aa=({children:e})=>{const{pulse:t}=N();return(0,_t.jsxs)("div",{style:{zIndex:1e5},className:"fixed inset-0 bg-white",children:[(0,_t.jsx)("div",{className:"relative h-dvh bg-banner-main text-banner-text text-base flex flex-col items-center justify-between",children:(0,_t.jsxs)("div",{className:"relative w-full flex flex-col items-center gap-5 md:gap-8 p-6 pb-25 flex-1 justify-center",children:[(0,_t.jsx)("div",{className:"mb-4",children:(0,_t.jsx)(Rt,{})}),e]})}),(0,_t.jsx)(Ut,{}),t?(0,_t.jsx)(Kt,{}):null]})},na=({skipDescription:e})=>e?null:(0,_t.jsx)(Mt.P.h2,{className:"text-xl md:text-2xl text-pretty text-banner-text font-semibold p-0 m-0 text-center",animate:{opacity:1},exit:{opacity:0},transition:{duration:.4},children:(0,y.__)("Describe the website you want to build","extendify-local")});requestAnimationFrame(()=>{const e=document.getElementById("extendify-auto-launch-page");e&&(0,ht.createRoot)(e).render((0,_t.jsx)(ta,{}))})},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=5638)),e.O()}]);