1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="216a9208-4d9b-4805-8b78-867ad1899699",e._sentryDebugIdIdentifier="sentry-dbid-216a9208-4d9b-4805-8b78-867ad1899699")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[77471],{1343:(e,t,l)=>{l.d(t,{Q1:()=>m,RA:()=>u,he:()=>x});var i=l(987180),r=l(452196),n=l(358085),s=l(378129),o=l(428263),a=l.n(o),d=l(637855),c=l(239066);let m=e=>{let t,{newModel:l,oldModel:i,loginStepId:r,flowTemplate:n}=e,o=l.stepHistory,a=o;o&&o.path.length>0?t=o.path[o.path.length-1]:a={path:[r]};let d=(0,s.s)({backendModel:l,flowTemplate:n,localStorageModel:i,stepToStartFrom:t===r?void 0:t});return d.stepHistory=a,d},u=async e=>{let{model:t,sessionUuid:l,mode:s,flowPublicIdentifier:o,dispatch:a,loginStepId:u,sessionToken:x,maybeLoginPin:g,maybeLoginEmail:f,flowTemplate:p,agentLocation:h}=e,b=(0,n.vA)()[r.MAGIC_LINK_LOGIN_TOKEN_PARAMETER],v=await (0,c.Ho)(h,"/v1/flow/login/respondent/".concat(o,"/profile").concat(b?"?".concat(r.MAGIC_LINK_LOGIN_TOKEN_PARAMETER,"=").concat(b):""),"POST",{sessionUuid:l,model:t,mode:s,sessionToken:x,urlParams:(0,n.vA)(),maybeLoginPin:g,maybeLoginEmail:f});if(!v)throw Error("No response from login");v.cookieKey&&v.token&&(0,d.sx)(v.cookieKey,v.token),(null==v?void 0:v.respondent)&&a((0,i.tc)({respondent:v.respondent,submissionLimitReachedForLoginForm:v.submissionLimitReachedForForm,inProgressFlowSession:v.inProgressFlowSession})),v.currentUpdateSequenceNumber&&a((0,i.hY)({mode:s,flowPublicIdentifier:o,sequenceNumber:v.currentUpdateSequenceNumber}));let y=m({newModel:v.model,oldModel:t,loginStepId:u,flowTemplate:p});y&&a((0,i.xI)({flowPublicIdentifier:o,mode:s,newModel:y}));let w=y.stepHistory.path.filter(e=>e!==u).length>0?y.stepHistory.path[y.stepHistory.path.length-1]:void 0;w&&w in p.steps&&a((0,i.Lw)({flowPublicIdentifier:o,stepId:w,existingStepHistory:y.stepHistory.path,mode:s}))},x=e=>{if(!e)return"never";let t=a()(),l=a()(e);return 7>t.diff(l,"days")?l.fromNow():l.format("lll")}},22449:(e,t,l)=>{l.d(t,{A:()=>h});var i=l(626514),r=l(202514),n=l.n(r),s=l(987180),o=l(543599),a=l(861746),d=l(200336),c=l.n(d),m=l(666972),u=l(633563),x=l(595245),g=l(204516),f=l(34485),p=l(128125);let h=e=>{let{activeTheme:t}=e,l="live"===(0,o.GV)(s.wC),r=(0,o.GV)(g.H6),[d]=(0,m.useQueryParam)(x.Po,m.StringParam),h=(0,p.c)(),b=h?"100%":l||"yes"===d?"calc(100vh)":"calc(100vh - ".concat(f.D0,"px)"),{backgroundColor:v,baseColor:y,formBackgroundColor:w}=(e=>{let t=null==e?void 0:e.backgroundColor,l=null==e?void 0:e.questionsBackgroundColor,i=t||c().gray[100],r=l||c().white;return{backgroundColor:i,baseColor:(e=>{let t=n()(e);return .1>n()(t).luminosity()?t.mix(n()("white"),.1).hsl().string():n()(t).isDark()?t.mix(n()("white"),.25).hsl().string():t.darken(.05).hsl().string()})(r),formBackgroundColor:r}})(t);return(0,i.jsx)("div",{className:(0,u.cn)("flex justify-center items-start overflow-auto ",h?"w-full h-full":"w-screen h-screen"),style:{height:b,background:r?w:v},children:(0,i.jsxs)("div",{className:"max-w-[650px] w-screen flex flex-col sm:rounded-lg py-4 px-4 mt-6 sm:mt-12",style:{background:w},children:[(0,i.jsx)(a.E,{className:"h-7 mb-3",style:{backgroundColor:y}}),(0,i.jsx)(a.E,{className:"h-7 mb-3",style:{backgroundColor:y}}),(0,i.jsx)(a.E,{className:"h-7 mb-3",style:{backgroundColor:y}})]})})}},53112:(e,t,l)=>{l.d(t,{A:()=>E});var i=l(67059),r=l(694264),n=l(626514),s=l(643354),o=l(859032),a=l(95221),d=l(863851),c=l(987180),m=l(204516),u=l(543599),x=l(75834),g=l(921223),f=l(279905),p=l(757098),h=l(904820),b=l(360049),v=l(235879),y=l(157552),w=l(212485),j=l(350318),C=l(625408),N=l(633563),S=l(101845),G=l(202514),k=l.n(G),T=l(595245),V=l(157132),A=l(9210),_=l(239066),L=l(661784),I=l(420576),O=l(724467),z=l(1343),M=l(132166);let E=function(e){var t;let{loginPageTemplate:l}=e,[G,E]=(0,x.useState)(""),[F,P]=(0,x.useState)(!1),[U,R]=(0,x.useState)(!1),[q,H]=(0,x.useState)(),B=(0,u.GV)(d.xB),K=(0,u.GV)(c.lf),{t:W}=(0,p.c)(),D=(0,u.GV)(c.wC),[Q,Y]=(0,x.useState)(""),[X,Z]=(0,x.useState)(!1),J=(0,u.GV)(a.stg),$=(0,u.GV)(m.c5),ee=(0,u.GV)(c.U8),et=(0,u.GV)(a.xQf),el=(0,u.GV)(a.fF5),ei=(0,u.GV)(a.Y1x),{stepId:er}=(0,u.GV)(d.Z7),en=(0,O.m)(l),es=(0,x.useMemo)(()=>(0,r._)((0,i._)({},l),{email:(0,r._)((0,i._)({},l.email),{loginTitle:en||l.email.loginTitle})}),[l,en]),eo=(0,x.useMemo)(()=>(0,M.CF)(es,er,ee,{defaultLanguage:et,currentLanguage:ei,translations:el}).email,[es,ee,et,ei,el,er]),ea=(0,u.GV)(V.Dl),ed=async e=>{if(e.preventDefault(),H(void 0),"edit"===D)return void(0,C._X)("Go to preview mode to test out your form.",{duration:5e3,position:"top-center"});R(!0);try{let e=await (0,_.Ho)(ea,"/v1/flow/login/respondent/".concat(J,"/sendMagicLink?mode=").concat(D),"POST",{email:G});(null==e?void 0:e.success)&&P(!0)}catch(e){H((null==e?void 0:e.message)||e)}R(!1)},ec=W("Login to continue"),em=(0,u.GV)(c.W1),eu=(0,u.GV)(c.md),ex=(e=>{let t=(0,u.jL)(),l=(0,u.GV)(c.VC),n=(0,u.GV)(c.wC),s=(0,O.m)(e),o=(0,x.useCallback)((o,d)=>
1{if("edit"!==n||!l)return;let c=(0,i._)((0,r._)((0,i._)({},e),{email:(0,i._)({},e.email,o&&{loginTitle:o},d&&{loginCaption:d})}),s&&o&&{widgets:Object.fromEntries(Object.entries(e.widgets||{}).filter(e=>{let[,t]=e;return"Text"!==t.type}))});t((0,a.ubV)({stepId:l,stepTemplate:c}))},[t,l,n,e,s]);if("edit"===n)return o})(es),eg=(0,u.GV)(a.Hbh),ef=(0,u.jL)(),ep=async()=>{if("edit"===D)return void(0,C.UR)("Go to preview mode to test out your login page");if(!em){o.Cp(Error("Session missing onAttemptPinVerification")),(0,C.UR)("Session missing");return}try{if(!er)throw Error("Login step id missing");Z(!0),await (0,z.RA)({model:ee,sessionUuid:eu,mode:D,flowPublicIdentifier:J,dispatch:ef,loginStepId:er,sessionToken:em,maybeLoginPin:Q,maybeLoginEmail:G,flowTemplate:B,agentLocation:ea}),Z(!1)}catch(e){(0,L.A)(e),(0,C.UR)("".concat(e.message),{position:"top-center",duration:5e3}),Z(!1);return}},eh=k()($.questionsColor).fade(.55).hsl().string(),eb="edit"===D||(0,C.GZ)()&&"fullscreen"!==(0,A.FH)(),ev=(0,C.Le)(),ey=(null==(t=es.email.loginMethods)?void 0:t.length)>0?es.email.loginMethods:["otp"],ew=ey.includes("google")&&!ev;return(0,n.jsx)(I.EI,{children:(0,n.jsxs)("div",{className:"mt-4 mb-6 ",children:[(0,n.jsx)(O.C,{evaluatedTitleTemplate:eo.loginTitle,evaluatedCaptionTemplate:eo.loginCaption,titleTemplate:es.email.loginTitle,captionTemplate:es.email.loginCaption,defaultTitle:ec,onUpdate:ex,legacyTitleOverride:en}),F?(0,n.jsxs)("div",{className:"flex w-full flex-col px-5 pt-6 md:px-7",children:[(0,n.jsx)(j.A,{label:W("Check your email and provide the pin below"),subLabel:W("Make sure to check your spam folder."),className:"pl-[22px] mb-4 mt-2",dataCy:"login-pin-input",labelStyles:{color:$.questionsColor},bold:!0,children:(0,n.jsx)("div",{className:(0,N.cn)(eg&&"flex justify-end"),style:{direction:"ltr",textAlign:"left"},children:(0,n.jsx)(g.U,{length:s.LOGIN_PIN_LENGTH,onChange:(e,t,l)=>Y(l.join("")),borderColor:$.borderColor,focusBorderColor:$.primaryColor,inputStyle:{color:$.questionsColor}})})}),(0,n.jsxs)("div",{className:"flex justify-between mt-4",children:[(0,n.jsx)(b.gx,{alignment:"center",hideShadow:!0,text:W("Resend pin"),backgroundColor:$.questionsBackgroundColor,textColorOverride:eh,onClick:async()=>{E(""),Y(""),P(!1)},isLoading:!1,className:(0,N.cn)("rounded-md",h.A.backButton),style:{}}),(0,n.jsx)("div",{className:"flex justify-end",children:(0,n.jsx)(b.gx,{alignment:"right",disabled:Q.length!==s.LOGIN_PIN_LENGTH,text:W("Continue"),isLoading:X,onClick:ep}
1)})]})]}):(0,n.jsxs)("div",{className:"mt-4 sm:mx-auto sm:w-full sm:max-w-sm",children:[1===ey.length&&ev&&"google"===ey[0]&&(0,n.jsx)(v.A,{type:"warning",title:"Google login is not supported in embeds",children:"Please enable email login method instead or share the form link outside of an embed."}),ew&&(0,n.jsxs)("div",{className:"mt-7 ",children:[(0,n.jsx)(b.gx,{activeThemeOverride:$,style:{borderColor:$.borderColor},labelClassName:"relative",customReactButtonContent:(0,n.jsxs)("div",{className:"flex items-center w-full text-blue-500 text-base justify-center",children:[(0,n.jsx)(S.N,{}),(0,n.jsx)("div",{className:"ml-3",children:"Sign in with Google"})]}),text:"",backgroundColor:"white",onClick:async()=>{let e=(0,T.BU)(ea);window.location.href="".concat(e,"/v1/flow/login/respondent/").concat(J,"/googleLogin?mode=").concat(D,"&originalUrl=").concat(encodeURIComponent(window.location.href))},className:"flex w-full justify-center rounded-md text-sm font-semibold leading-6 shadow-xs",type:"submit",alignment:"full",sizingOverride:"medium"}),ey.includes("otp")&&(0,n.jsxs)("div",{className:"my-6 relative mt-8 ",children:[(0,n.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,n.jsx)("div",{className:"w-full border-t ",style:{borderColor:$.borderColor}})}),(0,n.jsx)("div",{className:"relative flex justify-center text-sm",children:(0,n.jsx)("span",{className:"px-2",style:{backgroundColor:$.questionsBackgroundColor,color:$.slightlyFadedQuestionsColor},children:W("Or")})})]})]}),ey.includes("otp")&&(0,n.jsxs)("form",{onSubmit:ed,className:"space-y-6",children:["edit"===D&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(v.A,{type:"success",className:"mb-6",customBackgroundColor:$.isDark?$.questionsBackgroundColor:void 0,title:"Email login is enabled",children:"Test your form in preview mode. Users will be prompted to verify their email address the first time they submit a form."})}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:(0,n.jsx)(j.A,{label:W("Email"),leftLabelClassName:"font-medium! leading-6! ",bold:!0,color:$.questionsColor,children:(0,n.jsx)(w.R3,{activeTheme:$,children:(0,n.jsx)(y.A,{value:G,autoFocus:!eb,onChange:e=>{E(e)},type:"email",Icon:f.r,"aria-required":!ew})})})}),(0,n.jsxs)("div",{children:[(0,n.jsx)(b.gx,{activeThemeOverride:$,text:eo.loginButtonText||W("Verify email"),backgroundColor:$.primaryColor,className:(0,N.cn)("flex w-full justify-center rounded-md text-sm font-semibold leading-6 shadow-xs",h.A.buttonField),type:"submit",alignment:"full",sizingOverride:"medium",isLoading:U}),(q||K)&&(0,n.jsx)("div",{className:"text-sm mt-2",style:{color:$.errorColor},children:q||K})]})]})]})]})]})})}},128125:(e,t,l)=>{l.d(t,{c:()=>s,q:()=>n});var i=l(75834);let r=(0,i.createContext)({inProjectShell:!1}),n=r.Provider,s=()=>(0,i.useContext)(r).inProjectShell},138509:(e,t,l)=>{l.d(t,{A:()=>b});var i=l(67059),r=l(694264),n=l(626514),s=l(294529),o=l(199678),a=l(815101),d=l(204516),c=l(543599),m=l(987180),u=l(767761),x=l(75834),g=l(859633),f=l(136365);let p={toolbarModule:[["bold","italic","underline"],[{color:o._}],["link"]],toolbarOptions:["bold","italic","underline","color","link"]},h=e=>{let{text:t,onChange:l,textSizingOverride:i,color:r}=e,o=(0,c.GV)(m.wC),d=(0,x.useMemo)(()=>{let e=t;return e=(0,f.A)(e)?e:"<p>".concat(e,"</p>"),e=(0,g.p)(e)},[t]);return o?(0,n.jsx)(s.Ay,{unevaluatedLabel:(0,a.getInitialPickerStringValueStr)(t),evaluatedLabel:d,textAlign:"center",textSizingOverride:i,defaultColorOverride:r,onChange:e=>{l(e.logic.value)},customToolbar:p,disableReferencePicking:!0}):null},b=e=>{let{title:t,subtitle:l,onChange:s}
1=e,o=(0,c.GV)(d.c5),a=t||"Form closed to new submissions",m=l||"Contact the form owner for more details.",x=(0,c.GV)(d.H6);return(0,n.jsxs)("div",{className:"flex flex-col py-2 sm:py-5",children:[(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(u.J,{className:"h-14 w-14",style:{color:o.slightlyFadedQuestionsColor}})}),(0,n.jsx)("div",{className:"mt-4 tracking-tight mb-1 sm:mb-2",children:(0,n.jsx)(h,{text:a,onChange:e=>{null==s||s(e,m)},color:o.questionsColor,textSizingOverride:{pSize:(0,r._)((0,i._)({},x?o.formElementSizes.h3Size:o.formElementSizes.h2Size),{fontWeight:700})}})}),(0,n.jsx)(h,{color:o.slightlyFadedQuestionsColor,text:m,onChange:e=>{null==s||s(a,e)},textSizingOverride:{pSize:(0,i._)({},o.formElementSizes.pSize)}})]})}},354218:(e,t,l)=>{l.d(t,{A:()=>y});var i=l(626514),r=l(132667),n=l(120014),s=l(111429),o=l(633563),a=l(987180),d=l(624163),c=l(543599),m=l(75834),u=l(32032),x=l(157132),g=l(482216),f=l(595245),p=l(221186),h=l(951486),b=l(95221),v=l(843638);let y=e=>{var t;let{template:l,redirectType:y}=e,w=(0,c.GV)(a.wC),j=(0,c.GV)(a.U8),C=(0,c.GV)(x.fL),N=(0,c.jL)(),S=(0,c.GV)(b.xQf),G=(0,c.GV)(b.Y1x),k=(0,m.useMemo)(()=>(0,d.evaluateGenericObject)(l,j,{timezone:(0,h.F)(),language:G||S,flowTemplate:null}),[l,j,S,G]),T=(0,m.useMemo)(()=>(0,u.R)(k,w),[k,w]);if(!C){let e="".concat("redirect"===y?"Ending redirects":"New form redirects"," are available on the starter plan and above");return(0,i.jsx)("div",{className:"flex justify-center items-center w-full",children:(0,i.jsx)(g.A,{className:"mt-0!",Icon:"redirect"===y?s.A:r.A,cta:"Upgrade to add ".concat("redirect"===y?"an ending redirect":"a new form redirect"),articleSlug:f.SA.endingPage,title:"redirect"===y?"Ending redirect":"New form redirect",subtitle:"Redirect users to a website or a new form when they reach this ending page.",onClick:()=>{N((0,p.uB)({isOpen:!0,upgradeReason:e,upgradeReasonSource:e,viewingBillingPlan:"starter"}))}})})}return(0,i.jsx)("div",{className:(0,o.cn)("w-full text-center flex flex-col justify-center items-center bg-gray-50/50","edit"===w?"shadow-md rounded-lg border border-gray-200":"h-full"),children:(0,i.jsxs)("div",{className:"flex flex-col justify-center items-center p-10 rounded-lg bg-primary-very-lightest/50 shadow-sm border border-primary",children:[(0,i.jsx)("div",{className:"p-2 flex items-center justify-center bg-primary-lightest/50 rounded-full",children:(0,i.jsx)(n.A,{className:"h-10 w-10 text-primary"})}),(0,i.jsx)("h3",{className:"mt-3 text-sm font-medium text-primary-dark text-[15px]",children:"redirect"===y?"Redirect":"New form redirect"}),(0,i.jsx)("p",{className:"mt-1 text-sm text-gray-500 max-w-xs",children:(0,i.jsx)(i.Fragment,{children:"redirect"===y?(0,i.jsxs)(i.Fragment,{children:["Upon reaching this page, users will be redirected to"," ",(0,i.jsx)("a",{target:"_blank",href:T.url,rel:"noreferrer",className:"underline text-gray-500 hover:text-gray-700",children:T.url})]}):(0,i.jsxs)(i.Fragment,{children:["Upon reaching this page, users will be prompted to fill out a new form. ",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),(null==(t=k.newFormSettings)?void 0:t.flowPublicId)?(0,i.jsx)(v.A,{theme:"outline",className:"text-gray-400",icon:(0,i.jsx)(n.A,{className:"h-4 w-4 mr-2 text-gray-400"}),onClick:()=>{var e;window.open("/editor/".concat(null==(e=k.newFormSettings)?void 0:e.flowPublicId),"_blank","noopener,noreferrer")},children:"See form"}):(0,i.jsx)("div",{className:"text-gray-400",children:"Choose the form on the left-hand side settings."})]})})})]})})}},358929:(e,t,l)=>{l.d(t,{A:()=>k});var i=l(67059),r=l(694264),n=l(626514),s=l(633563),o=l(95221),a=l(987180),d=l(204516),c=l(543599),m=l(75834),u=l(279905),x=l(757098),g=l(904820),f=l(360049),p=l(235879),h=l(157552),b=l(212485),v=l(350318),y=l(625408),w=l(157132),j=l(239066),C=l(420576),N=l(132166),S=l(724467),G=l(863851);let k=function(e){let{loginPageTemplate:t}=e,[l,k]=(0,m.useState)(""),[T,V]=(0,m.useState)(!1),[A,_]=(0,m.useState)(),L=(0,c.GV)(a.lf),{t:I}=(0,x.c)(),O=(0,c.GV)(a.wC),z=(0,c.GV)(o.stg),M=(0,c.GV)(d.c5),E=(0,c.GV)(a.U8),F=(0,c.GV)(o.xQf),{stepId:P}=(0,c.GV)(G.Z7),U=(0,c.GV)(o.fF5),R=(0,c.GV)(o.Y1x),q=(0,m.useMemo)(()=>(0,N.CF)(t,P,E,{translations:U,currentLanguage:R,defaultLanguage:F}).sso,[t,E,P,F,R,U]),H=(0,c.GV)(w.Dl),B=async e=>{if(e.preventDefault(),"edit"===O)return void(0,y._X)("Go to preview mode to test out your form.",{duration:5e3,position:"top-center"});V(!0),_(void 0);try{let e=await (0,j.Ho)(H,"/v1/flow/login/respondent/".concat(z,"/ssoRespondentLogin?mode=").concat(O,"&email=").concat(encodeURIComponent(l),"&originalUrl=").concat(encodeURIComponent(window.location.href)),"POST",{email:l,url:window.location.href});if(!(null==e?void 0:e.authorizationUrl))throw Error("Single sign-on not enabled for this domain. Contact the form owner.");window.location.href=e.authorizationUrl}catch(e){_((null==e?void 0:e.message)||e)}V(!1)},K=I("Login to continue"),W=(0,S.m)(t),D=(e=>{let t=(0,c.jL)(),l=(0,c.GV)(a.VC),n=(0,c.GV)(a.wC),s=(0,S.m)(e),d=(0,m.useCallback)((a,d)=>
1{if("edit"!==n||!l)return;let c=(0,i._)((0,r._)((0,i._)({},e),{sso:(0,i._)({},e.sso,a&&{loginTitle:a},d&&{loginCaption:d})}),s&&a&&{widgets:Object.fromEntries(Object.entries(e.widgets||{}).filter(e=>{let[,t]=e;return"Text"!==t.type}))});t((0,o.ubV)({stepId:l,stepTemplate:c}))},[t,l,n,e,s]);if("edit"===n)return d})(t);return(0,n.jsx)(C.EI,{children:(0,n.jsxs)("div",{className:"mt-4 mb-6 ",children:[(0,n.jsx)(S.C,{evaluatedTitleTemplate:q.loginTitle,evaluatedCaptionTemplate:q.loginCaption,titleTemplate:t.sso.loginTitle,captionTemplate:t.sso.loginCaption,defaultTitle:K,onUpdate:D,legacyTitleOverride:W}),(0,n.jsx)("div",{className:"mt-4 sm:mx-auto sm:w-full sm:max-w-sm",children:(0,n.jsxs)("form",{onSubmit:B,className:"space-y-6",children:["edit"===O&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(p.A,{type:"success",className:"mb-6",customBackgroundColor:M.isDark?M.questionsBackgroundColor:void 0,title:"SSO login is enabled",children:"Test your form in preview mode. Users will be prompted to login with SSO the first time they submit a form on a device."})}),(0,n.jsx)("div",{children:(0,n.jsx)(v.A,{label:I("Email"),leftLabelClassName:"font-medium! leading-6! ",bold:!0,color:M.questionsColor,children:(0,n.jsx)(b.R3,{activeTheme:M,children:(0,n.jsx)(h.A,{value:l,autoFocus:"edit"!==O,onChange:e=>{k(e)},type:"email",Icon:u.r,"aria-required":!0})})})}),(0,n.jsxs)("div",{children:[(0,n.jsx)(f.gx,{activeThemeOverride:M,text:q.loginButtonText||I("Sign in with SSO"),backgroundColor:M.primaryColor,className:(0,s.cn)("flex w-full justify-center rounded-md text-sm font-semibold leading-6 shadow-xs",g.A.buttonField),type:"submit",alignment:"full",sizingOverride:"medium",isLoading:T}),(A||L)&&(0,n.jsx)("div",{className:"text-sm mt-2",style:{color:M.errorColor},children:A||L})]})]})})]})})}},378129:(e,t,l)=>{l.d(t,{s:()=>n});var i=l(67059),r=l(877890);let n=e=>{let{backendModel:t,localStorageModel:l,stepToStartFrom:n,flowTemplate:s}=e,o=(0,i._)({},l);return Object.keys(t).forEach(e=>{var i;let a=t[e],d=l[e];d&&e===n&&(null==(i=s.steps[e])?void 0:i.type)==="form"&&(0,r.T)(s,n,t)&&(a=d),o[e]=a}),o}},452196:(e,t,l)=>{var i=l(253185);l.o(i,"MAGIC_LINK_LOGIN_TOKEN_PARAMETER")&&l.d(t,{MAGIC_LINK_LOGIN_TOKEN_PARAMETER:function(){return i.MAGIC_LINK_LOGIN_TOKEN_PARAMETER}})},482216:(e,t,l)=>{l.d(t,{A:()=>o});var i=l(626514),r=l(674441),n=l(106689),s=l(633563);let o=e=>{let{onClick:t,articleSlug:l,Icon:o,cta:a,title:d,className:c,footer:m,subtitle:u}=e;return(0,i.jsx)("div",{className:(0,s.cn)("flex justify-center items-center mt-10",c),children:(0,i.jsxs)("div",{className:"p-3 py-6 flex flex-col rounded-lg items-center border border-brand-gray-200 w-full bg-brand-gray-50",children:[(0,i.jsx)(o,{className:"h-10 w-10 text-brand-gray-500"}),(0,i.jsx)("h3",{className:"mt-2 mb-1 text-base font-semibold text-brand-gray-900",children:d}),(0,i.jsxs)("p",{className:"mt-0 text-sm text-brand-gray-500 mb-6 max-w-lg text-center",children:[(0,i.jsxs)("span",{children:[u," "]}),l&&(0,i.jsx)(n.A,{linkText:"Learn more",className:"inline",theme:"inline-link",linkClassName:"text-brand-gray-700",articleSlug:l})]}),(0,i.jsx)(r.$,{variant:"primary",onClick:()=>{t()},children:a}),m&&(0,i.jsx)("div",{className:"mt-2 text-sm text-brand-gray-500",children:m})]})})}},507263:(e,t,l)=>{l.d(t,{A:()=>A});var i=l(67059),r=l(694264),n=l(626514),s=l(633563),o=l(863851),a=l(95221),d=l(987180),c=l(204516),m=l(543599),u=l(75834),x=l(360049),g=l(157552),f=l(212485),p=l(767761),h=l(859032),b=l(757098),v=l(904820),y=l(235879),w=l(157132),j=l(700179),C=l(625408),N=l(239066),S=l(420576),G=l(724467),k=l(1343),T=l(661784),V=l(132166);let A=function(e){let{loginPageTemplate:t,loginStepId:l}=e,A=(0,m.GV)(d.wC),_=(0,m.GV)(c.c5),L=(0,m.GV)(o.xB),I=(0,m.GV)(d.W1),{t:O}=(0,b.c)(),z=(0,m.GV)(d.md),M=(0,m.GV)(a.stg),E=(0,m.GV)(a.XHy),[F,P]=(0,u.useState)(""),[U,R]=(0,u.useState)(),[q,H]=(0,u.useState)(!1),B=(0,m.GV)(w.Dl),{request:K,error:W}=(0,N.KX)(B,"/v1/flow/login/password/".concat(M,"/checkPassword"),"POST"),D=(0,m.GV)(d.U8),Q=(0,m.jL)(),Y=(0,m.GV)(a.xQf),X=(0,m.GV)(a.Y1x),Z=(0,m.GV)(a.fF5),J=(0,j.NK)(),$=(0,u.useMemo)(()=>(0,V.CF)(t,l,D,{defaultLanguage:Y,currentLanguage:X,translations:Z}).password,[t,D,l,Y,X,Z]),ee=async()=>
1{if("edit"===A)return void(0,C._X)("Go to preview mode to test out your form.",{duration:5e3,position:"top-center"});R(void 0);try{if(!I){h.Cp(Error("Session missing passwordverification")),(0,C.UR)("Session missing");return}if(!z)throw Error("Unexpected - no submissionId");let e=await K({providedPassword:F,mode:A,model:D,sessionUuid:z,sessionToken:I});if(null==e?void 0:e.isAuthenticated){Q((0,d.Fs)({loginPassword:F}));let t=(0,k.Q1)({newModel:null==e?void 0:e.newModel,oldModel:D,loginStepId:l,flowTemplate:L});e.currentUpdateSequenceNumber&&Q((0,d.hY)({mode:A,flowPublicIdentifier:M,sequenceNumber:e.currentUpdateSequenceNumber})),t&&(Q((0,d.xI)({flowPublicIdentifier:M,mode:A,newModel:t})),E&&await J({newModel:t,sequenceNumberOverride:e.currentUpdateSequenceNumber}))}}catch(e){(0,T.A)(e),R(e.message)}},et=(e=>{let t=(0,m.jL)(),l=(0,m.GV)(d.VC),n=(0,m.GV)(d.wC),s=(0,G.m)(e),o=(0,u.useCallback)((o,d)=>{if("edit"!==n||!l)return;let c=(0,i._)((0,r._)((0,i._)({},e),{password:(0,i._)({},e.password,o&&{loginTitle:o},d&&{loginCaption:d})}),s&&o&&{widgets:Object.fromEntries(Object.entries(e.widgets||{}).filter(e=>{let[,t]=e;return"Text"!==t.type}))});t((0,a.ubV)({stepId:l,stepTemplate:c}))},[t,l,n,e,s]);if("edit"===n)return o})(t),el=(0,G.m)(t),ei=O("Enter password to continue");return(0,n.jsx)(S.EI,{children:(0,n.jsxs)("div",{className:"mt-4 mb-7",children:[(0,n.jsx)(G.C,{evaluatedTitleTemplate:$.loginTitle,evaluatedCaptionTemplate:$.loginCaption,titleTemplate:t.password.loginTitle,captionTemplate:t.password.loginCaption,defaultTitle:ei,onUpdate:et,legacyTitleOverride:el}),(0,n.jsx)("div",{className:"mt-4 sm:mx-auto sm:w-full sm:max-w-sm",children:(0,n.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),H(!0),await ee(),H(!1)},className:"flex flex-col cursor-default!",children:["edit"===A&&(0,n.jsx)(n.Fragment,{children:""===t.password.password?(0,n.jsx)(y.A,{type:"warning",className:"mb-6",title:"No password has been set yet",children:(0,n.jsx)(n.Fragment,{children:"Login setup is not complete, configure a password on the left hand side"})}):(0,n.jsx)(y.A,{type:"success",className:"mb-6",customBackgroundColor:_.isDark?_.questionsBackgroundColor:void 0,title:"Password protection is enabled",children:"Test your form in preview mode. All users will be prompted to enter the provided password."})}),(0,n.jsx)(f.R3,{activeTheme:_,children:(0,n.jsx)(g.A,{type:"password",autoFocus:"edit"!==A,placeholder:O("Enter password"),onChange:P,value:F,Icon:p.J,"aria-required":!0})}),(0,n.jsxs)("div",{className:"mt-6",children:[(0,n.jsx)(x.gx,{alignment:"full",className:(0,s.cn)("flex w-full justify-center rounded-md text-sm font-semibold leading-6 shadow-xs",v.A.buttonField),text:$.loginButtonText||O("Continue"),disabled:!1,type:"submit",isLoading:q}),(U||W)&&(0,n.jsx)("div",{className:"text-sm mt-2",style:{color:_.errorColor},children:U||W})]})]})})]})})}},547889:(e,t,l)=>{l.d(t,{A:()=>n});var i=l(626514),r=l(633563);let n=e=>{let{text:t,className:l,onClick:n,size:s="normal",theme:o="blue",style:a,icon:d}=e;return(0,i.jsxs)(n?"button":"span",{className:(0,r.cn)("inline-flex items-center py-0.5 rounded-full font-medium ","small"===s?"text-xs px-2":"large"===s?"text-[15px] px-4":"text-sm px-3 ","blue"===o&&"bg-blue-100 text-blue-800","light-blue"===o&&"bg-blue-50 text-blue-600","amber"===o&&"bg-amber-100 text-amber-800","red"===o&&"bg-red-100 text-red-800","gray"===o&&"bg-gray-100 text-gray-800","emerald"===o&&"bg-emerald-100 text-emerald-800","gray2"===o&&"bg-gray-200 text-gray-600","pink"===o&&"bg-pink-200 text-pink-600","green"===o&&"bg-green-100 text-green-600","transparent"===o&&"bg-transparent ","black"===o&&"bg-gray-700 text-white","zapier"===o&&"bg-[#ffe6da] text-[#FF4F00]","make"===o&&"bg-[#f1e0ff] text-[#6C01CB]","primary"===o&&"bg-primary text-fillout-black","violet"===o&&"bg-violet-100 text-violet-800","scheduling"===o&&"bg-white border border-gray-200 text-gray-500","primary-light"===o&&"bg-primary-very-lightest text-primary-dark",l),style:a,onClick:n,children:[d,t]})}},644446:(e,t,l)=>{l.d(t,{A:()=>L});var i=l(67059),r=l(694264),n=l(626514),s=l(665806),o=l(564189),a=l(95221),d=l(987180),c=l(385103),m=l(543599),u=l(75834),x=l(633563),g=l(904820),f=l(360049),p=l(204516),h=l(700179),b=l(625408);let v=e=>{let{animationsPaused:t,commonStartAnimationStyles:l,buttonText:i}=e,r=(0,m.GV)(p.sx),[o,a]=(0,u.useState)(),c=(0,h.NK)(),v=(0,m.GV)(d.wC),y=async()=>
1{if("edit"===v)return void(0,b._X)("Go to preview mode to test your form",{position:"top-center",duration:5e3,description:"You are in the form editor"});a(!0),await c({}),a(!1)};return r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mb-[60px]"}),(0,n.jsx)("div",{className:"flex fixed sm:block bottom-4 left-2 right-2 ",children:(0,n.jsx)(f.gx,{className:"w-full",alignment:"center",disabled:!1,text:i,sizingOverride:"extra_large",onClick:y,isLoading:o})})]}):(0,n.jsx)(s.iK,{delay:.3,play:"edit"!==v&&!t,easeType:"ease-out",duration:.8,start:l,end:{opacity:1,transform:"none"},children:(0,n.jsx)("div",{className:"flex",children:(0,n.jsx)(f.gx,{alignment:"center",disabled:!1,text:i,sizingOverride:"extra_large",className:(0,x.cn)(g.A.buttonField),onClick:y,isLoading:o})})})};var y=l(118426),w=l(294529),j=l(202514),C=l.n(j),N=l(784989);let S=()=>{let e=(0,m.GV)(p.H6);return t=>{let l="subtitle"===t?N.Q.subtitle:N.Q.title,r=l.desktop;return e&&l.mobile&&(r=(0,i._)({},l.desktop,l.mobile)),(0,y.C2)(r,500,"1.3em")}},G=e=>{let{commonStartAnimationStyles:t,animationsPaused:l,evaluatedLabel:i,unevaluatedLabel:r,updateLabel:o}=e,c=(0,m.GV)(d.wC),u=(0,m.GV)(p.c5),g=S(),f=(0,m.GV)(a.p0_);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(s.iK,{delay:f?.3:.1,play:"edit"!==c&&!l,easeType:"ease-out",duration:.8,start:t,end:{opacity:1,transform:"none"},children:(0,n.jsx)("div",{className:(0,x.cn)("flex justify-center items-center mb-2 sm:mb-4 px-3 sm:px-5","edit"===c&&"min-w-[400px] max-w-full"),children:(0,n.jsx)(w.Ay,{evaluatedLabel:i,unevaluatedLabel:r,customToolbar:N.I,placeholder:e=>{let{isFocused:t}=e;return(0,n.jsx)("span",{className:"whitespace-nowrap justify-center items-center flex italic",style:{color:C()(u.questionsColor).fade(t?.8:.4).string()},children:"Type here"})},onChange:e=>{o(e,"title")},textAlign:"center",defaultBold:!0,textSizingOverride:g("title")})})})})},k=e=>{let{commonStartAnimationStyles:t,animationsPaused:l,evaluatedLabel:i,unevaluatedLabel:r,updateLabel:o}=e,c=(0,m.GV)(d.wC),u=(0,m.GV)(p.c5),g=S(),f=(0,m.GV)(a.p0_);return(0,n.jsx)(s.iK,{delay:.2*!!f,play:"edit"!==c&&!l,easeType:"ease-out",duration:.8,start:t,end:{opacity:1,transform:"none"},children:(0,n.jsx)("div",{className:(0,x.cn)("flex justify-center items-center mb-3 sm:mb-10 px-5 sm:px-10","edit"===c&&"min-w-[400px] max-w-full"),children:(0,n.jsx)(w.Ay,{evaluatedLabel:i,unevaluatedLabel:r,customToolbar:N.I,placeholder:e=>{let{isFocused:t}=e;return(0,n.jsx)("div",{className:"whitespace-nowrap justify-center items-center flex italic",style:{color:C()(u.questionsColor).fade(t?.85:.6).string()},children:"Description (optional)"})},onChange:e=>{o(e,"subtitle")},defaultColorOverride:(0,y.mj)(u),textAlign:"center",textSizingOverride:g("subtitle")})})})};var T=l(9210),V=l(36272),A=l(266609),_=l(132166);let L=()=>{let e=(0,m.jL)(),t=(0,m.GV)(a.VG4),l=t.template,g=(0,m.GV)(d.U8),f=(0,m.GV)(d.wC),p=(0,m.GV)(a.zCt),h=(0,m.GV)(a.xQf),b=(0,m.GV)(a.Y1x),y=(0,m.GV)(a.fF5),w=(0,u.useMemo)(()=>(0,_.CF)(l,t.id,g,{translations:y,currentLanguage:b,defaultLanguage:h}),[t.id,g,y,b,h,l]),j=(n,s)=>{e((0,a.ubV)({stepId:t.id,stepTemplate:(0,r._)((0,i._)({},l),{[s]:n})}))},C=w.buttonText||"Start",N=(0,o.lK)(l.extraImage,!0),S=!p&&"live"===f,L=w.subtitle&&!(0,c.isRichLabelEmpty)(w.subtitle),I="edit"===f?{}:{opacity:0,transform:"translateY(-10px)"},{divRef:O}=(0,V.h)({manualPadding:5});return(0,n.jsx)("div",{className:"flex justify-center items-center w-full h-full relative",children:(0,n.jsx)("div",{className:(0,x.cn)("m-auto max-h-full w-full ","edit"!==f&&((0,T.U1)()?"overflow-y-hidden":"overflow-y-auto")),ref:O,children:(0,n.jsxs)("div",{className:"flex justify-center items-center flex-col w-full min-h-full my-10",children:[N&&(0,n.jsx)("div",{className:"relative flex justify-center mb-10 px-3 sm:px-5",children:(0,n.jsx)(s.iK,{delay:.1,play:"edit"!==f&&!S,easeType:"ease-out",duration:.8,start:I,end:{opacity:1,transform:"none"},children:(0,n.jsx)("img",{src:N,alt:"Center image",className:"max-w-full rounded-sm",style:{maxHeight:"20vh"}})})}),(0,n.jsx)(G,{evaluatedLabel:w.title,unevaluatedLabel:l.title,updateLabel:j,commonStartAnimationStyles:I,animationsPaused:S}),(L||"edit"===f)&&(0,n.jsx)(k,{commonStartAnimationStyles:I,animationsPaused:S,evaluatedLabel:w.subtitle,unevaluatedLabel:l.subtitle,updateLabel:j}),(0,n.jsx)(v,{animationsPaused:S,commonStartAnimationStyles:I,buttonText:C}),(0,n.jsx)(A.b,{alignment:"center",extraTopPadding:!0})]},"cover-page-".concat(null==t?void 0:t.id))})})}},674715:(e,t,l)=>{l.d(t,{A:()=>g});var i=l(626514),r=l(564189),n=l(307350),s=l(987180),o=l(543599),a=l(420576),d=l(556592),c=l(633563),m=l(623469);
1let u=l.n(m)()(Promise.all([l.e(89839),l.e(23655),l.e(12021),l.e(46593),l.e(38294),l.e(76031),l.e(11352),l.e(16842),l.e(52531),l.e(63945),l.e(369),l.e(28540),l.e(89416),l.e(14496),l.e(19700),l.e(58245),l.e(57560),l.e(48737),l.e(39577),l.e(24024),l.e(26843),l.e(7225),l.e(49024),l.e(43823),l.e(40027),l.e(81012),l.e(9914),l.e(34322),l.e(11694),l.e(40704),l.e(72828),l.e(756),l.e(34535),l.e(37796)]).then(l.bind(l,737796)),{loadableGenerated:{webpack:()=>[737796]},ssr:!1}),x=e=>{let{children:t}=e;return(0,i.jsx)(i.Fragment,{children:t})},g=()=>{let e=(0,o.GV)(n.VC),t=(0,o.GV)(s.wC);return(0,d.A)(),(0,i.jsx)("div",{className:"flex w-full h-full justify-between relative",children:(0,i.jsx)("div",{className:(0,c.cn)("flex flex-col justify-between h-full w-full relative","edit"===t&&"min-w-0"),children:(0,i.jsx)("div",{className:"flex w-full h-full",children:(0,i.jsx)(r.Ay,{ImageWrapper:x,children:(0,i.jsx)(a._s,{children:(0,i.jsx)(u,{})})})})})},e)}},699604:(e,t,l)=>{l.d(t,{m:()=>o,t:()=>s});var i=l(67059),r=l(694264),n=l(75834);let s={zIndex:1e3,position:"fixed",pointerEvents:"none",width:"100%",height:"100%",top:0,left:0},o=()=>{let e=(0,n.useRef)(null),t=(0,n.useCallback)(t=>{e.current=t},[]),l=(0,n.useCallback)((t,l)=>{var n;null==(n=e.current)||n.call(e,(0,r._)((0,i._)({},l),{origin:{y:.7},particleCount:Math.floor(200*t)}))},[]);return{fire:(0,n.useCallback)(()=>{l(.25,{spread:26,startVelocity:55}),l(.2,{spread:60}),l(.35,{spread:100,decay:.91,scalar:.8}),l(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2}),l(.1,{spread:120,startVelocity:45})},[l]),getInstance:t}}},724467:(e,t,l)=>{l.d(t,{C:()=>b,m:()=>h});var i=l(626514),r=l(199678),n=l(431373),s=l(294529),o=l(202514),a=l.n(o),d=l(987180),c=l(204516),m=l(543599),u=l(75834),x=l(633563),g=l(793399),f=l(506634);let p={toolbarModule:[[{header:[1,2,3,4,5,!1]}],["bold","italic","underline"],[{color:r._}],["link"]],toolbarOptions:["bold","italic","underline","header","color","link"]},h=e=>{var t;let l=null==(t=Object.values(e.widgets||{}).find(e=>"Text"===e.type))?void 0:t.template;return null==l?void 0:l.contents},b=e=>{var t;let{evaluatedTitleTemplate:l,evaluatedCaptionTemplate:r,titleTemplate:o,captionTemplate:h,defaultTitle:b,legacyTitleOverride:v,onUpdate:y}=e,w=(0,m.GV)(c.c5),j=null==o||null==(t=o.logic)?void 0:t.value,C=j===g.E||!(null==j?void 0:j.replace(/<\/?[^>]+(>|$)/g,"")),N=!!v,S=(0,u.useMemo)(()=>({title:C&&v?v:o,caption:h}),[C,h,v,o]),G=(0,m.GV)(d.wC),k="edit"===G||r,T=(0,m.GV)(c.ze),V=(0,f.F)(o.logic.value)||"div",A=(0,f.F)(h.logic.value)||"div";return(0,i.jsxs)("div",{className:"sm:mx-auto sm:w-full sm:max-w-sm flex flex-col items-center",children:[T&&(0,i.jsx)(n.A,{className:"mb-4"}),(0,i.jsx)(s.Ay,{evaluatedLabel:C&&!N?"<h2><strong>".concat(b,"</strong></h2>"):l,unevaluatedLabel:S.title,customToolbar:p,placeholder:e=>{let{isFocused:t}=e;return(0,i.jsx)(V,{className:"whitespace-nowrap justify-center items-center flex text-center text-2xl font-bold tracking-tight duration-200",style:{color:a()(w.questionsColor).fade(.8*!!t).string()},children:b})},onChange:e=>{null==y||y(e,void 0)},textAlign:"center"}),k&&(0,i.jsx)("div",{className:(0,x.cn)("flex justify-center items-center mt-[6px]","edit"===G&&"min-w-[400px] max-w-full"),children:(0,i.jsx)(s.Ay,{evaluatedLabel:r,unevaluatedLabel:h,customToolbar:p,placeholder:e=>{let{isFocused:t}=e;return(0,i.jsx)(A,{className:"whitespace-nowrap justify-center items-center flex italic duration-200",style:{color:a()(w.questionsColor).fade(t?.85:.6).string()},children:"Description (optional)"})},onChange:e=>{null==y||y(void 0,e)},defaultColorOverride:w.slightlyFadedQuestionsColor,textAlign:"center"})})]})}},784989:(e,t,l)=>{l.d(t,{I:()=>a,Q:()=>o});var i=l(67059),r=l(694264),n=l(199678),s=l(558449);let o={title:{desktop:{h1Size:{fontSize:(0,s.mM)(56),lineHeight:"1.2em",fontWeight:600},h2Size:{fontSize:(0,s.mM)(50),lineHeight:"1.2em",fontWeight:600},h3Size:{fontSize:(0,s.mM)(44),fontWeight:600},h4Size:{fontSize:(0,s.mM)(30),fontWeight:600},h5Size:{fontSize:(0,s.mM)(24),fontWeight:500},pSize:{fontSize:(0,s.mM)(38),fontWeight:600}},mobile:{h1Size:{fontSize:(0,s.mM)(50),lineHeight:"1.2em",fontWeight:600},h2Size:{fontSize:(0,s.mM)(46),lineHeight:"1.2em",fontWeight:600},h3Size:{fontSize:(0,s.mM)(40),fontWeight:600},h4Size:{fontSize:(0,s.mM)(26),fontWeight:600},h5Size:{fontSize:(0,s.mM)(20),fontWeight:500},pSize:{fontSize:(0,s.mM)(34),fontWeight:600}}},subtitle:{desktop:(0,r._)((0,i._)({},s.QZ.large.desktop),{pSize:{fontSize:(0,s.mM)(26),fontWeight:400}}),mobile:(0,r._)((0,i._)({},s.QZ.large.mobile),{pSize:{fontSize:(0,s.mM)(24),fontWeight:400}})}},a={toolbarModule:[[{header:[1,2,3,4,5,!1]}],["bold","italic","underline"],[{color:n._}],["link"]],toolbarOptions:["bold","italic","underline","header","color","link"]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.