1(self.webpackChunk_verndale_toolkit=self.webpackChunk_verndale_toolkit||[]).push([[1339],{55780:function(X,F,_){"use strict";_.r(F),_.d(F,{default:function(){return Z}});var t=_(67294),j=_(45697),e=_.n(j);const L=(0,t.createContext)(),T=s=>s==null||Number.isNaN(s)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(s),h=s=>{if(s==null)return 0;if(typeof s=="number")return Number.isFinite(s)?s:0;if(typeof s=="string"){const o=s.replace(/[$,]/g,"").trim(),u=parseFloat(o);return Number.isFinite(u)?u:0}return 0};function O({children:s}){const[o,u]=(0,t.useState)({membershipType:null,registrationRate:null,isEarlyRate:!1,numberOfAttendees:1,guestRegistrationRate:[],purchaseRecording:!1,customRegistrationCost:0,sessionRecordingRate:null,sessionRecordingRates:null,lodging:null,customLodgingCost:0,splitLodging:!1,numberOfPeopleSplittingLodging:1,transportation:null,customTransportationCost:0,splitTransportation:!1,numberOfPeopleSplittingTransportation:1,travelDays:1,foodCosts:null,customFoodCost:0,attendOtherEvents:!1,otherEvents:[],customEventCost:null}),l=a=>{u(r=>{const i={...r,...a};return typeof i.customRegistrationCost=="number"&&(i.customRegistrationCost=Number.isFinite(i.customRegistrationCost)?i.customRegistrationCost:0),typeof i.customLodging
1Cost=="number"&&(i.customLodgingCost=Number.isFinite(i.customLodgingCost)?i.customLodgingCost:0),typeof i.customTransportationCost=="number"&&(i.customTransportationCost=Number.isFinite(i.customTransportationCost)?i.customTransportationCost:0),typeof i.customFoodCost=="number"&&(i.customFoodCost=Number.isFinite(i.customFoodCost)?i.customFoodCost:0),typeof i.customGuestRegistrationCost=="number"&&(i.customGuestRegistrationCost=Number.isFinite(i.customGuestRegistrationCost)?i.customGuestRegistrationCost:0),i})},R=()=>{if(!o.lodging||!o.travelDays)return 0;const a=o.lodging,r=Number(o.travelDays);if(!Number.isFinite(r)||r<=0)return 0;if(a.type==="custom"){const n=h(o.customLodgingCost);if(!Number.isFinite(n)||n<=0)return 0;if(o.splitLodging){const g=Number(o.numberOfPeopleSplittingLodging)||1;return n/g}return n}const i=h(a.rate);if(!Number.isFinite(i)||i<=0)return 0;const m=i*r;if(o.splitLodging){const n=Number(o.numberOfPeopleSplittingLodging)||1;return m/n}return m},b=()=>{if(o.registrationRate?.isCustomRegistrationCost){const m=h(o.customRegistrationCost);if((o.numberOfAttendees?.totalAttendees||1)>1){const n=o.guestRegistrationRate.reduce((g,E)=>{if(!E?.guestRegistrationRate?.rate)return g;const w=h(E.guestRegistrationRate.rate);return g+(Number.isFinite(w)?w:0)},0);return m+n}return m}if(!o.registrationRate||!o.registrationRate.rate)return 0;const a=h(o.registrationRate.rate);if(!Number.isFinite(a))return 0;const r=o.numberOfAttendees?.totalAttendees||1;if((r>1?r-1:0)===0)return a;const i=o.guestRegistrationRate.reduce((m,n)=>{if(!n?.guestRegistrationRate?.rate)return m;const g=h(n.guestRegistrationRate.rate);return m+(Number.isFinite(g)?g:0)},0);return a+i},f=()=>o.sessionRecordingRate?h(o.sessionRecordingRate.rate):0,C=()=>{if(!o.transportation)return 0;const a=o.transportation;if(a.type==="custom"){const i=h(o.customTransportationCost);if(!Number.isFinite(i)||i<=0)return 0;if(o.splitTransportation){const m=Number(o.numberOfPeopleSplittingTransportation)||1;return i/m}return i}const r=h(a.rate);if(!Number.isFinite(r)||r<=0)return 0;if(o.splitTransportation){const i=Number(o.numberOfPeopleSplittingTransportation)||1;return r/i}return r},N=()=>{if(!o.foodCosts||!o.travelDays)return 0;const a=o.foodCosts,r=Number(o.travelDays);if(a.type==="custom"){const i=h(o.customFoodCost);return!Number.isFinite(i)||i<=0?0:i}if(["average","budget","premium","default"].includes(a.type)){const i=a.multiplier||1,m=h(a.firstDay)*i||0,n=h(a.middleDay)*i||0,g=h(a.lastDay)*i||0;if(r===1)return m;if(r===2)return m+g;const E=r-2;return m+n*E+g}return 0},p=()=>{if(!o.attendOtherEvents)return 0;const a=h(o.customEventCost);return Number.isFinite(a)?a:0},x={calculatorState:o,setCalculatorState:l,calculateTotalCost:()=>{const a=R(),r=b(),i=f(),m=C(),n=N(),g=p(),E=Number.isFinite(a)?a:0,w=Number.isFinite(r)?r:0,v=Number.isFinite(i)?i:0,k=Number.isFinite(m)?m:0,z=Number.isFinite(n)?n:0,H=Number.isFinite(g)?g:0,K=E+w+v+k+z+H;return{lodging:T(E),registration:T(w),sessionRecording:T(v),transportation:T(k),food:T(z),otherEvents:T(H),total:T(K)}},resetCalculator:()=>{u({membershipType:null,registrationRate:null,isEarlyRate:!1,numberOfAttendees:null,guestRegistrationRate:[],purchaseRecording:!1,
1customRegistrationCost:0,sessionRecordingRate:null,sessionRecordingRates:null,lodging:null,customLodgingCost:0,splitLodging:!1,numberOfPeopleSplittingLodging:1,transportation:null,customTransportationCost:0,splitTransportation:!1,numberOfPeopleSplittingTransportation:1,travelDays:1,foodCosts:null,customFoodCost:0,attendOtherEvents:!1,otherEvents:[]})},formatCurrency:T};return t.createElement(L.Provider,{value:x},s)}O.propTypes={children:e().node.isRequired};function S(){const s=(0,t.useContext)(L);if(!s)throw new Error("useCalculator must be used within a CalculatorProvider");return s}var W=_(93967),D=_.n(W),U=_(47311);const M=({isOpen:s,onClose:o,title:u,children:l,className:R="",primaryCta:b,secondaryCta:f,image:C})=>{(0,t.useEffect)(()=>{const p=x=>{x.key==="Escape"&&s&&o()};return s&&(document.addEventListener("keydown",p),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",p),document.body.style.overflow="unset"}},[s,o]);const N=p=>{p.target===p.currentTarget&&o()};return s?t.createElement("div",{className:`modal__overlay ${R}`,onClick:N,role:"dialog","aria-modal":"true","aria-labelledby":u?"modal-title":void 0},t.createElement("div",{className:"modal__container"},t.createElement("div",{className:"modal__header"},u&&t.createElement("h2",{id:"modal-title",className:"modal__title"},u),t.createElement("button",{className:"modal__close",onClick:o,"aria-label":"Close modal",type:"button"})),C&&t.createElement("div",{className:"modal__image"},t.createElement("img",{src:C.src,alt:C.alt})),t.createElement("div",{className:"modal__content"},l),(b||f)&&t.createElement("div",{className:"modal__footer"},b&&t.createElement("a",{href:b.url,className:"button button--primary",target:b.target?b.target:"_self"},b.text),f&&t.createElement("a",{href:f.url,className:"button button--outline",target:f.target?f.target:"_self"},f.text)))):null};var P=M;M.propTypes={isOpen:e().bool.isRequired,onClose:e().func.isRequired,title:e().string,children:e().node.isRequired,className:e().string,image:e().shape({src:e().string.isRequired,alt:e().string.isRequired}),primaryCta:e().shape({text:e().string.isRequired,url:e().string.isRequired,target:e().string}),secondaryCta:e().shape({text:e().string.isRequired,url:e().string.isRequired,target:e().string})};function q({type:s,label:o,options:u,value:l,onChange:R,learnMore:b,min:f,max:C,isAdditionalField:N=!1,step:p=1}){const[x,a]=(0,t.useState)(!1),r=(0,t.useId)(),i=()=>{switch(s){case"select":return t.createElement("select",{value:l?JSON.stringify(l):"",onChange:m=>{try{const n=m.target.value?JSON.parse(m.target.value):null;R(n)}catch{R(null)}},className:"fnce-calculator__select"},u?.map((m,n)=>{const g=JSON.stringify(m.value);return t.createElement("option",{key:`${m.text}-${n}`,value:g},m.text)}));case"radio":return t.createElement("div",{className:"fnce-calculator__radio-group"},u?.map((m,n)=>t.createElement("label",{key:`${m.text}-${n}`,className:"fnce-calculator__radio-label"},t.createElement("input",{type:"radio",name:r,checked:l===m.value,onChange:()=>R(m.value),className:"fnce-calculator__radio-input"}),t.createElement("span",{className:"fnce-calculator__radio-text"},m.text))));case"checkbox":return t.createElement("label",{className:"fnce-calculator__checkbox-label"},t.createElement("input",{type:"checkbox",checked:l,onChange:m=>R(m.target.checked),className:"fnce-calculator__checkbox-input"}),t.createElement("span",{className:"fnce-calculator__checkbox-text"},o));case"slider":return t.createElement("div",{className:"fnce-calculator__slider-container"},t.createElement("input",{type:"range",min:f,max:C,step:p,value:l||f,onChange:m=>R(parseInt(m.target.value,10)),className:"fnce-calculator__slider"}),t.createElement("div",{className:"fnce-calculator__slider-controls"},t.createElement("button",{type:"button",onClick:()=>R(Math.max(f,(l||f)-p)),disabled:l<=f,className:"fnce-calculator__slider-button","aria-label":"Decrease days"},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 40",fill:"none"},t.createElement("path",{d:"M29.9997 21.6663H9.99967C9.08301 21.6663 8.33301 20.9163 8.33301 19.9997C8.33301 19.083 9.08301 18.333 9.99967 18.333H29.9997C30.9163 18.333 31.6663 19.083 31.6663 19.9997C31.6663 20.9163 30.9163 21.6663 29.9997 21.6663Z",fill:"currentColor"}))),t.createElement("span",{className:"fnce-calculator__slider-value"},l||f),t.createElement("button",{type:"button",onClick:()=>R(Math.min(C,(l||f)+p)),disabled:l>=C,className:"fnce-calculator__slider-button","aria-label":"Increase days"},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 40",fill:"none"},t.createElement("path",{d:"M29.9997 21.6663H21.6663V29.9997C21.6663 30.9163 20.9163 31.6663 19.9997 31.6663C19.083 31.6663 18.333 30.9163 18.333 29.9997V21.6663H9.99967C9.08301 21.6663 8.33301 20.9163 8.33301 19.9997C8.33301 19.083 9.08301 18.333 9.99967 18.333H18.333V9.99967C18.333 9.08301 19.083 8.33301 19.9997 8.33301C20.9163 8.33301 21.6663 9.08301 21.6663 9.99967V18.333H29.9997C30.9163 18.333 31.6663 19.083 31.6663 19.9997C31.6663 20.9163 30.9163 21.6663 29.9997 21.6663Z",fill:"currentColor"})))));case"number":return t.createElement("input",{type:"number",min:f,max:C,step:p,value:l||"",onChange:m=>R(parseFloat(m.target.value)),className:"fnce-calculator__number-input"});default:return null}};return t.createElement("div",{className:D()("fnce-calculator__field",{"fnce-calculator__field--additional-field":N})},t.createElement("label",{className:"fnce-calculator__field-label"},o),b&&t.createElement("button",{onClick:()=>a(!0),className:"fnce-calculator__learn-more"},b.text),i(),x&&b&&t.createElement(P,{isOpen:x,onClose:()=>a(!1),title:b.modalContent.title,primaryCta:b.modalContent.primaryCta,secondaryCta:b.modalContent.secondaryCta,image:b.modalContent.image,className:"fnce-calculator__modal"},(0,U.ZP)(b.modalContent.content)))}q.propTypes={type:e().oneOf(["select","radio","checkbox","slider","number"]).isRequired,label:e().string.isRequired,options:e().arrayOf(e().shape({text:e().string,value:e().any,label:e().string,rate:e().number,cost:e().number,isFullConference:e().bool,ratePerDay:e().number})),value:e().any,onChange:e().func.isRequired,learnMore:e().shape({text:e().string.isRequired,modalContent:e().shape({title:e().string,content:e().oneOfType([e().str
1ing,e().object]),image:e().shape({src:e().string,alt:e().string}),primaryCta:e().shape({text:e().string,url:e().string}),secondaryCta:e().shape({text:e().string,url:e().string})})}),isAdditionalField:e().bool,min:e().number,max:e().number,step:e().number,foodCostValue:e().shape({type:e().string,firstDay:e().number,middleDay:e().number,lastDay:e().number})},q.defaultProps={options:[],learnMore:null,min:0,max:100,step:1,value:null};var y=q;function A({data:s}){const{calculatorState:o,setCalculatorState:u}=S(),l=a=>s?.find(r=>r.name===a);(0,t.useEffect)(()=>{if(!s||!Array.isArray(s)||s.length===0)return;const a=l("membershipType");if(!a?.options?.[0]?.rates?.[0])return;const r=a.options[0].rates[0],i=l("sessionRecordingRates"),m=l("lodging"),n=l("foodCosts");u({membershipType:a.options[0],registrationRate:r,isEarlyRate:r.isEarlyRate,numberOfAttendees:1,guestRegistrationRate:[],purchaseRecording:!1,customRegistrationCost:0,sessionRecordingRate:null,sessionRecordingRates:i,lodging:m?.options?.[0]||null,customLodgingCost:0,splitLodging:!1,numberOfPeopleSplittingLodging:1,transportation:null,customTransportationCost:0,splitTransportation:!1,numberOfPeopleSplittingTransportation:1,travelDays:1,foodCosts:n?.options?.[0]?.foodCostValue||null,customFoodCost:0,attendOtherEvents:!1,otherEvents:[]})},[s]);const R=a=>{u({membershipType:a,registrationRate:a.rates[0]||null,guestRegistrationRate:[],customRegistrationCost:0,customGuestRegistrationCost:0})},b=a=>{u({registrationRate:a,isEarlyRate:a.isEarlyRate,isCustomRegistrationCost:a.isCustomRegistrationCost})},f=a=>{const r=a.totalAttendees||1,i=l("guestRegistrationRate"),m=Array.from({length:r-1},(n,g)=>({...i,id:g,guestRegistrationRate:i.options[0]}));u({numberOfAttendees:a,guestRegistrationRate:m,customGuestRegistrationCost:0})},C=a=>{u({guestRegistrationRate:a})},N=a=>{u({customRegistrationCost:a})},p=(a,r)=>{if(a==="membershipType")R(r);else if(a==="registrationRate")b(r);else if(a==="customRegistrationCost")N(r);else if(a==="numberOfAttendees")f(r);else if(a==="guestRegistrationRate")C(r);else if(a==="travelDays"){const i=Math.round(r);u({travelDays:i,registrationRate:o.registrationRate?.isFullConference&&i===1?null:o.registrationRate})}else if(a==="purchaseRecording"){const i=l("sessionRecordingRates");u({purchaseRecording:r,sessionRecordingRate:r?i?.options?.[0]:null})}else a==="sessionRecordingRate"?u({sessionRecordingRate:r}
1):a==="lodging"?u({lodging:r,customLodgingCost:r?.type==="custom"?o.customLodgingCost:0,isCustomHotelCost:r?.type==="custom"}):a==="splitLodging"?u({splitLodging:r,isCustomHotelCost:r}):a==="customLodgingCost"?u({customLodgingCost:r}):a==="numberOfPeopleSplittingLodging"?u({numberOfPeopleSplittingLodging:r}):a==="transportation"?u({transportation:r,customTransportationCost:r?.type==="custom"?o.customTransportationCost:0,isCustomTransportationCost:r?.type==="custom"}):a==="splitTransportation"?u({splitTransportation:r}):a==="customTransportationCost"?u({customTransportationCost:r}):a==="numberOfPeopleSplittingTransportation"?u({numberOfPeopleSplittingTransportation:r}):a==="foodCosts"?u({foodCosts:r,customFoodCost:r?.type==="custom"?o.customFoodCost:0}):a==="customFoodCost"?u({customFoodCost:r}):a==="attendOtherEvents"?u({attendOtherEvents:r,otherEvents:r?o.otherEvents:[],customEventCost:r?o.customEventCost:0}):a==="customEventCost"&&u({customEventCost:r})},x=a=>{const r=o.numberOfAttendees?.totalAttendees||1,i=r>1,m=r>1;switch(a.type){case"membership":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"select",label:a.question,options:a.options?.map(n=>({text:n.text,value:n}))||[],value:o[a.name],onChange:n=>{p(a.name,n)},learnMore:a.learnMoreLink}),o[a.name]&&t.createElement(y,{type:"select",label:a.labels?.registrationRateQuestion||a.question,options:o[a.name].rates?.map(n=>({text:n.text,value:n}))||[],value:o.registrationRate,onChange:n=>{p("registrationRate",n)}}),o.registrationRate?.isCustomRegistrationCost&&t.createElement(y,{isAdditionalField:!0,type:"number",label:"Custom Registration Cost",value:o.customRegistrationCost,onChange:n=>{p("customRegistrationCost",n)}}));case"attendees":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"select",label:a.question,options:a.options?.map(n=>({text:n.text,value:n}))||[],value:o[a.name],onChange:n=>p(a.name,n),learnMore:a.learnMoreLink}),r>1&&t.createElement("div",null,o.guestRegistrationRate.map((n,g)=>t.createElement(y,{key:`guest-registration-${g}`,type:"select",label:`Guest ${g+1} Registration Rate`,options:n.options?.map(E=>({text:E.text,value:E}))||[],value:n.guestRegistrationRate,onChange:E=>{const w=o.guestRegistrationRate.map((v,k)=>k===g?{...v,guestRegistrationRate:E}:v);p("guestRegistrationRate",w)}}))));case"slider":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"slider",label:a.question,min:a.minDays,max:a.maxDays,step:1,value:o[a.name],onChange:n=>{const g=Math.round(n);p(a.name,g)}}));case"purchaseRecording":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"radio",label:a.question,options:a.options.map(n=>({text:n.text,value:n.rateBool})),value:o.purchaseRecording,onChange:n=>p(a.name,n)}),o.purchaseRecording&&t.createElement(y,{type:"select",label:"Select Recording Rate",options:l("sessionRecordingRates")?.options?.map(n=>({text:n.text,value:n}))||[],value:o.sessionRecordingRate,onChange:n=>p("sessionRecordingRate",n)}));case"lodging":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"select",label:a.question,options:a.options?.map(n=>({text:n.text,value:n}))||[],value:o[a.name],onChange:n=>p(a.name,n),learnMore:a.learnMoreLink}),o.lodging?.type==="custom"&&t.createElement(y,{type:"number",isAdditionalField:!0,label:"Custom Hotel Cost",value:o.customLodging
1Cost,onChange:n=>p("customLodgingCost",n)}),i&&t.createElement(y,{key:`field-${a.name}-split`,type:"radio",label:"Will you split the cost of your stay?",options:[{text:"Yes",value:!0},{text:"No",value:!1}],value:o.splitLodging||!1,onChange:n=>p("splitLodging",n)}),i&&o.splitLodging&&t.createElement(y,{type:"number",isAdditionalField:!0,label:"Number of People Splitting Lodging",value:o.numberOfPeopleSplittingLodging,onChange:n=>p("numberOfPeopleSplittingLodging",n)}));case"transportation":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"select",label:a.labels?.question||a.question,options:a.options?.map(n=>({text:n.text||n.label,value:n}))||[],value:o[a.name],onChange:n=>p(a.name,n),learnMore:a.learnMoreLink}),o.transportation?.type==="custom"&&t.createElement(y,{type:"number",isAdditionalField:!0,label:a.labels?.customCostLabel||"Custom Transportation Cost",value:o.customTransportationCost,onChange:n=>p("customTransportationCost",n)}),m&&t.createElement(y,{key:`field-${a.name}-split`,type:"radio",label:a.labels?.splitQuestion||"Will you split the cost of transportation?",options:[{text:a.labels?.splitYesLabel||"Yes",value:!0},{text:a.labels?.splitNoLabel||"No",value:!1}],value:o.splitTransportation||!1,onChange:n=>p("splitTransportation",n)}),o.splitTransportation&&t.createElement(y,{type:"number",isAdditionalField:!0,label:a.labels?.numberOfPeopleLabel||"Number of People Splitting Transportation",value:o.numberOfPeopleSplittingTransportation,onChange:n=>p("numberOfPeopleSplittingTransportation",n)}));case"food":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"select",label:a.question,options:a.options?.map(n=>({text:n.text,value:n.foodCostValue})),value:o.foodCosts,onChange:n=>{p("foodCosts",n)},learnMore:a.learnMoreLink}),o.foodCosts?.type==="custom"&&t.createElement(y,{type:"number",isAdditionalField:!0,label:"Custom Food Cost",value:o.customFoodCost,onChange:n=>p("customFoodCost",n),min:.01}));case"events":return t.createElement("div",{key:`field-${a.name}`},t.createElement(y,{type:"radio",label:a.labels?.question||a.question,options:a.options?.map(n=>({text:n.label||n.text,value:n.value})),value:o.attendOtherEvents||!1,onChange:n=>p("attendOtherEvents",n),learnMore:a.learnMoreLink}),o.attendOtherEvents&&t.createElement(y,{type:"number",isAdditionalField:!0,label:a.labels?.customCostLabel||a.customOption?.label||"Enter Own Costs",value:o.customEventCost,onChange:n=>p("customEventCost",n),min:.01}));default:return null}};return t.createElement("div",{className:"fnce-calculator__form-container"},s.map(a=>x(a)))}
1A.propTypes={data:e().arrayOf(e().shape({type:e().oneOf(["membership","registrationRate","attendees","guestRegistrationRate","purchaseRecording","sessionRecordingRates","slider","lodging","transportation","food","events"]).isRequired,name:e().string.isRequired,question:e().string,learnMoreLink:e().shape({text:e().string,modalContent:e().shape({title:e().string,content:e().oneOfType([e().string,e().object]),image:e().shape({src:e().string,alt:e().string}),primaryCta:e().shape({text:e().string,url:e().string}),secondaryCta:e().shape({text:e().string,url:e().string})})}),options:e().arrayOf(e().oneOfType([e().shape({text:e().string,value:e().oneOfType([e().string,e().object,e().bool]),type:e().string,rates:e().arrayOf(e().shape({text:e().string.isRequired,value:e().string.isRequired,rate:e().number.isRequired,isEarlyRate:e().bool,isFullConference:e().bool,isCustomRegistrationCost:e().bool}))}),e().shape({text:e().string,totalAttendees:e().number}),e().shape({text:e().string,rate:e().oneOfType([e().number,e().bool])}),e().shape({type:e().string,label:e().string,ratePerDay:e().number,cost:e().number})])),minDays:e().number,maxDays:e().number,labels:e().shape({question:e().string,customCostLabel:e().string,splitQuestion:e().string,splitYesLabel:e().string,splitNoLabel:e().string,numberOfPeopleLabel:e().string,yesLabel:e().string,noLabel:e().string}),customOption:e().shape({label:e().string})})).isRequired};var Y=A,c=_(39079);const d=c.mM.create({page:{padding:40,backgroundColor:"#FFFFFF"},header:{flexDirection:"row",justifyContent:"space-between",marginBottom:40},headerLeft:{width:"50%"},headerRight:{width:"50%",alignItems:"flex-end"},logo:{width:80,marginBottom:10},conferenceInfoTitle:{fontSize:10,textAlign:"right",lineHeight:1.5,fontWeight:"bold"},conferenceInfo:{fontSize:10,textAlign:"right",lineHeight:1.5},breakdownTitle:{fontSize:16,marginBottom:10},titleUnderline:{borderBottomWidth:1,borderBottomColor:"#333333",marginBottom:20},infoSection:{backgroundColor:"#F5F5F5",padding:15,marginBottom:20},infoRow:{marginBottom:5,fontSize:11},costSection:{marginBottom:30},costRow:{flexDirection:"row",justifyContent:"space-between",marginBottom:10,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"#CCCCCC"},costRowLast:{flexDirection:"row",justifyContent:"space-between",marginBottom:10,paddingBottom:8},costLabel:{fontSize:11},costValue:{fontSize:11,fontWeight:"bold"},totalRow:{flexDirection:"row",justifyContent:"space-between",paddingTop:10,marginTop:10},totalLabel:{fontSize:12,fontWeight:"bold"},totalValue:{fontSize:12,fontWeight:"bold"},disclaimer:{fontSize:8,color:"#666666",marginTop:40},logoError:{width:80,height:40,marginBottom:10,backgroundColor:"#f5f5f5",justifyContent:"center",alignItems:"center"},logoErrorText:{fontSize:8,color:"#666666"}}),B=({src:s})=>{if(s.startsWith("data:"))return t.createElement(c.Ee,{style:d.logo,src:s});try{return t.createElement(c.Ee,{style:d.logo,src:{uri:s,method:"GET",headers:{"Cache-Control":"no-cache"}}})}catch{return t.createElement(c.G7,{style:d.logoError},t.createElement(c.xv,{style:d.logoErrorText},"Logo not available"))}};B.propTypes={src:e().string.isRequired};const G=({data:s,costs:o,calculatorInfo:u,pdfEvent:l})=>t.createElement(c.BB,null,t.createElement(c.T3,{size:"A4",style:d.page},t.createElement(c.G7,{style:d.header},t.createElement(c.G7,{style:d.headerLeft},t.createElement(B,{src:l.logo})),t.createElement(c.G7,{style:d.headerRight},t.createElement(c.xv,{style:d.conferenceInfoTitle},l.subtitle,` 2`),t.createElement(c.xv,{style:d.conferenceInfo},l.date,` 3`,l.location,` 4`,l.address))),t.createElement(c.xv,{style:d.breakdownTitle},l.breakDownTitle),t.createElement(c.G7,{style:d.titleUnderline}),t.createElement(c.G7,{style:d.infoSection},t.createElement(c.xv,{style:d.infoRow},l.membershipTypeLabel,": ",u.membershipType),t.createElement(c.xv,{style:d.infoRow},l.attendeesLabel,": ",u.attendees),t.createElement(c.xv,{style:d.infoRow},l.tripDurationLabel,": ",u.tripDuration," days"),t.createElement(c.xv,{style:d.infoRow},l.registrationTypeLabel,": ",u.registrationType)),t.createElement(c.G7,{style:d.costSection},t.createElement(c.G7,{style:d.costRow},t.createElement(c.xv,{style:d.costLabel},s.labels.lodging),t.createElement(c.xv,{style:d.costValue},o.lodging)),t.createElement(c.G7,{style:d.costRow},t.createElement(c.xv,{style:d.costLabel},s.labels.registration),t.createElement(c.xv,{style:d.costValue},o.registration)),o.sessionRecording&&t.createElement(c.G7,{style:d.costRow},t.createElement(c.xv,{style:d.costLabel},s.labels.sessionRecording),t.createElement(c.xv,{style:d.costValue},o.sessionRecording)),t.createElement(c.G7,{style:d.costRow},t.createElement(c.xv,{style:d.costLabel},s.labels.transportation),t.createElement(c.xv,{style:d.costValue},o.transportation)),t.createElement(c.G7,{style:d.costRow},t.createElement(c.xv,{style:d.costLabel},s.labels.food),t.createElement(c.xv,{style:d.costValue},o.food)),t.createElement(c.G7,{style:d.costRowLast},t.createElement(c.xv,{style:d.costLabel},s.labels.otherEvents),t.createElement(c.xv,{style:d.costValue},o.otherEvents)),t.createElement(c.G7,{style:d.totalRow},t.createElement(c.xv,{style:d.totalLabel},s.labels.grandTotal),t.createElement(c.xv,{style:d.totalValue},o.total))),t.createElement(c.xv,{style:d.disclaimer},s.disclaimer)));G.propTypes={data:e().shape({labels:e().shape({lodging:e().string.isRequired,registration:e().string.isRequired,transportation:e().string.isRequired,food:e().string.isRequired,otherEvents:e().string.isRequired,grandTotal:e().string.isRequired,sessionRecording:e().string}).isRequired,disclaimer:e().string.isRequired}).isRequired,costs:e().shape({lodging:e().string.isRequired,registration:e().string.isRequired,transportation:e().string.isRequired,food:e().string.isRequired,otherEvents:e().string.isRequired,total:e().string.isRequired,sessionRecording:e().string}).isRequired,calculatorInfo:e().shape({membershipType:e().string.isRequired,attendees:e().number.isRequired,tripDuration:e().number.isRequired,registrationType:e().string.isRequired}).isRequired,pdfEvent:e().shape({logo:e().string.isRequired,title:e().string.isRequired,subtitle:e().string.isRequired,date:e().string.isRequired,location:e().string.isRequired,address:e().string.isRequired,breakDownTitle:e().string.isRequired,membershipTypeLabel:e().string.isRequired,attendeesLabel:e().string.isRequired,tripDurationLabel:e().string.isRequired,registrationTypeLabel:e().string.isRequired}).isRequired};var J=G,$=_(38643);function V({data:s}){const{calculateTotalCost:o,resetCalculator:u,calculatorState:l}=S(),[R,b]=(0,t.useState)(!1),[f,C]=(0,t.useState)(null),[N,p]=(0,t.useState)({}),x=()=>{b(!0)},a=o(),r=n=>{n.preventDefault();const g=new FormData(n.target),E={};let w=!1;if(s.emailModal.inputFields.forEach(v=>{g.get(v.name)||(E[v.name]=`${v.label} is required`,w=!0)}),w){p(E);return}g.append("membershiptype",l.membershipType?.text||"Not specified"),g.append("attendees",l.numberOfAttendees?.totalAttendees||1),g.append("tripduration",`${l.travelDays||1} days`),g.append("registrationtype",l.registrationRate?.text||"Not specified"),g.append("lodgingcosts",a.lodging),g.append("registrationcosts",a.registration),g.append("sessionrecordingcosts",a.sessionRecording||"$0.00"),g.append("transportationcosts",a.transportation),g.append("foodcosts",a.food),g.append("othereventcosts",a.otherEvents),g.append("grandtotal",a.total),fetch(s.emailModal.endpoint,{method:"POST",body:g}).then(v=>v.json()).then(v=>{v.success?(C(!0),(0,$.UO)({eventName:"fnce-calculator",custom:{click_text:"email"}})):C(!1)})},i=()=>{u()},m=()=>({membershipType:l.membershipType?.text||"Not specified",attendees:l.numberOfAttendees?.totalAttendees||1,tripDuration:l.travelDays||1,registrationType:l.registrationRate?.text||"Not specified"});return t.createElement("div",{className:"fnce-calculator__cost-breakdown"},t.createElement("h2",{className:"fnce-calculator__cost-breakdown-title"},"Total Cost Breakdown"),t.createElement("div",{className:"fnce-calculator__cost-breakdown-table"},t.createElement("div",{className:"fnce-calculator__cost-breakdown-row"},t.createElement("span",{className:"fnce-calculator__cost-breakdown-label"},s.labels.lodging),t.createElement("span",{className:"fnce-calculator__cost-breakdown-value"},a.lodging)),t.createElement("div",{className:"fnce-calculator__cost-breakdown-row"},t.createElement("span",{className:"fnce-calculator__cost-breakdown-label"},s.labels.registration),t.createElement("span",{className:"fnce-calculator__cost-breakdown-value"},a.registration)),a.sessionRecording&&t.createElement("div",{className:"fnce-calculator__cost-breakdown-row"},t.createElement("span",{className:"fnce-calculator__cost-breakdown-label"},s.labels.sessionRecording),t.createElement("span",{className:"fnce-calculator__cost-breakdown-value"},a.sessionRecording)),t.createElement("div",{className:"fnce-calculator__cost-breakdown-row"},t.createElement("span",{className:"fnce-calculator__cost-breakdown-label"},s.labels.transportation),t.createElement("span",{className:"fnce-calculator__cost-breakdown-value"},a.transportation)),t.createElement("div",{className:"fnce-calculator__cost-breakdown-row"},t.createElement("span",{className:"fnce-calculator__cost-breakdown-label"},s.labels.food),t.createElement("span",{className:"fnce-calculator__cost-breakdown-value"},a.food)),t.createElement("div",{className:"fnce-calculator__cost-breakdown-row"},t.createElement("span",{className:"fnce-calculator__cost-breakdown-label"},s.labels.otherEvents),t.createElement("span",{className:"fnce-calculator__cost-breakdown-value"},a.otherEvents)),t.createElement("div",{className:"fnce-calculator__cost-breakdown-row fnce-calculator__cost-breakdown-row--total"},t.createElement("span",{className:"fnce-calculator__cost-breakdown-label"},s.labels.grandTotal),t.createElement("span",{className:"fnce-calculator__cost-breakdown-value"},a.total))),t.createElement("div",{className:"fnce-calculator__cost-breakdown-buttons"},t.createElement(c.WD,{onClick:()=>{(0,$.UO)({eventName:"fnce-calculator",custom:{click_text:"download"}})}
4,document:t.createElement(J,{data:s,costs:a,calculatorInfo:m(),pdfEvent:s.pdfEvent}),fileName:"FNCE-Cost-Breakdown.pdf",className:"button"},({loading:n})=>n?"Generating PDF...":s.buttons.download),t.createElement("button",{className:"button button--outline",onClick:x},s.buttons.email),t.createElement("button",{className:"link-button",onClick:i},s.buttons.reset)),t.createElement("p",{className:"fnce-calculator__cost-breakdown-disclaimer"},s.disclaimer),R&&t.createElement(P,{isOpen:R,onClose:()=>{if(b(!1),f){C(null),p({});const n=document.querySelector(".fnce-calculator__email-form");n&&n.reset()}},title:f?s.emailModal.confirmation.title:s.emailModal.title,className:"fnce-calculator__modal",content:f?s.emailModal.confirmation.content:s.emailModal.content,primaryCta:f?s.emailModal.confirmation.primaryCta:null},f?t.createElement("p",null,s.emailModal.confirmation.content):t.createElement("form",{onSubmit:r,className:"fnce-calculator__email-form"},s.emailModal.inputFields.map(n=>t.createElement("div",{key:n.label,className:D()("fnce-calculator__field",{"fnce-calculator__field--checkbox":n.type==="checkbox","fnce-calculator__field--text":n.type==="text","fnce-calculator__field--email":n.type==="email","fnce-calculator__field--error":N[n.name]})},t.createElement("label",{htmlFor:n.label},n.label),n.type==="checkbox"&&t.createElement("div",{className:"fnce-calculator__checkbox"},t.createElement("input",{type:"checkbox",id:n.name,name:n.name}),t.createElement("label",{className:"fnce-calculator__checkbox-label",htmlFor:n.label},n.question)),n.type==="text"&&t.createElement("input",{type:"text",id:n.name,name:n.name,placeholder:n.placeholder}),n.type==="email"&&t.createElement("input",{type:"email",id:n.name,name:n.name,placeholder:n.placeholder}),N[n.name]&&t.createElement("span",{className:"fnce-calculator__field-error"},N[n.name]))),t.createElement("button",{className:"button",type:"submit"},s.emailModal.submitButton.text))))}V.propTypes={data:e().shape({labels:e().shape({lodging:e().string.isRequired,registration:e().string.isRequired,transportation:e().string.isRequired,food:e().string.isRequired,otherEvents:e().string.isRequired,grandTotal:e().string.isRequired,sessionRecording:e().string.isRequired}).isRequired,buttons:e().shape({download:e().string.isRequired,email:e().string.isRequired,reset:e().string.isRequired}).isRequired,disclaimer:e().string.isRequired,emailModal:e().shape({title:e().string,content:e().string,inputFields:e().arrayOf(e().shape({type:e().string,label:e().string,placeholder:e().string,text:e().string,value:e().string,name:e().string})),submitButton:e().shape({text:e().string,type:e().string}),confirmation:e().shape({title:e().string,content:e().string,primaryCta:e().shape({text:e().string,url:e().string})}),endpoint:e().string}),pdfEvent:e().shape({logo:e().string.isRequired,title:e().string.isRequired,subtitle:e().string.isRequired,date:e().string.isRequired,location:e().string.isRequired,address:e().string.isRequired})}).isRequired};var Q=V;function I({endpoint:s}){const[o,u]=(0,t.useState)(null),[l,R]=(0,t.useState)(!0),[b,f]=(0,t.useState)(null);return(0,t.useEffect)(()=>{(async()=>{try{const C=await(await fetch(s)).json();C.success?u(C.data):f("Failed to load calculator data")}catch{f("Error loading calculator data")}finally{R(!1)}})()},[]),l?t.createElement("div",{className:"fnce-calculator__loading container"},"Loading..."):b?t.createElement("div",{className:"fnce-calculator__error container"},b):o?t.createElement(O,null,t.createElement("div",{className:"fnce-calculator__theme-image-container"},t.createElement("img",{className:"fnce-calculator__theme-image",src:o.theme.image,alt:"FNCE Theme"})),t.createElement("div",{className:"fnce-calculator__container"},t.createElement("div",{className:"fnce-calculator__heading"},t.createElement("h1",{className:"fnce-calculator__heading-title h2"},o.theme.heading)),t.createElement("div",{className:"fnce-calculator__main-container"},t.createElement(Y,{data:o.formFields}),t.createElement(Q,{data:o.costBreakdown})))):null}I.propTypes={endpoint:e().string.isRequired};var Z=I},42480:function(){}}]); 5 6//# sourceMappingURL=1339.86eebf51c861f49aae3a.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.