var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
  let window = _____WB$wombat$assign$function_____("window");
  let self = _____WB$wombat$assign$function_____("self");
  let document = _____WB$wombat$assign$function_____("document");
  let location = _____WB$wombat$assign$function_____("location");
  let top = _____WB$wombat$assign$function_____("top");
  let parent = _____WB$wombat$assign$function_____("parent");
  let frames = _____WB$wombat$assign$function_____("frames");
  let opener = _____WB$wombat$assign$function_____("opener");

"use strict";(globalThis.webpackChunkcalypso=globalThis.webpackChunkcalypso||[]).push([[51830],{"./components/data/query-site-domains/index.jsx":(e,t,s)=>{s.d(t,{Z:()=>l});var i=s("../node_modules/prop-types/index.js"),o=s.n(i),n=s("../node_modules/react/index.js"),r=s("../node_modules/react-redux/es/index.js"),a=s("./state/sites/domains/actions.js"),p=s("./state/sites/domains/selectors.js");function l({siteId:e}){const t=(0,r.I0)();return(0,n.useEffect)((()=>{t((e=>(t,s)=>{e&&!(0,p.JZ)(s(),e)&&t((0,a.Pz)(e))})(e))}),[t,e]),null}l.propTypes={siteId:o().number.isRequired}},"./components/loading-ellipsis/index.tsx":(e,t,s)=>{s.d(t,{Q:()=>r});var i=s("../node_modules/classnames/index.js"),o=s.n(i),n=s("../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");function r({className:e}){return(0,n.BX)("div",{className:o()("wpcom__loading-ellipsis",e),children:[(0,n.tZ)("div",{}),(0,n.tZ)("div",{}),(0,n.tZ)("div",{}),(0,n.tZ)("div",{})]})}},"./components/olark-chat/index.jsx":(e,t,s)=>{s.d(t,{Z:()=>h});var i=s("../node_modules/react/index.js"),o=s("../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");class n extends i.Component{componentDidMount(){const{identity:e,shouldDisablePreChatSurvey:t,systemsGroupId:s}=this.props,i=document.createElement("script");i.setAttribute("id","olark-chat"),i.setAttribute("type","text/javascript"),i.setAttribute("async",!0),i.innerHTML=`\n\t\t\t;(function(o,l,a,r,k,y){if(o.olark)return; r="script";y=l.createElement(r);r=l.getElementsByTagName(r)[0]; y.async=1;y.src="//"+a;r.parentNode.insertBefore(y,r); y=o.olark=function(){k.s.push(arguments);k.t.push(+new Date)}; y.extend=function(i,j){y("extend",i,j)}; y.identify=function(i){y("identify",k.i=i)}; y.configure=function(i,j){y("configure",i,j);k.c[i]=j}; k=y._={s:[],t:[+new Date],c:{},l:a}; })(window,document,"static.olark.com/jsclient/loader.js");\n\t\t\tolark.identify('${e}');\n\t\t`,t&&(i.innerHTML+='\n\t\t\t\tolark.configure("features.prechat_survey", false);\n\t\t\t'),s&&(i.innerHTML+=`\n\t\t\t\tolark.configure('system.group', '${s}'); \n\t\t\t`),document.getElementById("olark-chat-container").appendChild(i)}shouldComponentUpdate(){return!1}render(){return(0,o.tZ)("div",{id:"olark-chat-container"})}}const r=n;var a=s("../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),p=s("../packages/calypso-config/src/index.ts"),l=s("./lib/logstash/index.ts");class c extends i.Component{constructor(...e){super(...e),(0,a.Z)(this,"state",{error:null})}componentDidCatch(e){this.setState({error:e}),(0,l.C)({feature:"calypso_client",message:"Olark widget error",severity:"production"===(0,p.ZP)("env_id")?"error":"debug",extra:{env:(0,p.ZP)("env_id"),type:"olark_widget_error",message:String(e)}})}render(){return this.state.error?null:this.props.children}}const d=c,u=({identity:e,shouldDisablePreChatSurvey:t,systemsGroupId:s})=>(0,o.tZ)(d,{children:(0,o.tZ)(r,{identity:e,shouldDisablePreChatSurvey:t,systemsGroupId:s})});u.defaultProps={shouldDisablePreChatSurvey:!1,systemsGroupId:null};const h=u},"./lib/interval/use-interval.ts":(e,t,s)=>{s.d(t,{Y:()=>o});var i=s("../node_modules/react/index.js");function o(e,t){const s=(0,i.useRef)(e);(0,i.useEffect)((()=>{s.current=e}),[e]),(0,i.useEffect)((()=>{if(null===t||!1===t)return;const e=setInterval((()=>{s.current()}),t);return()=>clearInterval(e)}),[t])}},"./signup/index.web.js":(e,t,s)=>{s.r(t),s.d(t,{default:()=>nt});var i=s("../packages/i18n-utils/src/utils.ts"),o=s("../node_modules/page/page.js"),n=s.n(o),r=s("./controller/index.web.js"),a=s("../packages/calypso-config/src/index.ts"),p=s("../node_modules/lodash-es/isEmpty.js"),l=s("../node_modules/react/index.js"),c=s("../node_modules/store/dist/store.modern.js"),d=s.n(c),u=s("./lib/analytics/page-view.js"),h=s("./lib/paths/index.js"),g=s("./lib/route/path.ts"),m=s("./signup/config/flows.js"),w=s("./state/current-user/selectors.js"),S=s("./state/signup/actions.js"),f=s("./state/signup/dependency-store/selectors.js"),_=s("./state/signup/flow/actions.js"),Z=s("./state/signup/flow/selectors.js"),y=s("./state/signup/progress/selectors.ts"),N=s("./state/signup/steps/site-type/actions.js"),v=s("./state/signup/steps/site-type/selectors.js"),x=s("./state/signup/steps/site-vertical/actions.js"),j=s("./state/signup/steps/site-vertical/selectors.js"),b=s("./state/sites/actions.js"),I=s("./state/sites/selectors/get-site-id.js"),k=s("./state/ui/actions/set-sites.js"),D=s("./state/ui/layout-focus/actions.js");const F={art:"p60",poetry:"p311",movie:"p274a1",music:"p275",car:"p99",business:"p94",school:"p3v1",family:"p160",health:"p201",fitness:"p172a1",food:"p23",photo:"p29",game:"p185",home:"p25",law:"p238",politics:"p313",news:"p281",finance:"p172",science:"p348",sport:"p371",fashion:"p19",tech:"p383",code:"p108a1",video:"p399",travel:"p34"},P=e=>{const t=String(e||"").toLowerCase();return F[t]||""};var T=s("./signup/config/step-components.js"),L=s("../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),C=s("../packages/calypso-products/src/is-domain-registration.ts"),z=s("../packages/calypso-products/src/is-domain-transfer.ts"),E=s("../packages/calypso-products/src/is-domain-mapping.ts"),B=s("../packages/design-picker/src/utils/available-designs.ts"),q=s("../node_modules/debug/src/browser.js"),R=s.n(q),H=s("../node_modules/lodash-es/clone.js"),U=s("../node_modules/lodash-es/map.js"),M=s("../node_modules/lodash-es/includes.js"),$=s("../node_modules/lodash-es/get.js"),O=s("../node_modules/lodash-es/startsWith.js"),W=s("../node_modules/lodash-es/pick.js"),A=s("../node_modules/lodash-es/isEqual.js"),G=s("../node_modules/lodash-es/defer.js"),Q=s("../node_modules/lodash-es/find.js"),X=s("../node_modules/lodash-es/omit.js"),Y=s("../node_modules/lodash-es/kebabCase.js"),V=s("../node_modules/react-redux/es/index.js"),K=s("./components/data/document-head/index.jsx"),J=s("./components/data/query-site-domains/index.jsx"),ee=s("./components/locale-suggestions/index.jsx"),te=s("./components/olark-chat/index.jsx"),se=s("./lib/analytics/signup.js"),ie=s("./lib/oauth-token/index.js"),oe=s("../node_modules/lodash-es/forEach.js"),ne=s("../node_modules/lodash-es/difference.js"),re=s("../node_modules/lodash-es/keys.js"),ae=s("../node_modules/lodash-es/flatMap.js"),pe=s("../node_modules/lodash-es/filter.js"),le=s("../node_modules/lodash-es/reject.js"),ce=s("../node_modules/lodash-es/reduce.js"),de=s("./lib/analytics/tracks.js"),ue=s("./lib/wp/browser.js"),he=s("./signup/config/steps.js"),ge=s("./signup/utils.js"),me=s("./state/selectors/get-current-locale-slug.js"),we=s("./state/signup/progress/actions.js"),Se=s("./state/sites/selectors/get-site-slug.js");const fe=R()("calypso:signup"),_e=he.Z;class Ze{constructor(e){(0,L.Z)(this,"_flow",void 0),(0,L.Z)(this,"_flowName",void 0),(0,L.Z)(this,"_onComplete",void 0),(0,L.Z)(this,"_processingSteps",new Set),(0,L.Z)(this,"_reduxStore",void 0),(0,L.Z)(this,"_unsubscribeStore",void 0);const t=(0,w.Pc)(e.reduxStore.getState());this._flow=m.Z.getFlow(e.flowName,t),this._flowName=e.flowName,this._onComplete=e.onComplete,this._reduxStore=e.reduxStore,this.changeFlowName(e.flowName);try{this._assertFlowHasValidDependencies()}catch(e){if(fe("Invalid dependencies in flow : "+e.message),this._flowName!==m.Z.defaultFlowName)return void n()((0,ge.D7)());throw e}if(this._unsubscribeStore=this._reduxStore.subscribe(function(e,t){let s=(0,y.y)(e.getState());return()=>{const i=(0,y.y)(e.getState());i!==s&&(s=i,t(i))}}(this._reduxStore,this._process.bind(this))),this._resetStoresIfProcessing(),this._resetStoresIfUserHasLoggedIn(),this._resetSiteSlugIfUserEnteredAnotherFlow(),this._flow.providesDependenciesInQuery?.includes("siteId")&&e.providedDependencies.siteId&&!e.providedDependencies.siteSlug){const t=(0,Se.Z)(this._reduxStore.getState(),e.providedDependencies.siteId);t&&(e.providedDependencies.siteSlug=t)}if(this._flow.providesDependenciesInQuery||e.providedDependencies)this._assertFlowProvidedDependenciesFromConfig(e.providedDependencies),this._reduxStore.dispatch((0,S.hv)(e.providedDependencies));else{const e=this._getStoredDependencies();(0,p.Z)(e)||this._reduxStore.dispatch((0,S.hv)(e))}}_resetStoresIfProcessing(){(0,Q.Z)((0,y.y)(this._reduxStore.getState()),{status:"processing"})&&this.reset()}_resetStoresIfUserHasLoggedIn(){(0,w.Pc)(this._reduxStore.getState())&&(0,Q.Z)((0,y.y)(this._reduxStore.getState()),{stepName:"user"})&&this.reset()}_resetSiteSlugIfUserEnteredAnotherFlow(){if(!(0,f.D)(this._reduxStore.getState()).siteSlug)return;const e=(0,Z.nf)(this._reduxStore.getState()),t=(0,Z.sP)(this._reduxStore.getState()),s=e=>{let t=!1;const s=(0,w.Pc)(this._reduxStore.getState());return(0,oe.Z)((0,W.Z)(_e,m.Z.getFlow(e,s).steps),(e=>{if((e.providesDependencies||[]).indexOf("siteSlug")>-1)return t=!0,!1})),t};e!==t&&!s(e)&&s(t)&&this._reduxStore.dispatch((0,S.aO)())}_assertFlowProvidedDependenciesFromConfig(e){const t=(0,ne.Z)(this._flow.providesDependenciesInQuery,this._flow.optionalDependenciesInQuery||[],(0,re.Z)(e));if(t.length>0)throw new Error(this._flowName+" did not provide the query dependencies ["+t+"] it is configured to.")}_assertFlowHasValidDependencies(){(0,oe.Z)((0,W.Z)(_e,this._getFlowSteps()),(e=>{if(!e.dependencies)return;const t=(0,re.Z)((0,W.Z)((0,f.D)(this._reduxStore.getState()),e.dependencies)),s=(0,ne.Z)(e.dependencies,t,this._getFlowProvidesDependencies());if(s.length>0)throw new Error("The "+e.stepName+" step requires dependencies ["+s+"] which are not provided in the "+this._flowName+" flow and are not already present in the store.")}))}_assertFlowProvidedRequiredDependencies(){const e=(0,re.Z)((0,f.D)(this._reduxStore.getState()));(0,oe.Z)((0,W.Z)(_e,this._getFlowSteps()),(t=>{if(!t.providesDependencies)return;const s=t.optionalDependencies||[],i=(0,ne.Z)(t.providesDependencies,s,e);if(i.length>0)throw new Error("The dependencies ["+i+"] were listed as provided by the "+t.stepName+" step but were not provided by it [ current flow: "+this._flowName+" ].")}))}_canMakeAuthenticatedRequests(){return ue.Z.isTokenLoaded()||(0,w.Pc)(this._reduxStore.getState())}_getFlowSteps(){if(!this._flow.enableBranchSteps)return this._flow.steps;const e=(0,w.Pc)(this._reduxStore.getState());return m.Z.getFlow(this._flowName,e).steps}_getFlowProvidesDependencies(){return(0,ae.Z)(this._getFlowSteps(),(e=>_e&&_e[e]&&_e[e].providesDependencies||[])).concat(this._flow.providesDependenciesInQuery||[])}_process(){const e=this._getFlowSteps(),t=(0,pe.Z)((0,y.y)(this._reduxStore.getState()),(t=>(0,M.Z)(e,t.stepName))),s=(0,pe.Z)(t,{status:"pending"}),i=(0,pe.Z)(t,{status:"completed"}),o=(0,f.D)(this._reduxStore.getState());o.bearer_token&&!ue.Z.isTokenLoaded()&&ue.Z.loadToken(o.bearer_token);for(const e of s)this._processStep(e);i.length===e.length&&void 0!==this._onComplete&&(this._assertFlowProvidedRequiredDependencies(),(0,G.Z)((()=>this._onComplete(o,this._destination(o)))))}_canProcessStep(e){const{dependencies:t=[],providesToken:s}=_e[e.stepName],i=this._findDependencies(e.stepName,"dependencies"),o=t.length===(0,re.Z)(i).length,n=this._getFlowSteps(),r=(0,pe.Z)((0,y.y)(this._reduxStore.getState()),(({stepName:e})=>(0,M.Z)(n,e))),a=(0,le.Z)(r,{status:"in-progress"}).length===n.length,p=(0,f.D)(this._reduxStore.getState())?.allowUnauthenticated??!1;return o&&(p||s||this._canMakeAuthenticatedRequests())&&(!_e[e.stepName].delayApiRequestUntilComplete||a)}_processStep(e){if(this._processingSteps.has(e.stepName)||!this._canProcessStep(e))return;this._processingSteps.add(e.stepName);const t=this._findDependencies(e.stepName,"dependencies"),s=this._findDependencies(e.stepName,"optionalDependencies");if(e?.isPasswordlessSignupForm)return this._processingSteps.delete(e.stepName),(0,de.recordTracksEvent)("calypso_signup_actions_complete_step",{step:e.stepName,flow:this._flowName}),void this._reduxStore.dispatch((0,we.le)(e,t));(0,G.Z)((()=>{this._reduxStore.dispatch((0,we.zf)(e))}));const i=_e[e.stepName].apiRequestFunction;i&&i(((t,s)=>{if(this._processingSteps.delete(e.stepName),t)this._reduxStore.dispatch((0,we.Us)(e,t));else{const{intent:t}=(0,f.D)(this._reduxStore.getState());(0,de.recordTracksEvent)("calypso_signup_actions_complete_step",{step:e.stepName,flow:this._flowName,intent:t}),this._reduxStore.dispatch((0,we.le)(e,s))}}),{...t,...s},e,this._reduxStore)}_findDependencies(e,t="dependencies"){const s=(0,f.D)(this._reduxStore.getState()),i=_e[e],o=i?i[t]:void 0;return(0,W.Z)(s,o??[])}_destination(e){if("function"==typeof this._flow.destination){const t=(0,me.Z)(this._reduxStore.getState());return this._flow.destination(e,t)}return this._flow.destination}_getStoredDependencies(){const e=(0,ae.Z)(this._getFlowSteps(),(e=>_e&&_e[e]&&_e[e].providesDependencies||[]));return(0,ce.Z)((0,y.y)(this._reduxStore.getState()),((t,s)=>({...t,...(0,W.Z)(s.providedDependencies,e)})),{})}reset(){this._reduxStore.dispatch((0,S.Eq)()),this._reduxStore.dispatch((0,_.Gl)())}cleanup(){this._unsubscribeStore&&this._unsubscribeStore()}changeFlowName(e){const t=this._reduxStore.getState(),s=(0,w.Pc)(t);this._flow.enableBranchSteps?m.Z.excludeSteps((0,Z.BS)(t)):m.Z.resetExcludedSteps(),this._flowName=e,this._flow=m.Z.getFlow(e,s)}getDestination(){const e=(0,f.D)(this._reduxStore.getState());return this._destination(e)}}var ye=s("../node_modules/classnames/index.js"),Ne=s.n(ye),ve=s("../packages/i18n-calypso/src/localize.js"),xe=s("../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");const je=(0,ve.Z)((({flowLength:e,positionInFlow:t,translate:s,flowName:i})=>{if(e>1){const o=Ne()("flow-progress-indicator",`flow-progress-indicator__${i}`);return(0,xe.tZ)("div",{className:o,children:s("Step %(stepNumber)d of %(stepTotal)d",{args:{stepNumber:t+1,stepTotal:e}})})}return null}));var be=s("../packages/i18n-calypso/src/use-translate.js");const Ie=function({signupSiteName:e=""}){const t=(0,be.Z)();return(0,xe.BX)("div",{className:"p2-processing-screen",children:[(0,xe.tZ)("div",{className:"p2-processing-screen__logo",children:(0,xe.tZ)("img",{src:"/calypso/images/p2/logo-white.png",width:"67",height:"32",alt:"P2 logo"})}),(0,xe.BX)("div",{className:"p2-processing-screen__container",children:[(0,xe.tZ)("div",{className:"p2-processing-screen__spinner"}),(0,xe.tZ)("div",{className:"p2-processing-screen__text",children:t("{{h2}}Hooray!{{/h2}}",{components:{h2:(0,xe.tZ)("h2",{})}})}),(0,xe.tZ)("div",{className:"p2-processing-screen__text",children:t('{{p}}Your workspace "%(signupSiteName)s" is almost ready.{{/p}}',{components:{p:(0,xe.tZ)("p",{})},args:{signupSiteName:e}})})]}),(0,xe.BX)("div",{className:"p2-processing-screen__footer",children:[(0,xe.tZ)("img",{src:"/calypso/images/p2/w-logo-white.png",className:"p2-processing-screen__w-logo",alt:"WP.com logo"}),(0,xe.tZ)("span",{className:"p2-processing-screen__footer-text",children:t("Powered by WordPress.com")})]})]})};var ke=s("../packages/components/src/gridicon/index.tsx");class De extends l.Component{renderFloaties(){return(0,xe.BX)("div",{className:"signup-processing-screen__floaties",children:[(0,xe.tZ)(ke.Z,{icon:"add",size:64}),(0,xe.tZ)(ke.Z,{icon:"aside",size:64}),(0,xe.tZ)(ke.Z,{icon:"attachment",size:64}),(0,xe.tZ)(ke.Z,{icon:"audio",size:64}),(0,xe.tZ)(ke.Z,{icon:"bell",size:64}),(0,xe.tZ)(ke.Z,{icon:"book",size:64}),(0,xe.tZ)(ke.Z,{icon:"camera",size:64}),(0,xe.tZ)(ke.Z,{icon:"comment",size:64}),(0,xe.tZ)(ke.Z,{icon:"globe",size:64}),(0,xe.tZ)(ke.Z,{icon:"pencil",size:64}),(0,xe.tZ)(ke.Z,{icon:"phone",size:64}),(0,xe.tZ)(ke.Z,{icon:"reader",size:64}),(0,xe.tZ)(ke.Z,{icon:"star",size:64}),(0,xe.tZ)(ke.Z,{icon:"video",size:64}),(0,xe.tZ)(ke.Z,{icon:"align-image-right",size:64}),(0,xe.tZ)(ke.Z,{icon:"bookmark",size:64}),(0,xe.tZ)(ke.Z,{icon:"briefcase",size:64}),(0,xe.tZ)(ke.Z,{icon:"calendar",size:64}),(0,xe.tZ)(ke.Z,{icon:"clipboard",size:64}),(0,xe.tZ)(ke.Z,{icon:"cloud-upload",size:64}),(0,xe.tZ)(ke.Z,{icon:"cog",size:64}),(0,xe.tZ)(ke.Z,{icon:"customize",size:64}),(0,xe.tZ)(ke.Z,{icon:"help",size:64}),(0,xe.tZ)(ke.Z,{icon:"link",size:64}),(0,xe.tZ)(ke.Z,{icon:"lock",size:64}),(0,xe.tZ)(ke.Z,{icon:"pages",size:64}),(0,xe.tZ)(ke.Z,{icon:"share",size:64}),(0,xe.tZ)(ke.Z,{icon:"stats",size:64})]})}getTitle(){return"domain"===this.props.flowName?this.props.translate("We are preparing the domain for purchase…"):this.props.translate("{{strong}}Hooray!{{/strong}} Your site will be ready shortly.",{components:{strong:(0,xe.tZ)("strong",{}),br:(0,xe.tZ)("br",{})},comment:"The second line after the breaking tag {{br/}} should fit unbroken in 384px and greater and have a max of 30 characters."})}render(){return(0,xe.BX)("div",{children:[this.renderFloaties(),(0,xe.tZ)("div",{className:"signup-processing-screen__content",children:(0,xe.tZ)("p",{className:"signup-processing-screen__title",children:this.getTitle()})})]})}}const Fe=(0,ve.Z)(De);var Pe=s("../node_modules/@wordpress/i18n/build-module/index.js"),Te=s("../node_modules/@wordpress/react-i18n/build-module/index.js"),Le=s("./components/loading-ellipsis/index.tsx"),Ce=s("./lib/interval/use-interval.ts");const ze=["setup-site","do-it-for-me"];function Ee(e){const{__:t}=(0,Te.QT)(),s=(({flowName:e,hasPaidDomain:t,isDestinationSetupSiteFlow:s})=>{const{__:i}=(0,Te.QT)();let o=[];switch(e){case"launch-site":o=[{title:i("Your site will be live shortly.")}];break;case"domain":o=[{title:i("Preparing your domain")}];break;case"site-content-collection":o=[{title:i("Saving your content")},{title:i("Closing the loop")}];break;default:o=[!s&&{title:i("Building your site")},t&&{title:i("Getting your domain")},!s&&{title:i("Applying design")}]}return ze.includes(e)&&(o=[{title:i("Laying the foundations"),duration:7e3},{title:i("Turning on the lights"),duration:3e3},{title:i("Making it beautiful"),duration:4e3},{title:i("Personalizing your site"),duration:7e3},{title:i("Sprinkling some magic"),duration:4e3},{title:i("Securing your data"),duration:9e3},{title:i("Enabling encryption"),duration:3e3},{title:i("Optimizing your content"),duration:6e3},{title:i("Applying a shiny top coat"),duration:4e3},{title:i("Closing the loop")}]),(0,l.useRef)(o.filter(Boolean))})(e),{isDestinationSetupSiteFlow:i,flowName:o}=e,n=s.current.length,r=i||ze.includes(o),[a,p]=(0,l.useState)(0),c=6e3/n,d=s.current[a]?.duration||c,u=(a+1)/n,h=u>=1;(0,Ce.Y)((()=>p((e=>e+1))),h?null:d);const[g,m]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const e=setTimeout((()=>m(!0)),750);return()=>clearTimeout(e)}),[]),(0,xe.BX)("div",{className:Ne()("reskinned-processing-screen",{"is-force-centered":r&&0===n}),children:[(0,xe.tZ)("h1",{className:"reskinned-processing-screen__progress-step",children:s.current[a]?.title}),r&&(0,xe.tZ)(Le.Q,{}),!r&&(0,xe.BX)(xe.HY,{children:[(0,xe.tZ)("div",{className:"reskinned-processing-screen__progress-bar",style:{"--progress":g?u:.1}}),n>1&&(0,xe.tZ)("p",{className:"reskinned-processing-screen__progress-numbered-steps",children:(0,Pe.gB)(t("Step %(currentStep)d of %(totalSteps)d"),{currentStep:a+1,totalSteps:n})})]})]})}var Be=s("./signup/signup-header/index.jsx"),qe=s("./state/analytics/actions/load-tracking-tool.js"),Re=s("./state/current-user/constants.js"),He=s("./state/selectors/is-domain-only-site.js"),Ue=s("./state/selectors/is-user-registration-days-within-range.js"),Me=s("./state/signup/steps/survey/actions.js"),$e=s("./state/sites/domains/selectors.js"),Oe=s("./state/sites/selectors/is-current-plan-paid.js"),We=s("./state/sites/selectors/get-site-plan.ts");function Ae(e,t){return(0,We.Z)(e,t)?.product_name_short??null}var Ge=s("./state/sites/selectors/get-site-plan-slug.js"),Qe=s("./state/ui/selectors/get-selected-site-id.js"),Xe=s("./signup/storageUtils.js"),Ye=s("./signup/wpcom-login-form/index.jsx");const Ve=R()("calypso:signup");class Ke extends l.Component{constructor(...e){super(...e),(0,L.Z)(this,"state",{controllerHasReset:!1,shouldShowLoadingScreen:!1,resumingStep:void 0,previousFlowName:null,signupSiteName:null}),(0,L.Z)(this,"handleSignupFlowControllerCompletion",(async(e,t)=>{const s=(0,ge.Y3)(t,e,this.props.flowName,this.props.localeSlug);return t!==s&&((0,Xe.r6)(t),(0,Xe.I5)(e.siteSlug),(0,Xe.Iv)(this.props.flowName)),this.handleFlowComplete(e,s)})),(0,L.Z)(this,"updateShouldShowLoadingScreen",((e=this.props.progress)=>{const t=!!(0,ge.Fc)(this.props.flowName,e,this.props.isLoggedIn),s=!t&&this.isEveryStepSubmitted(e)&&!this.state.shouldShowLoadingScreen;this.isEveryStepSubmitted(e)||this.goToFirstInvalidStep(e),s&&((0,se.recordSignupProcessingScreen)(this.props.flowName,this.props.stepName,this.getRecordProps()),this.setState({shouldShowLoadingScreen:!0}),(0,ge.ww)(this.props.flowName)&&(this.state.signupSiteName||this.setState({signupSiteName:this.props.progress?.["p2-site"]?.form?.siteTitle?.value||""}),document&&document.body.classList.add("has-loading-screen-signup"),it())),t&&(this.setState({shouldShowLoadingScreen:!1}),(0,ge.ww)(this.props.flowName)&&document&&document.body.classList.remove("has-loading-screen-signup"))})),(0,L.Z)(this,"processFulfilledSteps",((e,t)=>{const s=he.Z[e].fulfilledStepCallback,i=he.Z[e].defaultDependencies;s&&s(e,i,t)})),(0,L.Z)(this,"removeFulfilledSteps",(e=>{const{flowName:t,isLoggedIn:s,stepName:i}=e,o=m.Z.getFlow(t,s).steps,n=(0,H.Z)(m.Z.excludedSteps);(0,U.Z)(n,(t=>this.processFulfilledSteps(t,e))),(0,U.Z)(o,(t=>this.processFulfilledSteps(t,e))),(0,M.Z)(m.Z.excludedSteps,i)&&this.goToNextStep(t)})),(0,L.Z)(this,"handleFlowComplete",((e,t)=>{Ve("The flow is completed. Destination: %s",t);const{isNewishUser:s,existingSiteCount:i}=this.props,o=!(!e||!e.username),n=e&&e.siteId,r=!!(o||s&&e&&e.siteSlug&&i<=1),a=function(e){return!(!e||!(e.cartItem||e.domainItem||e.themeItem))}(e),p=(0,$.Z)(e,"selectedDesign"),l=(0,$.Z)(e,"intent"),c=(0,$.Z)(e,"startingPoint"),d={isNewishUser:s,existingSiteCount:i,isNewUser:o,hasCartItems:a,isNew7DUserSite:r,flow:this.props.flowName,siteId:n,theme:p?.theme,intent:l,startingPoint:c};Ve("Tracking signup completion.",d),(0,se.recordSignupComplete)({flow:this.props.flowName,siteId:n,isNewUser:o,hasCartItems:a,isNew7DUserSite:r,theme:p?.theme,intent:l,startingPoint:c,isBlankCanvas:(0,B.Nf)(e.selectedDesign)}),this.handleLogin(e,t)})),(0,L.Z)(this,"loginRedirectTo",(e=>(0,O.Z)(e,"https://")||(0,O.Z)(e,"http://")?e:window.location.origin+e)),(0,L.Z)(this,"goToStep",((e,t,s=this.props.flowName)=>{if(e&&!this.isEveryStepSubmitted()){const i=this.props.isLoggedIn?"":this.props.locale,{siteId:o,siteSlug:r}=this.props.initialContext?.query??{};n()((0,ge.D7)(s,e,t,i,{siteId:o,siteSlug:r}))}else this.isEveryStepSubmitted()&&this.goToFirstInvalidStep()})),(0,L.Z)(this,"goToNextStep",((e=this.props.flowName)=>{const t=m.Z.getFlow(e,this.props.isLoggedIn).steps,s=t.indexOf(this.props.stepName),i=t[s+1],o=(0,$.Z)(this.props.progress,i),n=o&&o.stepSectionName||"";e!==this.props.flowName&&this.setState({previousFlowName:this.props.flowName}),this.goToStep(i,n,e)})),(0,L.Z)(this,"goToFirstInvalidStep",((e=this.props.progress)=>{const t=(0,ge.Fc)(this.props.flowName,e,this.props.isLoggedIn),{siteId:s,siteSlug:i}=this.props.initialContext?.query??{};if(t){if((0,se.recordSignupInvalidStep)(this.props.flowName,this.props.stepName),t.stepName===this.props.stepName)return void Ve(`Already navigated to the first invalid step: ${t.stepName}`);const e=this.props.isLoggedIn?"":this.props.locale;Ve(`Navigating to the first invalid step: ${t.stepName}`),n()((0,ge.D7)(this.props.flowName,t.stepName,"",e,{siteId:s,siteSlug:i}))}})),(0,L.Z)(this,"isEveryStepSubmitted",((e=this.props.progress)=>{const t=m.Z.getFlow(this.props.flowName,this.props.isLoggedIn).steps,s=(0,ge.EI)(this.props.flowName,e,{},this.props.isLoggedIn);return t.length===s.length}))}UNSAFE_componentWillMount(){const e=m.Z.getFlow(this.props.flowName,this.props.isLoggedIn),t=this.props.initialContext?.query??{};let s;if(e.providesDependenciesInQuery&&(s=(0,W.Z)(t,e.providesDependenciesInQuery)),this.props.isManageSiteFlow&&(s={siteSlug:(0,Xe.VH)(),isManageSiteFlow:this.props.isManageSiteFlow}),this.signupFlowController=new Ze({flowName:this.props.flowName,providedDependencies:s,reduxStore:this.props.store,onComplete:this.handleSignupFlowControllerCompletion}),this.removeFulfilledSteps(this.props),this.updateShouldShowLoadingScreen(),!(0,ge.hP)(this.props.flowName,this.props.progress,this.props.isLoggedIn)&&0!==this.getPositionInFlow()){const e=m.Z.getFlow(this.props.flowName,this.props.isLoggedIn).steps[0];this.setState({resumingStep:e});const t=this.props.isLoggedIn?"":this.props.locale;return n().redirect((0,ge.D7)(this.props.flowName,e,void 0,t))}}UNSAFE_componentWillReceiveProps(e){const{stepName:t,flowName:s,progress:i}=e;this.props.stepName!==t&&this.removeFulfilledSteps(e),t===this.state.resumingStep&&this.setState({resumingStep:void 0}),this.props.flowName!==s&&this.signupFlowController.changeFlowName(s),this.state.controllerHasReset||(0,A.Z)(this.props.progress,i)||this.updateShouldShowLoadingScreen(i),(0,ge.Nb)(s)?(document.body.classList.add("is-white-signup"),Ve("In componentWillReceiveProps, addded is-white-signup class")):(document.body.classList.remove("is-white-signup"),Ve("In componentWillReceiveProps, removed is-white-signup class"))}componentWillUnmount(){this.signupFlowController.cleanup()}componentDidMount(){Ve("Signup component mounted"),this.startTrackingForBusinessSite(),(0,se.recordSignupStart)(this.props.flowName,this.props.refParameter,this.getRecordProps()),this.state.shouldShowLoadingScreen||(0,se.recordSignupStep)(this.props.flowName,this.props.stepName,this.getRecordProps()),this.preloadNextStep()}componentDidUpdate(e){const{flowName:t,stepName:s,signupDependencies:i,sitePlanName:o,sitePlanSlug:n}=this.props;if(t===e.flowName&&s===e.stepName||this.state.shouldShowLoadingScreen||(0,se.recordSignupStep)(t,s,this.getRecordProps()),(0,$.Z)(i,"siteType")!==(0,$.Z)(e.signupDependencies,"siteType")&&this.startTrackingForBusinessSite(),s!==e.stepName&&(this.preloadNextStep(),this.scrollToTop()),n&&e.sitePlanSlug&&n!==e.sitePlanSlug&&(0,se.recordSignupPlanChange)(t,s,e.sitePlanName,e.sitePlanSlug,o,n),(0,ge.ww)(this.props.flowName)&&!this.props.isLoggedIn&&"user"!==s){Ve("P2 signup: logging in user",this.props.signupDependencies);const e=m.Z.getFlow(this.props.flowName,this.props.isLoggedIn).steps[1],t=(0,ge.D7)(this.props.flowName,e,void 0,this.props.locale);this.handleLogin(this.props.signupDependencies,t,!1)}}getRecordProps(){const{signupDependencies:e}=this.props;return{theme:(0,$.Z)(e,"selectedDesign.theme"),intent:(0,$.Z)(e,"intent"),starting_point:(0,$.Z)(e,"startingPoint")}}scrollToTop(){setTimeout((()=>window.scrollTo(0,0)),0)}completeP2FlowAfterLoggingIn(){if("p2v1"!==!this.props.flowName||!this.props.progress)return;const e=this.props.progress["p2-site"];e&&"pending"===e.status&&this.props.isLoggedIn&&(this.props.removeStep(e),this.props.addStep(e))}startTrackingForBusinessSite(){"business"===(0,$.Z)(this.props.signupDependencies,"siteType")&&this.props.loadTrackingTool("HotJar")}preloadNextStep(){const e=this.props.stepName,t=m.Z.getNextStepNameInFlow(this.props.flowName,e);t&&(0,T.z)(t)}handleLogin(e,t,s=!0){const i=this.props.isLoggedIn;if(Ve(`Logging you in to "${t}"`),s&&(this.signupFlowController.reset(),this.state.controllerHasReset||this.setState({controllerHasReset:!0})),i){if(/^https?:\/\//.test(t))return window.location.href=t;(0,G.Z)((()=>{Ve(`Redirecting you to "${t}"`),window.location.href=t}))}if(!i&&(a.ZP.isEnabled("oauth")||e.oauth2_client_id))return Ve("Handling oauth login"),ie.o4(e.bearer_token),void(window.location.href=t);if(!i&&!a.ZP.isEnabled("oauth")){Ve("Handling regular login");const{bearer_token:s,username:i}=e;if((0,p.Z)(s)&&(0,p.Z)(i)&&"onboarding-registrationless"===this.props.flowName)return void(window.location.href=t);this.state.bearerToken!==s&&this.state.username!==i&&(Ve("Performing regular login"),this.setState({bearerToken:e.bearer_token,username:e.username,redirectTo:this.loginRedirectTo(t)}))}}getPositionInFlow(){const{flowName:e,stepName:t}=this.props;return m.Z.getFlow(e,this.props.isLoggedIn).steps.indexOf(t)}getInteractiveStepsCount(){return m.Z.getFlow(this.props.flowName,this.props.isLoggedIn).steps.filter((e=>!he.Z[e].props?.nonInteractive)).length}renderProcessingScreen(e){if((0,ge.ww)(this.props.flowName))return(0,xe.tZ)(Ie,{signupSiteName:this.state.signupSiteName});if(e){const e=(0,$.Z)(this.props,"signupDependencies.domainItem",{}),t=(0,C.p)(e),s=this.signupFlowController.getDestination();return(0,xe.tZ)(Ee,{flowName:this.props.flowName,hasPaidDomain:t,isDestinationSetupSiteFlow:s.startsWith("/start/setup-site")})}return(0,xe.tZ)(Fe,{flowName:this.props.flowName})}renderCurrentStep(e){const t=(0,$.Z)(this.props,"signupDependencies.domainItem",!1),s=(0,Q.Z)(this.props.progress,{stepName:this.props.stepName}),i=this.props.stepComponent,o={...(0,X.Z)(this.props,"locale"),...he.Z[this.props.stepName].props},n=this.state.shouldShowLoadingScreen?"processing":this.props.stepName,r=m.Z.getFlow(this.props.flowName,this.props.isLoggedIn),a=this.props.domainsWithPlansOnly&&t&&((0,C.p)(t)||(0,z.m)(t)||(0,E.I)(t)),{siteId:p,siteSlug:l}=this.props.initialContext?.query??{},c=(0,$.Z)(this.props,"signupDependencies.shouldHideFreePlan",!1),d=a||this.props.isDomainOnlySite||c,u=0===this.getPositionInFlow()&&!this.props.isLoggedIn;let h=o;return this.props.isManageSiteFlow&&(h={...o,showExampleSuggestions:!1,showSkipButton:!0,includeWordPressDotCom:!1}),(0,xe.tZ)("div",{className:"signup__step",children:(0,xe.BX)("div",{className:`signup__step is-${(0,Y.Z)(this.props.stepName)}`,children:[u&&(0,xe.tZ)(ee.Z,{path:this.props.path,locale:this.props.locale}),this.state.shouldShowLoadingScreen?this.renderProcessingScreen(e):(0,xe.tZ)(i,{path:this.props.path,step:s,initialContext:this.props.initialContext,steps:r.steps,stepName:this.props.stepName,meta:r.meta||{},goToNextStep:this.goToNextStep,goToStep:this.goToStep,previousFlowName:this.state.previousFlowName,flowName:this.props.flowName,signupDependencies:this.props.signupDependencies,stepSectionName:this.props.stepSectionName,positionInFlow:this.getPositionInFlow(),hideFreePlan:d,isReskinned:e,queryParams:{siteId:p,siteSlug:l},...h})]})},n)}shouldWaitToRender(){const e=!(0,M.Z)(m.Z.getFlow(this.props.flowName,this.props.isLoggedIn).steps,this.props.stepName),t=this.props.isLoggedIn&&this.props.signupDependencies.siteSlug&&0===this.props.siteDomains.length,s="from"===this.props.flowName&&"importing"===this.props.stepName;return!!e||(t&&!s?(0,xe.tZ)(J.Z,{siteId:this.props.siteId}):void 0)}render(){if(!this.props.stepName||this.getPositionInFlow()>0&&0===this.props.progress.length||this.state.resumingStep)return null;const e=this.shouldWaitToRender();if(e&&!this.state.shouldShowLoadingScreen)return this.props.siteId&&e;const t=(0,ge.Nb)(this.props.flowName),s=(0,a.ZP)("olark_chat_identity"),i="onboarding"===this.props.flowName&&["en","en-gb"].includes(this.props.localeSlug)&&this.props.existingSiteCount<1;return(0,xe.BX)(xe.HY,{children:[(0,xe.BX)("div",{className:`signup is-${(0,Y.Z)(this.props.flowName)}`,children:[(0,xe.tZ)(K.Z,{title:this.props.pageTitle}),!(0,ge.ww)(this.props.flowName)&&(0,xe.tZ)(Be.Z,{shouldShowLoadingScreen:this.state.shouldShowLoadingScreen,isReskinned:t,rightComponent:(o=this.props.flowName,!["pressable-nux","setup-site","importer","domain"].includes(o)&&(0,xe.tZ)(je,{positionInFlow:this.getPositionInFlow(),flowLength:this.getInteractiveStepsCount(),flowName:this.props.flowName}))}),(0,xe.tZ)("div",{className:"signup__steps",children:this.renderCurrentStep(t)}),this.state.bearerToken&&(0,xe.tZ)(Ye.Z,{authorization:"Bearer "+this.state.bearerToken,log:this.state.username,redirectTo:this.state.redirectTo})]}),i&&(0,xe.tZ)(te.Z,{systemsGroupId:"2dfd76a39ce77758f128b93942ae44b5",identity:s,shouldDisablePreChatSurvey:!0})]});var o}}const Je=(0,V.$j)((e=>{const t=(0,f.D)(e),s=(0,Qe.Z)(e)||(0,I.Z)(e,t.siteSlug),i=(0,$e.eT)(e,s);return{domainsWithPlansOnly:!(0,w.ts)(e)||(0,w.A4)(e,Re.bZ),isDomainOnlySite:(0,He.Z)(e,s),progress:(0,y.y)(e),signupDependencies:t,isLoggedIn:(0,w.Pc)(e),isEmailVerified:(0,w.Y)(e),isNewishUser:(0,Ue.Z)(e,null,0,7),existingSiteCount:(0,w.bo)(e),isPaidPlan:(0,Oe.Z)(e,s),sitePlanName:Ae(e,s),sitePlanSlug:(0,Ge.Z)(e,s),siteDomains:i,siteId:s,siteType:(0,v.s)(e),localeSlug:(0,me.Z)(e)}}),{setSurvey:Me.p,submitSiteType:N.m,submitSiteVertical:x.P,submitSignupStep:we.TZ,removeStep:we.im,loadTrackingTool:qe.$,addStep:we.ZL})(Ke);let et,tt;const st=function(){document&&document.body.classList.remove("is-white-signup")},it=()=>{document&&document.body.classList.add("is-p2-signup")},ot={redirectTests(e,t){const s=(0,w.Pc)(e.store.getState()),i=(0,ge.Hl)(e.params,s);if((0,ge.Nb)(i))t();else if(e.pathname.indexOf("domain")>=0||e.pathname.indexOf("plan")>=0||e.pathname.indexOf("onboarding-registrationless")>=0||e.pathname.indexOf("wpcc")>=0||e.pathname.indexOf("launch-only")>=0||"account"===e.params.flowName||"crowdsignal"===e.params.flowName||"pressable-nux"===e.params.flowName||"clone-site"===e.params.flowName)st(),t();else{if(!e.pathname.includes("p2"))return void t();it(),st(),t()}},redirectWithoutLocaleIfLoggedIn(e,t){const s=(0,w.Pc)(e.store.getState());if(s&&e.params.lang){const t=(0,ge.Hl)(e.params,s),i=(0,ge.kK)(e.params),o=(0,ge.F5)(e.params);let r=(0,ge.D7)(t,i,o);return a.ZP.isEnabled("wpcom-user-bootstrap")?n().redirect(r):((0,p.Z)(e.query)||(r+="?"+e.querystring),(0,p.Z)(e.hash)||(r+="#"+e.hashstring),void(window.location=r))}t()},saveInitialContext(e,t){et||(et=Object.assign({},e)),t()},redirectToFlow(e,t){const s=(0,w.Pc)(e.store.getState()),i=(0,ge.Hl)(e.params,s),o=e.params.lang,r=s?"":d().get("signup-locale"),a=(0,y.y)(e.store.getState());if("user"===e.params.flowName){const t=(0,Z.sP)(e.store.getState());if(t&&t!==i&&(0,ge.hP)(t,a,s))return void(window.location=(0,ge.D7)(t,(0,ge.kK)(e.params),(0,ge.F5)(e.params),r)+(e.querystring?"?"+e.querystring:"")+(e.hashstring?"#"+e.hashstring:""))}if(!tt){const t=(0,Z.sP)(e.store.getState());t&&(tt=t,e.store.dispatch((0,_.AM)(tt)))}if(e.store.dispatch((0,_.iS)(i)),!s&&(0,ge.d)(i,s))return n().redirect((0,h.x4)({redirectTo:e.path}));if(s||o||!r||!(0,ge.hP)(i,a,s)){if(e.pathname!==(0,ge.vo)(e.params,s))return n().redirect((0,ge.vo)(e.params,s)+(e.querystring?"?"+e.querystring:""));d().set("signup-locale",o),t()}else window.location=(0,ge.D7)(i,(0,ge.kK)(e.params),(0,ge.F5)(e.params),r)+(e.querystring?"?"+e.querystring:"")+(e.hashstring?"#"+e.hashstring:"")},async start(e,t){const s=(0,w.Pc)(e.store.getState()),i=(0,g.n3)(e.path),o=(0,ge.Hl)(e.params,s),n=(0,ge.kK)(e.params),r=(0,ge.F5)(e.params),{providesDependenciesInQuery:a,excludeFromManageSiteFlows:p}=m.Z.getFlow(o,s);"woocommerce-install"===o&&(e?.query?.back_to&&e.store.dispatch((0,S.hv)({back_to:e.query.back_to})),et=e);const{query:c}=et,d=await(0,T.z)(n);(0,u.A)(i,"Signup > Start > "+o+" > "+n,{flow:o}),e.store.dispatch((0,D.Js)("content")),e.store.dispatch((0,_.iS)(o));const h=new URLSearchParams(window.location.search).has("ref");h&&(0,Xe.Gv)();const f=(0,Xe.sG)(),Z=(0,Xe.if)()===o,y=(0,Xe.sg)()&&f&&Z,N=!p&&!h&&y;a?.includes("siteId")||a?.includes("siteSlug")||N||e.store.dispatch((0,k.B)(null));const v=c&&c.ref;v&&e.store.dispatch((0,S.hv)({refParameter:v})),e.primary=(0,l.createElement)(Je,{store:e.store,path:e.path,initialContext:et,locale:e.params.lang,flowName:o,queryObject:c,refParameter:v,stepName:n,stepSectionName:r,stepComponent:d,pageTitle:(0,ge.t0)(o,s),isManageSiteFlow:N}),t()},setSelectedSiteForSignup(e,t){const{getState:s,dispatch:i}=e.store,o=(0,w.Pc)(s()),n=(0,ge.Hl)(e.params,o),r=(0,f.D)(s());let a;if(a="woocommerce-install"===n?e.query?.siteSlug||r?.siteSlug:r?.siteSlug||e.query?.siteSlug||r?.siteId||e.query?.siteId,!a)return void t();const p=(0,I.Z)(s(),a);p?(i((0,k.B)(p)),t()):i((0,b.LV)(a)).catch((()=>(t(),null))).then((()=>{let e=(0,I.Z)(s(),a);if(!e){const t=a.replace(/\.wordpress\.com$/,".wpcomstaging.com");e=(0,I.Z)(s(),t)}e&&i((0,k.B)(e)),t()}))},importSiteInfoFromQuery({store:e,query:t},s){const i=e.getState(),o=(0,j.Zp)(i),n=(0,j.wG)(i);!(0,v.s)(i)&&t.site_type&&e.dispatch((0,N._)(t.site_type)),o&&n||!t.vertical||e.dispatch((0,x._)({id:P(t.vertical)||t.vertical,isUserInput:!1})),s()}};function nt(){const e=(0,i.tU)();n()([`/start/${e}`,`/start/:flowName/${e}`,`/start/:flowName/:stepName/${e}`,`/start/:flowName/:stepName/:stepSectionName/${e}`],ot.redirectTests,ot.saveInitialContext,ot.redirectWithoutLocaleIfLoggedIn,ot.redirectToFlow,ot.setSelectedSiteForSignup,ot.start,ot.importSiteInfoFromQuery,r.wx,r.sY)}},"./signup/signup-header/index.jsx":(e,t,s)=>{s.d(t,{Z:()=>p});var i=s("../node_modules/classnames/index.js"),o=s.n(i),n=s("../node_modules/react/index.js"),r=s("./components/wordpress-logo/index.jsx"),a=s("../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js");class p extends n.Component{render(){const e=o()("wordpress-logo",{"is-large":this.props.shouldShowLoadingScreen&&!this.props.isReskinned});return(0,a.BX)("div",{className:"signup-header",children:[(0,a.tZ)(r.Z,{size:120,className:e}),(0,a.tZ)("div",{className:"signup-header__left"}),(0,a.tZ)("div",{className:"signup-header__right",children:!this.props.shouldShowLoadingScreen&&this.props.rightComponent})]})}}},"./signup/storageUtils.js":(e,t,s)=>{s.d(t,{r6:()=>o,sG:()=>n,Gv:()=>r,VH:()=>a,I5:()=>p,sg:()=>l,TD:()=>c,if:()=>d,Iv:()=>u,bu:()=>h});var i=s("../node_modules/cookie/index.js");const o=e=>{const t={path:"/",expires:new Date((new Date).getTime()+864e5),sameSite:"strict"};document.cookie=i.serialize("wpcom_signup_complete_destination",e,t)},n=()=>i.parse(document.cookie).wpcom_signup_complete_destination,r=()=>{const e={path:"/",expires:new Date((new Date).getTime()-1e3)};document.cookie=i.serialize("wpcom_signup_complete_destination","",e)},a=()=>sessionStorage.getItem("wpcom_signup_complete_site_slug"),p=e=>sessionStorage.setItem("wpcom_signup_complete_site_slug",e),l=()=>sessionStorage.getItem("was_signup_checkout_page_unloaded"),c=e=>sessionStorage.setItem("was_signup_checkout_page_unloaded",e),d=()=>sessionStorage.getItem("wpcom_signup_complete_flow_name"),u=e=>sessionStorage.setItem("wpcom_signup_complete_flow_name",e),h=()=>sessionStorage.removeItem("wpcom_signup_complete_flow_name")},"./state/analytics/actions/compose-analytics.js":(e,t,s)=>{s.d(t,{N:()=>r});var i=s("../node_modules/lodash-es/flatMap.js"),o=s("../node_modules/lodash-es/property.js"),n=s("./state/action-types.ts");function r(...e){return{type:n.y$E,meta:{analytics:(0,i.Z)(e,(0,o.Z)("meta.analytics"))}}}},"./state/analytics/actions/load-tracking-tool.js":(e,t,s)=>{s.d(t,{$:()=>o});var i=s("./state/action-types.ts");function o(e){return{type:i.K5f,trackingTool:e}}},"./state/current-user/constants.js":(e,t,s)=>{s.d(t,{sm:()=>i,bZ:()=>o});const i="calypso_domains_with_plans_only",o="calypso_allow_nonprimary_domains_without_plan"},"./state/products-list/init.js":(e,t,s)=>{var i=s("./state/redux-store.ts"),o=s("../packages/state-utils/src/index.ts"),n=s("./state/action-types.ts"),r=s("./state/utils/schema-utils.js"),a=s("./state/utils/reducer-utils.ts");const p=(0,r.G)({type:"object",additionalProperties:!1,patternProperties:{".+":{type:"object",required:["available","product_id","product_name","product_slug","description","is_domain_registration","cost_display"],properties:{available:{type:"boolean"},product_id:{type:"integer"},product_name:{type:"string"},product_slug:{type:"string"},description:{type:"string"},cost:{type:["number","null"]},is_domain_registration:{type:"boolean"},cost_display:{type:"string"}}}}},((e={},t)=>t.type===n.B3j?t.productsList:e)),l=(0,r.G)({type:["string","null"]},((e=null,t)=>t.type===n.B3j?t.productsListType:e)),c=(0,a.U)({isFetching:(e=!1,t)=>{switch(t.type){case n.MT$:return!0;case n.B3j:case n.BiW:return!1}return e},items:p,type:l}),d=(0,o.xi)("productsList",c);(0,i.x)(["productsList"],d)},"./state/selectors/is-user-registration-days-within-range.js":(e,t,s)=>{s.d(t,{Z:()=>o});var i=s("./state/current-user/selectors.js");function o(e,t,s,o){const n=(0,i.DI)(e);if(!n)return null;const r=((t=t||Date.now())-new Date(n))/864e5;return r>=s&&r<=o}},"./state/signup/actions.js":(e,t,s)=>{s.d(t,{hv:()=>o,aO:()=>n,Eq:()=>r});var i=s("./state/action-types.ts");s("./state/signup/init.js");function o(e){return{type:i.XXO,dependencies:e}}function n(){return{type:i.aR7}}function r(){return{type:i.CHW}}},"./state/signup/flow/actions.js":(e,t,s)=>{s.d(t,{iS:()=>o,AM:()=>n,gq:()=>r,cM:()=>a,Gl:()=>p});var i=s("./state/action-types.ts");s("./state/signup/init.js");function o(e){return{type:i.m5B,flowName:e}}function n(e){return{type:i.sbx,flowName:e}}function r(e){return{type:i.cxI,steps:e}}function a(e){return{type:i.dPJ,steps:e}}function p(){return{type:i.h$p}}},"./state/signup/progress/selectors.ts":(e,t,s)=>{s.d(t,{y:()=>r,E:()=>a});var i=s("../node_modules/lodash-es/get.js"),o=s("./signup/config/step-components.js");s("./state/signup/init.js");const n={};function r(e){return(0,i.Z)(e,"signup.progress",n)}const a=e=>{const{signup:{progress:t={}}={}}=e,s=t[Object.keys(t).find((e=>"plans"===(0,o.L)(e)))??""]??{},{wasSkipped:i=!1}=s;return i}},"./state/signup/steps/site-type/actions.js":(e,t,s)=>{s.d(t,{_:()=>n,m:()=>r});var i=s("./state/action-types.ts"),o=s("./state/signup/progress/actions.js");s("./state/signup/init.js");function n(e){return{type:i.ik4,siteType:e}}function r(e,t){return s=>{s(n(e)),s((0,o.TZ)({stepName:t},{siteType:e}))}}},"./state/signup/steps/site-vertical/actions.js":(e,t,s)=>{s.d(t,{_:()=>n,P:()=>r});var i=s("./state/action-types.ts"),o=s("./state/signup/progress/actions.js");s("./state/signup/init.js");function n(e){return{type:i.wk6,...e}}const r=(e,t="site-topic",s)=>i=>{i(n(e)),i((0,o.TZ)({stepName:t},{siteTopic:e.name,..."site-topic-with-theme"!==t&&s&&{themeSlugWithRepo:s}}))}},"./state/signup/steps/survey/actions.js":(e,t,s)=>{s.d(t,{p:()=>a});var i=s("./state/action-types.ts"),o=s("./state/analytics/actions/with-analytics.js"),n=s("./state/analytics/actions/compose-analytics.js"),r=s("./state/analytics/actions/record.js");s("./state/signup/init.js");function a(e){const t={vertical:e.vertical};return(0,o.w)((0,n.N)((0,r.l8)(t),(0,r.Bn)("VerticalSelectedEvent",t)))({type:i.V5t,survey:e})}},"./state/sites/selectors/get-site-id.js":(e,t,s)=>{s.d(t,{Z:()=>o});var i=s("./state/sites/selectors/get-site.js");function o(e,t){if(!t)return null;const s=(0,i.Z)(e,t);return s?s.ID:null}},"./state/sites/selectors/is-current-plan-paid.js":(e,t,s)=>{s.d(t,{Z:()=>o});var i=s("./state/sites/selectors/get-site-plan.ts");function o(e,t){const s=(0,i.Z)(e,t);return s?1!==s.product_id&&2002!==s.product_id:null}},"./state/ui/actions/set-sites.js":(e,t,s)=>{s.d(t,{B:()=>o,_:()=>n});var i=s("./state/action-types.ts");s("./state/ui/init.js");function o(e){return{type:i.bgv,siteId:e}}function n(){return{type:i.bgv,siteId:null}}},"../packages/calypso-products/src/constants/titan.ts":(e,t,s)=>{s.d(t,{A$:()=>i,M7:()=>o,xB:()=>n});const i="wp_titan_mail_monthly",o="wp_titan_mail_yearly",n=[i,o]}}]);

}
/*
     FILE ARCHIVED ON 19:44:44 Jun 07, 2022 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 04:52:16 Nov 19, 2024.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
/*
playback timings (ms):
  captures_list: 0.566
  exclusion.robots: 0.027
  exclusion.robots.policy: 0.017
  esindex: 0.011
  cdx.remote: 22.357
  LoadShardBlock: 66.719 (3)
  PetaboxLoader3.datanode: 72.673 (4)
  load_resource: 133.495
  PetaboxLoader3.resolve: 71.711
*/