(window.webpackJsonp=window.webpackJsonp||[]).push([[74],{"4Yc/":function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r,i=n("zjfJ"),o=n("zygG"),a=n("KD1n"),c=n("ERkP"),l=n("RNvQ"),u=n.n(l),s=n("jiAW"),d=n("UvP8"),p=n("L7b9"),f=n("dPHX"),b=c.createElement;function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:v,t=c.useState(e.error),n=Object(o.a)(t,2),r=n[0],i=n[1],a=c.useState(""),l=Object(o.a)(a,2),s=l[0],d=l[1],h=c.useState(!0),x=Object(o.a)(h,2),j=x[0],E=x[1];c.useEffect((function(){e.error&&i(e.error)}),[e.error]);var S=u()((function(t,n,r,o){try{if("button"===n.type)return!0;if(r.validateSync({validator:t},{abortEarly:!1}),E(!0),i(n.validity.customError),n.hasOwnProperty("setCustomValidity")&&n.setCustomValidity(""),o){if(o.value!==t)return E(!1),d("".concat(n.getAttribute("label")," ").concat(e.i18nText?e.i18nText.mustMatch:"must match")),!1;d("")}return!0}catch(c){var a=c;a.inner.length>0&&(E(!1),n.hasOwnProperty("setCustomValidity")&&n.setCustomValidity(a.inner[0].message),i(a.inner[0].message))}return!1}),25,{leading:!0,trailing:!1}),w=function(e,t,n){try{return"button"===t.type||(n.validateSync({validator:e},{abortEarly:!1}),!0)}catch(r){return!1}},T=function(e,t){return"".concat(null===e||void 0===e?void 0:e.toLowerCase().replace(/\:|\?|\.|\!|\"|\'/g,"").split(" ").join("-"),"-form-item-id").concat(t?"-confirm":"","-").concat(m())};return b(c.Fragment,null,c.Children.map(e.children,(function(t){var n=t,i=c.useRef(null),o=c.useRef(null),a=null!=i&&null!=i.current&&null!=i.current.parentElement?i.current.parentElement.previousElementSibling:null;c.useImperativeHandle(e.bindref,(function(){return g(g({},n.props),{},{focus:function(){null!=i&&null!=i.current&&i.current.focus()},validate:function(){return null!=i&&null!=i.current&&S(i.current.value,i.current,u,null!==o.current&&o.current)},value:null!=i&&null!=i.current?i.current.value:"",inView:e.inView||!1,offsetTop:null!=i&&null!=i.current&&null!=a?a.offsetTop-Number(e.offset):0})}));var l={};n.props.validators&&n.props.validators.forEach((function(e){return function(e,t,n){switch(e){case"MIN_LENGTH":n.minLength=t;break;case"MAX_LENGTH":n.maxLength=t;break;case"REGEX_MATCHES":n.pattern=t}return n}(e.name,e.argument,l)}));var u=Object(p.object)().shape({validator:O(g(g({},n.props),l)).label(n.props.label)});return b(c.Fragment,null,b(y,{flexDirection:e.row?"row":"column",disableSpacing:e.disableSpacing,"data-testid":T(n.props.label,!1),className:e.className},c.cloneElement(n,g(g({},n.props),{},{error:r,bindref:i,onChange:n.props.onChange?function(t){var r=S(t.target.value,t.target,u);n.props.onChange&&(n.props.onChange(t),r&&e.onValidationSuccess&&e.onValidationSuccess(t.target.value))}:function(t){var n=t.target;j||(S(t.target.value,t.target,u)&&e.onValidationSuccess&&e.onValidationSuccess(n.value),o.current&&o.current.value===n.value&&d(""))},onBlur:function(t){var n=t.target;j&&(S(n.value,n,u,null!==o.current&&o.current),o.current&&(o.current.value!==n.value&&""!==o.current.value||d(""))),w(n.value,n,u)&&e.onValidationSuccess&&e.onValidationSuccess(n.value)}})),r&&"boolean"!==typeof r&&b(f.a,{id:"".concat(n.props.label,"-error"),error:r})),n.props.confirmable&&b(y,{flexDirection:e.row?"row":"column","data-testid":T(n.props.label,!0)},c.cloneElement(n,g(g({},n.props),{},{error:!r&&s,label:"".concat(e.i18nText?e.i18nText.confirm:"Confirm"," ").concat(n.props.label),helperText:"",bindref:o,onChange:function(){i.current&&o.current&&i.current.value===o.current.value&&d("")},onBlur:function(){!r&&i.current&&o.current&&i.current.value!==o.current.value&&d("".concat(n.props.label," ").concat(e.i18nText?e.i18nText.mustMatch:"must match"))}})),!r&&s&&b(f.a,{id:"".concat(e.i18nText?e.i18nText.confirm:"Confirm","-").concat(n.props.label,"-error"),error:s})))})))}},"6XIJ":function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},Dhk8:function(e,t,n){var r=n("Syyo"),i=n("KCLV"),o=n("kHoZ"),a="[object Null]",c="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?c:a:l&&l in Object(e)?i(e):o(e)}},ENE1:function(e,t,n){var r=n("IBsm");e.exports=function(){return r.Date.now()}},I1fX:function(e,t,n){var r=n("6XIJ"),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},IBsm:function(e,t,n){var r=n("e93E"),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},KCLV:function(e,t,n){var r=n("Syyo"),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(l){}var i=a.call(e);return r&&(t?e[c]=n:delete e[c]),i}},LXPo:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return N}));var r=n("zjfJ"),i=n("ERkP"),o=n("dNoy"),a=n("qdM3"),c=n("7nmT"),l=n.n(c),u=n("aWzz"),s=n.n(u),d=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,d));return(i.createElement("div",p({},t,{ref:this.handleRecaptchaRef})))},r}(i.Component);h.displayName="ReCAPTCHA",h.propTypes={sitekey:s.a.string.isRequired,onChange:s.a.func,grecaptcha:s.a.object,theme:s.a.oneOf(["dark","light"]),type:s.a.oneOf(["image","audio"]),tabindex:s.a.number,onExpired:s.a.func,onErrored:s.a.func,size:s.a.oneOf(["compact","normal","invisible"]),stoken:s.a.string,hl:s.a.string,badge:s.a.oneOf(["bottomright","bottomleft","inline"]),isolated:s.a.bool},h.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var g=n("oXkQ"),m=n.n(g);function v(){return(v=Object.assign||function(e){for(var t=1;t-1&&t[n].parentNode&&t[n].parentNode.removeChild(t[n]);var r=y[e];r&&(delete r.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===S.removeOnUnmount&&delete y[e])},a.render=function(){var t=S.globalName,n=this.props,r=(n.asyncScriptOnLoad,n.forwardedRef),o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(n,["asyncScriptOnLoad","forwardedRef"]);return t&&"undefined"!==typeof window&&(o[t]="undefined"!==typeof window[t]?window[t]:void 0),o.ref=r,Object(i.createElement)(e,o)},o}(i.Component),r=Object(i.forwardRef)((function(e,t){return Object(i.createElement)(n,v({},e,{forwardedRef:t}))}));return r.displayName="AsyncScriptLoader("+t+")",r.propTypes={asyncScriptOnLoad:s.a.func},m()(r,e)})(h),T=i.createElement,k=function(e){return e.COMPACT="compact",e.NORMAL="normal",e.INVISIBLE="invisible",e}({}),R=i.forwardRef((function(e,t){var n;return"undefined"!==typeof document&&document.body?l.a.createPortal(T(w,{ref:t,size:e.size,onChange:e.onChange,sitekey:e.siteKey,isolated:!0}),(null===(n=e.containerRef)||void 0===n?void 0:n.current)?e.containerRef.current:document.body):null})),L=i.createElement,C=function(e){return e.LOGIN="LOGIN",e.REGISTER="REGISTRATION",e.FORGOTTEN_PASSWORD="FORGOT_PASSWORD",e.RESET_PASSWORD="RESET_PASSWORD",e.MARKETING_MATERIAL_SIGN_UP="MARKETING_MATERIAL_SIGN_UP",e.ADD_REVIEW="ADD_REVIEW",e.WAITLIST="WAITLIST",e.REFERRAL_EMAIL="REFERRAL_EMAIL",e}({}),I=Object(r.a)(Object(r.a)({},"VISIBLE-RECAPTCHA","V2_VISIBLE"),"INVISIBLE-RECAPTCHA","V2_INVISIBLE"),N=function(e){var t=Object(a.c)(),n=Object(o.g)(),r=i.useRef(),c=i.useRef();return i.useEffect((function(){window.recaptchaOptions={useRecaptchaNet:!!n.enableRecaptchaNet}}),[]),i.useMemo((function(){var i,o,a=null===t||void 0===t?void 0:null===(i=t.rateLimitersFiring)||void 0===i?void 0:i.find((function(t){return t.rateLimitingBucket===e.bucket.toString()})),l=a&&n.listAttackStrategy?null===a||void 0===a?void 0:null===(o=a.captchaBypassAvailable)||void 0===o?void 0:o.find((function(e){return e.type===I[n.listAttackStrategy]})):void 0;return{captcha:(null===l||void 0===l?void 0:l.type)?L(R,{containerRef:e.containerRef,size:"V2_INVISIBLE"===(null===l||void 0===l?void 0:l.type)?k.INVISIBLE:void 0,siteKey:null===l||void 0===l?void 0:l.siteKey,onChange:function(e){e&&c.current&&c.current(e)},ref:r}):null,type:null===l||void 0===l?void 0:l.type,submit:function(e){(null===l||void 0===l?void 0:l.type)&&"V2_VISIBLE"!==(null===l||void 0===l?void 0:l.type)&&r.current?(c.current=e,r.current.reset(),r.current.execute()):e()}}}),[null===t||void 0===t?void 0:t.rateLimitersFiring,e.bucket,n.listAttackStrategy,r,c])}},MOqF:function(e,t,n){"use strict";n.r(t),n.d(t,"WaitlistSignupWidgetRenderer",(function(){return H}));var r,i,o,a,c,l,u,s=n("ERkP"),d=n("zygG"),p=n("CqS1"),f=n("xRQW"),b=n("LWxk"),h=n("KD1n"),g=n("6QEl"),m=n("135/"),v=n("jiAW"),y=n("jt0n"),O=n("bZso"),x=n("7asP"),j=g.c.h1(r||(r=Object(h.a)(["\n ",";\n text-align: ",";\n margin-bottom: ",";\n"])),Object(m.a)("large1","alternate"),(function(e){return e.horizontalAlignment||"left"}),Object(v.i)(2)),E=g.c.p(i||(i=Object(h.a)(["\n ",";\n text-align: ",";\n margin-bottom: ",";\n"])),Object(m.a)("bodyText","default"),(function(e){return e.horizontalAlignment||"left"}),(function(e){return e.extraPadding?Object(v.i)(3):Object(v.i)(1)})),S=g.c.p(o||(o=Object(h.a)(["\n ",";\n"])),Object(m.a)("small","default")),w=Object(g.c)(x.a)(a||(a=Object(h.a)(["\n margin-top: ",";\n margin-bottom: ",";\n"])),Object(v.i)(3),Object(v.i)(4)),T=g.c.div(c||(c=Object(h.a)(["\n margin-bottom: ",";\n"])),Object(v.i)(4)),k=Object(g.c)(O.a)(l||(l=Object(h.a)(["\n padding: ",";\n\n "," {\n padding: ",";\n }\n"])),Object(v.i)(2),(function(e){return Object(y.d)(e.theme.breakpointUtils.map,"sm")}),Object(v.i)(4)),R=n("1U1M"),L=n("H5qd"),C=n.n(L),I=n("7ESh"),N=n("dNoy"),A=n("LXPo"),U=n("4Yc/"),_=n("c4N8"),F=n("ftQL"),P=n("pE1c"),D=s.createElement,B=C()(u||(u=Object(h.a)(["\n mutation SignUpForEmailMarketingCampaign(\n $input: SignUpForEmailMarketingCampaignInput!\n ) {\n signUpForEmailMarketingCampaign(input: $input) @client\n }\n"]))),M=function(e){var t,n,r=s.useRef(null),i=Object(I.a)(),o=Object(N.e)().csrf,a=Object(A.b)({bucket:A.a.MARKETING_MATERIAL_SIGN_UP,containerRef:r}),c=Object(N.g)().showFullNameFieldOnWaitlist,l={requiredFieldText:Object(p.a)("general.form.required.field")||"* Required field",emailFieldName:Object(p.a)("form.fieldname.email"),fullNameFieldName:Object(p.a)("form.fieldname.fullname"),submitButtonText:Object(p.a)("general.signup.text")},u=Object(R.c)(B,{onCompleted:function(t){t.signUpForEmailMarketingCampaign&&!t.signUpForEmailMarketingCampaign.errors?e.setFormStatus(V.SUCCESSFUL):(i.error("signUpForEmailMarketingCampaign error in Waitlist Signup Form",{data:t}),e.setFormStatus(V.FAILURE))},onError:function(t){i.debug(t.message,{reqId:"Waitlist Signup Form"}),e.setFormStatus(V.FAILURE)}}),f=Object(d.a)(u,1)[0];return D("div",{ref:r},(null===(t=e.title)||void 0===t?void 0:t.text)&&D(j,{"data-testid":"form-title",horizontalAlignment:e.title.horizontalAlignment},e.title.text),(null===(n=e.subtitle)||void 0===n?void 0:n.text)&&D(E,{extraPadding:!0,horizontalAlignment:e.subtitle.horizontalAlignment},e.subtitle.text),D(P.a,{csrf:o,onSubmit:function(t){a.submit((function(n){return function(t,n){var r=t.emailAddress,i=t.name;f({variables:{input:{email:r,name:c?i:"",campaignId:e.campaignCode,marketingOptIn:e.enableSignUp===W.OPTIONAL?t.marketingConsentCheckbox:e.enableSignUp===W.AUTO,auditData:{messageShown:e.gdprDisclaimerText||"",formIdentifier:"MARKETING_CAMPAIGN",formLocation:window.location.href}}},context:{headers:{"X-Captcha-Type":a.type,"X-Captcha-Response":n}}})}(t,n)}))},fields:[{fieldName:"name",renderField:function(t,n){return c?D(T,null,D(U.a,{bindref:t,disableSpacing:!0,key:n},D(_.a,{label:e.fullNamePlaceholderText||l.fullNameFieldName,required:!0,type:"text",helperText:l.requiredFieldText,i18nText:{requiredError:Object(p.a)("general.form.input.validation.required")}}))):null}},{fieldName:"emailAddress",renderField:function(t,n){return D(U.a,{bindref:t,disableSpacing:!0,key:n},D(_.a,{label:e.emailPlaceholderText||l.emailFieldName,required:!0,type:"email",helperText:l.requiredFieldText,i18nText:{emailValidationError:Object(p.a)("general.form.input.validation.email"),requiredError:Object(p.a)("general.form.input.validation.required")}}))}},{fieldName:"marketingConsentCheckbox",renderField:function(t,n){return e.signUpCheckboxLabel&&e.enableSignUp===W.OPTIONAL?D(U.a,{bindref:t,disableSpacing:!0,key:n},D(F.a,{checked:!1,label:e.signUpCheckboxLabel,required:!0})):null}}]},a.captcha,D(w,{type:"submit",emphasis:"high","data-testid":"button-submit-waitlist-signup"},e.buttonText||l.submitButtonText)),e.gdprDisclaimerText&&D(S,null,e.gdprDisclaimerText))},z=s.createElement,V=function(e){return e.UNSUBMITTED="UNSUBMITTED",e.FAILURE="FAILURE",e.SUCCESSFUL="SUCCESSFUL",e}({}),q=function(e){var t,n,r,i,o=s.useState(V.UNSUBMITTED),a=Object(d.a)(o,2),c=a[0],l=a[1],u={successTitle:Object(p.a)("general.waitlist.signup.success.title")||"Thanks, we\u2019ll be in touch",successSubtitle:Object(p.a)("general.waitlist.signup.success.subtitle")||"Get ready for an exciting email landing in your inbox soon...",continueShoppingButtonText:Object(p.a)("general.continueshopping.label"),errorTitle:Object(p.a)("general.waitlist.signup.error.title")||"Oops, something went wrong!",errorSubtitle:Object(p.a)("general.waitlist.signup.error.subtitle")||"Click the below link to try again and don\u2019t forget to select \u201cI\u2019m not a robot\u201d, so you don\u2019t miss out on this exciting launch.",errorButtonText:Object(p.a)("general.waitlist.signup.error.button.text")||"Go back and try again"};return z(k,{columns:12},z(b.a,{colStart:[1,4,4,4],colSpan:[12,6,6,6]},c===V.UNSUBMITTED?z(M,{key:"waitlist-form",title:e.title,subtitle:e.subtitle,buttonText:e.buttonText,gdprDisclaimerText:e.gdprDisclaimerText,emailPlaceholderText:e.emailPlaceholderText,fullNamePlaceholderText:e.fullNamePlaceholderText,campaignCode:e.campaignCode,setFormStatus:l,enableSignUp:e.enableSignUp,signUpCheckboxLabel:e.signUpCheckboxLabel}):[c===V.SUCCESSFUL?z(s.Fragment,{key:"success-container"},z(j,{"data-testid":"success-title",horizontalAlignment:null===(t=e.title)||void 0===t?void 0:t.horizontalAlignment},u.successTitle),z(E,{horizontalAlignment:null===(n=e.subtitle)||void 0===n?void 0:n.horizontalAlignment},u.successSubtitle),z(w,{emphasis:"high",renderedAs:"a",href:f.b.HomePage},u.continueShoppingButtonText)):z(s.Fragment,{key:"error-container"},z(j,{"data-testid":"error-title",horizontalAlignment:null===(r=e.title)||void 0===r?void 0:r.horizontalAlignment},u.errorTitle),z(E,{horizontalAlignment:null===(i=e.subtitle)||void 0===i?void 0:i.horizontalAlignment},u.errorSubtitle),z(w,{"data-testid":"go-back-button",emphasis:"high",onClick:function(){l(V.UNSUBMITTED)}},u.errorButtonText))]))},G=s.createElement,W=function(e){return e.OPTIONAL="optional",e.AUTO="auto",e.NONE="none",e}({}),H=function(e){return e&&e.campaignCode?G(q,function(e){return{title:{text:e.title||void 0},subtitle:{text:e.subtitle||void 0},buttonText:e.buttonText||void 0,campaignCode:e.campaignCode||"",gdprDisclaimerText:e.gdprDisclaimerText||void 0,emailPlaceholderText:e.placeholderText||void 0,fullNamePlaceholderText:e.fullNamePlaceholderText||void 0,enableSignUp:e.enableSignUp||void 0,signUpCheckboxLabel:e.signUpText||void 0}}(e)):null}},RNvQ:function(e,t,n){var r=n("tQYX"),i=n("ENE1"),o=n("nvU9"),a="Expected a function",c=Math.max,l=Math.min;e.exports=function(e,t,n){var u,s,d,p,f,b,h=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError(a);function y(t){var n=u,r=s;return u=s=void 0,h=t,p=e.apply(r,n)}function O(e){var n=e-b;return void 0===b||n>=t||n<0||m&&e-h>=d}function x(){var e=i();if(O(e))return j(e);f=setTimeout(x,function(e){var n=t-(e-b);return m?l(n,d-(e-h)):n}(e))}function j(e){return f=void 0,v&&u?y(e):(u=s=void 0,p)}function E(){var e=i(),n=O(e);if(u=arguments,s=this,b=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(x,t),g?y(e):p}(b);if(m)return clearTimeout(f),f=setTimeout(x,t),y(b)}return void 0===f&&(f=setTimeout(x,t)),p}return t=o(t)||0,r(n)&&(g=!!n.leading,d=(m="maxWait"in n)?c(o(n.maxWait)||0,t):d,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==f&&clearTimeout(f),h=0,u=b=s=f=void 0},E.flush=function(){return void 0===f?p:j(i())},E}},Syyo:function(e,t,n){var r=n("IBsm").Symbol;e.exports=r},a88S:function(e,t,n){var r=n("Dhk8"),i=n("tLQN"),o="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||i(e)&&r(e)==o}},e93E:function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n("lpmq"))},ftQL:function(e,t,n){"use strict";n.d(t,"b",(function(){return j})),n.d(t,"e",(function(){return S})),n.d(t,"g",(function(){return w})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return k})),n.d(t,"f",(function(){return R})),n.d(t,"a",(function(){return L}));var r,i,o,a,c,l,u,s=n("zygG"),d=n("KD1n"),p=n("ERkP"),f=n("AU4o"),b=n.n(f),h=n("jiAW"),g=n("135/"),m=n("dPHX"),v=n("DQj2"),y=p.createElement,O=n("pJ58").v4,x=b()((function(){return Promise.resolve().then(n.bind(null,"WKDh"))}),{ssr:!0,fallback:y("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return["WKDh"]},modules:["@thg-commerce/gravity-icons/src/components/Tick"]}}),j=h.j.div(r||(r=Object(d.a)(["\n box-sizing: border-box;\n width: ",";\n height: 48px;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n justify-content: center;\n\n pointer-events: ",";\n\n border: "," solid\n ",";\n\n &:hover {\n background: ",";\n }\n &:active {\n background: ",";\n }\n"])),(function(e){return e.width||"fit-content"}),(function(e){return e.disabled?"none":""}),(function(e){return e.thinFocusBorder?"1px":"2px"}),(function(e){return e.focused&&!e.disabled?e.theme.colors.palette.brand.base:e.transparentBorder?"transparent":e.theme.colors.palette.greys.white}),(function(e){return e.theme.colors.palette.brand.lightest}),(function(e){return e.theme.colors.palette.brand.lighter})),E=h.j.input(i||(i=Object(d.a)(["\n position: absolute;\n pointer-events: none;\n overflow: hidden;\n border: 0;\n z-index: -1;\n height: 1px;\n width: 0;\n margin: 0;\n padding: 0;\n white-space: nowrap;\n opacity: 0;\n"]))),S=h.j.div(o||(o=Object(d.a)(["\n display: inline-flex;\n box-sizing: border-box;\n border: "," solid\n ",";\n width: 24px;\n height: 24px;\n background: ",";\n"])),(function(e){return e.thinBorder?"1px":"2px"}),(function(e){return e.error?e.theme.colors.error.base:e.disabled?e.theme.colors.palette.greys.light:e.checked?e.theme.colors.palette.brand.base:e.theme.colors.palette.greys.grey}),(function(e){return e.checked?e.disabled?e.theme.colors.palette.greys.light:e.theme.colors.palette.brand.base:"none"})),w=Object(h.j)(x)(a||(a=Object(d.a)(["\n display: block;\n margin: auto;\n stroke: ",";\n"])),(function(e){return e.checked?e.theme.colors.palette.greys.white:"none"})),T=h.j.label(c||(c=Object(d.a)(["\n display: flex;\n position: relative;\n padding: "," ",";\n color: ",";\n word-break: break-word;\n &:hover {\n cursor: pointer;\n }\n"])),Object(h.i)(1.5),Object(h.i)(1),(function(e){return e.disabled?e.theme.colors.palette.greys.light:e.theme.colors.palette.greys.grey})),k=Object(h.j)(v.a)(l||(l=Object(d.a)(["\n ","\n margin: ",";\n ","\n ","\n ","\n"])),Object(g.a)("small","default"),(function(){return"0px ".concat(Object(h.i)(1)," 0px ").concat(Object(h.i)(2))}),(function(e){return e.labelHidden&&"visibility: hidden;"}),(function(e){return e.labelHidden&&"position: absolute;"}),(function(e){return e.labelHidden&&"left: -100000px;"})),R=Object(h.j)(m.b)(u||(u=Object(d.a)(["\n margin-left: ",";\n"])),Object(h.i)(1)),L=function(e){var t=p.useState(e.checked||!1),n=Object(s.a)(t,2),r=n[0],i=n[1],o=p.useState(!1),a=Object(s.a)(o,2),c=a[0],l=a[1],u=e.disabled,d=e.label,f=e.error,b=e.id,h=void 0===b?O():b,g=e.bindref||p.useRef(null),m=function(t){var n;return"".concat(null===(n=e.label)||void 0===n?void 0:n.toLowerCase().replace(/\:|\?|\.|\!|\"|\'/g,"").split(" ").join("-"),"-").concat(t,"-id-").concat(h)};return p.useEffect((function(){return e.getState&&e.getState(r)}),[r]),p.useEffect((function(){e.checked!==r&&i(e.checked)}),[e.checked]),y(p.Fragment,null,y(j,{disabled:u,focused:c,"data-testid":m("checkbox-container"),width:e.width,thinFocusBorder:e.thinFocusBorder,transparentBorder:e.transparentBorder},y(T,{disabled:u,"data-testid":"checkbox-label"},y(E,{"aria-label":e.labelHidden?e.label:void 0,type:"checkbox",id:h,onFocus:function(){l(!0)},onBlur:function(){l(!1)},disabled:u,checked:r,required:e.required,onChange:function(){e.onChange&&e.onChange(!r),i(!r)},value:"".concat(r),ref:g,"data-testid":m("checkbox-hidden")}),y(S,{"aria-hidden":!0,checked:r,disabled:u,error:!!f,"data-testid":"checkbox-styled",thinBorder:e.thinBorder},y(w,{checked:r,"data-testid":m("checkbox-tick")})),y(k,{"data-testid":m("checkbox-text"),disabled:e.disabled,content:d,labelHidden:e.labelHidden}))),e.error&&y(R,{id:m("".concat(d,"-error")),error:e.error}))}},kHoZ:function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},nvU9:function(e,t,n){var r=n("I1fX"),i=n("tQYX"),o=n("a88S"),a=NaN,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||u.test(e)?s(e.slice(2),n?2:8):c.test(e)?a:+e}},pE1c:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("6K86"),i=n("ERkP"),o=i.createElement,a=function(e){var t,n=i.useRef(null);return e.refs[(t=e.field.fieldName,t&&t.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,""))]=n,e.field.renderField(n,e.field.fieldName)},c=function(e){var t={},n=i.useState({}),c=Object(r.a)(n,2),l=c[0],u=c[1],s=i.useState({}),d=Object(r.a)(s,2),p=d[0],f=d[1],b=i.useState(""),h=Object(r.a)(b,2),g=h[0],m=h[1];i.useEffect((function(){e.validateOnRender&&Object.keys(t).forEach((function(e){t[e].current.validate()||(f(t),u(t))}))}),[]),i.useEffect((function(){0!==Object.keys(l).length?m("".concat(Object.keys(l).length," error").concat(1===Object.keys(l).length?"":"s"," in the form: ").concat(function(e){return Object.keys(e).reduce((function(t,n){return null!==e[n]&&null!==e[n].current?"".concat(t," ").concat(e[n].current.label,","):t}),"")}(l))):m("")}),[l]),i.useEffect((function(){Object.keys(l).forEach((function(e){null!==p[e]&&null!==p[e].current&&l[e].current.validate()})),Object.keys(l).some((function(n){return null!==p[n]&&null!==p[n].current&&!l[n].current.validate()&&(t[n].current.focus&&t[n].current.focus(),!e.dropdownForm&&window.scrollTo(0,t[n].current.offsetTop),!0)}))}),[l]),i.useEffect((function(){if(0!==Object.keys(p).length){var t=!1,n=Object.keys(p).reduce((function(e,n){return null!==p[n]&&null!==p[n].current&&(p[n].current.validate()||(t=!0,e[n]=p[n])),e}),{});u(n);var r={};Object.keys(p).forEach((function(e){null!==p[e]&&null!==p[e].current&&(r[e]="true"===p[e].current.value||"false"===p[e].current.value?"true"===p[e].current.value:p[e].current.value)})),t?e.onMinimize&&e.onSubmit(r,t):e.onSubmit(r)}}),[p]);var v=function(e,t){return e.map((function(e){return o(a,{key:e.fieldName,field:e,refs:t})}))}(e.fields,t);return o("form",{noValidate:!0,method:"POST",onSubmit:function(e){e.preventDefault(),f(t)}},e.csrf&&o("input",{type:"hidden",name:"_csrf",value:e.csrf}),o(i.Fragment,null,e.renderAnnouncer&&e.renderAnnouncer("assertive",g),v,e.children))}},tLQN:function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},tQYX:function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}}]); //# sourceMappingURL=74.6d5d8012971eec66b227.js.map