"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[60],{9:(e,r,t)=>{t.r(r)},727:(e,r,t)=>{t.r(r)},29:(e,r,t)=>{t.r(r)},736:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"yveu3Jyw",wrapperTitle:"xip0EtK1",wrapperSwatches:"neg2s50l",wrapperSwatchesContent:"uRiXCZsv",wrapperSwatchesContentOption:"nw6OTB0o",wrapperSwatchesContentOptionItem:"EjD6c2RN",wrapperButton:"v2MzJp1v"}},731:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"CRtIC2Az",wrapperForm:"XiOvybgS",wrapperFormTitle:"f3xJxYXJ",wrapperFormButtons:"OiCKLjZv",wrapperFormButtonsButton:"FeHozCyq",wrapperFormButtonsButtonPrev:"nxsXkvq1",wrapperFormButtonsButtonNext:"dAib9kYW"}},742:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"A5WMvB_O",wrapperText:"sAh02TVq",wrapperLink:"Esuo4vhi",wrapperLinkButton:"_3sLJ_D_"}},732:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"JP9Cz8yP",wrapperButtons:"rHhFnK6I",wrapperButtonsButton:"sHYK8ARo",wrapperButtonsButtonNext:"WGE4Tm_a"}},737:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"jGWmug51",wrapperButtons:"QmEuBpXW",wrapperButtonsButton:"avRFt9_V",wrapperButtonsButtonPrev:"rb9eLBUf",wrapperButtonsButtonNext:"fMzefki8"}},735:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"RKI9uZ8A",wrapperSkip:"D4H0pVqD",wrapperText:"ondPM68T",wrapperColors:"fhPRMhB8",wrapperColorsItem:"WeRRdTkZ",wrapperColorsEmpty:"aFzCOAst",wrapperButtons:"pzfjvilB",wrapperButtonsButton:"ogxdL457",wrapperButtonsButtonPrev:"SZLvhDTB",wrapperButtonsButtonNext:"kpmGYHHu",wrapperPicker:"ROU6MwH3",wrapperPickerImage:"LObD94Eo"}},728:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapperBackground:"x53ywGUX",wrapperImages:"tp_sIEL0",wrapperImagesImage:"FTgGbT8x",wrapperImagesOverlay:"KQyQKoC_",wrapperImagesOverlayTitle:"GLKUZzTU",wrapperImagesOverlaySubtitle:"Cqbdfvtj",wrapperImagesOverlayButton:"Eu0DK5lu",wrapperLogos:"EkpSY7iN",wrapperLogosTitle:"NMvvFddg",wrapperLogosSlider:"C5Jb9Smh",wrapperLogosShadow:"U9nm0LpI",wrapperLogosShadowLeft:"jhbZ8ZAP",wrapperLogosShadowRight:"i3wmf07G"}},733:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"LuGLWlPj",wrapperContainer:"JFe95EIh",wrapperContainerError:"o5QfBwiK",wrapperContainerLabel:"f15caLQf",wrapperContainerLabelActive:"o5Ln5Xhm",wrapperContainerLabelShorter:"yw3VcMe0",wrapperContainerInput:"oPFXDKQv",wrapperContainerInputDate:"vHjDbu5M",wrapperContainerInputActive:"sLBKq0aG",wrapperContainerFile:"hm0rVJy7",wrapperContainerFileVisible:"PyjNRm7X",wrapperError:"cPhtXC9F"}},743:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapperProgress:"WOc_B1g2",wrapperProgressLine:"VNo5NCIk",wrapperProgressLineComplete:"A9Ra9vge",wrapperProgressLineCompleteOne:"H_VeNHUF",wrapperProgressLineCompleteTwo:"wONt_vhQ",wrapperProgressLineCompleteThree:"VfTKIklH",wrapperProgressCircle:"Rxg2Xhw6",wrapperProgressCircleActive:"KPttTohm",wrapperLabels:"phfDYGKe",wrapperLabelsStep:"Pi6mpTXO",wrapperLabelsStepActive:"Vs9YsKZl"}},740:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"vbqZEyWd",wrapperActive:"tdIM2TSG",wrapperLabel:"n11z8EyK",wrapperLabelOpened:"wqaLriEQ",wrapperLabelActive:"abK3MdSU",wrapperSelect:"n8NMp69W",wrapperSelectActive:"Rj8_mciC",wrapperOptions:"zkl3PFTU",wrapperOptionsActive:"xbcBmLkI",wrapperOptionsOption:"zbSRqmGw",wrapperIcon:"lF5cNZLI",wrapperIconActive:"DCiEfouX",wrapperTextArea:"VSlNqxLo"}},738:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"DjylT57Z",wrapperLabel:"DMHESbsH",wrapperLabelActive:"bmx7AVGK",wrapperTextArea:"clWa49AW"}},726:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={}},34:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapperBubble:"RHAYfilA",wrapperBubbleNotAvailable:"_4FjmGdF",wrapperBubbleSelected:"lgbfbDnD",wrapperBubbleInsideColor:"i_bsqJWM",wrapperBubbleLarge:"ioRTvxb3",wrapperBubbleMedium:"_O1Xi5RN",wrapperBubbleXl:"iobfoLNb",wrapperBubbleInside:"ByMwsLR6",wrapperBubbleInsideColorSelect:"TbWMiINx",wrapperBubbleInsideChild:"PBoGo7hv",wrapperBubbleBadge:"wb2yvtLN",wrapperBubbleBadgeMedium:"JOezAo__",wrapperBubbleBadgeSmall:"aW_SB1gQ",wrapperBubbleSaleCircle:"mQQal7Ef",wrapperTab:"CInmYP7M"}},8:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"jeoYiegV",wrapperRight:"AIokLt1C",wrapperLeft:"NihyFReM"}},7:(e,r,t)=>{t.r(r),t.d(r,{default:()=>a});const a={wrapper:"NxzIhXo4"}},724:(e,r,t)=>{const a=t(725);(0,t(5).createEntrypoint)("corporateGifting",a.CorporateGiftingContainer)},725:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingContainer=void 0;const a=t(0),s=(t(1),t(248));r.CorporateGiftingContainer=function(e){const r=e.useSharedState(),{colorOrder:t,currentVariant:n,variants:i}=r((({currentVariant:e,colorOrder:r,variants:t})=>({currentVariant:e,colorOrder:r,variants:t}))),o=i.filter((r=>e.availableVariants.includes(r.id))),l=t.filter((e=>o.some((r=>r.colorId===e.swatch)))),p=Object.assign(Object.assign({},e),{colorOrder:l,currentVariant:n,variants:o});return(0,a.jsx)(s.CorporateGifting,Object.assign({},p))}},253:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingColorPicker=void 0;const s=t(0),n=(t(1),a(t(736))),i=t(17),{wrapper:o,wrapperTitle:l,wrapperSwatches:p,wrapperSwatchesContent:c,wrapperSwatchesContentOption:u,wrapperSwatchesContentOptionItem:d,wrapperButton:g}=n.default;r.CorporateGiftingColorPicker=({variantIds:e,addVariantId:r,buttonLabel:t,colorOrder:a,currentVariantId:n,colorLabel:b,currentVariantTitle:f,variants:v})=>(0,s.jsxs)("div",Object.assign({className:o},{children:[(0,s.jsxs)("div",Object.assign({className:l},{children:[(0,s.jsx)("h6",{children:b}),(0,s.jsx)("h6",{children:f})]})),(0,s.jsx)("div",Object.assign({className:p},{children:(0,s.jsx)("div",Object.assign({className:c},{children:(0,s.jsx)("div",Object.assign({className:u},{children:(0,s.jsx)("div",Object.assign({className:d},{children:a.map((({swatch:r,swatch_src:t,swatch_hex:a,id:o,swatchClicked:l})=>{const p=v.find((({colorId:e})=>e.replaceAll("-","")===o));return(0,s.jsx)(i.ProductOptionSwatch,{colorId:r,swatch_src:t,swatch_hex:a,isSelected:!!p&&(e.includes(p.id)||p.id===n),swatchClicked:l,isInSelect:!0},`swatch${o}`)}))}))}))}))})),(0,s.jsx)("button",Object.assign({className:g,type:"button",onClick:()=>r(n)},{children:t}))]}))},744:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.useCorporateGiftingForm=void 0;const a=t(3);r.useCorporateGiftingForm=e=>{const[r,t]=(0,a.useState)(!0),s=(0,a.useRef)(null);return(0,a.useEffect)((()=>{s.current&&(r?t(!1):4===e?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:s.current.offsetTop-120,behavior:"smooth"}))}),[e]),{ref:s}}},250:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingForm=void 0;const s=t(0),n=(t(1),a(t(731))),i=t(251),o=t(252),l=t(254),p=t(257),c=t(258),u=t(744),{wrapper:d,wrapperForm:g,wrapperFormTitle:b}=n.default;r.CorporateGiftingForm=e=>{const{labels:{requestLabel:r,thankYouLabel:t},formState:{step:a},progressLabels:n}=e,{ref:f}=(0,u.useCorporateGiftingForm)(a);return(0,s.jsx)("div",Object.assign({className:d},{children:(0,s.jsxs)("form",Object.assign({ref:f,className:g,id:"corporateGiftingForm",onSubmit:e=>e.preventDefault()},{children:[(0,s.jsx)("h3",Object.assign({className:b},{children:4===a?t:r})),(0,s.jsx)(c.CorporateGiftingProgress,{progressLabels:n,step:a}),1===a&&(0,s.jsx)(i.CorporateGiftingFormStepOne,Object.assign({},e)),2===a&&(0,s.jsx)(o.CorporateGiftingFormStepTwo,Object.assign({},e)),3===a&&(0,s.jsx)(l.CorporateGiftingFormStepThree,Object.assign({},e)),4===a&&(0,s.jsx)(p.CorporateGiftingFormStepFour,Object.assign({},e))]}))}))}},257:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingFormStepFour=void 0;const s=t(0),n=(t(1),a(t(742))),i=t(2),o=t(12),{wrapper:l,wrapperText:p,wrapperLink:c,wrapperLinkButton:u}=n.default;r.CorporateGiftingFormStepFour=({labels:{submittedLabel:e},learnLink:{href:r,label:t}})=>(0,s.jsxs)("div",Object.assign({className:l},{children:[(0,s.jsxs)("div",Object.assign({className:p},{children:[(0,s.jsx)(o.CheckMarkIcon,{}),(0,s.jsx)("p",{children:e})]})),(0,s.jsx)("div",Object.assign({className:c},{children:(0,s.jsx)("a",Object.assign({href:r,className:(0,i.cx)(u)},{children:t}))}))]}))},251:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingFormStepOne=void 0;const s=t(0),n=(t(1),a(t(732))),i=t(2),o=t(125),{wrapper:l,wrapperButtons:p,wrapperButtonsButton:c,wrapperButtonsButtonNext:u}=n.default;r.CorporateGiftingFormStepOne=({formState:e,next:r,buttonLabels:{nextButtonLabel:t},placeholders:a,setValue:n,setTouched:d,validateForm:g})=>{const b=["fullName","company","email","phone","quantity","date"],f=b.map((r=>{const t="date"===r?"date":"phone"===r?"tel":"text";return{label:a[r],setValue:n,setTouched:d,name:r,value:e[r].value,type:t,errorMessage:e[r].errorMessage}}));return(0,s.jsxs)("div",Object.assign({className:l},{children:[f.map((({errorMessage:e,label:r,name:t,setTouched:a,setValue:n,type:i,value:l})=>(0,s.jsx)(o.CorporateGiftingInput,{label:r,setValue:n,setTouched:a,name:t,value:l,errorMessage:e,type:i},t))),(0,s.jsx)("div",Object.assign({className:p},{children:(0,s.jsx)("button",Object.assign({type:"button",className:(0,i.cx)(c,u),onClick:()=>{g(b)&&r()}},{children:t}))}))]}))}},254:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingFormStepThree=void 0;const s=t(0),n=(t(1),a(t(737))),i=t(2),o=t(255),l=t(256),{wrapper:p,wrapperButtons:c,wrapperButtonsButton:u,wrapperButtonsButtonNext:d,wrapperButtonsButtonPrev:g}=n.default;r.CorporateGiftingFormStepThree=({formState:{howDidYouHear:e,message:r},prev:t,buttonLabels:{backButtonLabel:a,sendButtonLabel:n},placeholders:b,setValue:f,setTouched:v,howDidYouHearSelectOptions:w,submitForm:m})=>(0,s.jsxs)("div",Object.assign({className:p},{children:[(0,s.jsx)(l.CorporateGiftingSelect,{label:b.howDidYouHear,setValue:f,setTouched:v,name:"howDidYouHear",value:e.value,options:w}),(0,s.jsx)(o.CorporateGiftingTextArea,{label:b.message,setValue:f,setTouched:v,name:"message",value:r.value}),(0,s.jsxs)("div",Object.assign({className:c},{children:[(0,s.jsx)("button",Object.assign({type:"button",className:(0,i.cx)(u,g),onClick:t},{children:a})),(0,s.jsx)("button",Object.assign({type:"button",className:(0,i.cx)(u,d),onClick:()=>{m()}},{children:n}))]}))]}))},252:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingFormStepTwo=void 0;const s=t(0),n=t(1),i=a(t(735)),o=t(2),l=t(125),p=t(253),c=t(17),u=t(12),{wrapper:d,wrapperSkip:g,wrapperText:b,wrapperPicker:f,wrapperPickerImage:v,wrapperColors:w,wrapperColorsItem:m,wrapperColorsEmpty:h,wrapperButtons:j,wrapperButtonsButton:O,wrapperButtonsButtonNext:x,wrapperButtonsButtonPrev:C}=i.default;r.CorporateGiftingFormStepTwo=({formState:{logo:e,variantIds:r,zipCode:t},next:a,prev:i,buttonLabels:{addButtonLabel:_,backButtonLabel:S,nextButtonLabel:N,skipButtonLabel:L},placeholders:B,setValue:I,setTouched:y,labels:{colorLabel:T,colorsInterestedInLabel:F,colorsSelectedLabel:P,noColorsSelectedLabel:G},colorOrder:M,addVariantId:k,currentVariant:A,variants:V,removeVariantId:D,validateForm:R})=>{var E,H,q,z;const K=r.map((e=>{const r=V.find((({id:r})=>r===e));if(!r)return;const t=M.find((({id:e})=>e===r.colorId.replaceAll("-","")));return t?Object.assign(Object.assign({},t),{title:r.title,variantId:r.id}):void 0})).filter(Boolean);return(0,s.jsxs)("div",Object.assign({className:d},{children:[(0,s.jsx)("button",Object.assign({type:"button",onClick:()=>{I({fieldName:"zipCode",value:""}),I({fieldName:"logo",value:null}),a()},className:(0,o.cx)(g,C)},{children:L})),(0,s.jsx)("p",{className:b,dangerouslySetInnerHTML:{__html:F}}),(0,s.jsxs)("div",Object.assign({className:f},{children:[(0,s.jsx)("div",Object.assign({className:v},{children:(0,s.jsx)("img",{src:null!==(q=null===(H=null===(E=null==A?void 0:A.cartImage)||void 0===E?void 0:E.src)||void 0===H?void 0:H.replace("h_100","h_800"))&&void 0!==q?q:"",alt:null===(z=null==A?void 0:A.cartImage)||void 0===z?void 0:z.alt})})),(0,s.jsx)(p.CorporateGiftingColorPicker,{colorOrder:M,addVariantId:k,buttonLabel:_,variantIds:r,currentVariantId:A.id,currentVariantTitle:A.title,colorLabel:T,variants:V})]})),(0,s.jsx)("p",Object.assign({className:b},{children:P})),(0,s.jsx)("div",Object.assign({className:w},{children:K.length>0?K.map((e=>{if(!e)return(0,s.jsx)(n.Fragment,{});const{id:r,swatch:t,swatch_hex:a,swatch_src:i,title:o,variantId:l}=e;return(0,s.jsxs)("div",Object.assign({className:m,onClick:()=>D(l)},{children:[(0,s.jsx)(c.ProductOptionSwatch,{colorId:t,isSelected:!1,swatchClicked:()=>{},swatch_hex:a,swatch_src:i}),(0,s.jsx)("span",{children:o}),(0,s.jsx)(u.CloseIcon,{})]}),`swatch${r}`)})):(0,s.jsx)("p",Object.assign({className:h},{children:G}))})),(0,s.jsx)(l.CorporateGiftingInput,{label:B.logo,setValue:I,setTouched:y,name:"logo",type:"file",value:e.value,fileName:e.value?e.value.name:"",errorMessage:e.errorMessage}),(0,s.jsx)(l.CorporateGiftingInput,{label:B.zipCode,setValue:I,setTouched:y,name:"zipCode",value:t.value,errorMessage:t.errorMessage}),(0,s.jsxs)("div",Object.assign({className:j},{children:[(0,s.jsx)("button",Object.assign({type:"button",className:(0,o.cx)(O,C),onClick:i},{children:S})),(0,s.jsx)("button",Object.assign({type:"button",className:(0,o.cx)(O,x),onClick:()=>{R(["logo","zipCode"])&&a()}},{children:N}))]}))]}))}},729:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.useHeroSlider=r.useLogosSlider=void 0;const a=t(3),s=t(11),n=t(730);r.useLogosSlider=function(){const[e,r]=(0,a.useState)(!0),[t,i]=(0,a.useState)(!1),o={loop:!0,drag:!1,slides:{perView:4,spacing:24,origin:"center"},breakpoints:{"(min-width: 768px)":{loop:!0,drag:!1,slides:{perView:6,spacing:24,origin:"center"}},"(min-width: 1024px)":{loop:!0,drag:!1,slides:{perView:10,spacing:24,origin:"center"}}},created:()=>{i(!0)},slideChanged:e=>{e.moveToIdx((e.track.details.rel+1)%(e.slides.length+1),!1,n.animation)}},[l,p]=(0,s.useKeenSlider)(o);return(0,a.useEffect)((0,n.fixKeenSliderBugInPreact)(p,o),[p.current]),(0,a.useEffect)((()=>{r(!1)}),[]),(0,a.useEffect)((()=>{t&&p.current&&p.current.moveToIdx((p.current.track.details.rel+1)%(p.current.slides.length+1),!1,n.animation)}),[t]),{logosSliderRef:l,isJsDisabled:e}},r.useHeroSlider=()=>{const e={loop:!0,drag:!1,slides:{perView:"auto",origin:"center"},breakpoints:{"(min-width: 1024px)":{disabled:!0}}},[r,t]=(0,s.useKeenSlider)(e);return(0,a.useEffect)((0,n.fixKeenSliderBugInPreact)(t,e),[t.current]),(0,a.useEffect)((()=>{let e=setInterval((()=>{t.current&&t.current.next()}),1e3);return()=>clearInterval(e)}),[]),{heroSliderRef:r}}},249:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingHero=void 0;const s=t(1),n=t(0),i=t(1);t(9),t(727);const o=a(t(728)),l=t(729),p=t(2),{wrapper:c,wrapperBackground:u,wrapperImages:d,wrapperImagesOverlay:g,wrapperImagesOverlayTitle:b,wrapperImagesOverlaySubtitle:f,wrapperImagesOverlayButton:v,wrapperImagesImage:w,wrapperLogos:m,wrapperLogosTitle:h,wrapperLogosSlider:j,wrapperLogosShadow:O,wrapperLogosShadowLeft:x,wrapperLogosShadowRight:C}=o.default;r.CorporateGiftingHero=({buttonLabel:e,logos:r,logosTitle:t,mainImages:a,subtitle:o,title:_,blendjetBackground:S,isLastStep:N})=>{const{logosSliderRef:L,isJsDisabled:B}=(0,l.useLogosSlider)(),{heroSliderRef:I}=(0,l.useHeroSlider)();return(0,n.jsxs)("div",Object.assign({className:c},{children:[N?(0,n.jsx)("div",Object.assign({className:u},{children:(0,n.jsx)("img",Object.assign({},S))})):(0,n.jsxs)("div",Object.assign({ref:I,className:(0,p.cx)(d,"keen-slider",B&&"noJsForCorporateGiftingHero")},{children:[(0,n.jsx)("div",Object.assign({className:g},{children:(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)("h1",Object.assign({className:b},{children:_})),(0,n.jsx)("p",Object.assign({className:f},{children:o})),(0,n.jsx)("button",Object.assign({onClick:()=>{const e=document.querySelector("#corporateGiftingForm");e&&window.scrollTo({top:e.offsetTop-120,behavior:"smooth"})},className:v},{children:e}))]})})),a.map(((e,r)=>(0,n.jsx)("div",Object.assign({className:(0,p.cx)(w,"keen-slider__slide",`number-slide${r+1}`)},{children:(0,n.jsx)("img",Object.assign({},e))}),e.alt)))]})),(0,n.jsxs)("div",Object.assign({className:m},{children:[(0,n.jsx)("p",Object.assign({className:h},{children:t})),(0,n.jsx)("div",Object.assign({className:(0,p.cx)("keen-slider",j,B&&"noJsForCorporateGiftingLogos"),ref:L},{children:r.map(((e,r)=>(0,s.createElement)("img",Object.assign({className:(0,p.cx)("keen-slider__slide",`number-slide${r+1}`)},e,{key:e.alt}))))})),(0,n.jsx)("div",{className:(0,p.cx)(O,x)}),(0,n.jsx)("div",{className:(0,p.cx)(O,C)})]}))]}))}},730:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.fixKeenSliderBugInPreact=r.animation=void 0,r.animation={duration:3e3,easing:e=>e},r.fixKeenSliderBugInPreact=function(e,r){return()=>(e.current&&e.current.update(Object.assign({},r)),()=>{e.current&&e.current.destroy()})}},734:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.useCorporateGiftingInput=void 0;const a=t(3);r.useCorporateGiftingInput=({name:e,setTouched:r,setValue:t,value:s,type:n,fileName:i,errorMessage:o})=>{const[l,p]=(0,a.useState)(!1),c=(null==s?void 0:s.toString())||l,u="file"===n,d=u&&!!i&&i.length>0,g="date"===n;return{isActive:c,isError:o.length>0,isFile:u,isFileAdded:d,isDate:g,handleBlur:()=>{p(!1)},handleChange:r=>{"logo"===e?r.currentTarget.files&&t({fieldName:e,value:r.currentTarget.files[0]}):t({fieldName:e,value:r.currentTarget.value})},handleFocus:()=>{"file"!==n&&p(!0),r(e)}}}},125:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingInput=void 0;const s=t(0),n=a(t(733)),i=t(2),o=t(12),l=t(12),p=t(734),{wrapper:c,wrapperContainer:u,wrapperContainerError:d,wrapperContainerLabel:g,wrapperContainerInput:b,wrapperContainerInputDate:f,wrapperContainerInputActive:v,wrapperContainerLabelActive:w,wrapperContainerLabelShorter:m,wrapperContainerFile:h,wrapperContainerFileVisible:j,wrapperError:O}=n.default;r.CorporateGiftingInput=({label:e,name:r,value:t,setTouched:a,setValue:n,errorMessage:x,type:C="text",fileName:_,id:S})=>{const{handleBlur:N,handleChange:L,handleFocus:B,isActive:I,isError:y,isFile:T,isDate:F,isFileAdded:P}=(0,p.useCorporateGiftingInput)({errorMessage:x,name:r,setTouched:a,setValue:n,type:C,value:t,fileName:_});return(0,s.jsxs)("div",Object.assign({className:c},{children:[(0,s.jsxs)("div",Object.assign({className:(0,i.cx)(u,y&&d)},{children:[(0,s.jsx)("label",Object.assign({className:(0,i.cx)(g,(I||P)&&w,T&&m),htmlFor:S},{children:(0,s.jsx)("span",Object.assign({style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block",width:"100%",maxHeight:"18px"},className:"no-translate"},{children:e}))})),(0,s.jsx)("input",{onChange:L,value:"string"==typeof t?t:void 0,className:(0,i.cx)(b,F&&f,I&&v),type:C,onFocus:B,onBlur:N,autoComplete:"no",accept:"image/png, image/jpeg, image/svg, image/jpg, image/webp"}),T&&(0,s.jsx)("span",Object.assign({style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block",maxWidth:"75%",maxHeight:"18px"},className:(0,i.cx)(h,P&&j)},{children:_})),T&&(0,s.jsx)(o.UploadIcon,{}),F&&(0,s.jsx)(l.CalendarIcon,{})]})),y&&(0,s.jsx)("p",Object.assign({class:O},{children:x}))]}))}},258:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingProgress=void 0;const s=t(0),n=t(1),i=a(t(743)),o=t(2),{wrapper:l,wrapperProgress:p,wrapperProgressLine:c,wrapperProgressLineComplete:u,wrapperProgressLineCompleteOne:d,wrapperProgressLineCompleteTwo:g,wrapperProgressLineCompleteThree:b,wrapperProgressCircle:f,wrapperProgressCircleActive:v,wrapperLabels:w,wrapperLabelsStep:m,wrapperLabelsStepActive:h}=i.default;r.CorporateGiftingProgress=({progressLabels:e,step:r})=>4===r?(0,s.jsx)(n.Fragment,{}):(0,s.jsxs)("div",Object.assign({className:l},{children:[(0,s.jsxs)("div",Object.assign({className:p},{children:[(0,s.jsx)("span",{className:c}),(0,s.jsx)("span",{className:(0,o.cx)(u,1===r&&d,2===r&&g,3===r&&b)}),Array.from({length:3},((e,r)=>r+1)).map((e=>(0,s.jsx)("span",Object.assign({className:(0,o.cx)(f,"no-translate",e<=r&&v)},{children:e}),e)))]})),(0,s.jsx)("div",Object.assign({className:w},{children:e.map(((e,t)=>(0,s.jsx)("span",Object.assign({className:(0,o.cx)(m,"no-translate",t+1<=r&&h)},{children:e}),e)))}))]}))},741:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.useCorporateGiftingSelect=void 0;const a=t(3),s=t(83);r.useCorporateGiftingSelect=({name:e,setTouched:r,setValue:t,value:n})=>{const[i,o]=(0,a.useState)(!1),l=(0,a.useRef)(null);return(0,a.useEffect)((()=>{o(!1)}),[n]),(0,s.useOnClickOutside)(l,(()=>o(!1))),{handleChange:r=>{o(!1),t({fieldName:e,value:r})},handleClick:()=>{r(e),o(!i)},mainRef:l,isOpened:i}}},256:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingSelect=void 0;const s=t(0),n=(t(1),a(t(740))),i=t(2),o=t(12),l=t(741),{wrapper:p,wrapperActive:c,wrapperLabel:u,wrapperLabelActive:d,wrapperLabelOpened:g,wrapperSelect:b,wrapperSelectActive:f,wrapperOptions:v,wrapperOptionsActive:w,wrapperOptionsOption:m,wrapperIcon:h,wrapperIconActive:j}=n.default;r.CorporateGiftingSelect=({label:e,name:r,value:t,setTouched:a,setValue:n,options:O})=>{const{handleChange:x,handleClick:C,mainRef:_,isOpened:S}=(0,l.useCorporateGiftingSelect)({name:r,setTouched:a,setValue:n,value:t});return(0,s.jsxs)("div",Object.assign({ref:_,className:(0,i.cx)(p,S&&c),onClick:C},{children:[(0,s.jsx)("label",Object.assign({className:(0,i.cx)(u,t&&d,S&&!t&&g)},{children:(0,s.jsx)("span",{children:e})})),(0,s.jsx)("div",Object.assign({className:(0,i.cx)(b,t&&f)},{children:(0,s.jsx)("span",{children:t})})),(0,s.jsx)("div",Object.assign({className:(0,i.cx)(v,S&&w)},{children:O.map((e=>(0,s.jsx)("div",Object.assign({className:m,onClick:()=>x(e)},{children:e}),e)))})),(0,s.jsx)("div",Object.assign({className:(0,i.cx)(h,S&&j)},{children:(0,s.jsx)(o.DropdownIcon,{})}))]}))}},739:(e,r,t)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.useCorporateGiftingTextArea=void 0;const a=t(3);r.useCorporateGiftingTextArea=({name:e,setTouched:r,setValue:t,value:s})=>{const[n,i]=(0,a.useState)(!1);return{isActive:(null==s?void 0:s.toString())||n,handleBlur:()=>{i(!1)},handleFocus:()=>{i(!0),r(e)},handleChange:r=>{t({fieldName:e,value:r.currentTarget.value})}}}},255:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGiftingTextArea=void 0;const s=t(0),n=(t(1),a(t(738))),i=t(2),o=t(739),{wrapper:l,wrapperLabel:p,wrapperTextArea:c,wrapperTextAreaActive:u,wrapperLabelActive:d}=n.default;r.CorporateGiftingTextArea=({label:e,name:r,value:t,setTouched:a,setValue:n,id:g})=>{const{handleBlur:b,handleChange:f,handleFocus:v,isActive:w}=(0,o.useCorporateGiftingTextArea)({name:r,setTouched:a,setValue:n,value:t});return(0,s.jsxs)("div",Object.assign({className:l},{children:[(0,s.jsx)("label",Object.assign({className:(0,i.cx)(p,w&&d),htmlFor:g},{children:(0,s.jsx)("span",{children:e})})),(0,s.jsx)("textarea",{onChange:f,value:t,className:(0,i.cx)(c,w&&u),onFocus:v,onBlur:b,autoComplete:"no"})]}))}},172:function(e,r,t){var a=this&&this.__awaiter||function(e,r,t,a){return new(t||(t=Promise))((function(s,n){function i(e){try{l(a.next(e))}catch(e){n(e)}}function o(e){try{l(a.throw(e))}catch(e){n(e)}}function l(e){var r;e.done?s(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(i,o)}l((a=a.apply(e,r||[])).next())}))},s=this&&this.__rest||function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(a=Object.getOwnPropertySymbols(e);s{const[e,r]=(0,i.useState)(o.initialFormState),t=()=>{r((e=>Object.assign(Object.assign({},e),{step:e.step+1})))},l=(e,t)=>{r((r=>Object.assign(Object.assign({},r),{[e]:Object.assign(Object.assign({},r[e]),{errorMessage:t})})))},p=r=>{if(r)return r.map((r=>(0,o.validateField)(r,e,l))).every(Boolean);{const{step:r,variantIds:t}=e,a=s(e,["step","variantIds"]);return Object.keys(a).map((r=>(0,o.validateField)(r,e,l))).every(Boolean)}};return{formState:e,next:t,prev:()=>{r((e=>Object.assign(Object.assign({},e),{step:e.step-1})))},setValue:({fieldName:e,value:t})=>{r((r=>Object.assign(Object.assign({},r),{[e]:Object.assign(Object.assign({},r[e]),{value:t})})))},setTouched:t=>{var a;(null===(a=e[t])||void 0===a?void 0:a.isTouched)||r((e=>Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},e[t]),{isTouched:!0})})))},setError:l,addVariantId:e=>{r((r=>Object.assign(Object.assign({},r),{variantIds:[...r.variantIds,e]})))},removeVariantId:e=>{r((r=>Object.assign(Object.assign({},r),{variantIds:r.variantIds.filter((r=>r!==e))})))},validateForm:p,submitForm:()=>a(void 0,void 0,void 0,(function*(){if(p()){const r={fields:{"Full name":e.fullName.value,Date:e.date.value,Company:e.company.value,Email:e.email.value,"Zip code":e.zipCode.value,Logo:e.logo.value,Message:e.message.value,Phone:e.phone.value,Quantity:Number(e.quantity.value),"How did you hear":e.howDidYouHear.value,Variants:JSON.stringify(e.variantIds)}};yield n.getLazyState("airtableData",{data:e.logo.value?{formData:r,logoFile:{base64:yield(0,o.fileToBase64)(e.logo.value),fileName:e.logo.value.name,fileType:e.logo.value.type}}:{formData:r}}),t()}else console.log("Not VALID")}))}}},248:function(e,r,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.CorporateGifting=void 0;const s=t(0),n=t(1),i=a(t(726)),o=t(249),l=t(250),p=t(172),{}=i.default;r.CorporateGifting=({corporateGiftingHero:e,corporateGiftingForm:r,colorOrder:t,currentVariant:a,variants:i})=>{const c=(0,p.useForm)();return(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)(o.CorporateGiftingHero,Object.assign({},e,{isLastStep:4===c.formState.step})),(0,s.jsx)(l.CorporateGiftingForm,Object.assign({},c,r,{colorOrder:t,currentVariant:a,variants:i}))]})}},745:(e,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.base64ToFile=r.fileToBase64=r.validateField=r.initialFormState=void 0;const t={isTouched:!1,errorMessage:""};r.initialFormState={step:1,variantIds:[],company:Object.assign({value:"",isRequired:!0},t),date:Object.assign({value:"",isRequired:!0},t),email:Object.assign({value:"",isRequired:!0},t),howDidYouHear:Object.assign({value:"",isRequired:!1},t),logo:Object.assign({value:null,isRequired:!1},t),message:Object.assign({value:"",isRequired:!1},t),fullName:Object.assign({value:"",isRequired:!0},t),phone:Object.assign({value:"",isRequired:!0},t),quantity:Object.assign({value:"",isRequired:!0},t),zipCode:Object.assign({value:"",isRequired:!1},t)};const a=e=>{return`${r=e,r.replace(/[A-Z]/g,(e=>` ${e}`))} is required.`;var r};r.validateField=(e,r,t)=>{if("phone"===e){if(r[e].isTouched){if(!r[e].value)return!0;const a=/^[0-9]+$/.test(r[e].value);return t(e,a?"":"Only numbers are available."),a}return t(e,a(e)),!1}if("fullName"===e){if(r[e].isTouched){if(!r[e].value)return!0;const a=/^[a-zA-Z ]+$/.test(r[e].value);return t(e,a?"":"Only letters are available."),a}return t(e,a(e)),!1}if("logo"===e){if(!r[e].value)return!0;const a=r[e].value.size>26214400;return t(e,a?"Max file size is 25MB.":""),!a}if("email"===e){if(r[e].isTouched){const a=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(r[e].value);return t(e,a?"":"Incorrect email address."),a}return t(e,a(e)),!1}if("date"===e){if(r[e].isTouched){const a=new Date,s=new Date(r[e].value)0;return t(e,s?"":a(e)),s}return t(e,a(e)),!1},r.fileToBase64=e=>new Promise(((r,t)=>{const a=new FileReader;a.onload=()=>{const e=a.result.split(",")[1];r(e)},a.onerror=e=>{t(e)},a.readAsDataURL(e)})),r.base64ToFile=(e,r,t)=>{const a=atob(e),s=new Uint8Array(a.length);for(let e=0;e{t.r(r),t.d(r,{ViewportObserver:()=>i,useObserver:()=>n});var a=t(1),s=t(3);const n=e=>{const[r,t]=(0,s.useState)((null==e?void 0:e.defaultInView)||!1),a=(0,s.useRef)(),n=(0,s.useRef)(),i=(0,s.useRef)();return window&&!a.current&&(a.current=new IntersectionObserver((e=>{n.current=e[0],t(e[0].isIntersecting)}),Object.assign(Object.assign({},e),{root:i.current}))),(0,s.useEffect)((()=>{n.current?(null==e?void 0:e.triggerOnce)&&i.current&&a.current.unobserve(i.current):a.current.observe(i.current)}),[i,r,e]),[i,r,n.current]},i=({render:e,options:r,as:t="div"})=>{const[s,i,o]=n(r);return(0,a.h)(t,{ref:s},e({inView:i,entry:o}))}}},e=>{e.O(0,[1,2,4,3,5,6,8,17,25],(()=>(724,e(e.s=724)))),e.O()}]);