1"use strict";(self.webpackChunkyumapos_web_client_mobile=self.webpackChunkyumapos_web_client_mobile||[]).push([[7843],{95498(me,ne,s){s.d(ne,{s:()=>C});var W=s(10467),K=s(81535),P=s(37403),z=s(60177),Z=s(49769),A=s(17705),e=s(35547),i=s(85802),M=s(32271),x=s(89079),n=s(89417),k=s(50969),V=s(68943),se=s(34006),X=s(99213),J=s(40100),j=s(26920),$=s(68018),w=s(21413),U=s(22806),oe=s(57786),Q=s(7673),de=s(1807),h=s(35060),N=s(99437),_=s(70152),B=s(23294),F=s(5964),H=s(70980),q=s(52906),Y=s(96354),ee=s(25558),he=s(96697),Ce=s(56977),Me=s(38008),Ee=s(46850),pe=s(64954),fe=s(96645),ie=s(67813),ue=s(65873),ae=s(79200),te=s(13810),_e=s(82749),ge=s(49655),Ae=s(64683),le=s(61030),re=s(20036),Oe=s(88835),Se=s(95583),ve=s(44023),Pe=s(85988),ce=s(30995),ye=s(70578);const Te=["addressSearchTextArea"],De=["currentGeoPositionButton"],Re=["suggestedAddressElementRef"];function be(o,g){if(1&o){const t=e.RV6();e.j41(0,"map-polygon",24),e.bIt("polygonClick",function(d){i.eBV(t);const E=e.XpG(2);return i.Njj(E.mapOrPolygonClick(d))}),e.k0s()}if(2&o){const t=g.$implicit;e.Y8G("paths",t.coordinates)("options",t.polygonOptions)}}function xe(o,g){1&o&&e.nrm(0,"map-advanced-marker",16),2&o&&e.Y8G("position",g)}function Be(o,g){if(1&o){const t=e.RV6();e.j41(0,"div",13)(1,"google-map",14),e.bIt("mapClick",function(d){i.eBV(t);const E=e.XpG();return i.Njj(E.mapOrPolygonClick(d))})("mapDragstart",function(){i.eBV(t);const d=e.XpG();return i.Njj(d.ignoreNextMapCenterChangeInGeocoding=!1)})("mapDblclick",function(){i.eBV(t);const d=e.XpG();return i.Njj(d.ignoreNextMapCenterChangeInGeocoding=!1)}),e.Z7z(2,be,1,2,"map-polygon",15,e.fX1),e.nVh(4,xe,1,1,"map-advanced-marker",16),e.k0s(),e.j41(5,"div",17),i.qSk(),e.j41(6,"svg",18),e.nrm(7,"path",19)(8,"path",20)(9,"path",21)(10,"path",22),e.k0s()(),i.joV(),e.nrm(11,"yp-spinner",23),e.k0s()}if(2&o){let t;const r=e.XpG();e.R7$(),e.Y8G("zoom",10)("options",r.mapOptions),e.R7$(),e.Dyx(r.mapPolygons()),e.R7$(2),e.vxM((t=r.selectedAddressMarkerPosition())?4:-1,t),e.R7$(7),e.Y8G("spinnerType",r.spinnerOverMap)("position","absolute")}}function Ie(o,g){if(1&o){const t=e.RV6();e.j41(0,"mat-form-field",25)(1,"mat-label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"textarea",26,6),e.bIt("input",function(){i.eBV(t);const d=e.XpG();return i.Njj(d.addressSearchInput())})("focus",function(){i.eBV(t);const d=e.XpG();return i.Njj(d.addressSearchFocus())})("blur",function(){i.eBV(t);const d=e.XpG();return i.Njj(d.addressSearchBlur())})("keydown",function(d){i.eBV(t);const E=e.XpG();return i.Njj(E.addressSearchKeyDown(d))}),e.k0s(),e.j41(6,"div",27),e.nrm(7,"yp-spinner",28),e.k0s()()}if(2&o){const t=e.XpG();e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(3,7,"ADDRESS.SELECTION.ADD_ADDRESS.INPUT.SEARCH.LABEL")),e.R7$(2),e.Y8G("cdkTextareaAutosize",!0)("formControl",t.addressSearchFormControl),e.R7$(3),e.Y8G("spinnerType",t.spinnerOnAddressSearchInput)("diameter",24)}}function Ge(o,g){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=g.$implicit;e.AVh("fw-bolder",t.isMatch),e.R7$(),e.JRh(t.value)}}function Fe(o,g){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=g.$implicit;e.AVh("fw-bolder",t.isMatch),e.R7$(),e.JRh(t.value)}}function ke(o,g){if(1&o){const t=e.RV6();e.j41(0,"li",32,7),e.bIt("mousedown",function(){const d=i.eBV(t).$implicit,E=e.XpG(3);return i.Njj(E.selectSuggestedAddress(d))}),e.j41(2,"div"),e.Z7z(3,Ge,2,3,"span",33,e.Vm6),e.nI1(5,"ypFormattableTextToTextSegments"),e.k0s(),e.j41(6,"div",34),e.Z7z(7,Fe,2,3,"span",33,e.Vm6),e.nI1(9,"ypFormattableTextToTextSegments"),e.k0s()()}if(2&o){const t=g.$implicit,r=g.$index,d=e.XpG(3);e.AVh("suggested-address-active",d.activeSuggestedAddressIndex()===r),e.R7$(3),e.Dyx(e.bMT(5,2,null==t.placePrediction?null:t.placePrediction.mainText)),e.R7$(4),e.Dyx(e.bMT(9,4,null==t.placePrediction?null:t.placePrediction.secondaryText))}}function we(o,g){if(1&o&&(e.j41(0,"ul",30),e.vzT("yp-animation-slide-up-out"),e.QR4("yp-animation-slide-down-in"),e.Z7z(1,ke,10,6,"li",31,e.fX1),e.k0s()),2&o){e.XpG(2);const t=e.r8f(2);e.R7$(),e.Dyx(t)}}function Le(o,g){if(1&o&&(e.j41(0,"div",29),e.nVh(1,we,3,0,"ul",30),e.k0s()),2&o){e.XpG();const t=e.r8f(2);e.R7$(),e.vxM(t.length?1:-1)}}function je(o,g){1&o&&(e.j41(0,"div",41),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"ADDRESS.SELECTION.OUTSIDE_DELIVERY_AREA.MESSAGE")," "))}function Ne(o,g){if(1&o){const t=e.RV6();e.j41(0,"button",43),e.bIt("click",function(){i.eBV(t);const d=e.XpG(2);
1return i.Njj(d.cannotFindAddressClick())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"ADDRESS.SELECTION.ADD_ADDRESS.SWITCH_TO_MANUAL_MODE.BUTTON.LABEL")," "))}function We(o,g){if(1&o&&(e.j41(0,"div",35)(1,"div",36),e.nrm(2,"mat-icon",37),e.j41(3,"div",38)(4,"h6",39),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"div",40),e.EFF(8),e.nI1(9,"translate"),e.k0s()()()(),e.nVh(10,je,3,3,"div",41)(11,Ne,3,3,"button",42)),2&o){const t=e.XpG(),r=e.r8f(3);e.R7$(2),e.Y8G("svgIcon",t.SvgIcon.infoCircle),e.R7$(3),e.JRh(e.bMT(6,4,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.MAP_INSTRUCTIONS.MESSAGE")),e.R7$(3),e.JRh(e.bMT(9,6,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.MAP_INSTRUCTIONS.DETAILS")),e.R7$(2),e.vxM(r?10:t.showCannotFindAddressBtn()?11:-1)}}function $e(o,g){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.FULL_ADDRESS.ERROR.REQUIRED")))}function Ue(o,g){1&o&&(e.j41(0,"div",47),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.EDITOR_INSTRUCTIONS.MESSAGE")," "))}function Ye(o,g){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"SHOPPING_CART.ENTER_COUNTRY")))}function Ke(o,g){if(1&o&&(e.j41(0,"mat-form-field",48)(1,"mat-label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"input",51),e.nVh(5,Ye,3,3,"mat-error"),e.k0s()),2&o){const t=e.XpG(2);e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(3,5,"SHOPPING_CART.COUNTRY")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.country),e.R7$(),e.vxM(t.addressEditorFormGroup.controls.country.hasError("required")?5:-1)}}function l(o,g){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"SHOPPING_CART.ENTER_CITY")))}function S(o,g){if(1&o&&(e.j41(0,"div",49)(1,"mat-form-field",45)(2,"mat-label"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.nrm(5,"input",51),e.nVh(6,l,3,3,"mat-error"),e.k0s()()),2&o){const t=e.XpG(2);e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(4,5,"SHOPPING_CART.CITY")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.city),e.R7$(),e.vxM(t.addressEditorFormGroup.controls.city.hasError("required")?6:-1)}}function a(o,g){1&o&&(e.j41(0,"div",53)(1,"mat-error"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&o&&(e.R7$(2),e.JRh(e.bMT(3,1,"TERMS_AGREEMENT.CHECKBOX.ERROR")))}function p(o,g){if(1&o&&(e.j41(0,"div"),e.nrm(1,"yp-legal-agreement",52),e.nVh(2,a,4,3,"div",53),e.k0s()),2&o){const t=e.XpG(2),r=e.r8f(5);e.R7$(),e.Y8G("legalAgreementType",t.tenantService.tenant.legalAgreementSignIn)("continueButtonText",r)("formControl",t.addressEditorFormGroup.controls.legalAgreement),e.R7$(),e.vxM(t.addressEditorFormGroup.controls.legalAgreement.invalid&&(t.addressEditorFormGroup.controls.legalAgreement.dirty||t.addressEditorFormGroup.controls.legalAgreement.touched)?2:-1)}}function u(o,g){if(1&o&&(e.j41(0,"div",44)(1,"div")(2,"mat-form-field",45)(3,"mat-label"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.nrm(6,"textarea",46),e.nVh(7,$e,3,3,"mat-error"),e.k0s(),e.nVh(8,Ue,3,3,"div",47),e.k0s(),e.nVh(9,Ke,6,7,"mat-form-field",48),e.nVh(10,S,7,7,"div",49),e.j41(11,"mat-form-field",48)(12,"mat-label"),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.nrm(15,"input",50),e.k0s(),e.j41(16,"mat-form-field",48)(17,"mat-label"),e.EFF(18),e.nI1(19,"translate"),e.k0s(),e.nrm(20,"input",51),e.k0s(),e.j41(21,"mat-form-field",48)(22,"mat-label"),e.EFF(23),e.nI1(24,"translate"),e.k0s(),e.nrm(25,"input",51),e.k0s(),e.j41(26,"mat-form-field",48)(27,"mat-label"),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.nrm(30,"input",51),e.k0s(),e.j41(31,"mat-form-field",48)(32,"mat-label"),e.EFF(33),e.nI1(34,"translate"),e.k0s(),e.nrm(35,"input",51),e.k0s(),e.nVh(36,p,3,4,"div"),e.k0s()),2&o){const t=e.XpG(),r=e.r8f(4);e.R7$(2),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(5,30,"ADDRESS.SELECTION.ADD_ADDRESS.INPUT.SEARCH.LABEL")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.fullAddress)("cdkTextareaAutosize",!0),e.R7$(),e.vxM(t.addressEditorFormGroup.controls.fullAddress.hasError("required")?7:-1),e.R7$(),e.vxM(t.addressEditorFormGroup.controls.fullAddress.disabled?8:-1),e.R7$(),e.vxM(null!=r&&r.country?-1:9),e.R7$(),e.vxM(t.addressEditorFormGroup.controls.city.enabled||t.addressEditorFormGroup.controls.city.value?10:-1),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(14,32,"SHOPPING_CART.FLAT")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.apt),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(19,34,"SHOPPING_CART.FLOOR")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.floor),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(24,36,"SHOPPING_CART.ENTRANCE")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.entrance),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(29,38,"SHOPPING_CART.INTERCOM")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.intercom),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(34,40,"SHOPPING_CART.COMMENT")),e.R7$(2),e.Y8G("formControl",t.addressEditorFormGroup.controls.comment),e.R7$(),e.vxM(t.tenantService.tenant.legalAgreementSignIn!==t.TermsAgreementType.empty&&t.tenantService.tenant.country===t.COUNTRY_ISO3166_CODES_MAP.RU?36:-1)}}function D(o,g){if(1&o){const t=e.RV6();e.j41(0,"div",65)(1,"yp-button-with-loader",67),e.bIt("buttonWithLoaderClick",function(){i.eBV(t);const d=e.XpG(2);return i.Njj(d.continueBtnClick())}),e.EFF(2),e.k0s()()}if(2&o){const t=e.XpG(2),r=e.r8f(5);
1e.R7$(),e.Y8G("spinnerType",t.spinnerOnContinueButton)("disabled",t.continueButtonDisabled()),e.R7$(),e.SpI(" ",r," ")}}function L(o,g){if(1&o){const t=e.RV6();e.j41(0,"div",54)(1,"div",55),e.nrm(2,"button",56),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",57)(5,"div",58)(6,"yp-dialog-header",59),e.bIt("backBtnClick",function(){i.eBV(t);const d=e.XpG();return i.Njj(d.backBtnClick())}),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"div",60)(10,"div",61),e.eu8(11,62),e.j41(12,"div",63)(13,"div",64),e.eu8(14,62),e.k0s(),e.eu8(15,62),e.k0s()(),e.eu8(16,62),e.k0s(),e.nVh(17,D,3,3,"div",65),e.k0s(),e.j41(18,"div",66),e.eu8(19,62),e.k0s()()()}if(2&o){const t=e.XpG(),r=e.sdS(13),d=e.sdS(15),E=e.sdS(17),T=e.sdS(19),c=e.sdS(21),f=e.r8f(0),G=e.r8f(1);e.HbH(t.addAddressStepCssClass()),e.R7$(2),e.BMQ("aria-label",e.bMT(3,12,"COMMON.CLOSE")),e.R7$(4),e.Y8G("showBackButton",f||G)("showCloseButton",!1),e.R7$(),e.SpI(" ",e.bMT(8,14,t.headerTitle())," "),e.R7$(4),e.Y8G("ngTemplateOutlet",d),e.R7$(3),e.Y8G("ngTemplateOutlet",E),e.R7$(),e.Y8G("ngTemplateOutlet",T),e.R7$(),e.Y8G("ngTemplateOutlet",c),e.R7$(),e.vxM(t.showContinueBtn()?17:-1),e.R7$(2),e.Y8G("ngTemplateOutlet",r)}}function R(o,g){if(1&o){const t=e.RV6();e.j41(0,"yp-dialog-header",74),e.bIt("backBtnClick",function(){i.eBV(t);const d=e.XpG(2);return i.Njj(d.backBtnClick())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&o){const t=e.XpG(2),r=e.r8f(0),d=e.r8f(1);e.Y8G("showBackButton",r||d)("showCloseButton",!r),e.R7$(),e.SpI(" ",e.bMT(2,3,t.headerTitle())," ")}}function b(o,g){if(1&o){const t=e.RV6();e.j41(0,"div",73)(1,"yp-button-with-loader",67),e.bIt("buttonWithLoaderClick",function(){i.eBV(t);const d=e.XpG(3);return i.Njj(d.continueBtnClick())}),e.EFF(2),e.k0s()()}if(2&o){const t=e.XpG(3),r=e.r8f(5);e.R7$(),e.Y8G("spinnerType",t.spinnerOnContinueButton)("disabled",t.continueButtonDisabled()),e.R7$(),e.SpI(" ",r," ")}}function I(o,g){1&o&&e.DNE(0,b,3,3,"div",75)}function Ve(o,g){if(1&o&&(e.j41(0,"yp-fixed-header-footer",68),e.DNE(1,R,3,5,"yp-dialog-header",69),e.j41(2,"div",70)(3,"div",71)(4,"div",72),e.eu8(5,62)(6,62)(7,62),e.k0s(),e.eu8(8,62),e.k0s(),e.eu8(9,62),e.k0s(),e.nVh(10,I,1,0,"div",73),e.k0s()),2&o){const t=e.XpG(),r=e.sdS(13),d=e.sdS(15),E=e.sdS(17),T=e.sdS(19),c=e.sdS(21);e.HbH(t.addAddressStepCssClass()),e.R7$(5),e.Y8G("ngTemplateOutlet",d),e.R7$(),e.Y8G("ngTemplateOutlet",E),e.R7$(),e.Y8G("ngTemplateOutlet",T),e.R7$(),e.Y8G("ngTemplateOutlet",r),e.R7$(),e.Y8G("ngTemplateOutlet",c),e.R7$(),e.vxM(t.showContinueBtn()?10:-1)}}let m=(()=>{class o{transform(t){const r=[];if(t)if(0===t.matches.length)r.push({value:t.text,isMatch:!1});else{let d=0;for(const E of t.matches){const T=E.startOffset,c=E.endOffset;T>d&&r.push({value:t.text.substring(d,T),isMatch:!1}),r.push({value:t.text.substring(T,c),isMatch:!0}),d=c}d<t.text.length&&r.push({value:t.text.substring(d),isMatch:!1})}return r}static{this.\u0275fac=function(r){return new(r||o)}}static{this.\u0275pipe=e.EJ8({name:"ypFormattableTextToTextSegments",type:o,pure:!0})}}return o})(),C=(()=>{class o{constructor(){var t=this;this.defaultMapCenter=(0,A.hFB)(),this.deliveryZones=(0,A.hFB)(),this.showBackButton=(0,A.hFB)(!1),this.addressSelected=(0,A.CGW)(),this.backButtonClick=(0,A.CGW)(),this.tenantService=(0,i.WQX)(ae.I),this.breakpointObserver=(0,i.WQX)(K.Q),this.spinnerService=(0,i.WQX)(ue.D),this.document=(0,i.WQX)(i.qQL),this.destroyRef=(0,i.WQX)(i.abz),this.googleMapComponent=(0,A.ebz)(k.u6),this.addressSearchTextArea=A.ebz.required("addressSearchTextArea"),this.currentGeoPositionButton=A.ebz.required("currentGeoPositionButton"),this.cdkTextareaAutosize=(0,A.dtW)(P.xb),this.formControlDirectives=(0,A.dtW)(n.l_),this.formControlElements=(0,A.dtW)(n.l_,{read:e.aKT}),this.suggestedAddressHtmlElements=(0,A.dtW)("suggestedAddressElementRef",{read:e.aKT}),this.COUNTRY_ISO3166_CODES_MAP=Me.t,this.TermsAgreementType=fe.C,this.SvgIcon=pe.h,this.SvgIconLazy=pe.A,this.mapOptions={mapId:Ee.t.googleMapId,mapTypeControl:!1,disableDefaultUI:!0,zoomControl:!0,gestureHandling:"greedy"},this.mapPolygons=(0,M.EW)(()=>this.getMapPolygons(this.deliveryZones())),this.mapAlwaysShown=(0,x.ot)(this.breakpointObserver.observe("(min-width: 768px)").pipe((0,Y.T)(c=>c.matches)),{requireSync:!0}),this.addAddressStep=(0,i.vPA)(0),this.addAddressStepCssClass=(0,M.EW)(()=>
1{switch(this.addAddressStep()){case 0:return"step-map-with-search-input";case 1:return"step-search-with-suggestions";case 2:return"step-address-fields";case 3:return"step-manual-mode-map";case 4:return"step-manual-mode-address-fields"}}),this.showHeaderBackButton=(0,M.EW)(()=>{let c;return c=this.mapAlwaysShown()?[2,4]:[1,2,4],c.includes(this.addAddressStep())}),this.headerTitle=(0,M.EW)(()=>{if(this.mapAlwaysShown())return"ADDRESS.SELECTION.ADD_ADDRESS.TITLE";switch(this.addAddressStep()){case 1:return"ADDRESS.SELECTION.ADD_ADDRESS.SEARCH.TITLE";case 2:case 3:case 4:case 0:return"ADDRESS.SELECTION.ADD_ADDRESS.TITLE"}}),this.selectedAddressMarkerPosition=(0,M.EW)(()=>{let c;if(this.isAddressEditorFieldsStep()){const f=this.geocodedAddress();(0,te.iY)(f),c={lat:f.geoCoordinates.latitude,lng:f.geoCoordinates.longitude}}return c}),this.showContinueBtn=(0,M.EW)(()=>this.mapAlwaysShown()||1!==this.addAddressStep()),this.continueButtonDisabled=(0,M.EW)(()=>{if(this.geocodingInProgress())return!0;const c=this.geocodedAddress();switch(this.addAddressStep()){case 0:case 1:return!c?.isCompleteAddress||this.isOutsideDeliveryZone();case 3:case 2:case 4:return!c||this.isOutsideDeliveryZone()}}),this.suggestedAddresses=(0,i.vPA)([]),this.activeSuggestedAddressIndex=(0,M.uu)(()=>{this.suggestedAddresses()}),this.geocodedAddress=(0,i.vPA)(void 0),this.isOutsideDeliveryZone=(0,M.EW)(()=>{const c=this.geocodedAddress();return!!c&&!this.isGeoPointValid(c.geoCoordinates,this.deliveryZones())}),this.showCannotFindAddressBtn=(0,i.vPA)(!1),this.spinnerOnAddressSearchInput=this.spinnerService.generateSpinnerType(),this.spinnerOnContinueButton=this.spinnerService.generateSpinnerType(),this.spinnerOverMap=this.spinnerService.generateSpinnerType(),this.addressSearchFormControl=new n.MJ("",{nonNullable:!0}),this.addressEditorFormGroup=new n.gE({country:new n.MJ("",{nonNullable:!0}),city:new n.MJ("",{nonNullable:!0}),fullAddress:new n.MJ("",{nonNullable:!0,validators:[n.k0.required]}),apt:new n.MJ("",{nonNullable:!0}),floor:new n.MJ("",{nonNullable:!0}),entrance:new n.MJ("",{nonNullable:!0}),intercom:new n.MJ("",{nonNullable:!0}),comment:new n.MJ("",{nonNullable:!0}),legalAgreement:new n.MJ(!1,{nonNullable:!0})}),this.ignoreNextMapCenterChangeInGeocoding=!0,this.geocodingInProgress=(0,i.vPA)(!1),this.isAddressEditorFieldsStep=(0,M.EW)(()=>[2,4].includes(this.addAddressStep())),this.suggestedAddressSelectSubject=new w.B,(0,te.hN)((0,z.Vy)((0,i.WQX)(e.Agw)),!1);const r=(0,i.WQX)(ie.s),d=(0,x.br)(this.addAddressStep),E=(0,x.br)(this.googleMapComponent).pipe((0,ee.n)(c=>{let f;return f=c?c.idle.pipe((0,Y.T)(()=>{let G;const O=c.getCenter();return O&&(G={latitude:O.lat(),longitude:O.lng()}),G}),(0,B.F)(ge.LC),(0,F.p)(()=>!this.ignoreNextMapCenterChangeInGeocoding||(this.ignoreNextMapCenterChangeInGeocoding=!1,!1)),(0,Ae.j_)()):h.t,f}),(0,B.F)(ge.LC)),T=(0,x.br)(this.googleMapComponent).pipe((0,ee.n)(c=>c?c.centerChanged:h.t));this.tenantService.isGeideaTenantCountry&&this.addressEditorFormGroup.controls.city.disable(),(0,i.QZP)(()=>{const c=this.isAddressEditorFieldsStep();(0,M.O8)(()=>{c?(this.addressEditorFormGroup.controls.fullAddress.setValue(this.geocodedAddress()?.fullAddress??""),this.addressEditorFormGroup.controls.fullAddress.value&&this.addressEditorFormGroup.controls.fullAddress.disable()):(this.addressEditorFormGroup.controls.fullAddress.setValue(this.geocodedAddress()?.fullAddress??""),this.addressEditorFormGroup.controls.fullAddress.enable())})}),(0,A.uEv)({read:()=>{this.addAddressStep();for(const c of(0,M.O8)(this.cdkTextareaAutosize))c.resizeToFitContent(!0)}}),(0,A.uEv)({read:()=>{const c=this.activeSuggestedAddressIndex(),f=this.suggestedAddressHtmlElements();void 0===c?f.length&&f.at(0)?.nativeElement.scrollIntoView({block:"start",behavior:"instant"}):f.at(c)?.nativeElement.scrollIntoView({block:"nearest",behavior:"smooth"})}}),(0,i.QZP)(()=>{const c=this.googleMapComponent();c&&(0,M.O8)(()=>{c.controls[google.maps.ControlPosition.INLINE_END_BLOCK_END].push(this.currentGeoPositionButton().nativeElement),this.resetMapCenter(c)})}),this.addressSearchFormControl.valueChanges.pipe((0,_.B)(500),(0,Y.T)(c=>c.trim()),(0,B.F)(),(0,ee.n)(c=>d.pipe((0,F.p)(f=>1===f),(0,he.s)(1),(0,ee.n)((0,W.A)(function*(){let f;if(c.length<2)f=Promise.resolve([]);else{const G=re.BY.getBounds({deliveryZones:t.deliveryZones()});t.spinnerService.addSpinner(t.spinnerOnAddressSearchInput);let y,O=(0,M.O8)(t.addressSearchTextArea).nativeElement.selectionStart;O<c.length&&(y=O),f=r.suggest(c,y,G).catch(v=>(console.error("[YP]","Google Maps Suggest error",v),[])),t.spinnerService.removeSpinner(t.spinnerOnAddressSearchInput)}return f})))),(0,x.pQ)()).subscribe(c=>{this.suggestedAddresses.set(c)}),(0,oe.h)(E.pipe((0,Y.T)(c=>({geoCoordinates:c})),(0,F.p)(()=>!this.isAddressEditorFieldsStep())),T.pipe((0,Y.T)(()=>{})),this.suggestedAddressSelectSubject.pipe((0,B.F)(),(0,Y.T)(c=>({suggestedAddress:c})))).pipe((0,ee.n)(c=>{if(void 0===c)return h.t;let f,G;return void 0!==c.suggestedAddress?(f=this.spinnerOverMap,G=200):(f=[3,2,4].includes(this.addAddressStep())?this.spinnerOnContinueButton:this.spinnerOnAddressSearchInput,G=1e3),this.spinnerService.addSpinner(f),this.geocodingInProgress.set(!0),(0,de.O)(G).pipe((0,ee.n)((0,W.A)(function*(){let O,y;if(c.suggestedAddress){(0,te.HO)(c.suggestedAddress.placePrediction);const v=c.suggestedAddress.placePrediction.toPlace();yield v.fetchFields({fields:["formattedAddress","location","postalAddress","addressComponents"]}),(0,te.HO)(v.location),v.postalAddress?O={isCompleteAddress:!0,geoCoordinates:{latitude:v.location.lat(),longitude:v.location.lng()},fullAddress:v.formattedAddress??"",city:v.postalAddress.locality??v.postalAddress.sublocality??"",state:v.postalAddress.administrativeArea??"",zip:v.postalAddress.postalCode??"",country:v.addressComponents?.find(Xe=>Xe.types.includes("country"))?.longText??v.postalAddress?.regionCode??""}:(y={latitude:v.location.lat(),longitude:v.location.lng()},console.log("[YP]","Additional geocoding for suggested address"))}else y=c.geoCoordinates;if(y&&t.isGeoPointValid(y,t.deliveryZones())){const v=yield r.geocode(y);O=v?{isCompleteAddress:!!v.types?.some(Xe=>["street_address","premise","subpremise"].includes(Xe)),geoCoordinates:{latitude:v.geometry.location.lat(),longitude:v.geometry.location.lng()},fullAddress:v.formatted_address,city:r.getAddressComponent(v.address_components,"postal_town","locality","sublocality","sublocality_level_1","administrative_area_level_2","administrative_area_level_3"),state:r.getAddressComponent(v.address_components,"administrative_area_level_1"),zip:r.getAddressComponent(v.address_components,"postal_code"),country:r.getAddressComponent(v.address_components,"country")}:{isCompleteAddress:!1,geoCoordinates:y,fullAddress:"",city:"",state:"",zip:"",country:""}}return{params:c,geocodedAddress:O}})),(0,N.W)(O=>{let y;return console.error("[YP]","Error geocoding address",O),c.geoCoordinates&&(y={isCompleteAddress:!1,geoCoordinates:c.geoCoordinates,fullAddress:"",city:"",state:"",zip:"",country:""}),(0,Q.of)({params:c,geocodedAddress:y})}),(0,H.j)(()=>{this.spinnerService.removeSpinner(f),this.geocodingInProgress.set(!1)}))}),(0,x.pQ)()).subscribe(({params:c,geocodedAddress:f})=>{const G=3===this.addAddressStep();let O="";if(f){if(!G){const y=this.googleMapComponent();y&&(this.ignoreNextMapCenterChangeInGeocoding=!0,y.panTo({lat:f.geoCoordinates.latitude,lng:f.geoCoordinates.longitude}),c.suggestedAddress&&(y.getZoom()??0)<17&&y.googleMap?.setZoom(17))}O=f.fullAddress}O&&this.addressSearchFormControl.value!==O&&this.addressSearchFormControl.setValue(O),f?.isCompleteAddress||this.showCannotFindAddressBtn.set(!0),this.geocodedAddress.set(f)})}mapOrPolygonClick(t){if(t.latLng){const r=this.googleMapComponent();r&&(this.ignoreNextMapCenterChangeInGeocoding=!1,r.panTo(t.latLng))}}backBtnClick(){if(this.showHeaderBackButton()){const t=this.addAddressStep();if(1===t)this.processBackToMapFromSearch();else{if(this.isAddressEditorFieldsStep()){const r=this.googleMapComponent();r&&this.resetMapCenter(r)}this.addAddressStep.set(4===t?3:0)}}else this.backButtonClick.emit()}
1cannotFindAddressClick(){this.addAddressStep.set(3)}addressSearchInput(){this.addAddressStep.set(1)}addressSearchFocus(){this.addAddressStep.set(1)}addressSearchBlur(){this.mapAlwaysShown()&&this.processBackToMapFromSearch()}addressSearchKeyDown(t){const r=this.suggestedAddresses();if(r.length){const d=this.activeSuggestedAddressIndex();switch(t.key){case"ArrowDown":t.preventDefault(),this.activeSuggestedAddressIndex.set(((d??-1)+1)%r.length);break;case"ArrowUp":t.preventDefault(),this.activeSuggestedAddressIndex.set(((d??0)-1+r.length)%r.length);break;case"Enter":void 0!==d&&(t.preventDefault(),this.selectSuggestedAddress(r[d]))}}"Escape"===t.key&&(t.stopPropagation(),t.target.blur(),this.processBackToMapFromSearch())}selectSuggestedAddress(t){var r=this;return(0,W.A)(function*(){r.addAddressStep.set(0),r.suggestedAddressSelectSubject.next(t)})()}continueBtnClick(){const t=this.addAddressStep(),r=this.geocodedAddress();switch(t){case 0:case 3:this.addressEditorFormGroup.controls.country.setValue(r?.country??""),this.addressEditorFormGroup.controls.city.setValue(r?.city??""),this.addAddressStep.set(0===t?2:4);break;case 2:case 4:if(this.addressEditorFormGroup.invalid){this.addressEditorFormGroup.markAllAsTouched();const d=this.formControlDirectives();for(let E=0;E<d.length;E++)if(d[E].invalid){this.formControlElements()[E].nativeElement.scrollIntoView({behavior:"smooth",block:"center"});break}}else(0,te.iY)(r),this.addressSelected.emit({geoCoordinates:r.geoCoordinates,fullAddress:this.addressEditorFormGroup.controls.fullAddress.getRawValue(),country:this.addressEditorFormGroup.controls.country.value,city:this.addressEditorFormGroup.controls.city.getRawValue(),state:r.state,zip:r.zip,apt:this.addressEditorFormGroup.controls.apt.value,floor:this.addressEditorFormGroup.controls.floor.value,entrance:this.addressEditorFormGroup.controls.entrance.value,intercom:this.addressEditorFormGroup.controls.intercom.value,details:this.addressEditorFormGroup.controls.comment.value})}}findMyLocationClick(){if(this.document.defaultView){const t=this.googleMapComponent();(0,te.iY)(t),(0,U.H)(re.BY.getCurrentPosition(this.document.defaultView.navigator)).pipe((0,Ce.Q)(t.centerChanged.pipe((0,q.$)())),(0,N.W)(()=>h.t),(0,x.pQ)(this.destroyRef)).subscribe(r=>{this.ignoreNextMapCenterChangeInGeocoding=!1,t.panTo({lat:r.coords.latitude,lng:r.coords.longitude}),t.googleMap?.setZoom(17)})}}resetMapCenter(t){this.ignoreNextMapCenterChangeInGeocoding=!0;const r=(0,M.O8)(this.geocodedAddress);if(r)t.panTo({lat:r.geoCoordinates.latitude,lng:r.geoCoordinates.longitude}),t.googleMap?.setZoom(17);else{const d=re.BY.getBounds({deliveryZones:this.deliveryZones()});if(d)t.fitBounds(le.Y.toLatLngBounds(d),50);else{const E=(0,M.O8)(this.defaultMapCenter)??re.BY.getFallbackMapCenter(this.tenantService.tenant.country);t.panTo({lat:E.latitude,lng:E.longitude}),t.googleMap?.setZoom(15)}}}processBackToMapFromSearch(){this.addAddressStep.set(0);const t=this.geocodedAddress();if(t){const r=t.fullAddress;this.addressSearchFormControl.value!==r&&this.addressSearchFormControl.setValue(r)}this.addressSearchFormControl.dirty&&this.showCannotFindAddressBtn.set(!0)}isGeoPointValid(t,r){return!r?.length||re.BY.isPointWithinDeliveryZone(t,r)}getMapPolygons(t){const r=[];if(t?.length)for(const d of t)if(d.deliveryZonePolygons.length)for(const E of d.deliveryZonePolygons){const T=[];for(const c of E)T.push({lat:c.latitude,lng:c.longitude});r.push({coordinates:T,polygonOptions:{strokeColor:(0,_e.H)(d.deliveryZoneStrokeColor),fillColor:(0,_e.H)(d.deliveryZoneFillColor),fillOpacity:d.deliveryZoneFillColor.a}})}return r}static{this.\u0275fac=function(r){return new(r||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["yp-address-selection-google-maps"]],viewQuery:function(r,d){1&r&&e.wEZ(d.googleMapComponent,k.u6,5)(d.addressSearchTextArea,Te,5)(d.currentGeoPositionButton,De,5)(d.cdkTextareaAutosize,P.xb,5)(d.formControlDirectives,n.l_,5)(d.formControlElements,n.l_,5,e.aKT)(d.suggestedAddressHtmlElements,Re,5,e.aKT),2&r&&e.NyB(7)},inputs:{defaultMapCenter:[1,"defaultMapCenter"],deliveryZones:[1,"deliveryZones"],showBackButton:[1,"showBackButton"]},outputs:{addressSelected:"addressSelected",backButtonClick:"backButtonClick"},decls:24,vars:10,consts:[["currentGeoPositionButton",""],["templateRefMap",""],["templateRefAddressSearch",""],["templateRefAddressSearchResults",""],["templateRefControlsAndMessages",""],["templateRefAddressEditor",""],["addressSearchTextArea",""],["suggestedAddressElementRef",""],[1,"d-none"],["type","button",1,"current-geo-position-button",3,"click"],[3,"svgIcon"],[1,"add-address-main-wrapper","h-100",3,"class"],[1,"add-address-main-wrapper",3,"class"],[1,"map-content-wrapper"],["height","100%","width","100%",1,"w-100","h-100",3,"mapClick","mapDragstart","mapDblclick","zoom","options"],[3,"paths","options"],[3,"position"],[1,"map-center-anchor"],["width","30","height","48","viewBox","0 0 30 48","fill","none","xmlns","http://www.w3.org/2000/svg",1,"map-pin"],["d","M14.9989 47.7422C18.916 47.7422 22.0915 46.6815 22.0915 45.373C22.0915 44.0646 18.916 43.0039 14.9989 43.0039C11.0817 43.0039 7.90625 44.0646 7.90625 45.373C7.90625 46.6815 11.0817 47.7422 14.9989 47.7422Z","fill","black","fill-opacity","0.2"],["d","M13.125 44.061
15V22.873C13.125 21.8375 13.9645 20.998 15 20.998C16.0355 20.998 16.875 21.8375 16.875 22.873V44.0615C16.8749 45.0969 16.0355 45.9365 15 45.9365C13.9645 45.9365 13.1251 45.0969 13.125 44.0615Z","fill","#FF0000"],["d","M14.999 25.0947C21.6108 25.0947 26.9707 19.7348 26.9707 13.123C26.9707 6.51127 21.6108 1.15137 14.999 1.15137C8.38725 1.15137 3.02734 6.51127 3.02734 13.123C3.02734 19.7348 8.38725 25.0947 14.999 25.0947Z","fill","#FF0000"],["d","M10.875 11.623C12.3247 11.623 13.5 10.4478 13.5 8.99805C13.5 7.5483 12.3247 6.37305 10.875 6.37305C9.42525 6.37305 8.25 7.5483 8.25 8.99805C8.25 10.4478 9.42525 11.623 10.875 11.623Z","fill","white","fill-opacity","0.5"],[3,"spinnerType","position"],[3,"polygonClick","paths","options"],[1,"address-search-control","w-100",3,"appearance","subscriptSizing"],["rows","1","maxlength","255","autocomplete","off","matInput","",3,"input","focus","blur","keydown","cdkTextareaAutosize","formControl"],["matSuffix","",1,"me-3",2,"min-width","24px"],[3,"spinnerType","diameter"],[1,"address-search-results"],[1,"suggested-addresses-list"],[1,"suggested-address",3,"suggested-address-active"],[1,"suggested-address",3,"mousedown"],[3,"fw-bolder"],[1,"yp-text-muted","fs-4"],[1,"manual-mode-map-notice"],[1,"d-flex","gap-2"],[1,"icon-sm",3,"svgIcon"],[1,"d-flex","flex-column"],[1,"mb-1"],[1,"fs-3"],[1,"yp-text-danger","fs-3","outside-of-delivery-zone-message"],["type","button",1,"my-3","yp-btn","yp-btn-sm","yp-btn-link","yp-btn-link-alt","yp-btn-link-no-padding","fs-3","cannot-find-address-btn"],["type","button",1,"my-3","yp-btn","yp-btn-sm","yp-btn-link","yp-btn-link-alt","yp-btn-link-no-padding","fs-3","cannot-find-address-btn",3,"click"],[1,"address-editor-wrapper"],[1,"w-100",3,"appearance","subscriptSizing"],["rows","1","maxlength","255","autocomplete","off","matInput","",3,"ypTrimInputValue","formControl","cdkTextareaAutosize"],[1,"fs-3","yp-text-muted"],[3,"appearance","subscriptSizing"],[1,"field-100"],["type","tel","matInput","",3,"formControl"],["type","text","matInput","",3,"formControl"],[3,"legalAgreementType","continueButtonText","formControl"],[1,"yp-form-field-error-wrapper"],[1,"add-address-main-wrapper","h-100"],[1,"yp-btn-dialog-close-wrapper"],["type","button","matRipple","",1,"yp-btn-dialog-close",3,"mat-dialog-close"],[1,"large-screen-layout"],[1,"large-screen-left-side"],[1,"yp-dialog-header-no-box-shadow",3,"backBtnClick","showBackButton","showCloseButton"],[1,"px-3","large-screen-left-side-scrollable-content"],[1,"large-screen-map-controls-wrapper"],[3,"ngTemplateOutlet"],[1,"flex-grow-1","overflow-auto","position-relative"],[2,"position","absolute","inset-block-start","0","inset-inline","0","z-index","1"],[1,"px-3","yp-bottom-buttons-wrapper"],[1,"large-screen-right-side"],[3,"buttonWithLoaderClick","spinnerType","disabled"],[1,"add-address-main-wrapper"],[3,"showBackButton","showCloseButton","backBtnClick",4,"ypProjectedHeader"],[1,"small-screen-layout"],[1,"map-layout-wrapper","h-100"],[1,"map-top-content","d-flex","flex-column","gap-2"],[1,"yp-bottom-buttons-wrapper"],[3,"backBtnClick","showBackButton","showCloseButton"],["class","yp-bottom-buttons-wrapper",4,"ypProjectedFooter"]],template:function(r,d){if(1&r&&(e.SS7(0)(1)(2)(3)(4)(5),e.nI1(6,"translate"),e.j41(7,"div",8)(8,"div",null,0)(10,"button",9),e.bIt("click",function(){return d.findMyLocationClick()}),e.nrm(11,"mat-icon",10),e.k0s()()(),e.DNE(12,Be,12,5,"ng-template",null,1,e.C5r)(14,Ie,8,9,"ng-template",null,2,e.C5r)(16,Le,2,1,"ng-template",null,3,e.C5r)(18,We,12,8,"ng-template",null,4,e.C5r)(20,u,37,42,"ng-template",null,5,e.C5r),e.nVh(22,L,20,16,"div",11)(23,Ve,11,8,"yp-fixed-header-footer",12)),2&r){const E=d.mapAlwaysShown();e.bH3(d.showHeaderBackButton()),e.R7$(),e.bH3(d.showBackButton()),e.R7$(),e.bH3(d.suggestedAddresses()),e.R7$(),e.bH3(d.isOutsideDeliveryZone()),e.R7$(),e.bH3(d.geocodedAddress()),e.R7$(),e.bH3(e.bMT(6,7,"COMMON.CONTINUE")),e.R7$(6),e.Y8G("svgIcon",d.SvgIconLazy.navigationPointer),e.R7$(11),e.vxM(E?22:23)}},dependencies:[n.X1,n.me,n.BC,n.tU,n.l_,ce.cU,ce.J0,Oe.B,P.xb,Pe.B,ye.F,j.TL,j.rl,X.An,J.fg,j.nJ,V.r6,j.yw,Se.t,Z.T3,se.tx,k.u6,k.tc,ce.xp,k.pu,ve.b,$.D9,m],styles:[".current-geo-position-button[_ngcontent-%COMP%]{background-color:#fff;border:none;outline:none;box-shadow:#0000004d 0 1px 4px -1px;border-radius:2px;width:40px;height:40px;margin:10px;display:flex;justify-content:center;align-items:center;font-size:18px}.large-screen-layout[_ngcontent-%COMP%]{height:100%;display:flex}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%]{min-width:25rem;max-width:30rem;flex-grow:1;flex-shrink:0;flex-basis:40%;padding-block-end:var(--yp-spacing-3);display:flex;flex-direction:column;overflow:hidden}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%] .large-screen-left-side-scrollable-content[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto;padding-block-start:var(--yp-spacing-3);margin-block-start:calc(var(--yp-spacing-3) * -1);display:flex;flex-direction:column}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%] .large-screen-map-controls-wrapper[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%] .address-editor-wrapper[_ngcontent-%COMP%]{padding-bottom:var(--yp-spacing-3)}.large-screen-layout[_ngcontent-%COMP%] .large-screen-right-side[_ngcontent-%COMP%]{flex-grow:1;min-width:0}.large-screen-layout[_ngcontent-%COMP%] .large-screen-right-side[_ngcontent-%COMP%] .map-content-wrapper[_ngcontent-%COMP%]{position:relative;height:100%}.small-screen-layout[_ngcontent-%COMP%]{height:100%}.small-screen-layout[_ngcontent-%COMP%] .map-layout-wrapper[_ngcontent-%COMP%]{position:relative}.small-screen-layout[_ngcontent-%COMP%] .map-layout-wrapper[_ngcontent-%COMP%] .map-top-content[_ngcontent-%COMP%]{position:absolute;inset-inline-start:0;z-index:4;width:100%;padding:var(--yp-spacing-3);background:var(--yp-body-bg)}.small-screen-layout[_ngcontent-%COMP%] .map-layout-wrapper[_ngcontent-%COMP%] .map-content-wrapper[_ngcontent-%COMP%]{position:absolute;inset-block:3.5rem 0;inset-inline:0}.small-screen-layout[_ngcontent-%COMP%] .address-editor-wrapper[_ngcontent-%COMP%]{padding:var(--yp-spacing-3)}.map-container[_ngcontent-%COMP%]{position:relative;z-index:1}.map-center-anchor[_ngcontent-%COMP%]{position:absolute;inset-block-start:50%;inset-inline-start:50%;width:0;height:0;pointer-events:none;z-index:2}.map-center-anchor[_ngcontent-%COMP%] .map-pin[_ngcontent-%COMP%]{position:absolute;inset-block-end:0;inset-inline-start:50%;transform:translate(-50%)}.address-editor-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--yp-spacing-2)}.address-search-results[_ngcontent-%COMP%]{overflow:auto}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%]{list-style:none;padding-inline:0;padding-block:var(--yp-spacing-2) 0;background:var(--yp-body-bg)}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]{padding-block:var(--yp-spacing-3);padding-inline:var(--yp-spacing-2);cursor:pointer}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]:not(:last-child){border-block-end:1px solid var(--yp-body-bg-shift3)}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]:hover{background:var(--yp-body-bg-shift1)}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]:active, .address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address.suggested-address-active[_ngcontent-%COMP%]{background:var(--yp-body-bg-shift2)}.add-address-main-wrapper.step-search-with-suggestions[_ngcontent-%COMP%] .small-screen-layout[_ngcontent-%COMP%] .map-content-wrapper[_ngcontent-%COMP%], .add-address-main-wrapper.step-search-with-suggestions[_ngcontent-%COMP%] .small-screen-layout[_ngcontent-%COMP%] .outside-of-delivery-zone-message[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper.step-search-with-suggestions[_ngcontent-%COMP%] .map-top-content[_ngcontent-%COMP%]{height:100%}
1.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions):not(.step-manual-mode-map) .large-screen-map-controls-wrapper[_ngcontent-%COMP%], .add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions):not(.step-manual-mode-map) .map-layout-wrapper[_ngcontent-%COMP%], .add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions):not(.step-manual-mode-map) .map-center-anchor[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions) .large-screen-layout[_ngcontent-%COMP%] .cannot-find-address-btn[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions) .address-search-control[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input) .small-screen-layout[_ngcontent-%COMP%] .cannot-find-address-btn[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-search-with-suggestions) .address-search-results[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-search-with-suggestions) .suggested-addresses-list[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-manual-mode-address-fields):not(.step-address-fields) .address-editor-wrapper[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-manual-mode-map) .manual-mode-map-notice[_ngcontent-%COMP%]{display:none}"],changeDetection:0})}}return o})()},7919(me,ne,s){s.d(ne,{M:()=>Ke});var W=s(10467),K=s(81535),P=s(37403),z=s(60177),Z=s(49769),A=s(17705),e=s(35547),i=s(85802),M=s(32271),x=s(89079),n=s(89417),k=s(68943),V=s(34006),se=s(99213),X=s(40100),J=s(26920),j=s(46822),$=s(68018),w=s(21413),U=s(84412),oe=s(57786),Q=s(7673),de=s(1807),h=s(35060),N=s(99437),_=s(70152),B=s(23294),F=s(5964),H=s(70980),q=s(96354),Y=s(25558),ee=s(96697),he=s(38008),Ce=s(15307),Me=s(64954),Ee=s(96645),pe=s(65873),fe=s(39507),ie=s(13810),ue=s(82749),ae=s(20036),te=s(88835),_e=s(95583),ge=s(44023),Ae=s(85988),le=s(30995),re=s(70578);const Oe=["ymap3Container"],Se=["suggestedAddressElementRef"];function ve(l,S){if(1&l&&(e.j41(0,"div",9),e.nrm(1,"div",10,5),e.j41(3,"div",11),i.qSk(),e.j41(4,"svg",12),e.nrm(5,"path",13)(6,"path",14)(7,"path",15)(8,"path",16),e.k0s()(),i.joV(),e.nrm(9,"yp-spinner",17),e.k0s()),2&l){const a=e.XpG();e.R7$(9),e.Y8G("spinnerType",a.spinnerOverMap)("position","absolute")}}function Pe(l,S){if(1&l){const a=e.RV6();e.j41(0,"mat-form-field",18)(1,"mat-label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"textarea",19),e.bIt("focus",function(){i.eBV(a);const u=e.XpG();return i.Njj(u.addressSearchFocus())})("blur",function(){i.eBV(a);const u=e.XpG();return i.Njj(u.addressSearchBlur())})("keydown",function(u){i.eBV(a);const D=e.XpG();return i.Njj(D.addressSearchKeyDown(u))}),e.k0s(),e.j41(5,"div",20),e.nrm(6,"yp-spinner",21),e.k0s()()}if(2&l){const a=e.XpG();e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(3,7,"ADDRESS.SELECTION.ADD_ADDRESS.INPUT.SEARCH.LABEL")),e.R7$(2),e.Y8G("cdkTextareaAutosize",!0)("formControl",a.addressSearchFormControl),e.R7$(2),e.Y8G("spinnerType",a.spinnerOnAddressSearchInput)("diameter",24)}}function ce(l,S){if(1&l&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&l){const a=S.$implicit;e.AVh("fw-bolder",a.isMatch),e.R7$(),e.JRh(a.value)}}function ye(l,S){if(1&l&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&l){const a=S.$implicit;e.AVh("fw-bolder",a.isMatch),e.R7$(),e.JRh(a.value)}}function Te(l,S){if(1&l){const a=e.RV6();e.j41(0,"li",25,6),e.bIt("mousedown",function(){const u=i.eBV(a).$implicit,D=e.XpG(3);return i.Njj(D.selectSuggestedAddress(u))}),e.j41(2,"div"),e.Z7z(3,ce,2,3,"span",26,e.Vm6),e.nI1(5,"ypYandexMapSuggestHighlight"),e.k0s(),e.j41(6,"div",27),e.Z7z(7,ye,2,3,"span",26,e.Vm6),e.nI1(9,"ypYandexMapSuggestHighlight"),e.k0s()()}if(2&l){const a=S.$implicit,p=S.$index,u=e.XpG(3);e.AVh("suggested-address-active",u.activeSuggestedAddressIndex()===p),e.R7$(3),e.Dyx(e.bMT(5,2,a.title)),e.R7$(4),e.Dyx(e.bMT(9,4,a.subtitle))}}function De(l,S){if(1&l&&(e.j41(0,"ul",23),e.vzT("yp-animation-sli
1de-up-out"),e.QR4("yp-animation-slide-down-in"),e.Z7z(1,Te,10,6,"li",24,e.fX1),e.k0s()),2&l){e.XpG(2);const a=e.r8f(2);e.R7$(),e.Dyx(a)}}function Re(l,S){if(1&l&&(e.j41(0,"div",22),e.nVh(1,De,3,0,"ul",23),e.k0s()),2&l){e.XpG();const a=e.r8f(2);e.R7$(),e.vxM(a.length?1:-1)}}function be(l,S){1&l&&(e.j41(0,"div",34),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&l&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"ADDRESS.SELECTION.OUTSIDE_DELIVERY_AREA.MESSAGE")," "))}function xe(l,S){if(1&l){const a=e.RV6();e.j41(0,"button",36),e.bIt("click",function(){i.eBV(a);const u=e.XpG(2);return i.Njj(u.cannotFindAddressClick())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&l&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"ADDRESS.SELECTION.ADD_ADDRESS.SWITCH_TO_MANUAL_MODE.BUTTON.LABEL")," "))}function Be(l,S){if(1&l&&(e.j41(0,"div",28)(1,"div",29),e.nrm(2,"mat-icon",30),e.j41(3,"div",31)(4,"h6",32),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"div",33),e.EFF(8),e.nI1(9,"translate"),e.k0s()()()(),e.nVh(10,be,3,3,"div",34)(11,xe,3,3,"button",35)),2&l){const a=e.XpG(),p=e.r8f(3);e.R7$(2),e.Y8G("svgIcon",a.SvgIcon.infoCircle),e.R7$(3),e.JRh(e.bMT(6,4,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.MAP_INSTRUCTIONS.MESSAGE")),e.R7$(3),e.JRh(e.bMT(9,6,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.MAP_INSTRUCTIONS.DETAILS")),e.R7$(2),e.vxM(p?10:a.showCannotFindAddressBtn()?11:-1)}}function Ie(l,S){1&l&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&l&&(e.R7$(),e.JRh(e.bMT(2,1,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.FULL_ADDRESS.ERROR.REQUIRED")))}function Ge(l,S){1&l&&(e.j41(0,"div",40),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&l&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"ADDRESS.SELECTION.ADD_ADDRESS.MANUAL_MODE.EDITOR_INSTRUCTIONS.MESSAGE")," "))}function Fe(l,S){1&l&&(e.j41(0,"div",45)(1,"mat-error"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&l&&(e.R7$(2),e.JRh(e.bMT(3,1,"TERMS_AGREEMENT.CHECKBOX.ERROR")))}function ke(l,S){if(1&l&&(e.j41(0,"div"),e.nrm(1,"yp-legal-agreement",44),e.nVh(2,Fe,4,3,"div",45),e.k0s()),2&l){const a=e.XpG(2),p=e.r8f(4);e.R7$(),e.Y8G("legalAgreementType",a.tenant.legalAgreementSignIn)("continueButtonText",p)("formControl",a.addressEditorFormGroup.controls.legalAgreement),e.R7$(),e.vxM(a.addressEditorFormGroup.controls.legalAgreement.invalid&&(a.addressEditorFormGroup.controls.legalAgreement.dirty||a.addressEditorFormGroup.controls.legalAgreement.touched)?2:-1)}}function we(l,S){if(1&l&&(e.j41(0,"div",37)(1,"div")(2,"mat-form-field",38)(3,"mat-label"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.nrm(6,"textarea",39),e.nVh(7,Ie,3,3,"mat-error"),e.k0s(),e.nVh(8,Ge,3,3,"div",40),e.k0s(),e.j41(9,"mat-form-field",41)(10,"mat-label"),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.nrm(13,"input",42),e.k0s(),e.j41(14,"mat-form-field",41)(15,"mat-label"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.nrm(18,"input",43),e.k0s(),e.j41(19,"mat-form-field",41)(20,"mat-label"),e.EFF(21),e.nI1(22,"translate"),e.k0s(),e.nrm(23,"input",43),e.k0s(),e.j41(24,"mat-form-field",41)(25,"mat-label"),e.EFF(26),e.nI1(27,"translate"),e.k0s(),e.nrm(28,"input",43),e.k0s(),e.j41(29,"mat-form-field",41)(30,"mat-label"),e.EFF(31),e.nI1(32,"translate"),e.k0s(),e.nrm(33,"input",43),e.k0s(),e.nVh(34,ke,3,4,"div"),e.k0s()),2&l){const a=e.XpG();e.R7$(2),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(5,28,"ADDRESS.SELECTION.ADD_ADDRESS.INPUT.SEARCH.LABEL")),e.R7$(2),e.Y8G("formControl",a.addressEditorFormGroup.controls.fullAddress)("cdkTextareaAutosize",!0),e.R7$(),e.vxM(a.addressEditorFormGroup.controls.fullAddress.hasError("required")?7:-1),e.R7$(),e.vxM(a.addressEditorFormGroup.controls.fullAddress.disabled?8:-1),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(12,30,"SHOPPING_CART.FLAT")),e.R7$(2),e.Y8G("formControl",a.addressEditorFormGroup.controls.apt),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(17,32,"SHOPPING_CART.FLOOR")),e.R7$(2),e.Y8G("formControl",a.addressEditorFormGroup.controls.floor),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(22,34,"SHOPPING_CART.ENTRANCE")),e.R7$(2),e.Y8G("formControl",a.addressEditorFormGroup.controls.entrance),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(27,36,"SHOPPING_CART.INTERCOM")),e.R7$(2),e.Y8G("formControl",a.addressEditorFormGroup.controls.intercom),e.R7$(),e.Y8G("appearance","outline")("subscriptSizing","dynamic"),e.R7$(2),e.JRh(e.bMT(32,38,"SHOPPING_CART.COMMENT")),e.R7$(2),e.Y8G("formControl",a.addressEditorFormGroup.controls.comment),e.R7$(),e.vxM(a.tenant.legalAgreementSignIn!==a.TermsAgreementType.empty&&a.tenant.country===a.COUNTRY_ISO3166_CODES_MAP.RU?34:-1)}}function Le(l,S){if(1&l){const a=e.RV6();e.j41(0,"div",57)(1,"yp-button-with-loader",59),e.bIt("buttonWithLoaderClick",function(){i.eBV(a);const u=e.XpG(2);return i.Njj(u.continueBtnClick())}),e.EFF(2),e.k0s()()}if(2&l){const a=e.XpG(2),p=e.r8f(4);e.R7$(),e.Y8G("spinnerType",a.spinnerOnContinueButton)("disabled",a.continueButtonDisabled()),e.R7$(),e.SpI(" ",p," ")}}function je(l,S){if(1&l){const a=e.RV6();e.j41(0,"div",46)(1,"div",47),e.nrm(2,"button",48),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",49)(5,"div",50)(6,"yp-dialog-header",51),e.bIt("backBtnClick",function(){i.eBV(a);const u=e.XpG();return i.Njj(u.backBtnClick())}),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"div",52)(10,"div",53),e.eu8(11,54),e.j41(12,"div",55)(13,"div",56),e.eu8(14,54),e.k0s(),e.eu8(15,54),e.k0s()(),e.eu8(16,54),e.k0s(),e.nVh(17,Le,3,3,"div",57),e.k0s(),e.j41(18,"div",58),e.eu8(19,54),e.k0s()()()}if(2&l){const a=e.XpG(),p=e.sdS(7),u=e.sdS(9),D=e.sdS(11),L=e.sdS(13),R=e.sdS(15),b=e.r8f(0),I=e.r8f(1);e.HbH(a.addAddressStepCssClass()),e.R7$(2),e.BMQ("aria-label",e.bMT(3,12,"COMMON.CLOSE")),e.R7$(4),e.Y8G("showBackButton",b||I)("showCloseButton",!1),e.R7$(),e.SpI(" ",e.bMT(8,14,a.headerTitle())," "),e.R7$(4),e.Y8G("ngTemplateOutlet",u),e.R7$(3),e.Y8G("ngTemplateOutlet",D),e.R7$(),e.Y8G("ngTemplateOutlet",L),e.R7$(),e.Y8G("ngTemplateOutlet",R),e.R7$(),e.vxM(a.showContinueBtn()?17:-1),e.R7$(2),e.Y8G("ngTemplateOutlet",p)}}function Ne(l,S){if(1&l){const a=e.RV6();e.j41(0,"yp-dialog-header",66),e.bIt("backBtnClick",function(){i.eBV(a);const u=e.XpG(2);return i.Njj(u.backBtnClick())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&l){const a=e.XpG(2),p=e.r8f(0),u=e.r8f(1);e.Y8G("showBackButton",p||u)("showCloseButton",!p),e.R7$(),e.SpI(" ",e.bMT(2,3,a.headerTitle())," ")}}function We(l,S){if(1&l){const a=e.RV6();e.j41(0,"div",65)(1,"yp-button-with-loader",59),e.bIt("buttonWithLoaderClick",function(){i.eBV(a);const u=e.XpG(3);return i.Njj(u.continueBtnClick())}),e.EFF(2),e.k0s()()}if(2&l){const a=e.XpG(3),p=e.r8f(4);e.R7$(),e.Y8G("spinnerType",a.spinnerOnContinueButton)("disabled",a.continueButtonDisabled()),e.R7$(),e.SpI(" ",p," ")}}function $e(l,S){1&l&&e.DNE(0,We,3,3,"div",67)}function Ue(l,S){if(1&l&&(e.j41(0,"yp-fixed-header-footer",60),e.DNE(1,Ne,3,5,"yp-dialog-header",61),e.j41(2,"div",62)(3,"div",63)(4,"div",64),e.eu8(5,54)(6,54)(7,54),e.k0s(),e.eu8(8,54),e.k0s(),e.eu8(9,54),e.k0s(),e.nVh(10,$e,1,0,"div",65),e.k0s()),2&l){const a=e.XpG(),p=e.sdS(7),u=e.sdS(9),D=e.sdS(11),L=e.sdS(13),R=e.sdS(15);e.HbH(a.addAddressStepCssClass()),e.R7$(5),e.Y8G("ngTemplateOutlet",u),e.R7$(),e.Y8G("ngTemplateOutlet",D),e.R7$(),e.Y8G("ngTemplateOutlet",L),e.R7$(),e.Y8G("ngTemplateOutlet",p),e.R7$(),e.Y8G("ngTemplateOutlet",R),e.R7$(),e.vxM(a.showContinueBtn()?10:-1)}}let Ye=(()=>{class l{transform(a){const p=[];if(a&&a.text){const u=a.text,D=a.hl||[];if(0===D.length)p.push({value:u,isMatch:!1});else{const L=[...D].sort((b,I)=>b.begin-I.begin);let R=0;for(const b of L)b.begin>=R&&(b.begin>R&&p.push({value:u.slice(R,b.begin),isMatch:!1}),p.push({value:u.slice(b.begin,b.end),isMatch:!0}),R=b.end);R<u.length&&p.push({value:u.slice(R),isMatch:!1})}}return p}static{this.\u0275fac=function(p){return new(p||l)}}static{this.\u0275pipe=e.EJ8({name:"ypYandexMapSuggestHighlight",type:l,pure:!0})}}return l})(),Ke=(()=>{class l{constructor(){var a=this;this.defaultMapCenter=(0,A.hFB)(),this.deliveryZones=(0,A.hFB)(),this.showBackButton=(0,A.hFB)(!1),this.addressSelected=(0,A.CGW)(),this.backButtonClick=(0,A.CGW)(),this.tenant=(0,i.WQX)(Ce.$),this.breakpointObserver=(0,i.WQX)(K.Q),this.yandexMapsService=(0,i.WQX)(fe.k),this.spinnerService=(0,i.WQX)(pe.D),this.ymap3Container=A.ebz.required("ymap3Container",{read:e.aKT}),this.cdkTextareaAutosize=(0,A.dtW)(P.xb),this.formControlDirectives=(0,A.dtW)(n.l_),this.formControlElements=(0,A.dtW)(n.l_,{read:e.aKT}),this.suggestedAddressHtmlElements=(0,A.dtW)("suggestedAddressElementRef",{read:e.aKT}),this.COUNTRY_ISO3166_CODES_MAP=he.t,this.TermsAgreementType=Ee.C,this.SvgIcon=Me.h,this.mapAlwaysShown=(0,x.ot)(this.breakpointObserver.observe("(min-width: 768px)").pipe((0,q.T)(m=>m.matches)),{requireSync:!0}),this.addAddressStep=(0,i.vPA)(0),this.addAddressStepCssClass=(0,M.EW)(()=>
1{switch(this.addAddressStep()){case 0:return"step-map-with-search-input";case 1:return"step-search-with-suggestions";case 2:return"step-address-fields";case 3:return"step-manual-mode-map";case 4:return"step-manual-mode-address-fields"}}),this.showHeaderBackButton=(0,M.EW)(()=>{let m;return m=this.mapAlwaysShown()?[2,4]:[1,2,4],m.includes(this.addAddressStep())}),this.headerTitle=(0,M.EW)(()=>{if(this.mapAlwaysShown())return"ADDRESS.SELECTION.ADD_ADDRESS.TITLE";switch(this.addAddressStep()){case 1:return"ADDRESS.SELECTION.ADD_ADDRESS.SEARCH.TITLE";case 2:case 3:case 4:case 0:return"ADDRESS.SELECTION.ADD_ADDRESS.TITLE"}}),this.showContinueBtn=(0,M.EW)(()=>this.mapAlwaysShown()||1!==this.addAddressStep()),this.continueButtonDisabled=(0,M.EW)(()=>{if(this.geocodingInProgress())return!0;const m=this.geocodedAddress();switch(this.addAddressStep()){case 0:case 1:return!m.geoObject||!["house","entrance"].includes(m.geoObject.metaDataProperty.GeocoderMetaData.kind)||this.isOutsideDeliveryZone();case 3:case 2:case 4:return!m.geoObject&&!m.userPointedGeoCoordinates||this.isOutsideDeliveryZone()}}),this.suggestedAddresses=(0,i.vPA)([]),this.activeSuggestedAddressIndex=(0,M.uu)(()=>{this.suggestedAddresses()}),this.geocodedAddress=(0,i.vPA)({}),this.isOutsideDeliveryZone=(0,M.EW)(()=>{let m=!1;const C=this.geocodedAddress();return C.userPointedGeoCoordinates?m=!this.isGeoPointValid(C.userPointedGeoCoordinates,this.deliveryZones()):C.geoObject&&(m=!this.isGeoPointValid(this.yandexMapsService.parseYandexMapGeoString(C.geoObject.Point.pos),this.deliveryZones())),m}),this.showCannotFindAddressBtn=(0,i.vPA)(!1),this.spinnerOnAddressSearchInput=this.spinnerService.generateSpinnerType(),this.spinnerOnContinueButton=this.spinnerService.generateSpinnerType(),this.spinnerOverMap=this.spinnerService.generateSpinnerType(),this.addressSearchFormControl=new n.MJ("",{nonNullable:!0}),this.addressEditorFormGroup=new n.gE({fullAddress:new n.MJ("",{nonNullable:!0,validators:[n.k0.required]}),apt:new n.MJ("",{nonNullable:!0}),floor:new n.MJ("",{nonNullable:!0}),entrance:new n.MJ("",{nonNullable:!0}),intercom:new n.MJ("",{nonNullable:!0}),comment:new n.MJ("",{nonNullable:!0}),legalAgreement:new n.MJ(!1,{nonNullable:!0})}),this.geocodingInProgress=(0,i.vPA)(!1),this.suggestedAddressSelectSubject=new w.B,(0,ie.hN)((0,z.Vy)((0,i.WQX)(e.Agw)),!1);const p=(0,i.WQX)(i.SKi),u=(0,i.WQX)(A.gRc),D=(0,i.vPA)(void 0),L=(0,M.EW)(()=>[2,4].includes(this.addAddressStep())),R=new w.B,b=new U.t(!1),I=new w.B,Ve=(0,x.br)(this.addAddressStep);(0,i.QZP)(()=>{const m=L();(0,M.O8)(()=>{m?(this.addressEditorFormGroup.controls.fullAddress.setValue(this.geocodedAddress().geoObject?.metaDataProperty?.GeocoderMetaData?.Address?.formatted??""),this.addressEditorFormGroup.controls.fullAddress.value&&this.addressEditorFormGroup.controls.fullAddress.disable()):(this.addressEditorFormGroup.controls.fullAddress.setValue(this.geocodedAddress().geoObject?.metaDataProperty?.GeocoderMetaData?.Address?.formatted??""),this.addressEditorFormGroup.controls.fullAddress.enable())})}),(0,A.uEv)({read:()=>{this.addAddressStep();for(const m of(0,M.O8)(this.cdkTextareaAutosize))m.resizeToFitContent(!0)}}),(0,A.uEv)({read:()=>{const m=this.activeSuggestedAddressIndex(),C=this.suggestedAddressHtmlElements();void 0===m?C.length&&C.at(0)?.nativeElement.scrollIntoView({block:"start",behavior:"instant"}):C.at(m)?.nativeElement.scrollIntoView({block:"nearest",behavior:"smooth"})}}),(0,A.uEv)({read:m=>{const C=this.ymap3Container(),o=(0,M.O8)(this.geocodedAddress),g=(0,M.O8)(this.defaultMapCenter),t=(0,M.O8)(this.deliveryZones);p.runOutsideAngular((0,W.A)(function*(){const r={min:4,max:20};let d,E;if(o.geoObject)d={center:a.yandexMapsService.parseYandexMapGeoString(o.geoObject.Point.pos,!0),zoom:15};else if(o.userPointedGeoCoordinates)d={center:[o.userPointedGeoCoordinates.longitude,o.userPointedGeoCoordinates.latitude],zoom:15};else{const O=ae.BY.getBounds({deliveryZones:t});if(O)d={bounds:a.yandexMapsService.toYandexMapsBounds(O)},E=[50,50,50,50];else if(g)d={center:[g.longitude,g.latitude],zoom:11};else{const y=ae.BY.getFallbackMapCenter(a.tenant.country);d={center:[y.longitude,y.latitude],zoom:r.min}}}const T=new ymaps3.YMap(C.nativeElement,{location:d,margin:E,zoomRange:r});T.addChild(new ymaps3.YMapDefaultSchemeLayer({})),T.addChild(new ymaps3.YMapDefaultFeaturesLayer({}));const{YMapZoomControl:c,YMapGeolocationControl:f}
1=yield s.e(5893).then(s.bind(s,95893)),G=new ymaps3.YMapControls({position:"right"});G.addChild(new c({})),G.addChild(new f({onGeolocatePosition:O=>R.next({longitude:O[0],latitude:O[1]})})),T.addChild(G),T.addChild(new ymaps3.YMapListener({onActionStart:O=>{b.next(!0)},onActionEnd:O=>{b.next(!1),R.next({longitude:O.location.center[0],latitude:O.location.center[1]})},onUpdate:O=>{I.next()},onClick:(O,y)=>{T.setLocation({center:y.coordinates,duration:400}),R.next({longitude:y.coordinates[0],latitude:y.coordinates[1]})}})),D.set(T),m(()=>T.destroy())}))}}),(0,i.QZP)(m=>{const C=D();if(C){const o=this.deliveryZones();if(o?.length){const g=new ymaps3.YMapCollection({});for(const t of o){const r=[];for(const E of t.deliveryZonePolygons){const T=[];for(const c of E)T.push([c.longitude,c.latitude]);r.push(T)}const d=new ymaps3.YMapFeature({geometry:{type:"Polygon",coordinates:r},style:{stroke:[{width:2,color:(0,ue.uB)(t.deliveryZoneStrokeColor)}],fill:(0,ue.uB)(t.deliveryZoneFillColor)}});g.addChild(d)}C.addChild(g),m(()=>C.removeChild(g))}}}),(0,i.QZP)(function(){var m=(0,W.A)(function*(C){const o=D();if(o){let g;const t=(0,M.O8)(a.geocodedAddress);if(t.geoObject?g=a.yandexMapsService.parseYandexMapGeoString(t.geoObject.Point.pos,!0):t.userPointedGeoCoordinates&&(g=[t.userPointedGeoCoordinates.longitude,t.userPointedGeoCoordinates.latitude]),L()){(0,ie.iY)(g);const{YMapDefaultMarker:r}=yield s.e(5893).then(s.bind(s,95893)),d=new r({coordinates:g});o.addChild(d),C(()=>o.removeChild(d))}g&&o.setLocation({center:g,zoom:17,duration:500})}});return function(C){return m.apply(this,arguments)}}()),this.addressSearchFormControl.valueChanges.pipe((0,_.B)(500),(0,q.T)(m=>m.trim()),(0,B.F)(),(0,Y.n)(m=>Ve.pipe((0,F.p)(C=>1===C),(0,ee.s)(1),(0,Y.n)(()=>{let C;if(m.length<2)C=(0,Q.of)([]);else{const o=ae.BY.getBounds({deliveryZones:this.deliveryZones()});this.spinnerService.addSpinner(this.spinnerOnAddressSearchInput),C=this.yandexMapsService.suggest(m,o).pipe((0,N.W)(g=>(console.error("[YP]","Yandex Maps Suggest error",g),(0,Q.of)([]))),(0,H.j)(()=>this.spinnerService.removeSpinner(this.spinnerOnAddressSearchInput)))}return C}))),(0,x.pQ)()).subscribe(m=>{this.suggestedAddresses.set(m)}),(0,oe.h)(R.pipe((0,q.T)(m=>({geoCoordinates:m})),(0,F.p)(()=>!L())),I.pipe((0,j.YQ)(()=>b),(0,F.p)(([,m])=>m),(0,q.T)(()=>{})),this.suggestedAddressSelectSubject.pipe((0,B.F)(),(0,q.T)(m=>({suggestedAddress:m})))).pipe((0,Y.n)(m=>{if(void 0===m)return h.t;let C,o;return void 0!==m.suggestedAddress?(C=this.spinnerOverMap,o=200):(C=[3,2,4].includes(this.addAddressStep())?this.spinnerOnContinueButton:this.spinnerOnAddressSearchInput,o=1e3),this.spinnerService.addSpinner(C),this.geocodingInProgress.set(!0),(0,de.O)(o).pipe((0,Y.n)(()=>m.geoCoordinates&&!this.isGeoPointValid(m.geoCoordinates,this.deliveryZones())?(0,Q.of)({params:m,geoObjects:[]}):this.yandexMapsService.geocode(m).pipe((0,N.W)(g=>(console.error("[YP]","Yandex Maps Geocoder error",g),(0,Q.of)([]))),(0,q.T)(g=>({params:m,geoObjects:g})))),(0,H.j)(()=>{this.spinnerService.removeSpinner(C),this.geocodingInProgress.set(!1)}))}),(0,x.pQ)()).subscribe(({params:m,geoObjects:C})=>{const o=D();if(o){const g=3===this.addAddressStep();let t,d,r="";C.length?(t=C.find(E=>"house"===E.metaDataProperty.GeocoderMetaData.kind),void 0===t&&(t=C[0],this.showCannotFindAddressBtn.set(!0)),g||o.setLocation({center:this.yandexMapsService.parseYandexMapGeoString(t.Point.pos,!0),zoom:m.suggestedAddress?17:void 0,duration:m.suggestedAddress?1e3:500}),r=t.metaDataProperty.GeocoderMetaData.Address.formatted):this.showCannotFindAddressBtn.set(!0),(g||!C.length)&&(d=m.geoCoordinates),this.addressSearchFormControl.value!==r&&(this.addressSearchFormControl.setValue(r),u.markForCheck()),this.geocodedAddress.set({geoObject:t,userPointedGeoCoordinates:d})}})}backBtnClick(){if(this.showHeaderBackButton()){const a=this.addAddressStep();1===a?this.processBackToMapFromSearch():this.addAddressStep.set(4===a?3:0)}else this.backButtonClick.emit()}cannotFindAddressClick(){this.addAddressStep.set(3)}addressSearchFocus(){this.addAddressStep.set(1)}addressSearchBlur(){this.mapAlwaysShown()&&this.processBackToMapFromSearch()}addressSearchKeyDown(a){const p=this.suggestedAddresses();if(p.length){const u=this.activeSuggestedAddressIndex();switch(a.key){case"ArrowDown":a.preventDefault(),this.activeSuggestedAddressIndex.set(((u??-1)+1)%p.length);break;case"ArrowUp":a.preventDefault(),this.activeSuggestedAddressIndex.set(((u??0)-1+p.length)%p.length);break;case"Enter":void 0!==u&&(a.preventDefault(),this.selectSuggestedAddress(p[u]))}}"Escape"===a.key&&(a.stopPropagation(),a.target.blur(),this.processBackToMapFromSearch())}selectSuggestedAddress(a){this.addAddressStep.set(0),this.addressSearchFormControl.setValue(a.address.formatted_address),this.suggestedAddressSelectSubject.next(a)}continueBtnClick(){switch(this.addAddressStep()){case 0:this.addAddressStep.set(2);break;case 3:this.addAddressStep.set(4);break;case 2:case 4:if(this.addressEditorFormGroup.invalid){this.addressEditorFormGroup.markAllAsTouched();const p=this.formControlDirectives();for(let u=0;u<p.length;u++)if(p[u].invalid){this.formControlElements()[u].nativeElement.scrollIntoView({behavior:"smooth",block:"center"});break}}else{const p=this.geocodedAddress();let u,D,L,R,b;p.geoObject?(u=this.yandexMapsService.parseYandexMapGeoString(p.geoObject.Point.pos),D=p.geoObject?.metaDataProperty.GeocoderMetaData.Address.Components.find(I=>"country"===I.kind)?.name,L=p.geoObject?.metaDataProperty.GeocoderMetaData.Address.Components.find(I=>"locality"===I.kind)?.name,R=p.geoObject?.metaDataProperty.GeocoderMetaData.Address.Components.find(I=>"province"===I.kind)?.name,void 0===R&&(R=p.geoObject?.metaDataProperty.GeocoderMetaData.Address.Components.find(I=>"area"===I.kind)?.name),b=p.geoObject?.metaDataProperty.GeocoderMetaData.Address.postal_code):p.userPointedGeoCoordinates&&(u=p.userPointedGeoCoordinates),(0,ie.iY)(u),this.addressSelected.emit({geoCoordinates:u,fullAddress:this.addressEditorFormGroup.controls.fullAddress.getRawValue(),country:D??"",city:L??"",state:R??"",zip:b??"",apt:this.addressEditorFormGroup.controls.apt.value,floor:this.addressEditorFormGroup.controls.floor.value,entrance:this.addressEditorFormGroup.controls.entrance.value,intercom:this.addressEditorFormGroup.controls.intercom.value,details:this.addressEditorFormGroup.controls.comment.value})}}}processBackToMapFromSearch(){this.addAddressStep.set(0);const a=this.geocodedAddress();if(a.geoObject){const p=a.geoObject.metaDataProperty.GeocoderMetaData.Address.formatted;this.addressSearchFormControl.value!==p&&this.addressSearchFormControl.setValue(p)}this.addressSearchFormControl.dirty&&this.showCannotFindAddressBtn.set(!0)}isGeoPointValid(a,p){return!p?.length||ae.BY.isPointWithinDeliveryZone(a,p)}static{this.\u0275fac=function(p){return new(p||l)}}static{this.\u0275cmp=e.VBU({type:l,selectors:[["yp-address-selection-yandex-maps"]],viewQuery:function(p,u){1&p&&e.wEZ(u.ymap3Container,Oe,5,e.aKT)(u.cdkTextareaAutosize,P.xb,5)(u.formControlDirectives,n.l_,5)(u.formControlElements,n.l_,5,e.aKT)(u.suggestedAddressHtmlElements,Se,5,e.aKT),2&p&&e.NyB(5)},inputs:{defaultMapCenter:[1,"defaultMapCenter"],deliveryZones:[1,"deliveryZones"],showBackButton:[1,"showBackButton"]},outputs:{addressSelected:"addressSelected",backButtonClick:"backButtonClick"},decls:18,vars:8,consts:[["templateRefMap",""],["templateRefAddressSearch",""],["templateRefAddressSearchResults",""],["templateRefControlsAndMessages",""],["templateRefAddressEditor",""],["ymap3Container",""],["suggestedAddressElementRef",""],[1,"add-address-main-wrapper","h-100",3,"class"],[1,"add-address-main-wrapper",3,"class"],[1,"map-content-wrapper"],[1,"map-container","h-100"],[1,"map-center-anchor"],["width","30","height","48","viewBox","0 0 30 48","fill","none","xmlns","http://www.w3.org/2000/svg",1,"map-pin"],["d","M14.9989 47.7422C18.916 47.7422 22.0915 46.6815 22.0915 45.373C22.0915 44.0646 18.916 43.0039 14.9989 43.0039C11.0817 43.0039 7.90625 44.0646 7.90625 45.373C7.90625 46.6815 11.0817 47.7422 14.9989 47.7422Z","fill","black","fill-opacity","0.2"],["d","M13.125 44.061
15V22.873C13.125 21.8375 13.9645 20.998 15 20.998C16.0355 20.998 16.875 21.8375 16.875 22.873V44.0615C16.8749 45.0969 16.0355 45.9365 15 45.9365C13.9645 45.9365 13.1251 45.0969 13.125 44.0615Z","fill","#FF0000"],["d","M14.999 25.0947C21.6108 25.0947 26.9707 19.7348 26.9707 13.123C26.9707 6.51127 21.6108 1.15137 14.999 1.15137C8.38725 1.15137 3.02734 6.51127 3.02734 13.123C3.02734 19.7348 8.38725 25.0947 14.999 25.0947Z","fill","#FF0000"],["d","M10.875 11.623C12.3247 11.623 13.5 10.4478 13.5 8.99805C13.5 7.5483 12.3247 6.37305 10.875 6.37305C9.42525 6.37305 8.25 7.5483 8.25 8.99805C8.25 10.4478 9.42525 11.623 10.875 11.623Z","fill","white","fill-opacity","0.5"],[3,"spinnerType","position"],[1,"address-search-control","w-100",3,"appearance","subscriptSizing"],["rows","1","matInput","","maxlength","255","autocomplete","off",3,"focus","blur","keydown","cdkTextareaAutosize","formControl"],["matSuffix","",1,"me-3",2,"min-width","24px"],[3,"spinnerType","diameter"],[1,"address-search-results"],[1,"suggested-addresses-list"],[1,"suggested-address",3,"suggested-address-active"],[1,"suggested-address",3,"mousedown"],[3,"fw-bolder"],[1,"yp-text-muted","fs-4"],[1,"manual-mode-map-notice"],[1,"d-flex","gap-2"],[1,"icon-sm",3,"svgIcon"],[1,"d-flex","flex-column"],[1,"mb-1"],[1,"fs-3"],[1,"yp-text-danger","fs-3","outside-of-delivery-zone-message"],["type","button",1,"my-3","yp-btn","yp-btn-sm","yp-btn-link","yp-btn-link-alt","yp-btn-link-no-padding","fs-3","cannot-find-address-btn"],["type","button",1,"my-3","yp-btn","yp-btn-sm","yp-btn-link","yp-btn-link-alt","yp-btn-link-no-padding","fs-3","cannot-find-address-btn",3,"click"],[1,"address-editor-wrapper"],[1,"w-100",3,"appearance","subscriptSizing"],["rows","1","maxlength","255","autocomplete","off","matInput","",3,"ypTrimInputValue","formControl","cdkTextareaAutosize"],[1,"fs-3","yp-text-muted"],[3,"appearance","subscriptSizing"],["type","tel","matInput","",3,"formControl"],["type","text","matInput","",3,"formControl"],[3,"legalAgreementType","continueButtonText","formControl"],[1,"yp-form-field-error-wrapper"],[1,"add-address-main-wrapper","h-100"],[1,"yp-btn-dialog-close-wrapper"],["type","button","matRipple","",1,"yp-btn-dialog-close",3,"mat-dialog-close"],[1,"large-screen-layout"],[1,"large-screen-left-side"],[1,"yp-dialog-header-no-box-shadow",3,"backBtnClick","showBackButton","showCloseButton"],[1,"px-3","large-screen-left-side-scrollable-content"],[1,"large-screen-map-controls-wrapper"],[3,"ngTemplateOutlet"],[1,"flex-grow-1","overflow-auto","position-relative"],[2,"position","absolute","inset-block-start","0","inset-inline","0","z-index","1"],[1,"px-3","yp-bottom-buttons-wrapper"],[1,"large-screen-right-side"],[3,"buttonWithLoaderClick","spinnerType","disabled"],[1,"add-address-main-wrapper"],[3,"showBackButton","showCloseButton","backBtnClick",4,"ypProjectedHeader"],[1,"small-screen-layout"],[1,"map-layout-wrapper","h-100"],[1,"map-top-content","d-flex","flex-column","gap-2"],[1,"yp-bottom-buttons-wrapper"],[3,"backBtnClick","showBackButton","showCloseButton"],["class","yp-bottom-buttons-wrapper",4,"ypProjectedFooter"]],template:function(p,u){if(1&p&&(e.SS7(0)(1)(2)(3)(4),e.nI1(5,"translate"),e.DNE(6,ve,10,2,"ng-template",null,0,e.C5r)(8,Pe,7,9,"ng-template",null,1,e.C5r)(10,Re,2,1,"ng-template",null,2,e.C5r)(12,Be,12,8,"ng-template",null,3,e.C5r)(14,we,35,40,"ng-template",null,4,e.C5r),e.nVh(16,je,20,16,"div",7)(17,Ue,11,8,"yp-fixed-header-footer",8)),2&p){const D=u.mapAlwaysShown();e.bH3(u.showHeaderBackButton()),e.R7$(),e.bH3(u.showBackButton()),e.R7$(),e.bH3(u.suggestedAddresses()),e.R7$(),e.bH3(u.isOutsideDeliveryZone()),e.R7$(),e.bH3(e.bMT(5,5,"COMMON.CONTINUE")),e.R7$(12),e.vxM(D?16:17)}},dependencies:[n.X1,n.me,n.BC,n.tU,n.l_,le.cU,le.J0,J.rl,X.fg,J.nJ,J.yw,_e.t,Ae.B,le.xp,P.xb,re.F,J.TL,se.An,te.B,Z.T3,k.r6,V.tx,ge.b,$.D9,Ye],styles:[".large-screen-layout[_ngcontent-%COMP%]{height:100%;display:flex}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%]{min-width:25rem;max-width:30rem;flex-grow:1;flex-shrink:0;flex-basis:40%;padding-block-end:var(--yp-spacing-3);display:flex;flex-direction:column;overflow:hidden}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%] .large-screen-left-side-scrollable-content[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto;padding-block-start:var(--yp-spacing-3);margin-block-start:calc(var(--yp-spacing-3) * -1);display:flex;flex-direction:column}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%] .large-screen-map-controls-wrapper[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column}.large-screen-layout[_ngcontent-%COMP%] .large-screen-left-side[_ngcontent-%COMP%] .address-editor-wrapper[_ngcontent-%COMP%]{padding-bottom:var(--yp-spacing-3)}.large-screen-layout[_ngcontent-%COMP%] .large-screen-right-side[_ngcontent-%COMP%]{flex-grow:1;min-width:0}.large-screen-layout[_ngcontent-%COMP%] .large-screen-right-side[_ngcontent-%COMP%] .map-content-wrapper[_ngcontent-%COMP%]{position:relative;height:100%}.small-screen-layout[_ngcontent-%COMP%]{height:100%}.small-screen-layout[_ngcontent-%COMP%] .map-layout-wrapper[_ngcontent-%COMP%]{position:relative}.small-screen-layout[_ngcontent-%COMP%] .map-layout-wrapper[_ngcontent-%COMP%] .map-top-content[_ngcontent-%COMP%]{position:absolute;inset-inline-start:0;z-index:4;width:100%;padding:var(--yp-spacing-3);background:var(--yp-body-bg)}.small-screen-layout[_ngcontent-%COMP%] .map-layout-wrapper[_ngcontent-%COMP%] .map-content-wrapper[_ngcontent-%COMP%]{position:absolute;inset-block:3.5rem 0;inset-inline:0}.small-screen-layout[_ngcontent-%COMP%] .address-editor-wrapper[_ngcontent-%COMP%]{padding:var(--yp-spacing-3)}.map-container[_ngcontent-%COMP%]{position:relative;z-index:1}.map-center-anchor[_ngcontent-%COMP%]{position:absolute;inset-block-start:50%;inset-inline-start:50%;width:0;height:0;pointer-events:none;z-index:2}.map-center-anchor[_ngcontent-%COMP%] .map-pin[_ngcontent-%COMP%]{position:absolute;inset-block-end:0;inset-inline-start:50%;transform:translate(-50%)}.address-editor-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--yp-spacing-2)}.address-search-results[_ngcontent-%COMP%]{overflow:auto}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%]{list-style:none;padding-inline:0;padding-block:var(--yp-spacing-2) 0;background:var(--yp-body-bg)}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]{padding-block:var(--yp-spacing-3);padding-inline:var(--yp-spacing-2);cursor:pointer}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]:not(:last-child){border-block-end:1px solid var(--yp-body-bg-shift3)}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]:hover{background:var(--yp-body-bg-shift1)}.address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address[_ngcontent-%COMP%]:active, .address-search-results[_ngcontent-%COMP%] .suggested-addresses-list[_ngcontent-%COMP%] .suggested-address.suggested-address-active[_ngcontent-%COMP%]{background:var(--yp-body-bg-shift2)}.add-address-main-wrapper.step-search-with-suggestions[_ngcontent-%COMP%] .small-screen-layout[_ngcontent-%COMP%] .map-content-wrapper[_ngcontent-%COMP%], .add-address-main-wrapper.step-search-with-suggestions[_ngcontent-%COMP%] .small-screen-layout[_ngcontent-%COMP%] .outside-of-delivery-zone-message[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper.step-search-with-suggestions[_ngcontent-%COMP%] .map-top-content[_ngcontent-%COMP%]{height:100%}
1.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions):not(.step-manual-mode-map) .large-screen-map-controls-wrapper[_ngcontent-%COMP%], .add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions):not(.step-manual-mode-map) .map-layout-wrapper[_ngcontent-%COMP%], .add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions):not(.step-manual-mode-map) .map-center-anchor[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions) .large-screen-layout[_ngcontent-%COMP%] .cannot-find-address-btn[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input):not(.step-search-with-suggestions) .address-search-control[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-map-with-search-input) .small-screen-layout[_ngcontent-%COMP%] .cannot-find-address-btn[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-search-with-suggestions) .address-search-results[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-search-with-suggestions) .suggested-addresses-list[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-manual-mode-address-fields):not(.step-address-fields) .address-editor-wrapper[_ngcontent-%COMP%]{display:none}.add-address-main-wrapper[_ngcontent-%COMP%]:not(.step-manual-mode-map) .manual-mode-map-notice[_ngcontent-%COMP%]{display:none}"],changeDetection:0})}}return l})()},70578(me,ne,s){s.d(ne,{F:()=>de});var W=s(89417),K=s(82765),P=s(93049),z=s(68018),Z=s(63792),A=s(38008),e=s(15307),i=s(16120),M=s(96645),x=s(17705),n=s(35547),k=s(85802);const V=h=>["/",h],se=h=>({buttonText:h});function X(h,N){if(1&h&&(n.EFF(0),n.j41(1,"a",2),n.EFF(2," \u0441\u0431\u043e\u0440\u043e\u043c \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 "),n.k0s(),n.EFF(3," \u0438 "),n.j41(4,"a",2),n.EFF(5," \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. "),n.k0s()),2&h){const _=n.XpG(2);n.SpI(' \u041d\u0430\u0436\u0438\u043c\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0443 "',_.continueButtonText,'", \u0432\u044b \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u0442\u0435\u0441\u044c \u0441\u043e '),n.R7$(),n.Y8G("routerLink",n.eq3(3,V,_.appRoutes.agreement.path)),n.R7$(3),n.Y8G("routerLink",n.eq3(5,V,_.appRoutes.privacyPolicy.path))}}function J(h,N){1&h&&n.EFF(0," Age-restricted items are not for sale to anyone under the age of 18. The recipient of the order may need to provide a valid ID upon receiving the order. ")}function j(h,N){if(1&h&&(n.EFF(0),n.nI1(1,"translate"),n.j41(2,"a",3),n.EFF(3),n.nI1(4,"translate"),n.k0s(),n.EFF(5),n.nI1(6,"translate"),n.j41(7,"a",3),n.EFF(8),n.nI1(9,"translate"),n.k0s(),n.EFF(10,". "),n.nVh(11,J,1,0)),2&h){const _=n.XpG(2);n.SpI(" ",n.i5U(1,7,"TERMS_AGREEMENT.TEXT.PART1",n.eq3(16,se,_.continueButtonText))," "),n.R7$(2),n.Y8G("routerLink",_.staticRoutePaths.privacyPolicyPath),n.R7$(),n.SpI(" ",n.bMT(4,10,"TERMS_AGREEMENT.TEXT.LINK1")," "),n.R7$(2),n.SpI(" ",n.bMT(6,12,"TERMS_AGREEMENT.TEXT.PART2")," "),n.R7$(2),n.Y8G("routerLink",_.staticRoutePaths.termsOfServicePath),n.R7$(),n.JRh(n.bMT(9,14,"TERMS_AGREEMENT.TEXT.LINK2")),n.R7$(3),n.vxM(_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.GB||_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.IE?11:-1)}}function $(h,N){if(1&h&&(n.j41(0,"div",0),n.nVh(1,X,6,7)(2,j,12,18),n.k0s()),2&h){const _=n.XpG();n.R7$(),n.vxM(_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.RU||_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.KZ?1:2)}}function w(h,N){if(1&h&&(n.EFF(0," \u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 "),n.j41(1,"a",2),n.EFF(2," \u0441\u0431\u043e\u0440\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 "),n.k0s(),n.EFF(3," \u0438 "),n.j41(4,"a",2),n.EFF(5," \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. "),n.k0s()),2&h){const _=n.XpG(2);n.R7$(),n.Y8G("routerLink",n.eq3(2,V,_.appRoutes.agreement.path)),n.R7$(3),n.Y8G("routerLink",n.eq3(4,V,_.appRoutes.privacyPolicy.path))}}
1function U(h,N){1&h&&n.EFF(0," Age-restricted items are not for sale to anyone under the age of 18. The recipient of the order may need to provide a valid ID upon receiving the order. ")}function oe(h,N){if(1&h&&(n.EFF(0),n.nI1(1,"translate"),n.j41(2,"a",3),n.EFF(3),n.nI1(4,"translate"),n.k0s(),n.EFF(5),n.nI1(6,"translate"),n.j41(7,"a",3),n.EFF(8),n.nI1(9,"translate"),n.k0s(),n.EFF(10,". "),n.nVh(11,U,1,0)),2&h){const _=n.XpG(2);n.SpI(" ",n.bMT(1,7,"TERMS_AGREEMENT.CHECKBOX.LABEL.PART1")," "),n.R7$(2),n.Y8G("routerLink",_.staticRoutePaths.privacyPolicyPath),n.R7$(),n.SpI(" ",n.bMT(4,9,"TERMS_AGREEMENT.CHECKBOX.LABEL.LINK1")," "),n.R7$(2),n.SpI(" ",n.bMT(6,11,"TERMS_AGREEMENT.CHECKBOX.LABEL.PART2")," "),n.R7$(2),n.Y8G("routerLink",_.staticRoutePaths.termsOfServicePath),n.R7$(),n.JRh(n.bMT(9,13,"TERMS_AGREEMENT.CHECKBOX.LABEL.LINK2")),n.R7$(3),n.vxM(_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.GB||_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.IE?11:-1)}}function Q(h,N){if(1&h){const _=n.RV6();n.j41(0,"mat-checkbox",4),n.bIt("change",function(F){k.eBV(_);const H=n.XpG();return k.Njj(H.formControlOnChange(F.checked))})("focusout",function(){k.eBV(_);const F=n.XpG();return k.Njj(F.formControlOnTouched())}),n.nVh(1,w,6,6)(2,oe,12,15),n.k0s()}if(2&h){const _=n.XpG();n.Y8G("checked",_.checked)("disabled",_.isDisabled),n.R7$(),n.vxM(_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.RU||_.tenant.country===_.COUNTRY_ISO3166_CODES_MAP.KZ?1:2)}}let de=(()=>{class h{constructor(_,B){this.tenant=_,this.changeDetectorRef=B,this.staticRoutePaths=i.g,this.COUNTRY_ISO3166_CODES_MAP=A.t,this.TermsAgreementType=M.C,this.appRoutes=Z.G,this.checked=!1,this.isDisabled=!1,this.validate=()=>null}ngOnChanges(_){_.legalAgreementType&&_.legalAgreementType.previousValue!==_.legalAgreementType.currentValue&&(this.validate=this.legalAgreementType===M.C.checkbox?W.k0.requiredTrue:()=>null,this.onValidatorChange&&this.onValidatorChange())}writeValue(_){this.checked=_,this.changeDetectorRef.markForCheck()}registerOnChange(_){this.formControlOnChange=_}registerOnTouched(_){this.formControlOnTouched=_}setDisabledState(_){this.isDisabled=_,this.changeDetectorRef.markForCheck()}registerOnValidatorChange(_){this.onValidatorChange=_}static{this.\u0275fac=function(B){return new(B||h)(n.rXU(e.$),n.rXU(x.gRc))}}static{this.\u0275cmp=n.VBU({type:h,selectors:[["yp-legal-agreement"]],inputs:{legalAgreementType:"legalAgreementType",continueButtonText:"continueButtonText"},features:[n.Jv_([{provide:W.kq,multi:!0,useExisting:h},{provide:W.cz,multi:!0,useExisting:h}]),n.OA$],decls:2,vars:1,consts:[[1,"fs-3"],[1,"text-start",3,"checked","disabled"],["target","_blank",3,"routerLink"],["target","_blank",1,"fw-bold",3,"routerLink"],[1,"text-start",3,"change","focusout","checked","disabled"]],template:function(B,F){if(1&B&&n.nVh(0,$,3,1,"div",0)(1,Q,3,3,"mat-checkbox",1),2&B){let H;n.vxM((H=F.legalAgreementType)===F.TermsAgreementType.message?0:H===F.TermsAgreementType.checkbox?1:-1)}},dependencies:[P.Wk,K.So,z.D9],encapsulation:2,changeDetection:0})}}return h})()},88835(me,ne,s){s.d(ne,{B:()=>se});var W=s(60177),K=s(17705),P=s(35547),z=s(85802),Z=s(89079),A=s(23294),e=s(70980),i=s(99172),M=s(25558),x=s(65873),n=s(64683);const k=["*"];let se=(()=>{class X{constructor(){if(this.spinnerType=K.hFB.required(),this.disabled=(0,K.hFB)(!1),this.buttonWithLoaderClick=(0,K.CGW)(),this.loaderMinTime=(0,K.hFB)(),(0,W.UE)((0,z.WQX)(P.Agw))){const j=(0,z.WQX)(x.D),$=(0,Z.br)(this.spinnerType).pipe((0,M.n)(w=>j.getSpinner(w,!0).pipe((0,n.vU)(150,U=>U),(0,e.j)(()=>j.releaseSpinner(w)))),(0,i.Z)(!1),(0,A.F)());this.showLoader=(0,Z.ot)($,{requireSync:!0})}else this.showLoader=(0,z.vPA)(!1)}static{this.\u0275fac=function($){return new($||X)}}static{this.\u0275cmp=P.VBU({type:X,selectors:[["yp-button-with-loader"]],inputs:{spinnerType:[1,"spinnerType"],disabled:[1,"disabled"],loaderMinTime:[1,"loaderMinTime"]},outputs:{buttonWithLoaderClick:"buttonWithLoaderClick"},ngContentSelectors:k,decls:7,vars:3,consts:[["type","button",1,"yp-btn","yp-btn-lg","yp-btn-primary","position-relative",3,"click","disabled"],[1,"dots-pulse-wrapper"],[1,"dots-pulse"],[1,"projected-content"]],template:function($,w){if(1&$&&(P.NAR(),P.rj2(0,"button",0),P.VwU("click",function(oe){return w.buttonWithLoaderClick.emit(oe)}),P.rj2(1,"div",1),P.EFF(2," \xa0"),P.Hgh(3,"span",2),P.EFF(4,"\xa0 "),P.eux(),P.rj2(5,"div",3),P.SdG(6),P.eux()()),2&$){const U=w.showLoader();P.AVh("show-loader",U),P.Avn("disabled",U||w.disabled())}},styles:["[_nghost-%COMP%]{display:flex}[_nghost-%COMP%] .yp-btn[_ngcontent-%COMP%]{flex-grow:1}.yp-btn[_ngcontent-%COMP%]{position:relative}.yp-btn.show-loader[_ngcontent-%COMP%] .projected-content[_ngcontent-%COMP%]{opacity:0}
1.yp-btn[_ngcontent-%COMP%]:not(.show-loader) .dots-pulse-wrapper[_ngcontent-%COMP%]{display:none}.yp-btn[_ngcontent-%COMP%] .dots-pulse-wrapper[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%}"],changeDetection:0})}}return X})()}}]);
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.