1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3522],{8131:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[site]/templates/emailLookup",function(){return a(9945)}])},9945:function(e,t,a){"use strict";a.r(t),a.d(t,{ButtonWrapper:function(){return C},EmailWrapper:function(){return k},IconWrapper:function(){return S},StyledFlex:function(){return Z},__N_SSP:function(){return b},default:function(){return x}});var o=a(52903),n=a(98454),r=a(28898),i=a(22623),l=a(60243),d=a(36316),u=a(82057),c=a(92603),s=a(2784),m=a(62202),p=a(24511);let h=e=>({formSchema:[{id:"email-lookup",title:e("account:emailLookup.formTitle"),fields:[{id:"LastName",type:"text",name:e("forms:labels.lastName"),disabled:!1,required:!0,opts:{}},{id:"BadgeId",type:"number",name:e("forms:labels.badgeId"),disabled:!1,required:!0,opts:{}}]}],validationSchema:p.Ry().shape({LastName:p.Z_().required(e("forms:validation.lastNameRequired")).min(2,e("forms:validation.lastNameMin")),BadgeId:p.Rx().required(e("forms:validation.badgeIdRequired")).test("len",e("forms:validation.badgeIdLength"),e=>e&&6===e.toString().length)})}),g=e=>{let t=h(e);return{Lions:{...t},Money2020:{...t}}};var f=a(5321),v=a(28809),y=a(26580),b=!0;let Z=(0,c.Z)(v.kC,{target:"e147o4m60"})(e=>{let{theme:{space:t,colors:a}}=e;return{alignItems:"center",columnGap:t.small}}),k=(0,c.Z)(v.xu,{target:"e147o4m61"})(e=>{let{theme:{space:t,colors:a}}=e;return{flex:"9 1 auto",margin:"".concat(t.base," 0"),padding:"".concat(t.small," ").concat(t.base),border:"1px solid ".concat(a.greymid),borderRadius:t.xsmall,background:a.greylight,minHeight:t.xlarge}}),S=(0,c.Z)(v.xu,{target:"e147o4m62"})(()=>({flex:"1 1 auto",":hover":{cursor:"pointer"}})),C=(0,c.Z)(v.xu,{target:"e147o4m63"})(e=>{let{theme:{mediaQueries:t}}=e;return{[t.untilMedium]:{"& button":{width:"100%"}},[t.medium]:{"& button":{margin:"0 auto"}}}});var x=e=>{let{festivalOwner:t,csrfToken:a}=e,{t:c}=(0,y.$G)(["account","common","forms"]),{space:p}
1=(0,f.u)(),[h,v]=(0,s.useState)(""),[b,x]=(0,s.useState)(!1),[B,L]=(0,s.useState)(!1),K=async e=>{try{x(!0);let t=await fetch("/api/account/getBadgeEmail",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":a},body:JSON.stringify(e)});if(401===t.status){m.ZP.error(c("account:emailLookup.loginRequired")),x(!1);return}if(!t.ok)throw Error();let o=await t.json(),n=null==o?void 0:o.Email;n&&"string"==typeof n&&n.includes("@")?v(n):m.ZP.error(c("account:emailLookup.noEmailFound"))}catch(e){m.ZP.error(c("account:profile.updateError"))}finally{x(!1)}},w=e=>{if(!B&&("click"===e.type||"Enter"===e.key)){var t,a;e.preventDefault(),navigator.clipboard.writeText(null===(a=e.target)||void 0===a?void 0:null===(t=a.dataset)||void 0===t?void 0:t.email),L(!0);let o=setTimeout(()=>{L(!1),clearTimeout(o)},1500)}},E=g(c)[t];return(0,o.BX)(o.HY,{children:[(0,o.tZ)(l.Z,{title:c("account:emailLookup.title"),variant:"standard"}),(0,o.tZ)(r.W2,{children:h?(0,o.tZ)(r.rj,{justifyContent:"center",py:"base",children:(0,o.BX)(r.sg,{children:[(0,o.tZ)(u.xv,{as:"h2",size:"large",children:c("account:emailLookup.associatedEmail")}),(0,o.BX)(Z,{children:[(0,o.tZ)(k,{children:(0,o.tZ)(u.xv,{"aria-label":h,children:h})}),(0,o.BX)(S,{tabIndex:0,"aria-label":c("account:emailLookup.copyEmail"),"data-email":h,onClick:w,onKeyDown:w,children:[(0,o.tZ)(d.Z,{name:B?"Check":"Copy",size:p.large,color:B?"success":"greydark"}),B&&(0,o.BX)("span",{children:[" ",c("account:emailLookup.copied")]})]})]}),(0,o.tZ)(C,{children:(0,o.tZ)(n.Z,{variant:"primary",onClick:()=>v(""),children:c("account:emailLookup.backToLookup")})})]})}):(0,o.tZ)(i.Z,{onSubmit:K,initialData:{LastName:"",BadgeId:""},formFieldDataset:null,formSchema:E.formSchema,validationSchema:E.validationSchema,isFormSubmitting:b,submitButtonText:c("account:emailLookup.lookup"),cancelCta:{label:c("common:actions.cancel"),href:"/account"}})})]})}},22623:function(e,t,a){"use strict";a.d(t,{Z:function(){return g}});var o=a(52903),n=a(32799);a(2784);var r=a(13024);let i=(e,t,a,o,n)=>{let r=e;return o&&n&&(r=e.filter(e=>n(e,o))),r.map(e=>({value:e[t],text:e[a]}))},l=function(e,t,a,n){var l,d;let u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",{disabled:c,id:s,name:m,required:p,type:h,placeholder:g,description:f}=e,{errors:v,touched:y,values:b,setFieldValue:Z,handleChange:k,handleBlur:S}=a,C=e.opts.values||[];if(!(!e.opts.condition||e.opts.condition(b,t)))return null;let x={key:e.id,disabled:c,id:s,name:m,description:f,required:p,type:h,placeholder:g};switch(e.type){case"location":return(0,o.tZ)(r.kw,{...x,value:b[e.id]||"",handleChange:k,setFieldValue:Z,dataSet:t,touched:y,errors:v,googleMapsApiKey:n,handleBlur:S});case"select":return e.opts.remote&&(C=i((null===(l=e.opts.remote)||void 0===l?void 0:l.nestedDataKey)?t[e.opts.remote.name][e.opts.remote.nestedDataKey]:t[e.opts.remote.name],e.opts.remote.valueKey,e.opts.remote.labelKey,b,e.opts.selectOptionsCondition)),(0,o.tZ)(r.JD,{...x,options:C,errors:v,touched:y,value:b[e.id]||"",handleChange:k});case"subSelect":return(0,o.tZ)(r.w8,{...x,dataSet:t,inputOpts:e.opts,errors:v,touched:y,value:b[e.id]||"",handleChange:k,getSelectOptions:i,setFieldValue:Z});case"hidden":return(0,o.tZ)("input",{...x,type:"hidden",value:b[e.id]||""});case"mobile":{let a=[],n=[];return(null===(d=e.opts)||void 0===d?void 0:d.callingCode.remote)&&(a=t[e.opts.callingCode.remote.name].map(t=>({value:"".concat(t[e.opts.callingCode.remote.valueKey]),text:"".concat(t[e.opts.callingCode.remote.countryLabelKey]," (+").concat(t[e.opts.callingCode.remote.labelKey],")")})),n=t[e.opts.callingCode.remote.name]),(0,o.tZ)(r.qX,{...x,touched:y,errors:v,options:a,dataSet:n,value:b[e.id]||"",setFieldValue:Z,handleChange:k,handleBlur:S,schemaOptions:e.opts,formValues:b,callingCodeLabel:u})}default:return(0,o.tZ)(r.oH,{...x,touched:y,errors:v,value:b[e.id]||"",handleChange:k,handleBlur:S})}},d=(e,t,a)=>{let o={};return e.map(e=>(e.fields.map(e=>{if("select"===e.type&&e.opts.remote){var n;let r=(null===(n=e.opts.remote)||void 0===n?void 0:n.nestedDataKey)?a[e.opts.remote.name][e.opts.remote.nestedDataKey]:a[e.opts.remote.name],i=r.find(a=>a[e.opts.remote.labelKey]===t[e.id])||null;if(o[e.id]=i?i[e.opts.remote.valueKey]:"",e.opts.parentField&&e.opts.parentKey&&t[e.opts.parentField]){let a=r.find(a=>t[e.opts.parentField].toString()===a[e.opts.remote.valueKey].toString()&&""!==a[e.opts.parentKey]);if(a)return o[e.opts.parentField]=a[e.opts.parentKey].toString(),o[e.id]=t[e.opts.parentField],e}}return"toggle"===e.type?o[e.id]=t[e.id]||!1:o[e.id]=t[e.id]||"",e}),e)),o};var u=a(92603),c=a(28809),s=a(98454);let m=(0,u.Z)(c.xu,{target:"e1mgpgzi0"})(()=>({marginBottom:"none"})),p=(0,u.Z)(c.kC,{target:"e1mgpgzi1"})(e=>{let{theme:{space:t}}=e;return{padding:"".concat(t.medium," 0"),flexWrap:"wrap",justifyContent:"flex-end"}}),h=(0,u.Z)(s.Z,{target:"e1mgpgzi2"})(e=>{let{theme:{space:t}}=e;return{marginLeft:t.small}});var g=e=>{let{formFieldDataset:t,initialData:a,formSchema:r,validationSchema:i,isFormSubmitting:u,cancelCta:c,onSubmit:g,googleMapsApiKey:f,submitButtonText:v,callingCodeLabel:y}=e,b=d(r,a,t),Z=e=>{let t=Object.keys(e);if(t.length>0){var a;null===(a=document.getElementsByName(t[0])[0])||void 0===a||a.focus()}};return(0,o.tZ)(m,{children:(0,o.tZ)(n.J9,{initialValues:b,validationSchema:i,onSubmit:e=>{g(e)},children:e=>(0,o.BX)(n.l0,{noValidate:!0,children:[(0,o.tZ)("div",{children:r.map(a=>(0,o.BX)("div",{children:[a.title&&(0,o.tZ)("h3",{children:a.title}),a.fields.map(a=>l(a,t,e,f,y))]},a.id))}),(0,o.BX)(p,{children:[c&&(0,o.tZ)(s.Z,{type:"button",variant:"secondary",...c,children:c.label}),(0,o.tZ)(h,{as:"button",loading:u,onClick:()=>Z(e.errors),type:"submit",children:v})]})]})})})}}},function(e){e.O(0,[4688,1055,3024,2888,9774,179],function(){return e(e.s=8131)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.