1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2571],{34728:function(e,l,o){var t=o(3827);o(64090);var i=o(74404),n=o.n(i),s=o(20703),r=o(68605);let d=e=>{let{id:l="checkbox",label:o="",labelPlacement:i="right",labelColor:n="",isDisabled:d=!1,activeColor:a="",onChange:c=()=>{},isChecked:u=!1,parentClass:v="",...p}=e;return(0,t.jsxs)("label",{className:"".concat(v," ").concat((e=>{switch(e){case"left":return"flex items-center gap-3 flex-row-reverse";case"top":return"flex items-center gap-3 flex-col-reverse";case"bottom":return"flex items-center gap-3 flex-col";case"largeGap":return"flex items-center gap-10 text-[12px]";default:return"flex items-center gap-3"}})(i)," relative"),htmlFor:"checkbox-".concat(l),children:[(0,t.jsx)("input",{type:"checkbox",id:"checkbox-".concat(l),className:"relative appearance-none w-[17px] h-[17px] border-[1.5px] border-grey rounded-[2px] ".concat(d?"bg-gray-200":""," \n cursor-pointer checked:bg-fnp-300 checked:border-lightOliveGreen\n checked:after:text-sm checked:text-white-900\n checked:after:absolute checked:after:top-1/2 checked:after:left-1/2\n checked:after:-translate-x-2/4 checked:after:-translate-y-2/4"),name:"checkbox",disabled:d,onChange:c,checked:u,...p}),u&&(0,t.jsx)("div",{className:"absolute flex h-[18px] w-[18px] items-center justify-center",children:(0,t.jsx)(s.default,{className:"brightness-[7]",src:(0,r.m_)("/icons/checkbox-icon.svg"),width:18,height:18,alt:"checkbox-icon"})}),o&&(0,t.jsx)("span",{className:"cursor-pointer ".concat(u?a:n," hover:font-600 hover:text-fnp-500"),children:o})]})};d.propTypes={id:n().string,label:n().string,labelPlacement:n().string,labelColor:n().string,isDisabled:n().bool,activeColor:n().string,isChecked:n().bool,onChange:n().func,parentClass:n().string},l.Z=d},62571:function(e,l,o){o.r(l),o.d(l,{default:function(){return eG}});var t=o(3827),i=o(74404),n=o.n(i),s=o(64090),r=o(8792),d=o(70503),a=o(91328),c=o(86183),u=o(86965),v=o(30828),p=o(60385),f=o(86810),g=o(44923),h=o(80083),E=o(68605),S=o(79882),m=o(1729),x=o(47907),R=o(10006),_=o(32412),C=o(73175),D=o(64327),b=o(36510),A=o(43046);let y=e=>{let{children:l,basic:o="basis-[calc(50%-0.5rem)]",className:i=""}=e;return(0,t.jsx)("div",{className:"".concat(o," ").concat(i),children:l})};y.propTypes={children:n().node,basic:n().string,className:n().string};var I=o(12769),O=o(32131);let N=e=>{let{isOpen:l,isHideRadio:o=!1,onSelectAddressType:i,addressDetails:n}=e;return(0,t.jsx)("div",{className:"flex flex-col flex-wrap gap-16 ".concat(l?"px-20 sm:flex-col":"px-0 sm:flex-row"),children:(0,t.jsx)(y,{children:o?"":(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.default,{Tag:"p",classes:"mb-4 leading-20 text-14 font-600 text-fnp-500 sm:text-14",children:_.rd}),(0,t.jsx)("div",{className:"flex gap-10 pb-16 pt-10",children:null===I.AK||void 0===I.AK?void 0:I.AK.map((e,l)=>(0,t.jsx)("div",{className:"px-10",onClick:()=>i(e),children:(0,t.jsx)(O.Z,{isChecked:(null==n?void 0:n[I.o4.ADDRESS_TYPE])===e.value,id:l+1,styles:"gap-4 pl-0 text-14",label:null==e?void 0:e.name,labelPlacement:"right",name:null==e?void 0:e.value},l)},l))}),(null==n?void 0:n[I.o4.ADDRESS_TYPE])===I.lC.OFFICE?(0,t.jsxs)("div",{className:"align-center mb-24 flex gap-4",children:[(0,t.jsx)(c.default,{src:"/icons/info-circle-blue.svg",alt:"Page Not Found",width:16,height:16}),(0,t.jsx)(a.default,{Tag:"p",classes:"text-12 text-grey-500 font-500 ",children:_.Jw})]}):""]})})})};N.propTypes={isOpen:n().bool,isHideRadio:n().bool,onSelectAddressType:n().func,addressDetails:n().object};var M=o(7580),L=o(7123),j=o(74468);let w=e=>{let{isOpen:l,addressDetails:o,onGetInputValue:i}=e,{catalogId:n,visitedCountry:s,countryListData:r}=(0,v.v9)(e=>{var l,o,t,i;return{catalogId:(null==e?void 0:null===(l=e.appConfig)||void 0===l?void 0:l.catalogId)||(null==e?void 0:null===(o=e.locationLock)||void 0===o?void 0:o.selectedCountryFromList)||"",visitedCountry:(null==e?void 0:null===(t=e.locationLock)||void 0===t?void 0:t.visitedCountry)||{},countryListData:(null==e?void 0:null===(i=e.locationLock)||void 0===i?void 0:i.countryListData)||[]}}
1,v.wU),d=(0,L.hn)({addressDetails:o,visitedCountry:s,countryListData:r,catalogId:n}),c=(0,L.Ni)({catalogId:n,countryId:(null==o?void 0:o.countryGeoId)||(null==s?void 0:s.countryId)}),u=(e,l)=>{let t={[I.o4.MOBILE_NUMBER]:()=>{if(e){let l=(null==o?void 0:o.countryGeoId)==="IND"?10===e.length:e.length>=7&&e.length<=15;i(I.o4.MOBILE_NUMBER_ERROR,!l),i(I.o4.MOBILE_NUMBER_ERROR_MSG,l?"":"Please enter valid number")}else i(I.o4.MOBILE_NUMBER_ERROR,!0),i(I.o4.MOBILE_NUMBER_ERROR_MSG,_._u)},[I.o4.TO_NAME]:()=>{i(I.o4.TO_NAME_ERROR,!e),i(I.o4.TO_NAME_ERROR_MSG,e?"":_._u)},[I.o4.EMAIL]:()=>{let l=M.Z.checkEmail.test(e);c?e.length?(i(I.o4.EMAIL_ERROR,!l),i(I.o4.EMAIL_ERROR_MSG,l?"":"Please enter valid email")):(i(I.o4.EMAIL_ERROR,!0),i(I.o4.EMAIL_ERROR_MSG,_._u)):e.length&&(i(I.o4.EMAIL_ERROR,!l),i(I.o4.EMAIL_ERROR_MSG,l?"":"Please enter valid email"))}};t[l]&&t[l]()},p=(e,l)=>{let o=e.target.value;(l!==I.o4.MOBILE_NUMBER||M.Z.onlyNumbers.test(o))&&(u(o,l),i(l,o))},f=(e,l)=>{u(e.target.value,l)};return(0,t.jsx)("div",{className:"sm-border-b-0 ".concat(l?"px-20":"px-0"," pb-16"),children:(0,t.jsxs)("div",{className:"flex flex-col flex-wrap gap-16 ".concat(l?"sm:flex-col":"sm:flex-row"),children:[(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{id:I.o4.TO_NAME,label:_.Yj.RECEIVERS_NAME,type:"text",name:I.o4.TO_NAME,onBlur:e=>f(e,I.o4.TO_NAME),inputValue:null==o?void 0:o[I.o4.TO_NAME],onChange:e=>p(e,I.o4.TO_NAME),isError:null==o?void 0:o[I.o4.TO_NAME_ERROR],message:null==o?void 0:o[I.o4.TO_NAME_ERROR_MSG],variant:"primary",autoFocus:!1,isFromCheckout:!0})}),(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{id:I.o4.MOBILE_NUMBER,label:_.Yj.RECEIVERS_MOBILE,type:"tel",name:I.o4.MOBILE_NUMBER,hasStartDivider:!0,inputValue:null==o?void 0:o[I.o4.MOBILE_NUMBER],onBlur:e=>f(e,I.o4.MOBILE_NUMBER),isError:null==o?void 0:o[I.o4.MOBILE_NUMBER_ERROR],message:null==o?void 0:o[I.o4.MOBILE_NUMBER_ERROR_MSG],autoFocus:!1,isFromCheckout:!0,onChange:e=>p(e,I.o4.MOBILE_NUMBER),variant:"primary",classes:"pl-[68px]",maxW:"max-w-[90%] left-80",startAdornmentPadding:"pl-10 pr-8 min-w-[72px] max-w-[72px]",labelParentClass:"left-[60px] pl-8",startAdornment:(0,t.jsx)(a.default,{classes:"text-14 font-600 text-grey-400 ml-4",Tag:"p",children:"+".concat(d)})})}),(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{type:"email",id:I.o4.EMAIL,label:c?_.Yj.RECEIVERS_EMAIL:_.Yj.RECEIVERS_EMAIL_OPTIONAL,name:I.o4.EMAIL,isError:null==o?void 0:o[I.o4.EMAIL_ERROR],message:null==o?void 0:o[I.o4.EMAIL_ERROR_MSG],inputValue:null==o?void 0:o[I.o4.EMAIL],onChange:e=>p(e,I.o4.EMAIL),onBlur:e=>f(e,I.o4.EMAIL),variant:"primary",isFromCheckout:!0})})]})})};w.propTypes={isOpen:n().bool,addressDetails:n().object,onGetInputValue:n().func};var T=o(23338),k=o(85414),P=o(23395),G=o(27579);let F=e=>{let{onEditAddressClick:l,address:o,index:i,addressArray:n,styles:s="",selectedId:r,onAddressClick:d,selectedAddressContactMechId:c,isDefaultSelectionDisabled:u=!1,isInternationalProduct:v=!1,serviceabilityError:p="",serviceabilityWarning:f="",onExploreAvailableProducts:g}=e,{toName:h,address1:E,address2:S,addressType:m,city:x,mobileNumber:R,contactMechId:D,postalCode:b}=o,A=f===G.iR,y=u?!!c&&D===c:D===c||0===i&&(n.some(e=>e.contactMechId===c)?D===c:D===r),I=!!p,N=!!f;return(0,t.jsxs)("div",{className:"flex flex-col ".concat(I&&g?"rounded-16 bg-red-100/10":""),children:[(0,t.jsxs)("div",{className:"flex gap-12 rounded-16 border-1 bg-white-900 p-12 transition-all duration-200 ".concat(I?"border-red":y?"border-lightGreen":"border-thinLightGrey"," ").concat(s),onClick:()=>{d(D,b)},children:[(0,t.jsx)("div",{children:(0,t.jsx)(O.Z,{isChecked:y})}),(0,t.jsxs)("div",{className:"flex w-full flex-col gap-8",children:[(0,t.jsxs)("div",{className:"flex w-full justify-between",children:[(0,t.jsxs)("div",{className:"flex w-full justify-start gap-12",children:[(0,t.jsx)(a.default,{Tag:"p",classes:"font-600 text-14 text-fnp-500",children:h}),(0,t.jsx)(a.default,{Tag:"p",classes:"font-600 text-10 text-grey-400 bg-grey-25 px-6 py-2 rounded-[12px] leading-[21px]",children:m})]}),(0,t.jsx)("div",{className:"relative flex-shrink-0",children:(0,t.jsx)("button",{type:"button","aria-label":"Address o
1ptions","aria-haspopup":"menu",className:"flex h-24 w-24 cursor-pointer items-center justify-center rounded-8 border-1 border-greySoft",onClick:e=>{e.stopPropagation(),l(o,e)},children:(0,t.jsx)(T.l,{size:16,color:"#757575",weight:"bold"})})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(a.default,{Tag:"p",classes:"font-500 text-12 text-grey-500",children:"".concat((0,_.VU)(E)," ").concat((0,_.VU)(S)," ").concat(v?x:(0,_.VU)(x," - ")," ").concat(v?"":(0,_.VU)(b,""))}),(0,t.jsx)(a.default,{Tag:"p",classes:"font-500 text-12 text-grey-500",children:"Mobile: ".concat(R)})]})]})]}),I?(0,t.jsxs)("div",{className:"mt-8 flex flex-col gap-12 ".concat(I&&g?"px-12 pb-12":""),children:[(0,t.jsxs)("div",{className:"flex items-start gap-8",children:[(0,t.jsx)(k.a,{size:16,weight:"fill",className:"mt-2 flex-shrink-0 text-red-100","aria-hidden":"true"}),(0,t.jsx)(a.default,{Tag:"p",classes:"text-12 font-400 leading-16 text-red-100",children:p})]}),g?(0,t.jsx)(C.default,{size:"medium",buttonVariant:"outlined",label:G._G.SHOW_SIMILAR,id:"explore-available-products-saved-address",onClick:e=>{var l;null==e||null===(l=e.stopPropagation)||void 0===l||l.call(e),null==g||g()},classes:"w-full",btnParentClasses:"w-full","aria-label":G._G.SHOW_SIMILAR,backGroundColor:"[&&]:border-greySoft"}):null]}):null,N?(0,t.jsxs)("div",{className:"mt-8 flex items-center gap-4",children:[A?(0,t.jsx)(P.s,{size:16,weight:"fill",className:"flex-shrink-0 text-blue-100","aria-hidden":"true"}):(0,t.jsx)(k.a,{size:16,weight:"fill",className:"mt-2 flex-shrink-0 text-[#1069FE]","aria-hidden":"true"}),(0,t.jsx)(a.default,{Tag:"p",classes:A?"text-12 text-blue-100 font-500 leading-20":"text-12 font-400 leading-16 text-[#1069FE]",children:f})]}):null]})};F.propTypes={onEditAddressClick:n().func,index:n().number,styles:n().string,selectedId:n().string,onAddressClick:n().func,addressArray:n().array,selectedAddressContactMechId:n().string,isDefaultSelectionDisabled:n().bool,address:n().shape({salutation:n().string,toName:n().string,address1:n().string,address2:n().string,addressType:n().string,altRecpNumber:n().string,altRecpTeleCode:n().string,city:n().string,mobileNumber:n().string,contactMechId:n().string,postalCode:n().string}),isInternationalProduct:n().bool,serviceabilityError:n().string,serviceabilityWarning:n().string,onExploreAvailableProducts:n().func};var B=o(20258),V=o.n(B),Y=o(16131),U=o(50915),Z=o(59653),W=o(17805);let z=e=>{let{count:l=2}=e;return(0,t.jsx)("div",{className:"flex flex-col gap-12",role:"status","aria-live":"polite","aria-label":"Loading saved addresses",children:Array.from({length:l},(e,l)=>(0,t.jsxs)("div",{className:"flex min-h-[88px] gap-12 rounded-16 border-1 border-thinLightGrey p-12","aria-hidden":"true",children:[(0,t.jsx)("div",{className:"h-20 w-20 flex-shrink-0 animate-pulse rounded-full bg-gray-300"}),(0,t.jsxs)("div",{className:"flex w-full flex-col gap-8",children:[(0,t.jsxs)("div",{className:"flex w-full justify-between gap-12",children:[(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-12",children:[(0,t.jsx)("div",{className:"h-14 w-24 animate-pulse rounded bg-gray-300"}),(0,t.jsx)("div",{className:"h-20 w-16 animate-pulse rounded-[12px] bg-gray-300"})]}),(0,t.jsx)("div",{className:"h-24 w-24 flex-shrink-0 animate-pulse rounded bg-gray-300"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"h-12 w-full animate-pulse rounded bg-gray-300"}),(0,t.jsx)("div",{className:"h-12 w-[75%] animate-pulse rounded bg-gray-300"}),(0,t.jsx)("div",{className:"h-12 w-32 animate-pulse rounded bg-gray-300"})]})]})]},"saved-address-skeleton-".concat(l)))})};z.propTypes={count:n().number};let H=()=>(0,t.jsxs)("div",{className:"mb-16 flex flex-col items-center justify-center px-24 text-center",children:[(0,t.jsx)(c.default,{alt:"address not saved",src:"/icons/location-map.png",width:160,height:100,sizes:"10vw",isPriority:!1}),(0,t.jsx)(a.default,{Tag:"p",classes:"text-14 leading-20 font-600 text-grey-500",children:_.u2}),(0,t.jsx)(a.default,{Tag:"p",classes:"mt-4 text-12 leading-16 font-400 text-grey-400",children:_.H0})]}),K=e=>{let{isMobile:l,isEditable:o,onAddressDrawerArrowClose:i,activeGiftIndex:n,activeAddressData:r,giftItem:c,allAddressList:u,cartItemIndex:p,isOpen:f,onGetInputValue:g,separateForms:h,onSelectAddressType:S,onAddAddress:m,onEditAddressCl
1ick:x,onAddressClick:R,selectedAddressContactMechId:y,isToast:O,onSaveAddress:M,locationLockAddressList:L,isLocationLockMode:j=!1,isAddAddressDrawerOpen:T=!1,onAddAddressDrawerClose:k,isEditAddressDrawerOpen:P=!1,onEditAddressDrawerClose:G,isOrderingForSelfChecked:B=!1,onOrderingForSelfChange:K,onOrderingForSelfClick:q,isFromCheckout:J=!1,isFromPDP:Q=!1,confirmButtonId:$,serviceabilityErrorMessage:X="",serviceabilityErrorContactMechId:ee="",serviceabilityWarningMessage:el="",serviceabilityWarningContactMechId:eo="",onExploreAvailableProducts:et}=e,ei={Tag:"p",classes:"w-full flex items-center flex-shrink-0 font-600 text-16 text-fnp-500"},{addressPurposeType:en}=c,{completeCartDetails:es,isAddressLoading:er,isSavedAddressesLoading:ed,savedAddresses:ea}=(0,v.v9)(e=>{var l,o;return{completeCartDetails:e.deliveryAddress.completeCartDetails||{},isAddressLoading:e.deliveryAddress.isAddressLoading,isSavedAddressesLoading:null===(l=e.savedAddress)||void 0===l?void 0:l.isSavedAddressesLoading,savedAddresses:null===(o=e.savedAddress)||void 0===o?void 0:o.savedAddresses}},v.wU),ec=(0,s.useMemo)(()=>{var e,l,o,t,i,s,r;let d=V()(L)?L:null==es?void 0:null===(o=es.orderList[n])||void 0===o?void 0:null===(l=o.giftItem)||void 0===l?void 0:null===(e=l.savedAddress)||void 0===e?void 0:e.addressList;if(!V()(d)||!d.length)return d;let a=null==es?void 0:null===(i=es.orderList)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.giftItem,c=String((null==a?void 0:null===(s=a.mainproduct)||void 0===s?void 0:s.pincode)||(null==a?void 0:null===(r=a.selectedAddressDetails)||void 0===r?void 0:r.postalDtlsOfContactMechIdPostalCode)||"").trim();if(!c)return d;let u=[],v=[];return d.forEach(e=>{String((null==e?void 0:e.postalCode)||(null==e?void 0:e.postalcode)||"").trim()===c?u.push(e):v.push(e)}),[...u,...v]},[L,n,null==es?void 0:es.orderList]),eu=j&&ed&&(!V()(ea)||0===ea.length),ev=T||P,ep=o||P,ef=j&&(o||ev||!!y),eg=()=>(0,t.jsxs)(t.Fragment,{children:[er&&!j?(0,t.jsx)(D.Z,{}):"",(0,t.jsxs)("div",{className:j?"min-h-0 flex-1 overflow-y-auto":"",children:[K?(0,t.jsx)(U.Z,{isMobile:l,onChange:K,onClick:q,isChecked:B,checkboxId:"address-form-order-for-myself"}):"",(0,t.jsx)(w,{addressDetails:ep?r:u[p],isOpen:f,cartItemIndex:p,onGetInputValue:g,isMobile:l}),(0,t.jsx)("div",{className:"".concat(f?"px-20":"px-0"," pb-20"),children:h()}),(0,t.jsx)("div",{children:(0,t.jsx)(N,{isOpen:f,cartItemIndex:p,onSelectAddressType:S,addressDetails:ep?r:u[p],isHideRadio:en===I.fy})})]})]});return(0,t.jsxs)("div",{className:"flex flex-col rounded-8 p-0 ".concat((null==ea?void 0:ea.length)<3?"min-h-[60dvh]":""," ").concat(j?"min-h-0 flex-1 overflow-hidden":"h-full justify-between"),children:[(0,t.jsxs)("div",{className:"flex flex-col ".concat(j?"min-h-0 flex-1 overflow-hidden":"h-full"),children:[!j&&(0,t.jsxs)("div",{className:"flex items-center justify-start ".concat("px-16 py-10 sm:flex border-b border-lightGrey shadow-faint "),children:[o||l?(0,t.jsx)(d.Z,{labelColor:"w-full font-normal",classes:"py-2",imgWidth:16,imgHeight:20,onClick:i,iconSrc:"/icons/left-arrow.svg"}):"",(0,t.jsx)(a.default,{...ei,classes:"".concat(ei.classes," pl-10"),children:V()(ec)?o?(null==r?void 0:r.selectedContactMechId)==="newaddress"?_.m4:_.KD:_.KV:_.m4})]}),(0,t.jsx)("div",{className:j?"flex min-h-0 flex-1 flex-col overflow-hidden ".concat(J?"pt-0":"pt-12"):"h-full ".concat(j?"max-h-[40vh]":"max-h-[calc(100vh-117px)]"," overflow-auto"),children:o&&!j?eg():j&&(0,t.jsxs)(t.Fragment,{children:[V()(ec)&&ec.length>0&&(0,t.jsx)("div",{className:"flex items-center px-16 pb-12 pt-4",children:(0,t.jsx)(C.default,{buttonVariant:"iconWithTextOutlined",size:"customForPDP",icon:(0,t.jsx)(W.p,{size:20,className:"text-fnp-300"}),iconStyleWidth:20,iconStyleHeight:20,classes:"text-fnp-300 border-1 border-greySoft w-full px-12 text-14 leading-20 font-600 whitespace-nowrap rounded-8",label:_.lD,onClick:m,btnParentClasses:"w-full",labelStyle:"text-12 font-600"})}),(0,t.jsx)("div",{className:"scrollbar-thumb-grey-300 scrollbar-track-transparent flex min-h-0 flex-1 flex-col gap-12 overflow-y-auto px-16 pb-8 scrollbar-thin",children:eu?(0,t.jsx)(z,{}):V()(ec)&&ec.length>0?ec.map((e,l,o)=>{var i;
1return(0,t.jsx)(F,{address:e,onEditAddressClick:x,index:l,addressArray:o,onAddressClick:R,selectedAddressContactMechId:y,selectedId:j?"":null===(i=ec[0])||void 0===i?void 0:i.contactMechId,isDefaultSelectionDisabled:j,isInternationalProduct:(null==e?void 0:e.countryGeoId)!=="IND",serviceabilityError:X&&ee===e.contactMechId?X:"",serviceabilityWarning:el&&eo===e.contactMechId?el:"",...X&&ee===e.contactMechId&&et?{onExploreAvailableProducts:et}:{}},e.contactMechId||e.postalAddress||"saved-address-".concat(l))}):(0,t.jsxs)("div",{className:"my-auto",children:[(0,t.jsx)(H,{}),!(V()(ec)&&ec.length)&&(0,t.jsx)("div",{className:"flex items-center px-16 pb-12 pt-4",children:(0,t.jsx)(C.default,{buttonVariant:"iconWithTextOutlined",size:"customForPDP",icon:(0,t.jsx)(W.p,{size:20,className:"text-fnp-300",weight:"bold"}),iconStyleWidth:20,iconStyleHeight:20,classes:"text-fnp-300 border-1 border-greySoft w-full px-12 text-14 leading-20 font-600 whitespace-nowrap rounded-8",label:_.lD,onClick:m,btnParentClasses:"w-full",labelStyle:"text-12 font-600"})})]})}),(()=>{if(!ev)return"";let e=()=>(0,t.jsx)(A.default,{position:l?"bottom":"right",isCleanUp:!1,isPreventUnlockBody:!0,isOpen:ev,onDrawerClose:P?G:k,headingText:P?_.KD:_.m4,customWidth:"w-full",styles:l?"max-h-[90dvh] flex flex-col rounded-t-24 px-0 py-0":"min-w-[360px] max-w-[400px] xll:max-w-[532px] xl:max-w-[400px] p-0 h-full",isDrawerCustomStyles:!0,childContainerClass:l?"flex h-full min-h-0 flex-col overflow-hidden rounded-t-24":"",isHideCloseBtn:Q,isBackButtonEnabled:Q,children:(0,t.jsxs)("div",{className:(0,E.Y1)("flex min-h-0 flex-col overflow-hidden",l?"h-full flex-1":"flex-1",J&&!l&&"h-[100vh] max-h-[calc(100vh-57px)]"),children:[eg(),(0,t.jsx)("div",{className:(0,E.Y1)("flex-shrink-0 border-t-1 border-lightGrey px-16 py-12",l&&"pb-[calc(1rem+env(safe-area-inset-bottom,0px))]"),children:(0,t.jsx)(C.default,{size:"medium",buttonTextSize:"large",buttonVariant:"filled",label:_.he,onClick:M,btnParentClasses:"flex w-full items-center justify-center",classes:"hover:bg-opacity-80 ease-in-out duration-300 w-full rounded-8"})})]})});return l?(0,t.jsx)(Z.Z,{rootId:Q?J?"bottom_drawer":"productInformation":"mobileLocationLock",renderOnDidMount:!0,children:e()}):(0,t.jsx)(Z.Z,{rootId:"right_drawer",renderOnDidMount:!0,children:e()})})()]})})]}),l?(0,t.jsx)(b.default,{variant:"success",isToast:O,header:_.AW,duration:3e3,isDrawer:!0}):"",(!j||ef)&&(0,t.jsx)("div",{className:"flex-shrink-0 border-t-1 border-lightGrey bg-white-900 ".concat(j?"px-16 py-12":""),children:(0,t.jsx)(C.default,{id:$,size:"medium",buttonTextSize:"large",buttonVariant:X?"disabled":"filled",label:o?_.he:j?"Confirm":Y.dR,onClick:M,isDisabled:!!X,btnParentClasses:(0,E.Y1)("flex w-full items-center justify-center mt-auto",!j&&"px-16 py-12 sm:border-t-0 border-t-1 border-lightGrey sm:static fixed bottom-0"),classes:"hover:bg-opacity-80 ease-in-out duration-300 w-full rounded-8"})})]})};K.propTypes={isMobile:n().bool,isEditable:n().bool,isOpen:n().bool,isToast:n().bool,onAddressDrawerArrowClose:n().func,onGetInputValue:n().func,onSelectAddressType:n().func,onAddAddress:n().func,onEditAddressClick:n().func,onAddressClick:n().func,onSaveAddress:n().func,locationLockAddressList:n().arrayOf(n().object),isLocationLockMode:n().bool,isAddAddressDrawerOpen:n().bool,onAddAddressDrawerClose:n().func,isEditAddressDrawerOpen:n().bool,onEditAddressDrawerClose:n().func,isOrderingForSelfChecked:n().bool,onOrderingForSelfChange:n().func,onOrderingForSelfClick:n().func,isFromCheckout:n().bool,activeGiftIndex:n().number,activeAddressData:n().object,giftItem:n().object,allAddressList:n().arrayOf(n().object),cartItemIndex:n().number,separateForms:n().func,selectedAddressContactMechId:n().string,isFromPDP:n().bool,confirmButtonId:n().string,serviceabilityErrorMessage:n().string,serviceabilityErrorContactMechId:n().string,serviceabilityWarningMessage:n().string,serviceabilityWarningContactMechId:n().string,onExploreAvailableProducts:n().func};var q=o(69819),J=o(19864),Q=o(75418);let $=e=>{let{label:l,value:o,onChange:i,name:n,suggestions:s=[],onSelectCity:r,isError:d,message:a,onBlur:c,isFromCheckout:u}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.Z,{label:l,type:"text",id:n,isError:d,message:a,inputValue:o,onChange:e=>i(e,n),autoFocus:!1,hasStartDivider:!0,onBlur:c,endAdornment:(0,t.jsx)(Q.X,{size:24,color:"#737530"}),isFromCheckout:u,endAdornmentPadding:"pr-[45px]"}),(0,t.jsx)("div",{className:"".concat((null==s?void 0:s.length)>0&&"absolute left-0 top-52 z-1 w-full rounded-8 border-1 border-greySoft bg-white-900"),children:(null==s?void 0:s.length)>0?(0,t.jsx)(J.Z,{id:"pincode-list-dropdown",suggestions:s,listValue:"description",listClass:"relative p-12 hover:bg-grey-100 border-none after:absolute after:left-1/2 after:top-0 after:h-px after:w-[92.5%] after:translate-x-[-50%] after:bg-grey-100 after:content-['']",keyname:"location-list",onClick:r,classes:"overflow-auto scrollbar-thin scrollbar-webkit max-h-[38vh] bg-white-900 border-1 border-grey-300 rounded-lg"}):(0,t.jsx)(t.Fragment,{})})]})};$.propTypes={label:n().string,value:n().string,onChange:n().func,onSelectCity:n().func,name:n().string,
1suggestions:n().arrayOf(n().object),isError:n().bool,message:n().string,onBlur:n().func,isFromCheckout:n().bool};var X=o(44843),ee=o(27833),el=o(83062);let eo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>({pincode:Object.keys(e)[0],location:e[Object.keys(e)[0]]})).reduce((e,l)=>(e.some(e=>e.pincode===l.pincode)||e.push(l),e),[])},et=async(e,l)=>{if(!(null==l?void 0:l.length)||-1===l.indexOf(e))return[];try{let l=await (0,X.VQ)((0,ee.qE)(e));return eo(l)}catch(e){return[]}},ei=e=>{let{isOpen:l,onGetInputValue:o,addressDetails:i,isPincodeInputEnabled:n=!1,serviceabilityInfoMessage:r=""}=e,[d,u]=(0,s.useState)([]),[v,p]=(0,s.useState)([]),[f,g]=(0,s.useState)([]),h=(0,s.useRef)(""),x=(0,s.useRef)([]),R=(0,s.useRef)(!1),C=m.default.getCookie(S.Yo)||"",D=m.default.getCookie(S.Tr)||"";(0,s.useEffect)(()=>{let e=document.getElementById("googleMaps"),l=q.e[Math.floor(Math.random()*q.e.length)];if(!e){let e=document.createElement("script");e.src="".concat(q.t,"?key=").concat(l,"&libraries=places"),e.id="googleMaps",document.body.appendChild(e)}(null==i?void 0:i[I.o4.POSTAL_CODE])||(null==i?void 0:i[I.o4.CITY])||!C||!D||(o(I.o4.POSTAL_CODE,C),o(I.o4.CITY,D))},[]),(0,s.useEffect)(()=>{n&&(0,el.O_)().then(e=>{g(e||[])})},[n]);let b=(0,s.useCallback)(async e=>{if(R.current){p([]);return}if(!e.length||e.length<2||!/^\d+$/.test(e)){p([]),h.current="",x.current=[];return}let l=e.slice(0,2),o=x.current;if(h.current!==l){if(o=await et(l,f),R.current)return;h.current=l,x.current=o}p((0,el.Z_)(o,e).slice(0,5))},[f]),A=(0,s.useMemo)(()=>(0,E.Ds)(b,100),[b]),O=(0,s.useCallback)(async e=>{if(e.length){let l=new window.google.maps.places.AutocompleteService;await (null==l?void 0:l.getPlacePredictions({input:e,componentRestrictions:{country:"in"},types:["geocode"]},e=>{u(e)}))}else u([])},[]),N=(0,s.useMemo)(()=>(0,E.Ds)(O,600),[O]),M=(0,s.useCallback)(async e=>{if(e){let l=new window.google.maps.places.PlacesService(document.createElement("div"));await l.getDetails({placeId:e,fields:["geometry"]},(e,l)=>{if(l===window.google.maps.places.PlacesServiceStatus.OK){let{lat:l,lng:t}=e.geometry.location;o(I.o4.LATITUDE,l()),o(I.o4.LONGITUDE,t())}})}},[o]),L=(e,l)=>{let t={[I.o4.ADDRESS_2]:()=>{N(e),e.length?(o(I.o4.ADDRESS_2_ERROR,!1),o(I.o4.ADDRESS_2_ERROR_MSG,"")):(o(I.o4.ADDRESS_2_ERROR,!0),o(I.o4.ADDRESS_2_ERROR_MSG,_._u))},[I.o4.ADDRESS_1]:()=>{e.length?(o(I.o4.ADDRESS_1_ERROR,!1),o(I.o4.ADDRESS_1_ERROR_MSG,"")):(o(I.o4.ADDRESS_1_ERROR,!0),o(I.o4.ADDRESS_1_ERROR_MSG,_._u))},[I.o4.POSTAL_CODE]:()=>{if(n){if(R.current)return;e.length>=2&&/^\d+$/.test(e)?A(e):(p([]),h.current="",x.current=[])}e.length?(o("".concat(I.o4.POSTAL_CODE,"Error"),!1),o("".concat(I.o4.POSTAL_CODE,"ErrorMsg"),"")):(o("".concat(I.o4.POSTAL_CODE,"Error"),!0),o("".concat(I.o4.POSTAL_CODE,"ErrorMsg"),_._u))}};t[l]&&t[l]()},w=(e,l)=>{let t=e.target.value;(l!==I.o4.POSTAL_CODE||!n||/^\d*$/.test(t))&&(l!==I.o4.POSTAL_CODE||!n||!(t.length>6))&&(l===I.o4.POSTAL_CODE&&n&&(R.current=!1),L(t,l),o(l,t),l===I.o4.POSTAL_CODE&&n&&!R.current&&o(I.o4.CITY,""))},T=(e,l)=>{L(e.target.value,l)};return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"flex flex-col flex-wrap gap-16 ".concat(l?"sm:flex-col":"sm:flex-row"),children:[(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{label:_.D6.RECEIVERS_FLAT,type:"text",id:I.o4.ADDRESS_1,isError:null==i?void 0:i[I.o4.ADDRESS_1_ERROR],message:null==i?void 0:i[I.o4.ADDRESS_1_ERROR_MSG],inputValue:null==i?void 0:i[I.o4.ADDRESS_1],onChange:e=>w(e,I.o4.ADDRESS_1),onBlur:e=>T(e,I.o4.ADDRESS_1),autoFocus:!1,hasStartDivider:!0,isFromCheckout:!0})}),(0,t.jsx)(y,{className:"relative",children:(0,t.jsx)($,{label:_.D6.RECEIVERS_AREA,name:I.o4.ADDRESS_2,isError:null==i?void 0:i[I.o4.ADDRESS_2_ERROR],message:null==i?void 0:i[I.o4.ADDRESS_2_ERROR_MSG],onSelectCity:e=>{u([]),M(e.place_id),o(I.o4.ADDRESS_2,e.description),o(I.o4.ADDRESS_LINE_2,e.description)},type:"text",suggestions:d,value:null==i?void 0:i[I.o4.ADDRESS_2],onChange:e=>w(e,I.o4.ADDRESS_2),onBlur:e=>T(e,I.o4.ADDRESS_2),isFromCheckout:!0})}),(0,t.jsx)(y,{basic:"w-full",className:"flex gap-16",children:(0,t.jsxs)(y,{basic:"w-full",className:"relative",children:[(0,t.jsx)(j.Z,{label:_.D6.RECEIVERS_PIN_CODE,type:"text",id:I.o4.POSTAL_CODE,inputValue:null==i?void 0:i[I.o4.POSTAL_CODE],autoFocus:!1,hasStartDivider:!0,classes:n?"":"bg-grey-100 focus:border-greySoft",readOnly:!n,isError:null==i?void 0:i["".concat(I.o4.POSTAL_CODE,"Error")],message:null==i?void 0:i["".concat(I.o4.POSTAL_CODE,"ErrorMsg")],onChange:e=>w(e,I.o4.POSTAL_CODE),onBlur:e=>T(e,I.o4.POSTAL_CODE),"aria-label":_.D6.RECEIVERS_PIN_CODE,endAdornment:(0,t.jsx)("div",{className:"text-12 font-500 text-grey-400/60",children:null==i?void 0:i[I.o4.CITY]}),isFromCheckout:!0,endAdornmentPadding:"pr-[55px]"}),n&&v.length>0?(0,t.jsx)("div",{className:"absolute left-0 top-52 z-1 w-full rounded-8 bg-white-900",children:(0,t.jsx)(J.Z,{id:"domestic-address-pincode-list",suggestions:v,keyname:"domestic-pincode-list",onClick:e=>{let{pincode:l,location:t}=e;R.current=!0,A.cancel(),p([]),o(I.o4.POSTAL_CODE,l),o(I.o4.CITY,t),o("".concat(I.o4.POSTAL_CODE,"Error"),!1),o("".concat(I.o4.POSTAL_CODE,"ErrorMsg"),"")},classes:"overflow-auto scrollbar-thin scrollbar-webkit max-h-[38vh] bg-white-900 border-1 border-grey-300 rounded-lg",listClass:"relative p-12 hover:bg-grey-100 border-none after:absolute after:left-1/2 after:top-0 after:h-px after:w-[92.5%] after:translate-x-[-50%] after:bg-grey-100 after:content-['']",startAdornment:e=>(0,t.jsx)(c.default,{src:"/icons/location-Icon.svg",sizes:"100vw",alt:"",...e})})}):"",r?(0,t.jsxs)("div",{className:"mt-8 flex items-start gap-8",children:[(0,t.jsx)(k.a,{size:16,weight:"fill",className:"mt-2 flex-shrink-0 text-[#1069FE]","aria-hidden":"true"}),(0,t.jsx)(a.default,{Tag:"p",classes:"text-12 font-400 leading-16 text-[#1069FE]",children:r})]}):null]})})]})})};
1ei.propTypes={isOpen:n().bool,addressDetails:n().object,onGetInputValue:n().func,isPincodeInputEnabled:n().bool,serviceabilityInfoMessage:n().string};var en=o(9569),es=o(27950),er=o(62476),ed=o(54618),ea=o(59177),ec=o(1053),eu=o(66239),ev=o(96333),ep=o(52426),ef=o(53702),eg=o(26449),eh=o(42630),eE=o(46976),eS=o(31410),em=o.n(eS);let ex=e=>{let{label:l,addressDetails:o,onGetInputValue:i,cityListData:n=[]}=e,[r,d]=(0,s.useState)([]),a=(0,s.useMemo)(()=>(0,E.Ds)(e=>{e.length>=2?d((0,ef.WF)(e,n,"cityName").slice(0,5)):d([])},300),[n]),u=e=>{e.length?(i(I.o4.CITY_ERROR,!1),i(I.o4.CITY_ERROR_MSG,"")):(i(I.o4.CITY_ERROR,!0),i(I.o4.CITY_ERROR_MSG,_._u))};return(0,t.jsxs)("div",{className:"relative w-full",children:[(0,t.jsx)(j.Z,{label:l,type:"text",id:I.o4.CITY,autoFocus:!1,hasStartDivider:!0,isError:null==o?void 0:o[I.o4.CITY_ERROR],message:null==o?void 0:o[I.o4.CITY_ERROR_MSG],inputValue:null==o?void 0:o[I.o4.CITY],onChange:e=>{let l=e.target.value;u(l),i(I.o4.CITY,l),i(I.o4.POSTAL_CODE,""),a(l)},onBlur:e=>u(e.target.value),"aria-label":l}),(null==r?void 0:r.length)>0?(0,t.jsx)("div",{className:"absolute left-0 top-52 z-1 w-full rounded-8 bg-white-900",children:(0,t.jsx)(J.Z,{id:"location-lock-city-list",suggestions:r,listValue:"cityName",listClass:"relative p-12 hover:bg-grey-100 border-none after:absolute after:left-1/2 after:top-0 after:h-px after:w-[92.5%] after:translate-x-[-50%] after:bg-grey-100 after:content-['']",keyname:"location-lock-city-list",onClick:e=>{d([]),i(I.o4.CITY,(null==e?void 0:e.cityName)||""),i(I.o4.POSTAL_CODE,(null==e?void 0:e.cityId)||""),i(I.o4.CITY_ERROR,!1),i(I.o4.CITY_ERROR_MSG,"")},classes:"overflow-auto scrollbar-thin scrollbar-webkit max-h-[38vh] bg-white-900 border-1 border-grey-300 rounded-lg",startAdornment:e=>(0,t.jsx)(c.default,{src:"/icons/location-Icon.svg",sizes:"100vw",alt:"",...e})})}):""]})};ex.propTypes={label:n().string,addressDetails:n().object,onGetInputValue:n().func,cityListData:n().arrayOf(n().object)};let eR=e=>{let{isOpen:l,addressDetails:o,onGetInputValue:i,isCitySuggestionsEnabled:n=!1,cityListData:r=[]}=e,d=m.default.getCookie(S.rA)||"",a=m.default.getCookie(S.kz)||"";(0,s.useEffect)(()=>{!(null==o?void 0:o[I.o4.CITY])&&a&&d&&i(I.o4.CITY,d)},[]);let c=(e,l)=>{let t=e.target.value;switch(l){case I.o4.ADDRESS_1:t.length?(i(I.o4.ADDRESS_1_ERROR,!1),i(I.o4.ADDRESS_1_ERROR_MSG,"")):(i(I.o4.ADDRESS_1_ERROR,!0),i(I.o4.ADDRESS_1_ERROR_MSG,_._u)),i(l,t);break;case I.o4.ADDRESS_2:M.Z.alphaNumericWithSpace.test(t)&&!I.T4.includes(null==o?void 0:o[I.o4.COUNTRY_GEO_ID])&&(t.length?(i(I.o4.ADDRESS_2_ERROR,!1),i(I.o4.ADDRESS_2_ERROR_MSG,"")):(i(I.o4.ADDRESS_2_ERROR,!0),i(I.o4.ADDRESS_2_ERROR_MSG,_._u)),t.length<=(0,L.jQ)(o.countryGeoId)&&i(l,t));break;default:i(l,t)}};return(0,t.jsxs)("div",{className:"flex flex-col flex-wrap gap-16 ".concat(l?"sm:flex-col":"sm:flex-row"),children:[(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{autoFocus:!1,isError:null==o?void 0:o[I.o4.ADDRESS_1_ERROR],message:null==o?void 0:o[I.o4.ADDRESS_1_ERROR_MSG],label:I.xd.includes(null==o?void 0:o[I.o4.COUNTRY_GEO_ID])?_.hP.STREET_NO:_.D6.SPC_RECEIVERS_APARTMENT_FLAT,type:"text",id:I.o4.ADDRESS_1,inputValue:null==o?void 0:o[I.o4.ADDRESS_1],onChange:e=>c(e,I.o4.ADDRESS_1),onBlur:e=>c(e,I.o4.ADDRESS_1),hasStartDivider:!0,isFromCheckout:!0})}),I.xd.includes(null==o?void 0:o[I.o4.COUNTRY_GEO_ID])?(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{label:_.hP.HOUSE_NO,id:I.o4.ADDRESS_LINE_2,type:"text",autoFocus:!1,hasStartDivider:!0,inputValue:(null==o?void 0:o[I.o4.ADDRESS_LINE_2])||(null==o?void 0:o[I.o4.POSTALCODE_EXT]),onChange:e=>c(e,I.o4.ADDRESS_LINE_2),isFromCheckout:!0})}):"",!I.T4.includes(null==o?void 0:o[I.o4.COUNTRY_GEO_ID])&&(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{label:I.xd.includes(null==o?void 0:o[I.o4.COUNTRY_GEO_ID])?_.hP.ZIPCODE:_.D6.RECEIVERS_PIN_CODE,isError:null==o?void 0:o[I.o4.ADDRESS_2_ERROR],message:null==o?void 0:o[null===I.o4||void 0===I.o4?void 0:I.o4.ADDRESS_2_ERROR_MSG],id:I.o4.ZIP_CODE,inputValue:null==o?void 0:o[I.o4.ADDRESS_2],onChange:e=>c(e,I.o4.ADDRESS_2),onBlur:e=>c(e,I.o4.ADDRESS_2),type:"text",autoFocus:!1,hasStartDivider:!0,isFromCheckout:!0})}),(0,t.jsx)(y,{children:n?(0,t.jsx)(ex,{label:_.D6.RECEIVERS_CITY,addressDetail
1s:o,onGetInputValue:i,cityListData:r}):(0,t.jsx)(j.Z,{label:_.D6.RECEIVERS_CITY,type:"text",id:I.o4.CITY,classes:"bg-grey-100 focus:border-greySoft",readOnly:!0,autoFocus:!1,isError:null==o?void 0:o[I.o4.CITY_ERROR],message:null==o?void 0:o[I.o4.CITY_ERROR_MSG],inputValue:null==o?void 0:o[I.o4.CITY],hasStartDivider:!0,isFromCheckout:!0})})]})};eR.propTypes={isOpen:n().bool,addressDetails:n().object,onGetInputValue:n().func,isCitySuggestionsEnabled:n().bool,cityListData:n().arrayOf(n().object)};var e_=o(81581);let eC=e=>{let{isOpen:l,addressDetails:o,onGetInputValue:i,isMobile:n,isCitySuggestionsEnabled:s=!1,cityListData:r=[]}=e,d=(e,l)=>{let t=e.target.value;switch(l){case I.o4.ADDRESS_1:t.length?(i(I.o4.ADDRESS_1_ERROR,!1),i(I.o4.ADDRESS_1_ERROR_MSG,"")):(i(I.o4.ADDRESS_1_ERROR,!0),i(I.o4.ADDRESS_1_ERROR_MSG,_._u)),i(l,t);break;case I.o4.ADDRESS_2:M.Z.alphaNumericWithSpace.test(t)&&(t.length?(i(I.o4.ADDRESS_2_ERROR,!1),i(I.o4.ADDRESS_2_ERROR_MSG,"")):(i(I.o4.ADDRESS_2_ERROR,!0),i(I.o4.ADDRESS_2_ERROR_MSG,_._u)),t.length<=(0,L.jQ)(o.countryGeoId)&&i(l,t));break;case I.o4.DOORBELL:t.length?(i(I.o4.DOORBELL_ERROR,!1),i(I.o4.DOORBELL_ERROR_MSG,"")):(i(I.o4.DOORBELL_ERROR,!0),i(I.o4.DOORBELL_ERROR_MSG,_._u)),i(l,t);break;default:i(l,t)}};return(0,t.jsxs)("div",{className:"flex flex-col flex-wrap gap-16 ".concat(l?"sm:flex-col":"sm:flex-row"),children:[(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{autoFocus:!1,isError:null==o?void 0:o[I.o4.ADDRESS_1_ERROR],message:null==o?void 0:o[I.o4.ADDRESS_1_ERROR_MSG],label:_.D6.SPC_RECEIVERS_APARTMENT_FLAT,type:"text",id:I.o4.ADDRESS_1,inputValue:null==o?void 0:o[I.o4.ADDRESS_1],onChange:e=>d(e,I.o4.ADDRESS_1),onBlur:e=>d(e,I.o4.ADDRESS_1),isFromCheckout:!0})}),(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{label:_.D6.SPC_RECEIVERS_HOUSE_NO,type:"text",autoFocus:!1,id:I.o4.ADDRESS_3,onChange:e=>d(e,I.o4.ADDRESS_3),inputValue:(null==o?void 0:o[I.o4.ADDRESS_3])||(null==o?void 0:o[I.o4.HOUSE_NO]),isFromCheckout:!0})}),(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{label:_.D6.SPC_RECEIVERS_DOORBELL_NO,isError:null==o?void 0:o[I.o4.DOORBELL_ERROR],message:null==o?void 0:o[I.o4.DOORBELL_ERROR_MSG],type:"text",autoFocus:!1,hasStartDivider:!0,id:I.o4.DOORBELL,inputValue:null==o?void 0:o[I.o4.DOORBELL],onChange:e=>d(e,I.o4.DOORBELL),onBlur:e=>d(e,I.o4.DOORBELL),endAdornment:(0,t.jsx)("div",{className:"relative",onClick:()=>null,children:(0,t.jsx)(e_.Z,{isMobile:n,alignment:"right",renderInformation:(0,t.jsx)("div",{className:"p-16 md:p-0",children:(0,t.jsx)("div",{className:"text-sm text-gray-500",children:_.WP})}),icon:"/icons/info-circle-gray.svg"})}),isFromCheckout:!0})}),(0,t.jsx)(y,{children:(0,t.jsx)(j.Z,{label:_.D6.RECEIVERS_PIN_CODE,type:"text",autoFocus:!1,hasStartDivider:!0,isError:null==o?void 0:o[I.o4.ADDRESS_2_ERROR],message:null==o?void 0:o[null===I.o4||void 0===I.o4?void 0:I.o4.ADDRESS_2_ERROR_MSG],id:I.o4.ADDRESS_2,inputValue:null==o?void 0:o[I.o4.ADDRESS_2],onChange:e=>d(e,I.o4.ADDRESS_2),onBlur:e=>d(e,I.o4.ADDRESS_2),isFromCheckout:!0})}),(0,t.jsx)(y,{children:s?(0,t.jsx)(ex,{label:_.D6.RECEIVERS_CITY,addressDetails:o,onGetInputValue:i,cityListData:r}):(0,t.jsx)(j.Z,{label:_.D6.RECEIVERS_CITY,type:"text",autoFocus:!1,hasStartDivider:!0,id:I.o4.CITY,classes:"bg-grey-100 focus:border-greySoft",readOnly:!0,isError:null==o?void 0:o[I.o4.CITY_ERROR],message:null==o?void 0:o[I.o4.CITY_ERROR_MSG],inputValue:null==o?void 0:o[I.o4.CITY],onChange:e=>d(e,I.o4.CITY),isFromCheckout:!0})})]})};eC.propTypes={isOpen:n().bool,isMobile:n().bool,addressDetails:n().object,onGetInputValue:n().func,isCitySuggestionsEnabled:n().bool,cityListData:n().arrayOf(n().object)};var eD=o(98418),eb=o(17900),eA=o(5784);let ey={addressPurposeType:"",postalCode:"",teleCode:"91",altRecpTeleCode:"91",city:"",countryGeoId:"IND",addressType:"other"},eI=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{salutation:(null==e?void 0:e.salutation)||"MR",toName:(null==e?void 0:e.toName)||"",email:(null==e?void 0:e.attnName)||"",address1:(null==e?void 0:e.address)||(null==e?void 0:e.address1)||"",address2:(null==e?void 0:e.address2)||"",address3:(null==e?void 0:e.address3)||"",city:(null==e?void 0:e.city)||"",postalCode:(null==e?void 0:e.postalcode)||(null==e?void 0:e.postalCode)||"",mobileNumber:(null==e?void 0:e.phone)||(null==e?void 0:e.mobileNumber)||"",contactMechId:(null==e?void 0:e.postalAddress)||"",postalAddress:(null==e?void 0:e.postalAddress)||"",addressType:(null==e?void 0:e.addressType)||"other",countryGeoId:(null==e?void 0:e.countryGeoId)||"IND",landmark:(null==e?void 0:e.landmark)||"",teleCode:(null==e?void 0:e.teleCode)||(null==e?void 0:e.countryCode)||"",altRecpTeleCode:(null==e?void 0:e.altRecpTeleCode)||(null==e?void 0:e.countryCode)||"",altRecpNumber:(null==e?void 0:e.altRecpNumber)||(null==e?void 0:e.altPhone)||"",isOrderingForSelf:(null==e?void 0:e.isOrderingForSelf)==="Y"||(null==e?void 0:e.isOrderingForSelf)===!0,latitude:(null==e?void 0:e.latitude)||"",longitude:(null==e?void 0:e.longitude)||"",postalCodeExt:(null==e?void 0:e.postalCodeExt)||"",doorBellName:(null==e?void 0:e.doorBell)||"",houseNo:(null==e?void 0:e.houseNo)||""}},eO=function(e){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0,t=arguments.length>3?arguments[3]:void 0,i={addrSalutation:"",toName:(null==e?void 0:e.toName)||"",attnName:(null==e?void 0:e.email)||"",address:(null==e?void 0:e.address1)||"",address2:(null==e?void 0:e.address2)||"",landmark:(null==e?void 0:e.landmark)||"",postalcode:(null==e?void 0:e.postalCode)||"",city:(null==e?void 0:e.city)||"",phone:(null==e?void 0:e.mobileNumber)||"",postalAddress:l?"noPartyPostal":(null==e?void 0:e.postalAddress)||(null==e?void 0:e.contactMechId)||"",countryGeoId:(null==e?void 0:e.countryGeoId)||"IND",countryCode:(null==e?void 0:e.teleCode)||"91",telecomPurposeId:"PHONE_SHIPPING",contactMechPurpse:"SHIPPING_LOCATION",addressType:(null==e?void 0:e.addressType)||"other",stateProvinceGeoId:"_NA_",altTelecomPurposeId:"PHONE_SHIPPING",latitude:(null==e?void 0:e.latitude)||"",longitude:(null==e?void 0:e.longitude)||"",isOrderingForSelf:(null==e?void 0:e.isOrderingForSelf)?"Y":"N"};return"IND"===o||t.includes(o)?"IND"!==o&&t.includes(o)&&(i.address2="",i.houseNo=(null==e?void 0:e.address3)||"",i.doorBellName=(null==e?void 0:e.doorBellName)||"",i.intlpostalcode=(null==e?void 0:e.address2)||""):(i.address2=(null==e?void 0:e.addressLine2)||"",i.intlpostalcode=(null==e?void 0:e.address2)||""),(0,E.Lq)(i)},eN=e=>{var l,o;let t=null!==(o=null==e?void 0:e.addressList)&&void 0!==o?o:null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.addressList;return Array.isArray(t)?t:null},eM=async e=>{try{let l=await (0,X.t5)(),o=eN(l);if(o)return e((0,er.Vs)(o)),o}catch(l){e((0,er.wb)((null==l?void 0:l.message)||l))}return null},eL=e=>{var l,o,t;if(null==e||"number"==typeof(null==e?void 0:e.status)&&e.status>=400)return!1;let i=null!==(t=null==e?void 0:e.isSuccess)&&void 0!==t?t:null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.isSuccess;return!1!==i&&"N"!==i&&"false"!==i&&(!0===i||"Y"===i||"true"===i||1===i||"1"===i||!(null==e?void 0:e.error)&&!(null==e?void 0:e.errorMessage)&&!(null==e?void 0:null===(o=e.data)||void 0===o?void 0:o.error))},ej=e=>{var l,o;return(null==e?void 0:e.postalAddress)||(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.postalAddress)||(null==e?void 0:e.contactMechId)||(null==e?void 0:null===(o=e.data)||void 0===o?void 0:o.contactMechId)||""},ew=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=String((null==l?void 0:l.mobileNumber)||"").replace(/\D/g,"");return e.find(e=>{let t=String((null==e?void 0:e.mobileNumber)||"").replace(/\D/g,"");return(null==e?void 0:e.toName)===(null==l?void 0:l.toName)&&t===o&&(null==e?void 0:e.address1)===(null==l?void 0:l.address1)&&String((null==e?void 0:e.postalCode)||"")===String((null==l?void 0:l.postalCode)||"")})},eT=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"IND",n=e.filter(e=>((null==e?void 0:e.countryGeoId)||"IND")===i).map(eI),s=ej(t);if(s){let e=n.find(e=>e.contactMechId===s);if(e)return e}return n.find(e=>e.contactMechId&&!l.has(e.contactMechId))||ew(n,o)},ek=e=>{var l,o;let{selectedSavedAddressId:i,onSelectedSavedAddressChange:n,isFromPDP:r,isFromCheckout:d,isMobile:a,onSaveSuccess:c,isProductUnavailable:R=!1,onExploreAvailableProducts:C}=e,D=(0,v.I0)(),b=(0,x.usePathname)(),A=null==b?void 0:b.includes("/search"),y=null==b?void 0:b.includes("-lp"),O=new URLSearchParams(window.location.search),{trackEvent:N}
1=(0,ev.Z)(),{getAddNewAddressClickedData:M,getNewAddressAddedData:j,getAddressListViewedData:w,getAddressPageViewedData:T,getSavedAddressSelectedData:k,getEditAddressClickedData:P,getExistingAddressEditedData:F}=(0,eu.Z)(),B=m.default.getCookie(S.lp),V=m.default.getCookie(S.kz)||"",Y=B&&(0,E.Pb)(B)?JSON.parse(B):{},{savedAddresses:U,loginDetail:Z,userDetails:W,catalogId:z,appCatalogId:H,specialCountry:q,cityListData:J,cartCount:Q,visitedCountry:$,completeCartDetails:X,countryListData:ee,skipCartValidationOnce:el,unserviceableCartItems:eo,isClearCartDueToCountryChange:et,isDeliveryDatesLoading:eS,deliveryDates:ex,isDatesAvailable:e_,isShippingLoading:eN,internationalDeliveryMethods:ej,appliedFilters:ew,appliedSort:ek,isShowMobileLocationLock:eP,isSavedAddressesLoading:eG,configData:eF,isMobileDevice:eB,senderInfo:eV,activeStore:eY,pendingMandatoryEmailEdit:eU}=(0,v.v9)(e=>{var l,o,t,i,n,s,r,d,a,c,u,v,p,f,g,h,E,S,m,x,R,_,C,D,b,A,y,I,O,N,M,L,j;let w=null!==(M=null===(l=e.dynamicHome)||void 0===l?void 0:l.pageStores)&&void 0!==M?M:[];return{savedAddresses:(null==e?void 0:null===(o=e.savedAddress)||void 0===o?void 0:o.savedAddresses)||[],loginDetail:(null==e?void 0:null===(t=e.fus)||void 0===t?void 0:t.loginDetail)||{},userDetails:(null==e?void 0:null===(i=e.loginSignUp)||void 0===i?void 0:i.userDetails)||{},cartCount:null==e?void 0:null===(n=e.cart)||void 0===n?void 0:n.cartCount,catalogId:(null==e?void 0:null===(s=e.locationLock)||void 0===s?void 0:s.selectedCountryFromList)||(null==e?void 0:null===(r=e.appConfig)||void 0===r?void 0:r.catalogId)||"",appCatalogId:(null==e?void 0:null===(d=e.appConfig)||void 0===d?void 0:d.catalogId)||"",specialCountry:null==e?void 0:null===(a=e.deliveryAddress)||void 0===a?void 0:a.specialCountries,cityListData:(null==e?void 0:null===(c=e.locationLock)||void 0===c?void 0:c.cityListData)||[],visitedCountry:null==e?void 0:null===(u=e.locationLock)||void 0===u?void 0:u.visitedCountry,completeCartDetails:(null==e?void 0:null===(v=e.deliveryAddress)||void 0===v?void 0:v.completeCartDetails)||{},countryListData:(null==e?void 0:null===(p=e.locationLock)||void 0===p?void 0:p.countryListData)||[],skipCartValidationOnce:null==e?void 0:null===(f=e.locationLock)||void 0===f?void 0:f.skipCartValidationOnce,unserviceableCartItems:(null==e?void 0:null===(g=e.locationLock)||void 0===g?void 0:g.unserviceableCartItems)||[],isClearCartDueToCountryChange:null==e?void 0:null===(h=e.locationLock)||void 0===h?void 0:h.isClearCartDueToCountryChange,isDeliveryDatesLoading:null==e?void 0:null===(E=e.shippingDateAndSlotSelection)||void 0===E?void 0:E.isDeliveryDatesLoading,deliveryDates:null==e?void 0:null===(S=e.shippingDateAndSlotSelection)||void 0===S?void 0:S.deliveryDates,isDatesAvailable:null==e?void 0:null===(m=e.shippingDateAndSlotSelection)||void 0===m?void 0:m.isDatesAvailable,isShippingLoading:null==e?void 0:null===(x=e.shippingDateAndSlotSelection)||void 0===x?void 0:x.loading,internationalDeliveryMethods:null==e?void 0:null===(R=e.shippingDateAndSlotSelection)||void 0===R?void 0:R.internationalDeliveryMethods,appliedFilters:null==e?void 0:null===(_=e.plp)||void 0===_?void 0:_.appliedFilters,appliedSort:null==e?void 0:null===(C=e.plp)||void 0===C?void 0:C.appliedSort,isShowMobileLocationLock:null==e?void 0:null===(D=e.locationLock)||void 0===D?void 0:D.isShowMobileLocationLock,isSavedAddressesLoading:null==e?void 0:null===(b=e.savedAddress)||void 0===b?void 0:b.isSavedAddressesLoading,configData:(null==e?void 0:null===(A=e.locationLock)||void 0===A?void 0:A.configData)||{},isMobileDevice:null==e?void 0:null===(y=e.appConfig)||void 0===y?void 0:y.isMobile,senderInfo:(null==e?void 0:null===(O=e.deliveryAddress)||void 0===O?void 0:null===(I=O.senderDetails)||void 0===I?void 0:I.result)||{},activeStore:null!==(j=null!==(L=w.find(e=>e.isSelected))&&void 0!==L?L:w[0])&&void 0!==j?j:null,pendingMandatoryEmailEdit:(null==e?void 0:null===(N=e.locationLock)||void 0===N?void 0:N.pendingMandatoryEmailEdit)||null}},v.wU),eZ=em()(Y)||z===g.od.INDIA?[]:null===(l=Object)||void 0===l?void 0:l.values(Y),eW=null==eZ?void 0:null===(o=eZ.filter(e=>e.catalogId===z))||void 0===o?void 0:o[0],ez=(null==eW?void 0:eW.countryId)||(null==$?void 0:$.countryId)||"IND",eH=q?q.split(","):I.xd,eK=()=>
1{let e=(0,L.hn)({addressDetails:{countryGeoId:ez},visitedCountry:$||eW,countryListData:ee,catalogId:z});return{...ey,teleCode:e,altRecpTeleCode:e,countryGeoId:ez}},eq=(0,s.useMemo)(()=>U.filter(e=>((null==e?void 0:e.countryGeoId)||"IND")===ez).map(eI),[U,ez]),[eJ,eQ]=(0,s.useState)([{...ey}]),[e$,eX]=(0,s.useState)({}),[e0,e1]=(0,s.useState)(!1),[e4,e2]=(0,s.useState)(!1),[e6,e3]=(0,s.useState)(!1),[e8,e5]=(0,s.useState)(!1),[e9,e7]=(0,s.useState)(""),[le,ll]=(0,s.useState)(null),[lo,lt]=(0,s.useState)(""),[li,ln]=(0,s.useState)(!1),ls=(0,s.useRef)(null),lr=(0,s.useRef)(!1),ld=(0,s.useRef)("");(0,s.useEffect)(()=>{i||(ln(!1),ls.current=null)},[i]),(0,s.useEffect)(()=>{let e=e4||e6||e0;if(d&&!eP){lr.current=!1;return}if(e||eG||lr.current)return;let l=eq.find(e=>String((null==e?void 0:e.contactMechId)||(null==e?void 0:e.postalAddress)||"")===String(i||""));lr.current=!0,N(ep.dR.addressListViewed,w({availableAddressCount:eq.length,addressType:(null==l?void 0:l.addressType)||"home"}),["clevertap"])},[d,eP,e4,e6,e0,eG,eq.length,i]),(0,s.useEffect)(()=>{if(!d||!eP||!eU||eG||!eq.length)return;let e=(null==eU?void 0:eU.contactMechId)||i||"",l=eq.find(l=>String((null==l?void 0:l.contactMechId)||"")===String(e)||String((null==l?void 0:l.postalAddress)||"")===String(e))||eq[0];if(!l){D((0,p.jD)(null));return}eX({...l,selectedContactMechId:I.o4.EDIT_ADDRESS,[I.o4.EMAIL_ERROR]:!0,[I.o4.EMAIL_ERROR_MSG]:_._u}),e3(!0),D((0,p.jD)(null))},[d,eP,eU,eG,eq,i,D]),(0,s.useEffect)(()=>{if(!(e4||e0&&!e6||e6)){ld.current="";return}let e=e6?"edit":"add",l=e6?e$:{...e$,...eJ[0]},o="".concat(e,":").concat((null==l?void 0:l.contactMechId)||(null==l?void 0:l.postalAddress)||"new");ld.current!==o&&(ld.current=o,N(ep.dR.addressPageViewed,T({action:e,availableAddressCount:eq.length,addressType:(null==l?void 0:l.addressType)||"home"}),["clevertap"]))},[e4,e6,e0]),(0,s.useEffect)(()=>{let e=ls.current;if(!e||!r||d)return;let l="IND"===ez,o=l?eS:eN;if("awaiting_start"===e.phase){o&&(e.phase="awaiting_result");return}if("awaiting_result"!==e.phase||o)return;ls.current=null;let t=Array.isArray(null==ex?void 0:ex.deliveryDates)?ex.deliveryDates:Array.isArray(ex)?ex:[];if(!(l?(null==ex?void 0:ex.isDatesAvailable)===!0||!0===e_||(null==ex?void 0:ex.isDatesAvailable)!==!1&&!1!==e_&&t.length>0:!!(null==ej?void 0:ej.isShippingDetailsExists))||!(Q>0)){ln(!1);return}ln(!0),(async()=>{let l=await (0,ec.yy)({selectedPincode:e.pincode,cartItemCount:Q,catalogId:H,savedAddresses:U,isFromCheckout:!1,isCurrentProductServiceable:!0});if(Array.isArray(null==l?void 0:l.orderList)&&l.orderList.length>0&&D((0,ea.w0)(l.orderList)),null==l?void 0:l.shouldProceed)D((0,p.mh)([]));else{var o;let{isCountryChange:t,unserviceableItems:i}=(0,ec.A8)({orderList:null==l?void 0:l.orderList,catalogId:H,serviceabilityItems:null==l?void 0:null===(o=l.serviceabilityResult)||void 0===o?void 0:o.items});D((0,p.OZ)(t)),D((0,p.mh)(i)),"IND"===ez?D((0,p.e2)({pincode:e.pincode,address:e.locationLabel})):D((0,p.wj)({pincode:e.pincode,address:e.locationLabel}))}})()},[r,d,ez,eS,eN,ex,e_,null==ej?void 0:ej.isShippingDetailsExists,Q,H,U,D]);let la=(0,s.useMemo)(()=>({addressPurposeType:"",countryGeoId:ez,mainproduct:{}}),[ez]),lc=e0||e6,lu=lc||e4||e6,lv=(0,s.useMemo)(()=>{if(!lu)return"";let e=lc?e$:eJ[0];return(null==e?void 0:e.postalCode)||""},[e$,eJ,lu,lc]);(0,s.useEffect)(()=>{if(!d||"IND"!==ez||!lu||6!==lv.length)return;let e=!1,l=setTimeout(async()=>{let l=await (0,L.Qh)(null==X?void 0:X.orderList,lv);if(!e){if(null===l){ll(null),lt("");return}ll(l.status),lt(I.o4.NEW_ADDRESS)}},300);return()=>{e=!0,clearTimeout(l)}},[lv,null==X?void 0:X.orderList,lu,d,ez]),(0,s.useEffect)(()=>{d&&((null==U?void 0:U.length)<1&&D((0,er.dE)()),D((0,p.H)(ez)))},[]);let lp=e=>{let l=(0,eE.tc)(e,(0,eE.Jl)({loginDetail:Z,userDetails:W,senderInfo:eV}));lc&&(null==e$?void 0:e$.selectedContactMechId)!==I.o4.NEW_ADDRESS?eX(e=>({...e,...l})):(eJ[0]={...eJ[0],...l},eQ([...eJ]))},lf=(0,eE.KO)({isEditable:e0,isEditAddressDrawerOpen:e6,activeAddressData:e$,addressData:eJ[0]}),lg=async function(e){let{skipCheckoutServiceabilityReschedule:l=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={maxAge:2592e3,path:"/",encode:decodeURIComponent},t={maxAge:604800,path:"/",encode:decodeURIComponent};if(m.default.setCookie(S.hx,(null==e?void 0:e.postalAddress)||(null==e?void 0:e.contactMechId),o),m.default.setCookie(S.Vn,null==e?void 0:e.toName,o),D((0,p.GW)(null==e?void 0:e.toName)),"IND"===ez)m.default.setCookie(S.Yo,null==e?void 0:e.postalCode,o),m.default.setCookie(S.Tr,null==e?void 0:e.city,o),D((0,p.YD)({pincode:null==e?void 0:e.postalCode,address:null==e?void 0:e.city}));else{let l=(null==e?void 0:e.postalCode)||"",o=(null==e?void 0:e.city)||"",i=eW||{},n={...Y,[ez]:{country:(null==i?void 0:i.country)||(null==i?void 0:i.countryName),categoryId:(null==i?void 0:i.categoryId)||"".concat(z,"/gifts"),catalogId:(null==i?void 0:i.catalogId)||z,countryId:(null==i?void 0:i.countryId)||ez,countryName:(null==i?void 0:i.countryName)||(null==i?void 0:i.country),city:o,cityId:l}};if(o&&l){let e=await (0,es.HK)(l);(null==e?void 0:e.isSuccess)&&(m.default.setCookie(S.Oc,null==e?void 0:e.cacheKey,t),m.default.setCookie(S.rA,o,t),m.default.setCookie(S.kz,l,t)),D((0,p.UF)({pincode:l,location:o}))}m.default.setCookie(S.lp,JSON.stringify(n),t),em()(eW)||D((0,p.J0)(eW))}if(D((0,p.db)(!1)),D((0,eg.l)(!1)),(0,E.Ox)(u.mL),r&&!d&&a||(0,eh.Vr)(),!l&&d&&"IND"===ez&&(null==e?void 0:e.postalCode)&&D((0,ed.Pk)({pinCode:e.postalCode,updateDelayMs:_.wv})),(y||A)&&(null==e?void 0:e.postalCode)){window.scrollTo({top:0});let l=m.default.getCookie("faul")||"",o=m.default.getCookie("ab_user_id"),t=A&&O.has("qs")?O.get("qs"):null,i={page:0,size:a?f.YS.MOBILE_PRODUCT_PER_PAGE:f.YS.DESKTOP_PRODUCT_PER_PAGE,geoId:null===g.od||void 0===g.od?void 0:g.od.INDIA,pincode:e.postalCode,filters:ew,sortBy:null==ek?void 0:ek.sortBy,sortOrder:null==ek?void 0:ek.sortOrder,email:l,fnpId:o},n=t?{...i,pageType:f.YS.SEARCH,qs:t}
1:{...i,categoryUrl:"fnp.com".concat(b)};D((0,h.tZ)((0,E.Lq)(n)))}(0,eA.d7)(b)&&(0,eb.t)(D,{isMobile:!!(a||eB),pincode:null==e?void 0:e.postalCode,storeId:null==eY?void 0:eY.storeId,storeName:(null==eY?void 0:eY.storeName)||(null==eY?void 0:eY.name)}),null==c||c()},lh=(e,l)=>{if(l){eX({...e});return}eJ[0]={...eJ[0],...e},eQ([...eJ]),e4&&eX(l=>({...l,...e}))},lE=(e,l)=>{let o="IND"===ez&&e===I.o4.POSTAL_CODE||"IND"!==ez&&(e===I.o4.CITY||e===I.o4.POSTAL_CODE),t=t=>{let i={...t,[e]:l};return o?(0,eD.d_)(i,ez):i};if(lc&&(null==e$?void 0:e$.selectedContactMechId)!==I.o4.NEW_ADDRESS)eX(e=>t(e));else{let e=t(eJ[0]);eJ[0]=e,eQ([...eJ]),e4&&eX(e=>t(e))}},lS=async(e,l)=>{let o=eq.find(l=>l.contactMechId===e),t=(0,eA.d7)(b),{isAutoGateMandateOnDesktopHome:i,isAutoGateMandateOnDesktopPLP:s,isAutoGateMandateOnMobileHome:c,isAutoGateMandateOnMobilePLP:u,isAutoGateEnabledOnDesktopHome:v,isAutoGateEnabledOnMobileHome:f,isAutoGateEnabledOnDesktopPLP:h,isAutoGateEnabledOnMobilePLP:E,mandateGatePLPList:S}=eF||{},m=(0,ef.kv)(S),x=(i&&t||s&&y)&&H===g.od.INDIA,R=(c&&t||u&&y)&&H===g.od.INDIA;if(N(ep.dR.savedAddressSelected,k({address:o||{},isLocationPopup:!0,isBottomSheet:!!(a||eB),mandatory:!!(eB?R:x),auto:!!(eB?!m&&(f&&t||E&&y):!m&&(v&&t||h&&y)),userInitiated:!0,isOrderingForSelf:!!(null==o?void 0:o.isOrderingForSelf)}),["clevertap"]),n(e),e7(l),!l){ll(null),lt(""),ln(!1);return}if(r&&!d&&o&&("IND"===ez?D((0,p.YD)({pincode:o.postalCode,address:o.city})):D((0,p.UF)({pincode:o.postalCode||o.city,location:o.city}))),!d){let o=eq.find(l=>l.contactMechId===e),t=(null==o?void 0:o.city)||"";if(r){ln(!1),Q>0&&(ls.current={pincode:l,locationLabel:t,phase:"awaiting_start"}),ll(null),lt(e);return}if(Q>0){ln(!0);let e=await (0,ec.yy)({selectedPincode:l,cartItemCount:Q,catalogId:H,savedAddresses:U,isFromCheckout:!1,isCurrentProductServiceable:!0});if(Array.isArray(null==e?void 0:e.orderList)&&e.orderList.length>0&&D((0,ea.w0)(e.orderList)),null==e?void 0:e.shouldProceed)D((0,p.mh)([]));else{var _;let{isCountryChange:o,unserviceableItems:i}=(0,ec.A8)({orderList:null==e?void 0:e.orderList,catalogId:H,serviceabilityItems:null==e?void 0:null===(_=e.serviceabilityResult)||void 0===_?void 0:_.items});D((0,p.OZ)(o)),D((0,p.mh)(i)),"IND"===ez?D((0,p.e2)({pincode:l,address:t})):D((0,p.wj)({pincode:l,address:t}))}}else ln(!1);ll(null),lt(e);return}let C=await (0,L.Qh)(null==X?void 0:X.orderList,l);if(null===C){ll(null),lt("");return}ll(C.status),lt(e)},lm=async(e,l)=>{if(!e)return"success";let o=await (0,L.Qh)(null==X?void 0:X.orderList,e);return null===o?(ll(null),lt(""),null):(ll(o.status),lt(l||""),o.status)},lx=(e,l)=>{let o=new FormData;o.append("cartItemIndex",(0,ef.dJ)(Q)),o.append("selectedContactMechId_".concat(0),e),D((0,ed.uj)({payload:new URLSearchParams(o).toString(),isInternationalProduct:(null==l?void 0:l.countryGeoId)!=="IND",isDifferentPincode:(null==l?void 0:l.postalCode)!==V}))},lR=async()=>{if(!r||d||!R){if(e0||e4||e6||!eq.length){var e;let l=(e6||e0)&&(null==e$?void 0:e$.selectedContactMechId)!==I.o4.NEW_ADDRESS,o=l?e$:{...e$,...eJ[0]},t={...o,isOrderingForSelf:null!==(e=null==o?void 0:o.isOrderingForSelf)&&void 0!==e&&e},i=[I.o4.ADDRESS_1,I.o4.TO_NAME,I.o4.MOBILE_NUMBER];I.T4.includes(ez)||i.push(I.o4.ADDRESS_2),(0,L.Ni)({catalogId:z,countryId:ez})&&i.push(I.o4.EMAIL);let s=(null==t?void 0:t.selectedContactMechId)===I.o4.NEW_ADDRESS;"IND"===ez&&s?i.push(I.o4.POSTAL_CODE):"IND"!==ez&&i.push(I.o4.CITY,I.o4.POSTAL_CODE);let r=!0;if(i.forEach(e=>{!t[e]||t["".concat(e,"Error")]?(t["".concat(e,"Error")]=!0,t["".concat(e,"ErrorMsg")]=_._u,r=!1):(t["".concat(e,"Error")]=!1,t["".concat(e,"ErrorMsg")]="")}),!r){lh(t,l);return}let a=(0,eD.n_)(t,ez)||e9;if(a&&"error"===await lm(a,(null==t?void 0:t.postalAddress)||(null==t?void 0:t.contactMechId)||"")){lh((0,eD.Zi)(t,ez,_.ns),l);return}let c=eO(t,s,ez,eH),u=new Set(eq.map(e=>e.contactMechId).filter(Boolean)),v=await (0,en.Cx)(c);if(!eL(v))return;if(s)N(ep.dR.newAddressAdded,j({address:{...t,isOrderingForSelf:!!((null==t?void 0:t.isOrderingForSelf)||lf)},isLocationPopup:!0}),["clevertap"]);else if(l){let e=eq.find(e=>String((null==e?void 0:e.contactMechId)||"")===String((null==t?void 0:t.contactMechId)||"")||String((null==e?void 0:e.postalAddress)||"")===String((null==t?void 0:t.postalAddress)||""))||{};N(ep.dR.existingAddressEdited,F({address:{...t,isOrderingForSelf:!!((null==t?void 0:t.isOrderingForSelf)||lf)},originalAddress:e,isOrderingForSelf:!!((null==t?void 0:t.isOrderingForSelf)||lf),isLocationPopup:!0}),["clevertap"])}e6?(e3(!1),eX({})):e4?(e2(!1),eX({}),eJ[0]=eK(),eQ([...eJ])):e1(!1),e5(!0),setTimeout(()=>e5(!1),3e3);let p=await eM(D);if(l&&p){let e=String((null==t?void 0:t.contactMechId)||(null==t?void 0:t.postalAddress)||""),l=(null==t?void 0:t.isOrderingForSelf)?"Y":"N",o=
1p.map(o=>String((null==o?void 0:o.contactMechId)||"")===e||String((null==o?void 0:o.postalAddress)||"")===e?{...o,isOrderingForSelf:l}:o);D((0,er.Vs)(o))}if(s){let e=eT(p||[],u,t,v,ez);(null==e?void 0:e.contactMechId)&&(n(e.contactMechId),e7(e.postalCode||(0,eD.n_)(t,ez)),ll("success"),lt(e.contactMechId),d&&(lx(e.contactMechId,e),await lg(e,{skipCheckoutServiceabilityReschedule:!0})))}}else{let e=eq.find(e=>String(e.contactMechId)===String(i)||String(e.postalAddress)===String(i)),l=(null==e?void 0:e.contactMechId)||i;if(l&&String(lo)===String(l)&&"error"===le)return;if(e&&l){if(d)lx(l,e);else if(Q>0){if(el||(0,ec.Kb)())D((0,p.jd)(!1));else if(et||Array.isArray(eo)&&eo.length>0){D((0,p.Bp)(!0));return}}await lg(e,{skipCheckoutServiceabilityReschedule:!0})}}}};return(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:(0,t.jsx)(K,{isMobile:a,isEditable:e0,onAddressDrawerArrowClose:()=>{eq.length?e0&&e1(!1):e1(!1)},activeGiftIndex:0,activeAddressData:e$,giftItem:la,allAddressList:eJ,cartItemIndex:0,isOpen:!0,onGetInputValue:lE,separateForms:()=>{let e={addressDetails:lc?e$:eJ[0],isOpen:!0,cartItemIndex:0,onGetInputValue:lE};if("IND"===ez){let l=d&&"warning"===le&&lu?_.Rr:"";return(0,t.jsx)(ei,{...e,isPincodeInputEnabled:!0,serviceabilityInfoMessage:l})}return eH.includes(ez)?(0,t.jsx)(eC,{...e,isMobile:!0,isCitySuggestionsEnabled:!0,cityListData:J}):(0,t.jsx)(eR,{...e,isCitySuggestionsEnabled:!0,cityListData:J})},onSelectAddressType:e=>{lc&&(null==e$?void 0:e$.selectedContactMechId)!==I.o4.NEW_ADDRESS?eX(l=>({...l,[I.o4.ADDRESS_TYPE]:e.value})):(eJ[0][I.o4.ADDRESS_TYPE]=e.value,eQ([...eJ]))},onAddAddress:()=>{N(ep.dR.addNewAddressClicked,M({isLocationPopup:!0,isAddressList:eq.length>0,addressType:"home"}),["clevertap"]);let e={...eK(),selectedContactMechId:I.o4.NEW_ADDRESS};"IND"!==ez&&(null==eW?void 0:eW.city)&&(e.city=eW.city,e.postalCode=eW.cityId||""),eJ[0]=e,eQ([...eJ]),eX(e),e2(!0)},onEditAddressClick:(e,l)=>{null==l||l.stopPropagation(),N(ep.dR.editAddressClicked,P({address:e||{},isOrderingForSelf:!!(null==e?void 0:e.isOrderingForSelf)}),["clevertap"]),eX({...e,selectedContactMechId:I.o4.EDIT_ADDRESS}),e3(!0)},onAddressClick:lS,selectedAddressContactMechId:i,isToast:e8,onSaveAddress:lR,confirmButtonId:"location-lock-saved-address-confirm-button",locationLockAddressList:eq,isLocationLockMode:!0,isAddAddressDrawerOpen:e4,onAddAddressDrawerClose:()=>{e2(!1),eX({}),eJ[0]=eK(),eQ([...eJ])},isEditAddressDrawerOpen:e6,onEditAddressDrawerClose:()=>{e3(!1),eX({})},isOrderingForSelfChecked:lf,onOrderingForSelfChange:e=>{e.stopPropagation(),lp(e.target.checked)},onOrderingForSelfClick:e=>{e.stopPropagation(),"checkbox"===e.target.type||e.target.closest("button")||lp(!(0,eE.KO)({isEditable:e0,isEditAddressDrawerOpen:e6,activeAddressData:e$,addressData:eJ[0]}))},isFromCheckout:d,isFromPDP:r,serviceabilityErrorMessage:r&&!d&&R?G._G.PRODUCT_CANNOT_DELIVERED:"error"===le&&lo?_.ns:"",serviceabilityErrorContactMechId:r&&!d&&R&&i||lo,serviceabilityWarningMessage:!d&&li&&!(r&&R)&&i&&lo===i?G.iR:"warning"===le&&lo&&lo===i?_.Rr:"",serviceabilityWarningContactMechId:i?lo:"",...r&&!d&&R&&C?{onExploreAvailableProducts:()=>{null==C||C()}}:{}})})};ek.propTypes={selectedSavedAddressId:n().string,onSelectedSavedAddressChange:n().func,isFromPDP:n().bool,isFromCheckout:n().bool,isMobile:n().bool,onSaveSuccess:n().func,isProductUnavailable:n().bool,onExploreAvailableProducts:n().func};let eP=e=>{let{fullProductDetails:l,isMandatoryLocation:o,setMandatoryError:i,isAutoLocation:n,isInternationalMobilePDP:C,isFromPDP:D,isFromCheckout:b=!1,initialSelectedSavedAddressId:A="",onSaveSuccess:y,onSavedAddressChange:I,isLocationError:O=!1,onExploreAvailableProducts:N,isLocationStepActive:M=!1,onSuggestionsVisibilityChange:L}=e,j=(0,v.I0)(),w=(0,x.usePathname)(),{trackEvent:T}=(0,ev.Z)(),k=(0,eA.d7)(w),P=null==w?void 0:w.includes("-lp"),G=!!l,F=m.default.getCookie(S.Tr),B=m.default.getCookie(S.Yo),V=window.location.href?window.location.href:null,{details:Y,appliedFilters:U,appliedSort:Z,pincode:W,selectedDomesticAddress:z,savedAddresses:H,loggedin:K,catalogId:q,configData:J,intlPincode:Q,selectedIntLocation:$,isShowMobileLocationLock:X,selectedCountryFromList:ee,isMobile:el,activeStore:eo}=(0,v.v9)(e=>{var l,o,t,i,n,s,r,d,a,c,u,v,p,f,g,h,E,S,m,x;let R=null!==(S=null===(l=e.dynamicHome)||void 0===l?void 0:l.pageStores)&&void 0!==S?S:[];return{details:(null==e?void 0:null===(o=e.plp)||void 0===o?void 0:o.details)||[],appliedFilters:null==e?void 0:null===(t=e.plp)||void 0===t?void 0:t.appliedFilters,appliedSort:null==e?void 0:null===(i=e.plp)||void 0===i?void 0:i.appliedSort,pincode:null===(n=e.locationLock.selectedDomesticLocation)||void 0===n?void 0:n.pincode,selectedDomesticAddress:null===(s=e.locationLock.selectedDomesticLocation)||void 0===s?void 0:s.address,savedAddresses:(null==e?void 0:null===(r=e.savedAddress)||void 0===r?void 0:r.savedAddresses)||[],loggedin:null==e?void 0:null===(a=e.fus)||void 0===a?void 0:null===(d=a.loginDetail)||void 0===d?void 0:d.loggedin,catalogId:e.appConfig.catalogId,configData:null==e?void 0:null===(c=e.locationLock)||void 0===c?void 0:c.configData,intlPincode:null==e?void 0:null===(v=e.locationLock)||void 0===v?void 0:null===(u=v.selectedIntLocation)||void 0===u?void 0:u.pincode,selectedIntLocation:null==e?void 0:null===(p=e.locationLock)||void 0===p?void 0:p.selectedIntLocation,visitedCountry:null==e?void 0:null===(f=e.locationLock)||void 0===f?void 0:f.visitedCountry,isShowMobileLocationLock:null==e?void 0:null===(g=e.locationLock)||void 0===g?void 0:g.isShowMobileLocationLock,selectedCountryFromList:null==e?void 0:null===(h=e.locationLock)||void 0===h?void 0:h.selectedCountryFromList,isMobile:null==e?void 0:null===(E=e.appConfig)||void 0===E?void 0:E.isMobile,activeStore:null!==(x=null!==(m=R.find(e=>e.isSelected))&&void 0!==m?m:R[0])&&void 0!==x?x:null}}
1,v.wU),et=q!==g.od.INDIA,[ei,en]=(0,s.useState)(""),[es,er]=(0,s.useState)(!1),{isAutoGateMandateOnMobileHome:ed,isAutoGateMandateOnMobilePLP:ea}=J,ec=(ed&&k||ea&&P)&&q===g.od.INDIA,eu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!!(o||ec),i=!!n;return(0,ef.CD)({page_name:(0,E.j)(k,P,w,null==l?void 0:l.urlIdentifier),page_type:window.fnpPageType||"",mandatory:t,auto:i,user_initiated:!(i||t),clean_url:w,complete_url:V,is_location_available:!!(B||F||Q),pincode:et?"":B||W||"",area:et?"":F||z||"",system_pincode:et?"":B||W||"",country:q,city:et&&(null==$?void 0:$.location)||"",is_bottom_sheet:!0,is_saved_address_available:!!(null==H?void 0:H.length),pid:(null==l?void 0:l.productId)||"",sku_id:(null==l?void 0:l.skuCode)||"",...e})},eg=()=>{if(!(null==H?void 0:H.length))return"";let e=H.find(e=>{if(et){let l=String(Q||(null==$?void 0:$.pincode)||""),o=String((null==$?void 0:$.location)||"").toLowerCase();return String((null==e?void 0:e.postalCode)||(null==e?void 0:e.city)||"")===l&&String((null==e?void 0:e.city)||"").toLowerCase()===o}return String((null==e?void 0:e.postalCode)||"")===String(W||"")&&String((null==e?void 0:e.city)||"").toLowerCase()===String(z||"").toLowerCase()});return(null==e?void 0:e.contactMechId)||(null==e?void 0:e.postalAddress)||""};(0,s.useEffect)(()=>{if(X){let e=b?A||m.default.getCookie(S.hx)||"":m.default.getCookie(S.hx)||"",l=D&&O?eg():"";l?(en(l),er(!0)):(en(e),er(!1)),T(ep.dR.locationPopupViewed,eu(),["clevertap"])}},[X]),(0,s.useEffect)(()=>{if(!G||b||!M)return;let e=m.default.getCookie(S.hx)||"",l=O?eg():"";l?(en(l),er(!0),null==I||I(l)):(en(e),er(!1),e&&(null==I||I(e))),T(ep.dR.locationPopupViewed,eu({mandatory:!0,auto:!1,user_initiated:!1}),["clevertap"])},[M]);let eE=(0,s.useCallback)(()=>{en(""),er(!1);let e={path:"/"};m.default.deleteCookie(S.hx,e),m.default.deleteCookie(S.Vn,e)},[]),eS=(0,s.useCallback)(e=>{en(e),er(!0),null==I||I(e)},[I]);(0,s.useEffect)(()=>(G||(0,eh._C)(),()=>{G||(0,eh.Vr)()}),[G]);let ex=!!(D&&O),eR=ex&&es,e_=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-shrink-0 px-16 ".concat(b?"pb-12 pt-0":"pb-10 pt-4"),children:[q===ee&&H.length<1&&!K&&(0,t.jsxs)(r.default,{href:"/login?from=".concat(w).concat(u.mL),className:"my-12 flex h-[48px] items-center justify-between rounded-8 border-1 border-[#C0C398] bg-[url('https://static-assets-prod.fnp.com/icons/web/login-bg.svg')] bg-cover bg-center px-8 py-12 text-14 font-600 text-fnp-500",children:[u.Lo,(0,t.jsx)(c.default,{src:"/icons/chevron-right-thin-dark.svg",width:20,height:20,alt:"right arrow"})]}),(K||!b)&&b?null:(0,t.jsx)(R.Z,{isFromPDP:D,isFromCheckout:b,fullProductDetails:l,isMandatoryLocation:o,setMandatoryError:i,isInternationalMobilePDP:C,isContinueButtonHidden:K&&q===ee&&!!ei,onClearSavedAddressSelection:eE,messageText:u.pd,isProductUnavailable:ex&&!eR,onExploreAvailableProducts:N,onSuggestionsVisibilityChange:L})]}),q===ee&&K&&(0,t.jsx)(ek,{selectedSavedAddressId:ei,onSelectedSavedAddressChange:eS,isFromPDP:D,isFromCheckout:b,isMobile:el,onSaveSuccess:y,isProductUnavailable:eR,onExploreAvailableProducts:N})]});return G?(0,t.jsx)("div",{className:(0,E.Y1)("flex",b?el?"flex h-full min-h-0 flex-col overflow-hidden ".concat(K?"":"min-h-[70dvh]"):"h-[100vh] max-h-[calc(100vh-57px)]":"h-full max-h-[calc(92vh-48px)]","flex-col overflow-hidden bg-white-900"),id:"mobileLocationLock",children:e_}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-10 bg-white-900 opacity-100"}),(0,t.jsxs)("div",{className:"fixed left-0 top-0 z-[99999] flex h-full w-full flex-col bg-grey-100",id:"mobileLocationLock",children:[(0,t.jsxs)("div",{className:"flex h-48 w-full flex-shrink-0 items-center justify-start bg-fnp-100 p-16",children:[(0,t.jsx)("span",{children:(0,t.jsx)(d.Z,{iconSrc:"/icons/left-arrow.svg",imgHeight:24,imgWidth:24,onClick:()=>{if(T(ep.dR.locationPopupClosed,eu({user_initiated:!0}),["clevertap"]),G||W||q!==g.od.INDIA){if(!G&&q!==g.od.INDIA&&!Q){let e={path:"/"};if(m.default.deleteCookie(S.Oc,e),m.default.deleteCookie(S.kz,e),m.default.deleteCookie(S.rA,e),null==w?void 0:w.includes("-lp")){let e=m.default.getCookie("faul")||"";j((0,h.tZ)((0,E.Lq)({page:0,size:f.YS.MOBILE_PRODUCT_PER_PAGE,geoId:q,categoryUrl:"fnp.c
1om".concat(w),filters:U,sortBy:null==Z?void 0:Z.sortBy,sortOrder:null==Z?void 0:Z.sortOrder,email:e})))}}}else{let e={path:"/"};if(m.default.deleteCookie(S.dZ,e),m.default.deleteCookie(S.Tr,e),m.default.deleteCookie(S.Yo,e),null==w?void 0:w.includes("-lp")){let e=m.default.getCookie("faul")||"";j((0,h.tZ)((0,E.Lq)({page:null==Y?void 0:Y.currentPage,size:f.YS.MOBILE_PRODUCT_PER_PAGE,geoId:null===g.od||void 0===g.od?void 0:g.od.INDIA,categoryUrl:"fnp.com".concat(w),filters:U,sortBy:null==Z?void 0:Z.sortBy,sortOrder:null==Z?void 0:Z.sortOrder,email:e})))}}j((0,p.db)(!1)),k&&q===g.od.INDIA&&(0,eb.t)(j,{isMobile:!0,storeId:null==eo?void 0:eo.storeId,storeName:(null==eo?void 0:eo.storeName)||(null==eo?void 0:eo.name)}),ec&&em()(q===g.od.INDIA?W:Q)&&n&&j((0,p.oW)(!0)),j((0,p.W6)(!1)),G||(0,eh.Vr)(),(0,E.Ox)(u.mL)},altText:"Close delivery location"})}),(0,t.jsx)(a.default,{Tag:"p",variant:"h6",classes:"text-16 font-600 ml-8 text-black-900",children:_.tm})]}),(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-white-900 ".concat(P?"h-full":""),children:e_})]})]})};eP.propTypes={fullProductDetails:n().object,isMandatoryLocation:n().bool,isAutoLocation:n().bool,setMandatoryError:n().func,isInternationalMobilePDP:n().bool,isFromPDP:n().bool,isFromCheckout:n().bool,initialSelectedSavedAddressId:n().string,onSaveSuccess:n().func,onSavedAddressChange:n().func,isLocationError:n().bool,onExploreAvailableProducts:n().func,isLocationStepActive:n().bool,onSuggestionsVisibilityChange:n().func};var eG=eP},50915:function(e,l,o){var t=o(3827),i=o(74404),n=o.n(i),s=o(64090),r=o(34728),d=o(91328),a=o(43046),c=o(84350),u=o(23395),v=o(59653);let p=e=>{let{isMobile:l=!1,onChange:o,onClick:i=()=>{},isChecked:n=!1,containerClassName:p="mx-20 my-16 rounded-8 px-10 py-6 bg-[#195EE014]",isShowOnDA:f=!1,checkboxId:g="order-for-myself"}=e,[h,E]=(0,s.useState)(!1),S=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!h)return;let e=e=>{S.current&&!S.current.contains(e.target)&&E(!1)},l=setTimeout(()=>{document.addEventListener("mousedown",e),document.addEventListener("touchstart",e)},0);return()=>{clearTimeout(l),document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[h]);let m=()=>{E(!1)},x=()=>(0,t.jsx)(a.default,{position:"bottom",isOpen:h,onDrawerClose:m,styles:"py-0",isHideCloseBtn:!0,isBackButtonEnabled:!0,headingText:c.Wv.ORDERING_FOR_MYSELF,children:(0,t.jsx)("div",{className:"relative px-16 pb-20 pt-8",children:(0,t.jsx)(d.default,{Tag:"p",classes:"text-14 font-500 leading-20 text-grey-500",children:c.Wv.MESSAGE})})});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-8 ".concat(p),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),i(e))},children:[(0,t.jsx)("span",{className:"flex shrink-0",onClick:e=>{e.stopPropagation()},role:"presentation",children:(0,t.jsx)(r.Z,{id:g,label:"",isChecked:n,onChange:o})}),(0,t.jsx)(d.default,{Tag:"p",classes:"cursor-pointer text-14 font-500 text-fnp-500",onClick:e=>{e.stopPropagation(),i(e)},children:c.Wv.ORDERING_FOR_MYSELF}),(0,t.jsxs)("button",{ref:S,type:"button","aria-label":"Ordering for myself information",className:"relative flex items-center",onClick:e=>{e.stopPropagation(),E(!0)},onMouseEnter:()=>{l||E(!0)},onMouseLeave:()=>{l||E(!1)},children:[(0,t.jsx)(u.s,{size:16,color:"#737530",weight:"bold"}),!l&&h?(0,t.jsx)("span",{className:"absolute left-1/2 top-[calc(100%+8px)] z-10 w-[220px] -translate-x-1/2 rounded-8 border-1 border-thinLightGrey bg-white-900 px-12 py-8 text-12 font-500 leading-18 text-grey-500 shadow-sm",children:c.Wv.MESSAGE}):""]})]}),l&&!f?(0,t.jsx)(v.Z,{rootId:"bottom_drawer",renderOnDidMount:!0,children:x()}):l&&f?x():""]})};p.propTypes={isMobile:n().bool,onChange:n().func.isRequired,isChecked:n().bool,onClick:n().func,containerClassName:n().string,isShowOnDA:n().bool,checkboxId:n().string},l.Z=p},84350:function(e,l,o){o.d(l,{Wv:function(){return s},_G:function(){return t},b5:function(){return n},h9:function(){return a},iW:function(){return r},qt:function(){return i},rT:function(){return d},su:function(){return c},w0:function(){return u}});let t={VIEW_AVAILABLE_GIFTS:"View Available Gifts",FREE_MESSAGE_CARD:"Add Message Card",FREE_MESSAGE_CARD_ADDED:"Message Card Added",MESSAGE_SUBTITLE:"Make your gift more special",SELECT_OCCASION:"Select Occasion",SELECT_MESSAGE_TEMPLATE:"Select A Message Template",MESSAGE_TEMPLATE_HEADING:"Templates",PLEASE_SELECT_AN_OCCASION:"Please select an occasion",ENTER_MESSAGE:"Enter Message",NO_SHOW_SENDER:"Don't Show My Name On The Card",PREVIEW:"Preview",CONTINUE:"Save & Continue",VALIDATION_TOAST:"Please enter a message otherwise a blank card might be sent to your loved one",APPLY_COUPON:"Apply Coupon",ENTER_COUPON_CODE:"Enter a coupon code",AVAILABLE_COUPONS:"Available Coupons",APPLY:"Apply",REMOVE:"Remove",INVA
1LID_COUPON_CODE:"Please enter a coupon code",COUPON_APPLIED:"Coupon Applied Successfully!",MORE_CONTENT:"More",LESS_CONTENT:"Less",VIEW_ALL:"View All",WHATS_THE_OCCASION:"What's the occasion?",MESSAGE_ON_CARD:"Message on Card",RECIPIENT_NAME:"Recipient name",DEAR:"Dear",CHOOSE_MESSAGE:"Choose message",RECEIVER_EMPTY:"Please enter recipient name",MESSAGE_EMPTY:"Please enter a message",MESSAGE_IS_LONGER:"Message is too long",PLEASE_SELECT_OCCASION_TO_CONTINUE:"Please select an occasion to continue",NO_OCCASION_IN_MIND:"I don't have any occasion in mind",GREETING_CARD_ADDED_SUCCESS:"Message card added successfully",SELECT_MESSAGE:"Select Occasion",MESSAGE_TEMPLATE:"Message Template",GENERAL_OCCASION_FALLBACK_IMAGE:"https://static-assets-prod.fnp.com/assets/images/custom/occasion/general_occasion.png",OCCASION_HAND_GIF:"https://static-assets-prod.fnp.com/assets/images/custom/occasion/hand_touch.gif"},i=e=>"Save â¹".concat(e," on this order."),n=(e,l)=>"Coupon saving â¹".concat(e," (").concat(l,")"),s={MESSAGE:"Choose this if you are the recipient of the gift.",ORDERING_FOR_MYSELF:"Ordering for Myself"},r="flex items-center justify-between",d="text-grey-500 font-inter text-[14px] font-normal leading-[20px] [font-variant-numeric:lining-nums proportional-nums] [font-feature-settings:'dlig'_on]",a="text-right text-[var(--GS6,#444)] font-inter text-[14px] font-medium leading-[18px] [font-variant-numeric:lining-nums_proportional-nums] [font-feature-settings:'dlig'_on]",c="text-right text-[var(--GS6,#008000)] font-inter text-[14px] font-medium leading-[18px] [font-variant-numeric:lining-nums_proportional-nums] [font-feature-settings:'dlig'_on]",u="flex items-center justify-between"},46976:function(e,l,o){o.d(l,{A4:function(){return a},Jl:function(){return i},KO:function(){return r},N_:function(){return s},tc:function(){return n},y7:function(){return d}});var t=o(12769);let i=e=>{var l;let{updateSenderData:o={},loginDetail:t={},userDetails:i={},senderInfo:n={}}=e;return{senderName:(null==o?void 0:o.senderName)||(null==i?void 0:i.userName)||(null==n?void 0:n.senderName)||(null==t?void 0:t.fullname)||"",emailAddress:(null==o?void 0:o.emailAddress)||(null==i?void 0:i.emailID)||(null==n?void 0:n.emailAddress)||"",primaryContactNumber:(null==o?void 0:o.primaryContactNumber)||(null==i?void 0:i.mobNo)||(null==n?void 0:n.primaryContactNumber)||"",primaryCountryCode:(null==o?void 0:o.primaryCountryCode)||(null==i?void 0:null===(l=i.selectedCountry)||void 0===l?void 0:l.countryCode)||(null==i?void 0:i.countryCode)||(null==n?void 0:n.primaryCountryCode)||"91"}},n=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=l.senderName||"",i=l.emailAddress||"",n=l.primaryContactNumber||"";return{isOrderingForSelf:!!e,[t.o4.TO_NAME]:o,[t.o4.EMAIL]:i,[t.o4.MOBILE_NUMBER]:n,...o?{[t.o4.TO_NAME_ERROR]:!1,[t.o4.TO_NAME_ERROR_MSG]:""}:{},...i?{[t.o4.EMAIL_ERROR]:!1,[t.o4.EMAIL_ERROR_MSG]:""}:{},...n?{[t.o4.MOBILE_NUMBER_ERROR]:!1,[t.o4.MOBILE_NUMBER_ERROR_MSG]:""}:{},...l.primaryCountryCode?{[t.o4.TELE_CODE]:l.primaryCountryCode}:{}}},s=e=>"Y"===e||!0===e||"true"===e,r=e=>{let{isEditable:l,isEditAddressDrawerOpen:o=!1,activeAddressData:i,addressData:n}=e;return(l||o)&&(null==i?void 0:i.selectedContactMechId)!==t.o4.NEW_ADDRESS?s(null==i?void 0:i.isOrderingForSelf):s(null==n?void 0:n.isOrderingForSelf)},d=function(){var e,l;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=null==o?void 0:null===(e=o.selectedAddressDetails)||void 0===e?void 0:e.selectedContactMechId;return!!(i&&i!==t.o4.NEW_ADDRESS&&(null==o?void 0:null===(l=o.selectedAddressDetails)||void 0===l?void 0:l.postalDtlsOfContactMechIdToName))},a=e=>{let{contactMechId:l,isChecked:o,itemIndex:t=0}=e,i=new FormData;return Object.entries({attrName:"shippingContactMechId",attrValue:l,isOrderingForSelf:o?"Y":"N",itemIndex:t}).forEach(e=>{let[l,o]=e;return i.append(l,o)}),new URLSearchParams(i).toString()}}}]); 2//# sourceMappingURL=2571-3e4ca6c3e2d67710.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.