PageSourceSearch

https://www.londonchamber.co.uk/sitefiles/next-gen/dist/5778-b210d4e67c21fcd374c5.js

js londonchamber.co.uk collected 2026-09-24 18:30:49 UTC 46,072 bytes, 2 lines download raw bytes

1"use strict";(this.webpackChunklcci=this.webpackChunklcci||[]).push([[5778],{45756:(e,t,n)=>{n.d(t,{Z:()=>l});var a,i=n(67294);function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},r.apply(this,arguments)}const l=function(e){return i.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",viewBox:"0.04 0 13.16 11.99"},e),a||(a=i.createElement("path",{d:"M13.2 5.999a.986.986 0 00-.254-.619L7.937.28a1.112 1.112 0 00-1.37-.075.91.91 0 00.01 1.313L10.099 5.1H.939a.9.9 0 100 1.8h9.16l-3.522 3.582a.961.961 0 00-.01 1.313 1.1 1.1 0 001.37-.075l5.009-5.1a.847.847 0 00.254-.619z",fill:"currentColor"})))}},3667:(e,t,n)=>{n.d(t,{Z:()=>l});var a,i=n(67294);function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},r.apply(this,arguments)}const l=function(e){return i.createElement("svg",r({viewBox:"0 0 20.003 20"},e),a||(a=i.createElement("path",{d:"M17.667.005a2.42 2.42 0 00-1.673.708L7.067 9.627a.667.667 0 00-.177.315l-.738 3.1a.667.667 0 00.807.8l3.1-.738a.667.667 0 00.315-.177l8.918-8.918a2.371 2.371 0 00.044-3.341 2.3 2.3 0 00-1.669-.663zm.016 1.323a.968.968 0 01.712.286 1.021 1.021 0 01-.044 1.462l-.2.2-1.413-1.418.2-.2a1.09 1.09 0 01.745-.331zm-14.907.37A2.776 2.776 0 00.005 4.464v12.771a2.781 2.781 0 002.762 2.77h12.771a2.781 2.781 0 002.771-2.771V8.898a.667.667 0 10-1.335 0v8.336a1.42 1.42 0 01-1.436 1.437H2.767a1.421 1.421 0 01-1.437-1.437V4.459a1.42 1.42 0 011.437-1.436h8.282a.665.665 0 000-1.329zm13.021 1.1l1.413 1.413-6.624 6.627-1.415-1.415zm-7.569 7.568l1.415 1.415-.072.072-1.859.443.443-1.855z",fill:"currentColor",fillRule:"evenodd"})))}},3858:(e,t,n)=>{n.d(t,{K:()=>o});var a=n(67294),i=n(15137),r=n(35755),l=n(76);function o(e){const t=e.displayName||e.name||"Component",n=t=>a.createElement(r.Fz,{ReactRouterRoute:i.AW},a.createElement(e,{...t}));return n.displayName=`withQueryParams(${t})`,function(e){const t=t=>{if("undefined"==typeof window){if(!t.location)throw new Error('The "location" prop was not provided when the "withRouter" HOC was used. Ensure the Tag Helper is using the "use-router" parameter.');return a.createElement(i.gx,{basename:t.basename,context:t.context,location:t.location},a.createElement(e,{...t}))}return a.createElement(l.VK,{basename:t.basename},a.createElement(e,{...t}))};return t.displayName=`withRouter(${e.displayName||e.name||"Component"})`,t}(n)}},62820:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(23196),i=n(77765),r=n(14555),l=n(54267),o=n(95798),s=n(96805);const d={Container:n(47416).ZP.a.withConfig({displayName:"CtaLinkstyles__Container",componentId:"sc-1tz76kc-0"})(["",";position:relative;display:inline-flex;align-items:center;color:var(--fgColor,",");"," font-size:",";line-height:1em;text-decoration:none;@media ","{",";&:active{transform:translateY(1.5px);}}& > span{position:relative;}& > span::after{"," content:'';position:absolute;bottom:0;left:0;display:block;background:var(--fgColor,",");height:2px;transform:scaleX(0);transform-origin:center left;width:100%;}svg{"," display:block;color:var(--accentColor,",");margin-left:8px;width:17px;}&:not(span):focus-visible,&:not(span).focus-ring,&:not(span):hover{& > span::after{transform:scaleX(1);}}&:not(span).focus-ring{outline:auto;outline-offset:3px;outline-width:2px;outline-style:solid;outline-color:var(--fgColor,",");}&[data-has-arrow='true']:not(span):focus-visible,&[data-has-arrow='true']:not(span):hover{svg{transform:translateX(",");}}a:focus-visible span&,a:hover span&,button:focus-visible span&,button:hover span&{& > span::after{transform:scaleX(1);}}a:focus-visible span[data-has-arrow='true']&,a:hover span[data-has-arrow='true']&,button:focus-visible span[data-has-arrow='true']&,button:hover span[data-has-arrow='true']&{svg{transform:translateX(",");}}"],o.h,i.Z.base.blue,l.Z.apparat.semiBold,(0,r.qx)(18,26),(0,s.C4)(s.AS.TabletLarge),(0,a.eR)("transform"),(0,a.eR)("transform"),i.Z.base.blue,(0,a.eR)("transform"),i.Z.primary.orange,i.Z.base.blue,(0,r.qx)(8,12),(0,r.qx)(8,12))}}
1,57574:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(41656),i=n(45756),r=n(67294),l=n(49641),o=n(62820);const s=e=>{let{as:t="a",hasArrow:n=!0,icon:s,children:d,...c}=e;return r.createElement(l.tE,{focusRingClass:"focus-ring"},r.createElement(o.Z.Container,{as:t,"data-has-arrow":!s&&n,...c},r.createElement("span",null,d),s?(0,a.h)(s):r.createElement(r.Fragment,null,n&&r.createElement(i.Z,null))))}},18050:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(14555),i=n(98163),r=n(47416);const l={Container:r.ZP.section.withConfig({displayName:"SectionWrapperstyles__Container",componentId:"sc-2cu52x-0"})(["--scrollOffset:var(--headerHeight,0px);--sectionSpacing:",";&[data-spacing='margin'],&[data-spacing='padding']{scroll-margin:calc(var(--scrollOffset) + var(--sectionSpacing)) 0 0;}&[data-spacing='margin']{margin:var(--sectionSpacing) 0;}&[data-spacing='padding']{padding:var(--sectionSpacing) 0;}&[data-spacing='none']{scroll-margin:var(--scrollOffset) 0 0;}position:relative;z-index:5;&[data-hide-overflow='true']{overflow:hidden;}"],(0,a.qx)(40,66)),Inner:r.ZP.div.withConfig({displayName:"SectionWrapperstyles__Inner",componentId:"sc-2cu52x-1"})(["",""],i.dR)}},27559:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(67294),i=n(18050);const r=a.forwardRef(((e,t)=>{let{children:n,layout:r="default",spacing:l="margin",hideOverflow:o,id:s,...d}=e;return"fullWidth"===r?a.createElement(i.Z.Container,{id:s||void 0,ref:t,"data-spacing":l,"data-hide-overflow":o,...d},n):a.createElement(i.Z.Container,{id:s||void 0,ref:t,"data-spacing":l,"data-hide-overflow":o,...d},a.createElement(i.Z.Inner,null,n))}));r.displayName="SectionWrapper";const l=r},35778:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Me});var a=n(29874),i=n(74213),r=n(3858),l=n(48840),o=n(67294),s=n(77765),d=n(14555),c=n(54267),u=n(95798),m=n(96805),p=n(80061),f=n(28454),y=n(62820),v=n(60300),h=n(75255),g=n(73554),E=n(27559),w=n(51672),b=n(76538),x=n(47416);const C=(0,x.ZP)(E.Z).withConfig({displayName:"BookEventFormstyles__Container",componentId:"sc-1twp6gw-0"})(["background-color:",";"],s.Z.primary.blueGrey),Z=x.ZP.div.withConfig({displayName:"BookEventFormstyles__Layout",componentId:"sc-1twp6gw-1"})(["display:grid;gap:",";@media ","{grid-template-columns:35fr 65fr;}"],(0,d.qx)(30,90),(0,m.Dp)(m.AS.TabletLarge)),_=x.ZP.div.withConfig({displayName:"BookEventFormstyles__SectionTitle",componentId:"sc-1twp6gw-2"})([""," margin-bottom:",";"],p.h3,(0,d.qx)(28,40)),k=x.ZP.div.withConfig({displayName:"BookEventFormstyles__EventType",componentId:"sc-1twp6gw-3"})(["text-transform:uppercase;"," letter-spacing:1px;color:",";margin:0;margin-bottom:24px;"],p.oW,(0,b.DZ)(.5,s.Z.base.blue)),P=x.ZP.div.withConfig({displayName:"BookEventFormstyles__LeftContent",componentId:"sc-1twp6gw-4"})(["display:flex;flex-direction:column;@media ","{position:sticky;top:var(--sitePadding);height:max-content;max-height:100%;}"],(0,m.Dp)(m.AS.TabletLarge)),S=x.ZP.div.withConfig({displayName:"BookEventFormstyles__Title",componentId:"sc-1twp6gw-5"})([""," margin:0;margin-bottom:24px;"],p.Xm),F=x.ZP.div.withConfig({displayName:"BookEventFormstyles__InPartnershipWith",componentId:"sc-1twp6gw-6"})([""," color:",";margin:0;"],p.oW,(0,b.DZ)(.5,s.Z.base.blue)),D=x.ZP.hr.withConfig({displayName:"BookEventFormstyles__HR",componentId:"sc-1twp6gw-7"})(["margin:32px 0px;border:0;background-color:",";height:1px;width:100%;@media ","{order:3;margin-bottom:12px;}"],s.Z.secondary.blueGrey,(0,m.C4)(m.AS.TabletLarge)),A=x.ZP.div.withConfig({displayName:"BookEventFormstyles__DetailsList",componentId:"sc-1twp6gw-8"})(["display:flex;flex-direction:column;gap:24px;"]),T=x.ZP.div.withConfig({displayName:"BookEventFormstyles__Details",componentId:"sc-1twp6gw-9"})(["display:flex;flex-direction:column;"," margin:0;span:first-of-type{color:",";}"],p.oW,(0,b.DZ)(.5,s.Z.base.blue)),I=x.ZP.div.withConfig({displayName:"BookEventFormstyles__FormAccordion",componentId:"sc-1twp6gw-10"})(["display:flex;flex-direction:column;",":first-child{padding-top:0px;}"],(()=>$)),O=x.ZP.div.withConfig({displayName:"BookEventFormstyles__AlternativeContent",componentId:"sc-1twp6gw-11"})(["display:flex;flex-direction:column;",":first-child{padding-top:0px;}"],(()=>$)),L=(0,x.ZP)(w.m.div).attrs((e=>{let{isActive:t}=e;return{initial:"hidden",animate:t?"visible":"hidden",exit:"hidden",variants:{hidden:{height:"0px"},visible:{height:"auto"}},transition:{bounce:0}}})).withConfig({displayName:"BookEventFormstyles__FormContent",componentId:"sc-1twp6gw-12"})(["overflow:hidden;padding:0 5px;margin:0 -5px;"]),$=x.ZP.div.withConfig({displayName:"BookEventFormstyles__FormBase",componentId:"sc-1twp6gw-13"})(["display:flex;flex-direction:column;padding:32px 0px;border-bottom:1px solid ",";transition:opacity 0.25s ease-in-out;[data-form-disabled='true'] &{opacity:0.3;}","{background-color:",";&[data-has-value='false'],option:first-of-type{color:",";}option{color:",";}}"],(0,b.DZ)(.5,s.Z.primary.blue),h.Z.Select,s.Z.white,(0,b.DZ)(.5,s.Z.base.blue),s.Z.base.blue),N=x.ZP.div.withConfig({displayName:"BookEventFormstyles__FormContentInner",componentId:"sc-1twp6gw-14"})(["padding-top:32px;"]),q=x.ZP.button.withConfig({displayName:"BookEventFormstyles__FormStepTitle",componentId:"sc-1twp6gw-15"})(["",";",";margin:0;color:",";user-select:none;display:flex;gap:16px;justify-content:space-between;align-items:center;text-align:left;span:nth-of-type(2){margin:0 0 -3px auto;font-size:",";line-height:1;color:",";}svg{display:block;color:",";width:",";}"],u.h,p.h5,(0,b.DZ)(.5,s.Z.base.blue),(0,d.qx)(16,18),s.Z.base.blue,s.Z.primary.orange,(0,d.qx)(16,24)),B=x.ZP.div.withConfig({displayName:"BookEventFormstyles__StepBottom",componentId:"sc-1twp6gw-16"})(["padding-top:",";display:flex;flex-wrap:wrap;gap:16px ",";align-items:center;","{font-size:",";line-height:",";svg{width:14px;order:-1;transform:scale(-1);margin:0 8px 0 0;}&:focus-visible,&:hover{svg{transform:scale(-1) translateX(",") !important;}}}"],(0,d.qx)(28,40),(0,d.qx)(24,56),y.Z.Container,(0,d.qx)(18,20),(0,d.qx)(22,26),(0,d.qx)(3,5)),R=x.ZP.div.withConfig({displayName:"BookEventFormstyles__SplitFields",componentId:"sc-1twp6gw-17"})(["display:grid;column-gap:16px;@media ","{grid-template-columns:1fr 1fr;}"],(0,m.Dp)(m.AS.TabletLarge)),z=(0,x.iv)(["border-radius:100px;font:inherit;color:",";height:48px;padding:0 24px;",";margin:0;border:2px solid ",";background-color:",";&[readonly],&[disabled]{--backgroundDisabled:",";opacity:0.5;}&::placeholder{font:inherit;color:",";}
1"],s.Z.base.blue,p.oW,s.Z.secondary.blueGrey,s.Z.white,s.Z.white,(0,b.DZ)(.5,s.Z.base.blue)),M=(0,x.iv)(["",";",";display:block;margin:0 0 8px;color:",";"],p.oW,c.Z.lato.semiBold,s.Z.base.blue),j=x.ZP.div.withConfig({displayName:"BookEventFormstyles__Field",componentId:"sc-1twp6gw-18"})(["display:flex;flex-direction:column;gap:8px;","{display:flex;flex-direction:column;height:100%;}","{",";flex:0;}input,select,textarea{","}","::before{border-color:",";background-color:",";}select{option:first-of-type{color:",";}option{color:",";}}textarea{padding:15px 24px;border-radius:30px;}&[data-promo]{flex-direction:row;width:100%;max-width:608px;","{flex-grow:1;}","{margin-top:calc("," + 8px);height:48px;}@media ","{","{span{display:none;}}}}"],v.Z.Container,v.Z.Label,M,z,g.Z.RadioBtnText,s.Z.secondary.blueGrey,s.Z.white,(0,b.DZ)(.5,s.Z.base.blue),s.Z.base.blue,v.Z.Container,f.ZP.Container,(0,d.qx)(26,28),(0,m.C4)(m.AS.Tablet),f.ZP.Text),Q=x.ZP.label.withConfig({displayName:"BookEventFormstyles__ExternalLabel",componentId:"sc-1twp6gw-19"})(["",";margin-bottom:16px;"],M),W=x.ZP.p.withConfig({displayName:"BookEventFormstyles__FormError",componentId:"sc-1twp6gw-20"})(["",";color:",";"],p.Q_,s.Z.validation.invalid),V={Container:C,Layout:Z,SectionTitle:_,EventType:k,LeftContent:P,Title:S,InPartnershipWith:F,HR:D,DetailsList:A,Details:T,FormAccordion:I,FormBase:$,FormStepTitle:q,FormContent:L,FormContentInner:N,StepBottom:B,SplitFields:R,Field:j,ExternalLabel:Q,FormError:W,AlternativeContent:O};var G=n(97756),H=n(3667),K=n(19279),X=n(95443),Y=n(70655),U=n(49304),J=n(42396),ee=n(58868);function te(){var e=(0,o.useRef)(!1);return(0,ee.L)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var ne=n(240),ae=n(96681),ie=n(76316),re=function(e){var t=e.children,n=e.initial,a=e.isPresent,i=e.onExitComplete,r=e.custom,l=e.presenceAffectsLayout,s=(0,ae.h)(le),d=(0,ie.M)(),c=(0,o.useMemo)((function(){return{id:d,initial:n,isPresent:a,custom:r,onExitComplete:function(e){var t,n;s.set(e,!0);try{for(var a=(0,Y.XA)(s.values()),r=a.next();!r.done;r=a.next())if(!r.value)return}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}null==i||i()},register:function(e){return s.set(e,!1),function(){return s.delete(e)}}}}),l?void 0:[a]);return(0,o.useMemo)((function(){s.forEach((function(e,t){return s.set(t,!1)}))}),[a]),o.useEffect((function(){!a&&!s.size&&(null==i||i())}),[a]),o.createElement(ne.O.Provider,{value:c},t)};function le(){return new Map}var oe=n(25364),se=n(65411),de=function(e){return e.key||""},ce=function(e){var t=e.children,n=e.custom,a=e.initial,i=void 0===a||a,r=e.onExitComplete,l=e.exitBeforeEnter,s=e.presenceAffectsLayout,d=void 0===s||s,c=(0,Y.CR)(function(){var e=te(),t=(0,Y.CR)((0,o.useState)(0),2),n=t[0],a=t[1],i=(0,o.useCallback)((function(){e.current&&a(n+1)}),[n]);return[(0,o.useCallback)((function(){return J.ZP.postRender(i)}),[i]),n]}(),1),u=c[0],m=(0,o.useContext)(oe.p).forceRender;m&&(u=m);var p=te(),f=function(e){var t=[];return o.Children.forEach(e,(function(e){(0,o.isValidElement)(e)&&t.push(e)})),t}(t),y=f,v=new Set,h=(0,o.useRef)(y),g=(0,o.useRef)(new Map).current,E=(0,o.useRef)(!0);if((0,ee.L)((function(){E.current=!1,function(e,t){e.forEach((function(e){var n=de(e);t.set(n,e)}))}(f,g),h.current=y})),(0,se.z)((function(){E.current=!0,g.clear(),v.clear()})),E.current)return o.createElement(o.Fragment,null,y.map((function(e){return o.createElement(re,{key:de(e),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:d},e)})));y=(0,Y.ev)([],(0,Y.CR)(y),!1);for(var w=h.current.map(de),b=f.map(de),x=w.length,C=0;C<x;C++){var Z=w[C];-1===b.indexOf(Z)&&v.add(Z)}return l&&v.size&&(y=[]),v.forEach((function(e){if(-1===b.indexOf(e)){var t=g.get(e);if(t){var a=w.indexOf(e);y.splice(a,0,o.createElement(re,{key:de(t),isPresent:!1,onExitComplete:function(){g.delete(e),v.delete(e);var t=h.current.findIndex((function(t){return t.key===e}));if(h.current.splice(t,1),!v.size){if(h.current=f,!1===p.current)return;u(),r&&r()}},custom:n,presenceAffectsLayout:d},t))}}})),y=y.map((function(e){var t=e.key;return v.has(t)?e:o.createElement(re,{key:de(e),isPresent:!0,presenceAffectsLayout:d},e)})),"production"!==U.O&&l&&y.length>1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),o.createElement(o.Fragment,null,v.size?y:y.map((function(e){return(0,o.cloneElement)(e)})))};const ue=(0,x.ZP)(V.FormBase).withConfig({displayName:"StepOnestyles__Container",componentId:"sc-1t11320-0"})([""]),me=x.ZP.div.withConfig({displayName:"StepOnestyles__Description",componentId:"sc-1t11320-1"})(["",";margin:0;margin-bottom:32px;"],p.oW),pe=x.ZP.div.withConfig({displayName:"StepOnestyles__DropdownWrapper",componentId:"sc-1t11320-2"})(["display:flex;flex-direction:column;gap:8px;span{",";",";margin:0;}","{max-width:428px;}"],p.oW,c.Z.lato.bold,h.Z.Container),fe=x.ZP.div.withConfig({displayName:"StepOnestyles__AttendeesList",componentId:"sc-1t11320-3"})(["display:flex;flex-direction:column;gap:24px;&[data-has-value='true']{padding-top:25px;}"]),ye=x.ZP.input.withConfig({displayName:"StepOnestyles__AttendeeQuantity",componentId:"sc-1t11320-4"})(["width:46px;aspect-ratio:1 / 1;border:0;font:inherit;border-radius:10px;",";text-align:center;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}appearance:textfield;-moz-appearance:textfield;"],c.Z.lato.bold),ve={Container:ue,Description:me,DropdownWrapper:pe,AttendeesList:fe,AttendeeInfo:(0,x.ZP)(w.m.div).attrs((()=>({initial:"hidden",animate:"visible",exit:"hidden",variants:{hidden:{x:-25,op
1acity:0},visible:{x:0,opacity:1}}}))).withConfig({displayName:"StepOnestyles__AttendeeInfo",componentId:"sc-1t11320-5"})(["display:flex;gap:18px;align-items:center;svg{width:17px;cursor:pointer;}",";"],c.Z.lato.bold),AttendeeQuantity:ye,SummaryList:x.ZP.div.withConfig({displayName:"StepOnestyles__SummaryList",componentId:"sc-1t11320-6"})(["display:flex;flex-direction:column;gap:24px;user-select:none;"]),SummaryItem:x.ZP.div.withConfig({displayName:"StepOnestyles__SummaryItem",componentId:"sc-1t11320-7"})(["display:flex;align-items:center;gap:12px ",";> span{",";margin-right:",";}@media ","{flex-wrap:wrap;}"],(0,d.qx)(14,16),c.Z.lato.medium,(0,d.qx)(32,48),(0,m.C4)(m.AS.Tablet)),SummaryQuantity:x.ZP.div.withConfig({displayName:"StepOnestyles__SummaryQuantity",componentId:"sc-1t11320-8"})(["",";font-size:18px;padding:14px 20px;text-align:center;background-color:",";border-radius:10px;"],c.Z.lato.bold,s.Z.grey.grey97),SummaryPrice:x.ZP.div.withConfig({displayName:"StepOnestyles__SummaryPrice",componentId:"sc-1t11320-9"})(["",";padding:14px 20px;background-color:",";color:",";border-radius:10px;white-space:nowrap;span[data-discounted='true']{text-decoration:line-through;}"],c.Z.lato.medium,s.Z.primary.blue,s.Z.white)},he=e=>{let{stepProps:t,activeStep:n,step:a,setActive:i,submit:r,response:l}=e;const[s,d]=o.useState(),[c,u]=o.useState([]),[m,p]=o.useState({}),f=o.useMemo((()=>Object.keys(m).reduce(((e,t)=>{const n=Number(m[t]);return!isNaN(n)&&n>=0&&(e+=n),e}),0)>0),[m]);o.useEffect((()=>{if(null!=l&&l.data&&0===c.length){const e={};l.data.priceData.forEach((t=>{e[t.ticketId]=t.quantity})),p(e);const n=[...c];l.data.priceData.forEach((e=>{const a=t.tickets.find((t=>t.ticketId===e.ticketId));a&&n.push(a)})),u(n)}}),[l]);const[y,v]=o.useState("");return o.useEffect((()=>{if(null!=l&&l.validationErrors){const e=l.validationErrors;if(e)return void e.forEach((e=>{var t;e&&"GeneralError"===e.errorTypeName&&v(null!==(t=e.errorMessage)&&void 0!==t?t:"")}))}v("")}),[l]),o.createElement(ve.Container,null,o.createElement(V.FormStepTitle,{disabled:n<=a||t.success,onClick:()=>i(a===n?0:a)},o.createElement("span",null,"1. ",t.title),n>a&&!t.success&&o.createElement(o.Fragment,null,o.createElement("span",null,"Edit"),o.createElement(H.Z,null))),o.createElement(V.FormContent,{isActive:a===n},o.createElement(V.FormContentInner,null,y&&o.createElement(V.FormError,null,y),o.createElement(ve.Description,null,t.description),o.createElement(ve.DropdownWrapper,null,o.createElement("span",null,"Ticket Type*"),o.createElement(X.Z,{"data-has-value":!!s,value:s,onChange:e=>(e=>{if(d(e.currentTarget.value),!c.find((t=>t.ticketId===e.currentTarget.value))){const n=t.tickets.find((t=>t.ticketId===e.currentTarget.value));if(n){const e=[...c];e.push(n);const t={...m};t[n.ticketId]=1,p(t),u(e)}}})(e)},o.createElement("option",{value:""},"Select from dropdown"),t.tickets.map(((e,t)=>o.createElement("option",{key:`StepOne_Ticket_${t}`,value:e.ticketId},e.ticketName," - ",e.ticketPriceFormatted))))),o.createElement(ve.AttendeesList,{"data-has-value":Object.keys(m).length>0},o.createElement(ce,null,c.map(((e,t)=>o.createElement(ve.AttendeeInfo,{key:`StepOne_Attendees_${t}`},o.createElement(G.Z,{onClick:()=>confirm("Are you sure you want to delete this entry?")&&(e=>{const t={...m};delete t[e],p(t);const n=c.find((t=>t.ticketId===e));if(n){const e=c.indexOf(n);if(e>-1){const t=[...c];t.splice(e,1),u(t)}}})(e.ticketId)}),o.createElement(ve.AttendeeQuantity,{type:"text",onChange:t=>((e,t)=>{const n=t.currentTarget.value,a=Number(n);if((!isNaN(a)&&a>=0||""===n)&&Object.keys(m).indexOf(e)>-1){const t={...m};t[e]=isNaN(a)?a:n,p(t)}})(e.ticketId,t),value:m[e.ticketId]}),o.createElement("span",null,e.ticketName," ",o.createElement("span",{"data-ticket-price":"true"},"(",e.ticketPriceFormatted," each)")))))))),o.createElement(V.StepBottom,null,o.createElement(K.Z,{disabled:!f,buttonType:"orange-solid",onClick:()=>r({attendees:m})},"Continue"))),l&&o.createElement(V.FormContent,{isActive:a!==n},o.createElement(V.FormContentInner,null,(null==l?void 0:l.data)&&o.createElement(ve.SummaryList,null,l.data.priceData.map(((e,t)=>o.createElement(ve.SummaryItem,{key:`StepOne_Summary_${t}`},o.createElement(ve.SummaryQuantity,null,e.quantity),o.createElement("span",null,e.title),o.createElement(ve.SummaryPrice,null,"Total Cost:"," ",o.createElement("span",{"data-discounted":!!e.discountedPriceString},e.priceString),e.discountedPriceString&&o.createElement(o.Fragment,null," ",o.createElement("span",null,e.discountedPriceString))))))))))};var ge=n(14153),Ee=n(57574),we=n(72764),be=n(38543),xe=n(17563),Ce=n(35755);const Ze=(0,x.ZP)(V.FormBase).withConfig({displayName:"StepThreestyles__Container",componentId:"sc-50ik24-0"})(["scroll-margin:var(--scrollOffset,0px) 0 0;"]),_e=x.ZP.h3.withConfig({displayName:"StepThreestyles__ConfirmationTitle",componentId:"sc-50ik24-1"})(["",""],p.h5),ke=x.ZP.div.withConfig({displayName:"StepThreestyles__Description",componentId:"sc-50ik24-2"})(["",";margin:0 0 32px;p{",";}"],p._R,p.oW),Pe=x.ZP.p.withConfig({displayName:"StepThreestyles__TotalPrice",componentId:"sc-50ik24-3"})(["",";font-weight:bold;span{font-weight:normal;}
1span[data-discounted='true']{text-decoration:line-through;opacity:0.8;}"],p.Xm),Se={Container:Ze,Description:ke,Form:x.ZP.form.withConfig({displayName:"StepThreestyles__Form",componentId:"sc-50ik24-4"})([""]),ConfirmationTitle:_e,TotalPrice:Pe},Fe=e=>{var t,n,i,r,s;let{stepProps:d,activeStep:c,step:u,setActive:m,submit:p,response:f}=e;const{refContainer:y,status:v,serverErrors:h,confirmationMessage:g,onSubmit:E,useReactHookFormReturn:{register:w,formState:{errors:b,dirtyFields:x},watch:C,setError:Z,setValue:_}}=(0,ge.c)({defaultValues:{step:4,attendees:null!==(t=d.attendees)&&void 0!==t?t:[],code:"",eventId:d.eventId},endpoint:a.Y.SUBMIT_BOOK_EVENT,mode:"json"}),[k]=(0,Ce.Kx)(Object.assign({success:Ce.Zp,bookingId:Ce.Zp}));o.useEffect((()=>{k.success&&(_("success",k.success),m(3),setTimeout((()=>{var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})}),150)),k.bookingId&&_("bookingId",k.bookingId)}),[xe.stringify(k)]),o.useEffect((()=>{d.code&&_("code",d.code)}),[d.code]);const[P,S]=o.useState();o.useEffect((()=>{if(null!=f&&f.errors){const e=f.errors;if(e)return S({message:Object.values(e).join(". "),type:"server"})}S(void 0)}),[f]),o.useEffect((()=>{var e;_("attendees",null!==(e=d.attendees)&&void 0!==e?e:[])}),[d.attendees]);const F=C();return o.createElement(Se.Container,{ref:y},o.createElement(V.FormStepTitle,{disabled:c<=u,onClick:()=>m(u===c?0:u)},"3. ",d.title),o.createElement(V.FormContent,{isActive:u===c},o.createElement(V.FormContentInner,null,"fulfilled"===v&&g||"True"===k.success&&d.confirmationMessage?o.createElement(o.Fragment,null,g&&o.createElement(Se.Description,{dangerouslySetInnerHTML:{__html:g}}),d.confirmationTitle&&o.createElement(Se.ConfirmationTitle,null,d.confirmationTitle),d.confirmationMessage&&o.createElement(Se.Description,{dangerouslySetInnerHTML:{__html:d.confirmationMessage}})):o.createElement(o.Fragment,null,h&&h.map(((e,t)=>o.createElement(V.FormError,{key:`servererror-${t}`},e))),f&&(null===(n=f.data)||void 0===n?void 0:n.totalPrice)&&o.createElement(Se.TotalPrice,null,"Order Total:"," ",o.createElement("span",{"data-discounted":!!f.data.totalPriceDiscounted},f.data.totalPrice),f.data.totalPriceDiscounted&&o.createElement(o.Fragment,null," ",o.createElement("span",null,f.data.totalPriceDiscounted))),d.failureMessages&&o.createElement(V.FormError,null,d.failureMessages[0],d.failureMessages.length>1?` (${d.failureMessages[1]})`:""),o.createElement(Se.Description,null,o.createElement("p",null,d.description)),o.createElement(Se.Form,{onSubmit:E},o.createElement(V.Field,{"data-promo":!0},o.createElement(be.Z,{dirty:null!==(i=null==x?void 0:x.code)&&void 0!==i&&i,error:null!=b&&b.code&&b.code.message?b.code:P,inputProps:w("code"),label:"Promo code",placeholder:"Enter promo code"}),o.createElement(K.Z,{buttonType:"blue-solid",onClick:e=>{e.preventDefault();const t=F.code;if(!t)return Z("code",{message:"Please enter a promo code"});Z("code",{}),p({code:t,attendees:F.attendees})}},"Apply ",o.createElement("span",null,"Code"))),o.createElement(V.ExternalLabel,null,"TICK the box(es) if you would like:"),o.createElement(V.Field,null,o.createElement(we.Z,{checkboxLabel:"I agree that the information I have filled in is genuine",dirty:null!==(r=null==x?void 0:x.disclaimer)&&void 0!==r&&r,error:null==b?void 0:b.disclaimer,inputProps:w("disclaimer",{required:"Please confirm that the information you have filled in is genuine"}),size:"large"})),o.createElement(V.Field,null,o.createElement(we.Z,{checkboxLabel:`I’ve read and agree with the <a href="${d.termsUrl}" target="_blank">terms & conditions</a>`,dirty:null!==(s=null==x?void 0:x.termsAndConditions)&&void 0!==s&&s,error:null==b?void 0:b.termsAndConditions,inputProps:w("termsAndConditions",{required:"Please confirm that you have read and agree with the terms & conditions"}),size:"large"})),o.createElement(V.StepBottom,null,o.createElement(Ee.Z,{as:"button",onClick:e=>{e.preventDefault(),m(2)}},"Back to Step 2"),o.createElement(K.Z,{buttonType:"orange-solid"},"Confirm Booking")))))),"pending"===v&&o.createElement(l.Z,{label:"Submitting…",layout:"fixed"}))};var De=n(89874),Ae=n(4900),Te=n(98510),Ie=n(16419),Oe=n(40904),Le=n(2556),$e=n(87536),Ne=n(23196);const qe={Container:(0,x.ZP)(V.FormBase).withConfig({displayName:"StepTwostyles__Container",componentId:"sc-13sqy4z-0"})([""]),Collapsible:(0,x.ZP)(w.m.div).attrs((e=>{let{active:t}=e;return{initial:"hidden",animate:t?"visible":"hidden",variants:{hidden:{height:"0px"},visible:{height:"auto"}},transition:{bounce:0}}})).withConfig({displayName:"StepTwostyles__Collapsible",componentId:"sc-13sqy4z-1"})(["overflow:hidden;"]),AttendeeFormWrapper:x.ZP.div.withConfig({displayName:"StepTwostyles__AttendeeFormWrapper",componentId:"sc-13sqy4z-2"})(["display:flex;flex-direction:column;gap:32px;"]),AttendeeFormTitle:x.ZP.div.withConfig({displayName:"StepTwostyles__AttendeeFormTitle",componentId:"sc-13sqy4z-3"})(["",";display:flex;font-size:",";cursor:pointer;svg{margin-left:auto;width:20px;"," [data-active='true'] &{transform:rotate(180deg);}}span{display:inline-flex;background-color:",";color:",";height:20px;width:20px;justify-content:center;align-items:center;font-size:66%;margin-right:6px;border-radius:5000px;}"],c.Z.lato.semiBold,(0,d.qx)(18,20),(0,Ne.eR)("transform",.25,"easeInOut"),s.Z.validation.invalid,s.Z.white),AttendeeFormInner:x.ZP.div.withConfig({displayName:"StepTwostyles__AttendeeFormInner",componentId:"sc-13sqy4z-4"})(["display:flex;flex-direction:column;"]),AddLater:x.ZP.details.withConfig({displayName:"StepTwostyles__AddLater",componentId:"sc-13sqy4z-5"})(["margin-bottom:",";summary{",";display:flex;align-items:center;cursor:pointer;gap:12px;svg{",";width:14px;}}&[open] svg{transform:rotate(180deg);}"],(0,d.qx)(28,40),M,(0,Ne.eR)("transform",.25)),FormWrapper:x.ZP.div.withConfig({displayName:"StepTwostyles__FormWrapper",componentId:"sc-13sqy4z-6"})(["display:block;"," opacity:1;&[data-disabled='true']{opacity:0.5;pointer-events:none;}"],(0,Ne.eR)("opacity",.25,"easeInOut"))},Be=e=>{var t,n,a,i,r,l,s,d,c,u,m,p,f,y;let{openByDefault:v,form:h,register:g,i:E,dirtyFields:w,errors:b,setValue:x,titleOptions:C,dietaryOptions:Z,contactOptions:_,customQuestions:k,companyDetails:P,trigger:S}=e;
1const F=o.useRef(null),[D,A]=o.useState(v),[T,I]=o.useState([]),[O,L]=o.useState(!!h.contactId);return o.useEffect((()=>{h.willAddDetailsLater&&($(!0),setTimeout((()=>{A(!1)}),500))}),[h.willAddDetailsLater]),o.useEffect((()=>{if(h.memberOfMyCompany)x(`attendees.${E}.companyName`,P.name),x(`attendees.${E}.companyDescription`,P.description),I([...T,"companyName","companyDescription"]);else{h.companyName===P.name&&(x(`attendees.${E}.companyName`,""),x(`attendees.${E}.companyDescription`,""));const e=T;let t=e.indexOf("companyName");t>-1&&e.splice(t,1),t=e.indexOf("companyDescription"),t>-1&&e.splice(t,1),I(e)}}),[h.memberOfMyCompany]),o.useEffect((()=>{h.contactId&&F.current&&(F.current.value=`option_${h.contactId}`,N(h.contactId))}),[]),o.createElement(qe.AttendeeFormWrapper,{"data-active":D},o.createElement(qe.AttendeeFormTitle,{onClick:()=>A(!D)},b&&o.createElement("span",null,"!"),h.formTitle,o.createElement(Ae.Z,null)),o.createElement(qe.Collapsible,{active:D},o.createElement(qe.AttendeeFormInner,null,o.createElement("input",{type:"hidden",...g(`attendees.${E}.formId`)}),o.createElement("input",{type:"hidden",...g(`attendees.${E}.attendeeNumber`)}),o.createElement(qe.FormWrapper,{"data-disabled":h.willAddDetailsLater},o.createElement(V.SplitFields,null,o.createElement(V.Field,{"data-contacts-select":"true"},o.createElement(Oe.Z,{selectRef:F,"data-has-value":!!h.title,dirty:!1,label:"Select from contacts",readOnly:h.willAddDetailsLater,inputProps:{name:"select-contact",onChange:e=>{const t=e.currentTarget.value.replace("option_","");""===t?($(!1),L(!1)):(N(t),L(!0))}}},o.createElement("option",{value:"",selected:!0},"Add a new attendee"),_.map(((e,t)=>o.createElement("option",{key:`StepTwo_AttendeeForm_ContactOptions_${E}_${t}`,value:`option_${e.contactId}`},e.surname,", ",e.forename," ",e.companyName&&`(${e.companyName}${e.jobTitle?`, ${e.jobTitle}`:""})`))))),o.createElement(V.Field,null,o.createElement(Oe.Z,{"data-has-value":!!h.title,dirty:null!==(t=null==w?void 0:w.title)&&void 0!==t&&t,error:null==b?void 0:b.title,inputProps:g(`attendees.${E}.title`,{required:!h.willAddDetailsLater&&"Please select the attendee's title"}),label:"Title*",readOnly:h.willAddDetailsLater||T.includes("title"),placeholder:"Select title"},C.map(((e,t)=>o.createElement("option",{key:`StepTwo_AttendeeForm_TitleOptions_${E}_${t}`,value:e.value},e.text)))))),o.createElement(V.SplitFields,null,o.createElement(V.Field,null,o.createElement(be.Z,{dirty:null!==(n=null==w?void 0:w.forename)&&void 0!==n&&n,error:null==b?void 0:b.forename,inputProps:g(`attendees.${E}.forename`,{required:!(h.willAddDetailsLater||O&&T.includes("forename"))&&"Please enter the attendee's first name",validate:h.willAddDetailsLater||O&&T.includes("forename")?void 0:{whitespace:De.oz}}),label:"First name*",placeholder:"First name",readOnly:h.willAddDetailsLater||T.includes("forename")})),o.createElement(V.Field,null,o.createElement(be.Z,{dirty:null!==(a=null==w?void 0:w.surname)&&void 0!==a&&a,error:null==b?void 0:b.surname,inputProps:g(`attendees.${E}.surname`,{required:!(h.willAddDetailsLater||O&&T.includes("surname"))&&"Please enter the attendee's surname",validate:h.willAddDetailsLater||O&&T.includes("surname")?void 0:{whitespace:De.oz}}),label:"Surname*",placeholder:"Surname",readOnly:h.willAddDetailsLater||T.includes("surname")}))),o.createElement(V.SplitFields,null,o.createElement(V.Field,null,o.createElement(be.Z,{dirty:null!==(i=null==w?void 0:w.emailAddress)&&void 0!==i&&i,error:null==b?void 0:b.emailAddress,inputProps:g(`attendees.${E}.emailAddress`,{required:!(h.willAddDetailsLater||O&&T.includes("emailAddress"))&&"Please enter the attendee's email address",pattern:h.willAddDetailsLater||O&&T.includes("emailAddress")?void 0:De.hv}),label:"Email address*",placeholder:"Email address",type:"email",readOnly:h.willAddDetailsLater||T.includes("emailAddress")})),o.createElement(V.Field,null,o.createElement(be.Z,{dirty:null!==(r=null==w?void 0:w.jobTitle)&&void 0!==r&&r,error:null==b?void 0:b.jobTitle,inputProps:g(`attendees.${E}.jobTitle`,{required:!(h.willAddDetailsLater||O&&T.includes("jobTitle"))&&"Please enter the attendee's job title",validate:h.willAddDetailsLater||O&&T.includes("jobTitle")?void 0:{whitespace:De.oz}}),label:"Job title*",placeholder:"Job title",readOnly:h.willAddDetailsLater||T.includes("jobTitle")}))),o.createElement(V.Field,null,o.createElement(we.Z,{checkboxLabel:`Attendee ${h.attendeeNumber} is a member of my company`,dirty:null!==(l=null==w?void 0:w.memberOfMyCompany)&&void 0!==l&&l,error:null==b?void 0:b.memberOfMyCompany,inputProps:g(`attendees.${E}.memberOfMyCompany`),size:"large",readOnly:h.willAddDetailsLater||T.includes("memberOfMyCompany")})),o.createElement(V.SplitFields,null,o.createElement(V.Field,null,o.createElement(be.Z,{dirty:null!==(s=null==w?void 0:w.companyName)&&void 0!==s&&s,error:null==b?void 0:b.companyName,inputProps:g(`attendees.${E}.companyName`,{required:!(h.willAddDetailsLater||O&&T.includes("companyName"))&&"Please enter the attendee's company name",validate:h.willAddDetailsLater?void 0:{whitespace:De.oz}}),label:"Company name*",placeholder:"Company name",readOnly:h.willAddDetailsLater||T.includes("companyName")})),o.createElement(V.Field,null,o.createElement(Te.Z,{dirty:null!==(d=null==w?void 0:w.companyDescription)&&void 0!==d&&d,error:null==b?void 0:b.companyDescription,inputProps:g(`attendees.${E}.companyDescription`),label:"Company description",placeholder:"Company description",readOnly:h.willAddDetailsLater||T.includes("companyDescription")}))),o.createElement(V.SplitFields,null,o.createElement(V.Field,null,o.createElement(Oe.Z,{"data-has-value":!!h.dietaryRequirements,dirty:null!==(c=null==w?void 0:w.dietaryRequirements)&&void 0!==c&&c,error:null==b?void 0:b.dietaryRequirements,inputProps:g(`attendees.${E}.dietaryRequirements`,{required:!h.willAddDetailsLater&&"Please select attendee's dietary requirements"}),label:"Dietary Requirements",readOnly:h.willAddDetailsLater||T.includes("dietaryRequirements"),required:!0,placeholder:"Please select"},Z.map(((e,t)=>o.createElement("option",{key:`StepTwo_AttendeeForm_DietaryOptions_${E}_${t}`,value:e.value},e.text))))),o.createElement(V.Field,null,o.createElement(Te.Z,{dirty:null!==(u=null==w?void 0:w.dietaryRequirementsDetails)&&void 0!==u&&u,error:null==b?void 0:b.dietaryRequirementsDetails,label:"Please provide more details of dietary requirements",placeholder:"Dietary requirements",readOnly:h.willAddDetailsLater||T.includes("dietaryRequirementsDetails")||"none"===h.dietaryRequirements,inputProps:g(`attendees.${E}.dietaryRequirementsDetails`,{required:"other"===h.dietaryRequirements&&!h.willAddDetailsLater&&"Please provide more details about the dietary requirements",validate:"other"!==h.dietaryRequirements||h.willAddDetailsLater?void 0:{whitespace:De.oz}})}))),o.createElement(V.SplitFields,null,o.createElement(V.Field,null,o.createElement(Te.Z,{dirty:null!==(m=null==w?void 0:w.accessRequirements)&&void 0!==m&&m,error:null==b?void 0:b.accessRequirements,inputProps:g(`attendees.${E}.accessRequirements`),label:"Access requirements",placeholder:"Access requirements",readOnly:h.willAddDetailsLater||T.includes("accessRequirements")})),k.length>0&&k.map((e=>o.createElement(V.Field,{key:`attendee.${E}.dynamic.${e.id}`},function(e){const t=e.requiredField&&"charged-option"!==e.fieldType?{required:!h.willAddDetailsLater&&"Please answer this question"}:{};switch(e.fieldType){case"checkbox":var n,a;return o.createElement(we.Z,{checkboxLabel:e.questionText,dirty:!(null==w||null===(n=w.customQuestions)||void 0===n||!n[`${e.id}`]),error:null==b||null===(a=b.customQuestions)||void 0===a?void 0:a[`${e.
1id}`],inputProps:g(`attendees.${E}.customQuestions.${e.id}`,t),required:e.requiredField,size:"large",readOnly:h.willAddDetailsLater||T.includes("")});case"charged-option":var i,r;return o.createElement(we.Z,{checkboxLabel:e.questionText,dirty:!(null==w||null===(i=w.customQuestions)||void 0===i||!i[`${e.id}`]),error:null==b||null===(r=b.customQuestions)||void 0===r?void 0:r[`${e.id}`],inputProps:g(`attendees.${E}.customQuestions.${e.id}`,t),required:!1,size:"large",readOnly:h.willAddDetailsLater||T.includes("")});case"dropdown":var l,s,d;return o.createElement(Oe.Z,{dirty:!(null==w||null===(l=w.customQuestions)||void 0===l||!l[`${e.id}`]),error:null==b||null===(s=b.customQuestions)||void 0===s?void 0:s[`${e.id}`],inputProps:g(`attendees.${E}.customQuestions.${e.id}`,t),label:e.questionText,readOnly:h.willAddDetailsLater||T.includes(""),required:e.requiredField,placeholder:"Please select"},null!=e.questionAnswers&&(null===(d=e.questionAnswers.split("#"))||void 0===d?void 0:d.map(((t,n)=>o.createElement("option",{key:`StepTwo_AttendeeForm_Custom_${E}_${e.id}_${n}`,value:t},t)))));case"multiline":var c,u;return o.createElement(Te.Z,{label:e.questionText,placeholder:e.questionText,dirty:!(null==w||null===(c=w.customQuestions)||void 0===c||!c[`${e.id}`]),error:null==b||null===(u=b.customQuestions)||void 0===u?void 0:u[`${e.id}`],inputProps:g(`attendees.${E}.customQuestions.${e.id}`,t),required:e.requiredField,readOnly:h.willAddDetailsLater||T.includes("")});case"radio":var m,p,f;return o.createElement(Ie.Z,{radioLabel:"",label:e.questionText,dirty:!(null==w||null===(m=w.customQuestions)||void 0===m||!m[`${e.id}`]),error:null==b||null===(p=b.customQuestions)||void 0===p?void 0:p[`${e.id}`],required:e.requiredField,size:"large",readOnly:h.willAddDetailsLater||T.includes("")},null!=e.questionAnswers&&(null===(f=e.questionAnswers.split("#"))||void 0===f?void 0:f.map(((n,a)=>o.createElement(Le.Z,{key:`StepTwo_AttendeeForm_Custom_${E}_${e.id}_${a}`,id:`StepTwo_AttendeeForm_Custom_${E}_${e.id}_${a}`,htmlFor:`StepTwo_AttendeeForm_Custom_${E}_${e.id}_${a}`,type:"radio",value:n,...g(`attendees.${E}.customQuestions.${e.id}`,t)},n)))));default:var y,v;return o.createElement(be.Z,{label:e.questionText,placeholder:e.questionText,dirty:!(null==w||null===(y=w.customQuestions)||void 0===y||!y[`${e.id}`]),error:null==b||null===(v=b.customQuestions)||void 0===v?void 0:v[`${e.id}`],inputProps:g(`attendees.${E}.customQuestions.${e.id}`,t),required:e.requiredField,readOnly:h.willAddDetailsLater||T.includes("")})}}(e))))),o.createElement(V.ExternalLabel,null,"Guest List"),o.createElement(V.Field,null,o.createElement(we.Z,{checkboxLabel:"It is great exposure to feature on the guest list and it helps other attendees know who is in the room to connect with.  Please tick here for this attendee’s name, job title, company and business activity to be displayed on the printed and electronic guest lists for this event.",dirty:null!==(p=null==w?void 0:w.attendeeDetailsOnGuestList)&&void 0!==p&&p,error:null==b?void 0:b.attendeeDetailsOnGuestList,inputProps:g(`attendees.${E}.attendeeDetailsOnGuestList`),size:"large",readOnly:h.willAddDetailsLater})),o.createElement(V.ExternalLabel,null,"Sharing contact details"),o.createElement(V.Field,null,o.createElement(we.Z,{checkboxLabel:"Tick here if you agree for this attendee's full contact details to be shared with external sponsor(s), partner(s) and host(s) for this event who may contact them about their services.",dirty:null!==(f=null==w?void 0:w.attendeeDetailsShared)&&void 0!==f&&f,error:null==b?void 0:b.attendeeDetailsShared,inputProps:g(`attendees.${E}.attendeeDetailsShared`),size:"large",readOnly:h.willAddDetailsLater}))),o.createElement(qe.AddLater,null,o.createElement("summary",null,"Do you want to add your attendee details later? ",o.createElement(Ae.Z,null)),o.createElement(we.Z,{checkboxLabel:`Please tick here if you need to add details for Attendee ${h.attendeeNumber} at a later date. You can update attendee details up to two days before the event.`,dirty:null!==(y=null==w?void 0:w.willAddDetailsLater)&&void 0!==y&&y,error:null==b?void 0:b.willAddDetailsLater,inputProps:g(`attendees.${E}.willAddDetailsLater`),size:"large",readOnly:O,description:O?"You cannot add details later if you have selected a contact":""})))));function $(e){I([]);for(const[e]of Object.entries(h))["formId","formTitle","attendeeNumber","willAddDetailsLater"].includes(e)||x(`attendees.${E}.${e}`,["attendeeDetailsOnGuestList","attendeeDetailsShared","memberOfMyCompany"].includes(e)?void 0:"");
1k.forEach((e=>{x(`attendees.${E}.customQuestions.${e.id}`,"")})),x(`attendees.${E}.willAddDetailsLater`,e),e&&null!=F&&F.current&&(F.current.value="",b&&S(`attendees.${E}`,{shouldFocus:!0}))}function N(e){const t=_.find((t=>t.contactId===e));let n=T;if(t){for(const[e,a]of Object.entries(t))x(`attendees.${E}.${e}`,void 0===a?"":a),n=[...n,e];I(n)}else null!=F.current&&(F.current.value="")}},Re=e=>{let{stepProps:t,activeStep:n,step:a,setActive:i,response:r,submit:l}=e;const{setValue:s,control:d,register:c,formState:{errors:u,dirtyFields:m},getValues:p,setError:f,trigger:y,watch:v}=(0,$e.cI)({mode:"onChange",shouldUseNativeValidation:!1}),{fields:h}=(0,$e.Dq)({control:d,name:"attendees"}),g=v(),E=o.useCallback((()=>{const e=t.attendees;if(e){const n=[];let a=0;return e.forEach((e=>{for(let i=0;i<e.quantity;i++){const l=t.tickets.find((t=>t.ticketId===e.ticketId));if(l)for(let t=0;t<l.attendeesPerTicket;t++){const o=`${e.ticketId}_${i}_${t}`;a++;const s=(!g.attendees.length&&null!=r&&r.data&&r.data.attendees?r.data:g).attendees.find((e=>e.formId===o)),d=1===l.attendeesPerTicket?`${l.ticketName} (Ticket #${i+1})`:`${l.ticketName} (Ticket #${i+1}) - Attendee ${t+1} of ${l.attendeesPerTicket}`;s?(s.attendeeNumber=a,n.push(s)):n.push({formTitle:d,formId:o,attendeeNumber:a})}}})),n}return[]}),[t.attendees,t.tickets,r]),[w,b]=o.useState("");return o.useEffect((()=>{if(null!=r&&r.validationErrors){const e=r.validationErrors;if(e)return void e.forEach((e=>{var t,n;e&&("GeneralError"===e.errorTypeName?b(null!==(t=e.errorMessage)&&void 0!==t?t:""):f(e.fieldName,{message:null!==(n=e.errorMessage)&&void 0!==n?n:""}))}))}b("")}),[r]),o.useEffect((()=>{if(t.attendees&&t.attendees.length>0){const e=E();s("attendees",e)}}),[t.attendees,E,s]),o.createElement(qe.Container,null,o.createElement(V.FormStepTitle,{disabled:n<=a||t.success,onClick:()=>i(a===n?0:a)},o.createElement("span",null,"2. ",t.title),n>a&&!t.success&&o.createElement(o.Fragment,null,o.createElement("span",null,"Edit"),o.createElement(H.Z,null))),o.createElement(V.FormContent,{isActive:a===n},o.createElement(V.FormContentInner,null,w&&o.createElement(V.FormError,null,w),h.map(((e,n)=>o.createElement(Be,{key:`StepTwo_AttendeeForm_${e.id}`,register:c,form:g.attendees[n],openByDefault:0===n,i:n,dirtyFields:m.attendees?m.attendees[n]:void 0,errors:u.attendees?u.attendees[n]:void 0,titleOptions:t.titleOptions,dietaryOptions:t.dietaryOptions,contactOptions:t.contactOptions,customQuestions:t.customQuestions,companyDetails:t.companyDetails,setValue:s,trigger:y})))),o.createElement(V.StepBottom,null,o.createElement(Ee.Z,{as:"button",onClick:e=>{e.preventDefault(),i(1)}},"Back to Step 1"),o.createElement(K.Z,{buttonType:"orange-solid",onClick:async()=>{if(await async function(){const e=h.map(((e,t)=>`attendees.${t}`));return y(e,{shouldFocus:!0})}())return l({attendees:p().attendees})}},"Continue"))))},ze={method:"POST",headers:{"Content-Type":"application/json"}},Me=(0,r.K)((0,i.G)((e=>{var t,n,i;let{eventId:r,anchorId:s,sectionTitle:d,eventLocationType:c,title:u,inPartnershipWith:m,date:p,time:f,venue:y,bookingForm:v,failureMessages:h,bookingFormData:g,confirmationMessage:E,confirmationTitle:w,alternativeContent:b}=e;const[x,C]=o.useState(1),[Z,_]=o.useState(!1),[k,P]=o.useState(),[S,F]=o.useState(),[D,A]=o.useState();o.useEffect((()=>{g&&(P({data:{priceData:g.priceData,totalPrice:g.totalPrice,totalPriceDiscounted:g.totalPriceDiscounted}}),F({data:{attendees:g.attendees}}),A({data:{priceData:g.priceData,totalPrice:g.totalPrice,totalPriceDiscounted:g.totalPriceDiscounted}}))}),[g]);const T=async e=>{switch(_(!0),x){default:case 1:{const t={step:1,eventId:r,data:e},n=await fetch(a.Y.SUBMIT_BOOK_EVENT_STEP1,{...ze,body:JSON.stringify(t)}).then((e=>e.json()));P(n),n.errors&&0!==Object.keys(n.errors).length||(A(n),C(x+1));break}case 2:{const t={step:2,eventId:r,data:e},n=await fetch(a.Y.SUBMIT_BOOK_EVENT_STEP2,{...ze,body:JSON.stringify(t)}).then((e=>e.json()));F(n),n.errors&&0!==Object.keys(n.errors).length||C(x+1);break}case 3:{var t,n,i;const l={step:3,eventId:r,data:{...e,priceData:null!==(t=null==k||null===(n=k.data)||void 0===n?void 0:n.priceData)&&void 0!==t?t:[]}}
1,o=await fetch(a.Y.SUBMIT_BOOK_EVENT_APPLY_DISCOUNT,{...ze,body:JSON.stringify(l)}).then((e=>e.json()));let{data:s}=null!=k?k:{data:void 0};s&&null!==(i=o.data)&&void 0!==i&&i.priceData&&(s={...s,priceData:o.data.priceData,totalPrice:o.data.totalPrice,totalPriceDiscounted:o.data.totalPriceDiscounted}),P({...k,data:s}),A(o);break}}_(!1)};return o.createElement(V.Container,{id:s,spacing:"padding"},o.createElement(V.Layout,null,o.createElement(V.LeftContent,null,o.createElement(V.SectionTitle,null,d),o.createElement(V.EventType,null,c),o.createElement(V.Title,null,u),o.createElement(V.InPartnershipWith,null,m),o.createElement(V.HR,null),o.createElement(V.DetailsList,null,o.createElement(V.Details,null,o.createElement("span",null,"Date"),o.createElement("span",null,p)),o.createElement(V.Details,null,o.createElement("span",null,"Time"),o.createElement("span",null,f)),o.createElement(V.Details,null,o.createElement("span",null,"Venue"),o.createElement("span",null,y)))),b?o.createElement(V.AlternativeContent,{dangerouslySetInnerHTML:{__html:b}}):o.createElement(V.FormAccordion,{"data-form-disabled":Z},o.createElement(he,{step:1,activeStep:x,setActive:e=>C(e),stepProps:{...v.stepOne,success:!!w||!!E},submit:T,response:k}),o.createElement(Re,{step:2,activeStep:x,setActive:e=>C(e),stepProps:{...v.stepTwo,tickets:v.stepOne.tickets,attendees:null==k||null===(t=k.data)||void 0===t?void 0:t.priceData,success:!!w||!!E},submit:T,response:S}),o.createElement(Fe,{step:3,activeStep:x,setActive:e=>C(e),submit:T,stepProps:{...v.stepThree,attendees:null==S||null===(n=S.data)||void 0===n?void 0:n.attendees,confirmationTitle:w,confirmationMessage:E,failureMessages:h,eventId:r,code:null!==(i=null==g?void 0:g.code)&&void 0!==i?i:""},response:D}))),Z&&o.createElement(l.Z,{label:"Submitting…",layout:"fixed"}))})))}}]);
2//# sourceMappingURL=5778-b210d4e67c21fcd374c5.js.map

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.