(window.webpackJsonp=window.webpackJsonp||[]).push([[14,86,92,166],{1022:function(t,e,r){"use strict";r.r(e);r(33),r(54);var n=r(6),o=r(8),l=(r(55),r(20),r(39),r(21),r(37),r(22),r(29),r(30),r(11),r(23),r(18)),c=r(27),m=r(699),d=r(91),_=r(15),h=r(137),f=r(801);function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){Object(n.a)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var x={name:"AppCardSummary",components:{AppIcon:_.default,AppButton:c.default,AppNearby:m.default,AppModal:h.default,CallbackForm:f.default},mixins:[d.a],props:{data:{type:Object,required:!0},mobile:{type:Boolean,default:!1},showDiscount:{type:Boolean,default:!1},isFlatOfDay:{type:Boolean,default:!1}},data:function(){return{isModalClosed:!0,purchaseTermsData:{},isPopupPurchaseTermsShow:!1,lkURL:"https://club.ingrad.ru",apURL:"https://club.ingrad.ru/api/apartments/purchase/settings",listShow:this.data.listShow}},computed:{modalPurchaseIsShow:function(){return!(!Object.keys(this.purchaseTermsData).length||this.isSold||this.isReserved)},onlyPurchaseLink:function(){var t,e=this,r=!1,view=["cash","installment","mortgage"].map((function(t){return e.purchaseTermsData[t].length>1&&(r=!0),1===e.purchaseTermsData[t].length?e.purchaseTermsData[t][0]:0})).filter((function(t){return 0!==t}));return r||1!==view.length||null===(t=view[0])||void 0===t?void 0:t.reservation_link},classNames:function(){return["card-summary",this.isModalClosed?void 0:"card-summary_modal-opened",this.mobile?"card-summary_mobile":void 0]},linkOrder:function(){return"".concat(this.lkURL,"/apartments/reservation?site_id=").concat(this.data.id,"&crm_article_id=").concat(this.data.externalId)},linkConsultation:function(){return"".concat(this.lkURL,"/video-call/flat?site_id=").concat(this.data.id,"&crm_article_id=").concat(this.data.externalId)},linkHowBuy:function(){return"".concat(this.lkURL,"/apartments/purchase?crm_article_id=").concat(this.data.externalId)},isSold:function(){return"sold"===this.data.status},isReserved:function(){return"reserve"===this.data.status},discount:function(){if(this.data.oldPrice)return 100-Math.round(this.data.price/this.data.oldPrice*100)},paramsShow:function(){var t;return null===(t=this.data.list)||void 0===t?void 0:t.filter((function(t){return Array.isArray(t.value)?t.value.length>0:!!t.value}))},callbackFormData:function(){return{title:this.data.title,project:this.data.project,building:this.paramsShow.filter((function(t){return"building"===t.code}))}},paramsShowFiltered:function(){var t=this;return this.paramsShow.filter((function(e,r){return r<t.listShow||null===t.listShow}))}},mounted:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getPurchaseTermsData();case 2:case"end":return e.stop()}}),e)})))()},methods:y(y({},Object(l.c)({openModal:"modal/OPEN_MODAL"})),{},{openModalPurchaseTerms:function(){this.openModal({id:"modal_purchase-terms"}),this.isModalClosed=!1},openCallbackModal:function(){this.openModal({id:"modal_callback"}),this.isModalClosed=!1},closeModalPurchaseTerms:function(){this.isModalClosed=!0},showAllHandler:function(){this.listShow=null},tag:function(t){return t.link?"nuxt-link":"span"},getPurchaseTermsData:function(){var t=arguments,e=this;return Object(o.a)(regeneratorRuntime.mark((function r(){var n,o,l,data;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=t.length>0&&void 0!==t[0]?t[0]:{},e.apURL){r.next=3;break}return r.abrupt("return");case 3:return r.prev=3,o=Object.keys(n).length?"&credit_period=".concat(n.period,"&first_payment=").concat(n.initialPaymentAmount):"",r.next=7,fetch("".concat(e.apURL,"?crm_article_id=").concat(e.data.externalId,"&type=json").concat(o),{mode:"cors",cache:"no-cache"});case 7:if(!(l=r.sent).ok){r.next=13;break}return r.next=11,l.json();case 11:(data=r.sent).success&&(data.data.cash[0].active=!0,data.data.installment.length&&data.data.installment.forEach((function(t){t.active=!1})),data.data.mortgage.forEach((function(t){t.active=!1})),data.data.isCanReserve=e.data.isCanReserve,e.purchaseTermsData=data.data);case 13:r.next=18;break;case 15:r.prev=15,r.t0=r.catch(3),console.log(r.t0.message);case 18:case"end":return r.stop()}}),r,null,[[3,15]])})))()},selectPurchaseTerm:function(t){this.purchaseTermsData.cash[0].active=!1,"cash"===t.mode&&(this.purchaseTermsData[t.mode][0].active=!0),this.purchaseTermsData.installment.length&&this.purchaseTermsData.installment.forEach((function(e){e.active=t.id===e.id})),this.purchaseTermsData.mortgage.forEach((function(e){e.active=t.id===e.id}))}})},w=x,C=(r(1041),r(3)),component=Object(C.a)(w,(function(){var t,e=this,r=e._self._c;return r("div",{class:e.classNames},[null!==(t=e.data)&&void 0!==t&&null!==(t=t.promos)&&void 0!==t&&t.length?r("ul",{staticClass:"list card-summary__tags"},e._l(e.data.promos,(function(t,n){return r("li",{key:"promo_".concat(n),staticClass:"list__item list__item_primary"},[r("nuxt-link",{attrs:{to:"/search/flats?promo=".concat(t.code)}},[e._v("\n\t\t\t\t"+e._s(t.name)+"\n\t\t\t")])],1)})),0):e._e(),e._v(" "),e.data.title?r("h1",{directives:[{name:"dompurify-html",rawName:"v-dompurify-html",value:e.data.title,expression:"data.title"}],staticClass:"card-summary__title",attrs:{itemprop:"name"}}):e._e(),e._v(" "),e.isSold||"office"===e.data.type?e._e():r("div",{staticClass:"card-summary__prices",attrs:{itemprop:"offers",itemscope:"",itemtype:"http://schema.org/Offer"}},[r("span",{attrs:{itemprop:"price",content:e.data.price}}),e._v(" "),r("span",{attrs:{itemprop:"priceCurrency",content:"RUB"}}),e._v(" "),e.data.price?r("div",{staticClass:"card-summary__price"},[e._v(e._s(e.priceFormat(e.data.price))+" ₽")]):e._e(),e._v(" "),e.data.oldPrice>e.data.price?r("div",{staticClass:"card-summary__old-price"},[e._v("\n\t\t\t"+e._s(e.priceFormat(e.data.oldPrice))+" ₽\n\t\t")]):e._e(),e._v(" "),e.data.oldPrice>e.data.price?r("div",{staticClass:"card-summary__discount"},[e._v("%")]):e._e()]),e._v(" "),r("div",{staticClass:"card-summary__params"},[e.data.list&&e.paramsShowFiltered.length?r("ul",{staticClass:"list card-summary__params-list"},e._l(e.paramsShowFiltered,(function(t,n){return r("li",{key:n,staticClass:"list__item"},[r("div",{staticClass:"list__item-label"},[e._v(e._s(t.label))]),e._v(" "),r("div",{staticClass:"list__item-value"},[t.nearby?e._e():r(e.tag(t),{tag:"component",attrs:{to:t.link}},[e._v("\n\t\t\t\t\t\t"+e._s(t.value)+"\n\t\t\t\t\t")]),e._v(" "),t.nearby?r("AppNearby",{attrs:{station:t.nearby.title,"station-color":t.nearby.color,time:t.nearby.time,type:t.nearby.type}}):e._e()],1)])})),0):e._e(),e._v(" "),e.paramsShow&&e.paramsShow.length>e.listShow&&null!==e.listShow?r("AppButton",{staticClass:"card-summary__params-control",attrs:{icon:"arrow-down","icon-position":"after",appearance:"clear",size:"clear",variant:"dark"},on:{click:e.showAllHandler}},[e._v("\n\t\t\tПодробнее\n\t\t")]):e._e()],1),e._v(" "),e.isSold||e.isReserved?r("div",{staticClass:"card-summary__status"},[r("div",{staticClass:"summary-status"},[r("div",{staticClass:"summary-status__icon"},[e.isSold?r("svg",{staticStyle:{transform:"translateX(0.03rem)"},attrs:{width:36,height:32,viewBox:"0 0 36 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("mask",{attrs:{id:"path-1-inside-1_6936_51686",fill:"white"}},[r("path",{attrs:{d:"M0.0362235 17.8015C-0.252143 13.5348 1.18926 9.49879 4.0721 6.32776C6.95494 3.27195 10.9908 1.4847 15.1999 1.4847C19.8125 1.4847 24.1368 3.56034 27.0195 7.13496L33.7657 0.389114C34.2845 -0.129705 35.0917 -0.129705 35.6109 0.389114C36.1297 0.907933 36.1297 1.71512 35.6109 2.23434L16.4688 21.2611C16.2384 21.4915 15.8921 21.6649 15.5462 21.6649C15.2004 21.6649 14.8545 21.5495 14.6236 21.2611L8.33913 14.9186C7.82031 14.3998 7.82031 13.5926 8.33913 13.0734C8.85795 12.5546 9.66514 12.5546 10.1844 13.0734L15.5462 18.4933L25.1174 8.98008C22.7533 5.92427 19.0633 4.07905 15.1428 4.07905C11.6832 4.07905 8.28158 5.52047 5.91755 8.11492C3.49596 10.7094 2.34293 14.0536 2.57345 17.6281C3.03476 23.7976 7.9933 28.8135 14.2201 29.2748C20.7354 29.7361 26.6163 25.0659 27.5965 18.6659C27.7119 18.0317 27.7694 17.3975 27.7694 16.7057C27.7694 16.0139 28.3462 15.4372 29.0379 15.4372C29.7296 15.4372 30.3063 16.014 30.3063 16.7057C30.3063 17.5129 30.2488 18.2625 30.1334 19.0117C28.9804 26.3918 22.5225 31.8692 15.085 31.8692C14.7391 31.8692 14.3932 31.8692 13.9894 31.8117C6.55146 31.2929 0.555361 25.2964 0.0364498 17.8011L0.0362235 17.8015Z"}})]),e._v(" "),r("path",{attrs:{d:"M0.0362235 17.8015C-0.252143 13.5348 1.18926 9.49879 4.0721 6.32776C6.95494 3.27195 10.9908 1.4847 15.1999 1.4847C19.8125 1.4847 24.1368 3.56034 27.0195 7.13496L33.7657 0.389114C34.2845 -0.129705 35.0917 -0.129705 35.6109 0.389114C36.1297 0.907933 36.1297 1.71512 35.6109 2.23434L16.4688 21.2611C16.2384 21.4915 15.8921 21.6649 15.5462 21.6649C15.2004 21.6649 14.8545 21.5495 14.6236 21.2611L8.33913 14.9186C7.82031 14.3998 7.82031 13.5926 8.33913 13.0734C8.85795 12.5546 9.66514 12.5546 10.1844 13.0734L15.5462 18.4933L25.1174 8.98008C22.7533 5.92427 19.0633 4.07905 15.1428 4.07905C11.6832 4.07905 8.28158 5.52047 5.91755 8.11492C3.49596 10.7094 2.34293 14.0536 2.57345 17.6281C3.03476 23.7976 7.9933 28.8135 14.2201 29.2748C20.7354 29.7361 26.6163 25.0659 27.5965 18.6659C27.7119 18.0317 27.7694 17.3975 27.7694 16.7057C27.7694 16.0139 28.3462 15.4372 29.0379 15.4372C29.7296 15.4372 30.3063 16.014 30.3063 16.7057C30.3063 17.5129 30.2488 18.2625 30.1334 19.0117C28.9804 26.3918 22.5225 31.8692 15.085 31.8692C14.7391 31.8692 14.3932 31.8692 13.9894 31.8117C6.55146 31.2929 0.555361 25.2964 0.0364498 17.8011L0.0362235 17.8015Z",fill:"black",stroke:"#F3F3F3","stroke-width":"0.6",mask:"url(#path-1-inside-1_6936_51686)"}})]):e._e(),e._v(" "),e.isReserved?r("AppIcon",{attrs:{id:"lock",width:44,height:44}}):e._e()],1),e._v(" "),e.isSold?r("div",{staticClass:"summary-status__title"},[e._v("\n\t\t\t\t"+e._s("office"!==e.data.type?"Квартира продана":"Помещение продано")+"\n\t\t\t")]):e._e(),e._v(" "),e.isReserved?r("div",{staticClass:"summary-status__title"},[e._v("\n\t\t\t\t"+e._s("office"!==e.data.type?"Квартира забронирована":"Помещение забронировано")+"\n\t\t\t")]):e._e()])]):e._e(),e._v(" "),r("div",{staticClass:"card-summary__control"},[e.isSold||e.isReserved||!e.data.isCanReserve?e._e():r("div",{staticClass:"card-summary__control-row"},[r("AppButton",{staticClass:"card-summary__control-item",attrs:{size:"medium",variant:"green"},on:{click:e.openCallbackModal}},[r("AppIcon",{attrs:{id:"phone"}}),e._v("Заказать звонок\n\t\t\t")],1)],1)]),e._v(" "),r("AppModal",{staticClass:"modal_callback",attrs:{id:"modal_callback","close-button-position":"none"},on:{closeModal:e.closeModalPurchaseTerms}},[r("CallbackForm",{attrs:{data:e.callbackFormData}})],1)],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{CallbackForm:r(801).default})},1041:function(t,e,r){"use strict";r(804)},1042:function(t,e,r){var n=r(12)((function(i){return i[1]}));n.push([t.i,'.card-summary{background-color:var(--color-white);border:.01rem solid var(--color-border);border-radius:.24rem;padding:var(--gap-xs)}.card-summary_modal-opened{z-index:1000!important}.card-summary_mobile{display:none}.card-summary_mobile+.section_variant_negative-margins{padding-top:0}@media screen and (max-width:1439px){.card-summary_mobile{display:block}.card-summary_mobile+.section_variant_negative-margins{padding-top:var(--gap-xl)}}@media screen and (max-width:767px){.card-summary_mobile{margin-left:var(--container-gap-negative);margin-right:var(--container-gap-negative);padding-left:var(--container-gap);padding-right:var(--container-gap)}}.card-summary__tags{display:flex;flex:none;flex-wrap:wrap;margin:0 0 .06rem;margin-left:var(--gap-negative-xs)}.card-summary__tags>*{min-height:1px;min-width:1px}@media screen and (max-width:1023px){.card-summary__tags{margin-left:var(--gap-negative-xxxs);margin-top:calc(var(--gap-xxxs)/2)}}.card-summary__tags .list__item{background-color:var(--color-border);border-radius:.06rem;color:var(--color-fade);display:block;flex:none;font-size:.1rem;font-weight:600;font-weight:700;letter-spacing:.04em;line-height:1.6;margin:var(--gap-xxxs) 0 0 var(--gap-xs);max-width:calc(100% - var(--gap-xs));padding:calc(var(--gap-xxxs)/2) var(--gap-xxxs);text-transform:uppercase}.card-summary__tags .list__item_primary{background-color:var(--color-primary);color:var(--color-black)}@media screen and (max-width:1023px){.card-summary__tags .list__item{margin-left:var(--gap-xxxs)}}.card-summary__title{align-items:flex-start;display:flex;font-family:var(--font-face-primary);font-size:.24rem;font-weight:600;justify-content:space-between;line-height:1.3333333333;margin-bottom:calc(var(--gap-xxxs)/2);margin-top:0}@media screen and (max-width:600px){.card-summary__title{font-size:.2rem;line-height:1.2}}@media screen and (max-width:1439px){.card-summary__title br{display:none}}@media screen and (max-width:600px){.card-summary__title{font-size:.18rem}}.card-summary__prices{align-items:center;display:flex;flex-wrap:wrap}.card-summary__prices>*{min-height:1px;min-width:1px}.card-summary__price{font-size:.24rem;font-weight:600;line-height:1.3333333333;margin-right:.12rem}@media screen and (max-width:600px){.card-summary__price{font-size:.2rem;line-height:1.2}}.card-summary__old-price{color:#969a9c;font-size:.16rem;font-weight:600;line-height:1.5;margin-right:.12rem;position:relative}@media(min-width:1440px){.card-summary__old-price{margin-left:auto;margin-right:0}}.card-summary__old-price:before{background-color:#f50200;content:"";display:block;height:.02rem;left:0;position:absolute;top:50%;transform:rotate(-3deg);width:100%}.card-summary__discount{background-color:var(--color-primary);border-radius:.06rem;font-size:.12rem;font-weight:600;line-height:.24rem;margin-left:.06rem;padding:0 .04rem}.card-summary__square-price{color:#7d8082;font-size:.16rem;line-height:1.5;margin-top:.04rem}.card-summary__params{margin-top:var(--gap-xs)}.card-summary__params-list{margin-bottom:0}@media screen and (max-width:1439px){.card-summary__params-list{display:grid;grid-template-columns:1fr 1fr;grid-column-gap:var(--gap-xxl);grid-row-gap:var(--gap-xxs)}.card-summary__params-list>*{min-height:1px;min-width:1px}}@media screen and (max-width:767px){.card-summary__params-list{display:block}}.card-summary__params-list .list__item{align-items:center;color:var(--color-black-alpha-50);display:flex;flex-wrap:wrap}.card-summary__params-list .list__item>*{min-height:1px;min-width:1px}.card-summary__params-list .list__item-label{flex:none;font-weight:600;padding-right:var(--gap-xxs)}.card-summary__params-list .list__item-value{flex:1;max-width:100%;text-align:right}.card-summary__params-list .list__item-value a{border-bottom:.01rem dashed}.card-summary__params-list .list__item-value a:hover{border-bottom-color:transparent}.card-summary__params-list .list__item-discount{border:.01rem solid rgba(0,0,0,.2);border-radius:.26rem;color:var(--color-black);flex:none;margin-left:auto;padding:.03rem .11rem}.card-summary__params-list .list__item+.list__item{margin-top:.2rem}@media screen and (max-width:1439px){.card-summary__params-list .list__item+.list__item{margin-top:0}}@media screen and (max-width:767px){.card-summary__params-list .list__item+.list__item{margin-top:.2rem}}.card-summary__params-control{justify-content:space-between;margin-top:.2rem;width:100%}@media screen and (max-width:1439px){.card-summary__params-control{width:auto}}@media screen and (max-width:767px){.card-summary__params-control{width:100%}}.card-summary__status{margin-top:var(--gap-xxs)}.card-summary .summary-status,.card-summary .summary-status__icon{align-items:center;display:flex;justify-content:center}.card-summary .summary-status__icon{background-color:#f1f1f2;border-radius:.16rem;height:.7rem;margin-right:var(--gap-xxs);width:.7rem}.card-summary .summary-status__title{font-size:.14rem;font-weight:600}.card-summary__control{margin-top:var(--gap-xs)}.card-summary__control-row{display:flex;margin-top:var(--gap-xxs)}@media screen and (max-width:1023px){.card-summary__control-row{display:block}}.card-summary__control-row .card-summary__control-item:nth-child(2),.card-summary__control-row .card-summary__control-item_phone{flex:0 0 .48rem;margin-left:var(--gap-xxs);max-width:.48rem;width:.48rem}@media screen and (max-width:1023px){.card-summary__control-row .card-summary__control-item:nth-child(2),.card-summary__control-row .card-summary__control-item_phone{margin-left:0;margin-top:var(--gap-xxs);max-width:100%;width:100%}}.card-summary__control-item{width:100%}.card-summary__control-item+.card-summary__control-slide{margin-top:var(--gap-xxs)}@media screen and (max-width:1023px){.card-summary__control-item_phone{display:none}}.card-summary__control-item_phone_big{display:none}@media screen and (max-width:1023px){.card-summary__control-item_phone_big{display:block}}.card-summary__control-item svg{margin:-.02rem -.09rem;fill:none}.card-summary__control-item svg.icon_phone{margin-right:5px}.card-summary__control-slide{transition-delay:var(--transition-duration);transition-duration:var(--transition-duration)}.card-summary__control-slide+.card-summary__control-row{margin-top:0}.card-summary__control-slide .card-summary__control-wrapper{padding-bottom:var(--gap-xxs)}',""]),n.locals={},t.exports=n},697:function(t,e,r){var content=r(708);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(13).default)("560d1129",content,!0,{sourceMap:!1})},699:function(t,e,r){"use strict";r.r(e);var n={name:"AppNearby",props:{station:{type:String,required:!0},stationColor:{type:String,default:null},time:{type:String,default:null},type:{type:String,default:null}},computed:{typeIcon:function(){return{auto:"/img/car-small.svg",on_foot:"/img/walk.svg",transport:"/img/bus.svg"}[this.type]}}},o=(r(707),r(3)),component=Object(o.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"nearby"},[e("div",{staticClass:"nearby__item nearby__item_station"},[t.stationColor?e("span",{staticClass:"nearby__color",style:{backgroundColor:t.stationColor}}):t._e(),t._v(" "),e("span",{staticClass:"nearby__title"},[t._v(t._s(t.station))])]),t._v(" "),t.time?e("div",{staticClass:"nearby__item"},[t.typeIcon?e("img",{staticClass:"nearby__icon",attrs:{src:t.typeIcon,alt:t.time}}):t._e(),t._v(" "),e("span",{staticClass:"nearby__title"},[t._v(t._s(t.time)+" мин.")])]):t._e()])}),[],!1,null,null,null);e.default=component.exports},707:function(t,e,r){"use strict";r(697)},708:function(t,e,r){var n=r(12)((function(i){return i[1]}));n.push([t.i,".nearby{display:inline-flex;flex-wrap:nowrap;max-width:100%}@media screen and (max-width:1023px){.nearby{font-size:.14rem;line-height:1.4285714286}}.nearby__item{align-items:center;display:block;display:flex;flex:none;flex-wrap:wrap;flex-wrap:nowrap;overflow:hidden}.nearby__item>*{min-height:1px;min-width:1px}.nearby__item_station{flex:1}.nearby__item_station .nearby__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nearby__item+.nearby__item{margin-left:var(--gap-xxs)}.nearby__color{border-radius:50%;flex:none;height:.1rem;margin-right:var(--gap-xxxs);width:.1rem}.nearby__color+.nearby__title{max-width:calc(100% - .16rem)}.nearby__icon{display:block;flex:none;margin-right:var(--gap-xxxs)}.nearby__title{flex:none}",""]),n.locals={},t.exports=n},768:function(t,e,r){var content=r(980);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(13).default)("3870348c",content,!0,{sourceMap:!1})},801:function(t,e,r){"use strict";r.r(e);r(56),r(33),r(64),r(20),r(21),r(29),r(30),r(11),r(23);var n=r(6),o=(r(22),r(27)),l=r(92),c=r(138);function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){Object(n.a)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var _={name:"CallbackForm",components:{AppIcon:r(15).default,AppCheckbox:c.default,AppField:l.default,AppButton:o.default},props:{data:{type:Object,default:void 0},info:{type:Object,default:void 0}},data:function(){return{name:"",tel:"",email:"",message:"Меня интересует "+this.data.title.toLowerCase()+" в корпусе "+this.data.building[0].value+", проект "+this.data.project,errors:[],submitted:!1}},computed:{formData:function(){return{name:this.name,tel:this.tel,email:this.email,message:this.message,info:d({type:"callback",page:this.$route.path},this.info)}}},methods:{onSubmitHandler:function(){if(this.errors=[],this.name||this.errors.push("name"),this.tel||this.errors.push("tel"),this.email&&this.email.includes("@")||this.errors.push("email"),this.errors.length>0)return!1;this.submitted=!0;try{Comagic.addOfflineRequest({name:this.name,phone:this.tel,email:this.email,message:this.message},this.onFormSend)}catch(t){}},onFormSend:function(t){console.log(t),JSON.parse(t.responseText).success&&(this.errors=[],this.submitted=!0,this.name="",this.email="",this.message="")}}},h=(r(979),r(3)),component=Object(h.a)(_,(function(){var t=this,e=t._self._c;return e("form",{staticClass:"form form_callback",on:{submit:function(e){return e.preventDefault(),t.onSubmitHandler.apply(null,arguments)}}},[e("button",{staticClass:"form__close",attrs:{type:"button"},on:{click:function(e){return t.$parent.closeModal()}}},[e("AppIcon",{staticClass:"modal__icon",attrs:{id:"cross",width:24,height:24}})],1),t._v(" "),t.submitted?e("div",{staticClass:"form__result"},[e("h2",{staticClass:"form__title"},[t._v("Спасибо!")]),t._v(" "),t._m(1),t._v(" "),e("p",{staticClass:"form__title"},[t._v("+7"+t._s(t.tel))]),t._v(" "),e("AppButton",{staticClass:"form__submit",attrs:{appearance:"base",size:"medium",variant:"primary"},on:{click:function(e){return t.$parent.closeModal()}}},[t._v("\n\t\t\tХорошо\n\t\t")])],1):e("div",[t._m(0),t._v(" "),e("div",{staticClass:"form__body"},[e("div",{staticClass:"form__fieldset"},[e("div",{staticClass:"form__group form__group_row"},[e("div",{staticClass:"form__item"},[e("AppField",{attrs:{placeholder:"Телефон",size:"medium",variant:"grey",type:"tel","mask-type":"tel",error:t.errors.includes("tel"),required:!0},model:{value:t.tel,callback:function(e){t.tel=e},expression:"tel"}})],1),t._v(" "),e("div",{staticClass:"form__item"},[e("AppField",{attrs:{placeholder:"Email",size:"medium",variant:"grey",type:"email",error:t.errors.includes("email"),required:!0},model:{value:t.email,callback:function(e){t.email=e},expression:"email"}})],1)]),t._v(" "),e("div",{staticClass:"form__group"},[e("div",{staticClass:"form__item"},[e("AppField",{attrs:{placeholder:"Ваше имя",size:"medium",variant:"grey",error:t.errors.includes("name"),required:!0},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})],1)]),t._v(" "),e("div",{staticClass:"form__group"},[e("div",{staticClass:"form__item"},[e("AppField",{attrs:{placeholder:"Сообщение",size:"medium",variant:"grey",value:t.message,error:t.errors.includes("message")},model:{value:t.message,callback:function(e){t.message=e},expression:"message"}})],1)]),t._v(" "),e("div",{staticClass:"form__group form__group_row"},[e("div",{staticClass:"form__item"},[e("AppCheckbox",{attrs:{name:"agree",required:!0}},[t._v("\n\t\t\t\t\t\t\tСоглашаюсь на\n\t\t\t\t\t\t\t"),e("a",{attrs:{target:"_blank",href:"/politika_obrabotki_personalnyh_dannyh/"}},[t._v("обработку персональных данных")])])],1),t._v(" "),e("div",{staticClass:"form__item"},[e("AppButton",{staticClass:"form__submit",attrs:{appearance:"base",size:"medium",variant:"primary"}},[t._v("\n\t\t\t\t\t\t\tОтправить\n\t\t\t\t\t\t")])],1)])])])])])}),[function(){var t=this,e=t._self._c;return e("div",{staticClass:"form__header"},[e("h2",{staticClass:"form__title"},[t._v("Оставьте контакты – "),e("br"),t._v("и мы с вами свяжемся")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"form__result_text"},[t._v("Ваш персональный менеджер "),e("br"),t._v("перезвонит в течение 15 минут по номеру:")])}],!1,null,"4ee98c21",null);e.default=component.exports},804:function(t,e,r){var content=r(1042);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,r(13).default)("478f11d5",content,!0,{sourceMap:!1})},979:function(t,e,r){"use strict";r(768)},980:function(t,e,r){var n=r(12)((function(i){return i[1]}));n.push([t.i,".form_callback[data-v-4ee98c21]{background-color:var(--color-white);border:.01rem solid #f1f3f3;border-radius:.24rem;color:var(--color-fade);font-size:.12rem;line-height:1.5;padding:var(--gap-xxxxl) var(--gap-xxxl);position:relative;width:50%}.form_callback .form__title[data-v-4ee98c21]{color:var(--color-black);font-family:var(--base-font-family);font-size:.24rem;font-weight:600;line-height:1.3333333333;margin-bottom:var(--gap-xxxs)}@media screen and (max-width:600px){.form_callback .form__title[data-v-4ee98c21]{font-size:.2rem;line-height:1.2}}.form_callback .form__header[data-v-4ee98c21]{margin-bottom:var(--gap-xxs)}.form_callback .form__footer[data-v-4ee98c21]{margin-top:var(--gap-xs)}.form_callback .form__submit[data-v-4ee98c21]{width:80%}.form_callback .form__item[data-v-4ee98c21]:has(.form__submit){display:flex;justify-content:flex-end}.form_callback .form__item[data-v-4ee98c21]:has(.checkbox){align-items:center;display:flex}.form_callback .form__result[data-v-4ee98c21]{text-align:center}.form_callback .form__result_text[data-v-4ee98c21]{color:#000;color:var(--text-primary,#000);font-size:18px;font-weight:400;line-height:24px;text-align:center;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none;text-underline-position:from-font}.form_callback .form__close[data-v-4ee98c21]{background:none;border:0;color:var(--color-black);display:block;height:.24rem;margin:0;padding:0;position:absolute;right:25px;top:25px;width:.24rem;z-index:999}@media screen and (max-width:1023px){.form_callback[data-v-4ee98c21]{padding:var(--gap-l) var(--gap-xxs);width:100%}.form_callback .form__group_row[data-v-4ee98c21]{flex-direction:column}.form_callback .form__group_row .form__item[data-v-4ee98c21]:not(:first-child){margin-top:var(--gap-xxs)}.form_callback .form__title br[data-v-4ee98c21]{display:none}.form_callback .form__submit[data-v-4ee98c21]{width:100%}.form_callback .form__close[data-v-4ee98c21]{right:15px;top:15px}}",""]),n.locals={},t.exports=n}}]);