diff --git a/bootstrap.php b/bootstrap.php index ad8a6321e..31b53f0a3 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -22,7 +22,7 @@ function nfd_wp_module_onboarding_register() { // Set Global Constants if ( ! defined( 'NFD_ONBOARDING_VERSION' ) ) { - define( 'NFD_ONBOARDING_VERSION', '1.11.0' ); + define( 'NFD_ONBOARDING_VERSION', '1.11.1' ); } if ( ! defined( 'NFD_ONBOARDING_DIR' ) ) { define( 'NFD_ONBOARDING_DIR', __DIR__ ); diff --git a/build/1.11.0/111.js b/build/1.11.1/111.js similarity index 100% rename from build/1.11.0/111.js rename to build/1.11.1/111.js diff --git a/build/1.11.0/128.js b/build/1.11.1/128.js similarity index 100% rename from build/1.11.0/128.js rename to build/1.11.1/128.js diff --git a/build/1.11.0/183.js b/build/1.11.1/183.js similarity index 100% rename from build/1.11.0/183.js rename to build/1.11.1/183.js diff --git a/build/1.11.0/235.js b/build/1.11.1/235.js similarity index 100% rename from build/1.11.0/235.js rename to build/1.11.1/235.js diff --git a/build/1.11.0/244.js b/build/1.11.1/244.js similarity index 100% rename from build/1.11.0/244.js rename to build/1.11.1/244.js diff --git a/build/1.11.0/310.js b/build/1.11.1/310.js similarity index 100% rename from build/1.11.0/310.js rename to build/1.11.1/310.js diff --git a/build/1.11.0/33.js b/build/1.11.1/33.js similarity index 100% rename from build/1.11.0/33.js rename to build/1.11.1/33.js diff --git a/build/1.11.0/405.js b/build/1.11.1/405.js similarity index 100% rename from build/1.11.0/405.js rename to build/1.11.1/405.js diff --git a/build/1.11.0/449.js b/build/1.11.1/449.js similarity index 100% rename from build/1.11.0/449.js rename to build/1.11.1/449.js diff --git a/build/1.11.0/465.js b/build/1.11.1/465.js similarity index 100% rename from build/1.11.0/465.js rename to build/1.11.1/465.js diff --git a/build/1.11.0/491.js b/build/1.11.1/491.js similarity index 100% rename from build/1.11.0/491.js rename to build/1.11.1/491.js diff --git a/build/1.11.0/537.js b/build/1.11.1/537.js similarity index 100% rename from build/1.11.0/537.js rename to build/1.11.1/537.js diff --git a/build/1.11.0/574.js b/build/1.11.1/574.js similarity index 100% rename from build/1.11.0/574.js rename to build/1.11.1/574.js diff --git a/build/1.11.0/58.js b/build/1.11.1/58.js similarity index 100% rename from build/1.11.0/58.js rename to build/1.11.1/58.js diff --git a/build/1.11.0/657.js b/build/1.11.1/657.js similarity index 100% rename from build/1.11.0/657.js rename to build/1.11.1/657.js diff --git a/build/1.11.0/662.js b/build/1.11.1/662.js similarity index 100% rename from build/1.11.0/662.js rename to build/1.11.1/662.js diff --git a/build/1.11.0/696.js b/build/1.11.1/696.js similarity index 100% rename from build/1.11.0/696.js rename to build/1.11.1/696.js diff --git a/build/1.11.0/704.js b/build/1.11.1/704.js similarity index 100% rename from build/1.11.0/704.js rename to build/1.11.1/704.js diff --git a/build/1.11.0/73.js b/build/1.11.1/73.js similarity index 100% rename from build/1.11.0/73.js rename to build/1.11.1/73.js diff --git a/build/1.11.0/76.js b/build/1.11.1/76.js similarity index 100% rename from build/1.11.0/76.js rename to build/1.11.1/76.js diff --git a/build/1.11.0/792.js b/build/1.11.1/792.js similarity index 100% rename from build/1.11.0/792.js rename to build/1.11.1/792.js diff --git a/build/1.11.0/849.js b/build/1.11.1/849.js similarity index 100% rename from build/1.11.0/849.js rename to build/1.11.1/849.js diff --git a/build/1.11.0/856.js b/build/1.11.1/856.js similarity index 100% rename from build/1.11.0/856.js rename to build/1.11.1/856.js diff --git a/build/1.11.0/993.js b/build/1.11.1/993.js similarity index 100% rename from build/1.11.0/993.js rename to build/1.11.1/993.js diff --git a/build/1.11.0/994.js b/build/1.11.1/994.js similarity index 100% rename from build/1.11.0/994.js rename to build/1.11.1/994.js diff --git a/build/1.11.0/images/bluesky.733ebcbf.png b/build/1.11.1/images/bluesky.733ebcbf.png similarity index 100% rename from build/1.11.0/images/bluesky.733ebcbf.png rename to build/1.11.1/images/bluesky.733ebcbf.png diff --git a/build/1.11.0/images/content.fb050ea1.png b/build/1.11.1/images/content.fb050ea1.png similarity index 100% rename from build/1.11.0/images/content.fb050ea1.png rename to build/1.11.1/images/content.fb050ea1.png diff --git a/build/1.11.0/images/design.cc6a697f.png b/build/1.11.1/images/design.cc6a697f.png similarity index 100% rename from build/1.11.0/images/design.cc6a697f.png rename to build/1.11.1/images/design.cc6a697f.png diff --git a/build/1.11.0/images/features.593fb09c.png b/build/1.11.1/images/features.593fb09c.png similarity index 100% rename from build/1.11.0/images/features.593fb09c.png rename to build/1.11.1/images/features.593fb09c.png diff --git a/build/1.11.0/images/full-service.7f58f410.png b/build/1.11.1/images/full-service.7f58f410.png similarity index 100% rename from build/1.11.0/images/full-service.7f58f410.png rename to build/1.11.1/images/full-service.7f58f410.png diff --git a/build/1.11.0/images/full-service.adb3abd6.png b/build/1.11.1/images/full-service.adb3abd6.png similarity index 100% rename from build/1.11.0/images/full-service.adb3abd6.png rename to build/1.11.1/images/full-service.adb3abd6.png diff --git a/build/1.11.0/images/help.19cc7e75.png b/build/1.11.1/images/help.19cc7e75.png similarity index 100% rename from build/1.11.0/images/help.19cc7e75.png rename to build/1.11.1/images/help.19cc7e75.png diff --git a/build/1.11.0/images/step-interstitial.00b15f9e.png b/build/1.11.1/images/step-interstitial.00b15f9e.png similarity index 100% rename from build/1.11.0/images/step-interstitial.00b15f9e.png rename to build/1.11.1/images/step-interstitial.00b15f9e.png diff --git a/build/1.11.0/images/wp-admin.2908b886.png b/build/1.11.1/images/wp-admin.2908b886.png similarity index 100% rename from build/1.11.0/images/wp-admin.2908b886.png rename to build/1.11.1/images/wp-admin.2908b886.png diff --git a/build/1.11.0/images/wp-admin.6c8af0b4.png b/build/1.11.1/images/wp-admin.6c8af0b4.png similarity index 100% rename from build/1.11.0/images/wp-admin.6c8af0b4.png rename to build/1.11.1/images/wp-admin.6c8af0b4.png diff --git a/build/1.11.0/images/wp-admin.d8650899.png b/build/1.11.1/images/wp-admin.d8650899.png similarity index 100% rename from build/1.11.0/images/wp-admin.d8650899.png rename to build/1.11.1/images/wp-admin.d8650899.png diff --git a/build/1.11.0/onboarding.asset.php b/build/1.11.1/onboarding.asset.php similarity index 83% rename from build/1.11.0/onboarding.asset.php rename to build/1.11.1/onboarding.asset.php index 8c8cbee3e..564bee743 100644 --- a/build/1.11.0/onboarding.asset.php +++ b/build/1.11.1/onboarding.asset.php @@ -1 +1 @@ - array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => 'f7c5419dad4a9f89da9f'); + array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => '1a96ab4bf73f5b59efaa'); diff --git a/build/1.11.0/onboarding.css b/build/1.11.1/onboarding.css similarity index 100% rename from build/1.11.0/onboarding.css rename to build/1.11.1/onboarding.css diff --git a/build/1.11.0/onboarding.js b/build/1.11.1/onboarding.js similarity index 83% rename from build/1.11.0/onboarding.js rename to build/1.11.1/onboarding.js index bd4498ebd..0bcf11ea2 100644 --- a/build/1.11.0/onboarding.js +++ b/build/1.11.1/onboarding.js @@ -76,11 +76,11 @@ /* translators: 1: Brand 2: site or store */ (0,a.__)("Pick one of these professionally-designed website styles to start your %1$s %2$s.","wp-module-onboarding"),e,(0,c.I)("site"))},{description:(0,a.sprintf)( /* translators: %s: site or store */ -(0,a.__)("In the next steps and in the future, you can change the specific colors and fonts to fit your aesthetic vision for your %s.","wp-module-onboarding"),(0,c.I)("site"))}]},help:{fullService:{text:(0,a.__)("Hire Our Full-Service Creative Studio","wp-module-onboarding"),link:n},support:{text:(0,a.__)("Technical Support","wp-module-onboarding"),link:t}}}))(r,o,f);return(0,i.createElement)("div",{className:"nfd-onboarding-sidebar-learn-more__design-theme-styles-preview"},(0,i.createElement)(v,{heading:b.introduction.heading,subheading:b.introduction.subheading,icon:b.introduction.icon}),!1!==(null==w||null===(e=w.views)||void 0===e||null===(t=e.sidebar)||void 0===t||null===(n=t.illustration)||void 0===n?void 0:n.shown)&&(0,i.createElement)(u,{cssIcon:b.illustration.icon}),(0,i.createElement)(p,{headingWithDescriptions:b.information.headingWithDescriptions}),(0,i.createElement)(h,null,b.help.fullService.link&&(0,i.createElement)(m,{text:b.help.fullService.text,onClick:()=>window.open(b.help.fullService.link,"_blank")}),(0,i.createElement)(g,{text:b.help.support.text,link:b.help.support.link})))}]}},data:{designDrawerActiveLinkIncludes:"/wp-setup/step/design/theme-styles/",patternId:"theme-styles"}})},2503:(e,t,n)=>{"use strict";n.d(t,{h:()=>Le});var r={};n.r(r),n.d(r,{dequeueRequest:()=>N,enqueueRequest:()=>x,flushQueue:()=>T,resetNavError:()=>I,setActiveChapter:()=>p,setActiveFlow:()=>d,setActiveStep:()=>u,setCurrentOnboardingData:()=>h,setDrawerActiveView:()=>l,setHeaderMenuData:()=>C,setIsDrawerOpened:()=>s,setIsDrawerSuppressed:()=>c,setIsHeaderNavigationEnabled:()=>b,setIsSidebarOpened:()=>f,setNavErrorContinuePath:()=>P,setOnboardingSocialData:()=>m,setRuntime:()=>o,setSidebarActiveView:()=>w,showNavErrorDialog:()=>D,updateAllSteps:()=>E,updateDesignRoutes:()=>k,updatePreviewSettings:()=>_,updateRoutes:()=>y,updateSettings:()=>g,updateThemeStatus:()=>v,updateTopSteps:()=>S});var i={};n.r(i),n.d(i,{getAllSteps:()=>G,getCurrentChapter:()=>ee,getCurrentOnboardingData:()=>B,getCurrentStep:()=>X,getCurrentStepPath:()=>J,getDesignRoutes:()=>Q,getDrawerView:()=>A,getExperienceLevel:()=>ye,getExpertsUrl:()=>pe,getFirstStep:()=>Y,getHeaderMenuData:()=>ue,getHireExpertsUrl:()=>F,getLastStep:()=>K,getMigrationUrl:()=>ge,getNavErrorPath:()=>_e,getNewfoldBrand:()=>V,getNewfoldBrandConfig:()=>U,getNewfoldBrandName:()=>H,getNewfoldBrandUrl:()=>W,getNextStep:()=>re,getOnboardingFlow:()=>M,getOnboardingSocialData:()=>Z,getPluginInstallHash:()=>ve,getPreviewSettings:()=>le,getPreviousStep:()=>ne,getQueuePeek:()=>fe,getRoutes:()=>j,getSettings:()=>se,getShowErrorDialog:()=>be,getSidebarView:()=>ae,getSidebars:()=>oe,getStepFromPath:()=>te,getStepPreviewData:()=>de,getTechSupportUrl:()=>me,getThemeStatus:()=>ce,getTopPriority:()=>Ee,getTopSteps:()=>q,getfullServiceCreativeTeamUrl:()=>he,isDrawerOpened:()=>z,isDrawerSuppressed:()=>R,isHeaderNavigationEnabled:()=>$,isQueueEmpty:()=>we,isSidebarOpened:()=>ie});var a=n(6515);function o(e){var t;return window.nfdOnboarding={buildUrl:e.buildUrl,siteUrl:e.siteUrl,migrated:!0,currentFlow:null!==(t=e.currentFlow)&&void 0!==t?t:a.H,stepPreviewData:e.previewSettings.stepPreviewData},{type:"SET_RUNTIME",runtime:e}}function l(e){return{type:"SET_DRAWER_ACTIVE_VIEW",view:e}}function s(e){return{type:"SET_DRAWER_OPENED",isOpen:e}}function c(e){return{type:"SET_DRAWER_SUPPRESSED",isSuppressed:e}}function d(e){return{type:"SET_ACTIVE_FLOW",flow:e}}function u(e){return{type:"SET_ACTIVE_STEP",path:e=e.replace(/\/$/,"")}}function p(e){return{type:"SET_ACTIVE_CHAPTER",chapter:e}}function h(e){return{type:"SET_CURRENT_DATA",flowData:e}}function m(e){return{type:"SET_SOCIAL_DATA",socialData:e}}function g(e){return{type:"UPDATE_SETTINGS",settings:e}}function v(e){return{type:"UPDATE_THEME_STATUS",themeStatus:e}}function f(e){return{type:"SET_SIDEBAR_OPENED",isOpen:e}}function w(e){return{type:"SET_SIDEBAR_ACTIVE_VIEW",view:e}}function b(e){return{type:"SET_HEADER_NAVIGATION_ENABLED",isNavigationEnabled:e}}function _(e){return{type:"SET_PREVIEW_SETTINGS",previewSettings:e}}function y(e){return{type:"UPDATE_ROUTES",routes:e}}function E(e){return{type:"UPDATE_ALL_STEPS",allSteps:e}}function S(e){return{type:"UPDATE_TOP_STEPS",topSteps:e}}function k(e){return{type:"UPDATE_DESIGN_ROUTES",designRoutes:e}}function C(e){return{type:"UPDATE_HEADER_MENU_DATA",menu:e}}function x(e,t){return{type:"ENQUEUE_REQUEST",id:e,request:t}}function N(){return{type:"DEQUEUE_REQUEST"}}function T(){return{type:"FLUSH_QUEUE"}}function D(e){return{type:"SHOW_NAV_ERROR_DIALOG",showDialog:e}}function P(e){return{type:"SET_NAV_ERROR_CONTINUE_PATH",continuePath:e}}function I(){return{type:"RESET_NAV_ERROR"}}var L=n(2819),O=n(6483);function A(e){return e.drawer.view}function z(e){return e.drawer.isOpen}function R(e){return e.drawer.isSuppressed}function $(e){return e.header.isNavigationEnabled}function V(e){return e.runtime.currentBrand.brand}function H(e){return e.runtime.currentBrand.name}function U(e){return e.runtime.currentBrand.config}function W(e){return e.runtime.currentBrand.url}function F(e){const t=e.runtime.currentBrand.hireExpertsInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParameters)+((null==t?void 0:t.fragment)||"")}function B(e){return e.data.flowData}function Z(e){return e.data.socialData}function M(e){var t;return null!==(t=e.runtime.currentFlow)&&void 0!==t?t:a.H}function j(e){return e.flow.steps.routes}function G(e){return e.flow.steps.allSteps}function q(e){return e.flow.steps.topSteps}function Q(e){return e.flow.steps.designRoutes}function J(e){return e.flow.steps.currentStep}function Y(e){return e.flow.steps.allSteps[0]}function K(e){return e.flow.steps.allSteps[e.flow.steps.allSteps.length-1]}function X(e){return(0,L.filter)(e.flow.steps.allSteps,["path",e.flow.steps.currentStep])[0]}function ee(e){return e.flow.chapter}function te(e,t){return(0,L.filter)(e.flow.steps.allSteps,["path",t])[0]}function ne(e){const t=(0,L.findIndex)(e.flow.steps.allSteps,{path:e.flow.steps.currentStep});return 0===t?null:-1!==t&&e.flow.steps.allSteps[t-1]}function re(e){const t=e.flow.steps.allSteps.length-1,n=(0,L.findIndex)(e.flow.steps.allSteps,{path:e.flow.steps.currentStep});return t===n?null:-1!==n&&e.flow.steps.allSteps[n+1]}function ie(e){return e.sidebar.isOpen}function ae(e){return e.sidebar.view}function oe(e){return(0,L.filter)(e.sidebar.sidebars,["enabled",!0])}function le(e){return e.runtime.previewSettings.settings}function se(e){return e.settings}function ce(e){return e.settings.themeStatus}function de(e){return e.runtime.previewSettings.stepPreviewData}function ue(e){return e.header.menu}function pe(e){const t=e.runtime.currentBrand.expertsInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function he(e){const t=e.runtime.currentBrand.fullServiceCreativeTeamInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function me(e){const t=e.runtime.currentBrand.techSupportInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function ge(e){const t=e.runtime.currentBrand.migrationInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function ve(e){return e.runtime.pluginInstallHash}function fe(e){var t;return null!==(t=null==e?void 0:e.queue[0])&&void 0!==t?t:null}function we(e){var t;return 0===(null==e||null===(t=e.queue)||void 0===t?void 0:t.length)}function be(e){return e.flow.steps.error.showDialog}function _e(e){return e.flow.steps.error.continuePath}function ye(e){return e.data.flowData.data.wpComfortLevel}function Ee(e){return e.data.flowData.data.topPriority.priority1}var Se=n(9818),ke=n(2200),Ce=n(8548),xe=n(9307);const Ne=(0,xe.lazy)((()=>n.e(993).then(n.bind(n,1993)))),Te=(0,xe.lazy)((()=>n.e(310).then(n.bind(n,6310)))),De=[{id:ke.Jq,menu:Ne,sidebar:Te,enabled:!0}],Pe=async e=>{const t=e,n=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t[0]&&await t[0][1]().then((t=>{t.error&&et.shift())).then(n)};return await n(),t},Ie={reducer:(0,Se.combineReducers)({drawer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1,isSuppressed:!1,view:ke.tM},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_DRAWER_OPENED":return{...e,isOpen:t.isOpen};case"SET_DRAWER_ACTIVE_VIEW":return{...e,view:t.view};case"SET_DRAWER_SUPPRESSED":return{...e,isSuppressed:t.isSuppressed,isOpen:!t.isSuppressed&&e.isOpen}}return e},runtime:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_RUNTIME":return{...e,...t.runtime};case"SET_PREVIEW_SETTINGS":return{...e,previewSettings:{...e.previewSettings,settings:t.previewSettings}}}return e},data:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CURRENT_DATA":return{...e,flowData:{...t.flowData}};case"SET_SOCIAL_DATA":return{...e,socialData:{...t.socialData}}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeStatus:ke.a0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings};case"UPDATE_THEME_STATUS":return{...e,themeStatus:t.themeStatus}}return e},flow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{flow:a.H,steps:{routes:Ce.Nr,allSteps:Ce.HA,topSteps:Ce.iD,designRoutes:Ce.Ub,currentStep:"",error:{showDialog:!1,continuePath:""}},chapter:void 0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ACTIVE_STEP":return{...e,steps:{...e.steps,currentStep:t.path}};case"SET_ACTIVE_FLOW":return{...e,flow:t.flow};case"UPDATE_ROUTES":return{...e,steps:{...e.steps,routes:t.routes}};case"UPDATE_ALL_STEPS":return{...e,steps:{...e.steps,allSteps:t.allSteps}};case"UPDATE_TOP_STEPS":return{...e,steps:{...e.steps,topSteps:t.topSteps}};case"UPDATE_DESIGN_ROUTES":return{...e,steps:{...e.steps,designRoutes:t.designRoutes}};case"SHOW_NAV_ERROR_DIALOG":return{...e,steps:{...e.steps,error:{...e.steps.error,showDialog:t.showDialog}}};case"SET_NAV_ERROR_CONTINUE_PATH":return{...e,steps:{...e.steps,error:{...e.steps.error,continuePath:t.continuePath}}};case"RESET_NAV_ERROR":return{...e,steps:{...e.steps,error:{showDialog:!1,continuePath:""}}};case"SET_ACTIVE_CHAPTER":return{...e,chapter:t.chapter}}return e},sidebar:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1,view:"LearnMore",sidebars:De},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SIDEBAR_OPENED":return{...e,isOpen:t.isOpen};case"SET_SIDEBAR_ACTIVE_VIEW":return{...e,view:t.view}}return e},header:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isNavigationEnabled:!0,menu:""},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_HEADER_NAVIGATION_ENABLED":return{...e,isNavigationEnabled:t.isNavigationEnabled};case"UPDATE_HEADER_MENU_DATA":return{...e,menu:t.menu}}return e},queue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENQUEUE_REQUEST":return e=e.filter((e=>e[0]!==t.id)),[...e,[t.id,t.request]];case"DEQUEUE_REQUEST":return[...e.slice(1)];case"FLUSH_QUEUE":return Pe(e),[]}return e}}),actions:r,selectors:i},Le=(0,Se.createReduxStore)("newfold/onboarding",Ie);(0,Se.register)(Le)},6342:(e,t,n)=>{"use strict";n.d(t,{Az:()=>a,Dv:()=>u,El:()=>g,En:()=>C,F8:()=>S,GX:()=>c,IV:()=>f,L7:()=>_,LW:()=>d,Ou:()=>r,Xm:()=>k,Y3:()=>o,Z4:()=>m,_C:()=>y,eM:()=>w,hz:()=>p,pS:()=>l,pd:()=>i,ql:()=>v,r9:()=>E,rX:()=>b,sh:()=>h,uo:()=>x,xp:()=>s});const r="onboarding_started",i="onboarding_complete",a="pageview",o="onboarding_top_priority_set",l="onboarding_step_skipped",s="primary_type_set",c="secondary_type_set",d="experience_level_set",u="theme_style_selected",p="colors_selected",h="typography_selected",m="header_selected",g="homepage_layout_selected",v="starter_pages_selected",f="feature_added",w="site_title_set",b="tagline_set",_="logo_added",y="onboarding_exited",E="onboarding_chapter_started",S="onboarding_chapter_complete",k="social_added",C="wonder_start",x={[o]:"top_priority",[l]:"step",[s]:"primary_type",[c]:"secondary_type",[d]:"experience_level",[u]:"theme_style",[p]:"color_palette",[h]:"font_set",[m]:"header",[g]:"layout",[v]:"pages",[f]:"feature",[w]:"title",[b]:"tagline",[y]:"step",[E]:"chapter",[S]:"chapter",[k]:"platform"}},8297:(e,t,n)=>{"use strict";n.d(t,{Z_:()=>a,hf:()=>s,uW:()=>l,tH:()=>o});var r=n(7207),i=n(6342);class a extends r.T{constructor(e,t,n,r){const a=s(e);super(i.En,e,{label_key:a,[a]:t,...n,page:r||window.location.href},i.En)}}const o=e=>r.v.track(e),l=e=>r.v.send(e),s=e=>{if(e in i.uo)return i.uo[e]}},4704:(e,t,n)=>{"use strict";n.d(t,{$L:()=>o,FZ:()=>i,hG:()=>a});var r=n(2200);const i=e=>{var t;return`${r.bQ}/${e}`+(null!==(t=window.nfdOnboarding)&&void 0!==t&&t.currentFlow?`&flow=${window.nfdOnboarding.currentFlow}`:"")},a=e=>`${r.Y1}/${e}`,o=e=>`${r.km}/${e}`},3768:(e,t,n)=>{"use strict";n.d(t,{Hs:()=>s,pn:()=>l,xb:()=>o});var r=n(6989),i=n.n(r),a=n(4704);const o=e=>0===Object.keys(e).length;async function l(){return i()({url:(0,a.$L)("settings")})}async function s(e){return i()({url:(0,a.$L)("settings"),method:"POST",data:e})}},7533:(e,t,n)=>{"use strict";n.d(t,{BN:()=>d,ME:()=>s,b5:()=>u,kB:()=>c});var r=n(6329),i=n(4704),a=n(6989),o=n.n(a);let l;async function s(){return await(0,r.D)(o()({url:(0,i.FZ)("flow")}).then())}async function c(e){l&&l.abort("New setFlow request placed!"),l=new AbortController;const{signal:t}=l;return await(0,r.D)(o()({url:(0,i.FZ)("flow"),signal:t,method:"POST",data:e}).then())}async function d(){return await(0,r.D)(o()({url:(0,i.FZ)("flow/complete"),method:"POST"}).then())}async function u(e){return await(0,r.D)(o()({url:(0,i.FZ)("flow/switch"),method:"POST",data:{flow:e}}).then())}},6138:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var r=n(6329),i=n(4704),a=n(6989),o=n.n(a);async function l(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return await(0,r.D)(o()({url:(0,i.FZ)("patterns"+(e?`&step=${e}&squash=${t}`:""))}).then())}},3421:(e,t,n)=>{"use strict";n.d(t,{S1:()=>c,jd:()=>u,yn:()=>d});var r=n(6989),i=n.n(r),a=n(4704),o=n(2853),l=n(6329),s=n(2200);const c=()=>{if((0,o.Ph)(s.tY))return!0;i()({url:(0,a.FZ)("plugins/initialize"),method:"POST",headers:{"X-NFD-INSTALLER":window.nfdOnboarding.pluginInstallHash}}).catch((e=>{console.error(e)}))},d=async()=>await(0,l.D)(i()({url:(0,a.FZ)("plugins/site-features")}));async function u(){return await(0,l.D)(i()({url:(0,a.FZ)("plugins/initialize/activate"),method:"POST"}).then())}},6329:(e,t,n)=>{"use strict";async function r(e){const t={body:null,error:null};try{t.body=await e}catch(e){t.error=e}return t}n.d(t,{D:()=>r})},8395:(e,t,n)=>{"use strict";n.d(t,{Gw:()=>s,I2:()=>c,j2:()=>d});var r=n(6989),i=n.n(r),a=n(6329),o=n(2200),l=n(4704);async function s(){return await(0,a.D)(i()({url:(0,l.FZ)("settings")}).then())}async function c(e){return await(0,a.D)(i()({url:(0,l.FZ)("settings"),method:"POST",data:e}).then())}const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return!(e>=o.wV)&&i()({url:(0,l.FZ)("settings/initialize"),method:"POST"}).catch((()=>{e+=1,d(e)}))}},7625:(e,t,n)=>{"use strict";n.d(t,{LK:()=>v,N9:()=>d,S1:()=>c,YL:()=>m,cw:()=>h,ko:()=>g,oC:()=>p,sN:()=>u});var r=n(6989),i=n.n(r),a=n(4704),o=n(6329),l=n(2853),s=n(2200);const c=()=>{if((0,l.Ph)(s.Vx))return!0;i()({url:(0,a.FZ)("themes/initialize"),method:"POST"}).catch((e=>{console.error(e)}))},d=async function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return"string"==typeof e&&await(0,o.D)(i()({url:(0,a.hG)("themes/install"),method:"POST",data:{theme:e,activate:t,queue:n}}))},u=async function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"string"==typeof e&&await(0,o.D)(i()({url:(0,a.hG)("themes/expedite"),method:"POST",data:{theme:e,activate:t}}))},p=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return await(0,o.D)(i()({url:(0,a.FZ)("themes/variations&variations="+e)}).then())},h=async e=>await(0,o.D)(i()({url:(0,a.FZ)("themes/variations"),method:"POST",data:e}).then()),m=async e=>await(0,o.D)(i()({url:(0,a.hG)("themes/status"+(e?`&theme=${e}`:""))})),g=async()=>await(0,o.D)(i()({url:(0,a.FZ)("themes/fonts")})),v=async()=>await(0,o.D)(i()({url:(0,a.FZ)("themes/colors")}))},6690:(e,t,n)=>{"use strict";n.d(t,{NF:()=>y});var r=n(9307),i=n(2819),a=n(4981);const o=window.wp.styleEngine;var l=n(2175);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;const{coerceTo:n,rootSizeValue:r,acceptableUnits:i}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},a=null==i?void 0:i.join("|"),o=new RegExp(`^(\\d*\\.?\\d+)(${a}){1,1}$`),l=e.match(o);if(!l||l.length<3)return null;let[,s,c]=l,d=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(d*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(d/=r,c=n),{value:d,unit:c}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return Number.isFinite(e)?parseFloat(e.toFixed(t)):void 0}const d="body",u=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],cssVarInfix:"duotone",valueFunc:e=>{let{slug:t}=e;return`url( '#wp-duotone-${t}' )`},classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>{let{typography:n}=t;return function(e,t){const{size:n}=e;if(!0!==(null==t?void 0:t.fluid))return n;if(!1===(null==e?void 0:e.fluid))return n;const r=(null==e?void 0:e.fluid)||{};let i=null==r?void 0:r.min,a=null==r?void 0:r.max;const o=s(n);return null!=o&&o.unit?(i||(i=.75*o.value+o.unit),a||(a=1.5*o.value+o.unit),function(e){let{maximumViewPortWidth:t,minimumViewPortWidth:n,maximumFontSize:r,minimumFontSize:i,scaleFactor:a}=e;const o=s(i),l=(null==o?void 0:o.unit)||"rem",d=s(r,{coerceTo:l});if(!o||!d)return null;const u=s(i,{coerceTo:"rem"}),p=s(t,{coerceTo:l}),h=s(n,{coerceTo:l});if(!p||!h||!u)return null;const m=c(h.value/100,3)+l;let g=(d.value-o.value)/(p.value-h.value)*100;g=c(g,3)||1;const v=g*a;return`clamp(${i}, ${u.value}${u.unit} + ((1vw - ${m}) * ${v}), ${r})`}({maximumViewPortWidth:"1600px",minimumViewPortWidth:"768px",maximumFontSize:a,minimumFontSize:i,scaleFactor:1})||n):n}(e,n)},valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:e=>{let{size:t}=e;return t},classes:[]}],p={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function h(e){var t;const n="var:";return null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,n)?`var(--wp--${e.slice(n.length).split("|").join("--")})`:e}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.reduce)(u,((n,r)=>{let{path:a,cssVarInfix:o,classes:l}=r;if(!l)return n;const s=(0,i.get)(t,a,[]);return s&&Array.isArray(s)&&s.forEach((t=>{let{slug:r}=t;l.forEach((t=>{let{classSuffix:a,propertyName:l}=t;const s=`.has-${(0,i.kebabCase)(r)}-${a}`,c=e.split(",").map((e=>`${e}${s}`)).join(","),d=`var(--wp--preset--${o}--${(0,i.kebabCase)(r)})`;n+=`${c}{${l}: ${d} !important;}`}))})),n}),"")}function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=[];return Object.keys(e).forEach((a=>{const o=t+(0,i.kebabCase)(a.replace("/","-")),l=e[a];if(l instanceof Object){const e=o+n;r=[...r,...g(l,e,n)]}else r.push(`${o}: ${l}`)})),r}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=d===t,s=(0,i.reduce)(a.__EXPERIMENTAL_STYLE_PROPERTY,((t,r,a)=>{let{value:o,properties:s,rootOnly:c}=r;if(c&&!l)return t;const d=o;if("elements"===d[0])return t;const u=(0,i.get)(e,d);if("--wp--style--root--padding"===a&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,r]=e;if(!(0,i.get)(u,[r],!1))return;const a=n.startsWith("--")?n:(0,i.kebabCase)(n);t.push(`${a}: ${h((0,i.get)(u,[r]))}`)}));else if((0,i.get)(e,d,!1)){const n=a.startsWith("--")?a:(0,i.kebabCase)(a);t.push(`${n}: ${h((0,i.get)(e,d))}`)}return t}),[]),c=(0,o.getCSSRules)(e);return c.forEach((e=>{var t;if(l&&n&&e.key.startsWith("padding"))return;const a=e.key.startsWith("--")?e.key:(0,i.kebabCase)(e.key);let o=e.value;if("string"!=typeof o&&null!==(t=o)&&void 0!==t&&t.ref){var c;const e=o.ref.split(".");if(o=(0,i.get)(r,e),!o||null!==(c=o)&&void 0!==c&&c.ref)return}s.push(`${a}: ${o}`)})),s}function f(e){var t,n,r,i,a;let{tree:o,style:s,selector:c,hasBlockGapSupport:u,hasFallbackGapSupport:p,fallbackGapValue:h}=e,m="",g=u?(0,l.__experimentalGetGapCSSValue)(null==s||null===(t=s.spacing)||void 0===t?void 0:t.blockGap):"";if(p&&(c===d?g=g||"0.5em":!u&&h&&(g=h)),g&&null!=o&&null!==(n=o.settings)&&void 0!==n&&null!==(r=n.layout)&&void 0!==r&&r.definitions&&(Object.values(o.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:r}=e;(u||"flex"===n)&&null!=r&&r.length&&r.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,r]=e;n.push(`${t}: ${r||g}`)})),n.length){let r="";r=u?c===d?`${c} .${t}${(null==e?void 0:e.selector)||""}`:`${c}.${t}${(null==e?void 0:e.selector)||""}`:c===d?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${c}.${t}${(null==e?void 0:e.selector)||""})`,m+=`${r} { ${n.join("; ")}; }`}}))})),c===d&&u&&(m+=`${c} { --wp--style--block-gap: ${g}; }`)),c===d&&null!=o&&null!==(i=o.settings)&&void 0!==i&&null!==(a=i.layout)&&void 0!==a&&a.definitions){const e=["block","flex","grid"];Object.values(o.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:r,baseStyles:i}=t;r&&e.includes(r)&&(m+=`${c} .${n} { display:${r}; }`),null!=i&&i.length&&i.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,r]=e;t.push(`${n}: ${r}`)})),t.length){const r=`${c} .${n}${(null==e?void 0:e.selector)||""}`;m+=`${r} { ${t.join("; ")}; }`}}))}))}return m}const w=(e,t)=>{var n,r;const o=[];if(null==e||!e.styles)return o;const l=e=>(0,i.pickBy)(e,((e,t)=>["border","color","spacing","typography","filter"].includes(t))),s=l(e.styles);return s&&o.push({styles:s,selector:d}),Object.entries(a.__EXPERIMENTAL_ELEMENTS).forEach((t=>{var n,r;let[i,a]=t;var l;null!==(n=e.styles)&&void 0!==n&&n.elements&&null!==(r=e.styles)&&void 0!==r&&r.elements[i]&&o.push({styles:null===(l=e.styles)||void 0===l?void 0:l.elements[i],selector:a})})),Object.entries(null!==(n=null===(r=e.styles)||void 0===r?void 0:r.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,r;let[i,s]=e;const c=l(s);c&&null!=t&&null!==(n=t[i])&&void 0!==n&&n.selector&&o.push({duotoneSelector:t[i].duotoneSelector,fallbackGapValue:t[i].fallbackGapValue,hasLayoutSupport:t[i].hasLayoutSupport,selector:t[i].selector,styles:c,featureSelectors:t[i].featureSelectors}),Object.entries(null!==(r=null==s?void 0:s.elements)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;r&&null!=t&&t[i]&&null!==a.__EXPERIMENTAL_ELEMENTS&&void 0!==a.__EXPERIMENTAL_ELEMENTS&&a.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[i].selector.split(",").map((e=>a.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o},b=(e,t)=>{var n,r,a;const o=[];if(null==e||!e.settings)return o;const l=e=>{const t={};return u.forEach((n=>{let{path:r}=n;const a=(0,i.get)(e,r,!1);!1!==a&&(0,i.set)(t,r,a)})),t},s=l(e.settings),c=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,i.isEmpty)(s)&&!c||o.push({presets:s,custom:c,selector:d}),Object.entries(null!==(r=null===(a=e.settings)||void 0===a?void 0:a.blocks)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;const a=l(r),s=r.custom;(0,i.isEmpty)(a)&&!s||o.push({presets:a,custom:s,selector:t[n].selector})})),o},_=(e,t)=>{const n=b(e,t);let r="";return n.forEach((t=>{let{presets:n,custom:a,selector:o}=t;const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return(0,i.reduce)(u,((n,r)=>{let{path:a,valueKey:o,valueFunc:l,cssVarInfix:s}=r;const c=(0,i.get)(e,a,[]);return c&&Array.isArray(c)&&c.forEach((e=>{o&&!l?n.push(`--wp--preset--${s}--${(0,i.kebabCase)(e.slug)}: ${e[o]}`):l&&"function"==typeof l&&n.push(`--wp--preset--${s}--${(0,i.kebabCase)(e.slug)}: ${l(e,t)}`)})),n}),[])}(n,null==e?void 0:e.settings),s=g(a,"--wp--custom--","--");s.length>0&&l.push(...s),l.length>0&&(r+=`${o}{${l.join(";")};}`)})),r};function y(e,t){var n;const o=t.settings.__experimentalFeatures.spacing.blockGap,s=!o,c=null===(n=t.settings)||void 0===n||!n.disableLayoutStyles||t.settings.disableLayoutStyles;if(!(null!=e&&e.styles||null!=e&&e.settings||null!=e&&e.globalStyles))return;const h={settings:e.settings,styles:null!=e&&e.globalStyles?e.globalStyles:e.styles},g=(e=>{const t={};return e.forEach((e=>{var n,r,i,a,o,l,s,c,d;const u=e.name,h=null!==(n=null==e||null===(r=e.supports)||void 0===r?void 0:r.__experimentalSelector)&&void 0!==n?n:".wp-block-"+u.replace("core/","").replace("/","-"),m=null!==(i=null==e||null===(a=e.supports)||void 0===a||null===(o=a.color)||void 0===o?void 0:o.__experimentalDuotone)&&void 0!==i?i:null,g=!(null==e||null===(l=e.supports)||void 0===l||!l.__experimentalLayout),v=null==e||null===(s=e.supports)||void 0===s||null===(c=s.spacing)||void 0===c||null===(d=c.blockGap)||void 0===d?void 0:d.__experimentalDefault,f={};Object.entries(p).forEach((t=>{var n,r;let[i,a]=t;const o=null==e||null===(n=e.supports)||void 0===n||null===(r=n[i])||void 0===r?void 0:r.__experimentalSelector;o&&(f[a]=function(e,t){const n=e.split(","),r=t.split(","),i=[];return n.forEach((e=>{r.forEach((t=>{i.push(`${e.trim()} ${t.trim()}`)}))})),i.join(", ")}(h,o))})),t[u]={duotoneSelector:m,fallbackGapValue:v,featureSelectors:Object.keys(f).length?f:void 0,hasLayoutSupport:g,name:u,selector:h}})),t})((0,a.getBlockTypes)()),y=_(h,g),E=function(e,t,n,r){var a,o;let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const c=w(e,t),u=b(e,t),p=null==e||null===(a=e.settings)||void 0===a?void 0:a.useRootPaddingAwareAlignments,{contentSize:h,wideSize:g}=(null==e||null===(o=e.settings)||void 0===o?void 0:o.layout)||{};let _="body {margin: 0;";if(h&&(_+=` --wp--style--global--content-size: ${h};`),g&&(_+=` --wp--style--global--wide-size: ${g};`),p&&(_+='padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) } \n\t\t\t .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } \n\t\t\t .has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; } \n\t\t\t .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } \n\t\t\t .has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; } \n\t\t\t .has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } \n\t\t\t .has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;'),_+="}",c.forEach((t=>{let{selector:i,duotoneSelector:a,styles:o,fallbackGapValue:l,hasLayoutSupport:c,featureSelectors:u}=t;u&&Object.entries(u).forEach((e=>{let[t,n]=e;if(null!=o&&o[t]){const e=v({[t]:o[t]});delete o[t],e.length&&(_+=`${n}{${e.join(";")} }`)}}));const h={};if(null!=o&&o.filter&&(h.filter=o.filter,delete o.filter),a){const e=v(h);e.length>0&&(_+=`${a}{${e.join(";")};}`)}s||d!==i&&!c||(_+=f({tree:e,style:o,selector:i,hasBlockGapSupport:n,hasFallbackGapSupport:r,fallbackGapValue:l}));const m=v(o,i,p,e);null!=m&&m.length&&(_+=`${i}{${m.join(";")};}`);const g=Object.entries(o).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=g&&g.length&&g.forEach((e=>{let[t,n]=e;const r=v(n);if(null==r||!r.length)return;const a=`${i.split(",").map((e=>e+t)).join(",")}{${r.join(";")};}`;_+=a}))})),_+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",_+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",_+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",!s&&n){var y,E;const t=(0,l.__experimentalGetGapCSSValue)(null==e||null===(y=e.styles)||void 0===y||null===(E=y.spacing)||void 0===E?void 0:E.blockGap)||"0.5em";_+=".wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }",_+=`.wp-site-blocks > * + * { margin-block-start: ${t}; }`}return u.forEach((e=>{let{selector:t,presets:n}=e;d===t&&(t="");const r=m(t,n);(0,i.isEmpty)(r)||(_+=r)})),_}(h,g,o,s,c),S=function(e,t){return b(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,i.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>(0,r.createElement)(l.__unstablePresetDuotoneFilter,{preset:e,key:e.slug})))))}))}(t)}))}(h,g),k=[...t.settings.styles.filter((e=>!(e.hasOwnProperty("id")&&("customProperty"===e.id||"globalStyle"===e.id)))),{id:"customProperty",css:y,isGlobalStyles:!0},{id:"globalStyle",css:E,isGlobalStyles:!0},{assets:S,__unstableType:"svg",isGlobalStyles:!0}];return e.settings.styles=k,e.settings.__unstableResolvedAssets=t.settings.__unstableResolvedAssets,e.settings.__experimentalFeatures=t.settings.__experimentalFeatures,e}},2853:(e,t,n)=>{"use strict";n.d(t,{Ph:()=>a,gq:()=>l,iO:()=>o});var r=n(6483),i=n(2819);const a=e=>new URLSearchParams(window.location.search).get(e),o=(e,t)=>(0,r.hasQueryArg)(e,t)?(0,r.removeQueryArgs)(e,t):e,l=e=>(0,i.transform)(e,((e,t,n)=>{e[(0,i.snakeCase)(n)]=t}))},1392:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var r=n(6515),i=n(5736);const a={[r.H]:{site:{noun:(0,i._x)("site","noun","wp-module-onboarding")},website:{noun:(0,i._x)("website","noun","wp-module-onboarding")}},[r._]:{site:{noun:(0,i._x)("store","noun","wp-module-onboarding")},website:{noun:(0,i._x)("store","noun","wp-module-onboarding")}}},o=function(e){var t,n;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"noun";const o=(null===(t=window)||void 0===t||null===(n=t.nfdOnboarding)||void 0===n?void 0:n.currentFlow)||r.H,l=a[o][e.toLowerCase()][i];return e===e.toUpperCase()?l.toUpperCase():e[0]===e[0].toUpperCase()?l[0].toUpperCase()+l.substring(1):l}},2200:(e,t,n)=>{"use strict";n.d(t,{$3:()=>q,$E:()=>G,$P:()=>J,Az:()=>Y,BP:()=>y,Bv:()=>A,DY:()=>H,Ei:()=>L,GV:()=>B,JB:()=>c,Jq:()=>O,Rq:()=>Z,Vx:()=>V,Y1:()=>v,Yl:()=>_,Zh:()=>F,_h:()=>k,a0:()=>U,bQ:()=>g,br:()=>w,dD:()=>d,dv:()=>P,iX:()=>Q,jN:()=>x,km:()=>m,lE:()=>S,mz:()=>D,nx:()=>T,pf:()=>p,qB:()=>I,qO:()=>N,qR:()=>C,tM:()=>b,tX:()=>E,tY:()=>$,tg:()=>M,uK:()=>j,uj:()=>R,vv:()=>W,wV:()=>z});var r,i,a,o,l,s=n(6483);const c="nfd-onboarding",d="object"==typeof(null===(r=window)||void 0===r?void 0:r.nfdOnboarding)&&"buildUrl"in window.nfdOnboarding,u=window.nfdOnboarding.adminUrl,p=window.nfdOnboarding.siteUrl,h=window.nfdOnboarding.restUrl,m=`${h}/wp/v2`,g=`${h}/newfold-onboarding/v1`,v=`${h}/newfold-installer/v1`,f=(0,s.addQueryArgs)(`${u}index.php`,null===(i=window.nfdOnboarding.currentBrand)||void 0===i?void 0:i.dashboardRedirectParams),w=null!==(a=(0,s.addQueryArgs)(null===(o=window.nfdOnboarding.currentBrand)||void 0===o?void 0:o.pluginDashboardPage,null===(l=window.nfdOnboarding.currentBrand)||void 0===l?void 0:l.dashboardRedirectParams))&&void 0!==a?a:f,b="nav-primary",_="nav-design",y="nav-page",E="design-themes",S="design-theme-styles-menu",k="design-theme-styles-preview",C="design-colors",x="design-typography",N="design-header-menu",T="design-homepage-menu",D="nav-get-started",P="nav-ecommerce-store-info",I="Sidebar",L="HeaderMenu",O="LearnMore",A=2,z=2,R=2,$="nfd_plugins",V="nfd_themes",H="nfd_slug_yith_wonder",U="init",W="inactive",F="installing",B="activated",Z="failed",M="demographic",j="commerce",G="design",q="layout_and_content",Q="features",J=[b,_,D,y,P],Y={SET_FLOW:"SET_FLOW",SET_GLOBAL_STYLES:"SET_GLOBAL_STYLES"}},4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t{"use strict";n.d(t,{AW:()=>N,F0:()=>T,FR:()=>l,TH:()=>m,Us:()=>s,WU:()=>f,Z5:()=>D,oQ:()=>p,s0:()=>v});var r=n(9196),i=n(2599);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0})),r.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,a({fromRouteId:t},i)))}),[e,t])}():function(){h()||(0,i.J0)(!1);let{basename:e,navigator:t}=r.useContext(s),{matches:n}=r.useContext(d),{pathname:a}=m(),o=JSON.stringify((0,i.Zq)(n).map((e=>e.pathnameBase))),l=r.useRef(!1);return g((()=>{l.current=!0})),r.useCallback((function(n,r){if(void 0===r&&(r={}),!l.current)return;if("number"==typeof n)return void t.go(n);let s=(0,i.pC)(n,JSON.parse(o),a,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:(0,i.RQ)([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)}),[e,t,o,a])}()}function f(e,t){let{relative:n}=void 0===t?{}:t,{matches:a}=r.useContext(d),{pathname:o}=m(),l=JSON.stringify((0,i.Zq)(a).map((e=>e.pathnameBase)));return r.useMemo((()=>(0,i.pC)(e,JSON.parse(l),o,"path"===n)),[e,l,o,n])}function w(e,t,n){h()||(0,i.J0)(!1);let{navigator:o}=r.useContext(s),{matches:l}=r.useContext(d),u=l[l.length-1],p=u?u.params:{},g=(u&&u.pathname,u?u.pathnameBase:"/");u&&u.route;let v,f=m();if(t){var w;let e="string"==typeof t?(0,i.cP)(t):t;"/"===g||(null==(w=e.pathname)?void 0:w.startsWith(g))||(0,i.J0)(!1),v=e}else v=f;let b=v.pathname||"/",S="/"===g?b:b.slice(g.length)||"/",k=(0,i.fp)(e,{pathname:S}),C=function(e,t,n){var a;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var o;if(null==(o=n)||!o.errors)return null;e=n.matches}let l=e,s=null==(a=n)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||(0,i.J0)(!1),l=l.slice(0,Math.min(l.length,e+1))}return l.reduceRight(((e,i,a)=>{let o=i.route.id?null==s?void 0:s[i.route.id]:null,c=null;n&&(c=i.route.errorElement||_);let d=t.concat(l.slice(0,a+1)),u=()=>{let t;return t=o?c:i.route.Component?r.createElement(i.route.Component,null):i.route.element?i.route.element:e,r.createElement(E,{match:i,routeContext:{outlet:e,matches:d,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===a)?r.createElement(y,{location:n.location,revalidation:n.revalidation,component:c,error:o,children:u(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):u()}),null)}(k&&k.map((e=>Object.assign({},e,{params:Object.assign({},p,e.params),pathname:(0,i.RQ)([g,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?g:(0,i.RQ)([g,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,n);return t&&C?r.createElement(c.Provider,{value:{location:a({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:i.aU.Pop}},C):C}function b(){let e=function(){var e;let t=r.useContext(u),n=function(e){let t=r.useContext(l);return t||(0,i.J0)(!1),t}(k.UseRouteError),a=x(k.UseRouteError);return t||(null==(e=n.errors)?void 0:e[a])}(),t=(0,i.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:a},n):null,null)}const _=r.createElement(b,null);class y extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(d.Provider,{value:this.props.routeContext},r.createElement(u.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function E(e){let{routeContext:t,match:n,children:i}=e,a=r.useContext(o);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(d.Provider,{value:t},i)}var S,k,C;function x(e){let t=function(e){let t=r.useContext(d);return t||(0,i.J0)(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||(0,i.J0)(!1),n.route.id}function N(e){(0,i.J0)(!1)}function T(e){let{basename:t="/",children:n=null,location:a,navigationType:o=i.aU.Pop,navigator:l,static:d=!1}=e;h()&&(0,i.J0)(!1);let u=t.replace(/^\/*/,"/"),p=r.useMemo((()=>({basename:u,navigator:l,static:d})),[u,l,d]);"string"==typeof a&&(a=(0,i.cP)(a));let{pathname:m="/",search:g="",hash:v="",state:f=null,key:w="default"}=a,b=r.useMemo((()=>{let e=(0,i.Zn)(m,u);return null==e?null:{location:{pathname:e,search:g,hash:v,state:f,key:w},navigationType:o}}),[u,m,g,v,f,w,o]);return null==b?null:r.createElement(s.Provider,{value:p},r.createElement(c.Provider,{children:n,value:b}))}function D(e){let{children:t,location:n}=e;return w(P(t),n)}function P(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;let o=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,P(e.props.children,o));e.type!==N&&(0,i.J0)(!1),e.props.index&&e.props.children&&(0,i.J0)(!1);let l={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=P(e.props.children,o)),n.push(l)})),n}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(S||(S={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(k||(k={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(C||(C={})),new Promise((()=>{})),r.Component},9196:e=>{"use strict";e.exports=window.React},2819:e=>{"use strict";e.exports=window.lodash},6989:e=>{"use strict";e.exports=window.wp.apiFetch},2175:e=>{"use strict";e.exports=window.wp.blockEditor},4981:e=>{"use strict";e.exports=window.wp.blocks},5609:e=>{"use strict";e.exports=window.wp.components},4333:e=>{"use strict";e.exports=window.wp.compose},7798:e=>{"use strict";e.exports=window.wp.coreData},9818:e=>{"use strict";e.exports=window.wp.data},5904:e=>{"use strict";e.exports=window.wp.dom},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},9630:e=>{"use strict";e.exports=window.wp.keycodes},444:e=>{"use strict";e.exports=window.wp.primitives},6483:e=>{"use strict";e.exports=window.wp.url},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.m=n,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="newfold.Onboarding:",i.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d{l.onerror=l.onload=null,clearTimeout(h);var i=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),i&&i.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={343:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var a=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=a);var o=i.p+i.u(t),l=new Error;i.l(o,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",l.name="ChunkLoadError",l.type=a,l.request=o,r[1](l)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,l,s]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in l)i.o(l,r)&&(i.m[r]=l[r]);s&&s(i)}for(t&&t(n);c{"use strict";i.r(a);var e={};i.r(e),i.d(e,{disableComplementaryArea:()=>je,enableComplementaryArea:()=>Me,pinItem:()=>Ge,setDefaultComplementaryArea:()=>Ze,setFeatureDefaults:()=>Ye,setFeatureValue:()=>Je,toggleFeature:()=>Qe,unpinItem:()=>qe});var t={};i.r(t),i.d(t,{getActiveComplementaryArea:()=>Ke,isComplementaryAreaLoading:()=>Xe,isFeatureActive:()=>tt,isItemPinned:()=>et});var n=i(2200);const r=window.wp.domReady;var o=i.n(r);const l=window.wp.blockLibrary;var s=i(9307),c=i(2503),d=i(7533),u=i(3421),p=i(7625),h=i(6989),m=i.n(h);const g=()=>{m()({url:`${n.pf}/wp-cron.php`,method:"GET",parse:!1}).catch((e=>{console.error(e)}))};var v=i(8395),f=i(5609),w=i(9818),b=i(9250),_=i(1984),y=i(4310),E=i(5024),S=i(5736),k=i(8297),C=i(6342);const x=e=>{let{path:t,showErrorDialog:n}=e;const{setNavErrorContinuePath:r}=(0,w.useDispatch)(c.h),i=(0,b.s0)();return(0,s.createElement)(f.Button,{className:"navigation-buttons navigation-buttons_back",onClick:()=>{!1!==n?r(t):i(t,{state:{origin:"header"}})},variant:"secondary"},(0,s.createElement)(_.Z,{icon:y.Z}),(0,S.__)("Back","wp-module-onboarding"))},N=e=>{let{path:t,showErrorDialog:n}=e;const{setNavErrorContinuePath:r}=(0,w.useDispatch)(c.h),i=(0,b.s0)();return(0,s.createElement)(f.Button,{onClick:()=>{!1!==n?r(t):i(t,{state:{origin:"header"}})},variant:"primary",className:"navigation-buttons navigation-buttons_next"},(0,S.__)("Next","wp-module-onboarding"),(0,s.createElement)(_.Z,{icon:E.Z}))};async function T(e){e&&(e.isComplete=(new Date).getTime(),(0,d.kB)(e)),(0,u.jd)(),(0,k.uW)(new k.Z_(C.pd)),window.location.replace(n.br)}const D=e=>{let{currentData:t,saveDataAndExitFunc:n}=e;return(0,s.createElement)(f.Button,{onClick:()=>n(t),className:"navigation-buttons navigation-buttons_finish",variant:"primary"},(0,S.__)("Finish","wp-module-onboarding"),(0,s.createElement)(_.Z,{icon:E.Z}))},P=()=>{const{previousStep:e,nextStep:t,currentData:n,showErrorDialog:r}=(0,w.useSelect)((e=>({nextStep:e(c.h).getNextStep(),previousStep:e(c.h).getPreviousStep(),currentData:e(c.h).getCurrentOnboardingData(),showErrorDialog:e(c.h).getShowErrorDialog()})),[]),i=null===e||!1===e,a=null===t||!1===t;return(0,s.createElement)("div",{className:"nfd-onboarding-header__step-navigation"},(0,s.createElement)(f.ButtonGroup,{style:{display:"flex",columnGap:"0.5rem"}},i||a?null:(0,s.createElement)(x,{path:e.path,showErrorDialog:r}),a?(0,s.createElement)(D,{currentData:n,saveDataAndExitFunc:T}):(0,s.createElement)(N,{path:t.path,showErrorDialog:r})))},I=()=>{const{sidebars:e,isHeaderNavigationEnabled:t}=(0,w.useSelect)((e=>({sidebars:e(c.h).getSidebars(),isHeaderNavigationEnabled:e(c.h).isHeaderNavigationEnabled()})));return(0,s.createElement)(s.Fragment,null,t&&(0,s.createElement)(P,null),e.map((e=>(0,s.createElement)(f.Slot,{key:e.id,name:`${n.Ei}/${e.id}`}))))},L=(0,s.memo)((()=>(0,s.createElement)("div",{className:"nfd-onboarding-header"},(0,s.createElement)("div",{className:"nfd-onboarding-header__center"}),(0,s.createElement)("div",{className:"nfd-onboarding-header__end"},(0,s.createElement)(I,null)))));var O=i(6483),A=i(2819),z=i(9885),R=i(9343),$=i(4433),V=i(6111),H=i(1715),U=i(1809);const W=[$.E,R.B,V.c,U.p,H.R],F=e=>W.filter((t=>t.id===e)),B=(e,t,n)=>{const r={};return e.forEach((e=>t[e.id]?r[e.id]=t[e.id]:r[e.id]={completed:!1,firstStep:e.steps[0].path,lastStep:(null==n?void 0:n.chapter)===e.id&&null!=n&&n.path?null==n?void 0:n.path:""})),r};var Z=i(8548),M=i(6515),j=i(2853),G=i(35),q=i(1392);const Q=()=>{const{brandName:e}=(0,w.useSelect)((e=>({brandName:e(c.h).getNewfoldBrandName()})),[]),t=(e=>({title:(0,S.sprintf)( +(0,a.__)("In the next steps and in the future, you can change the specific colors and fonts to fit your aesthetic vision for your %s.","wp-module-onboarding"),(0,c.I)("site"))}]},help:{fullService:{text:(0,a.__)("Hire Our Full-Service Creative Studio","wp-module-onboarding"),link:n},support:{text:(0,a.__)("Technical Support","wp-module-onboarding"),link:t}}}))(r,o,f);return(0,i.createElement)("div",{className:"nfd-onboarding-sidebar-learn-more__design-theme-styles-preview"},(0,i.createElement)(v,{heading:b.introduction.heading,subheading:b.introduction.subheading,icon:b.introduction.icon}),!1!==(null==w||null===(e=w.views)||void 0===e||null===(t=e.sidebar)||void 0===t||null===(n=t.illustration)||void 0===n?void 0:n.shown)&&(0,i.createElement)(u,{cssIcon:b.illustration.icon}),(0,i.createElement)(p,{headingWithDescriptions:b.information.headingWithDescriptions}),(0,i.createElement)(h,null,b.help.fullService.link&&(0,i.createElement)(m,{text:b.help.fullService.text,onClick:()=>window.open(b.help.fullService.link,"_blank")}),(0,i.createElement)(g,{text:b.help.support.text,link:b.help.support.link})))}]}},data:{designDrawerActiveLinkIncludes:"/wp-setup/step/design/theme-styles/",patternId:"theme-styles"}})},2503:(e,t,n)=>{"use strict";n.d(t,{h:()=>Le});var r={};n.r(r),n.d(r,{dequeueRequest:()=>N,enqueueRequest:()=>x,flushQueue:()=>T,resetNavError:()=>I,setActiveChapter:()=>p,setActiveFlow:()=>d,setActiveStep:()=>u,setCurrentOnboardingData:()=>h,setDrawerActiveView:()=>l,setHeaderMenuData:()=>C,setIsDrawerOpened:()=>s,setIsDrawerSuppressed:()=>c,setIsHeaderNavigationEnabled:()=>b,setIsSidebarOpened:()=>f,setNavErrorContinuePath:()=>P,setOnboardingSocialData:()=>m,setRuntime:()=>o,setSidebarActiveView:()=>w,showNavErrorDialog:()=>D,updateAllSteps:()=>E,updateDesignRoutes:()=>k,updatePreviewSettings:()=>_,updateRoutes:()=>y,updateSettings:()=>g,updateThemeStatus:()=>v,updateTopSteps:()=>S});var i={};n.r(i),n.d(i,{getAllSteps:()=>G,getCurrentChapter:()=>ee,getCurrentOnboardingData:()=>B,getCurrentStep:()=>X,getCurrentStepPath:()=>J,getDesignRoutes:()=>Q,getDrawerView:()=>A,getExperienceLevel:()=>ye,getExpertsUrl:()=>pe,getFirstStep:()=>Y,getHeaderMenuData:()=>ue,getHireExpertsUrl:()=>F,getLastStep:()=>K,getMigrationUrl:()=>ge,getNavErrorPath:()=>_e,getNewfoldBrand:()=>V,getNewfoldBrandConfig:()=>U,getNewfoldBrandName:()=>H,getNewfoldBrandUrl:()=>W,getNextStep:()=>re,getOnboardingFlow:()=>M,getOnboardingSocialData:()=>Z,getPluginInstallHash:()=>ve,getPreviewSettings:()=>le,getPreviousStep:()=>ne,getQueuePeek:()=>fe,getRoutes:()=>j,getSettings:()=>se,getShowErrorDialog:()=>be,getSidebarView:()=>ae,getSidebars:()=>oe,getStepFromPath:()=>te,getStepPreviewData:()=>de,getTechSupportUrl:()=>me,getThemeStatus:()=>ce,getTopPriority:()=>Ee,getTopSteps:()=>q,getfullServiceCreativeTeamUrl:()=>he,isDrawerOpened:()=>z,isDrawerSuppressed:()=>R,isHeaderNavigationEnabled:()=>$,isQueueEmpty:()=>we,isSidebarOpened:()=>ie});var a=n(6515);function o(e){var t;return window.nfdOnboarding={buildUrl:e.buildUrl,siteUrl:e.siteUrl,migrated:!0,currentFlow:null!==(t=e.currentFlow)&&void 0!==t?t:a.H,stepPreviewData:e.previewSettings.stepPreviewData},{type:"SET_RUNTIME",runtime:e}}function l(e){return{type:"SET_DRAWER_ACTIVE_VIEW",view:e}}function s(e){return{type:"SET_DRAWER_OPENED",isOpen:e}}function c(e){return{type:"SET_DRAWER_SUPPRESSED",isSuppressed:e}}function d(e){return{type:"SET_ACTIVE_FLOW",flow:e}}function u(e){return{type:"SET_ACTIVE_STEP",path:e=e.replace(/\/$/,"")}}function p(e){return{type:"SET_ACTIVE_CHAPTER",chapter:e}}function h(e){return{type:"SET_CURRENT_DATA",flowData:e}}function m(e){return{type:"SET_SOCIAL_DATA",socialData:e}}function g(e){return{type:"UPDATE_SETTINGS",settings:e}}function v(e){return{type:"UPDATE_THEME_STATUS",themeStatus:e}}function f(e){return{type:"SET_SIDEBAR_OPENED",isOpen:e}}function w(e){return{type:"SET_SIDEBAR_ACTIVE_VIEW",view:e}}function b(e){return{type:"SET_HEADER_NAVIGATION_ENABLED",isNavigationEnabled:e}}function _(e){return{type:"SET_PREVIEW_SETTINGS",previewSettings:e}}function y(e){return{type:"UPDATE_ROUTES",routes:e}}function E(e){return{type:"UPDATE_ALL_STEPS",allSteps:e}}function S(e){return{type:"UPDATE_TOP_STEPS",topSteps:e}}function k(e){return{type:"UPDATE_DESIGN_ROUTES",designRoutes:e}}function C(e){return{type:"UPDATE_HEADER_MENU_DATA",menu:e}}function x(e,t){return{type:"ENQUEUE_REQUEST",id:e,request:t}}function N(){return{type:"DEQUEUE_REQUEST"}}function T(){return{type:"FLUSH_QUEUE"}}function D(e){return{type:"SHOW_NAV_ERROR_DIALOG",showDialog:e}}function P(e){return{type:"SET_NAV_ERROR_CONTINUE_PATH",continuePath:e}}function I(){return{type:"RESET_NAV_ERROR"}}var L=n(2819),O=n(6483);function A(e){return e.drawer.view}function z(e){return e.drawer.isOpen}function R(e){return e.drawer.isSuppressed}function $(e){return e.header.isNavigationEnabled}function V(e){return e.runtime.currentBrand.brand}function H(e){return e.runtime.currentBrand.name}function U(e){return e.runtime.currentBrand.config}function W(e){return e.runtime.currentBrand.url}function F(e){const t=e.runtime.currentBrand.hireExpertsInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParameters)+((null==t?void 0:t.fragment)||"")}function B(e){return e.data.flowData}function Z(e){return e.data.socialData}function M(e){var t;return null!==(t=e.runtime.currentFlow)&&void 0!==t?t:a.H}function j(e){return e.flow.steps.routes}function G(e){return e.flow.steps.allSteps}function q(e){return e.flow.steps.topSteps}function Q(e){return e.flow.steps.designRoutes}function J(e){return e.flow.steps.currentStep}function Y(e){return e.flow.steps.allSteps[0]}function K(e){return e.flow.steps.allSteps[e.flow.steps.allSteps.length-1]}function X(e){return(0,L.filter)(e.flow.steps.allSteps,["path",e.flow.steps.currentStep])[0]}function ee(e){return e.flow.chapter}function te(e,t){return(0,L.filter)(e.flow.steps.allSteps,["path",t])[0]}function ne(e){const t=(0,L.findIndex)(e.flow.steps.allSteps,{path:e.flow.steps.currentStep});return 0===t?null:-1!==t&&e.flow.steps.allSteps[t-1]}function re(e){const t=e.flow.steps.allSteps.length-1,n=(0,L.findIndex)(e.flow.steps.allSteps,{path:e.flow.steps.currentStep});return t===n?null:-1!==n&&e.flow.steps.allSteps[n+1]}function ie(e){return e.sidebar.isOpen}function ae(e){return e.sidebar.view}function oe(e){return(0,L.filter)(e.sidebar.sidebars,["enabled",!0])}function le(e){return e.runtime.previewSettings.settings}function se(e){return e.settings}function ce(e){return e.settings.themeStatus}function de(e){return e.runtime.previewSettings.stepPreviewData}function ue(e){return e.header.menu}function pe(e){const t=e.runtime.currentBrand.expertsInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function he(e){const t=e.runtime.currentBrand.fullServiceCreativeTeamInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function me(e){const t=e.runtime.currentBrand.techSupportInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function ge(e){const t=e.runtime.currentBrand.migrationInfo;return(0,O.addQueryArgs)(null==t?void 0:t.defaultLink,null==t?void 0:t.queryParams)+((null==t?void 0:t.fragment)||"")}function ve(e){return e.runtime.pluginInstallHash}function fe(e){var t;return null!==(t=null==e?void 0:e.queue[0])&&void 0!==t?t:null}function we(e){var t;return 0===(null==e||null===(t=e.queue)||void 0===t?void 0:t.length)}function be(e){return e.flow.steps.error.showDialog}function _e(e){return e.flow.steps.error.continuePath}function ye(e){return e.data.flowData.data.wpComfortLevel}function Ee(e){return e.data.flowData.data.topPriority.priority1}var Se=n(9818),ke=n(2200),Ce=n(8548),xe=n(9307);const Ne=(0,xe.lazy)((()=>n.e(993).then(n.bind(n,1993)))),Te=(0,xe.lazy)((()=>n.e(310).then(n.bind(n,6310)))),De=[{id:ke.Jq,menu:Ne,sidebar:Te,enabled:!0}],Pe=async e=>{const t=e,n=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t[0]&&await t[0][1]().then((t=>{t.error&&et.shift())).then(n)};return await n(),t},Ie={reducer:(0,Se.combineReducers)({drawer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1,isSuppressed:!1,view:ke.tM},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_DRAWER_OPENED":return{...e,isOpen:t.isOpen};case"SET_DRAWER_ACTIVE_VIEW":return{...e,view:t.view};case"SET_DRAWER_SUPPRESSED":return{...e,isSuppressed:t.isSuppressed,isOpen:!t.isSuppressed&&e.isOpen}}return e},runtime:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_RUNTIME":return{...e,...t.runtime};case"SET_PREVIEW_SETTINGS":return{...e,previewSettings:{...e.previewSettings,settings:t.previewSettings}}}return e},data:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CURRENT_DATA":return{...e,flowData:{...t.flowData}};case"SET_SOCIAL_DATA":return{...e,socialData:{...t.socialData}}}return e},settings:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themeStatus:ke.a0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SETTINGS":return{...e,...t.settings};case"UPDATE_THEME_STATUS":return{...e,themeStatus:t.themeStatus}}return e},flow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{flow:a.H,steps:{routes:Ce.Nr,allSteps:Ce.HA,topSteps:Ce.iD,designRoutes:Ce.Ub,currentStep:"",error:{showDialog:!1,continuePath:""}},chapter:void 0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ACTIVE_STEP":return{...e,steps:{...e.steps,currentStep:t.path}};case"SET_ACTIVE_FLOW":return{...e,flow:t.flow};case"UPDATE_ROUTES":return{...e,steps:{...e.steps,routes:t.routes}};case"UPDATE_ALL_STEPS":return{...e,steps:{...e.steps,allSteps:t.allSteps}};case"UPDATE_TOP_STEPS":return{...e,steps:{...e.steps,topSteps:t.topSteps}};case"UPDATE_DESIGN_ROUTES":return{...e,steps:{...e.steps,designRoutes:t.designRoutes}};case"SHOW_NAV_ERROR_DIALOG":return{...e,steps:{...e.steps,error:{...e.steps.error,showDialog:t.showDialog}}};case"SET_NAV_ERROR_CONTINUE_PATH":return{...e,steps:{...e.steps,error:{...e.steps.error,continuePath:t.continuePath}}};case"RESET_NAV_ERROR":return{...e,steps:{...e.steps,error:{showDialog:!1,continuePath:""}}};case"SET_ACTIVE_CHAPTER":return{...e,chapter:t.chapter}}return e},sidebar:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isOpen:!1,view:"LearnMore",sidebars:De},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_SIDEBAR_OPENED":return{...e,isOpen:t.isOpen};case"SET_SIDEBAR_ACTIVE_VIEW":return{...e,view:t.view}}return e},header:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isNavigationEnabled:!0,menu:""},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_HEADER_NAVIGATION_ENABLED":return{...e,isNavigationEnabled:t.isNavigationEnabled};case"UPDATE_HEADER_MENU_DATA":return{...e,menu:t.menu}}return e},queue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENQUEUE_REQUEST":return e=e.filter((e=>e[0]!==t.id)),[...e,[t.id,t.request]];case"DEQUEUE_REQUEST":return[...e.slice(1)];case"FLUSH_QUEUE":return Pe(e),[]}return e}}),actions:r,selectors:i},Le=(0,Se.createReduxStore)("newfold/onboarding",Ie);(0,Se.register)(Le)},6342:(e,t,n)=>{"use strict";n.d(t,{Az:()=>a,Dv:()=>u,El:()=>g,En:()=>C,F8:()=>S,GX:()=>c,IV:()=>f,L7:()=>_,LW:()=>d,Ou:()=>r,Xm:()=>k,Y3:()=>o,Z4:()=>m,_C:()=>y,eM:()=>w,hz:()=>p,pS:()=>l,pd:()=>i,ql:()=>v,r9:()=>E,rX:()=>b,sh:()=>h,uo:()=>x,xp:()=>s});const r="onboarding_started",i="onboarding_complete",a="pageview",o="onboarding_top_priority_set",l="onboarding_step_skipped",s="primary_type_set",c="secondary_type_set",d="experience_level_set",u="theme_style_selected",p="colors_selected",h="typography_selected",m="header_selected",g="homepage_layout_selected",v="starter_pages_selected",f="feature_added",w="site_title_set",b="tagline_set",_="logo_added",y="onboarding_exited",E="onboarding_chapter_started",S="onboarding_chapter_complete",k="social_added",C="wonder_start",x={[o]:"top_priority",[l]:"step",[s]:"primary_type",[c]:"secondary_type",[d]:"experience_level",[u]:"theme_style",[p]:"color_palette",[h]:"font_set",[m]:"header",[g]:"layout",[v]:"pages",[f]:"feature",[w]:"title",[b]:"tagline",[y]:"step",[E]:"chapter",[S]:"chapter",[k]:"platform"}},8297:(e,t,n)=>{"use strict";n.d(t,{Z_:()=>a,hf:()=>s,uW:()=>l,tH:()=>o});var r=n(7207),i=n(6342);class a extends r.T{constructor(e,t,n,r){const a=s(e);super(i.En,e,{label_key:a,[a]:t,...n,page:r||window.location.href},i.En)}}const o=e=>r.v.track(e),l=e=>r.v.send(e),s=e=>{if(e in i.uo)return i.uo[e]}},4704:(e,t,n)=>{"use strict";n.d(t,{$L:()=>o,FZ:()=>i,hG:()=>a});var r=n(2200);const i=e=>{var t;return`${r.bQ}/${e}`+(null!==(t=window.nfdOnboarding)&&void 0!==t&&t.currentFlow?`&flow=${window.nfdOnboarding.currentFlow}`:"")},a=e=>`${r.Y1}/${e}`,o=e=>`${r.km}/${e}`},3768:(e,t,n)=>{"use strict";n.d(t,{Hs:()=>s,pn:()=>l,xb:()=>o});var r=n(6989),i=n.n(r),a=n(4704);const o=e=>0===Object.keys(e).length;async function l(){return i()({url:(0,a.$L)("settings")})}async function s(e){return i()({url:(0,a.$L)("settings"),method:"POST",data:e})}},7533:(e,t,n)=>{"use strict";n.d(t,{BN:()=>d,ME:()=>s,b5:()=>u,kB:()=>c});var r=n(6329),i=n(4704),a=n(6989),o=n.n(a);let l;async function s(){return await(0,r.D)(o()({url:(0,i.FZ)("flow")}).then())}async function c(e){l&&l.abort("New setFlow request placed!"),l=new AbortController;const{signal:t}=l;return await(0,r.D)(o()({url:(0,i.FZ)("flow"),signal:t,method:"POST",data:e}).then())}async function d(){return await(0,r.D)(o()({url:(0,i.FZ)("flow/complete"),method:"POST"}).then())}async function u(e){return await(0,r.D)(o()({url:(0,i.FZ)("flow/switch"),method:"POST",data:{flow:e}}).then())}},6138:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var r=n(6329),i=n(4704),a=n(6989),o=n.n(a);async function l(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return await(0,r.D)(o()({url:(0,i.FZ)("patterns"+(e?`&step=${e}&squash=${t}`:""))}).then())}},3421:(e,t,n)=>{"use strict";n.d(t,{S1:()=>c,jd:()=>u,yn:()=>d});var r=n(6989),i=n.n(r),a=n(4704),o=n(2853),l=n(6329),s=n(2200);const c=()=>{if((0,o.Ph)(s.tY))return!0;i()({url:(0,a.FZ)("plugins/initialize"),method:"POST",headers:{"X-NFD-INSTALLER":window.nfdOnboarding.pluginInstallHash}}).catch((e=>{console.error(e)}))},d=async()=>await(0,l.D)(i()({url:(0,a.FZ)("plugins/site-features")}));async function u(){return await(0,l.D)(i()({url:(0,a.FZ)("plugins/initialize/activate"),method:"POST"}).then())}},6329:(e,t,n)=>{"use strict";async function r(e){const t={body:null,error:null};try{t.body=await e}catch(e){t.error=e}return t}n.d(t,{D:()=>r})},8395:(e,t,n)=>{"use strict";n.d(t,{Gw:()=>s,I2:()=>c,j2:()=>d});var r=n(6989),i=n.n(r),a=n(6329),o=n(2200),l=n(4704);async function s(){return await(0,a.D)(i()({url:(0,l.FZ)("settings")}).then())}async function c(e){return await(0,a.D)(i()({url:(0,l.FZ)("settings"),method:"POST",data:e}).then())}const d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return!(e>=o.wV)&&i()({url:(0,l.FZ)("settings/initialize"),method:"POST"}).catch((()=>{e+=1,d(e)}))}},7625:(e,t,n)=>{"use strict";n.d(t,{LK:()=>v,N9:()=>d,S1:()=>c,YL:()=>m,cw:()=>h,ko:()=>g,oC:()=>p,sN:()=>u});var r=n(6989),i=n.n(r),a=n(4704),o=n(6329),l=n(2853),s=n(2200);const c=()=>{if((0,l.Ph)(s.Vx))return!0;i()({url:(0,a.FZ)("themes/initialize"),method:"POST"}).catch((e=>{console.error(e)}))},d=async function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return"string"==typeof e&&await(0,o.D)(i()({url:(0,a.hG)("themes/install"),method:"POST",data:{theme:e,activate:t,queue:n}}))},u=async function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"string"==typeof e&&await(0,o.D)(i()({url:(0,a.hG)("themes/expedite"),method:"POST",data:{theme:e,activate:t}}))},p=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return await(0,o.D)(i()({url:(0,a.FZ)("themes/variations&variations="+e)}).then())},h=async e=>await(0,o.D)(i()({url:(0,a.FZ)("themes/variations"),method:"POST",data:e}).then()),m=async e=>await(0,o.D)(i()({url:(0,a.hG)("themes/status"+(e?`&theme=${e}`:""))})),g=async()=>await(0,o.D)(i()({url:(0,a.FZ)("themes/fonts")})),v=async()=>await(0,o.D)(i()({url:(0,a.FZ)("themes/colors")}))},6690:(e,t,n)=>{"use strict";n.d(t,{NF:()=>y});var r=n(9307),i=n(2819),a=n(4981);const o=window.wp.styleEngine;var l=n(2175);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;const{coerceTo:n,rootSizeValue:r,acceptableUnits:i}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},a=null==i?void 0:i.join("|"),o=new RegExp(`^(\\d*\\.?\\d+)(${a}){1,1}$`),l=e.match(o);if(!l||l.length<3)return null;let[,s,c]=l,d=parseFloat(s);return"px"!==n||"em"!==c&&"rem"!==c||(d*=r,c=n),"px"!==c||"em"!==n&&"rem"!==n||(d/=r,c=n),{value:d,unit:c}}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return Number.isFinite(e)?parseFloat(e.toFixed(t)):void 0}const d="body",u=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],cssVarInfix:"duotone",valueFunc:e=>{let{slug:t}=e;return`url( '#wp-duotone-${t}' )`},classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>{let{typography:n}=t;return function(e,t){const{size:n}=e;if(!0!==(null==t?void 0:t.fluid))return n;if(!1===(null==e?void 0:e.fluid))return n;const r=(null==e?void 0:e.fluid)||{};let i=null==r?void 0:r.min,a=null==r?void 0:r.max;const o=s(n);return null!=o&&o.unit?(i||(i=.75*o.value+o.unit),a||(a=1.5*o.value+o.unit),function(e){let{maximumViewPortWidth:t,minimumViewPortWidth:n,maximumFontSize:r,minimumFontSize:i,scaleFactor:a}=e;const o=s(i),l=(null==o?void 0:o.unit)||"rem",d=s(r,{coerceTo:l});if(!o||!d)return null;const u=s(i,{coerceTo:"rem"}),p=s(t,{coerceTo:l}),h=s(n,{coerceTo:l});if(!p||!h||!u)return null;const m=c(h.value/100,3)+l;let g=(d.value-o.value)/(p.value-h.value)*100;g=c(g,3)||1;const v=g*a;return`clamp(${i}, ${u.value}${u.unit} + ((1vw - ${m}) * ${v}), ${r})`}({maximumViewPortWidth:"1600px",minimumViewPortWidth:"768px",maximumFontSize:a,minimumFontSize:i,scaleFactor:1})||n):n}(e,n)},valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:e=>{let{size:t}=e;return t},classes:[]}],p={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"};function h(e){var t;const n="var:";return null!=e&&null!==(t=e.startsWith)&&void 0!==t&&t.call(e,n)?`var(--wp--${e.slice(n.length).split("|").join("--")})`:e}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.reduce)(u,((n,r)=>{let{path:a,cssVarInfix:o,classes:l}=r;if(!l)return n;const s=(0,i.get)(t,a,[]);return s&&Array.isArray(s)&&s.forEach((t=>{let{slug:r}=t;l.forEach((t=>{let{classSuffix:a,propertyName:l}=t;const s=`.has-${(0,i.kebabCase)(r)}-${a}`,c=e.split(",").map((e=>`${e}${s}`)).join(","),d=`var(--wp--preset--${o}--${(0,i.kebabCase)(r)})`;n+=`${c}{${l}: ${d} !important;}`}))})),n}),"")}function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=[];return Object.keys(e).forEach((a=>{const o=t+(0,i.kebabCase)(a.replace("/","-")),l=e[a];if(l instanceof Object){const e=o+n;r=[...r,...g(l,e,n)]}else r.push(`${o}: ${l}`)})),r}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const l=d===t,s=(0,i.reduce)(a.__EXPERIMENTAL_STYLE_PROPERTY,((t,r,a)=>{let{value:o,properties:s,rootOnly:c}=r;if(c&&!l)return t;const d=o;if("elements"===d[0])return t;const u=(0,i.get)(e,d);if("--wp--style--root--padding"===a&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,r]=e;if(!(0,i.get)(u,[r],!1))return;const a=n.startsWith("--")?n:(0,i.kebabCase)(n);t.push(`${a}: ${h((0,i.get)(u,[r]))}`)}));else if((0,i.get)(e,d,!1)){const n=a.startsWith("--")?a:(0,i.kebabCase)(a);t.push(`${n}: ${h((0,i.get)(e,d))}`)}return t}),[]),c=(0,o.getCSSRules)(e);return c.forEach((e=>{var t;if(l&&n&&e.key.startsWith("padding"))return;const a=e.key.startsWith("--")?e.key:(0,i.kebabCase)(e.key);let o=e.value;if("string"!=typeof o&&null!==(t=o)&&void 0!==t&&t.ref){var c;const e=o.ref.split(".");if(o=(0,i.get)(r,e),!o||null!==(c=o)&&void 0!==c&&c.ref)return}s.push(`${a}: ${o}`)})),s}function f(e){var t,n,r,i,a;let{tree:o,style:s,selector:c,hasBlockGapSupport:u,hasFallbackGapSupport:p,fallbackGapValue:h}=e,m="",g=u?(0,l.__experimentalGetGapCSSValue)(null==s||null===(t=s.spacing)||void 0===t?void 0:t.blockGap):"";if(p&&(c===d?g=g||"0.5em":!u&&h&&(g=h)),g&&null!=o&&null!==(n=o.settings)&&void 0!==n&&null!==(r=n.layout)&&void 0!==r&&r.definitions&&(Object.values(o.settings.layout.definitions).forEach((e=>{let{className:t,name:n,spacingStyles:r}=e;(u||"flex"===n)&&null!=r&&r.length&&r.forEach((e=>{const n=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[t,r]=e;n.push(`${t}: ${r||g}`)})),n.length){let r="";r=u?c===d?`${c} .${t}${(null==e?void 0:e.selector)||""}`:`${c}.${t}${(null==e?void 0:e.selector)||""}`:c===d?`:where(.${t}${(null==e?void 0:e.selector)||""})`:`:where(${c}.${t}${(null==e?void 0:e.selector)||""})`,m+=`${r} { ${n.join("; ")}; }`}}))})),c===d&&u&&(m+=`${c} { --wp--style--block-gap: ${g}; }`)),c===d&&null!=o&&null!==(i=o.settings)&&void 0!==i&&null!==(a=i.layout)&&void 0!==a&&a.definitions){const e=["block","flex","grid"];Object.values(o.settings.layout.definitions).forEach((t=>{let{className:n,displayMode:r,baseStyles:i}=t;r&&e.includes(r)&&(m+=`${c} .${n} { display:${r}; }`),null!=i&&i.length&&i.forEach((e=>{const t=[];if(e.rules&&Object.entries(e.rules).forEach((e=>{let[n,r]=e;t.push(`${n}: ${r}`)})),t.length){const r=`${c} .${n}${(null==e?void 0:e.selector)||""}`;m+=`${r} { ${t.join("; ")}; }`}}))}))}return m}const w=(e,t)=>{var n,r;const o=[];if(null==e||!e.styles)return o;const l=e=>(0,i.pickBy)(e,((e,t)=>["border","color","spacing","typography","filter"].includes(t))),s=l(e.styles);return s&&o.push({styles:s,selector:d}),Object.entries(a.__EXPERIMENTAL_ELEMENTS).forEach((t=>{var n,r;let[i,a]=t;var l;null!==(n=e.styles)&&void 0!==n&&n.elements&&null!==(r=e.styles)&&void 0!==r&&r.elements[i]&&o.push({styles:null===(l=e.styles)||void 0===l?void 0:l.elements[i],selector:a})})),Object.entries(null!==(n=null===(r=e.styles)||void 0===r?void 0:r.blocks)&&void 0!==n?n:{}).forEach((e=>{var n,r;let[i,s]=e;const c=l(s);c&&null!=t&&null!==(n=t[i])&&void 0!==n&&n.selector&&o.push({duotoneSelector:t[i].duotoneSelector,fallbackGapValue:t[i].fallbackGapValue,hasLayoutSupport:t[i].hasLayoutSupport,selector:t[i].selector,styles:c,featureSelectors:t[i].featureSelectors}),Object.entries(null!==(r=null==s?void 0:s.elements)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;r&&null!=t&&t[i]&&null!==a.__EXPERIMENTAL_ELEMENTS&&void 0!==a.__EXPERIMENTAL_ELEMENTS&&a.__EXPERIMENTAL_ELEMENTS[n]&&o.push({styles:r,selector:t[i].selector.split(",").map((e=>a.__EXPERIMENTAL_ELEMENTS[n].split(",").map((t=>e+" "+t)))).join(",")})}))})),o},b=(e,t)=>{var n,r,a;const o=[];if(null==e||!e.settings)return o;const l=e=>{const t={};return u.forEach((n=>{let{path:r}=n;const a=(0,i.get)(e,r,!1);!1!==a&&(0,i.set)(t,r,a)})),t},s=l(e.settings),c=null===(n=e.settings)||void 0===n?void 0:n.custom;return(0,i.isEmpty)(s)&&!c||o.push({presets:s,custom:c,selector:d}),Object.entries(null!==(r=null===(a=e.settings)||void 0===a?void 0:a.blocks)&&void 0!==r?r:{}).forEach((e=>{let[n,r]=e;const a=l(r),s=r.custom;(0,i.isEmpty)(a)&&!s||o.push({presets:a,custom:s,selector:t[n].selector})})),o},_=(e,t)=>{const n=b(e,t);let r="";return n.forEach((t=>{let{presets:n,custom:a,selector:o}=t;const l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return(0,i.reduce)(u,((n,r)=>{let{path:a,valueKey:o,valueFunc:l,cssVarInfix:s}=r;const c=(0,i.get)(e,a,[]);return c&&Array.isArray(c)&&c.forEach((e=>{o&&!l?n.push(`--wp--preset--${s}--${(0,i.kebabCase)(e.slug)}: ${e[o]}`):l&&"function"==typeof l&&n.push(`--wp--preset--${s}--${(0,i.kebabCase)(e.slug)}: ${l(e,t)}`)})),n}),[])}(n,null==e?void 0:e.settings),s=g(a,"--wp--custom--","--");s.length>0&&l.push(...s),l.length>0&&(r+=`${o}{${l.join(";")};}`)})),r};function y(e,t){var n;const o=t.settings.__experimentalFeatures.spacing.blockGap,s=!o,c=null===(n=t.settings)||void 0===n||!n.disableLayoutStyles||t.settings.disableLayoutStyles;if(!(null!=e&&e.styles||null!=e&&e.settings||null!=e&&e.globalStyles))return;const h={settings:e.settings,styles:null!=e&&e.globalStyles?e.globalStyles:e.styles},g=(e=>{const t={};return e.forEach((e=>{var n,r,i,a,o,l,s,c,d;const u=e.name,h=null!==(n=null==e||null===(r=e.supports)||void 0===r?void 0:r.__experimentalSelector)&&void 0!==n?n:".wp-block-"+u.replace("core/","").replace("/","-"),m=null!==(i=null==e||null===(a=e.supports)||void 0===a||null===(o=a.color)||void 0===o?void 0:o.__experimentalDuotone)&&void 0!==i?i:null,g=!(null==e||null===(l=e.supports)||void 0===l||!l.__experimentalLayout),v=null==e||null===(s=e.supports)||void 0===s||null===(c=s.spacing)||void 0===c||null===(d=c.blockGap)||void 0===d?void 0:d.__experimentalDefault,f={};Object.entries(p).forEach((t=>{var n,r;let[i,a]=t;const o=null==e||null===(n=e.supports)||void 0===n||null===(r=n[i])||void 0===r?void 0:r.__experimentalSelector;o&&(f[a]=function(e,t){const n=e.split(","),r=t.split(","),i=[];return n.forEach((e=>{r.forEach((t=>{i.push(`${e.trim()} ${t.trim()}`)}))})),i.join(", ")}(h,o))})),t[u]={duotoneSelector:m,fallbackGapValue:v,featureSelectors:Object.keys(f).length?f:void 0,hasLayoutSupport:g,name:u,selector:h}})),t})((0,a.getBlockTypes)()),y=_(h,g),E=function(e,t,n,r){var a,o;let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const c=w(e,t),u=b(e,t),p=null==e||null===(a=e.settings)||void 0===a?void 0:a.useRootPaddingAwareAlignments,{contentSize:h,wideSize:g}=(null==e||null===(o=e.settings)||void 0===o?void 0:o.layout)||{};let _="body {margin: 0;";if(h&&(_+=` --wp--style--global--content-size: ${h};`),g&&(_+=` --wp--style--global--wide-size: ${g};`),p&&(_+='padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) } \n\t\t\t .has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } \n\t\t\t .has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; } \n\t\t\t .has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); } \n\t\t\t .has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; } \n\t\t\t .has-global-padding > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); } \n\t\t\t .has-global-padding :where(.has-global-padding) > .alignfull:where(:not(.has-global-padding)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: 0; padding-left: 0;'),_+="}",c.forEach((t=>{let{selector:i,duotoneSelector:a,styles:o,fallbackGapValue:l,hasLayoutSupport:c,featureSelectors:u}=t;u&&Object.entries(u).forEach((e=>{let[t,n]=e;if(null!=o&&o[t]){const e=v({[t]:o[t]});delete o[t],e.length&&(_+=`${n}{${e.join(";")} }`)}}));const h={};if(null!=o&&o.filter&&(h.filter=o.filter,delete o.filter),a){const e=v(h);e.length>0&&(_+=`${a}{${e.join(";")};}`)}s||d!==i&&!c||(_+=f({tree:e,style:o,selector:i,hasBlockGapSupport:n,hasFallbackGapSupport:r,fallbackGapValue:l}));const m=v(o,i,p,e);null!=m&&m.length&&(_+=`${i}{${m.join(";")};}`);const g=Object.entries(o).filter((e=>{let[t]=e;return t.startsWith(":")}));null!=g&&g.length&&g.forEach((e=>{let[t,n]=e;const r=v(n);if(null==r||!r.length)return;const a=`${i.split(",").map((e=>e+t)).join(",")}{${r.join(";")};}`;_+=a}))})),_+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",_+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",_+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }",!s&&n){var y,E;const t=(0,l.__experimentalGetGapCSSValue)(null==e||null===(y=e.styles)||void 0===y||null===(E=y.spacing)||void 0===E?void 0:E.blockGap)||"0.5em";_+=".wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }",_+=`.wp-site-blocks > * + * { margin-block-start: ${t}; }`}return u.forEach((e=>{let{selector:t,presets:n}=e;d===t&&(t="");const r=m(t,n);(0,i.isEmpty)(r)||(_+=r)})),_}(h,g,o,s,c),S=function(e,t){return b(e,t).flatMap((e=>{let{presets:t}=e;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=(0,i.get)(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>(0,r.createElement)(l.__unstablePresetDuotoneFilter,{preset:e,key:e.slug})))))}))}(t)}))}(h,g),k=[...t.settings.styles.filter((e=>!(e.hasOwnProperty("id")&&("customProperty"===e.id||"globalStyle"===e.id)))),{id:"customProperty",css:y,isGlobalStyles:!0},{id:"globalStyle",css:E,isGlobalStyles:!0},{assets:S,__unstableType:"svg",isGlobalStyles:!0}];return e.settings.styles=k,e.settings.__unstableResolvedAssets=t.settings.__unstableResolvedAssets,e.settings.__experimentalFeatures=t.settings.__experimentalFeatures,e}},2853:(e,t,n)=>{"use strict";n.d(t,{Ph:()=>a,gq:()=>l,iO:()=>o});var r=n(6483),i=n(2819);const a=e=>new URLSearchParams(window.location.search).get(e),o=(e,t)=>(0,r.hasQueryArg)(e,t)?(0,r.removeQueryArgs)(e,t):e,l=e=>(0,i.transform)(e,((e,t,n)=>{e[(0,i.snakeCase)(n)]=t}))},1392:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var r=n(6515),i=n(5736);const a={[r.H]:{site:{noun:(0,i._x)("site","noun","wp-module-onboarding")},website:{noun:(0,i._x)("website","noun","wp-module-onboarding")}},[r._]:{site:{noun:(0,i._x)("store","noun","wp-module-onboarding")},website:{noun:(0,i._x)("store","noun","wp-module-onboarding")}}},o=function(e){var t,n;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"noun";const o=(null===(t=window)||void 0===t||null===(n=t.nfdOnboarding)||void 0===n?void 0:n.currentFlow)||r.H,l=a[o][e.toLowerCase()][i];return e===e.toUpperCase()?l.toUpperCase():e[0]===e[0].toUpperCase()?l[0].toUpperCase()+l.substring(1):l}},2200:(e,t,n)=>{"use strict";n.d(t,{$3:()=>q,$E:()=>G,$P:()=>J,Az:()=>Y,BP:()=>y,Bv:()=>A,DY:()=>H,Ei:()=>L,GV:()=>B,JB:()=>c,Jq:()=>O,Rq:()=>Z,Vx:()=>V,Y1:()=>v,Yl:()=>_,Zh:()=>F,_h:()=>k,a0:()=>U,bQ:()=>g,br:()=>w,dD:()=>d,dv:()=>P,iX:()=>Q,jN:()=>x,km:()=>m,lE:()=>S,mz:()=>D,nx:()=>T,pf:()=>p,qB:()=>I,qO:()=>N,qR:()=>C,tM:()=>b,tX:()=>E,tY:()=>$,tg:()=>M,uK:()=>j,uj:()=>R,vv:()=>W,wV:()=>z});var r,i,a,o,l,s=n(6483);const c="nfd-onboarding",d="object"==typeof(null===(r=window)||void 0===r?void 0:r.nfdOnboarding)&&"buildUrl"in window.nfdOnboarding,u=window.nfdOnboarding.adminUrl,p=window.nfdOnboarding.siteUrl,h=window.nfdOnboarding.restUrl,m=`${h}/wp/v2`,g=`${h}/newfold-onboarding/v1`,v=`${h}/newfold-installer/v1`,f=(0,s.addQueryArgs)(`${u}index.php`,null===(i=window.nfdOnboarding.currentBrand)||void 0===i?void 0:i.dashboardRedirectParams),w=null!==(a=(0,s.addQueryArgs)(null===(o=window.nfdOnboarding.currentBrand)||void 0===o?void 0:o.pluginDashboardPage,null===(l=window.nfdOnboarding.currentBrand)||void 0===l?void 0:l.dashboardRedirectParams))&&void 0!==a?a:f,b="nav-primary",_="nav-design",y="nav-page",E="design-themes",S="design-theme-styles-menu",k="design-theme-styles-preview",C="design-colors",x="design-typography",N="design-header-menu",T="design-homepage-menu",D="nav-get-started",P="nav-ecommerce-store-info",I="Sidebar",L="HeaderMenu",O="LearnMore",A=2,z=2,R=2,$="nfd_plugins",V="nfd_themes",H="nfd_slug_yith_wonder",U="init",W="inactive",F="installing",B="activated",Z="failed",M="demographic",j="commerce",G="design",q="layout_and_content",Q="features",J=[b,_,D,y,P],Y={SET_FLOW:"SET_FLOW",SET_GLOBAL_STYLES:"SET_GLOBAL_STYLES"}},4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t{"use strict";n.d(t,{AW:()=>N,F0:()=>T,FR:()=>l,TH:()=>m,Us:()=>s,WU:()=>f,Z5:()=>D,oQ:()=>p,s0:()=>v});var r=n(9196),i=n(2599);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0})),r.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,a({fromRouteId:t},i)))}),[e,t])}():function(){h()||(0,i.J0)(!1);let{basename:e,navigator:t}=r.useContext(s),{matches:n}=r.useContext(d),{pathname:a}=m(),o=JSON.stringify((0,i.Zq)(n).map((e=>e.pathnameBase))),l=r.useRef(!1);return g((()=>{l.current=!0})),r.useCallback((function(n,r){if(void 0===r&&(r={}),!l.current)return;if("number"==typeof n)return void t.go(n);let s=(0,i.pC)(n,JSON.parse(o),a,"path"===r.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:(0,i.RQ)([e,s.pathname])),(r.replace?t.replace:t.push)(s,r.state,r)}),[e,t,o,a])}()}function f(e,t){let{relative:n}=void 0===t?{}:t,{matches:a}=r.useContext(d),{pathname:o}=m(),l=JSON.stringify((0,i.Zq)(a).map((e=>e.pathnameBase)));return r.useMemo((()=>(0,i.pC)(e,JSON.parse(l),o,"path"===n)),[e,l,o,n])}function w(e,t,n){h()||(0,i.J0)(!1);let{navigator:o}=r.useContext(s),{matches:l}=r.useContext(d),u=l[l.length-1],p=u?u.params:{},g=(u&&u.pathname,u?u.pathnameBase:"/");u&&u.route;let v,f=m();if(t){var w;let e="string"==typeof t?(0,i.cP)(t):t;"/"===g||(null==(w=e.pathname)?void 0:w.startsWith(g))||(0,i.J0)(!1),v=e}else v=f;let b=v.pathname||"/",S="/"===g?b:b.slice(g.length)||"/",k=(0,i.fp)(e,{pathname:S}),C=function(e,t,n){var a;if(void 0===t&&(t=[]),void 0===n&&(n=null),null==e){var o;if(null==(o=n)||!o.errors)return null;e=n.matches}let l=e,s=null==(a=n)?void 0:a.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||(0,i.J0)(!1),l=l.slice(0,Math.min(l.length,e+1))}return l.reduceRight(((e,i,a)=>{let o=i.route.id?null==s?void 0:s[i.route.id]:null,c=null;n&&(c=i.route.errorElement||_);let d=t.concat(l.slice(0,a+1)),u=()=>{let t;return t=o?c:i.route.Component?r.createElement(i.route.Component,null):i.route.element?i.route.element:e,r.createElement(E,{match:i,routeContext:{outlet:e,matches:d,isDataRoute:null!=n},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===a)?r.createElement(y,{location:n.location,revalidation:n.revalidation,component:c,error:o,children:u(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):u()}),null)}(k&&k.map((e=>Object.assign({},e,{params:Object.assign({},p,e.params),pathname:(0,i.RQ)([g,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?g:(0,i.RQ)([g,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,n);return t&&C?r.createElement(c.Provider,{value:{location:a({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:i.aU.Pop}},C):C}function b(){let e=function(){var e;let t=r.useContext(u),n=function(e){let t=r.useContext(l);return t||(0,i.J0)(!1),t}(k.UseRouteError),a=x(k.UseRouteError);return t||(null==(e=n.errors)?void 0:e[a])}(),t=(0,i.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:a},n):null,null)}const _=r.createElement(b,null);class y extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(d.Provider,{value:this.props.routeContext},r.createElement(u.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function E(e){let{routeContext:t,match:n,children:i}=e,a=r.useContext(o);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(d.Provider,{value:t},i)}var S,k,C;function x(e){let t=function(e){let t=r.useContext(d);return t||(0,i.J0)(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||(0,i.J0)(!1),n.route.id}function N(e){(0,i.J0)(!1)}function T(e){let{basename:t="/",children:n=null,location:a,navigationType:o=i.aU.Pop,navigator:l,static:d=!1}=e;h()&&(0,i.J0)(!1);let u=t.replace(/^\/*/,"/"),p=r.useMemo((()=>({basename:u,navigator:l,static:d})),[u,l,d]);"string"==typeof a&&(a=(0,i.cP)(a));let{pathname:m="/",search:g="",hash:v="",state:f=null,key:w="default"}=a,b=r.useMemo((()=>{let e=(0,i.Zn)(m,u);return null==e?null:{location:{pathname:e,search:g,hash:v,state:f,key:w},navigationType:o}}),[u,m,g,v,f,w,o]);return null==b?null:r.createElement(s.Provider,{value:p},r.createElement(c.Provider,{children:n,value:b}))}function D(e){let{children:t,location:n}=e;return w(P(t),n)}function P(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,a)=>{if(!r.isValidElement(e))return;let o=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,P(e.props.children,o));e.type!==N&&(0,i.J0)(!1),e.props.index&&e.props.children&&(0,i.J0)(!1);let l={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=P(e.props.children,o)),n.push(l)})),n}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(S||(S={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(k||(k={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(C||(C={})),new Promise((()=>{})),r.Component},9196:e=>{"use strict";e.exports=window.React},2819:e=>{"use strict";e.exports=window.lodash},6989:e=>{"use strict";e.exports=window.wp.apiFetch},2175:e=>{"use strict";e.exports=window.wp.blockEditor},4981:e=>{"use strict";e.exports=window.wp.blocks},5609:e=>{"use strict";e.exports=window.wp.components},4333:e=>{"use strict";e.exports=window.wp.compose},7798:e=>{"use strict";e.exports=window.wp.coreData},9818:e=>{"use strict";e.exports=window.wp.data},5904:e=>{"use strict";e.exports=window.wp.dom},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},9630:e=>{"use strict";e.exports=window.wp.keycodes},444:e=>{"use strict";e.exports=window.wp.primitives},6483:e=>{"use strict";e.exports=window.wp.url},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.m=n,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="newfold.Onboarding:",i.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d{l.onerror=l.onload=null,clearTimeout(h);var i=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),i&&i.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={343:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var a=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=a);var o=i.p+i.u(t),l=new Error;i.l(o,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",l.name="ChunkLoadError",l.type=a,l.request=o,r[1](l)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,l,s]=n,c=0;if(o.some((t=>0!==e[t]))){for(r in l)i.o(l,r)&&(i.m[r]=l[r]);s&&s(i)}for(t&&t(n);c{"use strict";i.r(a);var e={};i.r(e),i.d(e,{disableComplementaryArea:()=>Ge,enableComplementaryArea:()=>je,pinItem:()=>qe,setDefaultComplementaryArea:()=>Me,setFeatureDefaults:()=>Ke,setFeatureValue:()=>Ye,toggleFeature:()=>Je,unpinItem:()=>Qe});var t={};i.r(t),i.d(t,{getActiveComplementaryArea:()=>Xe,isComplementaryAreaLoading:()=>et,isFeatureActive:()=>nt,isItemPinned:()=>tt});var n=i(2200);const r=window.wp.domReady;var o=i.n(r);const l=window.wp.blockLibrary;var s=i(9307),c=i(2503),d=i(7533),u=i(3421),p=i(7625),h=i(6989),m=i.n(h);const g=()=>{m()({url:`${n.pf}/wp-cron.php`,method:"GET",parse:!1}).catch((e=>{console.error(e)}))};var v=i(8395),f=i(5609),w=i(9818),b=i(9250),_=i(1984),y=i(4310),E=i(5024),S=i(5736),k=i(8297),C=i(6342);const x=e=>{let{path:t,showErrorDialog:n}=e;const{setNavErrorContinuePath:r}=(0,w.useDispatch)(c.h),i=(0,b.s0)();return(0,s.createElement)(f.Button,{className:"navigation-buttons navigation-buttons_back",onClick:()=>{!1!==n?r(t):i(t,{state:{origin:"header"}})},variant:"secondary"},(0,s.createElement)(_.Z,{icon:y.Z}),(0,S.__)("Back","wp-module-onboarding"))},N=e=>{let{path:t,showErrorDialog:n}=e;const{setNavErrorContinuePath:r}=(0,w.useDispatch)(c.h),i=(0,b.s0)();return(0,s.createElement)(f.Button,{onClick:()=>{!1!==n?r(t):i(t,{state:{origin:"header"}})},variant:"primary",className:"navigation-buttons navigation-buttons_next"},(0,S.__)("Next","wp-module-onboarding"),(0,s.createElement)(_.Z,{icon:E.Z}))};async function T(e){e&&(e.isComplete=(new Date).getTime(),(0,d.kB)(e)),(0,u.jd)(),(0,k.uW)(new k.Z_(C.pd)),window.location.replace(n.br)}const D=e=>{let{currentData:t,saveDataAndExitFunc:n}=e;return(0,s.createElement)(f.Button,{onClick:()=>n(t),className:"navigation-buttons navigation-buttons_finish",variant:"primary"},(0,S.__)("Finish","wp-module-onboarding"),(0,s.createElement)(_.Z,{icon:E.Z}))},P=()=>{const{previousStep:e,nextStep:t,currentData:n,showErrorDialog:r}=(0,w.useSelect)((e=>({nextStep:e(c.h).getNextStep(),previousStep:e(c.h).getPreviousStep(),currentData:e(c.h).getCurrentOnboardingData(),showErrorDialog:e(c.h).getShowErrorDialog()})),[]),i=null===e||!1===e,a=null===t||!1===t;return(0,s.createElement)("div",{className:"nfd-onboarding-header__step-navigation"},(0,s.createElement)(f.ButtonGroup,{style:{display:"flex",columnGap:"0.5rem"}},i||a?null:(0,s.createElement)(x,{path:e.path,showErrorDialog:r}),a?(0,s.createElement)(D,{currentData:n,saveDataAndExitFunc:T}):(0,s.createElement)(N,{path:t.path,showErrorDialog:r})))},I=()=>{const{sidebars:e,isHeaderNavigationEnabled:t}=(0,w.useSelect)((e=>({sidebars:e(c.h).getSidebars(),isHeaderNavigationEnabled:e(c.h).isHeaderNavigationEnabled()})));return(0,s.createElement)(s.Fragment,null,t&&(0,s.createElement)(P,null),e.map((e=>(0,s.createElement)(f.Slot,{key:e.id,name:`${n.Ei}/${e.id}`}))))},L=(0,s.memo)((()=>(0,s.createElement)("div",{className:"nfd-onboarding-header"},(0,s.createElement)("div",{className:"nfd-onboarding-header__center"}),(0,s.createElement)("div",{className:"nfd-onboarding-header__end"},(0,s.createElement)(I,null)))));var O=i(6483),A=i(2819),z=i(9885),R=i(9343),$=i(4433),V=i(6111),H=i(1715),U=i(1809);const W=[$.E,R.B,V.c,U.p,H.R],F=e=>W.filter((t=>t.id===e)),B=(e,t,n)=>{const r={};return e.forEach((e=>t[e.id]?r[e.id]=t[e.id]:r[e.id]={completed:!1,firstStep:e.steps[0].path,lastStep:(null==n?void 0:n.chapter)===e.id&&null!=n&&n.path?null==n?void 0:n.path:""})),r};var Z=i(8548),M=i(6515),j=i(2853),G=i(35),q=i(1392);const Q=()=>{const{brandName:e}=(0,w.useSelect)((e=>({brandName:e(c.h).getNewfoldBrandName()})),[]),t=(e=>({title:(0,S.sprintf)( /* translators: 1: Brand 2: Site or Store */ -(0,S.__)("Making the keys to your %1$s Online %2$s","wp-module-onboarding"),e,(0,q.I)("Site")),subtitle:(0,S.__)("We’re installing WooCommerce for you to fill with your amazing products & services!","wp-module-onboarding")}))(e);return(0,s.createElement)(G.Z,{title:t.title,subtitle:t.subtitle})},J=e=>{let{children:t}=e;const r=(0,b.TH)(),[i,a]=(0,s.useState)(!1),{brandConfig:o,experienceLevel:l,topPriority:u,currentData:p,currentStep:h,lastChapter:m,firstStep:g}=(0,w.useSelect)((e=>({brandName:e(c.h).getNewfoldBrandName(),brandConfig:e(c.h).getNewfoldBrandConfig(),experienceLevel:e(c.h).getExperienceLevel(),topPriority:e(c.h).getTopPriority(),currentData:e(c.h).getCurrentOnboardingData(),lastChapter:e(c.h).getCurrentChapter(),currentStep:e(c.h).getCurrentStep(),firstStep:e(c.h).getFirstStep()})),[]),{updateAllSteps:v,updateRoutes:f,updateTopSteps:_,updateDesignRoutes:y,setCurrentOnboardingData:E,setActiveChapter:S,setIsDrawerOpened:x,setIsDrawerSuppressed:N,setIsHeaderNavigationEnabled:T,setSidebarActiveView:D}=(0,w.useDispatch)(c.h),P=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=n.uj)return a(!1);const r=(0,d.b5)(e);if(null!=r&&r.error)return t+=1,P(e,t);const i=R.B.steps[0],o=(0,O.getFragment)(window.location.href),l=(0,j.iO)(window.location.href,"flow").replace(o,"");window.location.replace(`${l}#${i.path}`),window.location.reload()};return(0,s.useEffect)((()=>{if(!1!==(null==o?void 0:o.prioritization))return(()=>{const e=window.nfdOnboarding.currentFlow,t=(0,Z.LI)(e),n=(0,j.Ph)("chapter");let r;r=n?F(n):((e,t,n)=>{const r=(e=>{const t={publishing:U.p,selling:R.B,designing:V.c};return t[e]?t[e]:U.p})(t);let i;switch(n){case"1":default:i=(0,A.filter)(e,(e=>e.id!==r.id)),i=(0,z.QF)(i,$.E,r);break;case"3":i=(0,A.filter)(e,(e=>e.id!==r.id&&(e.id===H.R.id||e.id===$.E.id))),i=(0,z.QF)(i,$.E,r);break;case"5":i=(0,A.filter)(e,(e=>e.id!==r.id&&(e.id===H.R.id||e.id===$.E.id)))}return i})(t,u,l);const i=(0,Z.Tx)(e)(r,n);p.data.chapters=B(t,p.data.chapters,h),E(p),v(i.steps),_(i.topSteps),f(i.routes),y(i.designRoutes)})()}),[l,u]),(0,s.useEffect)((()=>{(()=>{r.pathname===g.path&&(0,k.tH)(new k.Z_(C.Ou));const e=null==h?void 0:h.chapter;var t;m!==e&&(m&&(p.data.chapters[m].completed=!0,(0,k.tH)(new k.Z_(C.F8,m))),e&&(p.data.chapters[e].completed=!1,(0,k.tH)(new k.Z_(C.r9,e))),S(e)),e&&(p.data.chapters[e].lastStep=null!==(t=null==h?void 0:h.path)&&void 0!==t?t:"")})()}),[h]),(0,s.useEffect)((()=>{var e;if(null!==(e=window.nfdOnboarding)&&void 0!==e&&e.newFlow){const e=window.nfdOnboarding.newFlow;x(!1),N(!0),T(!1),D(!1),a(e),(async e=>{var t;const n=null!==(t=null==o?void 0:o.enabled_flows)&&void 0!==t?t:{};e in n&&!0===n[e]&&(e===M._?P(e):a(!1))})(e),window.nfdOnboarding.newFlow=void 0}}),[r.pathname]),(0,s.createElement)(s.Fragment,null,"ecommerce"===i?(0,s.createElement)(Q,null):t)},Y=(0,s.memo)((()=>{const{routes:e}=(0,w.useSelect)((e=>({routes:e(c.h).getRoutes()}))),t=(0,s.useCallback)((()=>null==e?void 0:e.map((e=>(0,s.createElement)(b.AW,{key:e.path,path:e.path,end:!0,element:(0,s.createElement)(e.Component,null)})))),[e]);return(0,s.createElement)("main",{className:"nfd-onboard-content"},(0,s.createElement)(s.Suspense,{fallback:(0,s.createElement)(s.Fragment,null)},(0,s.createElement)(J,null,(0,s.createElement)(b.Z5,null,t(e)))))}));var K=i(4333),X=i(4184),ee=i.n(X),te=i(682),ne=i(6690);function re(e){if(e){const t={};return null==e||e.forEach((e=>{t[e.slug]=e.color})),t}}function ie(e){if(e){const t=[];for(const n in e)t.push({slug:n,name:(null==n?void 0:n.charAt(0).toUpperCase())+(null==n?void 0:n.slice(1)),color:e[n]});return t}}const ae=e=>{let{isColorSelected:t,color:n,slug:r,name:i,callback:a}=e;return(0,s.createElement)("div",{className:"custom-palette__below__row",onClick:()=>a(r),onKeyDown:()=>a(r),role:"button",tabIndex:0},(0,s.createElement)("div",{className:`custom-palette__below__row__icon ${t&&"custom-palette__below__row__icon--selected-border"}`,style:{backgroundColor:`${n}`}},t?(0,s.createElement)(s.Fragment,null,"✓"):null),(0,s.createElement)("div",{className:"custom-palette__below__row__text"},i))},oe=()=>{const e=(0,s.useRef)(null),[t,r]=(0,s.useState)(),[i,a]=(0,s.useState)(),[o,l]=(0,s.useState)(),[d,u]=(0,s.useState)(),[h,m]=(0,s.useState)(""),[g,v]=(0,s.useState)(!1),[b,_]=(0,s.useState)(!0),[y,E]=(0,s.useState)(),{storedPreviewSettings:x,currentData:N,themeStatus:T}=(0,w.useSelect)((e=>({storedPreviewSettings:e(c.h).getPreviewSettings(),currentData:e(c.h).getCurrentOnboardingData(),themeStatus:e(c.h).getThemeStatus()})),[]),{updatePreviewSettings:D,setCurrentOnboardingData:P,updateThemeStatus:I}=(0,w.useDispatch)(c.h);(0,s.useEffect)((()=>{var t,r;n.GV===T&&(L(),"custom"===(null==N||null===(t=N.data)||void 0===t?void 0:t.colorStyle)&&(_(!1),null==e||null===(r=e.current)||void 0===r||r.scrollIntoView({behavior:"smooth",block:"end"})))}),[T]);const L=async()=>{var e;const[t,i]=await Promise.all([(0,p.oC)(),(0,p.LK)()]);if(null!=i&&i.error)return I(n.a0);if(null!=t&&t.error)return I(n.a0);let o;var s,c,d,h,m,g,v;r(null==i?void 0:i.body.tailored),a(null==i?void 0:i.body["custom-picker-grouping"]),""!==(null==N||null===(e=N.data)||void 0===e?void 0:e.colorStyle)?(o=null!==(s=null==x||null===(c=x.settings)||void 0===c||null===(d=c.color)||void 0===d?void 0:d.palette)&&void 0!==s?s:null===(h=t.body[0])||void 0===h||null===(m=h.settings)||void 0===m||null===(g=m.color)||void 0===g?void 0:g.palette,"custom"===(null==N||null===(v=N.data)||void 0===v?void 0:v.colorStyle)&&(l(re(o)),u(re(o))),l(re(o))):O()};async function O(){var e,t,n;const r=await(0,p.oC)(!0);let i;null!=N&&null!==(e=N.data)&&void 0!==e&&null!==(t=e.theme)&&void 0!==t&&t.variation?i=r.body.filter((e=>e.title===N.data.theme.variation))[0]:0===(null===(n=r.body[0])||void 0===n?void 0:n.id)&&(i=r.body[0]),D((0,ne.NF)(i,x)),u();const a=i.settings.color.palette;N.data.colorStyle="",P(N),l(re(a))}const A=e=>{u(),async function(e){var n,r;const i=x;let a=null==x||null===(n=x.settings)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.palette;t&&e&&a&&(a=a.map((n=>{var r;return null!=t&&null!==(r=t[e])&&void 0!==r&&r[n.slug]&&(n.color=t[e][n.slug]),n})),i.settings.color.palette=a,D((0,ne.NF)(i,x)))}(e),l(t[e]),ie(t[e]),N.data.colorStyle=e,P(N),(0,k.tH)(new k.Z_(C.hz,e,{colors:(0,j.gq)(t[e])}))},z=async e=>{const t={...o};if(t[h]=e,i){const n=i[h];n&&n.forEach((n=>{t[n]=e}))}!async function(){var e,t;const n=x,r=null==n||null===(e=n.settings)||void 0===e||null===(t=e.color)||void 0===t?void 0:t.palette;if(r){for(let e=0;e{var t,n;d&&void 0!==d[h]&&(r[function(e,t,n){const r=n.findIndex((t=>{let{slug:n}=t;return n===e}));return-1===r?n.findIndex((e=>{let{slug:n}=e;return n===t})):r}(e,h,null==x||null===(t=x.settings)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.palette)].color=d[h])}))}n.settings.color.palette=r,D((0,ne.NF)(n,x))}}(),ie(t),N.data.colorStyle="custom",P(N),l(t),clearTimeout(y),E(setTimeout((()=>{(0,k.tH)(new k.Z_(C.hz,"custom",{colors:(0,j.gq)(t)}))}),1e3)),u(t)},R=e=>{v(!g),m(g?"":e)};return t&&(0,s.createElement)("div",{className:"theme-colors--drawer"},(0,s.createElement)("h2",null,(0,S.__)("Color Palettes","wp-module-onboarding")),Object.keys(t).map(((e,n)=>{var r,i,a,o,l;return(0,s.createElement)("div",{key:e,className:ee()("color-palette drawer-palette--button",{"color-palette-selected drawer-palette--button--selected":e===(null==N||null===(r=N.data)||void 0===r?void 0:r.colorStyle)}),role:"button",tabIndex:n+1,onClick:()=>A(e),onKeyDown:()=>A(e)},(0,s.createElement)("div",{className:"color-palette__colors"},(0,s.createElement)("div",{className:"color-palette__colors--tertiary",style:{backgroundColor:`${null===(i=t[e])||void 0===i?void 0:i["header-background"]}`}}),(0,s.createElement)("div",{className:"color-palette__colors--secondary",style:{backgroundColor:`${null===(a=t[e])||void 0===a?void 0:a.secondary}`}}),(0,s.createElement)("div",{className:"color-palette__colors--primary",style:{backgroundColor:`${null===(o=t[e])||void 0===o?void 0:o.primary}`}})),(0,s.createElement)("div",{className:"color-palette__name drawer-palette--button__text"},null===(l=t[e])||void 0===l?void 0:l.name))})),function(){var t,n,r,i;const a="#fff",l=d&&""!==(null==d?void 0:d.primary)?d.primary:null!==(t=null==o?void 0:o.primary)&&void 0!==t?t:a,c=d&&""!==(null==d?void 0:d.secondary)?d.secondary:null!==(n=null==o?void 0:o.secondary)&&void 0!==n?n:a,u=d&&""!==(null==d?void 0:d["header-background"])?d["header-background"]:null!==(r=null==o?void 0:o["header-background"])&&void 0!==r?r:a;return(0,s.createElement)("div",{className:"custom-palette"},(0,s.createElement)("div",{className:"custom-palette__top",role:"button",tabIndex:0,onClick:()=>_(!b),onKeyDown:()=>_(!b)},(0,s.createElement)("div",{className:"custom-palette__top-text"},(0,S.__)("SELECT CUSTOM COLORS","wp-module-onboarding")),b?(0,s.createElement)("div",{className:"custom-palette__top-icon"},"+"):(0,s.createElement)("div",{className:"custom-palette__top-icon"},"-")),(0,s.createElement)(te.Z,{type:"fade-in",duration:"300ms",timingFunction:"ease-in-out",className:"custom-palette__below "+(b?"custom-palette_acc_closed":"custom-palette_acc_opened")},(0,s.createElement)(ae,{isColorSelected:d,color:null!==(i=null==d?void 0:d.base)&&void 0!==i?i:a,slug:"base",name:(0,S.__)("Background","wp-module-onboarding"),callback:R}),(0,s.createElement)(ae,{isColorSelected:d,color:l,slug:"primary",name:(0,S.__)("Primary","wp-module-onboarding"),callback:R}),(0,s.createElement)(ae,{isColorSelected:d,color:c,slug:"secondary",name:(0,S.__)("Secondary","wp-module-onboarding"),callback:R}),(0,s.createElement)(ae,{isColorSelected:d,color:u,slug:"tertiary",name:(0,S.__)("Tertiary","wp-module-onboarding"),callback:R})),d&&(0,s.createElement)(te.Z,{type:"fade-in",duration:"300ms"},(0,s.createElement)("div",{ref:e,className:"theme-colors--drawer--reset",role:"button",tabIndex:0,onClick:O,onKeyDown:O},(0,s.createElement)("div",null,(0,S.__)("Reset","wp-module-onboarding")))),g&&(0,s.createElement)(f.Popover,null,(0,s.createElement)("div",{role:"button",tabIndex:0,className:"custom-palette__picker__close-icon",onClick:()=>v(!1),onKeyDown:()=>v(!1)},"X"),(0,s.createElement)(f.ColorPicker,{onChange:z})))}())};var le=i(6138),se=i(6332);const ce=()=>{var e,t;const[r,i]=(0,s.useState)(),[a,o]=(0,s.useState)(),[l,u]=(0,s.useState)(""),p=(0,b.TH)(),{currentStep:h,currentData:m,themeStatus:g,storedPreviewSettings:v}=(0,w.useSelect)((e=>({currentStep:e(c.h).getStepFromPath(p.pathname),currentData:e(c.h).getCurrentOnboardingData(),themeStatus:e(c.h).getThemeStatus(),storedPreviewSettings:e(c.h).getStepPreviewData()})),[]),{setCurrentOnboardingData:f,updateThemeStatus:_,setHeaderMenuData:y}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{g===n.GV&&(async()=>{var e;const t=await(0,le.C)(null==h||null===(e=h.data)||void 0===e?void 0:e.patternId);if(null!=t&&t.error)return _(n.a0);const r=null==t?void 0:t.body.pageHeaders,a=null==t?void 0:t.body.pageBody;m.data.partHeader&&""!==m.data.partHeader||(m.data.partHeader=r[0].slug,f(m)),u(m.data.partHeader),o(t.body),i(r);let[l,s]=["",""];r.forEach((e=>{e.slug===m.data.partHeader&&(l=e.content)})),s=l+a,y(s)})()}),[g]),(0,s.createElement)(se.r9,{count:null===(e=v[null==h||null===(t=h.data)||void 0===t?void 0:t.patternId])||void 0===e?void 0:e.previewCount,watch:r,callback:()=>null==r?void 0:r.map(((e,t)=>(0,s.createElement)(se.H,{key:t,className:"theme-header-menu-preview--drawer__list__item",selected:e.slug===l,blockGrammer:e.content,viewportWidth:900,styling:"custom",overlay:!1,onClick:()=>(async e=>{document.getElementsByClassName("nfd-onboard-content")&&document.getElementsByClassName("nfd-onboard-content")[0].scrollIntoView({behavior:"smooth"});const t=r[e];if(t.slug===l)return!0;u(t.slug),m.data.partHeader=t.slug,f(m);const n=t.content+a.pageBody;y(n);const i=await(0,d.kB)(m);null===(null==i?void 0:i.error)&&f(m),(0,k.tH)(new k.Z_(C.Z4,t.slug))})(t)}))),className:"theme-header-menu-preview--drawer__list__item",viewportWidth:900})},de=()=>(0,s.createElement)("div",{style:{padding:"0 16px"}},(0,s.createElement)("h2",null,(0,S.__)("Pick a Homepage Design","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show a few Homepage Patterns.","wp-module-onboarding"))),ue=()=>(0,s.createElement)("div",{style:{padding:"0 16px"}},(0,s.createElement)("h2",null,(0,S.__)("Pick a Theme Style","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("No Style Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show Theme details","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("With Style Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show single-column of other Styles.","wp-module-onboarding"))),pe=()=>{var e,t;const[r,i]=(0,s.useState)(),[a,o]=(0,s.useState)(),[l,d]=(0,s.useState)(""),{currentStep:u,currentData:h,storedPreviewSettings:m,themeStatus:g,themeVariations:v}=(0,w.useSelect)((e=>({currentStep:e(c.h).getCurrentStep(),currentData:e(c.h).getCurrentOnboardingData(),storedPreviewSettings:e(c.h).getPreviewSettings(),themeStatus:e(c.h).getThemeStatus(),themeVariations:e(c.h).getStepPreviewData()})),[]),{updatePreviewSettings:f,setCurrentOnboardingData:b,updateThemeStatus:_}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{g===n.GV&&(async()=>{var e;const t=await(0,p.oC)(!0);if(null!=t&&t.error)return _(n.a0);let r;h.data.theme.variation?r=h.data.theme.variation:(r=t.body[0].title,h.data.theme.variation=r,b(h)),d(r);const a=await(0,le.C)(null==u||null===(e=u.data)||void 0===e?void 0:e.patternId,!0);if(null!=a&&a.error)return _(n.a0);i(null==a?void 0:a.body),o(null==t?void 0:t.body),document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")&&document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")[0]&&document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")[0].scrollIntoView({behavior:"smooth",block:"center"})})()}),[g]),(0,s.createElement)("div",{className:"theme-styles-preview--drawer"},(0,s.createElement)("div",{className:"theme-styles-preview--drawer__list"},(0,s.createElement)(se.r9,{className:"theme-styles-preview--drawer__list__item",watch:a&&r,count:null===(e=v[null==u||null===(t=u.data)||void 0===t?void 0:t.patternId])||void 0===e?void 0:e.previewCount,callback:()=>null==a?void 0:a.map(((e,t)=>(0,s.createElement)(se.H,{key:t,className:"theme-styles-preview--drawer__list__item",selected:e.title===l,blockGrammer:r,viewportWidth:900,styling:"custom",previewSettings:e,overlay:!1,onClick:()=>(e=>{const t=a[e];if(l===t.title)return!0;f((0,ne.NF)(t,m)),d(t.title),h.data.theme.variation=t.title,b(h),(0,k.tH)(new k.Z_(C.Dv,t.title))})(t)}))),viewportWidth:900})))},he=()=>(0,s.createElement)("div",{style:{padding:"0 16px"}},(0,s.createElement)("h2",null,(0,S.__)("Pick a Theme","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("No Theme Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show contextual help","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("With Theme Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show single-column of other Themes.","wp-module-onboarding"))),me=()=>{const e=(0,s.useRef)(),[t,r]=(0,s.useState)(!1),[i,a]=(0,s.useState)(),[o,l]=(0,s.useState)(),{storedPreviewSettings:d,currentData:u,themeStatus:h}=(0,w.useSelect)((e=>({storedPreviewSettings:e(c.h).getPreviewSettings(),currentData:e(c.h).getCurrentOnboardingData(),themeStatus:e(c.h).getThemeStatus()})),[]),{updatePreviewSettings:m,setCurrentOnboardingData:g,updateThemeStatus:v}=(0,w.useDispatch)(c.h);(0,s.useEffect)((()=>{var e,t,n;""!==(null==u||null===(e=u.data)||void 0===e?void 0:e.fontStyle)&&void 0!==o&&(a(null==u||null===(t=u.data)||void 0===t?void 0:t.fontStyle),f(null==u||null===(n=u.data)||void 0===n?void 0:n.fontStyle))}),[o,d]),(0,s.useEffect)((()=>{t||n.GV!==h||(async()=>{var t,i;const a=await(0,p.ko)();if(null!=a&&a.error)return v(n.a0);l(null==a?void 0:a.body);const o=null==d||null===(t=d.settings)||void 0===t||null===(i=t.styles[0])||void 0===i?void 0:i.css;if(o){const t=/--wp--preset--font-family.*;/;e.current.setAttribute("style",o.match(t))}r(!0)})()}),[t,h]);const f=async function(e){var t,n,r,l,s,c,p,h,v,f,w;let b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"click";if(i===e)return!0;a(e);const _=d,y=o;var E,S,x,N,T,D;null!=_&&null!==(t=_.styles)&&void 0!==t&&null!==(n=t.typography)&&void 0!==n&&n.fontFamily&&null!=_&&null!==(r=_.styles)&&void 0!==r&&null!==(l=r.blocks["core/heading"])&&void 0!==l&&null!==(s=l.typography)&&void 0!==s&&s.fontFamily&&(_.styles.typography.fontFamily=null===(E=y[e])||void 0===E||null===(S=E.styles)||void 0===S||null===(x=S.typography)||void 0===x?void 0:x.fontFamily,_.styles.blocks["core/heading"].typography.fontFamily=null===(N=y[e])||void 0===N?void 0:N.styles.blocks["core/heading"].typography.fontFamily),null!==(c=_.styles)&&void 0!==c&&null!==(p=c.blocks["core/site-title"])&&void 0!==p&&null!==(h=p.typography)&&void 0!==h&&h.fontFamily&&(_.styles.blocks["core/site-title"].typography.fontFamily=null===(T=y[e])||void 0===T?void 0:T.styles.blocks["core/heading"].typography.fontFamily),null!==(v=_.styles)&&void 0!==v&&null!==(f=v.blocks["core/site-tagline"])&&void 0!==f&&null!==(w=f.typography)&&void 0!==w&&w.fontFamily&&(_.styles.blocks["core/site-tagline"].typography.fontFamily=null===(D=y[e])||void 0===D?void 0:D.styles.blocks["core/heading"].typography.fontFamily),u.data.fontStyle=e,m((0,ne.NF)(_,d)),g(u),"click"===b&&(0,k.tH)(new k.Z_(C.sh,e))};return(0,s.createElement)("div",{ref:e,className:"theme-fonts--drawer"},(0,s.createElement)("h2",null,(0,S.__)("Font Palettes","wp-module-onboarding")),o&&Object.keys(o).map(((e,t)=>{var n,r,a,l,c,d,u,p,h;const m=null===(n=o[e])||void 0===n?void 0:n.label.split("&",2);return 0===m.length?null:(0,s.createElement)("div",{key:e,role:"button",tabIndex:t+1,className:ee()("font-palette drawer-palette--button",{"font-palette-selected drawer-palette--button--selected":i===e}),onClick:()=>f(e),onKeyDown:()=>f(e)},(0,s.createElement)("div",{className:"font-palette__icon drawer-palette--button__text",style:{fontFamily:null===(r=o[e])||void 0===r||null===(a=r.styles)||void 0===a||null===(l=a.typography)||void 0===l?void 0:l.fontFamily}}, +(0,S.__)("Making the keys to your %1$s Online %2$s","wp-module-onboarding"),e,(0,q.I)("Site")),subtitle:(0,S.__)("We’re installing WooCommerce for you to fill with your amazing products & services!","wp-module-onboarding")}))(e);return(0,s.createElement)(G.Z,{title:t.title,subtitle:t.subtitle})};var J=i(7207);const Y=e=>{let{children:t}=e;const r=(0,b.TH)(),[i,a]=(0,s.useState)(!1),{brandConfig:o,experienceLevel:l,topPriority:u,currentData:p,currentStep:h,lastChapter:m,firstStep:g}=(0,w.useSelect)((e=>({brandName:e(c.h).getNewfoldBrandName(),brandConfig:e(c.h).getNewfoldBrandConfig(),experienceLevel:e(c.h).getExperienceLevel(),topPriority:e(c.h).getTopPriority(),currentData:e(c.h).getCurrentOnboardingData(),lastChapter:e(c.h).getCurrentChapter(),currentStep:e(c.h).getCurrentStep(),firstStep:e(c.h).getFirstStep()})),[]),{updateAllSteps:v,updateRoutes:f,updateTopSteps:_,updateDesignRoutes:y,setCurrentOnboardingData:E,setActiveChapter:S,setIsDrawerOpened:x,setIsDrawerSuppressed:N,setIsHeaderNavigationEnabled:T,setSidebarActiveView:D}=(0,w.useDispatch)(c.h),P=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=n.uj)return a(!1);const r=await(0,d.b5)(e);if(null!=r&&r.error)return t+=1,P(e,t);await J.v.dispatchEvents();const i=R.B.steps[0],o=(0,O.getFragment)(window.location.href),l=(0,j.iO)(window.location.href,"flow").replace(o,"");window.location.replace(`${l}#${i.path}`),window.location.reload()};return(0,s.useEffect)((()=>{if(!1!==(null==o?void 0:o.prioritization))return(()=>{const e=window.nfdOnboarding.currentFlow,t=(0,Z.LI)(e),n=(0,j.Ph)("chapter");let r;r=n?F(n):((e,t,n)=>{const r=(e=>{const t={publishing:U.p,selling:R.B,designing:V.c};return t[e]?t[e]:U.p})(t);let i;switch(n){case"1":default:i=(0,A.filter)(e,(e=>e.id!==r.id)),i=(0,z.QF)(i,$.E,r);break;case"3":i=(0,A.filter)(e,(e=>e.id!==r.id&&(e.id===H.R.id||e.id===$.E.id))),i=(0,z.QF)(i,$.E,r);break;case"5":i=(0,A.filter)(e,(e=>e.id!==r.id&&(e.id===H.R.id||e.id===$.E.id)))}return i})(t,u,l);const i=(0,Z.Tx)(e)(r,n);p.data.chapters=B(t,p.data.chapters,h),E(p),v(i.steps),_(i.topSteps),f(i.routes),y(i.designRoutes)})()}),[l,u]),(0,s.useEffect)((()=>{(()=>{r.pathname===g.path&&(0,k.tH)(new k.Z_(C.Ou));const e=null==h?void 0:h.chapter;var t;m!==e&&(m&&(p.data.chapters[m].completed=!0,(0,k.tH)(new k.Z_(C.F8,m))),e&&(p.data.chapters[e].completed=!1,(0,k.tH)(new k.Z_(C.r9,e))),S(e)),e&&(p.data.chapters[e].lastStep=null!==(t=null==h?void 0:h.path)&&void 0!==t?t:"")})()}),[h]),(0,s.useEffect)((()=>{var e;if(null!==(e=window.nfdOnboarding)&&void 0!==e&&e.newFlow){const e=window.nfdOnboarding.newFlow;x(!1),N(!0),T(!1),D(!1),a(e),(async e=>{var t;const n=null!==(t=null==o?void 0:o.enabled_flows)&&void 0!==t?t:{};e in n&&!0===n[e]&&(e===M._?P(e):a(!1))})(e),window.nfdOnboarding.newFlow=void 0}}),[r.pathname]),(0,s.createElement)(s.Fragment,null,"ecommerce"===i?(0,s.createElement)(Q,null):t)},K=(0,s.memo)((()=>{const{routes:e}=(0,w.useSelect)((e=>({routes:e(c.h).getRoutes()}))),t=(0,s.useCallback)((()=>null==e?void 0:e.map((e=>(0,s.createElement)(b.AW,{key:e.path,path:e.path,end:!0,element:(0,s.createElement)(e.Component,null)})))),[e]);return(0,s.createElement)("main",{className:"nfd-onboard-content"},(0,s.createElement)(s.Suspense,{fallback:(0,s.createElement)(s.Fragment,null)},(0,s.createElement)(Y,null,(0,s.createElement)(b.Z5,null,t(e)))))}));var X=i(4333),ee=i(4184),te=i.n(ee),ne=i(682),re=i(6690);function ie(e){if(e){const t={};return null==e||e.forEach((e=>{t[e.slug]=e.color})),t}}function ae(e){if(e){const t=[];for(const n in e)t.push({slug:n,name:(null==n?void 0:n.charAt(0).toUpperCase())+(null==n?void 0:n.slice(1)),color:e[n]});return t}}const oe=e=>{let{isColorSelected:t,color:n,slug:r,name:i,callback:a}=e;return(0,s.createElement)("div",{className:"custom-palette__below__row",onClick:()=>a(r),onKeyDown:()=>a(r),role:"button",tabIndex:0},(0,s.createElement)("div",{className:`custom-palette__below__row__icon ${t&&"custom-palette__below__row__icon--selected-border"}`,style:{backgroundColor:`${n}`}},t?(0,s.createElement)(s.Fragment,null,"✓"):null),(0,s.createElement)("div",{className:"custom-palette__below__row__text"},i))},le=()=>{const e=(0,s.useRef)(null),[t,r]=(0,s.useState)(),[i,a]=(0,s.useState)(),[o,l]=(0,s.useState)(),[d,u]=(0,s.useState)(),[h,m]=(0,s.useState)(""),[g,v]=(0,s.useState)(!1),[b,_]=(0,s.useState)(!0),[y,E]=(0,s.useState)(),{storedPreviewSettings:x,currentData:N,themeStatus:T}=(0,w.useSelect)((e=>({storedPreviewSettings:e(c.h).getPreviewSettings(),currentData:e(c.h).getCurrentOnboardingData(),themeStatus:e(c.h).getThemeStatus()})),[]),{updatePreviewSettings:D,setCurrentOnboardingData:P,updateThemeStatus:I}=(0,w.useDispatch)(c.h);(0,s.useEffect)((()=>{var t,r;n.GV===T&&(L(),"custom"===(null==N||null===(t=N.data)||void 0===t?void 0:t.colorStyle)&&(_(!1),null==e||null===(r=e.current)||void 0===r||r.scrollIntoView({behavior:"smooth",block:"end"})))}),[T]);const L=async()=>{var e;const[t,i]=await Promise.all([(0,p.oC)(),(0,p.LK)()]);if(null!=i&&i.error)return I(n.a0);if(null!=t&&t.error)return I(n.a0);let o;var s,c,d,h,m,g,v;r(null==i?void 0:i.body.tailored),a(null==i?void 0:i.body["custom-picker-grouping"]),""!==(null==N||null===(e=N.data)||void 0===e?void 0:e.colorStyle)?(o=null!==(s=null==x||null===(c=x.settings)||void 0===c||null===(d=c.color)||void 0===d?void 0:d.palette)&&void 0!==s?s:null===(h=t.body[0])||void 0===h||null===(m=h.settings)||void 0===m||null===(g=m.color)||void 0===g?void 0:g.palette,"custom"===(null==N||null===(v=N.data)||void 0===v?void 0:v.colorStyle)&&(l(ie(o)),u(ie(o))),l(ie(o))):O()};async function O(){var e,t,n;const r=await(0,p.oC)(!0);let i;null!=N&&null!==(e=N.data)&&void 0!==e&&null!==(t=e.theme)&&void 0!==t&&t.variation?i=r.body.filter((e=>e.title===N.data.theme.variation))[0]:0===(null===(n=r.body[0])||void 0===n?void 0:n.id)&&(i=r.body[0]),D((0,re.NF)(i,x)),u();const a=i.settings.color.palette;N.data.colorStyle="",P(N),l(ie(a))}const A=e=>{u(),async function(e){var n,r;const i=x;let a=null==x||null===(n=x.settings)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.palette;t&&e&&a&&(a=a.map((n=>{var r;return null!=t&&null!==(r=t[e])&&void 0!==r&&r[n.slug]&&(n.color=t[e][n.slug]),n})),i.settings.color.palette=a,D((0,re.NF)(i,x)))}(e),l(t[e]),ae(t[e]),N.data.colorStyle=e,P(N),(0,k.tH)(new k.Z_(C.hz,e,{colors:(0,j.gq)(t[e])}))},z=async e=>{const t={...o};if(t[h]=e,i){const n=i[h];n&&n.forEach((n=>{t[n]=e}))}!async function(){var e,t;const n=x,r=null==n||null===(e=n.settings)||void 0===e||null===(t=e.color)||void 0===t?void 0:t.palette;if(r){for(let e=0;e{var t,n;d&&void 0!==d[h]&&(r[function(e,t,n){const r=n.findIndex((t=>{let{slug:n}=t;return n===e}));return-1===r?n.findIndex((e=>{let{slug:n}=e;return n===t})):r}(e,h,null==x||null===(t=x.settings)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.palette)].color=d[h])}))}n.settings.color.palette=r,D((0,re.NF)(n,x))}}(),ae(t),N.data.colorStyle="custom",P(N),l(t),clearTimeout(y),E(setTimeout((()=>{(0,k.tH)(new k.Z_(C.hz,"custom",{colors:(0,j.gq)(t)}))}),1e3)),u(t)},R=e=>{v(!g),m(g?"":e)};return t&&(0,s.createElement)("div",{className:"theme-colors--drawer"},(0,s.createElement)("h2",null,(0,S.__)("Color Palettes","wp-module-onboarding")),Object.keys(t).map(((e,n)=>{var r,i,a,o,l;return(0,s.createElement)("div",{key:e,className:te()("color-palette drawer-palette--button",{"color-palette-selected drawer-palette--button--selected":e===(null==N||null===(r=N.data)||void 0===r?void 0:r.colorStyle)}),role:"button",tabIndex:n+1,onClick:()=>A(e),onKeyDown:()=>A(e)},(0,s.createElement)("div",{className:"color-palette__colors"},(0,s.createElement)("div",{className:"color-palette__colors--tertiary",style:{backgroundColor:`${null===(i=t[e])||void 0===i?void 0:i["header-background"]}`}}),(0,s.createElement)("div",{className:"color-palette__colors--secondary",style:{backgroundColor:`${null===(a=t[e])||void 0===a?void 0:a.secondary}`}}),(0,s.createElement)("div",{className:"color-palette__colors--primary",style:{backgroundColor:`${null===(o=t[e])||void 0===o?void 0:o.primary}`}})),(0,s.createElement)("div",{className:"color-palette__name drawer-palette--button__text"},null===(l=t[e])||void 0===l?void 0:l.name))})),function(){var t,n,r,i;const a="#fff",l=d&&""!==(null==d?void 0:d.primary)?d.primary:null!==(t=null==o?void 0:o.primary)&&void 0!==t?t:a,c=d&&""!==(null==d?void 0:d.secondary)?d.secondary:null!==(n=null==o?void 0:o.secondary)&&void 0!==n?n:a,u=d&&""!==(null==d?void 0:d["header-background"])?d["header-background"]:null!==(r=null==o?void 0:o["header-background"])&&void 0!==r?r:a;return(0,s.createElement)("div",{className:"custom-palette"},(0,s.createElement)("div",{className:"custom-palette__top",role:"button",tabIndex:0,onClick:()=>_(!b),onKeyDown:()=>_(!b)},(0,s.createElement)("div",{className:"custom-palette__top-text"},(0,S.__)("SELECT CUSTOM COLORS","wp-module-onboarding")),b?(0,s.createElement)("div",{className:"custom-palette__top-icon"},"+"):(0,s.createElement)("div",{className:"custom-palette__top-icon"},"-")),(0,s.createElement)(ne.Z,{type:"fade-in",duration:"300ms",timingFunction:"ease-in-out",className:"custom-palette__below "+(b?"custom-palette_acc_closed":"custom-palette_acc_opened")},(0,s.createElement)(oe,{isColorSelected:d,color:null!==(i=null==d?void 0:d.base)&&void 0!==i?i:a,slug:"base",name:(0,S.__)("Background","wp-module-onboarding"),callback:R}),(0,s.createElement)(oe,{isColorSelected:d,color:l,slug:"primary",name:(0,S.__)("Primary","wp-module-onboarding"),callback:R}),(0,s.createElement)(oe,{isColorSelected:d,color:c,slug:"secondary",name:(0,S.__)("Secondary","wp-module-onboarding"),callback:R}),(0,s.createElement)(oe,{isColorSelected:d,color:u,slug:"tertiary",name:(0,S.__)("Tertiary","wp-module-onboarding"),callback:R})),d&&(0,s.createElement)(ne.Z,{type:"fade-in",duration:"300ms"},(0,s.createElement)("div",{ref:e,className:"theme-colors--drawer--reset",role:"button",tabIndex:0,onClick:O,onKeyDown:O},(0,s.createElement)("div",null,(0,S.__)("Reset","wp-module-onboarding")))),g&&(0,s.createElement)(f.Popover,null,(0,s.createElement)("div",{role:"button",tabIndex:0,className:"custom-palette__picker__close-icon",onClick:()=>v(!1),onKeyDown:()=>v(!1)},"X"),(0,s.createElement)(f.ColorPicker,{onChange:z})))}())};var se=i(6138),ce=i(6332);const de=()=>{var e,t;const[r,i]=(0,s.useState)(),[a,o]=(0,s.useState)(),[l,u]=(0,s.useState)(""),p=(0,b.TH)(),{currentStep:h,currentData:m,themeStatus:g,storedPreviewSettings:v}=(0,w.useSelect)((e=>({currentStep:e(c.h).getStepFromPath(p.pathname),currentData:e(c.h).getCurrentOnboardingData(),themeStatus:e(c.h).getThemeStatus(),storedPreviewSettings:e(c.h).getStepPreviewData()})),[]),{setCurrentOnboardingData:f,updateThemeStatus:_,setHeaderMenuData:y}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{g===n.GV&&(async()=>{var e;const t=await(0,se.C)(null==h||null===(e=h.data)||void 0===e?void 0:e.patternId);if(null!=t&&t.error)return _(n.a0);const r=null==t?void 0:t.body.pageHeaders,a=null==t?void 0:t.body.pageBody;m.data.partHeader&&""!==m.data.partHeader||(m.data.partHeader=r[0].slug,f(m)),u(m.data.partHeader),o(t.body),i(r);let[l,s]=["",""];r.forEach((e=>{e.slug===m.data.partHeader&&(l=e.content)})),s=l+a,y(s)})()}),[g]),(0,s.createElement)(ce.r9,{count:null===(e=v[null==h||null===(t=h.data)||void 0===t?void 0:t.patternId])||void 0===e?void 0:e.previewCount,watch:r,callback:()=>null==r?void 0:r.map(((e,t)=>(0,s.createElement)(ce.H,{key:t,className:"theme-header-menu-preview--drawer__list__item",selected:e.slug===l,blockGrammer:e.content,viewportWidth:900,styling:"custom",overlay:!1,onClick:()=>(async e=>{document.getElementsByClassName("nfd-onboard-content")&&document.getElementsByClassName("nfd-onboard-content")[0].scrollIntoView({behavior:"smooth"});const t=r[e];if(t.slug===l)return!0;u(t.slug),m.data.partHeader=t.slug,f(m);const n=t.content+a.pageBody;y(n);const i=await(0,d.kB)(m);null===(null==i?void 0:i.error)&&f(m),(0,k.tH)(new k.Z_(C.Z4,t.slug))})(t)}))),className:"theme-header-menu-preview--drawer__list__item",viewportWidth:900})},ue=()=>(0,s.createElement)("div",{style:{padding:"0 16px"}},(0,s.createElement)("h2",null,(0,S.__)("Pick a Homepage Design","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show a few Homepage Patterns.","wp-module-onboarding"))),pe=()=>(0,s.createElement)("div",{style:{padding:"0 16px"}},(0,s.createElement)("h2",null,(0,S.__)("Pick a Theme Style","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("No Style Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show Theme details","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("With Style Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show single-column of other Styles.","wp-module-onboarding"))),he=()=>{var e,t;const[r,i]=(0,s.useState)(),[a,o]=(0,s.useState)(),[l,d]=(0,s.useState)(""),{currentStep:u,currentData:h,storedPreviewSettings:m,themeStatus:g,themeVariations:v}=(0,w.useSelect)((e=>({currentStep:e(c.h).getCurrentStep(),currentData:e(c.h).getCurrentOnboardingData(),storedPreviewSettings:e(c.h).getPreviewSettings(),themeStatus:e(c.h).getThemeStatus(),themeVariations:e(c.h).getStepPreviewData()})),[]),{updatePreviewSettings:f,setCurrentOnboardingData:b,updateThemeStatus:_}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{g===n.GV&&(async()=>{var e;const t=await(0,p.oC)(!0);if(null!=t&&t.error)return _(n.a0);let r;h.data.theme.variation?r=h.data.theme.variation:(r=t.body[0].title,h.data.theme.variation=r,b(h)),d(r);const a=await(0,se.C)(null==u||null===(e=u.data)||void 0===e?void 0:e.patternId,!0);if(null!=a&&a.error)return _(n.a0);i(null==a?void 0:a.body),o(null==t?void 0:t.body),document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")&&document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")[0]&&document.getElementsByClassName("theme-styles-preview--drawer__list__item__title-bar--selected")[0].scrollIntoView({behavior:"smooth",block:"center"})})()}),[g]),(0,s.createElement)("div",{className:"theme-styles-preview--drawer"},(0,s.createElement)("div",{className:"theme-styles-preview--drawer__list"},(0,s.createElement)(ce.r9,{className:"theme-styles-preview--drawer__list__item",watch:a&&r,count:null===(e=v[null==u||null===(t=u.data)||void 0===t?void 0:t.patternId])||void 0===e?void 0:e.previewCount,callback:()=>null==a?void 0:a.map(((e,t)=>(0,s.createElement)(ce.H,{key:t,className:"theme-styles-preview--drawer__list__item",selected:e.title===l,blockGrammer:r,viewportWidth:900,styling:"custom",previewSettings:e,overlay:!1,onClick:()=>(e=>{const t=a[e];if(l===t.title)return!0;f((0,re.NF)(t,m)),d(t.title),h.data.theme.variation=t.title,b(h),(0,k.tH)(new k.Z_(C.Dv,t.title))})(t)}))),viewportWidth:900})))},me=()=>(0,s.createElement)("div",{style:{padding:"0 16px"}},(0,s.createElement)("h2",null,(0,S.__)("Pick a Theme","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("No Theme Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show contextual help","wp-module-onboarding")),(0,s.createElement)("h4",null,(0,S.__)("With Theme Selected","wp-module-onboarding")),(0,s.createElement)("p",null,(0,S.__)("Panel will show single-column of other Themes.","wp-module-onboarding"))),ge=()=>{const e=(0,s.useRef)(),[t,r]=(0,s.useState)(!1),[i,a]=(0,s.useState)(),[o,l]=(0,s.useState)(),{storedPreviewSettings:d,currentData:u,themeStatus:h}=(0,w.useSelect)((e=>({storedPreviewSettings:e(c.h).getPreviewSettings(),currentData:e(c.h).getCurrentOnboardingData(),themeStatus:e(c.h).getThemeStatus()})),[]),{updatePreviewSettings:m,setCurrentOnboardingData:g,updateThemeStatus:v}=(0,w.useDispatch)(c.h);(0,s.useEffect)((()=>{var e,t,n;""!==(null==u||null===(e=u.data)||void 0===e?void 0:e.fontStyle)&&void 0!==o&&(a(null==u||null===(t=u.data)||void 0===t?void 0:t.fontStyle),f(null==u||null===(n=u.data)||void 0===n?void 0:n.fontStyle))}),[o,d]),(0,s.useEffect)((()=>{t||n.GV!==h||(async()=>{var t,i;const a=await(0,p.ko)();if(null!=a&&a.error)return v(n.a0);l(null==a?void 0:a.body);const o=null==d||null===(t=d.settings)||void 0===t||null===(i=t.styles[0])||void 0===i?void 0:i.css;if(o){const t=/--wp--preset--font-family.*;/;e.current.setAttribute("style",o.match(t))}r(!0)})()}),[t,h]);const f=async function(e){var t,n,r,l,s,c,p,h,v,f,w;let b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"click";if(i===e)return!0;a(e);const _=d,y=o;var E,S,x,N,T,D;null!=_&&null!==(t=_.styles)&&void 0!==t&&null!==(n=t.typography)&&void 0!==n&&n.fontFamily&&null!=_&&null!==(r=_.styles)&&void 0!==r&&null!==(l=r.blocks["core/heading"])&&void 0!==l&&null!==(s=l.typography)&&void 0!==s&&s.fontFamily&&(_.styles.typography.fontFamily=null===(E=y[e])||void 0===E||null===(S=E.styles)||void 0===S||null===(x=S.typography)||void 0===x?void 0:x.fontFamily,_.styles.blocks["core/heading"].typography.fontFamily=null===(N=y[e])||void 0===N?void 0:N.styles.blocks["core/heading"].typography.fontFamily),null!==(c=_.styles)&&void 0!==c&&null!==(p=c.blocks["core/site-title"])&&void 0!==p&&null!==(h=p.typography)&&void 0!==h&&h.fontFamily&&(_.styles.blocks["core/site-title"].typography.fontFamily=null===(T=y[e])||void 0===T?void 0:T.styles.blocks["core/heading"].typography.fontFamily),null!==(v=_.styles)&&void 0!==v&&null!==(f=v.blocks["core/site-tagline"])&&void 0!==f&&null!==(w=f.typography)&&void 0!==w&&w.fontFamily&&(_.styles.blocks["core/site-tagline"].typography.fontFamily=null===(D=y[e])||void 0===D?void 0:D.styles.blocks["core/heading"].typography.fontFamily),u.data.fontStyle=e,m((0,re.NF)(_,d)),g(u),"click"===b&&(0,k.tH)(new k.Z_(C.sh,e))};return(0,s.createElement)("div",{ref:e,className:"theme-fonts--drawer"},(0,s.createElement)("h2",null,(0,S.__)("Font Palettes","wp-module-onboarding")),o&&Object.keys(o).map(((e,t)=>{var n,r,a,l,c,d,u,p,h;const m=null===(n=o[e])||void 0===n?void 0:n.label.split("&",2);return 0===m.length?null:(0,s.createElement)("div",{key:e,role:"button",tabIndex:t+1,className:te()("font-palette drawer-palette--button",{"font-palette-selected drawer-palette--button--selected":i===e}),onClick:()=>f(e),onKeyDown:()=>f(e)},(0,s.createElement)("div",{className:"font-palette__icon drawer-palette--button__text",style:{fontFamily:null===(r=o[e])||void 0===r||null===(a=r.styles)||void 0===a||null===(l=a.typography)||void 0===l?void 0:l.fontFamily}}, /* translators: text in each font selection pill representing the respective font */ -(0,S.__)("Aa","wp-module-onboarding")),(0,s.createElement)("div",{className:"font-palette__name drawer-palette--button__text"},(0,s.createElement)("span",{style:{fontFamily:null===(c=o[e])||void 0===c?void 0:c.styles.blocks["core/heading"].typography.fontFamily}},m[0]),m[1]?"&":"",(0,s.createElement)("span",{style:{fontFamily:null===(d=o[e])||void 0===d||null===(u=d.styles)||void 0===u||null===(p=u.typography)||void 0===p?void 0:p.fontFamily}},null!==(h=m[1])&&void 0!==h?h:"")))})))};var ge=i(9630),ve=i(9196),fe=i(2599);function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const _e=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],ye=["aria-current","caseSensitive","className","end","style","to","children"];function Ee(e){let{basename:t,children:n,window:r}=e,i=ve.useRef();null==i.current&&(i.current=(0,fe.q_)({window:r,v5Compat:!0}));let a=i.current,[o,l]=ve.useState({action:a.action,location:a.location});return ve.useLayoutEffect((()=>a.listen(l)),[a]),ve.createElement(b.F0,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a})}const Se="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ke=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ce=ve.forwardRef((function(e,t){let n,{onClick:r,relative:i,reloadDocument:a,replace:o,state:l,target:s,to:c,preventScrollReset:d}=e,u=be(e,_e),{basename:p}=ve.useContext(b.Us),h=!1;if("string"==typeof c&&ke.test(c)&&(n=c,Se))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=(0,fe.Zn)(t.pathname,p);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:h=!0}catch(e){}let m=(0,b.oQ)(c,{relative:i}),g=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o}=void 0===t?{}:t,l=(0,b.s0)(),s=(0,b.TH)(),c=(0,b.WU)(e,{relative:o});return ve.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:(0,fe.Ep)(s)===(0,fe.Ep)(c);l(e,{replace:n,state:i,preventScrollReset:a,relative:o})}}),[s,l,c,r,i,n,e,a,o])}(c,{replace:o,state:l,target:s,preventScrollReset:d,relative:i});return ve.createElement("a",we({},u,{href:n||m,onClick:h||a?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:s}))})),xe=ve.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:i="",end:a=!1,style:o,to:l,children:s}=e,c=be(e,ye),d=(0,b.WU)(l,{relative:c.relative}),u=(0,b.TH)(),p=ve.useContext(b.FR),{navigator:h}=ve.useContext(b.Us),m=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,g=u.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(g=g.toLowerCase(),v=v?v.toLowerCase():null,m=m.toLowerCase());let f,w=g===m||!a&&g.startsWith(m)&&"/"===g.charAt(m.length),_=null!=v&&(v===m||!a&&v.startsWith(m)&&"/"===v.charAt(m.length)),y=w?n:void 0;f="function"==typeof i?i({isActive:w,isPending:_}):[i,w?"active":null,_?"pending":null].filter(Boolean).join(" ");let E="function"==typeof o?o({isActive:w,isPending:_}):o;return ve.createElement(Ce,we({},c,{"aria-current":y,className:f,ref:t,style:E,to:l}),"function"==typeof s?s({isActive:w,isPending:_}):s)}));var Ne,Te;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Ne||(Ne={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Te||(Te={}));const De=()=>{const{designRoutes:e}=(0,w.useSelect)((e=>({designRoutes:e(c.h).getDesignRoutes()})),[]),{setDrawerActiveView:t}=(0,w.useDispatch)(c.h),r=(0,b.TH)();return(0,s.createElement)(te.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>t(n.tM)},(0,S.__)("Onboarding Menu","wp-module-onboarding")),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>{var n;return(0,s.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(xe,{to:e.path,className:ee()("nfd-onboarding-drawer__panel-menu-link",{active:r.pathname===e.path||r.pathname.includes(null==e||null===(n=e.data)||void 0===n?void 0:n.designDrawerActiveLinkIncludes)}),state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,s.createElement)(_.Z,{icon:e.icon}),(0,s.createElement)("span",null,e.title)))})))))},Pe=()=>{const e=$.E.steps,{setDrawerActiveView:t}=(0,w.useDispatch)(c.h);return(0,s.createElement)(te.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>t(n.tM)},(0,S.__)("Onboarding Menu","wp-module-onboarding")),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,s.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(xe,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,s.createElement)(_.Z,{icon:e.icon}),(0,s.createElement)("span",null,e.title))))))))},Ie=()=>{const{setDrawerActiveView:e}=(0,w.useDispatch)(c.h);return(0,s.createElement)(te.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>e(n.tM)},(0,S.__)("Resume Onboarding","wp-module-onboarding")))},Le=()=>{const e=(0,b.TH)(),{topSteps:t}=(0,w.useSelect)((e=>({topSteps:e(c.h).getTopSteps()})),[]),{setDrawerActiveView:n}=(0,w.useDispatch)(c.h);return(0,s.createElement)(te.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},t.map((t=>{var r,i,a;return(0,s.createElement)(f.Tooltip,{key:t.path,text:null===(r=t.data)||void 0===r?void 0:r.tooltipText},(0,s.createElement)("li",{className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(xe,{to:e.pathname===t.path||e.pathname.includes(null==t||null===(i=t.data)||void 0===i?void 0:i.primaryDrawerActiveLinkIncludes)?e.pathname:t.path,className:ee()("nfd-onboarding-drawer__panel-menu-link",{active:e.pathname===t.path||e.pathname.includes(null==t||null===(a=t.data)||void 0===a?void 0:a.primaryDrawerActiveLinkIncludes)}),state:{origin:"drawer-nav"},onClick:()=>(null==t?void 0:t.drawerView)&&n(t.drawerView)},(0,s.createElement)(_.Z,{icon:t.icon}),(0,s.createElement)("span",null,t.title))))})))))},Oe=()=>{const e=R.B.steps,{setDrawerActiveView:t}=(0,w.useDispatch)(c.h);return(0,s.createElement)(te.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>t(n.tM)},(0,S.__)("Onboarding Menu","wp-module-onboarding")),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,s.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(xe,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,s.createElement)(_.Z,{icon:e.icon}),(0,s.createElement)("span",null,e.title))))))))},Ae=e=>{let{children:t}=e;const{setDrawerActiveView:r}=(0,w.useDispatch)(c.h);return(0,s.createElement)(te.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>r(n.Yl)},(0,S.__)("Design","wp-module-onboarding")),t)},ze=()=>{const[e,t]=(0,s.useState)(!0),{isDrawerOpen:r,drawerView:i}=(0,w.useSelect)((e=>{const{isDrawerOpened:t,getDrawerView:n}=e(c.h);return{isDrawerOpen:t(),drawerView:n()}}),[]),{setIsDrawerOpened:a,setDrawerActiveView:o}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{n.$P.includes(i)?t(!0):t(!1)}),[i]),(0,s.createElement)("div",{className:ee()("nfd-onboarding-drawer__panel",{"is-open":r}),onKeyDown:e=>{e.keyCode!==ge.ESCAPE||e.defaultPrevented||(e.preventDefault(),a(!1))}},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-inner"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title-container"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title"},(0,S.__)("WordPress Onboarding","wp-module-onboarding"))),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-scroll-container"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-inside"},n.tM===i&&(0,s.createElement)(Le,null),n.Yl===i&&(0,s.createElement)(De,null),n.mz===i&&(0,s.createElement)(Pe,null),n.dv===i&&(0,s.createElement)(Oe,null),n.BP===i&&(0,s.createElement)(Ie,null),n.tX===i&&(0,s.createElement)(Ae,null,(0,s.createElement)(he,null)),n.lE===i&&(0,s.createElement)(Ae,null,(0,s.createElement)(ue,null)),n._h===i&&(0,s.createElement)(Ae,null,(0,s.createElement)(pe,null)),n.qR===i&&(0,s.createElement)(Ae,null,(0,s.createElement)(oe,null)),n.jN===i&&(0,s.createElement)(Ae,null,(0,s.createElement)(me,null)),n.qO===i&&(0,s.createElement)(Ae,null,(0,s.createElement)(ce,null)),n.nx===i&&(0,s.createElement)(Ae,null,(0,s.createElement)(de,null))))))},Re=e=>{let{isOpen:t}=e;const{isDrawerOpen:n,isDrawerSuppressed:r}=(0,w.useSelect)((e=>({isDrawerOpen:e(c.h).isDrawerOpened(),isDrawerSuppressed:e(c.h).isDrawerSuppressed()})),[]),{setIsDrawerOpened:i}=(0,w.useDispatch)(c.h),a=(0,s.useRef)();return(0,s.useEffect)((()=>{n||a.current.focus()}),[n]),(0,s.createElement)(f.__unstableMotion.div,{className:ee()("nfd-onboarding-drawer__toggle",{"is-open":n}),whileHover:"expand"},(0,s.createElement)(f.Button,{className:`nfd-onboarding-drawer__toggle-button has-icon ${!r||"is-suppressed"}`,label:(0,S.__)("Toggle Navigation","wp-module-onboarding"),ref:a,"aria-pressed":t,onClick:()=>{r||i(!n)}},(0,s.createElement)("div",{style:{width:"36px",height:"36px",backgroundImage:"var(--nfd-onboarding-icon)",backgroundSize:"contain"}})))},$e=(0,s.memo)((e=>{let{isDefaultOpen:t=!1}=e;const n=(0,K.useViewportMatch)("medium"),{setIsDrawerOpened:r}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{r(t&&n)}),[t,n,r]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Re,null),(0,s.createElement)(ze,null))})),Ve=()=>{const{isSidebarOpened:e,sideBarView:t,sidebars:r}=(0,w.useSelect)((e=>({isSidebarOpened:e(c.h).isSidebarOpened(),sideBarView:e(c.h).getSidebarView(),sidebars:e(c.h).getSidebars()})));return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(s.Suspense,{fallback:(0,s.createElement)(s.Fragment,null)},r.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},(0,s.createElement)(e.sidebar,null),(0,s.createElement)(e.menu,null))))),(0,s.createElement)("div",{className:ee()("nfd-onboarding-sidebar__panel",{"is-open":e&&t})},(0,s.createElement)("div",{className:"nfd-onboarding-sidebar__panel-inner"},e&&t&&(0,s.createElement)(f.Slot,{name:`${n.qB}/${t}`}))))};var He=i(3768);const Ue=e=>{let{isActive:t}=e;return(0,s.useEffect)((()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}}),[]),(0,s.useEffect)((()=>(t?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{t&&document.body.classList.remove("is-fullscreen-mode")})),[t]),null},We=window.wp.deprecated;var Fe=i.n(We);const Be=window.wp.preferences,Ze=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),Me=(e,t)=>n=>{let{registry:r,dispatch:i}=n;t&&(r.select(Be.store).get(e,"isComplementaryAreaVisible")||r.dispatch(Be.store).set(e,"isComplementaryAreaVisible",!0),i({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t}))},je=e=>t=>{let{registry:n}=t;n.select(Be.store).get(e,"isComplementaryAreaVisible")&&n.dispatch(Be.store).set(e,"isComplementaryAreaVisible",!1)},Ge=(e,t)=>n=>{let{registry:r}=n;if(!t)return;const i=r.select(Be.store).get(e,"pinnedItems");!0!==(null==i?void 0:i[t])&&r.dispatch(Be.store).set(e,"pinnedItems",{...i,[t]:!0})},qe=(e,t)=>n=>{let{registry:r}=n;if(!t)return;const i=r.select(Be.store).get(e,"pinnedItems");r.dispatch(Be.store).set(e,"pinnedItems",{...i,[t]:!1})};function Qe(e,t){return function(n){let{registry:r}=n;Fe()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(Be.store).toggle(e,t)}}function Je(e,t,n){return function(r){let{registry:i}=r;Fe()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),i.dispatch(Be.store).set(e,t,!!n)}}function Ye(e,t){return function(n){let{registry:r}=n;Fe()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(Be.store).setDefaults(e,t)}}const Ke=(0,w.createRegistrySelector)((e=>(t,n)=>{var r;const i=e(Be.store).get(n,"isComplementaryAreaVisible");if(void 0!==i)return!1===i?null:null==t||null===(r=t.complementaryAreas)||void 0===r?void 0:r[n]})),Xe=(0,w.createRegistrySelector)((e=>(t,n)=>{var r;const i=e(Be.store).get(n,"isComplementaryAreaVisible"),a=null==t||null===(r=t.complementaryAreas)||void 0===r?void 0:r[n];return i&&void 0===a})),et=(0,w.createRegistrySelector)((e=>(t,n,r)=>{var i;const a=e(Be.store).get(n,"pinnedItems");return null===(i=null==a?void 0:a[r])||void 0===i||i})),tt=(0,w.createRegistrySelector)((e=>(t,n,r)=>(Fe()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(Be.store).get(n,r)))),nt=(0,w.combineReducers)({complementaryAreas:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return e[n]?e:{...e,[n]:r}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return{...e,[n]:r}}}return e}}),rt=(0,w.createReduxStore)("core/interface",{reducer:nt,actions:e,selectors:t});(0,w.register)(rt);var it=i(7462);const at=(0,s.forwardRef)((function(e,t){let{footer:n,header:r,sidebar:i,secondarySidebar:a,notices:o,content:l,drawer:c,actions:d,labels:u,className:p,shortcuts:h}=e;const m=(0,f.__unstableUseNavigateRegions)(h);!function(e){(0,s.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("nfd-interface-interface-skeleton__html-container");const g={ +(0,S.__)("Aa","wp-module-onboarding")),(0,s.createElement)("div",{className:"font-palette__name drawer-palette--button__text"},(0,s.createElement)("span",{style:{fontFamily:null===(c=o[e])||void 0===c?void 0:c.styles.blocks["core/heading"].typography.fontFamily}},m[0]),m[1]?"&":"",(0,s.createElement)("span",{style:{fontFamily:null===(d=o[e])||void 0===d||null===(u=d.styles)||void 0===u||null===(p=u.typography)||void 0===p?void 0:p.fontFamily}},null!==(h=m[1])&&void 0!==h?h:"")))})))};var ve=i(9630),fe=i(9196),we=i(2599);function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const ye=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Ee=["aria-current","caseSensitive","className","end","style","to","children"];function Se(e){let{basename:t,children:n,window:r}=e,i=fe.useRef();null==i.current&&(i.current=(0,we.q_)({window:r,v5Compat:!0}));let a=i.current,[o,l]=fe.useState({action:a.action,location:a.location});return fe.useLayoutEffect((()=>a.listen(l)),[a]),fe.createElement(b.F0,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:a})}const ke="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Ce=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xe=fe.forwardRef((function(e,t){let n,{onClick:r,relative:i,reloadDocument:a,replace:o,state:l,target:s,to:c,preventScrollReset:d}=e,u=_e(e,ye),{basename:p}=fe.useContext(b.Us),h=!1;if("string"==typeof c&&Ce.test(c)&&(n=c,ke))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),n=(0,we.Zn)(t.pathname,p);t.origin===e.origin&&null!=n?c=n+t.search+t.hash:h=!0}catch(e){}let m=(0,b.oQ)(c,{relative:i}),g=function(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o}=void 0===t?{}:t,l=(0,b.s0)(),s=(0,b.TH)(),c=(0,b.WU)(e,{relative:o});return fe.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:(0,we.Ep)(s)===(0,we.Ep)(c);l(e,{replace:n,state:i,preventScrollReset:a,relative:o})}}),[s,l,c,r,i,n,e,a,o])}(c,{replace:o,state:l,target:s,preventScrollReset:d,relative:i});return fe.createElement("a",be({},u,{href:n||m,onClick:h||a?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:s}))})),Ne=fe.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:r=!1,className:i="",end:a=!1,style:o,to:l,children:s}=e,c=_e(e,Ee),d=(0,b.WU)(l,{relative:c.relative}),u=(0,b.TH)(),p=fe.useContext(b.FR),{navigator:h}=fe.useContext(b.Us),m=h.encodeLocation?h.encodeLocation(d).pathname:d.pathname,g=u.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(g=g.toLowerCase(),v=v?v.toLowerCase():null,m=m.toLowerCase());let f,w=g===m||!a&&g.startsWith(m)&&"/"===g.charAt(m.length),_=null!=v&&(v===m||!a&&v.startsWith(m)&&"/"===v.charAt(m.length)),y=w?n:void 0;f="function"==typeof i?i({isActive:w,isPending:_}):[i,w?"active":null,_?"pending":null].filter(Boolean).join(" ");let E="function"==typeof o?o({isActive:w,isPending:_}):o;return fe.createElement(xe,be({},c,{"aria-current":y,className:f,ref:t,style:E,to:l}),"function"==typeof s?s({isActive:w,isPending:_}):s)}));var Te,De;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Te||(Te={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(De||(De={}));const Pe=()=>{const{designRoutes:e}=(0,w.useSelect)((e=>({designRoutes:e(c.h).getDesignRoutes()})),[]),{setDrawerActiveView:t}=(0,w.useDispatch)(c.h),r=(0,b.TH)();return(0,s.createElement)(ne.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>t(n.tM)},(0,S.__)("Onboarding Menu","wp-module-onboarding")),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>{var n;return(0,s.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(Ne,{to:e.path,className:te()("nfd-onboarding-drawer__panel-menu-link",{active:r.pathname===e.path||r.pathname.includes(null==e||null===(n=e.data)||void 0===n?void 0:n.designDrawerActiveLinkIncludes)}),state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,s.createElement)(_.Z,{icon:e.icon}),(0,s.createElement)("span",null,e.title)))})))))},Ie=()=>{const e=$.E.steps,{setDrawerActiveView:t}=(0,w.useDispatch)(c.h);return(0,s.createElement)(ne.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>t(n.tM)},(0,S.__)("Onboarding Menu","wp-module-onboarding")),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,s.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(Ne,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,s.createElement)(_.Z,{icon:e.icon}),(0,s.createElement)("span",null,e.title))))))))},Le=()=>{const{setDrawerActiveView:e}=(0,w.useDispatch)(c.h);return(0,s.createElement)(ne.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>e(n.tM)},(0,S.__)("Resume Onboarding","wp-module-onboarding")))},Oe=()=>{const e=(0,b.TH)(),{topSteps:t}=(0,w.useSelect)((e=>({topSteps:e(c.h).getTopSteps()})),[]),{setDrawerActiveView:n}=(0,w.useDispatch)(c.h);return(0,s.createElement)(ne.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},t.map((t=>{var r,i,a;return(0,s.createElement)(f.Tooltip,{key:t.path,text:null===(r=t.data)||void 0===r?void 0:r.tooltipText},(0,s.createElement)("li",{className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(Ne,{to:e.pathname===t.path||e.pathname.includes(null==t||null===(i=t.data)||void 0===i?void 0:i.primaryDrawerActiveLinkIncludes)?e.pathname:t.path,className:te()("nfd-onboarding-drawer__panel-menu-link",{active:e.pathname===t.path||e.pathname.includes(null==t||null===(a=t.data)||void 0===a?void 0:a.primaryDrawerActiveLinkIncludes)}),state:{origin:"drawer-nav"},onClick:()=>(null==t?void 0:t.drawerView)&&n(t.drawerView)},(0,s.createElement)(_.Z,{icon:t.icon}),(0,s.createElement)("span",null,t.title))))})))))},Ae=()=>{const e=R.B.steps,{setDrawerActiveView:t}=(0,w.useDispatch)(c.h);return(0,s.createElement)(ne.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>t(n.tM)},(0,S.__)("Onboarding Menu","wp-module-onboarding")),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-menu"},(0,s.createElement)("ul",{className:"nfd-onboarding-drawer__panel-routes"},e.map((e=>(0,s.createElement)("li",{key:e.path,className:"nfd-onboarding-drawer__panel-menu-item"},(0,s.createElement)(Ne,{to:e.path,className:"nfd-onboarding-drawer__panel-menu-link",state:{origin:"drawer-nav"},onClick:()=>t(e.drawerView)},(0,s.createElement)(_.Z,{icon:e.icon}),(0,s.createElement)("span",null,e.title))))))))},ze=e=>{let{children:t}=e;const{setDrawerActiveView:r}=(0,w.useDispatch)(c.h);return(0,s.createElement)(ne.Z,{type:"fade-in",duration:"100ms",timingFunction:"ease-in"},(0,s.createElement)(f.Button,{className:"nfd-onboarding-drawer__panel-back",variant:"tertiary",icon:y.Z,onClick:()=>r(n.Yl)},(0,S.__)("Design","wp-module-onboarding")),t)},Re=()=>{const[e,t]=(0,s.useState)(!0),{isDrawerOpen:r,drawerView:i}=(0,w.useSelect)((e=>{const{isDrawerOpened:t,getDrawerView:n}=e(c.h);return{isDrawerOpen:t(),drawerView:n()}}),[]),{setIsDrawerOpened:a,setDrawerActiveView:o}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{n.$P.includes(i)?t(!0):t(!1)}),[i]),(0,s.createElement)("div",{className:te()("nfd-onboarding-drawer__panel",{"is-open":r}),onKeyDown:e=>{e.keyCode!==ve.ESCAPE||e.defaultPrevented||(e.preventDefault(),a(!1))}},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-inner"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title-container"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-site-title"},(0,S.__)("WordPress Onboarding","wp-module-onboarding"))),(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-scroll-container"},(0,s.createElement)("div",{className:"nfd-onboarding-drawer__panel-inside"},n.tM===i&&(0,s.createElement)(Oe,null),n.Yl===i&&(0,s.createElement)(Pe,null),n.mz===i&&(0,s.createElement)(Ie,null),n.dv===i&&(0,s.createElement)(Ae,null),n.BP===i&&(0,s.createElement)(Le,null),n.tX===i&&(0,s.createElement)(ze,null,(0,s.createElement)(me,null)),n.lE===i&&(0,s.createElement)(ze,null,(0,s.createElement)(pe,null)),n._h===i&&(0,s.createElement)(ze,null,(0,s.createElement)(he,null)),n.qR===i&&(0,s.createElement)(ze,null,(0,s.createElement)(le,null)),n.jN===i&&(0,s.createElement)(ze,null,(0,s.createElement)(ge,null)),n.qO===i&&(0,s.createElement)(ze,null,(0,s.createElement)(de,null)),n.nx===i&&(0,s.createElement)(ze,null,(0,s.createElement)(ue,null))))))},$e=e=>{let{isOpen:t}=e;const{isDrawerOpen:n,isDrawerSuppressed:r}=(0,w.useSelect)((e=>({isDrawerOpen:e(c.h).isDrawerOpened(),isDrawerSuppressed:e(c.h).isDrawerSuppressed()})),[]),{setIsDrawerOpened:i}=(0,w.useDispatch)(c.h),a=(0,s.useRef)();return(0,s.useEffect)((()=>{n||a.current.focus()}),[n]),(0,s.createElement)(f.__unstableMotion.div,{className:te()("nfd-onboarding-drawer__toggle",{"is-open":n}),whileHover:"expand"},(0,s.createElement)(f.Button,{className:`nfd-onboarding-drawer__toggle-button has-icon ${!r||"is-suppressed"}`,label:(0,S.__)("Toggle Navigation","wp-module-onboarding"),ref:a,"aria-pressed":t,onClick:()=>{r||i(!n)}},(0,s.createElement)("div",{style:{width:"36px",height:"36px",backgroundImage:"var(--nfd-onboarding-icon)",backgroundSize:"contain"}})))},Ve=(0,s.memo)((e=>{let{isDefaultOpen:t=!1}=e;const n=(0,X.useViewportMatch)("medium"),{setIsDrawerOpened:r}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{r(t&&n)}),[t,n,r]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)($e,null),(0,s.createElement)(Re,null))})),He=()=>{const{isSidebarOpened:e,sideBarView:t,sidebars:r}=(0,w.useSelect)((e=>({isSidebarOpened:e(c.h).isSidebarOpened(),sideBarView:e(c.h).getSidebarView(),sidebars:e(c.h).getSidebars()})));return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(s.Suspense,{fallback:(0,s.createElement)(s.Fragment,null)},r.map((e=>(0,s.createElement)(s.Fragment,{key:e.id},(0,s.createElement)(e.sidebar,null),(0,s.createElement)(e.menu,null))))),(0,s.createElement)("div",{className:te()("nfd-onboarding-sidebar__panel",{"is-open":e&&t})},(0,s.createElement)("div",{className:"nfd-onboarding-sidebar__panel-inner"},e&&t&&(0,s.createElement)(f.Slot,{name:`${n.qB}/${t}`}))))};var Ue=i(3768);const We=e=>{let{isActive:t}=e;return(0,s.useEffect)((()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}}),[]),(0,s.useEffect)((()=>(t?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{t&&document.body.classList.remove("is-fullscreen-mode")})),[t]),null},Fe=window.wp.deprecated;var Be=i.n(Fe);const Ze=window.wp.preferences,Me=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e,area:t}),je=(e,t)=>n=>{let{registry:r,dispatch:i}=n;t&&(r.select(Ze.store).get(e,"isComplementaryAreaVisible")||r.dispatch(Ze.store).set(e,"isComplementaryAreaVisible",!0),i({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t}))},Ge=e=>t=>{let{registry:n}=t;n.select(Ze.store).get(e,"isComplementaryAreaVisible")&&n.dispatch(Ze.store).set(e,"isComplementaryAreaVisible",!1)},qe=(e,t)=>n=>{let{registry:r}=n;if(!t)return;const i=r.select(Ze.store).get(e,"pinnedItems");!0!==(null==i?void 0:i[t])&&r.dispatch(Ze.store).set(e,"pinnedItems",{...i,[t]:!0})},Qe=(e,t)=>n=>{let{registry:r}=n;if(!t)return;const i=r.select(Ze.store).get(e,"pinnedItems");r.dispatch(Ze.store).set(e,"pinnedItems",{...i,[t]:!1})};function Je(e,t){return function(n){let{registry:r}=n;Be()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),r.dispatch(Ze.store).toggle(e,t)}}function Ye(e,t,n){return function(r){let{registry:i}=r;Be()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),i.dispatch(Ze.store).set(e,t,!!n)}}function Ke(e,t){return function(n){let{registry:r}=n;Be()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),r.dispatch(Ze.store).setDefaults(e,t)}}const Xe=(0,w.createRegistrySelector)((e=>(t,n)=>{var r;const i=e(Ze.store).get(n,"isComplementaryAreaVisible");if(void 0!==i)return!1===i?null:null==t||null===(r=t.complementaryAreas)||void 0===r?void 0:r[n]})),et=(0,w.createRegistrySelector)((e=>(t,n)=>{var r;const i=e(Ze.store).get(n,"isComplementaryAreaVisible"),a=null==t||null===(r=t.complementaryAreas)||void 0===r?void 0:r[n];return i&&void 0===a})),tt=(0,w.createRegistrySelector)((e=>(t,n,r)=>{var i;const a=e(Ze.store).get(n,"pinnedItems");return null===(i=null==a?void 0:a[r])||void 0===i||i})),nt=(0,w.createRegistrySelector)((e=>(t,n,r)=>(Be()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(Ze.store).get(n,r)))),rt=(0,w.combineReducers)({complementaryAreas:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return e[n]?e:{...e,[n]:r}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:n,area:r}=t;return{...e,[n]:r}}}return e}}),it=(0,w.createReduxStore)("core/interface",{reducer:rt,actions:e,selectors:t});(0,w.register)(it);var at=i(7462);const ot=(0,s.forwardRef)((function(e,t){let{footer:n,header:r,sidebar:i,secondarySidebar:a,notices:o,content:l,drawer:c,actions:d,labels:u,className:p,shortcuts:h}=e;const m=(0,f.__unstableUseNavigateRegions)(h);!function(e){(0,s.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("nfd-interface-interface-skeleton__html-container");const g={ /* translators: accessibility text for the nav bar landmark region. */ drawer:(0,S.__)("Drawer","wp-module-onboarding"), /* translators: accessibility text for the top bar landmark region. */ @@ -94,4 +94,4 @@ sidebar:(0,S.__)("Settings","wp-module-onboarding"), /* translators: accessibility text for the publish landmark region. */ actions:(0,S.__)("Publish","wp-module-onboarding"), /* translators: accessibility text for the footer landmark region. */ -footer:(0,S.__)("Footer","wp-module-onboarding"),...u};return(0,s.createElement)("div",(0,it.Z)({},m,{ref:(0,K.useMergeRefs)([t,m.ref]),className:ee()(p,"nfd-interface-interface-skeleton",m.className,!!n&&"has-footer")}),!!c&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__drawer",role:"region","aria-label":g.drawer,tabIndex:"-1"},c),(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__editor"},!!r&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__header",role:"region","aria-label":g.header,tabIndex:"-1"},r),(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__body"},!!a&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":g.secondarySidebar,tabIndex:"-1"},a),!!o&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__notices"},o),(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__content",role:"region","aria-label":g.body,tabIndex:"-1"},l),!!i&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__sidebar",role:"region","aria-label":g.sidebar,tabIndex:"-1"},i),!!d&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__actions",role:"region","aria-label":g.actions,tabIndex:"-1"},d))),!!n&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__footer",role:"region","aria-label":g.footer,tabIndex:"-1"},n))}));var ot=i(7207),lt=i(5087);const st=()=>{const e=(0,b.TH)(),t=(0,K.useViewportMatch)("medium"),r=(0,A.kebabCase)(e.pathname),{isDrawerOpen:i,newfoldBrand:a,onboardingFlow:o,currentData:l,socialData:u,firstStep:p,allSteps:h}=(0,w.useSelect)((e=>({isDrawerOpen:e(c.h).isDrawerOpened(),newfoldBrand:e(c.h).getNewfoldBrand(),onboardingFlow:e(c.h).getOnboardingFlow(),currentData:e(c.h).getCurrentOnboardingData(),socialData:e(c.h).getOnboardingSocialData(),firstStep:e(c.h).getFirstStep(),allSteps:e(c.h).getAllSteps()})),[e.pathname]),[m,g]=(0,s.useState)(!1),[_,y]=(0,s.useState)(!1),[E,S]=(0,s.useState)(!1),{setActiveStep:x,setActiveFlow:N,updateAllSteps:T,flushQueue:D,enqueueRequest:P,setOnboardingSocialData:I,setCurrentOnboardingData:O}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{document.body.classList.add(`nfd-brand-${a}`)}),[a]),(0,s.useEffect)((()=>{(async function(){const t=(null==e?void 0:e.pathname)===(null==p?void 0:p.path);if(l&&!t&&!m){if(g(!0),E&&await async function(){const{address:e}=l.storeDetails;let t={};void 0!==e&&(delete e.country,delete e.state,t=e),(0,He.xb)(t)||await(0,He.Hs)(t),delete l.storeDetails.address,delete l.storeDetails.tax,S(!1)}(),_){const e=await async function(){const e=await(0,v.Gw)(),t=await(0,v.I2)(u);return y(!1),null!==(null==t?void 0:t.error)?null==e?void 0:e.body:null==t?void 0:t.body}();e&&I(e)}D(),P(n.Az.SET_FLOW,(()=>(0,d.kB)(l))),g(!1)}null!=e&&e.pathname.includes("basic-info")&&y(!0),null!=e&&e.pathname.includes("ecommerce")&&S(!0)})(),(()=>{var t;const n=null===(t=window.nfdOnboarding)||void 0===t?void 0:t.previousStep;if("object"!=typeof n)return window.nfdOnboarding.previousStep={path:e.pathname,url:window.location.href},void ot.v.dispatchEvents(C.En);const r=n.path,i=n.url;if(r.includes("basic-info")){const e=l.data.blogName,t=l.data.blogDescription,n=l.data.siteLogo.url;e&&(0,k.tH)(new k.Z_(C.eM,e,{},i)),t&&(0,k.tH)(new k.Z_(C.rX,t,{},i)),n&&(0,k.tH)(new k.Z_(C.L7,void 0,{},i));const r=Object.keys((0,lt.e)(u)).join(",");r&&(0,k.tH)(new k.Z_(C.Xm,r,{},i))}if(r.includes("site-pages")){var a;const e=null===(a=l.data.sitePages)||void 0===a?void 0:a.other;e&&!1!==e?(0,k.tH)(new k.Z_(C.ql,e.map((e=>e.title)),{count:e.length},i)):(0,k.tH)(new k.Z_(C.ql,[],{count:0},i))}if(r.includes("site-features")){const e=l.data.siteFeatures;for(const t in e)!1!==e[t]&&(0,k.tH)(new k.Z_(C.IV,t,{},i))}window.nfdOnboarding.previousStep={path:e.pathname,url:window.location.href},ot.v.dispatchEvents(C.En)})(),function(){if(null!=e&&e.pathname.includes("colors")||null!=e&&e.pathname.includes("typography")){const e=(0,z.Lb)(h,V.c.conditionalSteps);T(e.allSteps),l.data.customDesign||(l.data.customDesign=!0,O(l))}}(),e.pathname.includes("/step")&&(N(o),x(e.pathname))}),[e.pathname,o]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(Ue,{isActive:!0}),(0,s.createElement)(f.SlotFillProvider,null,(0,s.createElement)(at,{className:ee()("nfd-onboarding-skeleton",`brand-${a}`,`path-${r}`,{"is-drawer-open":i},{"is-large-viewport":t},{"is-small-viewport":!t}),header:(0,s.createElement)(L,null),drawer:(0,s.createElement)($e,null),content:(0,s.createElement)(Y,null),sidebar:(0,s.createElement)(Ve,null)})))},ct=()=>(0,s.createElement)(Ee,null,(0,s.createElement)(st,null));var dt=i(4704);n.dD?o()((()=>{ot.v.initialize({namespace:C.En,urls:{single:(0,dt.FZ)("events"),batch:(0,dt.FZ)("events/batch")},settings:{debounce:{time:3e3}}}),async function(e,t){var r;(0,u.S1)(),(0,p.S1)(),setInterval(g,45e3);const i=document.getElementById(e);var a;(0,w.dispatch)(c.h).setRuntime(t),null!==(r=t.previewSettings.settings.preRequisites)&&void 0!==r&&r.themes&&(0,w.dispatch)(c.h).updateThemeStatus(null===(a=t.previewSettings.settings.preRequisites)||void 0===a?void 0:a.themes[n.DY]);const o=await(0,d.ME)();null===o.error&&(o.body=(e=>{e.hasExited=0,e.isComplete=0;const t=window.nfdOnboarding.currentFlow;return e.data.chapters=B((0,Z.LI)(t),e.data.chapters),e})(o.body),(0,w.dispatch)(c.h).setCurrentOnboardingData(o.body)),null!==i&&void 0!==s.render?((0,s.render)((0,s.createElement)(ct,null),i),(0,v.j2)()):console.log("Could not find mount element or wp.element.render().")}(n.JB,window.nfdOnboarding),(0,l.registerCoreBlocks)()})):console.log("Cannot find Newfold Onboarding runtime data to set __webpack_public_path__.")})(),((window.newfold=window.newfold||{}).Onboarding=window.newfold.Onboarding||{}).onboarding=a})(); \ No newline at end of file +footer:(0,S.__)("Footer","wp-module-onboarding"),...u};return(0,s.createElement)("div",(0,at.Z)({},m,{ref:(0,X.useMergeRefs)([t,m.ref]),className:te()(p,"nfd-interface-interface-skeleton",m.className,!!n&&"has-footer")}),!!c&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__drawer",role:"region","aria-label":g.drawer,tabIndex:"-1"},c),(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__editor"},!!r&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__header",role:"region","aria-label":g.header,tabIndex:"-1"},r),(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__body"},!!a&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__secondary-sidebar",role:"region","aria-label":g.secondarySidebar,tabIndex:"-1"},a),!!o&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__notices"},o),(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__content",role:"region","aria-label":g.body,tabIndex:"-1"},l),!!i&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__sidebar",role:"region","aria-label":g.sidebar,tabIndex:"-1"},i),!!d&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__actions",role:"region","aria-label":g.actions,tabIndex:"-1"},d))),!!n&&(0,s.createElement)("div",{className:"nfd-interface-interface-skeleton__footer",role:"region","aria-label":g.footer,tabIndex:"-1"},n))}));var lt=i(5087);const st=()=>{const e=(0,b.TH)(),t=(0,X.useViewportMatch)("medium"),r=(0,A.kebabCase)(e.pathname),{isDrawerOpen:i,newfoldBrand:a,onboardingFlow:o,currentData:l,socialData:u,firstStep:p,allSteps:h}=(0,w.useSelect)((e=>({isDrawerOpen:e(c.h).isDrawerOpened(),newfoldBrand:e(c.h).getNewfoldBrand(),onboardingFlow:e(c.h).getOnboardingFlow(),currentData:e(c.h).getCurrentOnboardingData(),socialData:e(c.h).getOnboardingSocialData(),firstStep:e(c.h).getFirstStep(),allSteps:e(c.h).getAllSteps()})),[e.pathname]),[m,g]=(0,s.useState)(!1),[_,y]=(0,s.useState)(!1),[E,S]=(0,s.useState)(!1),{setActiveStep:x,setActiveFlow:N,updateAllSteps:T,flushQueue:D,enqueueRequest:P,setOnboardingSocialData:I,setCurrentOnboardingData:O}=(0,w.useDispatch)(c.h);return(0,s.useEffect)((()=>{document.body.classList.add(`nfd-brand-${a}`)}),[a]),(0,s.useEffect)((()=>{(async function(){const t=(null==e?void 0:e.pathname)===(null==p?void 0:p.path);if(l&&!t&&!m){if(g(!0),E&&await async function(){const{address:e}=l.storeDetails;let t={};void 0!==e&&(delete e.country,delete e.state,t=e),(0,Ue.xb)(t)||await(0,Ue.Hs)(t),delete l.storeDetails.address,delete l.storeDetails.tax,S(!1)}(),_){const e=await async function(){const e=await(0,v.Gw)(),t=await(0,v.I2)(u);return y(!1),null!==(null==t?void 0:t.error)?null==e?void 0:e.body:null==t?void 0:t.body}();e&&I(e)}D(),P(n.Az.SET_FLOW,(()=>(0,d.kB)(l))),g(!1)}null!=e&&e.pathname.includes("basic-info")&&y(!0),null!=e&&e.pathname.includes("ecommerce")&&S(!0)})(),(()=>{var t;const n=null===(t=window.nfdOnboarding)||void 0===t?void 0:t.previousStep;if("object"!=typeof n)return window.nfdOnboarding.previousStep={path:e.pathname,url:window.location.href},void J.v.dispatchEvents(C.En);const r=n.path,i=n.url;if(r.includes("basic-info")){const e=l.data.blogName,t=l.data.blogDescription,n=l.data.siteLogo.url;e&&(0,k.tH)(new k.Z_(C.eM,e,{},i)),t&&(0,k.tH)(new k.Z_(C.rX,t,{},i)),n&&(0,k.tH)(new k.Z_(C.L7,void 0,{},i));const r=Object.keys((0,lt.e)(u)).join(",");r&&(0,k.tH)(new k.Z_(C.Xm,r,{},i))}if(r.includes("site-pages")){var a;const e=null===(a=l.data.sitePages)||void 0===a?void 0:a.other;e&&!1!==e?(0,k.tH)(new k.Z_(C.ql,e.map((e=>e.title)),{count:e.length},i)):(0,k.tH)(new k.Z_(C.ql,[],{count:0},i))}if(r.includes("site-features")){const e=l.data.siteFeatures;for(const t in e)!1!==e[t]&&(0,k.tH)(new k.Z_(C.IV,t,{},i))}window.nfdOnboarding.previousStep={path:e.pathname,url:window.location.href},J.v.dispatchEvents(C.En)})(),function(){if(null!=e&&e.pathname.includes("colors")||null!=e&&e.pathname.includes("typography")){const e=(0,z.Lb)(h,V.c.conditionalSteps);T(e.allSteps),l.data.customDesign||(l.data.customDesign=!0,O(l))}}(),e.pathname.includes("/step")&&(N(o),x(e.pathname))}),[e.pathname,o]),(0,s.createElement)(s.Fragment,null,(0,s.createElement)(We,{isActive:!0}),(0,s.createElement)(f.SlotFillProvider,null,(0,s.createElement)(ot,{className:te()("nfd-onboarding-skeleton",`brand-${a}`,`path-${r}`,{"is-drawer-open":i},{"is-large-viewport":t},{"is-small-viewport":!t}),header:(0,s.createElement)(L,null),drawer:(0,s.createElement)(Ve,null),content:(0,s.createElement)(K,null),sidebar:(0,s.createElement)(He,null)})))},ct=()=>(0,s.createElement)(Se,null,(0,s.createElement)(st,null));var dt=i(4704);n.dD?o()((()=>{J.v.initialize({namespace:C.En,urls:{single:(0,dt.FZ)("events"),batch:(0,dt.FZ)("events/batch")},settings:{debounce:{time:3e3}}}),async function(e,t){var r;(0,u.S1)(),(0,p.S1)(),setInterval(g,45e3);const i=document.getElementById(e);var a;(0,w.dispatch)(c.h).setRuntime(t),null!==(r=t.previewSettings.settings.preRequisites)&&void 0!==r&&r.themes&&(0,w.dispatch)(c.h).updateThemeStatus(null===(a=t.previewSettings.settings.preRequisites)||void 0===a?void 0:a.themes[n.DY]);const o=await(0,d.ME)();null===o.error&&(o.body=(e=>{e.hasExited=0,e.isComplete=0;const t=window.nfdOnboarding.currentFlow;return e.data.chapters=B((0,Z.LI)(t),e.data.chapters),e})(o.body),(0,w.dispatch)(c.h).setCurrentOnboardingData(o.body)),null!==i&&void 0!==s.render?((0,s.render)((0,s.createElement)(ct,null),i),(0,v.j2)()):console.log("Could not find mount element or wp.element.render().")}(n.JB,window.nfdOnboarding),(0,l.registerCoreBlocks)()})):console.log("Cannot find Newfold Onboarding runtime data to set __webpack_public_path__.")})(),((window.newfold=window.newfold||{}).Onboarding=window.newfold.Onboarding||{}).onboarding=a})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fe40e3832..b0397dd4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@newfold-labs/wp-module-onboarding", - "version": "1.11.0", + "version": "1.11.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2ef9e979a..435871ac6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@newfold-labs/wp-module-onboarding", - "version": "1.11.0", + "version": "1.11.1", "description": "Next-generation WordPress Onboarding for WordPress sites at Newfold Digital.", "license": "GPL-2.0-or-later", "private": true, diff --git a/src/OnboardingSPA/components/StateHandlers/Flow/index.js b/src/OnboardingSPA/components/StateHandlers/Flow/index.js index d3f79a27d..865602156 100644 --- a/src/OnboardingSPA/components/StateHandlers/Flow/index.js +++ b/src/OnboardingSPA/components/StateHandlers/Flow/index.js @@ -25,6 +25,7 @@ import { ECOMMERCE_FLOW } from '../../../data/flows/constants'; import { getQueryParam, removeQueryParam } from '../../../utils'; import { commerce } from '../../../chapters/commerce'; import EcommerceStepLoader from '../../Loaders/Step/Ecommerce'; +import { HiiveAnalytics } from '@newfold-labs/js-utility-ui-analytics'; const FlowStateHandler = ( { children } ) => { const location = useLocation(); @@ -70,16 +71,20 @@ const FlowStateHandler = ( { children } ) => { if ( retries >= MAX_RETRIES_FLOW_SWITCH ) { return setNewFlow( false ); } - const response = switchFlow( flow ); + const response = await switchFlow( flow ); if ( response?.error ) { retries = retries + 1; return handleCommerceFlow( flow, retries ); } + await HiiveAnalytics.dispatchEvents(); // TODO: Remove code below once Chapter Prioritization is enabled. const firstEcommerceStep = commerce.steps[ 0 ]; const fragment = getFragment( window.location.href ); - const redirect = removeQueryParam( window.location.href, 'flow' ).replace( fragment, '' ); + const redirect = removeQueryParam( + window.location.href, + 'flow' + ).replace( fragment, '' ); window.location.replace( `${ redirect }#${ firstEcommerceStep.path }` ); window.location.reload(); };