"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[957],{605:(e,t,o)=>{o.d(t,{FV:()=>i,G3:()=>r,RA:()=>n,Sj:()=>a});const n=["image"],r=60,a=20,i=200},52664:(e,t,o)=>{o.d(t,{LU:()=>r,id:()=>a});var n=o(92694);const r="entrepreneur-signup";(0,n.addFilter)("woocommerce_admin_persisted_queries","woocommerce_admin_customize_your_store",(e=>(e.push("ref"),e)));const a=()=>new URLSearchParams(window.location.search).get("ref")===r},79843:(e,t,o)=>{o.d(t,{rJ:()=>C,jf:()=>y,mt:()=>E,vY:()=>f,nC:()=>p,sw:()=>h,B_:()=>g,$p:()=>k,Tf:()=>v,wO:()=>b});var n=o(69307),r=o(65736),a=o(80225),i=o(55609),c=o(10431),s=o(67859),m=o(86020);const l=({siteUrl:e})=>(0,n.createElement)("iframe",{className:"preview-iframe",src:e,title:"Preview",tabIndex:-1});var u=o(88679),d=o(86396),w=o(3542);const _=({bannerTitle:e,bannerText:t,bannerClass:o,showAIDisclaimer:c,buttonIsLink:l,bannerButtonOnClick:u,bannerButtonText:d,secondaryButton:w,previewBanner:_,children:g})=>(0,n.createElement)("div",{className:(0,a.Z)("woocommerce-customize-store-banner",o)},(0,n.createElement)("div",{className:"woocommerce-customize-store-banner-content"},(0,n.createElement)("div",{className:"banner-actions"},(0,n.createElement)("h1",null,e),(0,n.createElement)("p",null,t),d&&(0,n.createElement)(i.Button,{onClick:()=>u&&u(),variant:l?"link":"primary"},d),w,c&&(0,n.createElement)("p",{className:"ai-disclaimer"},(0,s.Z)({mixedString:(0,r.__)("Powered by experimental AI. {{link}}Learn more{{/link}}","woocommerce"),components:{link:(0,n.createElement)(m.Link,{href:"https://automattic.com/ai-guidelines",target:"_blank",type:"external"})}}))),g),_),g=()=>(0,n.createElement)(_,{bannerTitle:(0,r.__)("Looking to design your store using AI?","woocommerce"),bannerText:(0,r.__)("Unfortunately, the [AI Store designer] isn't available right now as we can't detect your network. Please check your internet connection.","woocommerce"),bannerClass:"offline-banner",bannerButtonOnClick:()=>{},showAIDisclaimer:!0}),h=({sendEvent:e})=>(0,n.createElement)(_,{bannerTitle:(0,r.__)("Looking to design your store using AI?","woocommerce"),bannerText:(0,r.__)("It looks like you're using Jetpack's offline mode — switch to online mode to start designing with AI.","woocommerce"),bannerClass:"offline-banner",buttonIsLink:!1,bannerButtonOnClick:()=>{e({type:"JETPACK_OFFLINE_HOWTO"})},bannerButtonText:(0,r.__)("Find out how","woocommerce"),showAIDisclaimer:!0}),p=({setOpenDesignChangeWarningModal:e})=>(0,n.createElement)(_,{bannerTitle:(0,r.__)("Use the power of AI to design your store","woocommerce"),bannerText:(0,r.__)("Design the look of your store, create pages, and generate copy using our built-in AI tools.","woocommerce"),bannerClass:"",buttonIsLink:!1,bannerButtonOnClick:()=>{e(!0)},bannerButtonText:(0,r.__)("Design with AI","woocommerce"),showAIDisclaimer:!0}),y=({sendEvent:e})=>(0,n.createElement)(_,{bannerTitle:(0,r.__)("Use the power of AI to design your store","woocommerce"),bannerText:(0,r.__)("Design the look of your store, create pages, and generate copy using our built-in AI tools.","woocommerce"),bannerClass:"",buttonIsLink:!1,bannerButtonOnClick:()=>{e({type:"DESIGN_WITH_AI"})},bannerButtonText:(0,r.__)("Design with AI","woocommerce"),showAIDisclaimer:!0}),b=({setOpenDesignChangeWarningModal:e})=>(0,n.createElement)(_,{bannerTitle:(0,r.__)("Use the power of AI to design your store","woocommerce"),bannerText:(0,r.__)("Design the look of your store, create pages, and generate copy using our built-in AI tools.","woocommerce"),bannerClass:"",buttonIsLink:!1,bannerButtonOnClick:()=>{e(!0)},bannerButtonText:(0,r.__)("Design with AI","woocommerce"),showAIDisclaimer:!0}),k=({redirectToCYSFlow:e})=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(_,{bannerTitle:(0,r.__)("Design your own","woocommerce"),bannerText:(0,r.__)("Quickly create a beautiful store using our built-in store designer. Choose your layout, select a style, and much more.","woocommerce"),bannerClass:"no-ai-banner",bannerButtonText:(0,r.__)("Start designing","woocommerce"),bannerButtonOnClick:()=>{e()},showAIDisclaimer:!1})),E=({setOpenDesignChangeWarningModal:e})=>{const t=(0,n.createElement)(i.Button,{className:"",onClick:()=>{(0,w.L)("customize_your_store_intro_create_a_new_one_click"),e(!0)},variant:"secondary"},(0,r.__)("Create a new one","woocommerce")),o=(0,u.O3)("siteUrl")+"?cys-hide-admin-bar=1";return(0,n.createElement)(_,{bannerTitle:(0,r.__)("Customize your custom theme","woocommerce"),bannerText:(0,r.__)("Keep customizing the look of your AI-generated store, or start over and create a new one.","woocommerce"),bannerClass:"existing-ai-theme-banner",buttonIsLink:!1,bannerButtonOnClick:()=>{(0,w.L)("customize_your_store_intro_customize_click"),(0,d.tJ)(window,(0,c.getNewPath)({customizing:!0},"/customize-store/assembler-hub",{}))},bannerButtonText:(0,r.__)("Customize","woocommerce"),secondaryButton:t,showAIDisclaimer:!0},(0,n.createElement)("div",{className:"woocommerce-block-preview-container"},(0,n.createElement)("div",{className:"iframe-container"},(0,n.createElement)(l,{siteUrl:o}))))},f=()=>{const e=(0,u.O3)("siteUrl")+"?cys-hide-admin-bar=1";return(0,n.createElement)(_,{bannerTitle:(0,r.__)("Customize your theme","woocommerce"),bannerText:(0,r.__)("Customize everything from the color palette and the fonts to the page layouts, making sure every detail aligns with your brand.","woocommerce"),bannerClass:"existing-no-ai-theme-banner",buttonIsLink:!1,bannerButtonOnClick:()=>{(0,w.L)("customize_your_store_intro_customize_click",{theme_type:"block"}),(0,d.tJ)(window,(0,c.getNewPath)({customizing:!0},"/customize-store/assembler-hub",{}))},bannerButtonText:(0,r.__)("Customize your store","woocommerce"),showAIDisclaimer:!1,previewBanner:(0,n.createElement)(l,{siteUrl:e})})},C=()=>{const e=(0,u.O3)("siteUrl")+"?cys-hide-admin-bar=1";return(0,n.createElement)(_,{bannerTitle:(0,r.__)("Customize your theme","woocommerce"),bannerText:(0,r.__)("Customize everything from the color palette and the fonts to the page layouts, making sure every detail aligns with your brand.","woocommerce"),bannerClass:"existing-no-ai-theme-banner",buttonIsLink:!1,bannerButtonOnClick:()=>{(0,w.L)("customize_your_store_intro_customize_click",{theme_type:"classic"}),(0,d.tJ)(window,"customize.php?return=/wp-admin/themes.php")},bannerButtonText:(0,r.__)("Go to the Customizer","woocommerce"),showAIDisclaimer:!1,previewBanner:(0,n.createElement)(l,{siteUrl:e})})},v=()=>{const e=(0,u.O3)("siteUrl")+"?cys-hide-admin-bar=1";return(0,n.createElement)(_,{bannerTitle:(0,r.__)("Customize your theme","woocommerce"),bannerText:(0,r.__)("Customize everything from the color palette and the fonts to the page layouts, making sure every detail aligns with your brand.","woocommerce"),bannerClass:"existing-no-ai-theme-banner",buttonIsLink:!1,bannerButtonOnClick:()=>{(0,w.L)("customize_your_store_intro_customize_click",{theme_type:"block"}),(0,d.tJ)(window,`${u.SX}site-editor.php`)},bannerButtonText:(0,r.__)("Go to the Editor","woocommerce"),showAIDisclaimer:!1,previewBanner:(0,n.createElement)(l,{siteUrl:e})})}},86435:(e,t,o)=>{o.d(t,{Fc:()=>l,MO:()=>m,Nh:()=>d,ab:()=>u});var n=o(69307),r=o(55609),a=o(65736),i=o(86020),c=o(88679),s=o(3542);const m=({setOpenDesignChangeWarningModal:e,sendEvent:t,classname:o="woocommerce-customize-store__design-change-warning-modal"})=>(0,n.createElement)(r.Modal,{className:o,title:(0,a.__)("Are you sure you want to start a new design?","woocommerce"),onRequestClose:()=>e(!1),shouldCloseOnClickOutside:!1},(0,n.createElement)("p",null,(0,n.createInterpolateElement)((0,a.__)("The Store Designer will create a new store design for you, and you'll lose any changes you've made to your active theme. If you'd prefer to continue editing your theme, you can do so via the Editor.","woocommerce"),{EditorLink:(0,n.createElement)(i.Link,{onClick:()=>(window.open(`${c.SX}site-editor.php`,"_blank"),!1),href:""})})),(0,n.createElement)("div",{className:"woocommerce-customize-store__design-change-warning-modal-footer"},(0,n.createElement)(r.Button,{onClick:()=>e(!1),variant:"link"},(0,a.__)("Cancel","woocommerce")),(0,n.createElement)(r.Button,{onClick:()=>t({type:"DESIGN_WITH_AI"}),variant:"primary"},(0,a.__)("Design with AI","woocommerce")))),l=({setOpenDesignChangeWarningModal:e,sendEvent:t,classname:o="woocommerce-customize-store__design-change-warning-modal"})=>(0,n.createElement)(r.Modal,{className:o,title:(0,a.__)("Are you sure you want to start a new design?","woocommerce"),onRequestClose:()=>e(!1),shouldCloseOnClickOutside:!1},(0,n.createElement)("p",null,(0,n.createInterpolateElement)((0,a.__)("The Store Designer will create a new store design for you, and you'll lose any changes you've made to your active theme. If you'd prefer to continue editing your theme, you can do so via the Editor.","woocommerce"),{EditorLink:(0,n.createElement)(i.Link,{onClick:()=>(window.open(`${c.SX}site-editor.php`,"_blank"),!1),href:""})})),(0,n.createElement)("div",{className:"woocommerce-customize-store__design-change-warning-modal-footer"},(0,n.createElement)(r.Button,{onClick:()=>e(!1),variant:"link"},(0,a.__)("Cancel","woocommerce")),(0,n.createElement)(r.Button,{onClick:()=>t({type:"DESIGN_WITH_AI"}),variant:"primary"},(0,a.__)("Design with AI","woocommerce")))),u=({setOpenDesignChangeWarningModal:e,sendEvent:t,classname:o="woocommerce-customize-store__design-change-warning-modal"})=>(0,n.createElement)(r.Modal,{className:o,title:(0,a.__)("Are you sure you want to start over?","woocommerce"),onRequestClose:()=>e(!1),shouldCloseOnClickOutside:!1},(0,n.createElement)("p",null,(0,n.createInterpolateElement)((0,a.__)("You'll be asked to provide your business info again, and will lose your existing AI design. If you want to customize your existing design, you can do so via the Editor.","woocommerce"),{EditorLink:(0,n.createElement)(i.Link,{onClick:()=>(window.open(`${c.SX}site-editor.php`,"_blank"),!1),href:""})})),(0,n.createElement)("div",{className:"woocommerce-customize-store__design-change-warning-modal-footer"},(0,n.createElement)(r.Button,{onClick:()=>e(!1),variant:"link"},(0,a.__)("Cancel","woocommerce")),(0,n.createElement)(r.Button,{onClick:()=>{t({type:"DESIGN_WITH_AI"}),(0,s.L)("customize_your_store_intro_start_again_click")},variant:"primary"},(0,a.__)("Start again","woocommerce")))),d=({isNoAiFlow:e=!0,setIsModalOpen:t,redirectToCYSFlow:o})=>(0,n.createElement)(r.Modal,{className:"woocommerce-customize-store__theme-switch-warning-modal",title:(0,a.__)("Are you sure you want to design a new theme?","woocommerce"),onRequestClose:()=>t(!1),shouldCloseOnClickOutside:!1},(0,n.createElement)("p",null,e?(0,a.__)("Your active theme will be changed and you could lose any changes you’ve made to it.","woocommerce"):(0,n.createInterpolateElement)((0,a.__)("The Store Designer will create a new store design for you, and you'll lose any changes you've made to your active theme. If you'd prefer to continue editing your theme, you can do so via the Editor.","woocommerce"),{EditorLink:(0,n.createElement)(i.Link,{onClick:()=>(window.open(`${c.SX}site-editor.php`,"_blank"),!1),href:""})})),(0,n.createElement)("div",{className:"woocommerce-customize-store__theme-switch-warning-modal-footer"},(0,n.createElement)(r.Button,{onClick:()=>{t(!1)},variant:"link"},(0,a.__)("Cancel","woocommerce")),(0,n.createElement)(r.Button,{onClick:()=>{t(!1),(0,s.L)("customize_your_store_agree_to_theme_switch_click"),o()},variant:"primary"},(0,a.__)("Design a new theme","woocommerce"))))},3542:(e,t,o)=>{o.d(t,{L:()=>i});var n=o(14599),r=o(52664),a=o(92390);const i=(e,t)=>{(0,a.V)()&&(0,r.id)()?(0,n.recordEvent)(e,{...t,ref:r.LU}):(0,n.recordEvent)(e,t)}},86396:(e,t,o)=>{o.d(t,{$$:()=>_,FT:()=>u,RS:()=>l,cK:()=>w,cL:()=>c,eP:()=>s,rS:()=>g,sr:()=>m,tJ:()=>d});var n=o(10431),r=o(19881),a=o(88679),i=o(605);function c(e){return e.document!==e.parent.document&&null!==e.parent.document.body.querySelector(".woocommerce-customize-store__container")}function s(){window.parent.postMessage({type:"iframe-loaded"},(0,a.O3)("homeUrl"))}function m(e){window.addEventListener("message",(t=>{"iframe-loaded"===t.data.type&&e()}))}function l(e){window.addEventListener("message",(t=>{"assemberBackButtonClicked"===t.data.type&&e()}))}function u(){const e=[(0,a.O3)("homeUrl")];function t(t){if(e.includes(t.origin)&&t.data&&"string"==typeof t.data.type&&"string"==typeof t.data.url&&"navigate"===t.data.type)try{const o=(0,n.parseAdminUrl)(t.data.url);if(!e.some((e=>o.origin===e)))throw new Error(`Blocked navigation to untrusted URL: ${o.href}`);window.location.href=o.href}catch(e){(0,r.captureException)(e)}}return window.addEventListener("message",t,!1),function(){window.removeEventListener("message",t,!1)}}function d(e,t){try{if(c(e))e.parent.postMessage({type:"navigate",url:t},(0,a.O3)("homeUrl"));else{const o=(0,n.parseAdminUrl)(t);e.location.href=o.href}}catch(e){(0,r.captureException)(e)}}function w(e){const t=e.contentDocument||e.contentWindow?.document;t?.addEventListener("click",(function(e){if(e.target){const t=e.target?.closest("a");t&&"_blank"===t.target?(e.preventDefault(),window.open(t.href,"_blank")):t&&(e.preventDefault(),window.location.href=t.href)}}))}const _=(e,t=i.G3)=>e.replaceAll(//g,((e,o)=>{if(o){const e=JSON.parse(o);return e.width=t,`\x3c!-- wp:site-logo ${JSON.stringify(e)} /--\x3e`}return`\x3c!-- wp:site-logo {"width":${t}} /--\x3e`})),g=(e,t)=>e.map(((e,o,n)=>{const r=n[o+1];if(!r)return[e];const a=[e],i=(r.progress-e.progress)/t;for(let o=0;o