(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7899],{13065:function(e,t,n){var r={"./ar":[32412,2412],"./ar.tsx":[32412,2412],"./ca":[59368,9368],"./ca.tsx":[59368,9368],"./cs":[20610,610],"./cs.tsx":[20610,610],"./da":[59195,9195],"./da.tsx":[59195,9195],"./de":[35584,5584],"./de.tsx":[35584,5584],"./el":[80551,551],"./el.tsx":[80551,551],"./en":[48298],"./en.tsx":[48298],"./es":[96531,6531],"./es.tsx":[96531,6531],"./fi":[24880,4880],"./fi.tsx":[24880,4880],"./fil":[91451,1451],"./fil.tsx":[91451,1451],"./fr":[95971,5971],"./fr.tsx":[95971,5971],"./he":[31976,1976],"./he.tsx":[31976,1976],"./hi":[90213,213],"./hi.tsx":[90213,213],"./hr":[55048,5048],"./hr.tsx":[55048,5048],"./hu":[25137,5137],"./hu.tsx":[25137,5137],"./id":[96501,6501],"./id.tsx":[96501,6501],"./is":[26876,6876],"./is.tsx":[26876,6876],"./it":[984,9953],"./it.tsx":[984,9953],"./ja":[40422,422],"./ja.tsx":[40422,422],"./ko":[71869,1869],"./ko.tsx":[71869,1869],"./ne":[96612,6612],"./ne.tsx":[96612,6612],"./nl":[26641,6641],"./nl.tsx":[26641,6641],"./no":[14079,4079],"./no.tsx":[14079,4079],"./pl":[97624,7624],"./pl.tsx":[97624,7624],"./pt":[84496,4496],"./pt.tsx":[84496,4496],"./ro":[5589,5589],"./ro.tsx":[5589,5589],"./ru":[71470,1470],"./ru.tsx":[71470,1470],"./si":[50120,120],"./si.tsx":[50120,120],"./sk":[33071,3071],"./sk.tsx":[33071,3071],"./sr":[52623,2623],"./sr.tsx":[52623,2623],"./sv":[6704,6704],"./sv.tsx":[6704,6704],"./tr":[32756,2756],"./tr.tsx":[32756,2756],"./types":[90105,105],"./types.ts":[90105,105],"./uk":[4356,4356],"./uk.tsx":[4356,4356],"./ur":[71603,1603],"./ur.tsx":[71603,1603],"./zh":[70810,810],"./zh-CHT":[96755,6755],"./zh-CHT.tsx":[96755,6755],"./zh.tsx":[70810,810]};function i(e){if(!n.o(r,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=r[e],i=t[0];return Promise.all(t.slice(1).map(n.e)).then(function(){return n(i)})}i.keys=function(){return Object.keys(r)},i.id=13065,e.exports=i},74487:function(e,t,n){"use strict";n.d(t,{k:function(){return u}});var r,i=n(51037),o=n(85556),a=n(37885),l=n(14126),s=n.n(l),u=(r=(0,i._)(function(e,t){var n,r,i,l,u,d,c,f,m;return(0,o.Jh)(this,function(o){switch(o.label){case 0:return o.trys.push([0,5,,6]),[4,fetch(e)];case 1:if((n=o.sent()).ok)return[3,3];return[4,n.json()];case 2:if("string"==typeof(r=o.sent()).message)throw Error(r.message);throw Error(JSON.stringify(r));case 3:return[4,n.blob()];case 4:return i=o.sent(),l=window.URL.createObjectURL(i),(u=document.createElement("a")).style.display="none",u.href=l,u.id="download-link-".concat(s().generate()),d=t,(c=n.headers.get("Content-Disposition"))&&(f=c.match(/filename="?(.+)"?/))&&f.length>1&&(d=f[1]),u.download=d,document.body.appendChild(u),u.click(),window.URL.revokeObjectURL(l),[3,6];case 5:throw m=o.sent(),(0,a.p)(m),m;case 6:return[2]}})}),function(e,t){return r.apply(this,arguments)})},24289:function(e,t,n){"use strict";n.d(t,{CD:function(){return v},a$:function(){return g},vI:function(){return m}});var r=n(24246),i=n(47941),o=n(5592),a=n(39142),l=n(36314),s=n(58971),u=n(99511),d=n(11576),c=n(20847),f=n(24106),m=function(e,t,n,r){var i,u,d,m,v,g,p="edit"===(0,s.C)(l.gh),h=(0,s.C)(o.H7w),x=(0,s.C)(a.y9),C=(0,s.C)(o.QWI);if(h&&"reviewing"===(p?"not_submitted":x)&&C){var b=C.answers[e];if(b&&b.answers.some(function(e){return e.isCorrect})){var y=(0,c.M$)(t,b.answers,n,r),w=y.isCorrect,j=y.correctOptionIds,S=w?"correct":"incorrect",k=(null===(i=b.answerFeedback)||void 0===i?void 0:i.enabled)&&(null===(u=b.answerFeedback)||void 0===u?void 0:u.correctMessage)?null===(d=b.answerFeedback)||void 0===d?void 0:d.correctMessage:f.Aw,I=(null===(m=b.answerFeedback)||void 0===m?void 0:m.enabled)&&(null===(v=b.answerFeedback)||void 0===v?void 0:v.incorrectMessage)?null===(g=b.answerFeedback)||void 0===g?void 0:g.incorrectMessage:0===t.length?f.lr:f.lG;return{quizQuestionResult:S,message:"correct"===S?k:I,correctOptions:j}}}},v=function(e,t){var n,r,i="edit"===(0,s.C)(l.gh),u=(0,s.C)(o.H7w),d=(0,s.C)(a.y9),m=(0,s.C)(o.QWI);if(u&&"reviewing"===(i?"not_submitted":d)&&m){var v=m.answers[e];if(v&&v.answers.some(function(e){return e.isCorrect&&e.textValue&&""!==e.textValue})){var g=(0,c.wh)(t,v.answers),p=g.isCorrect,h=g.correctTextValues,x=(null===(n=v.answerFeedback)||void 0===n?void 0:n.correctMessage)||f.Aw,C=(null===(r=v.answerFeedback)||void 0===r?void 0:r.incorrectMessage)||(""===t||null==t?f.lr:f.lG),b=p?"":"Correct ".concat(h.length>1?"answers":"answer",": ").concat(h.map(function(e){return e.textValue}).join(", "));return{quizQuestionResult:p?"correct":"incorrect",message:p?x:C,answerCorrectionText:b}}}},g=function(e){var t=e.children,n=e.quizQuestionResult,a=e.message,l=e.answerCorrectionText,c=(0,s.C)(o.H7w),f=(0,s.C)(u.VU);if(!c)return(0,r.jsx)(r.Fragment,{children:t});var m=(0,d.AK)("correct"===n?"!text-green-600":"!text-red-600","large"===f.formSizing?"!text-xl":"medium"===f.formSizing?"!text-base":""),v=(0,d.AK)("large"===f.formSizing?"!py-4 !text-xl":"medium"===f.formSizing?"!py-3":"!py-[10px]");return"correct"===n?(0,r.jsxs)(r.Fragment,{children:[t,(0,r.jsx)("div",{className:"mt-4 mb-2",children:(0,r.jsx)(i.Z,{customBackgroundColor:f.isDark?f.questionsBackgroundColor:void 0,className:v,titleClassName:m,type:"success",title:a})})]}):"incorrect"===n?(0,r.jsxs)(r.Fragment,{children:[t,(0,r.jsx)("div",{className:"mt-4 mb-2",children:(0,r.jsx)(i.Z,{customBackgroundColor:f.isDark?f.questionsBackgroundColor:void 0,type:"error",className:v,title:a,titleClassName:m,children:(0,r.jsx)("span",{className:"text-red-600",children:l||""})})})]}):(0,r.jsx)(r.Fragment,{children:t})}},48897:function(e,t,n){"use strict";n.d(t,{T:function(){return u}});var r=n(60053),i=n(58971),o=n(27378),a=n(5592),l=n(60074),s=n(48298),u=function(e){var t=(0,r._)((0,o.useState)(),2),u=t[0],d=t[1],c=(0,i.C)(a.VyW),f=(0,o.useMemo)(function(){return e||c},[c,e]);return(0,o.useEffect)(function(){var e=!0;if(f)return n(13065)("./".concat(f)).then(function(t){e&&d(t.default)}).catch(function(e){(0,l.Tb)(e)}),function(){e=!1}},[f]),{t:function(t,n){return!u&&n&&"en"!==e?"":(u||s.default)[t]||t},formLanguage:f}}},70470:function(e,t,n){"use strict";n.d(t,{CZ:function(){return w},GT:function(){return x},Ki:function(){return y},Lf:function(){return j},sQ:function(){return b},xR:function(){return h},zh:function(){return C}});var r=n(51037),i=n(18775),o=n(50858),a=n(55818),l=n(60053),s=n(85556),u=n(5592),d=n(99511),c=n(58971),f=n(98784),m=n(27378),v=n(83460),g=n(42036),p=n(11576),h=function(){var e=(0,c.T)(),t=(0,v.Q)("/admin/themes"),n=t.loading,i=t.request;return{getThemes:(0,m.useCallback)((0,r._)(function(){var t;return(0,s.Jh)(this,function(n){switch(n.label){case 0:return[4,i()];case 1:return(t=n.sent())&&e((0,d.$w)({themes:t.themes})),[2]}})}),[i,e]),loading:n}},x=function(){var e=(0,c.T)();return(0,m.useCallback)(function(){e((0,u.W41)({open:!0}))},[e])},C=function(){var e=(0,c.T)();return function(){e((0,u.W41)({open:!1}))}},b=function(){var e=(0,c.T)();return(0,m.useCallback)(function(t){e((0,u.jKU)({themePublicId:t.publicIdentifier})),e((0,u.it2)({featuredThemeId:void 0})),e((0,d.Dc)({theme:t.theme})),e((0,d.pH)({newThemeName:t.name}))},[e])},y=function(){var e=(0,c.T)(),t=(0,c.C)(u.ZBl),n=(0,c.C)(d.SE);return(0,m.useCallback)(function(r){e((0,u.it2)({featuredThemeId:r}));var i=g.FEATURED_THEMES.find(function(e){return e.galleryThemeId===r});if(i)e((0,d.Dc)({theme:i.theme}));else{if(t){var o=null==n?void 0:n.find(function(e){return e.publicIdentifier===t});if(o){e((0,d.Dc)({theme:o.theme}));return}}e((0,d.Dc)({theme:void 0}))}},[e,t,n])},w=function(){var e,t=(0,v.Q)("/admin/themes/create","POST").request,n=(0,l._)((0,m.useState)(!1),2),i=n[0],o=n[1],a=b(),d=(0,c.T)(),f=h().getThemes;return{cloneAndSetGalleryTheme:(0,m.useCallback)((e=(0,r._)(function(e){var n,r;return(0,s.Jh)(this,function(i){switch(i.label){case 0:if(!(n=g.FEATURED_THEMES.find(function(t){return t.galleryThemeId===e})))return(0,p.eZ)("Choose a theme"),[2];return o(!0),[4,t({theme:n.theme,makeNameUnique:!0,name:n.displayName})];case 1:return r=i.sent(),[4,f()];case 2:return i.sent(),r&&(d((0,u.it2)({featuredThemeId:void 0})),a(r.theme)),o(!1),[2,null==r?void 0:r.theme]}})}),function(t){return e.apply(this,arguments)}),[t,f,d,a]),loading:i}},j=function(){var e=(0,c.C)(d.Pu),t=(0,c.T)(),n=(0,v.Q)("/admin/themes/save","POST").request,r=(0,c.C)(u.ZBl),l=(0,m.useCallback)((0,f.debounce)(n,500),[n]),s=(0,c.C)(u.uCB);return function(n,u){var c=(0,a._)((0,o._)({},e),(0,i._)({},n,u));t((0,d.Dc)({theme:c})),l({theme:c,themePublicId:r,flowPublicIdentifier:s})}}},80209:function(e,t,n){"use strict";var r=n(24246),i=n(58971),o=n(11576),a=n(61429),l=n(39654),s=n(5592),u=n(39142),d=n(99511),c=n(61006),f=n(14888),m=n(31955);t.Z=function(e){var t,n,v=e.goToPrevious,g=e.shouldShowBackButton,p=e.className,h=(0,i.C)(s.J$G),x=(0,i.C)(d.VU),C=(0,i.C)(u.kf),b=c.m[x.formPosition].backArrowType(x),y=(0,i.C)(d.eD),w=(0,i.C)(d._Y),j="outline"===b?x.inputBackgroundColor:void 0,S=(null===(t=c.m[x.formPosition])||void 0===t?void 0:null===(n=t.customBackArrowColor)||void 0===n?void 0:n.call(t,x,y,j))||x.questionsColor;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:(0,o.AK)("flex justify-start ml-3 w-[65px] z-10","h-42px",w&&"mt-[6px]",p),children:g&&(0,r.jsx)(m.er,{primaryColor:x.answersColor,children:(0,r.jsx)(l.Z,{"data-cy":"form-back-button","aria-label":"Back",style:{color:S,background:j,borderColor:"outline"===b?x.borderColor:void 0},theme:"transparent"===b?"transparent":"secondary-light",onClick:function(){return v()},className:(0,o.AK)("px-4 flex sm:w-auto justify-center mr-4 sm:mr-0 !whitespace-nowrap focus:!ring-1 focus:!border-none ",f.Z.backButton),size:"large"===x.formSizing?"extra_large":"medium"===x.formSizing?"large":"extra_small"===x.formSizing?"extra_small":"normal",children:(0,r.jsx)(r.Fragment,{children:h?(0,r.jsx)(a.LZ3,{className:(0,o.AK)("transparent"===b?"h-6 w-6":"h-4 w-4","font-semibold")}):(0,r.jsx)(a.Y4O,{className:(0,o.AK)("transparent"===b?"h-6 w-6":"h-4 w-4","font-semibold")})})},C)})})})}},92396:function(e,t,n){"use strict";var r=n(24246),i=n(99511),o=n(58971),a=n(9776),l=n(11576),s=n(39142),u=n(14888);t.Z=function(e){var t=e.className,n=(0,o.C)(i.B4),d=(0,o.C)(i.VU),c=n.imageUrl,f="edit"===(0,o.C)(s.gh);return(0,r.jsx)(r.Fragment,{children:"icon"===n.type&&n.iconId?(0,r.jsx)("div",{className:(0,l.AK)("flex justify-center items-center",t),children:(0,r.jsx)(a.Z,{iconId:n.iconId,size:40,color:d.slightlyFadedAnswersColor})}):c?(0,r.jsx)("img",{src:c,alt:"Logo",role:"presentation",className:(0,l.AK)("max-w-full max-h-[40px] rounded",f&&c&&"h-[40px]",t,u.Z.themeLogo)}):(0,r.jsx)(r.Fragment,{})})}},31295:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(50858),i=n(55818),o=n(24246),a=n(99511),l=n(42036),s=n(58971),u=n(56008),d=n(70470),c=n(92396),f=function(e){var t=e.hideIconChangeButton,n=e.className,f=(0,s.C)(a.B4),m=f.imageUrl,v=(0,d.Lf)();return(0,o.jsx)(u.Z,{hideLabel:!0,configs:{label:"",showCtaOnlyOnHover:!0,customCtaText:"Add logo",hideIconChangeButton:t},className:n,templateValue:(0,l.getInitialPickerStringValueGeneric)(["string","object"],m),selectedIconId:"icon"===f.type?f.iconId:void 0,updateTemplate:function(e){var t=e.logic.value;v("navBarSettings",(0,i._)((0,r._)({},f),{type:"image_url",imageUrl:t}))},onChooseIcon:function(e){v("navBarSettings",(0,i._)((0,r._)({},f),{type:"icon",iconId:e}))},allowIcons:!0,image:(0,o.jsx)(c.Z,{})})}},91173:function(e,t,n){"use strict";n.d(t,{kx:function(){return J},ZP:function(){return Q},hU:function(){return H}});var r=n(51037),i=n(50858),o=n(55818),a=n(85556),l=n(24246),s=n(53944),u=n(51743),d=n(27124),c=n.n(d),f=n(27378),m=n(2789),v=n(58971),g=n(11576),p=n(82879),h=n(87653),x=n(5592),C=n(39142),b=n(99511),y=n(42036),w=n(53755),j=n(48897),S=n(72279),k=n(61006),I=n(14888),N=n(17802),T=n(89426),_=n(79165),V=n(8531),P=n(38580),F=n(60053),E=n(50851),A=n(61429),L=n(2957),M=n(39997),D=n(959),R=n(31342),z=n(49616);function B(){var e=(0,E._)(["\n  .progress-circle {\n    background: ",";\n    transition: background 0.1s ease;\n\n    border-color: ",";\n  }\n\n  .step-name {\n    color: ",";\n    transition: background 0.1s ease;\n  }\n\n  &:hover .progress-circle {\n    background: ",";\n  }\n\n  &:hover .step-name {\n    color: ",";\n  }\n"]);return B=function(){return e},e}var O=function(e,t){return t[e.status]},U=function(e,t){return"center"===e.formPosition?c()((0,p.nD)(t?e.questionsBackgroundColor:e.backgroundColor)).fade(.7).string():e.mediumFadedAnswersColor},q=M.ZP.div.withConfig({componentId:"sc-9a10ec33-0"})(B(),function(e){return O(e.stage,{complete:e.fadedPrimaryColor||e.activeTheme.fadedPrimaryColor,current:e.activeTheme.questionsBackgroundColor,upcoming:e.activeTheme.questionsBackgroundColor})},function(e){return O(e.stage,{current:e.primaryColor||e.activeTheme.primaryColor,upcoming:U(e.activeTheme,e.isMobile)})},function(e){return O(e.stage,{complete:e.fadedPrimaryColor||e.activeTheme.fadedPrimaryColor,current:e.primaryColor||e.activeTheme.primaryColor,upcoming:U(e.activeTheme,e.isMobile)})},function(e){return O(e.stage,{complete:e.primaryColor||e.activeTheme.primaryColor})},function(e){return O(e.stage,{complete:e.primaryAccentColor||e.activeTheme.primaryAccentColor})}),Z=function(e){if("center"===e.formPosition){var t,n;return!!(null===(t=e.backgroundImage)||void 0===t?void 0:null===(n=t.logic)||void 0===n?void 0:n.value)}return"image_background"===e.formPosition||"center_with_banner"===e.formPosition},W=function(){var e=(0,v.T)(),t=(0,v.C)(b.VU),n=(0,v.C)(C.gh),r=(0,v.C)(C.F9),i=(0,v.C)(x.RT),o=(0,v.C)(C.kf),a=(0,v.C)(_.AT),s=(0,v.C)(x.VyW),u=(0,L.C)(),d=(0,R.d7)(),m=(0,f.useMemo)(function(){if(!o)return[];var e=(0,y.evaluateGenericObject)(i,r,{timezone:(0,z.v)(),language:s});if(!e.stages)return[];var t=(0,D.H)(a),n=e.stages.findIndex(function(e){return e.id===t[o]});if(n<0)return[];var l=a.steps[o];return e.stages.map(function(t,r){var i="complete";return r>n?i="upcoming":r===n&&(i="ending"===l.type&&r===e.stages.length-1?"complete":"current"),{id:t.id,name:t.label,status:i}})||[]},[i,r,a,o]),h=(0,f.useRef)(null),w=(0,F._)((0,f.useState)(0),2),j=w[0],S=w[1];(0,f.useEffect)(function(){var e=new ResizeObserver(function(e){S(e[0].contentRect.width)});return h.current&&e.observe(h.current),function(){e.disconnect()}},[]);var k=(0,v.C)(b._Y),I=(0,v.C)(b.eD),N=(0,f.useMemo)(function(){return I?24:"small"===t.formSizing?28:32},[I,t.formSizing]),T=Math.min(16,16*parseFloat(t.formElementSizes.questionCaptionSize.fontSize)),V=(0,f.useMemo)(function(){var e={};return m.forEach(function(t){var n=t.name.split(" ").reduce(function(e,t){return t.length>e.length?t:e},"").length*(T/1.6);e[t.id]=Math.max(n,80)}),e},[m,T,80]),P=(0,f.useMemo)(function(){return I?m.length>4?24:32:k?56:"edit"===n&&j<=80*m.length+600?56:80},[I,k,m.length,n,j]),E=(0,v.C)(b.jl),M=(0,f.useMemo)(function(){return E<=640?0:12},[E]),B=(0,f.useMemo)(function(){var e=N+P+M;if(m.map(function(t){return V[t.id]+e}).reduce(function(e,t){return e+t},0)+100<j)return"full";var t=m.length*(N+P+M),n=m.find(function(e){return"current"===e.status});return t+(n?V[n.id]:80)+100<j?"only_main_label":"circles_only"},[j,N,P,M,V,m,80]),O=i.primaryColor?c()(i.primaryColor).fade(.4).hsl().string():void 0,W=Z(t);return(0,l.jsx)("nav",{ref:h,"aria-label":"Progress",className:(0,g.AK)("flex justify-center w-full items-center group",I&&"edit"!==n?"absolute inset-0":"relative","-mb-2 sm:-mb-3"),children:(0,l.jsxs)("ol",{role:"list",className:(0,g.AK)("flex items-center !mb-0 relative",W&&"px-2 py-[6px] rounded-md"),style:{background:W?c()(t.questionsBackgroundColor).fade(.5).string():void 0},children:["edit"===n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"absolute left-0 right-0 top-0 bottom-0 bg-transparent z-[20]"}),(0,l.jsxs)("div",{className:(0,g.AK)("absolute w-full h-full inset-0 justify-center items-center text-white font-medium text-sm group-hover:underline text-center hidden group-hover:!flex bg-gray-700/50 py-2 z-[21] !cursor-pointer min-h-[40px] rounded"),onClick:function(t){e((0,x.iDv)({isOpen:!0})),t.stopPropagation()},children:[(0,l.jsx)("span",{className:"mr-1",children:(0,l.jsx)(A.sCx,{className:"h-4 w-4"})}),"Edit settings"]})]}),m.map(function(e,r){return(0,l.jsxs)(f.Fragment,{children:[(0,l.jsx)("li",{className:"flex items-center",children:(0,l.jsxs)(q,{activeTheme:t,isMobile:I,stage:e,primaryColor:i.primaryColor,fadedPrimaryColor:O,primaryAccentColor:i.primaryColor?(0,p.cx)(c()(i.primaryColor)).hsl().string():void 0,className:(0,g.AK)("group flex items-center","complete"===e.status&&"cursor-pointer"),onClick:function(){if("complete"===e.status){var t=(0,D.H)(a),n=Object.keys(t).filter(function(n){return t[n]===e.id});if(0!==n.length){var r=u.find(function(e){return n.includes(e)});r&&d(r)}}},children:[(0,l.jsxs)("div",{className:(0,g.AK)("progress-circle relative z-5 flex items-center justify-center rounded-full","current"===e.status&&"border-2","upcoming"===e.status&&"border-2 group"),style:{height:N,width:N},children:["complete"===e.status&&(0,l.jsx)(A.nQG,{className:"h-5 w-5","aria-hidden":"true",style:{color:(0,p.nD)(i.primaryColor||t.primaryColor)}}),"current"===e.status&&(0,l.jsx)("span",{className:(0,g.AK)("h-2.5 w-2.5 rounded-full"),"aria-hidden":"true",style:{background:i.primaryColor||t.primaryColor}})]}),(0,l.jsx)("span",{className:(0,g.AK)("ml-3 step-name line-clamp-2 flex",("circles_only"===B||"only_main_label"===B&&"current"!==e.status)&&!("edit"===n&&"current"===e.status)&&"!hidden"),style:{fontSize:T,fontWeight:400,maxWidth:V[e.id]||80},children:e.name})]})}),r!==m.length-1&&(0,l.jsx)("div",{className:(0,g.AK)("flex-initial","border-t-2"),style:{borderColor:"complete"===e.status?O||t.fadedPrimaryColor:U(t,I),width:P,marginLeft:M,marginRight:M}})]},e.id)})]})})},K=n(92396),Y=n(31295),G=n(80209),H=function(){var e,t=(0,v.C)(x.uCB),n=(0,v.C)(C.gh),i=(0,v.C)(T.te),o=(0,v.T)(),l=(0,P._r)(i,"/v1/flow/login/respondent/".concat(t,"/logout?mode=").concat(n),"POST"),s=l.request,u=l.error,d=l.loading;return{doLogout:(0,f.useCallback)((e=(0,r._)(function(e){var r,i,l,u;return(0,a.Jh)(this,function(a){switch(a.label){case 0:if(r=e.removeCurrentSession,"edit"===n)return[2];return[4,s()];case 1:return(i=a.sent())&&((0,V.c1)(i.destroyedTokens),r?((0,S.Z3)(n,t),l=new URL(window.location.href),(u=new URLSearchParams(l.search)).has(y.FILLOUT_EDIT_SUBMISSION_URL_PARAM)&&(u.delete(y.FILLOUT_EDIT_SUBMISSION_URL_PARAM),l.search=u.toString(),window.history.replaceState(null,"",l.toString())),window.location.reload()):o((0,C.P2)({respondent:void 0,submissionLimitReachedForLoginForm:!1,inProgressFlowSession:null}))),[2]}})}),function(t){return e.apply(this,arguments)}),[o,s,n,t]),error:u,loading:d}},J=function(e){var t=e.showLogo,n=e.className,i=e.size,o=void 0===i?"medium":i,d=(0,v.C)(b.VU),p=H(),h=p.doLogout,x=p.error,y=p.loading,w=(0,v.T)(),S=(0,v.C)(_.Fd),k=(0,j.T)().t,T=c()(d.primaryColor).fade(.85).hsl().string(),V=(0,v.C)(C.q8);return((0,f.useEffect)(function(){x&&(0,g.eZ)(x)},[x]),V)?(0,l.jsxs)(s.v,{as:"div",className:(0,g.AK)("relative  flex-shrink-0",n),children:[(0,l.jsxs)(s.v.Button,{className:(0,g.AK)("relative flex rounded-full  text-sm border  border-opacity-10 focus:outline-none focus:border-opacity-100 hover:opacity-90",I.Z.loginProfile),style:{background:T,borderColor:d.primaryColor},children:[(0,l.jsx)("span",{className:"absolute -inset-1.5"}),(0,l.jsx)("span",{className:"sr-only",children:"Open user menu"}),(0,l.jsx)(N.Z,{author:V,className:(0,g.AK)("!bg-transparent  ","large"===o&&"!h-10 !w-10 !text-base"),style:{color:d.primaryColor},dataCy:"login-form-profile-avatar"})]}),(0,l.jsx)(u.u,{as:f.Fragment,leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,l.jsxs)(s.v.Items,{className:"absolute -right-2 z-10 mt-2 max-w-64 min-w-[180px] origin-top-right rounded-md  pt-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none border mb-1",style:{background:d.questionsBackgroundColorNoOpacity,color:d.questionsColorOnNoOpacity,borderColor:d.borderColor},children:[(0,l.jsxs)("div",{className:"px-4 py-2   flex-col  border-b flex text-xs",style:{borderColor:d.extremelyFadedAnswersColor},children:[t&&(0,l.jsx)("div",{className:"flex w-full justify-center mb-4 ",children:(0,l.jsx)("div",{className:"max-w-[150px]",children:(0,l.jsx)(K.Z,{})})}),(0,l.jsxs)("div",{className:"whitespace-nowrap",style:{color:d.slightlyFadedQuestionsColor},children:[k("Submitting as")," "]}),(0,l.jsx)("div",{className:" whitespace-nowrap",style:{color:d.primaryColor},children:V.email})]}),S&&(0,l.jsx)(s.v.Item,{children:function(e){var t=e.active;return(0,l.jsx)("div",{className:(0,g.AK)("px-4 py-2 text-sm  cursor-pointer flex items-center border-b"),style:{background:t?d.onHoverColor:void 0,color:t?d.primaryColor:void 0,borderColor:d.extremelyFadedAnswersColor},onClick:(0,r._)(function(){return(0,a.Jh)(this,function(e){return w((0,C.B6)({showing:!0})),[2]})}),children:k("Past submissions")})}}),(0,l.jsx)(s.v.Item,{children:function(e){var t=e.active;return(0,l.jsxs)("div",{className:(0,g.AK)("px-4 py-2 text-sm  cursor-pointer flex items-center"),style:{background:t?d.onHoverColor:void 0,color:t?d.primaryColor:void 0},onClick:(0,r._)(function(){return(0,a.Jh)(this,function(e){switch(e.label){case 0:return[4,h({removeCurrentSession:!0})];case 1:return e.sent(),[2]}})}),children:[y&&(0,l.jsx)(m.Z,{className:"inline-flex mr-2",size:"small"}),k("Sign out")]})}})]})})]}):(0,l.jsx)(l.Fragment,{})};(0,o._)((0,i._)({},y.sharedInitialWidgetConfig),{logoImgUrl:(0,y.getInitialPickerStringValueStr)(""),logoLinkUrl:"",enableLogoLink:!1,alignment:"right"});var Q=function(){var e=(0,v.C)(b.B4),t=(0,v.C)(b.VU),n="edit"===(0,v.C)(C.gh),r=(0,v.C)(b.eD),i=(0,v.C)(b._Y),o=(0,w.O)(),a=o.getShouldShowBackButton,s=o.goToPrevious,u=o.shouldShowNavBar,d=o.shouldShowProgressBarWithSteps,m=a("navbar"),y=(0,v.C)(x.lbz),j=e.showLogo&&!(d&&r),S=k.m[t.formPosition],I=null==S?void 0:S.stickyNavBarOnDesktop,N=(0,v.C)(_.bC),T=!m&&r&&!d&&!(N&&!j),V=(0,f.useMemo)(function(){return!d||r?void 0:"center"===t.formPosition?t.backgroundColor:"default"===t.formPosition?t.questionsBackgroundColor:void 0},[d,t,r]);return!u&&(r||i&&(0,g.zd)()&&!(0,h.hg)())?(0,l.jsx)("div",{className:(0,g.AK)((!(0,g.zd)()||!r)&&"pt-1")}):y?null:(0,l.jsxs)("div",{id:"nav-bar",className:(0,g.AK)("flex items-center w-full ",n?"z-[10]":"z-[11]",I?"lg:sticky lg:top-0 ":"",d&&"justify-between",r&&d&&"relative",d&&((null==S?void 0:S.shouldCenter)?"mb-1 md:mb-2 lg:mb-4":"mb-5 md:mb-10 lg:mb-12"),!!V&&"border-b pb-2"),style:{background:V,borderColor:V?c()((0,p.nD)(V)).fade(.9).string():void 0},children:[!T&&(0,l.jsx)(G.Z,{shouldShowBackButton:!!m,goToPrevious:s,className:(0,g.AK)(V&&"mt-2")}),d&&(0,l.jsx)(W,{}),(0,l.jsx)("div",{className:(0,g.AK)("flex h-14 items-center",d?"w-[70px] mr-4":"w-full px-4",T?"justify-center":"justify-end",i?"pt-1":"py-2"),style:{direction:"ltr"},children:N&&!n?(0,l.jsx)(J,{showLogo:j,className:(0,g.AK)("ml-4",!!V&&"mt-2")}):(0,l.jsx)(l.Fragment,{children:j&&(0,l.jsx)(l.Fragment,{children:n?(0,l.jsx)(Y.Z,{hideIconChangeButton:!0,className:(0,g.AK)(d&&"!px-0 !border-0",!!V&&"mt-2")}):(0,l.jsx)(K.Z,{})})})})]})}},53755:function(e,t,n){"use strict";n.d(t,{O:function(){return c}});var r=n(5592),i=n(39142),o=n(58971),a=n(27378),l=n(99511),s=n(2957),u=n(79165),d=["ending","login"],c=function(){var e="edit"===(0,o.C)(i.gh),t=(0,o.C)(i.kf),n=(0,o.C)(r.H7w),c=(0,o.C)(r.RT),f=(0,o.C)(l.n9),m=(0,o.C)(r.orT),v=!c.shouldHide&&"circle_steps"===c.style,g=(0,o.C)(r.m6F),p=(0,s.C)(),h=(0,o.C)(u.bC),x=(0,o.C)(r.Wt5),C=(0,o.T)(),b=p.length>1?p[p.length-2]:void 0;b===t&&(b=void 0);var y=(0,a.useCallback)(function(){b&&C((0,i.YV)({transition:{isBackTransition:!0,stepId:b}}))},[b,C]),w=(0,o.C)(l.B4).showLogo,j=function(t){var r=b&&!d.includes(x)&&(!n||g);return!("navbar"===t&&e||b&&m.includes(b))&&r&&("navbar"===t&&!f||"next_button"===t&&"near_next_button"===f)};return{getShouldShowBackButton:j,goToPrevious:y,shouldShowLogo:w,shouldShowNavBar:w||j("navbar")||v||h,shouldShowProgressBarWithSteps:v}}},959:function(e,t,n){"use strict";n.d(t,{H:function(){return a}});var r=n(42036),i=n(52687),o=function(e,t,n){n[e]=n[e]||t},a=function(e){var t,n={},a=null===(t=e.settings)||void 0===t?void 0:t.progressBar,l=null==a?void 0:a.stages;return l&&0!==l.length&&e.firstStep&&(Object.keys(e.steps).forEach(function(t){var i,o,a=l.at(-1),s=e.steps[t],u=l.find(function(e){return e.stepIds.includes(t)});if(u){n[t]=u.id;return}if("ending"===s.type&&a){n[t]=a.id;return}if(t===e.firstStep){n[t]=l[0].id;return}var d=(0,r.getNextStepTemplateFrontendVersion)({step:s});if(a&&(null===(i=d.nextStepTemplate)||void 0===i?void 0:i.defaultNextStep)&&(null===(o=e.steps[d.nextStepTemplate.defaultNextStep])||void 0===o?void 0:o.type)==="ending"){n[t]=a.id;return}}),function e(t,n,r,i,a,l,s){a.has(r)||(a.add(r),l.push(r),(t[r]||[]).forEach(function(r){var u=s[r];u?(function(e,t,n,r,i){var a=r.findIndex(function(e){return e.id===t}),l=r.findIndex(function(e){return e.id===n});if(a===l){e.forEach(function(e){o(e,t,i)});return}for(var s=Math.max(l-a,1),u=Math.ceil(e.length/s),d=0;d<e.length;d++){var c=r[Math.min(a+Math.floor(d/u),l)].id;o(e[d],c,i)}}(l,i,u,n,s),e(t,n,r,u,a,[],s)):e(t,n,r,i,a,l,s)}),l.pop())}((0,i.k)(e.steps),l,e.firstStep,l[0].id,new Set,[],n),Object.keys(e.steps).forEach(function(e){n[e]||(n[e]=l[0].id)})),n}},77386:function(e,t,n){"use strict";var r=n(60053),i=n(58971),o=n(39142),a=n(89426),l=n(27378),s=n(32488),u=n(11576);t.Z=function(e){var t=(0,i.C)(o.gh),n=(0,i.C)(a.CT),d=(0,i.C)(a.ti)&&e,c=(0,r._)((0,l.useState)(),2),f=c[0],m=c[1];return(0,l.useEffect)(function(){m((0,u.a8)()||s.DL)},[]),{canRunCustomCode:"live"===t&&n&&(f||d),loading:void 0===f}}},15460:function(e,t,n){"use strict";n.d(t,{u:function(){return r},y:function(){return i}});var r=200,i="form-step-widgets-container"},3517:function(e,t,n){"use strict";n.d(t,{x:function(){return v},z:function(){return m}});var r,i=n(51037),o=n(85556),a=n(60074),l=n(5592),s=n(38580),u=n(28417),d=n(41518),c="__fillout_live_form_visitor_cache",f=function(){try{return JSON.parse((0,d.$o)(c))}catch(e){return{}}},m=function(e){try{var t=f();delete t[e],(0,d.qQ)(c,JSON.stringify(t))}catch(e){}},v=(r=(0,i._)(function(e){var t,n,r,i,v,g,p,h,x,C,b,y;return(0,o.Jh)(this,function(o){switch(o.label){case 0:t=e.sessionToken,n=e.dispatch,r=e.flowPublicIdentifier,i=e.agentLocation,v=e.flowOwnerUserId,g=e.mode,p=e.organizationId,o.label=1;case 1:return o.trys.push([1,3,,4]),h=!0,"live"===g&&((x=f())[r]?h=!1:(x[r]=!0,(0,d.qQ)(c,JSON.stringify(x)))),C={sessionToken:t,isEditingSubmission:(0,u._N)(),domain:window.location.hostname,flowOwnerUserId:v,mode:g,organizationId:p,uniqueVisitor:h},[4,(0,s.UX)(i,"/v1/flow/".concat(r,"/init"),"POST",C,void 0)];case 2:return"SESSION_ALREADY_FINISHED"===(b=o.sent()).failedToUpdateSessionError&&n((0,l.JFC)({open:!0})),b.clearUniqueVisitor&&m(r),[3,4];case 3:return y=o.sent(),a.Tb(y),[3,4];case 4:return[2]}})}),function(e){return r.apply(this,arguments)})},31342:function(e,t,n){"use strict";n.d(t,{BJ:function(){return k},d7:function(){return S},hU:function(){return T}});var r=n(51037),i=n(50858),o=n(55818),a=n(85556),l=n(24246),s=n(86677),u=n(27378),d=n(58971),c=n(92010),f=n(5592),m=n(39142),v=n(14126),g=n.n(v),p=n(41518),h=n(11576),x=n(57500),C=n(38580),b=n(72279),y=n(28417),w=n(87653),j=n(49616),S=function(){var e=(0,c.jU)(),t=(0,d.C)(m.gh),n=(0,d.C)(f.uCB),r=(0,d.T)();return function(i){if("edit"===t)e({stepId:i});else{if(!n)return;r((0,m.D7)({flowPublicIdentifier:n,stepId:i}))}}},k=function(){var e=(0,d.T)();return(0,u.useCallback)(function(t){var n=t.mode,r=t.flowPublicIdentifier,i=t.stepId,o=t.stepModel,a=t.registeredUrlParams;e((0,m.Ky)({urlParams:(0,x.vl)(),registeredUrlParams:a})),i&&o&&e((0,m.hS)({stepId:i,newModel:o,flowPublicIdentifier:r,mode:n}))},[e])},I=function(){(0,h.tC)((0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("h1",{className:"text-lg font-extrabold text-gray-900 mb-1 mt-4",children:"A newer version of this submission exists"}),(0,l.jsxs)("div",{className:"text-gray-500",children:["Please ",(0,l.jsx)("strong",{children:"refresh the page"})," to load in the latest submission."]}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"flex justify-center mb-4",children:(0,l.jsx)("button",{onClick:function(){window.location.reload()},type:"button",className:"rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600",children:"Refresh page"})})]}),{position:"top-center",autoClose:!1,hideCloseButton:!1,closeOnClick:!1,icon:(0,l.jsx)(l.Fragment,{})})},N=function(e){var t=e.dispatch,n=e.mode,r=e.flowPublicIdentifier,i=(0,y.pf)(n,r),o=i.token;t((0,m.ZB)({mode:n,sessionToken:i.token}));var a=g().uuid();return t((0,m.rU)({mode:n,flowPublicIdentifier:r,submissionId:a})),{newSubmissionId:a,newSessionToken:o}},T=function(){var e,t=(0,s.useRouter)().query.flowPublicIdentifier,n=(0,d.T)(),l=(0,d.C)(m.nx);return(0,u.useCallback)((e=(0,r._)(function(e){var r,s,u,d,c,v,S,k,T,_,V,P,F,E,A,L,M;return(0,a.Jh)(this,function(a){switch(a.label){case 0:if(r=e.mode,s=e.flowTemplate,u=e.currentStepId,d=e.model,c=e.sessionSequenceNumber,v=e.agentLocation,null==t)throw Error("No flowPublicIdentifier");if(!s.firstStep)throw Error("No first step set for form");if(!l)throw Error("Oops! Unexpected error continuing, please try refreshing and trying again. No progress will be lost.");if(k=l,T=(null===(S=d.globals)||void 0===S?void 0:S.submissionId)||g().uuid(),!(0,p.yt)()||(null==(_=(0,b.Gg)(r,t))?void 0:_.token)||(T=(V=N({dispatch:n,mode:r,flowPublicIdentifier:t})).newSubmissionId,k=V.newSessionToken),!u)throw Error("Missing a desired page to go when continuing, please try refreshing");P=(0,x.nv)((0,x.vl)(),s.urlParams),F={mode:r,sessionToken:k,stepId:u,model:(0,o._)((0,i._)({},d),{urlParams:P,globals:{submissionId:T}}),version:"v2",updateSequenceNumber:c,metadata:{}},(E=(0,w.J2)())&&F.metadata&&(F.metadata.embedParentUrl=E),F.metadata&&(F.metadata.timezone=(0,j.v)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,(0,C.UX)(v,"/v1/flow/".concat(t,"/continue"),"POST",F,void 0,function(e){(401===e||403===e)&&(n((0,m.P2)({respondent:void 0,submissionLimitReachedForLoginForm:!1,inProgressFlowSession:null})),n((0,m.B_)({loginPassword:void 0})))})];case 2:if(L=a.sent()){if(A=L,L.failedToUpdateSessionError){if("SESSION_ALREADY_FINISHED"===L.failedToUpdateSessionError)throw n((0,f.JFC)({open:!0})),Error("");if("SEQUENCE_NUMBER_MISMATCH"===L.failedToUpdateSessionError){if((0,y._N)())throw I(),Error("")}else"FORM_CLOSED"===L.failedToUpdateSessionError&&window.location.reload()}}else throw Error("No response from /continue");return[3,4];case 3:if(""===(null==(M=a.sent())?void 0:M.message))throw M;return[2,(0,y.sf)(M,k,t,u,r)];case 4:return A.error&&(0,h.eZ)("Form is misconfigured",{description:A.error.error,autoClose:!1,position:"top-center",closeOnClick:!1}),[2,{newModel:null==A?void 0:A.model}]}})}),function(t){return e.apply(this,arguments)}),[t,l,n])}},28417:function(e,t,n){"use strict";n.d(t,{HN:function(){return x},H_:function(){return j},_N:function(){return y},dI:function(){return p},gg:function(){return w},kt:function(){return C},pf:function(){return S},sf:function(){return h}});var r,i=n(51037),o=n(60053),a=n(85556),l=n(60074),s=n(72279),u=n(42036),d=n(57500),c=n(8096),f=n(11576),m=n(27378),v=n(38580),g=n(3517),p=["Failed to fetch","NetworkError when attempting to fetch resource.","Load failed"],h=function(e,t,n,r,i){var o=null==e?void 0:e.message;throw o===u.SESSION_ERROR_MESSAGES.continueOnNonActiveSession||o===u.SESSION_ERROR_MESSAGES.notLoggedIn||o===u.SESSION_ERROR_MESSAGES.startFromNonFirstStep?((0,f.M)(["*Purging session for session:* ",t,"  *flowPublicIdentifier*  ",n," *currentStepId* ",r," *error* ",o].join(""),"high-priority-errors"),(0,s.Z3)(i,n),window.location.reload()):p.includes(o)||(0,f.M)(["*Unhandled session error:* ",o," *session* ",t,"  *flowPublicIdentifier*  ",n," *currentStepId* ",r].join(""),"high-priority-errors"),l.Tb(e),e},x=(r=(0,i._)(function(e,t,n){var r;return(0,a.Jh)(this,function(i){switch(i.label){case 0:if(r=(0,s.Gg)(t,e),(0,s.Z3)(t,e),(0,g.z)(e),!r)return[3,2];return[4,(0,v.UX)(n,"/v1/flow/".concat(e,"/cancel"),"POST",{sessionToken:r.token})];case 1:i.sent(),i.label=2;case 2:return[2]}})}),function(e,t,n){return r.apply(this,arguments)}),C=function(){return(0,c.Z)({length:32,type:"alphanumeric"})},b=function(){var e=(0,d.vl)()[u.FILLOUT_EDIT_SUBMISSION_URL_PARAM];return"string"==typeof e&&(32===e.length||99===e.length)?e:void 0},y=function(){return!!b()},w=function(){var e=(0,o._)((0,m.useState)(!1),2),t=e[0],n=e[1];return(0,m.useEffect)(function(){n(y())},[]),t},j=function(e){var t=new URL(window.location.href);t.searchParams.set(u.FILLOUT_EDIT_SUBMISSION_URL_PARAM,e);var n=t.toString();window.location.href=n},S=function(e,t){var n=(0,s.Gg)(e,t),r=null==n?void 0:n.token;if(!n||!r){var i={token:r=b()||C(),sequenceNumber:0,updatedAt:new Date};return(0,s.CT)(e,t,i),i}return n}},48298:function(e,t,n){"use strict";n.r(t);var r=n(24246),i={Other:"Other","Type your answer":"Type your answer","Add signature":"Add signature","Drag & drop a file or browse":(0,r.jsxs)(r.Fragment,{children:["Drag & drop a file or"," ",(0,r.jsx)("span",{className:"cursor-pointer underline",children:"browse"})]}),"Invalid file type":"Invalid file type","Field is required":"Field is required","Field does not match the desired format":"Field does not match the desired format","Field is invalid":"Field is invalid","Field must be at least {minLength} characters long":function(e){return"Field must be at least ".concat(e," characters long")},"Field must be no more than {maxLength} characters long":function(e){return"Field must be no more than ".concat(e," characters long")},"Must select at least {minLength} options":function(e){return"Must select at least ".concat(e," option(s)")},"Must select no more than {maxLength} options":function(e){return"Must select no more than ".concat(e," option(s)")},"Sign in":"Sign in","Enter password to continue":"Enter password to continue","Enter password":"Enter password",Email:"Email","Login to continue":"Login to continue","Sign out":"Sign out",Address:"Address","Address Line 2":(0,r.jsxs)("div",{className:"flex whitespace-nowrap",children:["Address Line 2 ",(0,r.jsx)("div",{className:"italic ml-1",children:"(Optional)"})]}),City:"City","State / Province":"State / Province","ZIP / Postal code":"ZIP / Postal code",Country:"Country",Pay:"Pay","Max file size is {size} MB":function(e){return"Max file size is ".concat(e," MB")},"File is too large":"File is too large","Please wait for all files to finish uploading on this page":"Please wait for all files to finish uploading on this page","Ranking set":"Ranking set",Clear:"Clear",Unanswered:"Unanswered","You have a submission in progress. Would you like to continue?":"You have a submission in progress. Would you like to continue?",Continue:"Continue","Start again":"Start again",Edit:"Edit",Latitude:"Latitude",Longitude:"Longitude",Loading:"Loading","You scored":"You scored","cookie-message":"Fillout uses cookies to persist your login and form submission if you navigate away from this tab. See the","cookie policy":"cookie policy","I accept":"I accept",Send:"Send","Please enter an email address":"Please enter an email address","Link sent":"Link sent",Done:"Done",Skip:"Skip","Schedule meeting":"Schedule meeting",Back:"Back","Edit color":"Edit color","Pick a color":"Pick a color","Check your email and provide the pin below":"Check your email and provide the pin below","Make sure to check your spam folder.":"Make sure to check your spam folder.","Resend pin":"Resend pin","Verify email":"Verify email","Sign in with SSO":"Sign in with SSO","You have a submission in progress":"You have a submission in progress","View past submissions":"View past submissions","In progress":"In progress","Last updated":"Last updated","Resume submission":"Resume submission","New submission":"New submission","Past submissions":"Past submissions","Submitting as":"Submitting as","Edit submission":"Edit submission","This response was already submitted":"This response was already submitted","No submissions yet":"No submissions yet",Completed:"Completed","You have already submitted this form":"You have already submitted this form","Contact the form owner for more details.":"Contact the form owner for more details.","Choose a day to see available times.":"Choose a day to see available times.","Your information":"Your information","You'll receive a call at this number.":"You'll receive a call at this number.","Phone Number":"Phone Number",Name:"Name","Guest emails":"Guest emails","Add guests":"Add guests","Schedule event":"Schedule event",Organizer:"Organizer","No times available in {month}":function(e){return"No times available in ".concat(e)},"See next month":"See next month","{hours} hours and {minutes} minutes":function(e,t){var n=1===t?"minute":"minutes",r=1===e?"hour":"hours";return 0===e?"".concat(t," ").concat(n):0===t?"".concat(e," ").concat(r):"".concat(e," ").concat(r," and ").concat(t," ").concat(n)},"Reschedule event":"Reschedule event"};t.default=i},15865:function(e,t,n){"use strict";n.d(t,{n:function(){return a},v:function(){return l}});var r=n(42036),i=n(32488),o=n(87653),a=function(e,t){var n=e.redirectUrl||r.DEFAULT_ENDING_REDIRECT_URL;try{n.startsWith("http://")||n.startsWith("https://")||(n="https://"+n);var i=new URL(n),o=new URLSearchParams(i.search),a=!0,l=!1,s=void 0;try{for(var u,d=(e.redirectUrlParams||[])[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var c=u.value,f="edit"!==t||c.value?c.value:"xxxxx";c.key&&f&&o.set(c.key,f)}}catch(e){l=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(l)throw s}}return i.search=o.toString(),{url:i.href}}catch(e){return console.error(e),{url:"https://www.fillout.com",error:!0}}},l=function(e,t){var n=e.flowPublicId;if(n){var r=new URLSearchParams([]),a=!0,l=!1,s=void 0;try{for(var u,d=e.urlParams[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var c=u.value;c.key&&c.value&&r.set(c.key,c.value)}}catch(e){l=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(l)throw s}}"preview"===t&&"yes"===new URL(window.location.href).searchParams.get(i.zA)&&r.set(i.zA,"yes");var f=(0,o.Fw)();return f&&(r.set(i.$w,"yes"),r.set("fillout-embed-id",f),(0,o.rp)()&&r.set("fillout-embed-dynamic-resize","true")),"".concat("preview"===t?"/editor/preview/".concat(n):"/flow/".concat(n),"?").concat(r)}}},86185:function(e,t,n){"use strict";n.d(t,{t:function(){return a}});var r=n(72279),i=n(15865),o=n(75177),a=function(e){var t=e.evaluatedTemplate,n=e.mode,a=e.flowPublicIdentifier;if((0,r.Z3)(n,a),"redirect"===t.type){var l=(0,i.n)(t,n);return(0,o.zr)(l.url),!0}if("new_form"===t.type&&t.newFormSettings){(0,r.Z3)(n,t.newFormSettings.flowPublicId);var s=(0,i.v)(t.newFormSettings,n);if(s)return window.location.href=s,!0}}},68349:function(e,t,n){"use strict";n.d(t,{NB:function(){return X},ZP:function(){return en},d9:function(){return O}});var r=n(50858),i=n(55818),o=n(97768),a=n(50851),l=n(24246),s=n(39997),u=n(39142),d=n(5592),c=n(99511),f=n(42036),m=n(58971),v=n(27378),g=n(11576),p=n(83971),h=n(32488),x=n(15322),C=n(75361),b=n(79165),y=n(2957);function w(){var e=(0,a._)(["  \n  .ant-progress-text {\n    font-size: 16px;\n    font-weight: 500;\n    display: inline-flex;\n    margin-left: 4px;\n    align-items: center;\n    color: ",";\n  }\n  .anticon-check-circle {\n    margin-left: 4px;\n  }\n  .ant-progress-inner {\n    background ",";\n  }\n.ant-progress-outer {\n  display: flex;\n}\n"]);return w=function(){return e},e}var j=s.ZP.div.withConfig({componentId:"sc-659fc68d-0"})(w(),function(e){return e.textColor},function(e){return e.secondaryColor}),S=function(){var e=(0,m.C)(d.RT),t=(0,m.C)(u.kf),n=(0,y.C)(),r=(0,m.C)(b.AT),i=(0,m.C)(d.A0h),o=(0,m.C)(c.VU),a=(0,v.useCallback)(function(){var e,n=function(e){var t=(0,f.getNextStepTemplateFrontendVersion)({step:e}).nextStepTemplate;return t&&""!==t.defaultNextStep?[t.defaultNextStep].concat((0,x._)(t.branches.map(function(e){return e.stepId}))):[]},i=function(e,t,o){o.add(e);var a=r.steps[e];a&&n(a).forEach(function(n){o.has(n)||i(n,t,o),t[e]=Math.max(t[e],1+t[n])})};if(!t)return 1;var o={},a=new Set;return Object.keys(r.steps).forEach(function(e){return o[e]=0}),i(t,o,a),(e=Math).max.apply(e,(0,x._)(Object.values(o)))+1},[r.steps,t]),s=(0,v.useMemo)(function(){if(t&&(null===(e=r.steps[t])||void 0===e?void 0:e.type)==="ending")return 100;var e,i=a();return Math.min(100,n.length/(n.length+i-1)*100)},[a,t,r.steps,n.length]);return e.shouldHide||i.length<=2?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(j,{className:(0,g.AK)("flex"),textColor:o.questionsColor,secondaryColor:o.borderColor,children:(0,l.jsx)(C.Z,{percent:Math.round(s),strokeLinecap:"butt",showInfo:!1,strokeColor:o.primaryColor,strokeWidth:5})})},k=n(91173),I=n(36218),N=n(31053),T=n(61006);function _(){var e=(0,a._)(["\n  @font-face {\n    font-family: '","';\n    src: url('","');\n  }\n"]);return _=function(){return e},e}var V=s.ZP.div.withConfig({componentId:"sc-60c328ee-0"})(_(),function(e){return e.fontName},function(e){return e.url}),P=function(e){var t=e.url,n=e.fontName;return(0,l.jsx)(V,{fontName:n,url:t})},F=n(94400),E=n(14888),A=n(50558),L=n(49616);function M(){var e=(0,a._)(["\n  img {\n    --tw-brightness: ",";\n\n    // Copied from brightness-100\n\n    filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast)\n      var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert)\n      var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n  }\n"]);return M=function(){return e},e}function D(){var e=(0,a._)(["\n  body {\n    background-image: ",";\n    background-repeat: no-repeat;\n    background-attachment: fixed;\n    background-position: center; \n    background-size: cover;\n  }\n"]);return D=function(){return e},e}function R(){var e=(0,a._)(["\n  body {\n    background-color: ",";\n  }\n  // Starting on MOBILE_WIDTH, we make the whole background questionsBackground because it looks better\n  @media screen and (max-width: 768px) {\n    body {\n      background-color: ",";\n    }\n  }\n"]);return R=function(){return e},e}function z(){var e=(0,a._)(["\n  #"," {\n    display: flex;\n    justify-content: center;\n  }\n  #"," {\n    align-items: center;\n  }\n"]);return z=function(){return e},e}function B(){var e=(0,a._)(["\n  p {\n    font-family: ",";\n  }\n\n  div {\n    font-family: ",";\n  }\n\n  span {\n    font-family: ",";\n  }\n  ","\n\n  ","\n"]);return B=function(){return e},e}var O=function(e,t){var n=(0,m.C)(u.F9),r=(0,m.C)(c.VU),i=(0,m.C)(d.VyW),o=(0,f.evaluateGenericObject)({backgroundImage:e},n,{timezone:(0,L.v)(),language:i}).backgroundImage;if(o&&o.includes("unsplash"))return"".concat(o,"&w=2000");if(o)return o;if(T.m[r.formPosition].dontUseImageDefault||t)return"";var a=T.m[r.formPosition].defaultBackgroundImage;return a?a(r):"https://images.unsplash.com/photo-1614850716626-873413eb7c1b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzNTQ5MjV8MHwxfHNlYXJjaHwyMHx8YmFubmVyfGVufDB8MHx8fDE2NzMwNzE4ODY&ixlib=rb-4.0.3&q=80&w=2080"},U=s.ZP.div.withConfig({componentId:"sc-e3f1c96f-0"})(M(),function(e){return"brightness(".concat(e.brightness,")")}),q=function(e){var t=e.className,n=e.evaluatedBackgroundImage,r=e.imageBrightness,i=e.backgroundXPositionPercent,o=e.align,a=e.ImageWrapper,s="edit"===(0,m.C)(u.gh);return(0,l.jsx)(U,{brightness:r,className:(0,g.AK)("flex h-full overflow-hidden w-full","left"===o?"justify-end":"justify-start",t),children:(0,l.jsx)("div",{className:(0,g.AK)("relative flex",s&&("left"===o?"justify-end":"justify-start")),children:(0,l.jsx)(a,{imgUrl:n,moveHorizontally:!0,children:(0,l.jsx)("img",{src:n,alt:"Banner image",role:"presentation",className:"object-cover origin-top-left w-full",style:{objectPosition:"".concat(i,"% center"),objectFit:"cover",height:"100%",width:"100%"}})})})})},Z=function(e){if(e>1)return"linear-gradient(rgba(255,255,255,".concat((e-1)/2,"), rgba(255,255,255,").concat((e-1)/2,"))");var t=(1-e)/1.2;return"linear-gradient(rgba(0,0,0,".concat(t,"), rgba(0,0,0,").concat(t,"))")},W=function(e){return(0,f.replaceAll)(e,"'","\\'")},K=(0,s.vJ)(D(),function(e){return"".concat(Z(e.imageBrightness),", url('").concat(W(e.backgroundImage),"')")}),Y=function(e){var t=e.children,n=e.evaluatedBackgroundImage,r=e.imageBrightness,i=e.className,o=e.ImageWrapper,a=(0,m.C)(d.dbQ),s="edit"===(0,m.C)(u.gh),c=(0,m.C)(d.Wt5),f=!a&&!s,v={backgroundImage:"".concat(Z(r),", url('").concat(W(n),"')"),backgroundRepeat:"no-repeat",backgroundAttachment:"fixed",backgroundPosition:"center",backgroundSize:"cover"},p=(0,A.g)().noScroll;return(0,l.jsxs)("div",{className:(0,g.AK)("flex w-full h-full",s&&"relative",p?"overflow-y-hidden":"overflow-y-auto",i),style:f?{}:v,id:"scrollable-widgets-wrapper",children:[f&&(0,l.jsx)(K,{imageBrightness:r,backgroundImage:n}),s&&"cover"===c&&(0,l.jsx)("div",{className:"w-full h-full absolute",children:(0,l.jsx)(o,{imgUrl:n,containerClassname:"w-full h-full",showOnlyImageAdjust:!0,children:(0,l.jsx)("div",{className:"w-full h-full"})})}),t]})},G=function(e){var t=e.children,n=e.ImageWrapper,r=(0,m.C)(c.VU),i="edit"===(0,m.C)(u.gh),o=O(r.backgroundImage),a=T.m[r.formPosition].forceNavBarToTop;return(0,l.jsxs)("div",{className:"overflow-y-auto flex-col flex w-full h-full relative",children:[a&&(0,l.jsx)("div",{className:(0,g.AK)("w-full","absolute top-0 z-[15]"),children:(0,l.jsx)(k.ZP,{})}),(0,l.jsx)(U,{brightness:r.imageBrightness,children:(0,l.jsx)(n,{imgUrl:o,children:(0,l.jsx)("div",{className:(0,g.AK)(i?"h-[20vh]":"h-[25vh]"," w-full "),children:(0,l.jsx)("img",{src:o,alt:"Cover image",style:{objectPosition:"center ".concat(r.backgroundYPositionPercent,"%"),background:"".concat(Z(r.imageBrightness)),objectFit:"cover",height:"100%",width:"100%"}})})})}),t]})},H=function(e){var t=e.children,n=e.position,r=e.ImageWrapper,i="edit"===(0,m.C)(u.gh),o=(0,m.C)(c.VU),a=o.backgroundImage,s=o.imageBrightness,d=o.backgroundXPositionPercent,f=O(a);return(0,l.jsxs)("div",{className:(0,g.AK)("flex w-full h-full","left"===n?"":"flex-row-reverse"),children:[(0,l.jsx)("div",{className:(0,g.AK)("w-full sm:overflow-y-auto relative ","mt-[10px]",i?"lg:w-[60%] lg:min-w-[500px] lg:px-8":"md:w-[60%] sm:min-w-[500px] sm:px-8",i&&"lg:!pr-12 "),children:t}),(0,l.jsx)(q,{className:(0,g.AK)("w-[38%] lg:w-[40%] hidden  overflow-hidden ",i?"lg:flex":"md:flex",i?"":"fixed",i?"":"left"===n?"right-0":"left-0"),align:n,evaluatedBackgroundImage:f,imageBrightness:s||1,backgroundXPositionPercent:d,ImageWrapper:r})]})},J=function(e){var t,n=e.children,r=e.ImageWrapper,i=(0,m.C)(c.VU),o=O(i.backgroundImage),a=i.formPosition,s=(null===(t=i.backgroundImage)||void 0===t?void 0:t.logic.value)?i.imageBrightness:1;switch(a){case"default":return(0,l.jsx)("div",{className:"flex flex-col justify-center items-center w-full h-full overflow-y-auto",children:n});case"center":case"center_with_image":return(0,l.jsx)(Y,{evaluatedBackgroundImage:o,imageBrightness:s,ImageWrapper:r,children:n});case"image_background":return(0,l.jsx)(Y,{evaluatedBackgroundImage:o,imageBrightness:s,className:"items-center justify-center",ImageWrapper:r,children:n});case"center_with_banner":return(0,l.jsx)(G,{ImageWrapper:r,children:n});case"left":case"right":return(0,l.jsx)(H,{ImageWrapper:r,position:a,children:n});default:throw Error("Unhandled type: ".concat(a))}},Q=(0,s.vJ)(R(),function(e){return e.backgroundColor?e.backgroundColor:void 0},function(e){return e.questionsBackgroundColor?e.questionsBackgroundColor:void 0}),$=(0,s.vJ)(z(),N.zz,N.IJ),X=function(e){var t=e.children,n=e.dontInheritPropsInWrapper,a=e.id,s=(0,o._)(e,["children","dontInheritPropsInWrapper","id"]),d=(0,m.C)(c.VU),f=d.customCSS&&!d.customCSSDisabled?d.customCSS:"",v=(0,F.Yw)(d.font),p=v?"'".concat(v,"', ").concat(h.ke):h.ke,x=(0,m.C)(u.gh);return(0,l.jsx)(ee,(0,i._)((0,r._)({font:p,customCss:f,filloutManagedCss:""},s),{id:a,children:(0,l.jsx)("div",(0,i._)((0,r._)({},n?{}:s),{className:(0,g.AK)(!n&&s.className,"edit"===x&&E.Z.editMode,"preview"===x&&E.Z.liveMode,"live"===x&&E.Z.liveMode),children:t}))}))},ee=s.ZP.div.withConfig({componentId:"sc-e3f1c96f-1"})(B(),function(e){return e.font},function(e){return e.font},function(e){return e.font},function(e){return e.filloutManagedCss},function(e){return e.customCss.replace(/\s*!important\s*/g,"").replace(/;\s*|\s*$/g," !important$&")}),et=(0,v.memo)(function(){var e,t,n,r,i,o,a,s,u,d,f,v=(0,m.C)(c.VU);return v.font?"google_font"===v.font.type&&(null===(e=v.font.googleFont)||void 0===e?void 0:e.name)?(0,l.jsx)(p.Z,{fonts:[{font:null===(a=v.font.googleFont)||void 0===a?void 0:a.name,weights:[400,500,700,800,900]}]}):(null===(t=v.font)||void 0===t?void 0:t.type)==="custom"&&(null===(n=v.font)||void 0===n?void 0:null===(r=n.customFont)||void 0===r?void 0:r.name)&&(null===(i=v.font)||void 0===i?void 0:null===(o=i.customFont)||void 0===o?void 0:o.url)?(0,l.jsx)(P,{url:null===(s=v.font)||void 0===s?void 0:null===(u=s.customFont)||void 0===u?void 0:u.url,fontName:null===(d=v.font)||void 0===d?void 0:null===(f=d.customFont)||void 0===f?void 0:f.name}):(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(l.Fragment,{})}),en=function(e){var t=e.children,n=e.customBackgroundColor,r=e.ImageWrapper,i="edit"===(0,m.C)(u.gh),o=!(0,m.C)(d.dbQ)&&!i,a=(0,m.C)(c.VU),s=T.m[a.formPosition].canAddFormBackground?a.backgroundColor:a.questionsBackgroundColor,f=(0,m.C)(d.lbz),v=n||s,p=(0,m.C)(d.RT),h=!p.shouldHide&&!i&&!p.style&&!f;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(X,{id:"widget-layout-container",className:(0,g.AK)("flex w-full h-full justify-between overflow-hidden flex-col",i&&"rounded-xl overflow-hidden border-[0.5px] border-gray-300 shadow-lg"),style:{background:o?void 0:v},children:[h&&(0,l.jsx)("div",{className:"w-full sticky top-0 z-[13]",children:(0,l.jsx)(S,{})}),o&&(0,l.jsx)(Q,{backgroundColor:v,questionsBackgroundColor:a.questionsBackgroundColor}),"center"===a.formAlignment&&(0,l.jsx)($,{}),(0,l.jsx)(J,{ImageWrapper:r,children:t})]}),(0,l.jsx)(I.i,{}),(0,l.jsx)(et,{})]})}},63585:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(24246),i=n(5592),o=n(39142),a=n(58971),l=n(98784),s=n(27378),u=n(61429),d=n(22351),c=n(99511),f=n(11576),m=n(45628),v=n(32488),g=n(15393),p=n(89604),h=n(50858),x=n(55818),C=n(97145),b=n(71871),y=n(42036),w=n(14888),j=n(4430),S=function(e){var t,n=e.widgetId,u=e.widget,d=e.hiddenButRendered,m=e.dontRender,v=e.noLeftPadding,g=e.className,S=e.mode,k=e.autoFocus,I=e.evaluatedTemplate,N=e.isHalfWidth,T=(0,a.T)(),_=(0,a.C)(c.VU),V=(0,a.C)(o.kf),P=(0,a.C)(i.aJV),F=(0,a.C)(i.J$G),E=(0,a.C)(i.CND),A=(0,a.C)(i.AAI),L=(0,a.C)(o.F),M=(0,a.C)(o.js),D=(0,a.C)(i.Cnq),R=(0,a.C)(i.DWE),z=(0,a.C)(i.H7w),B=(0,a.C)(o.y9),O=z&&"reviewing"===B,U=(0,a.C)(o.UY,function(e,t){return(0,l.isEqual)(null==e?void 0:e[n],null==t?void 0:t[n])})[n],q=null==U?void 0:U.value,Z=(0,a.C)(i.uCB),W=(0,a.C)(i.Do1),K=C.C[u.type].Component,Y=(0,s.useCallback)(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r=arguments.length>2?arguments[2]:void 0;if(!O){T((0,o.OR)({modelKey:t,stepId:V,newValue:e,widgetId:n,flowPublicIdentifier:Z,selectedOptionIds:r}));var i=p.wY[u.type];i.summarizeValue&&T((0,o.OR)({modelKey:"summaryValue",stepId:V,newValue:i.summarizeValue(e),widgetId:n,flowPublicIdentifier:Z}))}},[V,Z,T,n,u.type,O]),G=y.SHARED_WIDGETS[u.type].docs.emptyValue,H=y.SHARED_WIDGETS[u.type].excludeFromModel;(0,s.useEffect)(function(){!H&&m&&G!==q&&(Y(G),T((0,o.Au)({widgetId:n,stepId:V,defaultValue:G})))},[V,n,m,q,Y,G,H,T]);var J=(0,s.useMemo)(function(){var e={};if((null==R?void 0:R.email)&&"none"!==R.enrichmentType&&"edit"!==S){var t=null===(a=R.fieldEnrichmentMappings)||void 0===a?void 0:a.find(function(e){var t;return(null===(t=e.widget)||void 0===t?void 0:t.widgetId)===n&&e.widget.stepId===V});if(null==t?void 0:t.enrichmentProperty){var r=t.enrichmentProperty.split("_"),i=r.at(0),o=r.at(1);if(("company"===i||"person"===i)&&o){var a,l,s,d=null==M?void 0:null===(l=M.email)||void 0===l?void 0:null===(s=l[i])||void 0===s?void 0:s[o];e.isEnrichedField=!0,"string"==typeof d?b.s.includes(u.type)&&(e.enrichedValue=d):"number"==typeof d&&(b.K.includes(u.type)?e.enrichedValue=d:b.s.includes(u.type)&&(e.enrichedValue=String(d)))}}}return e},[S,R,V,null==M?void 0:M.email,n,u.type]),Q=J.isEnrichedField,$=J.enrichedValue,X=(0,s.useMemo)(function(){var e,t,r="defaultValue"in I&&"defaultValue"in u.template;if(Q&&"edit"!==S&&r&&$)return{resultantEvaluatedTemplate:(0,x._)((0,h._)({},I),{defaultValue:$}),resultantUnevaluatedTemplate:(0,x._)((0,h._)({},u.template),{defaultValue:" "})};var i=null==D?void 0:null===(e=D[V])||void 0===e?void 0:e[n];return"edit"!==S&&A&&L&&i&&r?{resultantEvaluatedTemplate:(0,x._)((0,h._)({},I),{defaultValue:null===(t=L.data)||void 0===t?void 0:t[i.name||i.id]}),resultantUnevaluatedTemplate:(0,x._)((0,h._)({},u.template),{defaultValue:"".concat(y.UNIQUE_UPDATE_RECORD_QUERY_ID)})}:{resultantUnevaluatedTemplate:u.template,resultantEvaluatedTemplate:I}},[V,I,A,D,S,L,n,u.template,Q,$]),ee=X.resultantUnevaluatedTemplate,et=X.resultantEvaluatedTemplate,en=(0,s.useMemo)(function(){return Q&&(null==R?void 0:R.enrichmentType)==="formShorten"?!M||!!$:d},[d,Q,$,M,null==R?void 0:R.enrichmentType]);if(m)return(0,r.jsx)(r.Fragment,{});var er=k&&"edit"!==S&&!P&&W===n&&!(0,f.zd)(),ei=j.z+(_.verticalFieldPadding||0);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:(0,f.AK)("border-2 border-transparent",!v&&"pr-5",g,en&&!m&&"hidden","medium"===_.formSizing&&"mt-1","large"===_.formSizing&&"mt-2","small"===_.formSizing&&"","extra_small"===_.formSizing&&"",F&&"text-right",E&&"notranslate",(t=u.type.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"".concat(w.Z.fieldPrefix).concat(t))),style:(0,x._)((0,h._)({},F?{direction:"rtl"}:{}),{paddingTop:ei,paddingBottom:ei}),id:"widget-".concat(n),children:(0,r.jsx)(K,{autoFocus:er,widgetId:n,isReadonlyMode:O,evaluatedTemplate:et,unevaluatedTemplate:ee,value:q,setValue:Y,isHalfWidth:N,rootWidgetModelValue:U})})})},k=function(e){var t,n=e.widgetId,o=e.evaluatedTemplate,l=e.dontRender,u=e.hiddenButRendered,d=e.hiddenInLiveMode,c=null===(t=(0,a.C)(i.yu$))||void 0===t?void 0:t[n],f=l||u||d,m=!o.isDefaultOpen,v=null==o?void 0:o.isCollapsable,g=(0,a.T)(),p=(0,s.useCallback)(function(e){g((0,i.x4T)({sectionWidgetId:n,isOpen:!e}))},[g,n]);return(0,s.useEffect)(function(){f?c||p(!0):!v&&c&&p(!1)},[f,n,g,c,p,v]),(0,s.useEffect)(function(){v&&p(m)},[m,p,v]),(0,r.jsx)(r.Fragment,{})},I=(0,s.memo)(function(e){var t=e.widget,n=e.widgetId,l=e.mode,s=e.isSelected,u=e.evaluatedTemplate,d=e.autoFocus,c=e.noLeftPadding,m=e.inSection,g=e.hasSibling,h=e.isSibling,x=e.WidgetEditorContainer,C=(0,a.C)(o.kf),b=(0,a.C)(i.G$Z),y=(0,a.C)(i.AAI),w=(0,a.C)(i.rcW)[n]||0,j=(0,a.C)(i.Mlc),I=(0,a.C)(i.$D1);if(!u)return(0,r.jsx)(r.Fragment,{});if(I&&"Button"===t.type)return(0,r.jsx)("div",{className:"h-10"});var N=u.alwaysHide,T=!N&&(0,p.TY)(u),_="edit"===l,V=T||N||j.includes(n),P=T&&!y&&!_,F=(T||N&&!_||j.includes(n))&&(!_||v.jp),E=h||g||u.halfWidth;return(0,r.jsxs)(r.Fragment,{children:["SectionCollapse"===t.type&&(0,r.jsx)(k,{hiddenInLiveMode:V,dontRender:P,hiddenButRendered:F,evaluatedTemplate:u,widgetId:n}),x?(0,r.jsx)(x,{id:n,isOverlay:!1,isDragging:b===n,selected:s,widgetId:n,hidden:F,hiddenInLiveMode:V,widgetType:t.type,children:(0,r.jsx)(S,{widgetId:n,widget:t,hiddenButRendered:F,dontRender:P,noLeftPadding:c,mode:l,autoFocus:d,evaluatedTemplate:u,isHalfWidth:E})},"".concat(C,"-").concat(n,"-").concat(w)):(0,r.jsx)("div",{className:(0,f.AK)(!m&&"pl-5",h&&"!sm:pl-4",g&&!h&&"-mr-1"),children:(0,r.jsx)(S,{widgetId:n,widget:t,hiddenButRendered:F,dontRender:P,noLeftPadding:c,mode:l,autoFocus:d,evaluatedTemplate:u,isHalfWidth:E})})]})},l.isEqual),N=n(71866),T=n.n(N),_=n(31053),V=(0,s.memo)(function(e){var t=e.evaluatedTemplate,n=e.selectedWidgetId,i=e.w,o=e.mode,a=e.hasSibling,l=e.isSibling,s=e.autoFocus,u=e.stepId,d=e.WidgetEditorContainer,c=i.id;return(0,r.jsx)("div",{className:"w-full min-w-0",children:(0,r.jsx)(I,{isSibling:l,autoFocus:s,isSelected:n===c,widgetId:c,evaluatedTemplate:t,widget:i,mode:o,inSection:!1,hasSibling:a,WidgetEditorContainer:d})},"".concat(u,"-").concat(c))},l.isEqual);function P(e){var t=e.row,n=(0,a.C)(c.VU),i="".concat(_.Tb.above,"-").concat(t),o=(0,g.nB)({id:i}),l=o.setNodeRef,s=o.isOver,d=s?n.primaryColor:"transparent";return(0,r.jsxs)("div",{id:i,ref:l,className:(0,f.AK)(" absolute left-0 -top-1 right-0 h-1 z-1"),style:{background:d},children:[s&&(0,r.jsx)("div",{className:"relative z-10 ",children:(0,r.jsx)("div",{className:"absolute -top-[7px] left-[calc(50%-9px)]",children:(0,r.jsx)("div",{className:"rounded-full",style:{background:d},children:(0,r.jsx)(u.d2U,{style:{color:n.questionsBackgroundColor},className:"w-[18px] h-[18px]"})})})}),(0,r.jsx)("div",{className:"! h-full w-full flex flex-grow-0"})]})}function F(e){var t=e.row,n=e.side,i=(0,a.C)(c.VU),o="".concat("left"===n?_.Tb.left:_.Tb.right,"-").concat(t),l=(0,g.nB)({id:o}),s=l.setNodeRef,d=l.isOver,m=d?i.primaryColor:"transparent";return(0,r.jsxs)("div",{id:o,ref:s,className:(0,f.AK)(" absolute -left-1 top-0 bottom-0 w-1"),style:{background:m},children:[d&&(0,r.jsx)("div",{className:"relative z-10 h-full",children:(0,r.jsx)("div",{className:"absolute top-[calc(50%-9px)] -left-[7px] ",children:(0,r.jsx)("div",{className:"rounded-full",style:{background:m},children:(0,r.jsx)(u.d2U,{style:{color:i.questionsBackgroundColor},className:"w-[18px] h-[18px]"})})})}),(0,r.jsx)("div",{className:"! h-full w-full flex flex-grow-0"})]})}function E(e){var t=(0,g.nB)({id:"".concat(_.Tb.right,"-").concat(e.row)}).isOver,n=(0,a.C)(c.VU);return(0,r.jsx)("div",{className:(0,f.AK)(" flex justify-end items-center flex-grow w-full","m-2 block w-full rounded-lg border-2 border-dashed   text-center "),style:{background:t?n.editorFaintPrimaryColor:"",opacity:.5,borderColor:t?n.primaryColor:T().gray[300]},children:(0,r.jsx)("div",{className:"! h-4 w-4 flex flex-grow-0"})})}var A=function(e){var t=e.row,n=e.canAddSiblingsForRow,i=e.isEditMode;return(0,r.jsx)(r.Fragment,{children:n&&i?(0,r.jsx)(E,{row:t}):(0,r.jsx)("div",{className:"w-full"})})},L=function(e){var t,n,l=e.bodyWidgetRows,s=e.mode,u=e.evaluatedWidgetTemplatesForStep,d=e.isDraggingNewWidget,c=e.selectedWidgetId,m=e.WidgetEditorContainer,v=(0,a.C)(i.G$Z),g=(0,a.C)(o.kf),h=l[l.length-1],x=(null==h?void 0:null===(t=h[0])||void 0===t?void 0:t.type)!=="Button",C=v&&(null===(n=l.find(function(e){return e.find(function(e){return e.id===v})}))||void 0===n?void 0:n[0]),b="edit"===s,w=C&&p.wY[C.type].canBeMultiColumn||d,j=!1,S=!1;return(0,r.jsxs)(r.Fragment,{children:[l.map(function(e,t){var n,i,o=e[0],a=e[1],l=v&&e.some(function(e){return e.id===v}),h=v===o.id&&!a;if(!p.wY[o.type])return(0,r.jsx)(r.Fragment,{});var x=p.wY[o.type].canBeMultiColumn&&!h,C=w&&x&&(e.length<2||l),k=!!a,I=null===(n=u[o.id])||void 0===n?void 0:n.halfWidth;return j||!o||(null===(i=y.SHARED_WIDGETS[o.type])||void 0===i?void 0:i.excludeFromModel)?S=!1:(j=!0,S=!0),(0,r.jsxs)("div",{className:(0,f.AK)("flex w-full h-full relative",!b&&"flex-col sm:flex-row"),children:[b&&(0,r.jsxs)(r.Fragment,{children:[!d&&C&&(0,r.jsx)(F,{row:t,side:"left"}),(0,r.jsx)(P,{row:t})]}),(0,r.jsx)(V,{evaluatedTemplate:u[o.id],selectedWidgetId:c,stepId:g,w:o,autoFocus:S,mode:s,hasSibling:k,isSibling:!1,WidgetEditorContainer:m}),k?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(V,{evaluatedTemplate:u[a.id],selectedWidgetId:c,w:a,autoFocus:!1,mode:s,stepId:g,isSibling:!0,hasSibling:!0,WidgetEditorContainer:m})}):I?(0,r.jsx)(A,{row:t,canAddSiblingsForRow:!!C,isEditMode:b}):(0,r.jsx)(r.Fragment,{}),C&&b&&(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(F,{row:t,side:"right"})})]},o.id)}),x&&b&&(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(P,{row:l.length})})]})},M=function(e){var t=e.WidgetEditorContainer,n=(0,a.C)(i.CVU),g=(0,a.C)(i.zRe),p=(0,a.C)(o.kf),h=(0,a.C)(o.Pq),x=(0,a.C)(c.VU),C=(0,a.C)(i.MVT),b=(0,a.C)(o.F9),y=(0,a.C)(o.gh),w=(0,a.C)(i.VyW),j=(0,a.T)();(0,s.useEffect)(function(){j((0,o.Dk)({widgets:(0,l.flatten)(n),currentStepId:p,formLanguage:w}))},[b,j,n,p,w]),(0,d.P)();var S="image_background"===x.formPosition?x.questionsColor:x.slightlyFadedQuestionsColor,k=(0,a.C)(i.W32);return(0,r.jsxs)(m.D_,{children:[k&&(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:(0,f.AK)("h-full w-full flex items-center text-slate-400 flex-col justify-center mt-5 mb-10"),style:{color:S,fontFamily:v.ke},children:[(0,r.jsx)(u.UNN,{className:"w-6 h-6 mb-3"}),(0,r.jsxs)("h3",{className:"font-normal",style:{color:S},children:[(0,r.jsx)("strong",{children:"Drag and drop"})," questions from the left-hand side to build your form."]})]})}),(0,r.jsx)(L,{bodyWidgetRows:n,selectedWidgetId:g,isDraggingNewWidget:!!C,evaluatedWidgetTemplatesForStep:h[p]||{},mode:y,WidgetEditorContainer:t})]})}},45628:function(e,t,n){"use strict";n.d(t,{D_:function(){return z},_0:function(){return R},ZP:function(){return B}});var r=n(24246),i=n(5592),o=n(58971),a=n(15460),l=n(61006),s=n(11576),u=n(50858),d=n(89604),c=n(67262),f=n(36314),m=n(42036),v=n(27378),g=n(10680),p=n(53876),h=n(98784),x=n(31398),C=function(e){var t,n=e.widget,a=(0,o.C)(f.F9),l=(0,o.C)(f.kf),s=(0,o.C)(i.Nad),d=(0,o.C)(i.VyW),C=null==a?void 0:null===(t=a[l])||void 0===t?void 0:t[n.id],b=(0,g.D9)({widgetModel:C,widgetId:n.id}),y=(0,c.L)({skipValidations:!0,dontProceedToEndingPages:!0});return(0,v.useEffect)(function(){var e=m.SHARED_WIDGETS[n.type].docs.emptyValue;if(b&&b.widgetModel&&b.widgetId===n.id&&C&&!(0,h.isEqual)(b.widgetModel.value,C.value)&&C.value!==e&&null!=C.value){var t=p.h.getState();if(s&&Object.keys(s).length>0){var r=(0,u._)({},t.model.model),i=(0,x.UI)(r,s,d),o=i.hasChanged,a=i.newCalculationsModel;o&&(r.calculations=a),null==y||y(r)}else null==y||y(t.model.model)}},[b,C,y,n.type,n.id,d,s]),(0,r.jsx)(r.Fragment,{})},b=function(){var e,t,n=(0,o.C)(i.DVV),a=n&&(null===(t=(e=d.wY[n.type]).canAutoJump)||void 0===t?void 0:t.call(e,n.template));return(0,r.jsx)(r.Fragment,{children:a&&(0,r.jsx)(C,{widget:n})})},y=n(18775),w=n(53755),j=n(87653),S=n(99511),k=n(14888),I=n(82879),N=n(79165),T=function(e){var t,n=e.children,a=(0,o.C)(S.VU),u=l.m[a.formPosition].shouldCenter,d=(0,j.VW)({disabled:u}).divRef,c=(0,w.O)().shouldShowNavBar,f=(0,o.C)(S._Y),m=(0,o.C)(i.lbz),v=a.containerBorder&&"center"===a.formPosition,g=(0,I.wr)(),p=(0,o.C)(N.mr),h=(0,r.jsx)("div",{id:"question-container",ref:d,className:(0,s.AK)("w-full flex flex-col sm:rounded-lg relative",m?"mt-1":"mt-0",f?c?"py-[2px]":"py-2":"py-4","small"===a.formSizing&&"px-2","extra_small"===a.formSizing&&"px-1","medium"===a.formSizing&&"px-2","large"===a.formSizing&&"px-3",p&&"!p-0 !px-0 !py-0",u&&"h-full","z-10",k.Z.questionsContainer,v&&"sm:ring-2"),style:(t={background:l.m[a.formPosition].transparentQuestionsBackground?"transparent":a.questionsBackgroundColor},(0,y._)(t,"--tw-ring-color",v?a.containerBorderColor?a.containerBorderColor:a.primaryColor:void 0),(0,y._)(t,"maxWidth","".concat(g,"px")),t),children:n});return"center"===a.formPosition||"center_with_banner"===a.formPosition?(0,r.jsx)("div",{className:"pb-6 sm:pb-20 w-full flex justify-center",children:h}):(0,r.jsx)(r.Fragment,{children:h})},_=n(50558),V=function(e){var t=e.children,n=(0,o.C)(S.VU),i=l.m[n.formPosition].shouldCenter,a=(0,o.C)(S._Y),u=(0,w.O)().shouldShowNavBar,d=(0,j.VW)({disabled:!i,manualPadding:a?25:60}).divRef,c=(0,_.g)().noScroll;return i?(0,r.jsx)("div",{className:(0,s.AK)("flex flex-col w-full h-full",(0,j.rp)()?"justify-start":"justify-center"),id:"question-alignment-container",children:(0,r.jsx)("div",{className:(0,s.AK)("mx-auto max-h-full w-full",c?"overflow-y-hidden":"my-auto",i&&c&&"overflow-x-hidden sm:overflow-x-auto"),children:(0,r.jsx)("div",{className:(0,s.AK)("flex flex-col  justify-center w-full min-h-full",a&&!u?"pb-3":"pb-10"),ref:d,children:t})})}):(0,r.jsx)("div",{id:"question-alignment-container",className:(0,s.AK)("flex h-full w-full flex-col mt-0"),children:t})},P=n(68349),F=n(63585),E=n(52131),A=n(91173),L=n(85801),M=n(36218),D=function(e){var t=e.children;return(0,r.jsx)(r.Fragment,{children:t})},R=function(e){var t=e.children;return(0,r.jsx)(P.ZP,{ImageWrapper:D,children:(0,r.jsx)("div",{className:"sm:pb-4 w-full flex items-center flex-col h-full pt-10",children:(0,r.jsx)(T,{children:(0,r.jsx)(V,{children:(0,r.jsx)("div",{className:"mx-2",children:t})})})})})},z=function(e){var t=e.children,n=(0,o.C)(S.VU),i=l.m[n.formPosition],u=i.forceNavBarToTop,d=i.shouldCenter,c=(0,_.g)().noScroll;return(0,r.jsxs)("div",{className:(0,s.AK)("sm:pb-4 w-full flex items-center flex-col h-full",d&&c&&"overflow-y-hidden overflow-x-hidden"),id:a.y,children:[!u&&(0,r.jsx)(A.ZP,{}),(0,r.jsx)(T,{children:(0,r.jsx)(L.Z,{children:(0,r.jsxs)(V,{children:[t,(0,r.jsx)(M.B,{})]})})})]})},B=function(){(0,E.Z)();var e=(0,o.C)(i.dHb);return(0,r.jsxs)(P.ZP,{ImageWrapper:D,children:[e&&(0,r.jsx)(b,{}),(0,r.jsx)(F.Z,{})]})}},52131:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51037),i=n(85556),o=n(42036),a=n(99511),l=n(58971),s=function(){var e,t=(0,l.T)();window.addEventListener("message",(e=(0,r._)(function(e){var n,r,l;return(0,i.Jh)(this,function(i){try{if("string"!=typeof e.data)return[2];"__internal_theme_override"===(n=JSON.parse(e.data)).channel&&(r=n.themeId,(l=o.FEATURED_THEMES.find(function(e){return e.galleryThemeId===r}))&&t((0,a.Dc)({theme:l.theme})))}catch(e){console.error(e)}return[2]})}),function(t){return e.apply(this,arguments)}))}},11558:function(e,t,n){"use strict";n.d(t,{q:function(){return y},r:function(){return w}});var r=n(51037),i=n(50858),o=n(55818),a=n(60053),l=n(85556),s=n(89426),u=n(5592),d=n(39142),c=n(42036),f=n(69357),m=n(58971),v=n(27378),g=n(11576),p=n(38580),h=n(22208),x=n(49616),C=n(61320),b=n.n(C),y=function(e){if("custom"===e.durationMins){var t=e.customDuration;return(!(0,c.isNumeric)(t)||t<=0)&&(t=30),t}return Number(e.durationMins)},w=function(){var e,t=(0,m.C)(s.te),n=(0,m.C)(d.gh),C=(0,m.C)(f.dt),w=(0,m.C)(f.Pf),j=(0,m.C)(d.nx),S=(0,m.C)(d.F9),k=(0,a._)((0,v.useState)(!1),2),I=k[0],N=k[1],T=(0,m.C)(u.dBz),_=(0,m.C)(u.uCB),V=(0,m.T)();return{scheduleEvent:(0,v.useCallback)((e=(0,r._)(function(e,r,a){var s,u,d,f,m,v,k,I,P;return(0,l.Jh)(this,function(l){switch(l.label){case 0:if(s="/v1/flow/".concat(_,"/scheduling/scheduleEvent?mode=").concat(n),!r.eventStartTime||!j)return[2,{canContinue:!1}];if("edit"===n)return(0,g.F0)("Preview to test your scheduling form.",{position:"top-center",duration:4e3}),[2,{canContinue:!1}];l.label=1;case 1:if(l.trys.push([1,6,,7]),N(!0),d=y(a),f=a.eventType,m={},"individual"===f&&a.availabilityId&&r.userId&&(m[r.userId]=a.availabilityId),v={timezone:r.timezone||(0,x.v)(),invitee:{email:r.email,fullName:r.fullName},stepId:e,startTimeUtc:r.eventStartTime,endTimeUtc:b()(r.eventStartTime).add(d,"minutes").toISOString(),guestEmails:r.guestEmails||[],userId:a.userId,locations:a.locations,phone:r.phone,sessionToken:j,groupUserIds:"collective"===f?a.collectiveUserIds:void 0,eventType:f,roundRobinSettings:a.roundRobinSettings,userAvailabilityIds:m,model:S},!("live"!==n))return[3,3];if(!C||!w)throw Error("Organization ID or sid not present outside live mode");return[4,(0,p.tD)(t,C,w,s,"POST",v,void 0)];case 2:return u=l.sent(),[3,5];case 3:return[4,(0,p.UX)(t,s,"POST",v,void 0)];case 4:u=l.sent(),l.label=5;case 5:if(N(!1),u&&u.event)return[2,{newSchedulingModel:(0,o._)((0,i._)({},r),{eventId:u.event.id,eventUrl:u.event.htmlLink,googleMeetsLink:u.event.googleMeetsLink,zoomMeeting:u.event.zoomMeeting,calendarId:u.event.calendarId,error:u.errors?u.errors.join("\n"):void 0,userId:u.event.userId,rescheduleOrCancelLink:u.event.rescheduleOrCancelLink,scheduledUserEmail:u.event.scheduledUserEmail}),canContinue:!0}];if(null==u?void 0:u.hadConflict)return V((0,h.Of)({stepId:v.stepId})),[2,{canContinue:!1}];if(null==u?void 0:u.formClosed)return N(!1),k=(null==T?void 0:T.disabledFormMessage)?"".concat((0,c.stripMarkdown)(null==T?void 0:T.disabledFormMessage.title),"\n").concat((0,c.stripMarkdown)(T.disabledFormMessage.subtitle)):"This form has been closed, please contact the form owner",(0,g.eZ)(k,{autoClose:!1,position:"top-center"}),[2,{canContinue:!1}];return[3,7];case 6:if(I=l.sent(),N(!1),P=(null==I?void 0:I.message)||"An error occurred","live"!==n)return(0,g.eZ)(P,{autoClose:!1,position:"top-center"}),[2,{canContinue:!1}];return[2,{newSchedulingModel:(0,o._)((0,i._)({},r),{error:P}),canContinue:!0}];case 7:return[2,{canContinue:!1}]}})}),function(t,n,r){return e.apply(this,arguments)}),[n,C,w,t,_,V,j,null==T?void 0:T.disabledFormMessage,S]),loading:I}}},85801:function(e,t,n){"use strict";n.d(t,{p:function(){return h}});var r=n(50858),i=n(60053),o=n(24246),a=n(72279),l=n(61006),s=n(5592),u=n(39142),d=n(99511),c=n(58971),f=n(27378),m=n(57367),v=n(78190),g=function(e,t){var n=(0,c.T)(),r=(0,c.C)(u.Zd),o=(0,i._)((0,f.useState)(!1),2),l=o[0],d=o[1],m=(0,i._)((0,f.useState)(!1),2),v=m[0],g=m[1],p=(0,c.C)(s.uCB),h=(0,f.useCallback)(function(){n((0,u.D7)({flowPublicIdentifier:p,stepId:null==r?void 0:r.stepId})),(null==r?void 0:r.isEnding)&&(0,a.Z3)(e,p),n((0,u.YV)({transition:void 0}))},[n,p,e,null==r?void 0:r.isEnding,null==r?void 0:r.stepId]);return(0,f.useEffect)(function(){!r||(null==r?void 0:r.isBackTransition)?(null==r?void 0:r.isBackTransition)&&(t?h():g(!0)):t?h():d(!0)},[r,t,h]),{isAnimatingOutForward:l,isAnimatingOutBackward:v,onGoToNextStep:h}},p=function(e){var t=e.children,n=e.mode,a=(0,c.C)(d.VU),s=l.m[a.formPosition].animationType,u=g(n,!1),p=u.isAnimatingOutForward,h=u.isAnimatingOutBackward,x=u.onGoToNextStep,C=(0,i._)((0,f.useState)(!1),2),b=C[0],y=C[1];return b?(0,o.jsx)(m.rs,{play:p||h,duration:v.S,start:(0,r._)({opacity:1,width:"100%",height:"100%"},"slide_in"===s?{position:"absolute",left:"0"}:{}),end:(0,r._)({opacity:0,width:"100%",height:"100%"},"slide_in"===s?{left:h?"20vw":"-20vw",position:"absolute"}:{}),onComplete:function(){x()},children:t}):(0,o.jsx)(m.rs,{play:!0,duration:v.Z,start:{opacity:0,width:"100%",height:"100%"},end:{opacity:1,width:"100%",height:"100%"},onComplete:function(){y(!0)},children:t})},h=function(e){var t=e.children;return g(e.mode,!0),(0,o.jsx)("div",{style:{width:"100%",height:"100%"},children:t})};t.Z=function(e){var t=e.children,n=(0,c.C)(u.gh),r=(0,c.C)(u.kf),i=(0,c.C)(d.VU),a=l.m[i.formPosition].animationType;return"edit"===n?(0,o.jsx)(o.Fragment,{children:t}):"none"===a?(0,o.jsx)(h,{mode:n,children:t}):(0,o.jsx)("div",{className:"flex w-full h-full relative justify-center",id:"step-transition-container",children:(0,o.jsx)(p,{mode:n,children:t},r)})}},78190:function(e,t,n){"use strict";n.d(t,{S:function(){return i},Z:function(){return r}});var r=.3,i=.2},94400:function(e,t,n){"use strict";n.d(t,{Yw:function(){return r},fb:function(){return o}});var r=function(e){var t,n,r,i;return(null==e?void 0:e.type)==="google_font"&&(null==e?void 0:null===(t=e.googleFont)||void 0===t?void 0:t.name)?null==e?void 0:null===(r=e.googleFont)||void 0===r?void 0:r.name:(null==e?void 0:e.type)==="custom"&&(null==e?void 0:null===(n=e.customFont)||void 0===n?void 0:n.name)?null==e?void 0:null===(i=e.customFont)||void 0===i?void 0:i.name:void 0},i=function(e){var t=e.replace(/ +/g,"+"),n="400,500,700,800,900";return"https://fonts.googleapis.com/css?family=".concat(t+(n&&":".concat(n)))},o=function(e){var t,n,r,o,a;return(null==e?void 0:e.type)==="google_font"&&(null==e?void 0:null===(t=e.googleFont)||void 0===t?void 0:t.name)?i(null==e?void 0:null===(o=e.googleFont)||void 0===o?void 0:o.name):(null==e?void 0:e.type)==="custom"&&(null==e?void 0:null===(n=e.customFont)||void 0===n?void 0:n.name)&&(null==e?void 0:null===(r=e.customFont)||void 0===r?void 0:r.url)?null==e?void 0:null===(a=e.customFont)||void 0===a?void 0:a.url:void 0}},81281:function(e,t,n){"use strict";n.d(t,{C:function(){return l},u:function(){return s}});var r=n(42036),i=function(e){n.e(938).then(n.t.bind(n,60938,23)).then(function(e){return e.default}).then(function(t){t.init(e,void 0,{autoConfig:!0,debug:!1}),t.pageView()})},o=function(e,t){window.fbq&&window.fbq("trackCustom",e,t)},a=function(e,t){if("edit"!==t){var n,i=null===(n=(0,r.getOnlyIntegrationOfServiceType)(e.integrations,"facebookPixel"))||void 0===n?void 0:n.integration;if(i)return i.writeQuery.config.pixelId}},l=function(e,t,n,r){if(a(e,r)){var i=e.steps[n];i&&("ending"===i.type?o("Fillout.FormSubmitted",{content_category:t,value:n}):o("Fillout.FormPageViewed",{content_category:t,value:n}))}},s=function(e,t,n){if(e){var r=a(e,n);r&&(i(r),e.firstStep&&l(e,t,e.firstStep,n))}}},20847:function(e,t,n){"use strict";n.d(t,{M$:function(){return o},ri:function(){return l},wh:function(){return i}});var r=n(24106),i=function(e,t){var n=t.filter(function(e){return e.isCorrect&&e.textValue}),r=("string"==typeof e?e:String(e)).trim().toLowerCase(),i=n.map(function(e){var t;return null===(t=e.textValue)||void 0===t?void 0:t.toLowerCase()}).findIndex(function(e){return e===r}),o=i>=0&&n[i];return{isCorrect:!!o,correctTextValues:n,chosenCorrectAnswer:o}},o=function(e,t,n,i){var o=t.filter(function(e){return e.isCorrect&&e.optionId}).filter(function(e){return i.staticOptions.find(function(t){return t.id===e.optionId})}).map(function(e){return e.optionId});return r.B7.includes(n)?{isCorrect:e.length>0&&o.every(function(t){return e.includes(t)})&&e.length===o.length,correctOptionIds:o}:{isCorrect:1===e.length&&o.includes(e[0]),correctOptionIds:o}},a=function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(e.steps)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l,s,u=o.value,d=e.steps[u];if(null===(l=d.template)||void 0===l?void 0:null===(s=l.widgets)||void 0===s?void 0:s[t])return{widgetTemplate:d.template.widgets[t],stepId:u}}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return{widgetTemplate:void 0,stepId:void 0}},l=function(e,t){var n=0,l=0,s=t.quizzes,u=!0,d=!1,c=void 0;try{for(var f,m,v=Object.keys(s.answers)[Symbol.iterator]();!(u=(m=v.next()).done);u=!0)!function(){var u=m.value,d=s.answers[u].answers,c=a(t,u),f=c.widgetTemplate,v=c.stepId;if((null==f?void 0:f.type)&&v){var g=null===(y=e[v])||void 0===y?void 0:null===(w=y[u])||void 0===w?void 0:w.value,p=void 0,h=void 0;if(r.ke.includes(f.type)){if("string"!=typeof g&&"number"!=typeof g)p=!1,h=[];else{var x=i(g,d),C=x.isCorrect,b=x.chosenCorrectAnswer;p=C,h=b?[b]:[]}}else{if(!r.$z.includes(f.type))return;var y,w,j,S,k=null===(j=e[v])||void 0===j?void 0:null===(S=j[u])||void 0===S?void 0:S.selectedOptionIds;if(k&&Array.isArray(k)){var I=f.template,N=o(k,d,f.type,I.options),T=N.isCorrect,_=N.correctOptionIds;p=T,h=d.filter(function(e){return e.optionId&&_.includes(e.optionId)&&k.includes(e.optionId)})}else p=!1,h=[]}if(r.B7.includes(f.type)){var V=s.answers[u].correctAnswerPoints||0;p&&(n+=V),l+=V}else{p&&(n+=h[0].points);var P=d.filter(function(e){return e.isCorrect}).reduce(function(e,t){return e<t.points?t.points:e},0);l+=P}}}()}catch(e){d=!0,c=e}finally{try{u||null==v.return||v.return()}finally{if(d)throw c}}return{hasChanged:(null==e?void 0:null===(f=e.quiz)||void 0===f?void 0:f.score)!==n,score:n,maxScore:l}}},22351:function(e,t,n){"use strict";n.d(t,{P:function(){return f}});var r=n(60053),i=n(11576),o=n(15460),a=n(87653),l=n(27378),s=n(58971),u=n(39142),d=n(5592),c=n(99511),f=function(){var e=(0,s.C)(u.kf),t=(0,s.C)(d.aJV),n=(0,r._)((0,l.useState)(!0),2),f=n[0],m=n[1],v=(0,s.C)(c.eD)?700:1100;(0,l.useEffect)(function(){var n=document.querySelector("#".concat(o.y));if(n&&!t&&e){if((0,i.zd)()){if(m(!1),f&&!(0,a.cG)())return;var r,l=n.scrollHeight,s=null===(r=document.body)||void 0===r?void 0:r.scrollHeight;if(l-s<o.u&&s<v)return}n.scrollIntoView({behavior:"auto"})}},[e,t])}},50558:function(e,t,n){"use strict";n.d(t,{g:function(){return c}});var r=n(60053),i=n(27378),o=n(87653),a=n(58971),l=n(39142),s=n(99511),u=n(61006),d=n(78190),c=function(){var e,t=(0,a.C)(l.Zd),n=(0,a.C)(s.VU),c=null===(e=u.m[n.formPosition])||void 0===e?void 0:e.animationType,f=(0,r._)((0,i.useState)((0,o.rp)()&&"popup"!==(0,o.r5)()),2),m=f[0],v=f[1];return(0,i.useEffect)(function(){"popup"===(0,o.r5)()&&(0,o.rp)()&&t&&(v(!0),setTimeout(function(){v(!1)},"none"!==c?(d.Z+d.S)*1e3:150))},[t,c]),{noScroll:m}}},95350:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var r=n(42036),i=n(58971),o=n(39142),a=n(79165),l=function(e,t,n,i){var o=function(e){var n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(t.steps)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var l,s,u=o.value,d=t.steps[u],c=null===(l=d.template.widgets)||void 0===l?void 0:null===(s=l[e])||void 0===s?void 0:s.type;if(c)return c}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}};return function(t,n){var i,a=null===(i=e[n])||void 0===i?void 0:i[t];if(!a)return"Untitled field";var l=a.label;if((!l||(0,r.isRichLabelEmpty)(l))&&(l=a.placeholder),!l||""===l||"string"!=typeof l){var s=o(t);l=s?"Payment"===s?"Payment":r.SCHEDULING_WIDGET_TYPES.includes(s)?"Scheduling":"Untitled ".concat(s," field"):"Untitled field"}return(0,r.stripMarkdown)(l)}(i,n)},s=function(){var e=(0,i.C)(o.Pq),t=(0,i.C)(a.AT);return function(n,r){return l(e,t,r,n)}}},37029:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var r=n(71866),i=n.n(r),o=function(e){switch(e){case"info":return i().blue[500];case"warning":return i().yellow[600];case"error":return i().red[600];case"success":return i().green[600]}}},2970:function(e,t,n){"use strict";n.d(t,{G:function(){return i},P:function(){return r}});var r=function(e){var t=Math.floor(e%60).toString().padStart(2,"0");return"".concat(Math.floor(e/60),":").concat(t)},i=function(e){return"".concat(Math.floor(e/60),"m ").concat(Math.floor(e%60),"s")}},7438:function(e,t,n){"use strict";n.d(t,{S2:function(){return l},ZB:function(){return c},ed:function(){return s},hv:function(){return u}});var r=n(79165),i=n(39142),o=n(36314),a=n(58971),l="userVerification",s=function(){var e=(0,a.C)(r.AT),t=(0,a.C)(i.kf);if(t)return Object.values(e.steps[t].template.widgets).find(function(e){var t,n="EmailInput"===e.type&&(null===(t=e.template.enrichmentSettings)||void 0===t?void 0:t.userVerification),r="PhoneNumber"===e.type&&e.template.userVerification;return n||r})},u=function(){var e=(0,a.C)(o.F9),t=(0,a.C)(i.kf),n=s();if(e&&n&&t){var r=e[t][n.id],l=null==r?void 0:r.value;return{type:d(n.type),value:"string"==typeof l?l:"",isVerified:c(r)}}},d=function(e){if("EmailInput"===e)return"email";if("PhoneNumber"===e)return"phone";throw Error("Verification not supported for ".concat(e))},c=function(e){if(!e||"object"!=typeof e)return!1;var t=e.value;if(!t||"string"!=typeof t)return!1;var n=e[l];return!!n&&n.value===t}},67262:function(e,t,n){"use strict";n.d(t,{L:function(){return c}});var r=n(51037),i=n(85556),o=n(5592),a=n(39142),l=n(58971),s=n(27378),u=n(93052),d=n(11576),c=function(e){var t,n=e.dontProceedToEndingPages,c=e.skipValidations,f=(0,u.S8)(),m=(0,l.T)(),v=(0,u.$k)(),g=(0,l.C)(o.W4Z),p=(0,l.C)(o.H7w),h=(0,l.C)(o.m6F),x=(0,l.C)(o.uCB),C=(0,l.C)(a.y9);return(0,s.useCallback)((t=(0,r._)(function(e){var t,r,o,l;return(0,i.Jh)(this,function(i){switch(i.label){case 0:if(g&&"reviewing"!==C&&!h)return v({skipValidations:c,newModel:e}).firstInvalidWidgetName||m((0,a.ec)({state:"reviewing",flowPublicIdentifier:x})),[2];return m((0,a.YK)({isLoadingNextStep:!0})),t=!h,[4,f({skipValidations:c||p&&t&&"reviewing"===C,dontProceedToEndingPages:n,newModel:e})];case 1:return o=(r=i.sent()).firstInvalidWidgetName,l=r.isRedirecting,o?(0,d.Kx)(o):p&&m((0,a.ec)({state:"not_submitted",flowPublicIdentifier:x})),l||m((0,a.YK)({isLoadingNextStep:!1})),[2]}})}),function(e){return t.apply(this,arguments)}),[m,f,c,n,C,p,g,h,x,v])}},6681:function(e,t,n){"use strict";n.d(t,{a:function(){return a}});var r=n(24246),i=n(64068),o=n.n(i),a=function(e){var t=e.currencyCodeToConvertTo,n=e.convertedAmount,i=o()(t)||"$";return(0,r.jsx)(r.Fragment,{children:n?(0,r.jsxs)("div",{className:"text-gray-400 ml-3 mt-1",children:["Converts to ",i," ",n]}):(0,r.jsx)(r.Fragment,{})})}},86449:function(e,t,n){"use strict";n.d(t,{$H:function(){return d},Gz:function(){return s},kU:function(){return u},tv:function(){return l}});var r=n(15322),i=n(61320),o=n.n(i),a=["DD/MM/YYYY","MM/DD/YYYY","YYYY/MM/DD","DD.MM.YYYY","YYYY-MM-DD"],l=(0,r._)(a).concat([o().ISO_8601,"YYYY-MM-DD","M/D/YYYY","D/M/YYYY","DD-MM-YYYY","MM-DD-YYYY","MMMM Do, YYYY","M/D/YYYY"]),s=l.reduce(function(e,t){return"string"!=typeof t?e:Math.min(e,t.length)},a[0].length),u="MM/DD/YYYY",d="MMM Do, yyyy"},70722:function(e,t,n){"use strict";n.d(t,{V:function(){return c}});var r=n(50858),i=n(55818),o=n(24246),a=n(27124),l=n.n(a),s=n(99511),u=n(58971),d=n(48897),c=function(e){var t=e.value,n=e.isInWidget,a=(0,u.C)(s.VU),c=a.questionsColor,f=l()(a.answersColor).fade(.3).hsl().string(),m=(0,d.T)().t;return(0,o.jsxs)("div",{className:"flex flex-col",style:n?(0,i._)((0,r._)({},a.formElementSizes.answerSize),{fontWeight:"large"===a.formSizing?500:400}):{},children:[(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)("div",{style:{color:c},children:[m("Latitude"),":\xa0"]}),(0,o.jsx)("div",{style:{color:f},children:null==t?void 0:t.latitude})]}),(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)("div",{style:{color:c},children:[m("Longitude"),":\xa0"]}),(0,o.jsx)("div",{style:{color:f},children:null==t?void 0:t.longitude})]})]})}},55409:function(e,t,n){"use strict";var r=n(24246),i=n(2789);t.Z=function(){return(0,r.jsx)("div",{className:"w-full flex justify-center mt-10",children:(0,r.jsx)(i.Z,{className:"text-gray-400/20"})})}},36813:function(e,t,n){"use strict";n.d(t,{AV:function(){return u},gG:function(){return c},xn:function(){return d}});var r=n(98784),i=n(42036),o=n(58971),a=n(39142),l=n(79165),s=n(5592),u=function(e,t){try{return(0,r.get)(t,e)}catch(e){return}},d=function(e){try{var t=e.match(/'([^']+)'/g);if(!t||t.length<2)throw Error("Insufficient entries found.");return{stepId:(0,i.replaceAll)(t[0],"'",""),widgetId:(0,i.replaceAll)(t[1],"'","")}}catch(e){return}},c=function(e){var t,n=(0,o.C)(a.kf),r=(0,o.C)(l.AT),i=(0,o.C)(s.w3x),u=null===(t=r.steps[n])||void 0===t?void 0:t.template.widgets[e];if(!u)return null;var d=u.template;if(d.connectedFlowPublicIdentifier)return null==i?void 0:i[d.connectedFlowPublicIdentifier]}},48804:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});var r=function(e,t){return Object.keys(e).reduce(function(e,n){var r=t.widgets[n];return r&&e.push(r),e},[]).sort(function(e,t){return e.position.row===t.position.row&&void 0!==e.position.column&&void 0!==t.position.column?e.position.column-t.position.column:e.position.row-t.position.row})}},27575:function(e,t,n){"use strict";n.d(t,{l:function(){return o}});var r=n(24246),i=n(98784),o=function(e,t,n,o,a){return(0,r.jsx)("div",{className:"flex ml-2 sm:ml-3",style:{color:n.answersColor,fontSize:a?n.formElementSizes.h5Size.fontSize:void 0},children:e.displayAsPercentage?(0,r.jsxs)(r.Fragment,{children:[null===t?0:parseFloat((t/e.maximum*100).toFixed(4))," ","%"]}):(0,r.jsxs)(r.Fragment,{children:[(0,i.isObject)(t)?"0":String(t)," /"," ",String(e.maximum)]})})}},43349:function(e,t,n){"use strict";n.d(t,{YW:function(){return w},dp:function(){return j}});var r=n(50858),i=n(24246),o=n(61429),a=n(71866),l=n.n(a),s=n(39142),u=n(5592),d=n(58971),c=n(27124),f=n.n(c),m=n(21791),v=n(22020),g=n(11576),p=n(92463),h=n(99511),x=n(42036),C=n(73993),b=n(61006),y=n(14888),w=function(e){var t=e.error,n=(0,d.C)(h.VU);return(0,i.jsxs)("div",{className:(0,g.AK)("flex items-center mt-2",y.Z.errorValidationMessage),style:(0,r._)({color:n.errorColor||l().red[400]},n.formElementSizes.questionCaptionSize),role:"status","aria-live":"polite",children:[(0,i.jsx)(o.$Ow,{className:(0,g.AK)("large"===n.formSizing?"w-5 h-5 mr-2":"w-4 h-4 mr-1"),"aria-hidden":!0}),t]})},j=function(e){var t=e.caption,n=e.widgetId,r=(0,d.C)(h.VU),o=(0,d.C)(u.J$G),a="center"===r.formAlignment?"center":void 0;return(0,i.jsx)(p.v,{sizing:r.formElementSizes,color:r.questionsColor?f()(r.questionsColor).fade(.5).hsl().string():l().gray[900],className:y.Z.captions,defaultBold:r.bold,rightToLeft:o,textSizingOverride:{pSize:r.formElementSizes.questionCaptionSize},children:(0,i.jsx)(v.Z,{value:t,styleOverrides:m.oZ,className:m.K5,rightToLeft:o,textAlign:a,widgetId:n,isDescription:!0})})},S=function(e){var t=e.unevaluatedTemplate,n=e.evaluatedTemplate,r=e.children,o=e.widgetId,a=e.rightLabel,l=e.rightLabelClassName,c=e.noBottomMargin,v=e.isRequired,p=e.error,C=(0,d.C)(h.VU),S=(0,d.C)(s.gh),k=(0,d.C)(u.zRe)===o,I=!!(null==n?void 0:n.placeholder),N=!n.label||(0,x.isRichLabelEmpty)(n.label),T=I&&N&&!k,_=b.m[C.formPosition].shouldCenter;return(0,i.jsxs)("div",{className:"flex flex-col","data-cy":"widget-with-label",children:[(0,i.jsxs)("div",{className:(0,g.AK)("w-full font-medium",!c&&"large"===C.formSizing&&(_?"mb-[18px]":"mb-[14px]"),!c&&"medium"===C.formSizing&&(_?"mb-[14px]":"mb-[12px]"),!c&&"small"===C.formSizing&&"mb-[9px]",!c&&"extra_small"===C.formSizing&&"mb-1",N&&"edit"!==S&&"!mb-[0px]"),children:[(0,i.jsxs)("div",{className:(0,g.AK)("flex w-full justify-between items-center",y.Z.questionLabel),children:[!T&&(0,i.jsx)(m.ZP,{evaluatedLabel:n.label,unevaluatedLabel:t.label,widgetId:o,widgetKey:"label",isRequired:v,placeholder:function(){return(0,i.jsx)("div",{className:(0,g.AK)("italic truncate duration-200","medium"===C.formSizing&&"!font-medium text-base","large"===C.formSizing&&"text-2xl mb-[2px] !font-semibold","small"===C.formSizing&&"text-sm","extra_small"===C.formSizing&&"text-xs",k&&"pt-1 pb-1 pl-2 pr-8"),style:{color:f()(C.questionsColor).fade(.6).string()},children:"Type your question here"})},isQuestionLabel:!0}),a&&(0,i.jsx)("div",{className:(0,g.AK)("flex justify-end",l),children:a})]}),n.caption&&!(0,x.isRichLabelEmpty)(n.caption)&&(0,i.jsx)("div",{className:(0,g.AK)("whitespace-pre-line","extra_small"===C.formSizing&&"mt-[1px]","small"===C.formSizing&&"mt-[0px]","medium"===C.formSizing&&"mt-[1px] sm:mt-[2px]","large"===C.formSizing&&"mt-[4px] sm:mt-[2px]","center"===C.formAlignment&&"text-center"),children:(0,i.jsx)(j,{caption:n.caption,widgetId:o})})]}),r,p&&(0,i.jsx)(w,{error:p})]})};t.ZP=function(e){var t=e.unevaluatedTemplate,n=e.evaluatedTemplate,r=e.children,o=e.modelValue,a=e.widgetType,l=e.widgetId,u=e.rightLabel,c=e.rightLabelClassName,f=e.noBottomMargin,m=e.rootWidgetModelValue,v=(0,d.C)(s.JW),g=(0,C.Qy)(),p=function(){if(v){var e=!0,t=!1,r=void 0;try{for(var i,l=C.NB[Symbol.iterator]();!(e=(i=l.next()).done);e=!0){var s=i.value,u=null;if("required"===s)"required"in n&&(u=n.required);else if("condition"===s)u=n[s];else{var d=n[s];void 0!==d&&(u=d)}var c=g(s,o,u,n,a,m);if(!c.isValid){if(n.validationErrorMessage&&!c.didFailCustomValidation)return n.validationErrorMessage;return c.defaultErrorMessage}}}catch(e){t=!0,r=e}finally{try{e||null==l.return||l.return()}finally{if(t)throw r}}}}(),h=n.required;return"Checkbox"===a?(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsx)("div",{className:"flex",children:r}),p&&(0,i.jsx)(w,{error:p})]}):(0,i.jsx)(S,{unevaluatedTemplate:t,evaluatedTemplate:n,widgetId:l,rightLabel:u,rightLabelClassName:c,noBottomMargin:f,isRequired:h,error:p,rootWidgetModelValue:m,children:r})}},45339:function(e,t,n){"use strict";var r=n(24246),i=n(97145),o=n(42036),a=n(48897),l=function(e){var t=e.activeTheme,n=(0,a.T)().t;return(0,r.jsx)("span",{className:"flex-grow italic",style:{color:t.mediumFadedAnswersColor},children:n("Unanswered")})},s=function(e){var t=e.value,n=e.activeTheme;return""===t||null==t?(0,r.jsx)(l,{activeTheme:n}):"string"==typeof t?(0,r.jsx)(r.Fragment,{children:t}):t};t.Z=function(e){var t,n=e.widgetType,a=e.value,u=e.activeTheme,d=e.evaluatedTemplate,c=e.alignment,f=null===(t=i.C[n])||void 0===t?void 0:t.getReviewStepValueFormat,m=(0,o.parseWidgetValue)(a,n),v=m.parsedValue,g=m.isEmptyValue;return(0,r.jsx)(r.Fragment,{children:g?(0,r.jsx)(l,{activeTheme:u}):(0,r.jsx)("span",{className:"flex-grow",children:f?(0,r.jsx)(s,{activeTheme:u,value:f(d,a,u,c)}):(0,r.jsx)(r.Fragment,{children:v})})})}},41980:function(e,t,n){"use strict";n.d(t,{A:function(){return d},E:function(){return u}});var r=n(98784),i=n(27378),o=n(39142),a=n(42036),l=n(58971),s=Object.values(a.SHARED_WIDGETS).map(function(e){return e.docs.emptyValue}),u=function(e){return""===e||null==e||(0,a.isEmptyPickerString)(e)},d=function(e){var t=e.evaluatedDefaultValue,n=e.unevaluatedDefaultValue,d=e.setValue,c=e.currentValue,f=e.widgetId,m=e.widgetType,v=e.disable,g=(0,l.T)(),p="edit"===(0,l.C)(o.gh),h=(0,l.C)(o.kf),x=(0,l.C)(o.WT);(0,i.useEffect)(function(){if(p&&h&&!v){var e,n=null===(e=x[h])||void 0===e?void 0:e[f],i=a.SHARED_WIDGETS[m].docs.emptyValue;(0,r.isEqual)(t,n)||(null==t||s.findIndex(function(e){return(0,r.isEqual)(e,t)})>=0?d(i):d(t),g((0,o.Au)({widgetId:f,stepId:h,defaultValue:t})))}},[p,h,g,t,x,f,m,d,v]),(0,i.useEffect)(function(){if(h&&!p&&!v){var e,i=function(){void 0!==t&&g((0,o.Au)({widgetId:f,stepId:h,defaultValue:t}))},l=null===(e=x[h])||void 0===e?void 0:e[f];if(!((0,r.isEqual)(a.SHARED_WIDGETS[m].docs.emptyValue,c)||null==c)&&void 0===l){i();return}void 0!==l&&(0,r.isEqual)(t,l)||null==t||u(n)||(d(t),i())}},[d,t,n,c,h,f,g,x,m,p,v])}},77504:function(e,t,n){"use strict";n.d(t,{X:function(){return i}});var r=n(42036),i=function(e){var t=(0,r.stripMarkdown)(e.label||"");if(t)return t;var n=(0,r.stripMarkdown)(e.placeholder||"");if(n)return n;var i=(0,r.stripMarkdown)(e.caption||"");if(i)return i}},4430:function(e,t,n){"use strict";n.d(t,{X:function(){return o},z:function(){return a}});var r=n(50851);function i(){var e=(0,r._)(["\n  .ant-rate-star-full svg {\n    color: "," !important;\n  }\n  .ant-rate-star-first svg {\n    color: ",";\n  }\n  .ant-rate-star-second {\n    color: ",";\n  }\n"]);return i=function(){return e},e}var o=n(39997).ZP.div.withConfig({componentId:"sc-53b02a7b-0"})(i(),function(e){return e.primaryColor},function(e){return e.primaryColor},function(e){return e.secondaryColor}),a=6},73993:function(e,t,n){"use strict";n.d(t,{NB:function(){return l},Qy:function(){return d},h3:function(){return s}});var r=n(89604),i=n(42036),o=n(98784),a=n(48897),l=["required","minLength","maxLength","minSelection","maxSelection","regex","condition"],s=function(e,t){return null!=t.template[e]&&""!==t.template[e]},u=function(e){if(null==e)return null;if("number"==typeof e)return e;if("string"!=typeof e)return null;var t=parseInt(e);return isNaN(t)?null:t},d=function(){var e=(0,a.T)().t;return function(t,n,a,l,s,d){var c=r.wY[s],f=c.customValidation;if(f){var m=f(n,l,l.validationErrorMessage,d,e);if(m)return{isValid:!1,defaultErrorMessage:m,didFailCustomValidation:!0}}if(null==a||""===a)return{isValid:!0};var v=!!l.required;if("required"!==t&&!v&&(0,o.isEqual)(n,i.SHARED_WIDGETS[s].docs.emptyValue))return{isValid:!0};switch(t){case"required":var g=e("Field is required");if(a){if(c.customRequiredCheck){var p=c.customRequiredCheck(n,l);return{isValid:!p,defaultErrorMessage:p}}if(Array.isArray(n))return{isValid:n.length>0,defaultErrorMessage:n.length>0?void 0:g};if((0,o.isObject)(i.SHARED_WIDGETS[s].docs.emptyValue)&&(0,o.isEqual)(n,i.SHARED_WIDGETS[s].docs.emptyValue)||!n&&0!==n)return{isValid:!1,defaultErrorMessage:g}}return{isValid:!0};case"minLength":var h=u(a);if(null!=h&&"string"==typeof n){if(n.length>=h)return{isValid:!0};var x=u(l.minLength);return{isValid:!1,defaultErrorMessage:e("Field must be at least {minLength} characters long")(x)}}return{isValid:!0};case"maxLength":var C=u(a);if(null!=C&&"string"==typeof n){if(n.length<=C)return{isValid:!0};var b=u(l.maxLength);return{isValid:!1,defaultErrorMessage:e("Field must be no more than {maxLength} characters long")(b)}}return{isValid:!0};case"minSelection":var y=u(a);if(null!=y&&Array.isArray(n)){if(n.length>=y)return{isValid:!0};var w=u(l.minSelection);return{isValid:!1,defaultErrorMessage:e("Must select at least {minLength} options")(w)}}return{isValid:!0};case"maxSelection":var j=u(a);if(null!=j&&Array.isArray(n)){if(n.length<=j)return{isValid:!0};var S=u(l.maxSelection);return{isValid:!1,defaultErrorMessage:e("Must select no more than {maxLength} options")(S)}}return{isValid:!0};case"regex":var k=e("Field does not match the desired format");if(null!=a&&"regex"===l.validationPattern){var I=n;if(c.getValidationValue&&(I=c.getValidationValue(n)),"string"==typeof I||"number"==typeof I)try{var N=RegExp(a,"g"),T=!!String(I).match(N);return{isValid:T,defaultErrorMessage:T?void 0:k}}catch(e){return{isValid:!1,defaultErrorMessage:"Invalid regular expression. ".concat(e)}}return{isValid:!1,defaultErrorMessage:k}}return{isValid:!0};case"condition":if(null!=a&&"condition"===l.validationPattern&&!a)return{isValid:!1,defaultErrorMessage:e("Field is invalid")};return{isValid:!0};default:throw Error("Unhandled validationType: ".concat(t))}}}},97145:function(e,t,n){"use strict";n.d(t,{C:function(){return tj}});var r=n(24246),i=n(11576),o=n(65218),a=n.n(o),l=a()(function(){return Promise.all([n.e(823),n.e(6814),n.e(2168)]).then(n.bind(n,22168))},{loadableGenerated:{webpack:function(){return[22168]}},ssr:!1}),s=n(47941),u=n(21791),d=n(99511),c=n(5592),f=n(58971),m=n(37029),v=a()(function(){return Promise.all([n.e(4274),n.e(6558)]).then(n.bind(n,16558))},{loadableGenerated:{webpack:function(){return[16558]}},ssr:!1}),g=n(51037),p=n(50858),h=n(60053),x=n(85556),C=n(27378),b=n(39142),y=n(71866),w=n.n(y),j=n(48897),S=n(2789),k=function(){return(0,r.jsx)("div",{className:"absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center bg-gray-100/[0.55] ",children:(0,r.jsxs)("div",{className:"max-w-sm rounded-lg bg-white shadow-md flex items-center flex-col p-6",children:[(0,r.jsx)("h3",{className:"text-lg leading-6 text-gray-900 font-semibold",children:"This is taking longer than usual"}),(0,r.jsx)("div",{className:"mb-3 mt-1",children:(0,r.jsxs)("p",{className:"text-sm text-gray-500 text-center",children:["Please ",(0,r.jsx)("strong",{children:"do not refresh"})," the page or close the tab."]})}),(0,r.jsx)(S.Z,{})]})})},I=n(73022),N=n(67262),T=n(53755),_=n(36314),V=n(89426),P=n(79894),F=n.n(P),E=n(53450),A=n(9482),L=function(e){var t=e.alignment,n=(0,f.C)(V.iI),o="live"===(0,f.C)(_.gh),a=(0,f.C)(d.VU),l=(0,f.C)(c.m0e),s=(0,f.C)(c.Bnf),u=(0,f.C)(c.uCB);if(!n||!o)return(0,r.jsx)(r.Fragment,{});var m=(0,A.XA)(l);return(0,r.jsx)(E.Z,{title:m?(0,r.jsxs)("div",{className:"p-1",children:[(0,r.jsx)("a",{className:"underline cursor-pointer text-blue-100 hover:text-blue-200 ",href:"https://main.fillout.com/verify-your-fillout-account?flowId=".concat(l,"&orgid=").concat(null==s?void 0:s.organizationId),target:"_blank",rel:"noreferrer",children:"Verify your account"})," ","to remove this message.",(0,r.jsx)("div",{className:"flex items-center justify-center text-xs text-gray-400 my-1 mt-2",children:"This note is only visible to you"})]}):void 0,placement:"bottom",children:(0,r.jsxs)("div",{className:(0,i.AK)("text-[11px] mt-4",a.isDark?"opacity-80":"",("center"===t||"full"===t)&&"flex w-full justify-center","right"===t&&"flex justify-end"),style:{color:a.slightlyFadedQuestionsColor},children:["Never share passwords in Fillout forms."," ",(0,r.jsx)(F(),{href:"".concat("https://form.fillout.com/t/jsJvjZLTEQus","?fpid=").concat(u),target:"_blank",rel:"noreferrer",className:"underline",style:{color:a.slightlyFadedQuestionsColor},children:"Report malicious form"})]})})},M=n(55818),D=n(42036),R=n(20294),z=n(85057),B=n(91725),O=n(27124),U=n.n(O),q=n(14888),Z=n(7438),W=n(38580),K=function(){var e=(0,f.T)(),t=(0,f.C)(d.VU),n=(0,f.C)(b.NV),i=n.isOpen,o=function(t){return e((0,b.nb)((0,M._)((0,p._)({},n),{isOpen:t})))};return(0,r.jsx)(R.Z,{isOpen:i,setIsOpen:o,theme:t,blockCloseOnOverlayClick:!0,children:(0,r.jsx)("div",{className:"p-1",children:(0,r.jsx)(Y,{onClose:function(){return o(!1)}})})})},Y=function(e){var t,n=e.onClose,o=(0,f.T)(),a=(0,f.C)(d.VU),l=(0,f.C)(c.J$G),s=(0,f.C)(V.te),u=(0,f.C)(b.gh),m=(0,f.C)(b.kf),v=(0,f.C)(c.uCB),p=U()(a.questionsColor).fade(.55).hsl().string(),y=(0,j.T)().t,w=(0,N.L)({skipValidations:!0}),S=(0,f.C)(b.NV).token,k=(0,h._)((0,C.useState)(""),2),T=k[0],_=k[1],P=(0,h._)((0,C.useState)(!1),2),F=P[0],E=P[1],A=(0,Z.ed)(),L=(0,Z.hv)();if(!A||!L||!m||!v)return(0,r.jsx)(r.Fragment,{});var M=(t=(0,g._)(function(){var e,t;return(0,x.Jh)(this,function(r){switch(r.label){case 0:E(!0),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,W.UX)(s,"/v1/flow/userVerification/".concat(v,"/complete?mode=").concat(u),"POST",{token:S,pin:T})];case 2:return e={id:r.sent().id,value:L.value},o((0,b.OR)({modelKey:Z.S2,newValue:e,stepId:m,widgetId:A.id,flowPublicIdentifier:v})),n(),w(),[3,4];case 3:return t=r.sent(),(0,i.Eo)(t.message),[3,4];case 4:return E(!1),[2]}})}),function(){return t.apply(this,arguments)});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"pl-[22px] pt-2",children:[(0,r.jsxs)("p",{className:"font-bold text-base",style:{color:a.questionsColor},children:["A verification code was sent to ",L.value]}),(0,r.jsx)(z.Z,{label:"email"===L.type?y("Check your email and provide the pin below"):"Check your phone and provide the pin below",subLabel:"email"===L.type&&y("Make sure to check your spam folder."),className:"mb-4 mt-2",dataCy:"login-pin-input",labelStyles:{color:a.questionsColor},sublabelStyles:{color:a.slightlyFadedQuestionsColor},bold:!0,children:(0,r.jsx)("div",{className:(0,i.AK)(l&&"flex justify-end"),style:{direction:"ltr",textAlign:"left"},children:(0,r.jsx)(B.u,{length:D.LOGIN_PIN_LENGTH,onChange:function(e,t,n){return _(n.join(""))},borderColor:a.borderColor,focusBorderColor:a.primaryColor,inputStyle:{color:a.questionsColor}})})})]}),(0,r.jsxs)("div",{className:"flex justify-between mt-4",children:[(0,r.jsx)(I.g8,{alignment:"center",hideShadow:!0,text:y("Back"),backgroundColor:a.questionsBackgroundColor,textColorOverride:p,onClick:(0,g._)(function(){return(0,x.Jh)(this,function(e){return[2,n()]})}),isLoading:!1,className:(0,i.AK)("rounded-md",q.Z.backButton)}),(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)(I.g8,{alignment:"right",disabled:T.length!==D.LOGIN_PIN_LENGTH,isLoading:F,text:y("Continue"),onClick:M})})]})]})},G=function(e){var t=e.alignment,n=(0,T.O)(),o=n.goToPrevious,a=n.getShouldShowBackButton,l=(0,f.C)(d.VU),s=(0,f.C)(b.Jp),u=(0,f.C)(d.eD),c=(0,j.T)().t;if(!a("next_button"))return null;var m="image_background"===l.formPosition,v="full"===t||m||u;return(0,r.jsx)(I.g8,{alignment:"center",hideShadow:v,text:"".concat(v?"":"← ").concat(c("Back")),backgroundColor:v?"transparent":l.inputBackgroundColor,onClick:(0,g._)(function(){return(0,x.Jh)(this,function(e){return[2,o()]})}),isLoading:!1,disabled:s,className:(0,i.AK)("rounded-md",("full"===t||u)&&"mt-2",q.Z.backButton),textColorOverride:l.slightlyFadedAnswersColor,style:v?{}:{borderColor:l.borderColor}})},H=n(60074),J=n(72279),Q=n(28417),$=n(82377),X=n(77747),ee=n(32773),et=a()(function(){return n.e(6681).then(n.bind(n,36681))},{loadableGenerated:{webpack:function(){return[36681]}},ssr:!1}),en=n(60866),er=n(43349),ei=n(41980),eo=a()(function(){return Promise.all([n.e(4878),n.e(1050),n.e(1502)]).then(n.bind(n,92377))},{loadableGenerated:{webpack:function(){return[92377]}},ssr:!1}),ea=a()(function(){return n.e(5839).then(n.bind(n,25839))},{loadableGenerated:{webpack:function(){return[25839]}},ssr:!1}),el=n(64068),es=n.n(el),eu=n(6681),ed=a()(function(){return n.e(528).then(n.bind(n,80528))},{loadableGenerated:{webpack:function(){return[80528]}},ssr:!1}),ec=n(61320),ef=n.n(ec),em=n(86449),ev=a()(function(){return Promise.all([n.e(3887),n.e(4006),n.e(3616),n.e(6694),n.e(8838),n.e(9585),n.e(9800)]).then(n.bind(n,49800))},{loadableGenerated:{webpack:function(){return[49800]}},ssr:!1}),eg=a()(function(){return Promise.all([n.e(3887),n.e(4006),n.e(3616),n.e(6694),n.e(9585),n.e(8305)]).then(n.bind(n,48305))},{loadableGenerated:{webpack:function(){return[48305]}},ssr:!1}),ep=a()(function(){return Promise.all([n.e(823),n.e(3887),n.e(4006),n.e(3616),n.e(6694),n.e(8838),n.e(9585),n.e(6854)]).then(n.bind(n,66854))},{loadableGenerated:{webpack:function(){return[66854]}},ssr:!1}),eh=a()(function(){return Promise.all([n.e(823),n.e(4652)]).then(n.bind(n,14652))},{loadableGenerated:{webpack:function(){return[14652]}},ssr:!1}),ex=a()(function(){return Promise.all([n.e(823),n.e(4878),n.e(3166)]).then(n.bind(n,33166))},{loadableGenerated:{webpack:function(){return[33166]}},ssr:!1}),eC=a()(function(){return Promise.all([n.e(823),n.e(4878),n.e(6243)]).then(n.bind(n,6243))},{loadableGenerated:{webpack:function(){return[6243]}},ssr:!1}),eb=a()(function(){return n.e(1281).then(n.bind(n,51281))},{loadableGenerated:{webpack:function(){return[51281]}},ssr:!1}),ey=a()(function(){return Promise.all([n.e(2839),n.e(8262),n.e(9991)]).then(n.bind(n,59991))},{loadableGenerated:{webpack:function(){return[59991]}},ssr:!1}),ew=a()(function(){return Promise.all([n.e(823),n.e(5723),n.e(2055)]).then(n.bind(n,2055))},{loadableGenerated:{webpack:function(){return[2055]}},ssr:!1}),ej=n(2970),eS=a()(function(){return Promise.all([n.e(2839),n.e(3881)]).then(n.bind(n,23881))},{loadableGenerated:{webpack:function(){return[23881]}},ssr:!1}),ek=n(48462),eI=n(77386),eN=function(e){var t=document.createElement("div");t.innerHTML=e;var n=Array.from(t.querySelectorAll("script"));return n.forEach(function(e){var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)}),{htmlWithoutScripts:t.innerHTML,scripts:n}},eT=function(e){var t=e.html,n=e.style,i=e.allowScripts,o=(0,C.useRef)(null);return(0,C.useEffect)(function(){if(o.current){var e=o.current.shadowRoot;e||(e=o.current.attachShadow({mode:"open"}));var r=t,a=[];if(i){var l=eN(r);r=l.htmlWithoutScripts,a=l.scripts}else r=(0,ek.Z)(r);e.innerHTML="<style>".concat(n,"</style>").concat(r),i&&a.forEach(function(t){for(var n=document.createElement("script"),r=t.attributes,i=0;i<r.length;i++){var o=r[i];n.setAttribute(o.name,o.value)}n.textContent=t.textContent,null==e||e.appendChild(n)})}},[t,n,i]),(0,r.jsx)("div",{"data-cy":"html-widget",children:(0,r.jsx)("div",{ref:o})})},e_=function(e){var t=e.html,n=e.style,o=e.allowScripts,a=e.widgetId,l=(0,f.C)(_.gh),s=(0,f.C)(c.zRe)===a,u=(0,h._)((0,C.useState)(),2),d=u[0],m=u[1],v=function(e){m(window.getComputedStyle(e.documentElement).height)};return(0,r.jsxs)("div",{"data-cy":"html-widget",className:(0,i.AK)("edit"===l&&"relative"),children:["edit"===l&&!s&&(0,r.jsx)("div",{className:"absolute left-0 right-0 top-0 bottom-0 bg-transparent"}),(0,r.jsx)("iframe",{srcDoc:"<style>body { font-family: sans-serif } ".concat(n,"</style>").concat(t),onLoad:function(e){var t=e.currentTarget.contentWindow;t&&(v(t.document),t.addEventListener("resize",function(){return v(t.document)}))},className:"w-full",style:{height:d},sandbox:o?void 0:"allow-downloads allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-top-navigation"})]})},eV=function(e){var t=e.evaluatedTemplate,n=e.widgetId,i=(0,eI.Z)(!1),o=i.canRunCustomCode,a=i.loading,l=t.allowScripts&&o,s="live"===(0,f.C)(_.gh);return!((0,f.C)(V.pK)||!s)||t.allowScripts&&a?(0,r.jsx)(r.Fragment,{}):t.enableIframe?(0,r.jsx)(e_,{html:t.html,style:t.css,allowScripts:l,widgetId:n}):(0,r.jsx)(eT,{html:t.html,style:t.css,allowScripts:l})},eP=n(46895),eF=n(49616),eE=(0,D.evaluateGenericObject)(eP.x,{},{timezone:(0,eF.v)(),language:void 0}),eA=a()(function(){return n.e(7552).then(n.bind(n,37552))},{loadableGenerated:{webpack:function(){return[37552]}},ssr:!1}),eL=n(70722),eM=a()(function(){return n.e(8544).then(n.bind(n,98544))},{loadableGenerated:{webpack:function(){return[98544]}},ssr:!1}),eD=n(13739),eR=n(31955),ez=n(24289),eB=n(77504),eO=a()(function(){return Promise.all([n.e(3887),n.e(4006),n.e(5741),n.e(6290)]).then(n.bind(n,6290))},{loadableGenerated:{webpack:function(){return[6290]}},ssr:!1}),eU=a()(function(){return Promise.all([n.e(4878),n.e(1050),n.e(7823)]).then(n.bind(n,79104))},{loadableGenerated:{webpack:function(){return[79104]}},ssr:!1}),eq=a()(function(){return Promise.all([n.e(4006),n.e(2831),n.e(4878),n.e(1050),n.e(8597),n.e(5484)]).then(n.bind(n,75484))},{loadableGenerated:{webpack:function(){return[75484]}},ssr:!1}),eZ=n(55605),eW=n(98784),eK=function(e,t){if((0,eW.isObject)(t)&&t.eventStartTime&&t.eventEndTime){var n=ef()(t.eventStartTime).format("lll"),i=ef()(t.eventEndTime).format("lll");return(0,r.jsxs)("div",{className:"flex flex-col text-right",children:["Start: ",n,(0,r.jsx)("br",{}),"End: ",i]})}return""},eY=a()(function(){return Promise.all([n.e(823),n.e(8579),n.e(257),n.e(4016),n.e(7212)]).then(n.bind(n,93916))},{loadableGenerated:{webpack:function(){return[93916]}},ssr:!1}),eG=a()(function(){return Promise.all([n.e(8579),n.e(8798),n.e(7727),n.e(1e3)]).then(n.bind(n,81e3))},{loadableGenerated:{webpack:function(){return[81e3]}},ssr:!1}),eH=a()(function(){return Promise.all([n.e(823),n.e(8579),n.e(4956),n.e(4016),n.e(6720),n.e(376)]).then(n.bind(n,39879))},{loadableGenerated:{webpack:function(){return[39879]}},ssr:!1}),eJ=a()(function(){return n.e(2681).then(n.bind(n,82681))},{loadableGenerated:{webpack:function(){return[82681]}},ssr:!1}),eQ=n(32288),e$=n(61429),eX=n(39654),e0=n(55409),e1=n(82879),e2=a()(function(){return Promise.all([n.e(5172),n.e(3269),n.e(9071)]).then(n.bind(n,19883))},{loadableGenerated:{webpack:function(){return[19883]}},ssr:!1,loading:e0.Z}),e5=function(e){if("string"==typeof e)return e;if((0,eW.isObject)(e)){var t,n=null==e?void 0:null===(t=e[0])||void 0===t?void 0:t.url;if(n&&"string"==typeof n)return n}return null},e8=a()(function(){return Promise.all([n.e(6814),n.e(1983),n.e(8927)]).then(n.bind(n,54248))},{loadableGenerated:{webpack:function(){return[54248]}},ssr:!1}),e4=a()(function(){return Promise.all([n.e(2831),n.e(1050),n.e(8597),n.e(4392)]).then(n.bind(n,54392))},{loadableGenerated:{webpack:function(){return[54392]}},ssr:!1}),e3=a()(function(){return Promise.all([n.e(7869),n.e(3948),n.e(3234)]).then(n.bind(n,63234))},{loadableGenerated:{webpack:function(){return[63234]}},ssr:!1}),e6=n(36813),e7=a()(function(){return Promise.all([n.e(7869),n.e(3948),n.e(6820)]).then(n.bind(n,46820))},{loadableGenerated:{webpack:function(){return[46820]}},ssr:!1}),e9=a()(function(){return n.e(756).then(n.bind(n,50756))},{loadableGenerated:{webpack:function(){return[50756]}},ssr:!1}),te=n(89604),tt=n(79165),tn=n(95350),tr=n(31342),ti=n(2957),to=n(45339),ta=n(48804),tl=function(e){var t=e.fieldName,n=e.value,o=e.widgetType,a=e.evaluatedTemplate,l=(0,f.C)(d.VU);return(0,r.jsxs)("div",{className:"py-2 grid grid-cols-5 gap-x-6",children:[(0,r.jsx)("dt",{className:(0,i.AK)("font-medium col-span-2","large"===l.formSizing?"text-base":"text-sm"),style:{color:l.slightlyFadedQuestionsColor},children:t}),(0,r.jsxs)("dd",{className:(0,i.AK)("mt-1 flex justify-between text-gray-900 col-span-3","large"===l.formSizing?"text-base":"text-sm"),children:[(0,r.jsx)("div",{}),(0,r.jsx)("div",{className:"flex justify-end",style:{color:l.answersColor},children:(0,r.jsx)(to.Z,{value:n,widgetType:o,activeTheme:l,evaluatedTemplate:a,alignment:"right"})})]})]})},ts=function(e){var t=e.stepId,n=e.evaluatedTemplate,i=e.stepTemplate,o=e.showEditButton,a=(0,f.C)(b.F9)[t],l=(0,tn.V)(),s=(0,f.C)(b.Pq),u=(0,f.C)(d.VU),m=n.showHiddenFields,v=(0,f.C)(c.Mlc),g=(0,tr.d7)(),p=(0,j.T)().t,h=(0,C.useMemo)(function(){return(0,ta.X)(a,i).filter(function(e){return!n.widgetsToHide.includes(e.id)})},[a,i,n]);return a&&0!==h.length?(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"border-t ",style:{borderColor:u.borderColor},children:(0,r.jsx)("dl",{className:"divide-y divide-gray-200 flex flex-col",children:(0,r.jsxs)("div",{children:[o&&(0,r.jsx)("div",{className:"flex justify-end mr-3",children:(0,r.jsx)(eX.Z,{theme:"link",style:{color:u.primaryColor},onClick:function(){g(t)},children:p("Edit")})}),h.map(function(e){var n,i=(null===(n=s[t])||void 0===n?void 0:n[e.id])||{};return!i||(0,te.TO)(i,v,e.id)&&!m?(0,r.jsx)("div",{},e.id):(0,r.jsx)(tl,{fieldName:l(e.id,t),value:a[e.id].value,widgetType:e.type,evaluatedTemplate:i},e.id)})]})})})}):(0,r.jsx)(r.Fragment,{})},tu=function(e){var t=U()(e),n=t.mix(U()("white"),.85).hsl().string(),r=t.darken(.5).hsl().string(),i=.9>U()(n).luminosity();return{textColor:i?r:n,backgroundColor:i?n:r}},td=n(27575),tc={Component:a()(function(){return n.e(941).then(n.bind(n,90941))},{loadableGenerated:{webpack:function(){return[90941]}},ssr:!1}),getReviewStepValueFormat:td.l,isDynamicallyLoaded:!0},tf=a()(function(){return n.e(3434).then(n.bind(n,13434))},{loadableGenerated:{webpack:function(){return[13434]}},ssr:!1}),tm=a()(function(){return n.e(7900).then(n.bind(n,77900))},{loadableGenerated:{webpack:function(){return[77900]}},ssr:!1}),tv=n(49749),tg={Component:function(e){var t=e.evaluatedTemplate,n=e.unevaluatedTemplate,o=e.widgetId,a=(0,f.C)(d.VU),l=(0,tv.G)(n.contents.logic.value)||"div";return(0,r.jsx)("div",{"data-cy":"text-widget",children:(0,r.jsx)(u.ZP,{evaluatedLabel:t.contents,unevaluatedLabel:n.contents,isHeading:!0,widgetId:o,widgetKey:"contents",placeholder:function(e){var t=e.isFocused;return(0,r.jsx)(l,{className:(0,i.AK)("text-lg italic duration-200 truncate",t&&"opacity-50"),style:{color:(0,e1.VN)(a)},children:"Type here, use @ for references"})}})})}},tp=a()(function(){return Promise.all([n.e(1107),n.e(4761)]).then(n.bind(n,44162))},{loadableGenerated:{webpack:function(){return[44162]}},ssr:!1}),th=a()(function(){return Promise.all([n.e(2975),n.e(2497)]).then(n.bind(n,70352))},{loadableGenerated:{webpack:function(){return[70352]}},ssr:!1}),tx=n(21031),tC=n(23761),tb=n.n(tC),ty=n(74487),tw=n(69357),tj={Address:{Component:l,getReviewStepValueFormat:function(e,t,n,o){return(0,r.jsxs)("div",{className:(0,i.AK)("flex flex-col","left"===o?"items-start":"items-end"),children:[(0,r.jsxs)("div",{children:[" ",t.address]}),t.addressLine2&&(0,r.jsxs)("div",{children:[" ",t.addressLine2]}),(0,r.jsxs)("div",{children:[t.city," ",t.state," ",t.zipCode]}),(0,r.jsxs)("div",{children:[" ",t.country]})]})},isDynamicallyLoaded:!0},Text:tg,Paragraph:tg,ShortAnswer:{Component:function(e){var t=e.value,n=e.setValue,i=e.evaluatedTemplate,o=e.autoFocus,a=e.isReadonlyMode,l=e.unevaluatedTemplate,s=e.widgetId,u=(0,f.C)(d.VU);(0,ei.A)({evaluatedDefaultValue:i.defaultValue,setValue:n,unevaluatedDefaultValue:l.defaultValue,currentValue:t,widgetId:s,widgetType:"ShortAnswer"});var c=(0,ez.CD)(s,t);return(0,r.jsx)(ez.a$,{quizQuestionResult:null==c?void 0:c.quizQuestionResult,message:null==c?void 0:c.message,answerCorrectionText:null==c?void 0:c.answerCorrectionText,children:(0,r.jsx)(er.ZP,{evaluatedTemplate:i,modelValue:t,widgetType:"ShortAnswer",widgetId:s,unevaluatedTemplate:l,children:(0,r.jsx)(eR.Fx,{activeTheme:u,children:(0,r.jsx)(eQ.Z,{disabled:a,autoFocus:o,placeholder:i.placeholder,onChange:n,value:t||"",ariaLabel:(0,eB.X)(i),"aria-required":i.required})})})})}},Dropdown:{Component:ex,getReviewStepValueFormat:function(e,t){if(t&&"object"==typeof t)return t.recordID;if(e.optionsMappings){var n=e.options.staticOptions.find(function(e){return e.value===t});if(n)return n.label}return t},isDynamicallyLoaded:!0},ImagePicker:{Component:eU,getReviewStepValueFormat:function(e,t){var n=Array.isArray(t);if(e.optionsMappings){if(n)return t.map(function(t){var n=e.options.staticOptions.find(function(e){return e.value===t});return n?n.label:t}).join(", ");var r=e.options.staticOptions.find(function(e){return e.value===t});if(r)return r.label}return n?t.map(function(e){return String(e)}).join(", "):t},isDynamicallyLoaded:!0},MultiSelect:{Component:eC,getReviewStepValueFormat:function(e,t){return Array.isArray(t)?e.optionsMappings?t.map(function(t){var n=e.options.staticOptions.find(function(e){return e.value===t});return n?n.label:t}).join(", "):t.map(function(e){return String(e)}).join(", "):String(t)},isDynamicallyLoaded:!0},Ranking:{Component:e4,isDynamicallyLoaded:!0},Button:{Component:function(e){var t,n,o=e.evaluatedTemplate,a=e.isReadonlyMode,l=(0,f.C)(c.J$G),s=(0,f.C)(b.DA),u=(0,f.C)(b.d_),m=(0,f.C)(d.VU),v=(0,f.C)(b.Jp),y=(0,f.C)(c.X4i),S=(0,f.C)(c.W4Z),_=(0,h._)((0,C.useState)(!1),2),V=_[0],P=_[1],F=o.text||(S&&!a?"Answer":y?"Submit":"Next ".concat(l?"←":"→")),E=(0,h._)((0,C.useState)(!1),2),A=E[0],M=E[1],D=(0,f.C)(c.XPF),R=(0,N.L)({skipValidations:!1}),z=(0,N.L)({skipValidations:!0}),B=(t=(0,g._)(function(e){var t;return(0,x.Jh)(this,function(n){switch(n.label){case 0:if(t=e||o.skipValidations,u)return P(!0),[2];if(!t)return[3,2];return[4,z()];case 1:return n.sent(),[3,4];case 2:return[4,R()];case 3:n.sent(),n.label=4;case 4:return M(!1),[2]}})}),function(e){return t.apply(this,arguments)});(0,C.useEffect)(function(){if(s){var e=setTimeout(function(){s&&M(!0)},7e3);return function(){return clearTimeout(e)}}M(!1)},[s]),(0,i.lS)("enter",(n=(0,g._)(function(e){return(0,x.Jh)(this,function(e){return D&&!o.disabled&&B(!1),[2]})}),function(e){return n.apply(this,arguments)}));var O=(0,f.C)(d.Pu),U=(null==O?void 0:O.formAlignment)==="center",Z=o.alignment;U&&("left"===Z||"right"===Z)&&(Z="center");var W=(0,j.T)().t,Y=(0,(0,T.O)().getShouldShowBackButton)("next_button"),H=o.showSkipButton&&!Y&&!v,J=(0,f.C)(d.eD),Q=H&&("center"===Z||"full"===Z||J),$=Y&&("full"===Z||J);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:(0,i.AK)("w-full flex","left"===Z&&"justify-start","center"===Z&&"justify-center","right"===Z&&"justify-end",H&&"right"===Z&&" flex-row-reverse !justify-start",Q&&"flex-col",$?"flex-col-reverse":Q?void 0:"large"===m.formSizing?"space-x-3":"space-x-2",Y&&"right"===Z&&"justify-between"),children:[A&&(0,r.jsx)(k,{}),(0,r.jsx)(G,{alignment:Z}),(0,r.jsx)(I.g8,{alignment:Z,disabled:o.disabled||v,text:F,backgroundColor:o.backgroundColor,onClick:function(){return B(!1)},isLoading:s,forceStretchOnMobile:!0}),H&&(0,r.jsx)(I.g8,{removeRingOffset:!0,hideShadow:!0,alignment:"center",text:W("Skip"),backgroundColor:"transparent",customHoverColor:"transparent",textColorOverride:m.primaryColor,labelClassName:"hover:opacity-80",onClick:function(){return B(!0)},isLoading:!1,className:(0,i.AK)(Q&&"mt-2",q.Z.skipButton)})]}),V&&u&&(0,r.jsx)("div",{className:(0,i.AK)("large"===m.formSizing?"mt-3":"mt-2"),style:(0,p._)({color:m.errorColor||w().red[400]},m.formElementSizes.questionCaptionSize),children:W("Please wait for all files to finish uploading on this page")}),y&&(0,r.jsx)(L,{alignment:Z}),(0,r.jsx)(K,{})]})},isDynamicallyLoaded:!1},Switch:{Component:tm,isDynamicallyLoaded:!0},MultipleChoice:{Component:eq,getReviewStepValueFormat:function(e,t){if(e.optionsMappings){var n=e.options.staticOptions.find(function(e){return e.value===t});if(n)return n.label}return t},isDynamicallyLoaded:!0},NumberInput:{Component:function(e){var t=e.value,n=e.setValue,i=e.evaluatedTemplate,o=e.autoFocus,a=e.unevaluatedTemplate,l=e.isReadonlyMode,s=e.widgetId,u=(0,f.C)(d.VU),c=(0,ez.CD)(s,t);return(0,ei.A)({evaluatedDefaultValue:i.defaultValue,setValue:n,unevaluatedDefaultValue:a.defaultValue,currentValue:t,widgetId:s,widgetType:"NumberInput"}),(0,r.jsx)(ez.a$,{quizQuestionResult:null==c?void 0:c.quizQuestionResult,message:null==c?void 0:c.message,answerCorrectionText:null==c?void 0:c.answerCorrectionText,children:(0,r.jsx)(er.ZP,{evaluatedTemplate:i,unevaluatedTemplate:a,modelValue:t,widgetType:"NumberInput",widgetId:s,children:(0,r.jsx)(eR.cW,{children:(0,r.jsx)(eR.Fx,{activeTheme:u,children:(0,r.jsx)(eZ.Z,{disabled:l,autoFocus:o,placeholder:i.placeholder,onChange:n,value:t,ariaLabel:(0,eB.X)(i),"aria-required":i.required})})})})})}},LongAnswer:{Component:function(e){var t=e.value,n=e.setValue,i=e.evaluatedTemplate,o=e.isReadonlyMode,a=e.autoFocus,l=e.unevaluatedTemplate,s=e.widgetId,u=(0,f.C)(d.VU),c=i.maxLength,m=i.showCounter;(0,ei.A)({evaluatedDefaultValue:i.defaultValue,setValue:n,unevaluatedDefaultValue:l.defaultValue,currentValue:t,widgetId:s,widgetType:"LongAnswer"});var v=(0,ez.CD)(s,t);return(0,r.jsx)(ez.a$,{quizQuestionResult:null==v?void 0:v.quizQuestionResult,message:null==v?void 0:v.message,answerCorrectionText:null==v?void 0:v.answerCorrectionText,children:(0,r.jsx)(er.ZP,{unevaluatedTemplate:l,evaluatedTemplate:i,modelValue:t,widgetType:"LongAnswer",widgetId:s,rightLabel:m&&t&&c?(0,r.jsxs)("div",{className:"whitespace-nowrap ml-2",style:(0,p._)({color:t.length>c?u.errorColor:u.slightlyFadedQuestionsColor},u.formElementSizes.questionCaptionSize),children:[(0,r.jsx)("span",{className:"inline-block min-w-[32px] text-right",children:t.length})," ","/ ",c]}):void 0,children:(0,r.jsx)("div",{"data-cy":"long-answer-component",children:(0,r.jsx)(eR.Be,{activeTheme:u,children:(0,r.jsx)(eD.Z,{autoFocus:a,placeholder:i.placeholder,onChange:n,value:t,disabled:o,defaultValue:i.defaultValue,rows:i.rows,ariaLabel:(0,eB.X)(i)})})})})})}},Checkbox:{Component:function(e){var t=e.value,n=e.setValue,o=e.evaluatedTemplate,a=e.unevaluatedTemplate,l=e.widgetId,s=(0,f.C)(d.VU),m=(0,f.C)(c.J$G),v=(0,f.C)(b.gh),g=(0,f.C)(c.zRe)===l;return(0,ei.A)({evaluatedDefaultValue:o.defaultValue,setValue:n,unevaluatedDefaultValue:a.defaultValue,currentValue:t,widgetId:l,widgetType:"Checkbox"}),(0,r.jsx)(er.ZP,{unevaluatedTemplate:a,evaluatedTemplate:o,modelValue:t,widgetType:"Checkbox",widgetId:l,children:(0,r.jsx)(en.Z,{shouldAnimate:!0,size:s.formSizing,textColor:s.questionsColor,primaryColor:s.primaryColor,backgroundColor:s.inputBackgroundColor,borderColor:s.borderColor,checked:t,onChange:function(e){"edit"!==v&&n(e)},customLabel:(0,r.jsx)("div",{className:(0,i.AK)("w-full","font-medium","medium"===s.formSizing&&"ml-1","large"===s.formSizing&&"ml-2"),children:(0,r.jsx)(u.ZP,{evaluatedLabel:o.label,unevaluatedLabel:a.label,widgetId:l,isQuestionLabel:!0,widgetKey:"label",placeholder:function(e){return e.isFocused,(0,r.jsx)("div",{className:(0,i.AK)("text-lg italic truncate duration-200",g&&"pt-1 pb-1 pl-2 pr-8"),style:{color:U()(s.questionsColor).fade(.6).string()},children:"Type here, use @ for references"})},isRequired:o.required})}),sublabel:o.sublabel?(0,r.jsx)("div",{className:(0,i.AK)("medium"===s.formSizing&&"ml-1","large"===s.formSizing&&"ml-2","w-full"),children:(0,r.jsx)(er.dp,{caption:o.sublabel,widgetId:l})}):void 0,rightToLeft:m,fullWidth:!0,labelId:"".concat(l,"-label"),descriptionId:o.sublabel?"".concat(l,"-description"):void 0})})}},EmailVerification:{Component:function(){return(0,r.jsx)(r.Fragment,{})}},PasswordVerification:{Component:function(){return(0,r.jsx)(r.Fragment,{})}},Checkboxes:{Component:eo,getReviewStepValueFormat:function(e,t){return Array.isArray(t)?e.optionsMappings?t.map(function(t){var n=e.options.staticOptions.find(function(e){return e.value===t});return n?n.label:t}).join(", "):t.map(function(e){return String(e)}).join(", "):String(t)},isDynamicallyLoaded:!0},DatePicker:{Component:ev,getReviewStepValueFormat:function(e,t){var n=e.dateFormat;return""===n&&(n=em.$H),ef()(t).format(n)},isDynamicallyLoaded:!0},DateTimePicker:{Component:ep,getReviewStepValueFormat:function(e,t){var n=e.dateFormat;""===n&&(n=em.$H);var r=e.timeFormat;return ef()(t).format("".concat(n," ").concat(r))},isDynamicallyLoaded:!0},TimePicker:{Component:eh,getReviewStepValueFormat:function(e,t){var n=e.timeFormat||"h:mm A";return ef()(t,"HH:mm").format(n)},isDynamicallyLoaded:!0},DateRange:{Component:eg,getReviewStepValueFormat:function(e,t){var n=e.dateFormat;""===n&&(n=em.$H);var r=ef()(t.start),i=ef()(t.end),o=function(e){return ef()(e).format(n)};return r.isValid()&&i.isValid()?"".concat(o(t.start)," - ").concat(o(t.end)):""},isDynamicallyLoaded:!0},EmailInput:{Component:eb,isDynamicallyLoaded:!0},URLInput:{Component:function(e){var t=e.value,n=e.setValue,i=e.evaluatedTemplate,o=e.autoFocus,a=e.unevaluatedTemplate,l=e.widgetId,s=(0,f.C)(d.VU);return(0,ei.A)({evaluatedDefaultValue:i.defaultValue,setValue:n,unevaluatedDefaultValue:a.defaultValue,currentValue:t,widgetId:l,widgetType:"URLInput"}),(0,r.jsx)(er.ZP,{unevaluatedTemplate:a,evaluatedTemplate:i,modelValue:t,widgetType:"URLInput",widgetId:l,children:(0,r.jsx)(eR.Fx,{activeTheme:s,children:(0,r.jsx)(eQ.Z,{iconStyle:{color:s.slightlyFadedAnswersColor},autoFocus:o,customSize:s.formSizing,placeholder:i.placeholder,onChange:n,value:t||"",Icon:e$.xPt,type:"email",ariaLabel:(0,eB.X)(i),"aria-required":i.required})})})}},ColorPicker:{Component:ea,getReviewStepValueFormat:function(e,t){return(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("div",{className:"h-5 w-5 rounded-md shadow",style:{background:t}}),(0,r.jsx)("span",{children:t})]})},isDynamicallyLoaded:!0},Calendly:{Component:eY,getReviewStepValueFormat:eK,isDynamicallyLoaded:!0},Calcom:{Component:eG,getReviewStepValueFormat:function(e,t){return eK({},t)},isDynamicallyLoaded:!0},Payment:{Component:eH,getReviewStepValueFormat:function(e,t){return(0,eW.isObject)(t)&&t.paymentId?"Payment complete":""},isDynamicallyLoaded:!0},Repeater:{Component:function(){return(0,r.jsx)("div",{})}},PhoneNumber:{Component:e8,isDynamicallyLoaded:!0},StarRating:{Component:tf,isDynamicallyLoaded:!0},Slider:tc,Review:{Component:function(e){e.value,e.setValue;var t=e.evaluatedTemplate;e.autoFocus,e.unevaluatedTemplate;var n=(0,ti.C)(),i=(0,f.C)(tt.AT),o=n.filter(function(e){var t;return(null===(t=i.steps[e])||void 0===t?void 0:t.type)==="form"});return(0,r.jsx)("div",{children:o.map(function(e){return(0,r.jsx)("div",{className:"py-3 px-1",children:(0,r.jsx)(ts,{stepId:e,stepTemplate:i.steps[e].template,showEditButton:t.showEditButtons,evaluatedTemplate:t})},e)})})}},SectionCollapse:{Component:function(e){var t=e.evaluatedTemplate,n=e.widgetId,o=(0,f.C)(d.VU),a=(0,f.C)(c.Y_q),l=tu(t.color||o.primaryColor),s=l.textColor,u=l.backgroundColor,m=o.formElementSizes.questionLabelSize,v={color:s,background:u,fontSize:m.fontSize,lineHeight:m.lineHeight,fontWeight:"large"===o.formSizing?600:500},g=(0,f.C)(c.yu$)[n],p=(0,f.T)(),h=(0,C.useCallback)(function(e){p((0,c.x4T)({sectionWidgetId:n,isOpen:!e}))},[p,n]);return t.isCollapsable?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{className:"flex w-full justify-between rounded-lg px-4 py-2 text-left text-sm focus:outline-none focus-visible:ring focus-visible:ring-gray-300 focus-visible:ring-opacity-75 hover:brightness-[1.01] items-center",style:v,onClick:function(){return h(!g)},children:[(0,r.jsx)("span",{children:t.label}),(0,r.jsx)(e$.g8U,{className:(0,i.AK)(g&&"rotate-180 transform","small"===o.formSizing&&"h-5 w-5","medium"===o.formSizing&&"h-6 w-6","large"===o.formSizing&&"h-7 w-7"),style:{color:s}})]}),a===n&&(0,r.jsx)(er.YW,{error:"Please complete all required questions in this section"})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:(0,i.AK)("flex w-full justify-between rounded-lg  px-4 py-2 text-left font-medium"),style:v,children:(0,r.jsx)("span",{children:t.label})})})}},FillAgainButton:{Component:function(e){var t,n=e.evaluatedTemplate,o=e.widgetId,a=(0,f.C)(b.gh),l=(0,f.C)(b.kf),u=(0,f.C)(b.nx),d=(0,f.C)(c.uCB),m=(0,f.C)(V.te),v=(0,W._r)(m,"/v1/flow/".concat(d,"/duplicate"),"POST"),p=v.request,h=v.error,y=v.loading;(0,C.useEffect)(function(){h&&H.Tb(Error("Fill again button error: ".concat(h)))},[h]);var w=n.startFromStepEnabled&&n.startFromStepId,j=(t=(0,g._)(function(){var e,t;return(0,x.Jh)(this,function(n){switch(n.label){case 0:if("edit"===a)return(0,i.F0)("Go to preview mode to try out your form"),[2];if(!w)return[3,2];return[4,p({mode:a,endingStepId:l,fillAgainWidgetId:o,newSessionToken:e=(0,Q.kt)(),sessionTokenToDuplicate:u})];case 1:return(t=n.sent())&&((0,J.CT)(a,d,{token:e,currentStepId:w,startAgainStep:w}),t.newSession.model&&(0,$.kh)(t.newSession.model,d,a),window.location.reload()),[3,3];case 2:window.location.reload(),n.label=3;case 3:return[2]}})}),function(){return t.apply(this,arguments)});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I.g8,{alignment:n.alignment,disabled:!1,text:n.text,backgroundColor:n.backgroundColor,onClick:j,isLoading:y}),h&&(0,r.jsx)(s.Z,{className:"mt-5",type:"error",title:h})]})}},URLButton:{Component:function(e){var t,n=e.evaluatedTemplate,o=(0,f.C)(b.gh),a=(t=(0,g._)(function(){return(0,x.Jh)(this,function(e){return n.url?"edit"!==o||n.openInNewTab?(window.open(n.url,n.openInNewTab?"_blank":"_self"),[2]):((0,i.F0)("Go to preview mode to try out your form"),[2]):((0,i.F0)("URL is missing. Provide a URL in the button's settings."),[2])})}),function(){return t.apply(this,arguments)});return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(I.g8,{alignment:n.alignment,disabled:!1,text:n.text,backgroundColor:n.backgroundColor,onClick:a})})}},Password:{Component:function(e){var t=e.value,n=e.setValue,i=e.evaluatedTemplate,o=e.autoFocus,a=e.unevaluatedTemplate,l=e.widgetId,s=(0,f.C)(d.VU);return(0,ei.A)({evaluatedDefaultValue:i.defaultValue,setValue:n,unevaluatedDefaultValue:a.defaultValue,currentValue:t,widgetId:l,widgetType:"OpinionScale"}),(0,r.jsx)(er.ZP,{evaluatedTemplate:i,modelValue:t,widgetType:"Password",widgetId:l,unevaluatedTemplate:a,children:(0,r.jsx)(eR.Fx,{activeTheme:s,children:(0,r.jsx)(eQ.Z,{autoFocus:o,type:"password",autoComplete:"current-password",placeholder:i.placeholder,onChange:n,value:t||"","aria-required":i.required})})})}},Alert:{Component:function(e){var t=e.unevaluatedTemplate,n=e.evaluatedTemplate,i=e.widgetId,o=(0,f.C)(d.VU),a=(0,f.C)(c.J$G);return(0,r.jsx)(s.Z,{type:n.type,titleClassName:"text-gray-800 mb-0 w-full font-normal",customBackgroundColor:o.isDark?o.questionsBackgroundColor:void 0,fullWidth:!0,title:(0,r.jsx)(u.ZP,{makeBoldSemiBold:!0,evaluatedLabel:n.title,unevaluatedLabel:t.title,widgetId:i,widgetKey:"title",defaultColorOverride:(0,m.z)(n.type)}),rightToLeft:a,children:(0,r.jsx)(r.Fragment,{children:n.description&&(0,r.jsx)("div",{className:"text-gray-800",children:(0,r.jsx)(v,{content:n.description,sizing:o.formSizing})})})})}},FileUpload:{Component:ey,getReviewStepValueFormat:function(e,t){return Array.isArray(t)&&0!==t.length?t.map(function(e){return e.filename}).join(", "):"None submitted"},isDynamicallyLoaded:!0},Divider:{Component:function(e){var t=e.evaluatedTemplate,n=(0,f.C)(d.VU),i=n.formElementSizes.questionCaptionSize,o="image_background"===n.formPosition||n.backgroundImage&&"center"===n.formPosition;return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true",children:(0,r.jsx)("div",{className:"w-full border-t ",style:{borderColor:n.borderColor}})}),(0,r.jsx)("div",{className:"relative flex justify-center",children:t.label&&(0,r.jsx)("span",{className:"px-2  text-sm ",style:(0,M._)((0,p._)({color:n.questionsColor},!o&&{background:n.questionsBackgroundColor}),{fontSize:i.fontSize,lineHeight:i.lineHeight}),children:t.label})})]})}},Image:{Component:eA,isDynamicallyLoaded:!0},Video:{Component:th,isDynamicallyLoaded:!0},Signature:{Component:ew,getReviewStepValueFormat:function(e,t){return Array.isArray(t)&&0!==t.length?"Completed":"None submitted"},isDynamicallyLoaded:!0},AudioRecording:{Component:eS,isDynamicallyLoaded:!0,getReviewStepValueFormat:function(e,t){return t?t.transcription||"".concat((0,ej.G)(t.duration)," recording"):"None submitted"}},RecordPicker:{Component:e3,getReviewStepValueFormat:function(e,t){if(!t||!Array.isArray(t))return"";var n=e.plainTextColumnToShow||e.searchByColumn;if(!n)return"Record chosen";var r=[];return(t.forEach(function(e){var t=e[n];void 0!==t&&("string"==typeof t?r.push(t):r.push(String(t)))}),r.length>0)?r.join(", "):""},isDynamicallyLoaded:!0},SubmissionPicker:{Component:e7,getReviewStepValueFormat:function(e,t){if(!t||!Array.isArray(t))return"";var n=e.searchByColumn;if(!n)return"Submission chosen";var r=[];return(t.forEach(function(e){var t=(0,e6.AV)(n,e);void 0!==t&&("string"==typeof t?r.push(t):r.push(String(t)))}),r.length>0)?r.join(", "):""},isDynamicallyLoaded:!0},Subform:{Component:e9,getReviewStepValueFormat:function(e,t){if(!t||!Array.isArray(t))return"";var n=e.searchByColumn;if(!n)return"".concat(e.submissionText||"Submission"," chosen");var r=[];return(t.forEach(function(e){var t=(0,e6.AV)(n,e);void 0!==t&&("string"==typeof t?r.push(t):r.push(String(t)))}),r.length>0)?r.join(", "):""},isDynamicallyLoaded:!0},Captcha:{Component:et,CustomDraggingComponent:function(){return(0,r.jsx)(z.Z,{bold:!0,isRequired:!0,label:ee.b,children:(0,r.jsxs)("div",{className:"flex w-[300px] h-[75px] bg-gray-50 border border-gray-200 rounded-md mt-2 justify-between items-center align-middle shadow-md",children:[(0,r.jsx)("div",{className:"bg-white border border-gray-200 w-[25px] h-[25px] items-center align-middle ml-4"}),(0,r.jsx)("div",{className:"flex justify-end items-center align-middle h-full mr-4",children:(0,r.jsx)(X.aA,{size:50})})]})})},isDynamicallyLoaded:!0},LocationCoordinates:{Component:eM,getReviewStepValueFormat:function(e,t){return(0,r.jsx)(eL.V,{value:t})},isDynamicallyLoaded:!0},CurrencyInput:{Component:ed,getReviewStepValueFormat:function(e,t,n,o){var a=es()(e.currencyCode)||"$",l=(0,f.C)(d.VU);return(0,r.jsxs)("div",{className:(0,i.AK)("flex flex-col","left"===o?"items-start":"items-end"),style:{color:l.answersColor},children:[(0,r.jsx)("div",{className:(0,i.AK)("flex","left"===o?"justify-start":"justify-end"),children:null!=t.value?(0,r.jsxs)(r.Fragment,{children:[a,t.value]}):(0,r.jsx)(r.Fragment,{})}),(0,r.jsx)(eu.a,{convertedAmount:t.convertedValue,currencyCodeToConvertTo:e.currencyCodeToConvertTo})]})},isDynamicallyLoaded:!0},OpinionScale:{Component:eJ,isDynamicallyLoaded:!0},ThankYou:{Component:tp,isDynamicallyLoaded:!0},PDFViewer:{Component:function(e){var t=e.evaluatedTemplate,n=(0,h._)((0,C.useState)(1),2),o=n[0],a=n[1],l=(0,h._)((0,C.useState)(),2),s=l[0],u=l[1],c="edit"===(0,f.C)(b.gh),m=(0,f.C)(d.VU),v=o<=1,y=!s||s<=o,w=e5(t.url),j=(0,e1.wr)();return(0,r.jsxs)("div",{className:(0,i.AK)("flex flex-col items-start  border rounded-md w-full overflow-hidden"),style:(0,p._)({borderColor:m.borderColor},c&&{maxWidth:j-80}),children:[(0,r.jsxs)("div",{className:" bg-gray-100 w-full  border-b flex justify-between items-center",style:{background:m.inputBackgroundColor,borderColor:m.borderColor},children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(eX.Z,{className:"!bg-transparent !pr-1",theme:"transparent",removeRingOffset:!0,disabled:v,onClick:function(){v||a(o-1)},children:(0,r.jsx)(e$.Y4O,{className:"w-4 h-4 m-1 mr-0",style:{color:m.answersColor,opacity:v?.3:1}})}),(0,r.jsx)(eX.Z,{className:"!bg-transparent !px-1",theme:"transparent",removeRingOffset:!0,disabled:y,onClick:function(){y||a(o+1)},children:(0,r.jsx)(e$.LZ3,{className:"w-4 h-4 m-1 ml-0",style:{color:m.answersColor,opacity:y?.3:1}})}),(0,r.jsx)(eX.Z,{className:"!bg-transparent !px-0",theme:"transparent",removeRingOffset:!0,onClick:(0,g._)(function(){var e,t,n,r;return(0,x.Jh)(this,function(i){switch(i.label){case 0:if("string"!=typeof w)return[2];return[4,fetch(w)];case 1:if(200!==(e=i.sent()).status)return[2];return[4,e.blob()];case 2:return t=i.sent(),n=URL.createObjectURL(t),(r=document.createElement("a")).href=n,r.download=w.split("/")[w.split("/").length-1],r.click(),[2]}})}),children:(0,r.jsx)(e$._8t,{className:"w-4 h-4 m-1 ml-0",style:{color:m.answersColor}})})]}),s&&(0,r.jsxs)("div",{className:"pr-4 text-xs font-light",style:{color:m.answersColor},children:["Page ",o," of ",s]})]}),(0,r.jsx)(e2,{evaluatedTemplate:t,pageNumber:o,setNumPages:u,url:w})]})},isDynamicallyLoaded:!0},Matrix:{Component:eO,getReviewStepValueFormat:function(e,t){var n=Object.keys(t).sort(function(t,n){return e.rows.findIndex(function(e){return e.id===t})-e.rows.findIndex(function(e){return e.id===n})}).map(function(e){var n=t[e];return!n||Array.isArray(n)&&0===n.length?null:e}).filter(function(e){return!!e});return 0===n.length?null:(0,r.jsx)("div",{className:"flex flex-col gap-y-1",children:n.map(function(n){var i,o=null===(i=e.rows.find(function(e){return e.id===n}))||void 0===i?void 0:i.label,a=t[n];return a?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"inline-flex mr-1",children:[(0,D.stripMarkdown)(o||""),":"," "]}),Array.isArray(a)?a.join(", "):a]},n):null})})},isDynamicallyLoaded:!0},Html:{Component:eV,CustomDraggingComponent:function(){return(0,r.jsx)("div",{children:(0,r.jsx)(eV,{evaluatedTemplate:(0,M._)((0,p._)({},eE),{allowScripts:!1,enableIframe:!1}),isReadonlyMode:!0,setValue:function(){},value:null,unevaluatedTemplate:(0,M._)((0,p._)({},eP.x),{allowScripts:!1,enableIframe:!1}),widgetId:""})})}},SendResponse:{Component:function(e){var t,n=e.evaluatedTemplate;e.widgetId,(0,f.C)(b.nx);var o=(0,f.C)(c.uCB),a=(0,f.C)(b.gh),l="edit"===a,s=(0,f.C)(d.VU),u=(0,M._)((0,p._)({},s),{formSizing:"small",formElementSizes:(0,e1.YJ)(tx.lk.small.desktop)}),m=(0,f.C)(b.nx),v=(0,h._)((0,C.useState)(""),2),y=v[0],S=v[1],k=(0,h._)((0,C.useState)(),2),N=k[0],T=k[1],_=(0,h._)((0,C.useState)(!1),2),P=_[0],F=_[1],E="string"==typeof n.emailPrefill&&n.emailPrefill;(0,C.useEffect)(function(){!y&&E&&S(E)},[y,E]);var A=(0,f.C)(V.te),L=(0,W._r)(A,"/v1/flow/".concat(o,"/sendRespondentNotification"),"POST"),R=L.request,z=L.loading,B=(0,j.T)().t,O=(t=(0,g._)(function(){return(0,x.Jh)(this,function(e){switch(e.label){case 0:if(l)return(0,i.F0)("Go to preview mode to try this field.",{position:"top-center"}),[2];if(!y||!tb()(y))return T(B("Please enter an email address")),[2];return[4,R({mode:a,sessionToken:m,email:y,includeEditLink:n.includeEditLink})];case 1:return e.sent(),F(!0),[2]}})}),function(){return t.apply(this,arguments)});(0,C.useEffect)(function(){N&&tb()(y)&&T(void 0)},[y,N]);var q=(0,D.isNearWhite)(u.questionsBackgroundColor)?w().gray[50]:u.inputBackgroundColor,Z=n.includeEditLink,K=n.title||(Z?"Need to change your response?":"Save a copy of your response"),Y=n.subtitle||(Z?"We'll email you a copy of your submission and a link in case you need to modify it later.":"We'll email you a copy of your submission.");return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{className:" shadow sm:rounded-lg border",style:{background:q,borderColor:u.extremelyFadedAnswersColor},children:(0,r.jsxs)("div",{className:"px-4 py-5 sm:p-6 flex flex-col items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold leading-6  mb-0 text-center px-4",style:{color:u.questionsColor,fontSize:s.formElementSizes.h4Size.fontSize},children:K}),(0,r.jsx)("div",{className:"mt-2 max-w-xl text-sm text-center px-1 sm:px-4",style:{color:u.slightlyFadedQuestionsColor},children:(0,r.jsx)("p",{className:"mb-0",children:Y})}),P?(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex justify-center  items-center mt-3 py-1 px-2 font-medium rounded-md pl-[10px]",style:{color:s.primaryColor,background:U()(s.primaryColor).alpha(.1).hsl().string()},children:[B("Link sent"),(0,r.jsx)(e$.rE2,{color:s.primaryColor,className:"h-4 w-4 ml-2"})]})}):(0,r.jsxs)("div",{className:"mt-5 sm:flex sm:items-center justify-center w-full",children:[(0,r.jsx)("div",{className:"w-full sm:max-w-xs",children:(0,r.jsx)(eR.Fx,{activeTheme:u,children:(0,r.jsx)(eQ.Z,{customSize:"small",placeholder:"you@company.com",onChange:S,value:y||""})})}),(0,r.jsx)("div",{className:"sm:ml-2 mt-3 sm:mt-0",children:(0,r.jsx)(I.g8,{sizingOverride:"small",alignment:"center",disabled:!1,text:B("Send"),backgroundColor:n.buttonBackgroundColor,onClick:O,isLoading:z})})]}),N&&(0,r.jsx)("div",{className:"mt-3 text-sm font-medium",style:{color:u.errorColor},children:N})]})})})}},DownloadPDF:{Component:function(e){var t=e.evaluatedTemplate,n=(0,f.C)(c.J$G),o=(0,f.C)(c.Bnf),a=(0,f.C)(c.uCB),l=(0,f.C)(b.gh),s=(0,f.C)(tw.Pf),u=(0,f.C)(d.VU),m=(0,f.C)(b.nx),v=t.documentId,p=(0,h._)((0,C.useState)(!1),2),y=p[0],w=p[1],j=(0,h._)((0,C.useState)(),2),S=j[0],k=j[1],N=(0,f.C)(V.te),T=(0,W._r)(N,"/v1/files/".concat(a,"/").concat(v,"/getDownloadLink?sessionToken=").concat(m,"&mode=").concat(l),"GET"),_=T.request,P=T.error,F=S||P;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(I.g8,{alignment:"center",disabled:!1,text:t.text,icon:(0,r.jsx)(e$.xHk,{className:(0,i.AK)("h-5 w-5",n?"ml-2":" mr-2")}),backgroundColor:t.backgroundColor,onClick:(0,g._)(function(){var e,n;return(0,x.Jh)(this,function(r){switch(r.label){case 0:if("edit"===l)return(0,i.F0)(t.documentId?"Preview your form to test the download button":"Please select a document to download in the field settings first",{duration:4e3}),[2];w(!0),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,_(void 0,"preview"===l?{"fillout-run-as-admin":"yes",authorization:s}:void 0)];case 2:if(!(null==(e=r.sent())?void 0:e.url))return w(!1),[2];return[4,(0,ty.k)(e.url,o.name)];case 3:return r.sent(),[3,5];case 4:return(n=r.sent().message)?k(n):k("Had trouble downloading that document. Please refresh and try again."),[3,5];case 5:return w(!1),[2]}})}),isLoading:y}),F&&(0,r.jsx)("div",{className:"mt-3 text-sm font-medium",style:{color:u.errorColor},children:F})]})}}}},71871:function(e,t,n){"use strict";n.d(t,{K:function(){return o},s:function(){return i}});var r=n(42036),i=Object.keys(r.SHARED_WIDGETS).filter(function(e){return"string"==typeof r.SHARED_WIDGETS[e].docs.exampleValue}),o=Object.keys(r.SHARED_WIDGETS).filter(function(e){return"number"==typeof r.SHARED_WIDGETS[e].docs.exampleValue||"CurrencyInput"===e})},36218:function(e,t,n){"use strict";n.d(t,{B:function(){return A},i:function(){return E}});var r=n(53941),i=n(60053),o=n(50851),a=n(24246),l=n(64228),s=n(89426),u=n(5592),d=n(39142),c=n(69357),f=n(99511),m=n(3320),v=n(82879),g=n(79165),p=n(58971),h=n(39997),x=n(71866),C=n.n(x),b=n(74315),y=n(11576),w=n(32488),j=n(28630);function S(){var e=(0,o._)(["\n  @media screen and (min-width: 1020px) and (max-width: 1267px) {\n    display: none !important;\n  }\n"]);return S=function(){return e},e}function k(){var e=(0,o._)(["\n  --tw-ring-opacity: 1;\n  --tw-ring-color: ",";\n\n  --tw-shadow-color: ",";\n  --tw-shadow: var(--tw-shadow-colored);\n"]);return k=function(){return e},e}var I=h.ZP.div.withConfig({componentId:"sc-68596118-0"})(S()),N=function(){var e=(0,p.C)(s.Je)||[],t=(0,m.fw)().isPreviewingTemplate,n="edit"===(0,p.C)(d.gh),r=(0,p.C)(u.xbn);return!n&&!t&&!e.includes("NO_BRANDING")&&!r},T=function(e){var t=e.noBottomPadding,n="preview"===(0,p.C)(d.gh),r=(0,i._)((0,b.useQueryParam)(w.zA,b.StringParam),1)[0],o=(0,p.C)(f.VU),l=(0,p.T)();return(0,a.jsx)(a.Fragment,{children:n&&"yes"!==r&&(0,a.jsxs)(I,{className:(0,y.AK)("ml-3 flex items-center",t?"-mb-1":"pb-2"),children:[(0,a.jsx)(j.Z,{secondaryColor:o.borderColor,checked:!1,onChange:function(){l((0,c.WK)({isOpen:!0,viewingBillingPlan:"pro",upgradeReasonSource:"Fillout hide branding cta"}))},size:"small"}),(0,a.jsx)("div",{className:"text-xs font-normal ml-2 mt-1",style:{color:o.slightlyFadedAnswersColor},children:"Hide branding"})]})})},_=function(){var e=(0,p.C)(s.Ie),t=(0,p.C)(f._Y);return e||t},V=function(e){var t=e.background,n=e.primaryColor,r=e.className;return(0,a.jsxs)("svg",{className:r,width:"247",height:"40",viewBox:"11.5 0 147 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsxs)("g",{clipPath:"url(#clip0_68_426)",children:[(0,a.jsx)("rect",{width:"147",height:"25",rx:"7.5",fill:"white"}),(0,a.jsx)("mask",{id:"mask0_68_426",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"-79",width:"147",height:"147",children:(0,a.jsx)("path",{d:"M133.219 -79H13.7813C6.17011 -79 0 -72.8299 0 -65.2187V54.2187C0 61.8299 6.17011 68 13.7813 68H133.219C140.83 68 147 61.8299 147 54.2187V-65.2187C147 -72.8299 140.83 -79 133.219 -79Z",fill:"white"})}),(0,a.jsxs)("g",{mask:"url(#mask0_68_426)",children:[(0,a.jsx)("path",{d:"M133.219 -79.4365H13.7813C6.17011 -79.4365 0 -73.2664 0 -65.6552V53.7821C0 61.3933 6.17011 67.5635 13.7813 67.5635H133.219C140.83 67.5635 147 61.3933 147 53.7821V-65.6552C147 -73.2664 140.83 -79.4365 133.219 -79.4365Z",fill:n}),(0,a.jsx)("path",{d:"M260.552 124.882C208.179 177.256 153.495 175.527 97.0818 119.114C70.3294 92.3612 52.8869 58.6247 51.15 30.7016C49.4131 2.77811 62.8021 -26.3135 89.2797 -52.7911C114.884 -78.3957 140.776 -90.3294 166.664 -88.8827C195.46 -87.4371 229.196 -69.9946 257.984 -41.2066C313.816 14.6248 314.672 70.7631 260.552 124.882Z",fill:t,fillOpacity:"0.2"})]}),(0,a.jsx)("path",{d:"M183.399 82.3691C159.594 106.175 134.711 105.362 109.014 79.6656C96.8273 67.48 88.8744 52.1203 88.0706 39.4137C87.2668 26.7072 93.3453 13.4764 105.381 1.44082C117.018 -10.1976 128.794 -15.6153 140.574 -14.9446C153.679 -14.2729 169.038 -6.31984 182.151 6.79305C207.583 32.2254 207.999 57.7701 183.399 82.3691Z",fill:t,fillOpacity:"0.4"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_68_426",children:(0,a.jsx)("rect",{width:"147",height:"25",rx:"7.5",fill:"white"})})})]})},P=h.ZP.a.withConfig({componentId:"sc-68596118-1"})(k(),function(e){return e.ringColor},function(e){return e.shadowColor}),F=function(){var e=(0,p.C)(d.gh),t=(0,p.C)(u.uCB),n=_(),r=(0,p.C)(f.VU),i=(0,p.C)(g.mr),o="preview"===e?w.BM:(0,m.kr)({flowPublicIdentifier:t,utmSource:"fillout-powered-by",isScheduling:i}),s=r.questionsColor;if(n)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(P,{ringColor:r.borderColor||C().gray[300],shadowColor:r.extremelyFadedPrimaryColor||C().gray[300],href:o,target:"_blank",rel:"noreferrer",className:(0,y.AK)("rounded-[45.02px] flex items-center  shadow-md hover:ring-2  overflow-hidden mb-2 mx-1 ","pl-1 pr-[14px]","transition duration-200 ease-in-out ring-opacity-0 hover:ring-opacity-100","relative","border ","mt-2 md:mt-0"),style:{borderColor:r.borderColor,backgroundColor:r.questionsBackgroundColor},children:(0,a.jsxs)("div",{className:(0,y.AK)("flex items-center ml-[9px] py-[8px] z-10"),children:[(0,a.jsx)("div",{className:(0,y.AK)(" leading-[12px]  mr-[5px] font-normal","text-[11px]"),style:{color:s},children:"Made with"}),(0,a.jsx)("div",{className:"mb-[2px]",children:(0,a.jsx)(l.ds,{textColor:s,scale:n?.5:.6})})]})}),(0,a.jsx)(T,{})]});var c=(0,v.nD)(r.primaryColor);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(P,{ringColor:r.primaryColor,shadowColor:r.editorFaintPrimaryColor||C().gray[300],href:o,target:"_blank",rel:"noreferrer",className:(0,y.AK)("rounded-[45.02px] flex items-center  shadow-md hover:ring-2  overflow-hidden mb-2 mx-1","pl-1 pr-5","transition duration-200 ease-in-out ring-opacity-0 hover:ring-opacity-100","relative","border "),style:{borderColor:r.primaryColor},children:[(0,a.jsxs)("div",{className:(0,y.AK)("flex items-center ml-[9px] py-[8px] z-10"),children:[(0,a.jsx)("div",{className:(0,y.AK)(" leading-[12px]  mr-[10px] font-normal","text-[11px]"),style:{color:c},children:"Made with"}),(0,a.jsx)("div",{className:"mb-[2px]",children:(0,a.jsx)(l.ds,{textColor:c,scale:.6})})]}),(0,a.jsx)("div",{className:"absolute top-0 left-0 w-full h-full right-0 bottom-0  ",children:(0,a.jsx)(V,{primaryColor:r.primaryColor,background:r.backgroundColor})})]}),(0,a.jsx)(T,{})]})},E=function(e){(0,r._)(e);var t=(0,p.C)(f.VU);return N()?(0,a.jsx)("div",{className:(0,y.AK)("flex justify-center items-center lg:pb-0 group bg-transparent","left"===t.formPosition?"lg:right-6":"lg:left-6","hidden lg:flex lg:fixed lg:bottom-6"),children:(0,a.jsx)(F,{})}):(0,a.jsx)(a.Fragment,{})},A=function(e){(0,r._)(e);var t=N(),n=_();return(0,p.C)(g.mr)||!t?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)("div",{className:(0,y.AK)("flex justify-center items-center lg:pb-0 group bg-transparent","lg:hidden",n?"pt-1 pb-1":"pt-7"),children:(0,a.jsx)(F,{})})}},2957:function(e,t,n){"use strict";n.d(t,{C:function(){return a}});var r=n(58971),i=n(5592),o=n(39142),a=function(){var e=(0,r.C)(i.Wq8);return(0,r.C)(o.rd).filter(function(t){return e.includes(t)})}},93052:function(e,t,n){"use strict";n.d(t,{$k:function(){return F},S8:function(){return E},h1:function(){return A}});var r=n(51037),i=n(18775),o=n(50858),a=n(55818),l=n(85556),s=n(31398),u=n(5592),d=n(79165),c=n(3517),f=n(39142),m=n(42036),v=n(58971),g=n(11576),p=n(81281),h=n(7438),x=n(89604),C=n(73993),b=n(57733),y=n(31342),w=n(28417),j=n(86185),S=n(89426),k=n(57500),I=n(32488),N=n(11558),T=n(38580),_=n(49616),V=function(e,t,n){var r,i={channel:"sub_form_channel",state:"done",flowPublicIdentifier:e,parentFlowPublicIdentifier:t,newRecord:n,subformWidgetId:null===(r=(0,k.vl)())||void 0===r?void 0:r[I.x1]};window.parent.postMessage(JSON.stringify(i),"*")},P=function(e){var t;null==window||null===(t=window.parent)||void 0===t||t.postMessage(JSON.stringify({channel:"form_channel",state:"submitted",flowPublicIdentifier:e}),"*")},F=function(){var e=(0,C.Qy)(),t=(0,v.C)(f.F9),n=(0,v.C)(u.Mlc),r=(0,v.C)(u.QsL),i=(0,v.C)(f.kf),o=(0,v.T)(),a=(0,v.C)(u.AHN),l=(0,v.C)(f.Pq);return function(s){var d=s.newModel,c=s.skipValidations;if("form"===a.type&&!c){var m=a.template,v=(0,b.n)(m).map(function(e){return e.id}),g=!0,p=!1,h=void 0;try{for(var y,w=v[Symbol.iterator]();!(g=(y=w.next()).done);g=!0){var j=y.value,S=m.widgets[j],k=!1,I=void 0,N=!0,T=!1,_=void 0;try{for(var V,P=C.NB[Symbol.iterator]();!(N=(V=P.next()).done);N=!0){var F=V.value;if((0,C.h3)(F,S)){var E=(null===(M=l[a.id])||void 0===M?void 0:M[S.id])||{},A=void 0;n.includes(j)&&(A=Object.keys(r).find(function(e){return r[e].includes(j)}));var L=!1;if(A){var M,D,R,z,B,O=(null===(B=l[a.id])||void 0===B?void 0:B[A])||{};L=(0,x.TO)(O,[],S.id)}var U=(0,x.TO)(E,[],S.id)||L,q=d||t;if(!(U||e(F,null==q?void 0:null===(D=q[i])||void 0===D?void 0:null===(R=D[j])||void 0===R?void 0:R.value,E[F],E,S.type,null==q?void 0:null===(z=q[i])||void 0===z?void 0:z[j]).isValid)){k=!0,console.log("".concat(F," validation failed for widget ").concat(j)),I=j,A&&(I=A,o((0,u.Ik5)({sectionWidgetId:A})));break}}}}catch(e){T=!0,_=e}finally{try{N||null==P.return||P.return()}finally{if(T)throw _}}if(k)return o((0,f.D$)({attemptedTransition:!0})),{firstInvalidWidgetName:I}}}catch(e){p=!0,h=e}finally{try{g||null==w.return||w.return()}finally{if(p)throw h}}}return{firstInvalidWidgetName:void 0}}},E=function(){var e,t,n=(0,v.C)(f.F9),x=(0,h.hv)(),C=(0,v.C)(u.AHN),b=(0,v.C)(S.IA),E=(0,v.C)(u.Iqs),A=(0,v.C)(u.Uzd)||(null===(t=(0,k.vl)())||void 0===t?void 0:t[I.c_]),L=!!A,M=(0,v.C)(f.nx),D=(0,v.C)(d.AT),R=(0,v.C)(u.uCB),z=(0,v.C)(S.Jn),B=(0,y.hU)(),O=(0,N.r)().scheduleEvent,U=F(),q=(0,v.C)(f.gh),Z=(0,v.C)(f.hU),W=(0,v.C)(S.te),K=(0,v.C)(f.Bp),Y=(0,v.T)();return e=(0,r._)(function(e){var t,u,d,v,h,y,S,N,F,G,H,J,Q,$,X,ee,et,en,er,ei,eo,ea,el,es,eu,ed,ec,ef,em,ev,eg,ep,eh,ex,eC,eb;return(0,l.Jh)(this,function(ey){switch(ey.label){case 0:if(t=e.skipValidations,u=e.newModel,d=e.dontProceedToEndingPages,v=u||n,!R||!M||"edit"===q)return[2,{}];if(h=U({skipValidations:t,newModel:u}).firstInvalidWidgetName)return[2,{firstInvalidWidgetName:h}];if(!((null==x?void 0:x.value)&&!x.isVerified&&!t))return[3,5];ey.label=1;case 1:return ey.trys.push([1,3,,4]),[4,(0,T.UX)(W,"/v1/flow/userVerification/".concat(R,"/send?mode=").concat(q),"POST",{value:x.value,type:x.type,submissionId:K})];case 2:return y=ey.sent().token,Y((0,f.nb)({token:y,isOpen:!0})),[3,4];case 3:return S=ey.sent(),(0,g.Eo)(S.message),[3,4];case 4:return[2,{}];case 5:if(ey.trys.push([5,11,,12]),N=(0,m.computeNextStep)(D,C.id,v),!(F=D.steps[N]))return(0,g.eZ)("Could not find next step. Try setting one in page logic"),[2,{}];if(G=(null==F?void 0:F.type)==="ending",d&&G)return[2,{}];if(H=(Z||0)+1,!G)return[3,9];if(!(ee=((null===(J=v.stepHistory)||void 0===J?void 0:J.path)||[]).find(function(e){var t;return(null===(t=D.steps[e])||void 0===t?void 0:t.type)==="native_scheduling"}))||(en=v[ee],!((null==(er=null===(et=D.steps[ee])||void 0===et?void 0:et.template)?void 0:er.bookEventTiming)==="on_form_submission"&&(null==en?void 0:en.eventStartTime))))return[3,7];return eo=(0,m.evaluateGenericObject)(er,v,{timezone:(0,_.v)(),language:null===(ei=D.settings)||void 0===ei?void 0:ei.language}),[4,O(ee,en,eo)];case 6:if(el=(ea=ey.sent()).canContinue,(es=ea.newSchedulingModel)&&(v=(0,a._)((0,o._)({},v),(0,i._)({},ee,es)),Y((0,f.hS)({stepId:ee,newModel:es,flowPublicIdentifier:R,mode:q})),ec=(ed=(0,s.UI)(v,D.calculations,null===(eu=D.settings)||void 0===eu?void 0:eu.language)).hasChanged,ef=ed.newCalculationsModel,ec&&(v.calculations=ef)),!el)return[2,{}];ey.label=7;case 7:return[4,B({mode:q,flowTemplate:D,currentStepId:C.id,model:v,sessionSequenceNumber:H,agentLocation:W})];case 8:em=ey.sent(),(0,c.z)(R);try{P(R)}catch(e){}if((ev=null==em?void 0:em.newModel)&&(null===(Q=(0,k.vl)())||void 0===Q?void 0:Q[I.b4])==="true"?V(R,A,(0,o._)((0,i._)({},m.UNIQUE_SUBMISSION_PICKER_ID_KEY,null==ev?void 0:null===(eg=ev.globals)||void 0===eg?void 0:eg.submissionId),ev)):ev&&E&&(ex=(eh=E.activeIntegration.writeQuery.id)&&(null===(ep=ev[eh])||void 0===ep?void 0:ep.data),L&&ex&&V(R,A,ex)),("redirect"===(eC=(0,m.evaluateGenericObject)(null===($=D.steps[N])||void 0===$?void 0:$.template,v,{timezone:(0,_.v)(),language:null===(X=D.settings)||void 0===X?void 0:X.language})).type||"new_form"===eC.type)&&(b&&(0,p.C)(D,R,N,q),(0,j.t)({evaluatedTemplate:eC,flowPublicIdentifier:R,mode:q})))return[2,{isRedirecting:!0}];return[3,10];case 9:var ew;ew=(0,r._)(function(){return(0,l.Jh)(this,function(e){switch(e.label){case 0:if(e.trys.push([0,2,,3]),z)return[2];return[4,B({mode:q,flowTemplate:D,currentStepId:C.id,model:v,sessionSequenceNumber:H,agentLocation:W})];case 1:return e.sent(),[3,3];case 2:return console.error(e.sent()),[3,3];case 3:return[2]}})}),function(){ew.apply(this,arguments)}(),ey.label=10;case 10:return Y((0,f.Rp)({mode:q,sequenceNumber:H,flowPublicIdentifier:R})),Y((0,f.YV)({transition:{stepId:N,isEnding:G}})),b&&(0,p.C)(D,R,N,q),Y((0,f.D$)({attemptedTransition:!1})),[3,12];case 11:if(!(eb=ey.sent().message))return[2,{}];return w.dI.includes(eb)?(0,g.eZ)("Oops! Network connection error, please try again or refresh the page.",{position:"top-center",duration:1e4}):(0,g.eZ)(eb,{position:"top-center",duration:1e4}),[2,{}];case 12:return[2,{}]}})}),function(t){return e.apply(this,arguments)}},A=function(){var e,t=(0,v.C)(f.F9),n=(0,v.C)(f.kf),d=(0,v.C)(u.Nad),c=(0,v.C)(u.VyW),m=E();return e=(0,r._)(function(e){var r,u,f,v,g,p;return(0,l.Jh)(this,function(l){switch(l.label){case 0:if(r=e.widgetId,u=e.newValue,!n)return[2];return f=(0,a._)((0,o._)({},t),(0,i._)({},n,(0,a._)((0,o._)({},t[n]),(0,i._)({},r,{value:u})))),d&&Object.keys(d).length>0&&(g=(v=(0,s.UI)(f,d,c)).hasChanged,p=v.newCalculationsModel,g&&(f.calculations=p)),[4,m({newModel:f})];case 1:return l.sent(),[2]}})}),function(t){return e.apply(this,arguments)}}}}]);