"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9524],{35870:(e,t,r)=>{r.d(t,{T:()=>c});var n=r(8442),i=r(28489),a=r(26911),o=r(93307),c=function(){return n.V0.fetch("/api-v1/commerce/api/v1/cart",n.w$.GET).then((function(e){if(e.data)return e.data.data;throw(0,i.xK)(e)})).catch((function(e){throw(0,i.xK)(e)})).then((function(e){return{totalPrice:e.cartLines.reduce((function(e,t){return e+t.totalPrice.amountCents}),0)/100,totalToPay:e.totalPrice.amountCents/100,paymentIntention:e.paymentIntention,balance:0,balanceToSpend:0,totalDiscountInCart:0,totalGiftCardDiscountInCart:0,lastEditDate:"2022-02-21T00:00:00+01:00",shippingAddress:e.shippingAddress,totalQty:e.cartLines.reduce((function(e,t){return e+t.qty}),0),marketPlaceShippingCost:e.deliveries.reduce((function(e,t){if(!t.fulFilledByPcc){var r=t.shippingMethods.find((function(e){return e.id===t.selectedShippingMethod}));return e+(r?r.price.amountCents:0)}return e}),0)/100,dropShippingShippingCost:0,shippingCost:e.deliveries.reduce((function(e,t){if(t.fulFilledByPcc){var r=t.shippingMethods.find((function(e){return e.id===t.selectedShippingMethod}));return e+(r?r.price.amountCents:0)}return e}),0)/100,totalInstallationPrice:0,giftCardAmountToSpend:0,totalPayed:0,surcharge:0,directPoints:0,cartShops:[],shippingCostISP:0,commission:0,commissionISP:0,talonOneNotifications:[],isCustomPcCom:!1,articles:e.cartLines.map((function(t){return{idArticle:+t.product.id,idLine:t.id,type:"normal",articleImage:t.product.image,ean:"123456789",articleReference:0,lineReference:e.lineRelationships.reduce((function(e,r){return e||(r.relatedLineId===t.id?r.parentLineId:void 0)}),void 0),availabilityCode:e.deliveries.reduce((function(e,r){return r.items.reduce((function(e,r){return r.lineId===t.id?(0,o.XU)(r.availabilityType):e}),a.wr.OUT_OF_STOCK.valueOf())}),a.wr.OUT_OF_STOCK.valueOf()),name:t.product.name,family:"Portátiles",superFamily:"Ordenadores",totalPrice:t.totalPrice.amountCents/100,totalPriceWithSpanishCanon:t.totalPrice.amountCents/100,unitPrice:(t.unitPrice.amountCents+t.unitTaxAmount.amountCents)/100,basePrice:t.unitPrice.amountCents/100,unitTaxAmount:t.unitTaxAmount.amountCents/100,qty:t.qty,slug:"lenovo-ideapad",trademark:"Lenovo",trademarkRef:"345jkhgkj35",promotions:[],mpOffer:{idOffer:0,shopId:t.seller.id,shopName:t.seller.name,shopSlug:"",condition:t.condition,shipTax:0,priceOffer:0,valorateShop:0,maxShippingDays:0,minShippingDays:0,shippingTypeCode:"",deliveryKey:0},deliveryDate:{strDeliveryDate:"hoy no, mañana",isSameDay:!1,minDeliveryDate:"min",maxDeliveryDate:"max"},storeAvailability:{1:!0,26:!1,27:!1,28:!1,30:!1,44:!0,45:!1,62:!1,295:!1},articleStock:0,isOem:!1,extendedInsurance:void 0,extendedInsurances:[],installationService:void 0,canAddGiftPaper:!1,isCustomPcCom:!1,insuranceSelected:void 0,extraServiceSelected:void 0,articleWarrantyReference:0,isPromotional:0,mpOfferReference:"",subExtraOptions:[],subExtraArticles:[],isElectronic:!1,digitalData:null,isExtraServiceArticle:e.lineRelationships.reduce((function(e,r){return e||r.relatedLineId===t.id}),!1),extraServices:[],couponDiscountTextValue:"",detail:"",date:""}}))}}))}},78671:(e,t,r)=>{r.d(t,{s:()=>a});var n=r(8442),i=r(28489),a=function(){return n.V0.fetch("/api-v1/commerce/api/v1/country",n.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)})).then((function(e){var t=[];return Object.keys(e).forEach((function(r,n){t.push({idCountry:n,iso:e[n].isoCode,name:e[n].isoName})})),t}))}},47242:(e,t,r)=>{r.d(t,{S:()=>c});var n=r(8442),i=r(28489);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?function(e){var t=o(new Set(e));return n.V0.fetch("/api-v1/commerce/api/v1/offer/relatable",n.w$.GET,{productIds:t}).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)}))}(e).then((function(e){return e})):[]}},39140:(e,t,r)=>{r.d(t,{b:()=>I});var n=r(35870),i=r(8442),a=r(28489),o=r(3678),c=r(93307),d=r(77733);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(p[0].default=1,I?[3,3]:(I=p[0],[4,(0,d.M)({id:I.id.toString(),name:I.name+" "+I.surname,addressLine:I.address,email:I.email,phone:I.phone,countryIsoCode:I.country.iso,provinceIsoCode:I.province.id,city:I.city,postalCode:I.postalCode}).catch((function(){I=void 0}))])):[3,3];case 2:A.sent(),A.label=3;case 3:return l.length>0&&(l[0].defaultUser=!0,f||(f=l[0])),y=function(e){var t=[];return e.includes(o.XL.ADYEN_CARD)&&t.push({bank:"Adyen",description:"Esta forma de pago es inmediata y totalmente segura. Todos los pagos efectuados mediante esta forma de pago serán validados por su entidad bancaria y en caso de ser aceptados nos será remitido de forma automática e instantanea. Requiere de una clave de seguridad para poder realizar este tipo de pagos online. Consulte a su entidad bancaria si desconoce su clave de seguridad. Se aceptan tarjetas VISA\\/ VISA Electron y MasterCard\\/Maestro.",groupType:"tarjeta",idPayment:o.XL.ADYEN_CARD,message:"",name:"Tarjeta de Crédito / Débito",slug:"adyen",url:""}),e.includes(o.XL.APLAZAME)&&t.push({bank:"Aplazame",description:"Financiación a plazos con Tarjeta. Puedes financiar cualquier importe hasta un máximo de 2.500€ y elegir pagarlo entre 2 y 30 meses. Para solicitar la financiación es necesario que tengas un DNI o NIE válido, un teléfono móvil, y la tarjeta bancaria. El pedido tiene que tener dirección de entrega en España. La financiación tiene un coste TAE del 12,5%. Pagas una entrada inicial en momento de la compra, que no incluye intereses, y el resto se reparte entre las cuotas seleccionadas. RECUERDA TENER EL DNI / NIE ORIGINAL A MANO para tramitar la financiación.
IMPORTANTE: Si tu pedido incluye artículos que entran dentro de una campaña sin intereses, Aplazame lo tendrá en cuenta para no aplicar intereses sobre la financiación en aquellos artículos que estén dentro de la campaña correspondiente.",groupType:"financiacion",idPayment:o.XL.APLAZAME,message:"",name:"Financiación Aplazame de 2 a 30 meses (inmediata)",slug:"aplazame",url:""}),t}(s),[2,{cart:t,shippingAddress:p,billingAddress:l,billingSelected:f?f.idUser:0,shippingSelected:I?I.id:0,agencySelected:69,paymentTypeSelected:23,agencies:{availableAgencies:[]},payments:y,paymentsNotAllowed:[],deliveryTimeCollection:[],delegations:[],availableClientPromotions:[],canShowGiftPaper:0,canShowNeutralDelivery:!0,hasOtherTwoOrdersWithPaypal:!1,hasAssembly:!1,hasCif:!1,hasPublicCif:!1,customMessage:0,availableShops:[],adyenBankstores:{},canBeSimplifiedInvoice:!1,criticalErrors:[],canShowShippingPoints:!1,canBePremium:!1,authorizedPoints:[],isCollectInShop:!1,talonCoupons:[],ordersAndDeliveries:[],awardedFinancing:void 0,payPerUseInstallments:[],shopCounter:!1}]}}))},f=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=p.apply(e,t);function a(e){l(i,r,n,a,o,"next",e)}function o(e){l(i,r,n,a,o,"throw",e)}a(void 0)}))},function(){return f.apply(this,arguments)})},93307:(e,t,r)=>{r.d(t,{XU:()=>c,Zi:()=>a,m2:()=>o});var n=r(38483),i=r(26911),a=function(e){return{streetNumber:"",id:parseInt(e.id),nif:"29318711J",alias:"",company:"",name:d(e.name),surname:s(e.name),address:e.addressLine,postalCode:e.postalCode,city:e.city,phone:e.phone,default:0,province:{id:e.provinceIsoCode,name:e.provinceIsoName},country:{idCountry:0,iso:e.countryIsoCode,name:e.countryIsoName,provinces:0},email:e.email,optionalInformation:""}},o=function(e){return{streetNumber:"",activated:"",address:e.addressLine,alias:"",billingType:n.y.INDIVIDUAL,cellPhone:e.phone,city:e.city,clientPromotions:{promotions:[]},company:"",country:{idCountry:0,iso:e.countryIsoCode,name:e.countryIsoName,provinces:0},defaultUser:!1,domain:"",idUser:parseInt(e.id),name:d(e.name),nif:"29318711J",postalCode:e.postalCode,province:{id:e.provinceIsoCode,name:e.provinceIsoName},surname:s(e.name)}},c=function(e){var t={STOCK_ON_HAND:i.wr.IN_STOCK,STOCK_IN_TRANSIT:i.wr.INMINENT_REPLENISHMENT,PLANNED_REPLENISHMENT:i.wr.HIGH_AVAILABILITY,OUT_OF_STOCK:i.wr.OUT_OF_STOCK};if(!(e in t))throw new Error("Availability type not supported "+e);return t[e]},d=function(e){return e.split(" ")[0]},s=function(e){var t=e.split(" ");return t.length>1?(t.shift(),t.join(" ")):" "}},77733:(e,t,r)=>{r.d(t,{M:()=>a});var n=r(8442);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=function(e){return n.V0.fetch("/api-v1/commerce/api/v1/cart/shipping-address",n.w$.PUT,function(e){for(var t=1;t{r.d(t,{r:()=>a});var n=r(8442),i=r(28489),a=function(e){return n.V0.fetch("/api-v1/commerce/api/v1/payment/".concat(e,"/aplazame/checkout"),n.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)}))}},3678:(e,t,r)=>{var n,i,a;r.d(t,{XL:()=>n,bG:()=>i}),function(e){e.ADYEN_CARD="adyen-card",e.REDSYS_CARD="redsys-card",e.APLAZAME="aplazame"}(n||(n={})),function(e){e.ERROR="Error",e.REDIRECT="Redirect",e.AUTHORISED="Authorised",e.PENDING="Pending",e.PAID="Paid"}(i||(i={})),function(e){e.STOCK_ON_HAND="STOCK_ON_HAND",e.STOCK_IN_TRANSIT="STOCK_IN_TRANSIT",e.PLANNED_REPLENISHMENT="PLANNED_REPLENISHMENT",e.OUT_OF_STOCK="OUT_OF_STOCK"}(a||(a={}))},94062:(e,t,r)=>{r.d(t,{M:()=>a});var n=r(3678),i=r(50519),a=function(e,t){if(e.cart.paymentIntention&&(n.XL.APLAZAME===e.cart.paymentIntention.paymentMethod&&t((0,i.XV)(n.XL.APLAZAME)),n.XL.ADYEN_CARD===e.cart.paymentIntention.paymentMethod)){var r=e.cart.paymentIntention.paymentData;t((0,i.$V)(n.XL.ADYEN_CARD)),t((0,i.K1)({cardData:{cardBrand:r.paymentMethod.brand,cardName:r.paymentMethod.holderName,endDigits:r.paymentMethod.endDigits},data:{browserInfo:{acceptHeader:r.browserInfo.acceptHeader,colorDepth:r.browserInfo.colorDepth,javaEnabled:r.browserInfo.javaEnabled,language:r.browserInfo.language,screenHeight:r.browserInfo.screenHeight,screenWidth:r.browserInfo.screenWidth,timeZoneOffset:r.browserInfo.timeZoneOffset,userAgent:r.browserInfo.userAgent},clientStateDataIndicator:r.clientStateDataIndicator,paymentMethod:{brand:r.paymentMethod.brand,encryptedCardNumber:r.paymentMethod.encryptedCardNumber,encryptedExpiryMonth:r.paymentMethod.encryptedExpiryMonth,encryptedExpiryYear:r.paymentMethod.encryptedExpiryYear,encryptedSecurityCode:r.paymentMethod.encryptedSecurityCode,holderName:r.paymentMethod.holderName,type:r.paymentMethod.type},riskData:{clientData:r.riskData.clientData},storePaymentMethod:r.storePaymentMethod}}))}}},28489:(e,t,r)=>{r.d(t,{C0:()=>F,Ck:()=>N,JN:()=>X,Lu:()=>b,Lw:()=>j,Ot:()=>x,PI:()=>K,Rr:()=>G,Ux:()=>M,Yg:()=>D,_y:()=>P,o1:()=>V,pY:()=>U,rY:()=>W,xK:()=>H});var n=r(33945),i=r(26911),a=r(23031),o=r(49553),c=r(50519),d=r(97423);function s(e,t,r,n,i,a,o){try{var c=e[a](o),d=c.value}catch(e){return void r(e)}c.done?t(d):Promise.resolve(d).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){s(a,n,i,o,c,"next",e)}function c(e){s(a,n,i,o,c,"throw",e)}o(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,r){return f=p()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&v(i,r.prototype),i},f.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function I(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function y(e,t){return null!=t&&"undefined"!==typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _(e,t){return!t||"object"!==E(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}var E=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function m(e){var t="function"===typeof Map?new Map:void 0;return m=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return f(e,arguments,A(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)},m(e)}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A(e);if(t){var i=A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}var T,S=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]").concat(null!==(r=t.articleName)&&void 0!==r?r:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.OUT_OF_STOCK:var n;return{text:"".concat((0,a.t)("checkout.errors.outOfStock")," ").concat(null!==(n=t.articleName)&&void 0!==n?n:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.EMPTY_CART:var o;return{text:"".concat((0,a.t)("checkout.errors.emptyCart")," ").concat(null!==(o=t.articleName)&&void 0!==o?o:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.USER_NOT_FOUND:var c;return{text:"".concat((0,a.t)("checkout.errors.userNotFound")," ").concat(null!==(c=t.articleName)&&void 0!==c?c:"",""),type:"danger",errorCode:t.code,hasIcon:!0};case i.LI.ARTICLE_CANT_BE_ALONE_IN_ORDER:var d;return{text:"".concat((0,a.t)("checkout.errors.articleCantBeAloneInOrder")," ").concat(null!==(d=t.articleName)&&void 0!==d?d:"",""),type:"danger",errorCode:t.code,hasIcon:!0,blockNextStep:!0};case i.LI.URGENT_LIMIT_STOCK_REACHED:return{text:(0,a.t)("checkout.alerts.stockLimitReached"),type:"info",errorCode:t.code};case i.LI.MARKETPLACE_OFFER_MATCH:return{text:(0,a.t)("checkout.alerts.marketplaceOfferMatch"),type:"info",errorCode:t.code};case i.LI.WEIGHT_INTERNATIONAL_SHIPPING:return{text:(0,a.t)("checkout.alerts.weightInternationalShipping"),type:"info",errorCode:t.code};case i.LI.CP_BLOCKED:return{text:(0,a.t)("checkout.alerts.cpBlocked"),type:"info",errorCode:t.code};case i.LI.MARKET_PLACEORDER_WITHOUT_ADYEN:return{text:(0,a.t)("checkout.alerts.marketPlaceOrderWithoutAdyen"),type:"info",errorCode:t.code};case i.LI.CANARY_LIMITATION:return{text:(0,a.t)("checkout.alerts.canaryLimitation"),type:"info",errorCode:t.code};case i.LI.DROPSHIPPING_ADDRESS_LIMITATION:return{text:t.articleName?(0,a.t)("checkout.alerts.dropShippingAddressSendingLimitation").replace(":article","".concat(t.articleName,"")):(0,a.t)("checkout.alerts.dropShippingAddressSendingLimitationGeneric"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case i.LI.PREMIUM_TARIFF_ADDRESS_LIMITATION:return{text:(0,a.t)("checkout.alerts.premiumTariffAddressLimitation"),type:"info",errorCode:t.code};case i.LI.SHIPPING_COUNTRY_LIMITATION:return{text:(0,a.t)("checkout.alerts.shippingCountryLimitation"),type:"info",errorCode:t.code};case i.LI.DIGITAL_CODES_AMOUNT_LIMITATION:return{text:(0,a.t)("checkout.alerts.digitalCodesAmountLimitation"),type:"info",errorCode:t.code};case i.LI.DIGITAL_CODES_ZONES_LIMITATION:return{text:(0,a.t)("checkout.alerts.digitalCodesZonesLimitation"),type:"info",errorCode:t.code};case i.LI.CART_WITHOUT_ADDRESS:return{text:(0,a.t)("checkout.alerts.cartWithoutAddress"),type:"info",errorCode:t.code};case i.LI.CHANGE_BILLING_MODIFIER:return{text:(0,a.t)("checkout.alerts.changeBillingInModifier"),type:"info",errorCode:t.code,blockNextStep:!0};case i.LI.CART_WITHOUT_AGENCIES:return{text:(0,a.t)("checkout.alerts.cartWithoutAgencies"),type:"info",errorCode:t.code,blockNextStep:!0};case i.LI.CART_WITHOUT_PAYMENTMETHODS:return{text:(0,a.t)("checkout.alerts.cartWithoutPaymentMethods"),type:"info",errorCode:t.code};case i.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE:return{text:(0,a.t)("checkout.alerts.noZonesAvailableInMktPlace"),type:"info",errorCode:t.code,blockNextStep:!0};case i.LI.CART_FORCE_BILLING:return{text:(0,a.t)("checkout.alerts.cartForceBilling"),type:"info",errorCode:t.code};case i.LI.MAX_COD_DELIVERY_MODIFIER:return{text:(0,a.t)("checkout.alerts.maxCodDeliveryModifier"),type:"info",errorCode:t.code};case i.LI.PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER:return{text:"",type:"info",errorCode:t.code};case i.LI.PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE:return{text:(0,a.t)("checkout.alerts.pickingPointOrInShopPayPerUse"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case i.LI.PORTUGAL_ARTICLES_VALIDATION:return{text:t.articleName?(0,a.t)("checkout.alerts.portugalArticlesLimitation").replace(":article","".concat(t.articleName,"")):(0,a.t)("checkout.alerts.portugalArticlesLimitationGeneric"),type:"warning",errorCode:t.code,blockNextStep:!0,hasIcon:!0};case i.LI.SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION:return{text:(0,a.t)("checkout.alerts.shippingIsIncompatibleWithBillingValidation"),type:"danger",errorCode:t.code,blockNextStep:!0,hasIcon:!0};default:return{text:(0,a.t)("checkout.alerts.genericError"),type:"info",errorCode:t.code}}},K=function(e){var t,r,n,i,o,c,d,s=(null===(t=e.detail)||void 0===t||null===(r=t.info)||void 0===r?void 0:r.limits)&&(null===(n=e.detail)||void 0===n||null===(i=n.info)||void 0===i||null===(o=i.limits)||void 0===o?void 0:o.length)?null===(c=e.detail)||void 0===c||null===(d=c.info)||void 0===d?void 0:d.limits[0].name:void 0;return s?"".concat((0,a.t)("checkout.alerts.stockLimitReachedWithArticle")," ").concat(s,". ").concat((0,a.t)("checkout.alerts.yourCartHasBeenUpdated")):(0,a.t)("checkout.alerts.stockLimitReached")},W=(T=l((function(e,t){var r;return S(this,(function(n){switch(n.label){case 0:return y(e,C)||y(e,g)?((r=sessionStorage.getItem("koUrl"))&&r.includes("/cart/ko")?t((0,c.A7)(r)):window.location.href="".concat(d.qp.PATH).concat(d.Ti.PATH),[3,4]):[3,1];case 1:return y(e,P)||y(e,N)?[4,(0,o.QV)()]:[3,3];case 2:return n.sent(),t(c.wt.failure(e)),[3,4];case 3:y(e,D)?t(c.wt.failure(e)):y(e,R)?t((0,c.bI)((0,a.t)("checkout.errors.noZonesAvailableInMktPlace"))):t(c.wt.failure(e)),n.label=4;case 4:return[2]}}))})),function(e,t){return T.apply(this,arguments)}),X=function(){var e=l((function(e,t){return S(this,(function(r){switch(r.label){case 0:return y(e,C)||y(e,g)?(window.location.href="".concat(d.qp.PATH).concat(d.Ti.PATH),[3,4]):[3,1];case 1:return y(e,P)||y(e,N)?[4,(0,o.QV)()]:[3,3];case 2:return r.sent(),t(c.kX.failure(e)),[3,4];case 3:y(e,D)?t(c.kX.failure(e)):y(e,R)?t((0,c.bI)((0,a.t)("checkout.errors.noZonesAvailableInMktPlace"))):t(c.kX.failure(e)),r.label=4;case 4:return[2]}}))}));return function(t,r){return e.apply(this,arguments)}}(),j=function(){var e=l((function(e,t,r,i,a){var d;return S(this,(function(s){switch(s.label){case 0:return y(e,P)||y(e,N)?[4,(0,o.QV)()]:[3,2];case 1:return s.sent(),t(c.Uq.failure(e)),[3,3];case 2:y(e,L)?t((0,c.sT)({idCart:r,query:(0,n.A8)(i,"idPayment"),setNewDeliveryAgency:!1,newDefaultPaymentMethod:!0,relatableOffers:a})):y(e,O)?t((0,c.sT)({idCart:r,query:(0,n.A8)(i,"idAgency"),setNewDeliveryAgency:!0,relatableOffers:a})):y(e,D)||y(e,Y)?t(c.Uq.failure(e)):y(e,C)||y(e,g)?(d=sessionStorage.getItem("koUrl"))&&d.includes("/cart/ko")?t((0,c.A7)(d)):t(c.Uq.failure(e)):(y(e,w),t(c.Uq.failure(e))),s.label=3;case 3:return[2]}}))}));return function(t,r,n,i,a){return e.apply(this,arguments)}}()},72065:(e,t,r)=>{r.d(t,{$Vj:()=>n.$V,A3x:()=>i.A3,A40:()=>i.A4,A7T:()=>n.A7,Ahb:()=>i.Ah,ArB:()=>i.Ar,Bko:()=>i.Bk,BoC:()=>i.Bo,BrQ:()=>a.Br,CYj:()=>i.CY,Chx:()=>i.Ch,Coy:()=>i.Co,D4n:()=>a.D4,DQ9:()=>n.DQ,DXA:()=>i.DX,DqV:()=>i.Dq,Dsx:()=>a.Ds,E6b:()=>i.E6,EFr:()=>i.EF,EVb:()=>i.EV,Efm:()=>i.Ef,EkG:()=>n.Ek,Eof:()=>n.Eo,Eth:()=>n.Et,FMh:()=>i.FM,FYt:()=>i.FY,H6W:()=>n.H6,H7R:()=>a.H7,H97:()=>n.H9,HPM:()=>n.HP,HUT:()=>i.HU,Hm2:()=>n.Hm,HqV:()=>i.Hq,Itk:()=>i.It,JP3:()=>n.JP,Jaj:()=>i.J,Jcs:()=>n.Jc,K1L:()=>n.K1,L1p:()=>i.L1,LOu:()=>i.LO,LSj:()=>i.LS,MVr:()=>i.MV,MZK:()=>i.MZ,Nle:()=>a.Nl,NpQ:()=>n.Np,O0T:()=>a.O0,Of5:()=>n.Of,Oim:()=>n.Oi,Oo5:()=>i.Oo,P7h:()=>n.P7,PYf:()=>i.PY,Pf5:()=>i.Pf,Q02:()=>i.Q0,QEG:()=>i.QE,QEN:()=>i.oy,QVz:()=>n.QV,QfI:()=>i.Qf,QkQ:()=>i.Qk,Qrj:()=>i.Qr,QvV:()=>i.Qv,RK0:()=>n.RK,RUH:()=>n.RU,R_R:()=>i.R_,RnJ:()=>n.Rn,S2R:()=>i.S2,SGx:()=>a.SG,Syk:()=>i.Sy,Tny:()=>i.Tn,U8n:()=>i.U8,UD5:()=>i.UD,UGj:()=>a.UG,V7P:()=>a.V7,VZ5:()=>i.VZ,WFr:()=>a.WF,Wiq:()=>i.Wi,WuQ:()=>i.Wu,WvY:()=>i.Wv,Wwl:()=>n.Ww,X6K:()=>i.X6,XL7:()=>a.XL,XTI:()=>n.XT,XVd:()=>n.XV,XZx:()=>i.XZ,Xb9:()=>n.Xb,Xcl:()=>a.Xc,XpC:()=>i.Xp,Xzp:()=>n.Xz,Zlu:()=>a.Zl,ZpS:()=>n.Zp,_Iv:()=>i._I,_Vd:()=>a._V,_pP:()=>i._p,_vP:()=>i._v,aDD:()=>i.aD,bIw:()=>n.bI,bPC:()=>n.bP,bTv:()=>n.bT,cJO:()=>i.cJ,cRT:()=>n.cR,ckw:()=>a.ck,cm7:()=>i.cm,dBV:()=>i.dB,dMi:()=>i.dM,dtU:()=>i.dt,duF:()=>n.du,eVC:()=>i.eV,eYc:()=>i.eY,fW2:()=>i.fW,gHe:()=>i.gH,gMe:()=>a.gM,h8e:()=>a.h8,hbI:()=>a.hb,i6p:()=>i.i6,iBt:()=>i.iB,iG$:()=>n.iG,i_L:()=>n.i_,iyK:()=>a.iy,izz:()=>a.iz,jb7:()=>i.jb,k8Z:()=>n.k8,kEf:()=>i.kE,kWl:()=>a.kW,kaJ:()=>i.k,kun:()=>i.ku,lV0:()=>i.lV,lzc:()=>n.lz,mfd:()=>n.mf,mwV:()=>a.mw,nT7:()=>i.nT,ncy:()=>n.nc,nut:()=>n.nu,oLt:()=>n.oL,pPk:()=>n.pP,pYJ:()=>n.pY,peT:()=>a.pe,pt3:()=>i.pt,px3:()=>n.px,qDK:()=>i.qD,qbP:()=>n.qb,qp7:()=>i.qp,rTZ:()=>i.rT,rc9:()=>i.rc,rdZ:()=>n.rd,rwq:()=>i.rw,s4q:()=>n.s4,sC4:()=>i.sC,sKd:()=>a.sK,sNc:()=>i.sN,sRH:()=>n.sR,sTi:()=>n.sT,sxb:()=>a.sx,tIm:()=>i.tI,t_p:()=>n.t_,tdJ:()=>n.td,uKi:()=>i.uK,uen:()=>i.ue,vCA:()=>i.vC,vZM:()=>i.vZ,vaw:()=>i.v,vo1:()=>a.vo,vqT:()=>n.vq,w1$:()=>i.w1,wC2:()=>n.wC,wDp:()=>n.wD,wGL:()=>i.wG,wI4:()=>n.wI,wPS:()=>n.wP,wrp:()=>a.wr,xlD:()=>i.xl,yJU:()=>n.yJ,yTB:()=>i.yT,zwv:()=>i.zw});var n=r(50519),i=(r(73859),r(80899)),a=r(26911)},73859:(e,t,r)=>{r.d(t,{J:()=>v});var n=r(63814),i=r(26911),a=r(33945),o=r(28489),c=r(23031),d=r(50519),s=r(3678),l=r(40093);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0,r={text:"",type:"info"},u=!1,p=function(e){var t;if((null===(t=e.filter((function(e){return e.code!==i.LI.ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD})))||void 0===t?void 0:t.length)>0)return(0,o.C0)(e)},v=function(t){var r,n,o,c,d=void 0;(null===(r=t.financing)||void 0===r?void 0:r.financingMethods)&&(null===(n=t.financing)||void 0===n?void 0:n.financingMethods.length)>0&&(d=null===(c=t.financing.financingMethods.find((function(t){return t.idPayment===e.order.paymentMethodSelected})))||void 0===c?void 0:c.idPayment);var s,l=void 0;(null===(o=t.others)||void 0===o?void 0:o.othersMethods)&&t.others.othersMethods.length>0&&(l=null===(s=t.others.othersMethods.filter((function(t){if("payinshop"!==t.slug||t.idPayment!==i.XL.PAY_IN_SHOP||e.order.shippingMethod===i.sx.SHOP||(0,a.CZ)())return t})).find((function(t){return t.idPayment===e.order.paymentMethodSelected})))||void 0===s?void 0:s.idPayment);return{financingMethodSelected:d,otherPaymentMethodSelected:l}},E=function(e){var t="",r="warning";if(f(e,o._y)){var n,i=null===(n=e.detail.info)||void 0===n?void 0:n.bookings;i&&(i.length>1&&(t=(0,c.t)("checkout.errors.outOfStockWithArticles",{articleNames:i.join(", ")})),1===i.length&&(t=(0,c.t)("checkout.errors.outOfStockWithArticle",{articleName:i[0].name})))}return f(e,o.Yg)&&(t=(0,c.t)("checkout.errors.userNotFound")),f(e,o.Ck)&&(t=(0,o.PI)(e)),f(e,o.pY)&&(t=(0,c.t)("checkout.errors.genericError"),r="danger"),{alertTextReturned:t,typeReturned:r}},m=function(t){var r=e.alert;return(0,a.vA)(t)?r=I(A({},e.alert),{global:(0,a.Of)(i.nE.PCC_ARTICLE_SPLIT)}):e.alert.global.alertSlug===i.pe.PCC_ARTICLE_SPLIT&&(r=I(A({},e.alert),{global:{text:"",type:"info"}})),r};switch(t.type){case n.s0:return I(A({},e),{stepper:I(A({},e.stepper),{currentStep:t.payload})});case n.kI:return I(A({},e),{redirectToBasket:t.payload});case n.K3:return I(A({},e),{allowFromBasketToStepTwo:t.payload});case n.ze:return I(A({},e),{cart:I(A({},e.cart),{isLoading:!0})});case n.Rz:return I(A({},e),{allowFromBasketToStepTwo:!0});case n.rT:if(u=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var h=E(t.payload),T=h.alertTextReturned,S=h.typeReturned;r={text:T,type:S}}return I(A({},_),{stepTwoCriticalError:!1,isLoading:!1,redirectToBasket:u,stepper:{currentStep:1},alert:I(A({},e.alert),{global:r})});case n.Gm:return I(A({},_),{stepper:{currentStep:i.h8.CART},datalayerCartItems:e.datalayerCartItems,alert:m(t.payload.articles),redirectToBasket:e.redirectToBasket,stepTwoCriticalError:!t.payload.articles.length,cart:t.payload});case n.n1:return I(A({},e),{stepTwoCriticalError:t.payload});case n.W:return I(A({},e),{isLoading:!0});case n.es:var P,N,O,L,C,g=t.payload.paymentMethods.others.selected===i.XL.GRATIS,D=(0,a.UJ)(t.payload);(null===(P=e.order)||void 0===P?void 0:P.adyen)&&(D.adyen=e.order.adyen);var R=t.payload.paymentMethods,M=v(R),b=M.financingMethodSelected,w=M.otherPaymentMethodSelected,U=t.payload.addresses.shippingAddresses.find((function(e){return e.isDefault})),Y=null===(N=t.payload.criticalErrors)||void 0===N?void 0:N.find((function(e){return e.code===i.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE})),k=!!U&&(0,a.pS)(U.addressData.province)&&!!Y;return t.payload.cart.relatableOffers=e.cart.relatableOffers,I(A({},e,t.payload),{hasShippingErrorInCanarias:k,alert:I(A({},e.alert),{deliveryAlerts:t.payload.deliveryAlerts,paymentAlerts:t.payload.paymentAlerts,addressForm:{text:"",type:"info"}}),paymentTab:t.payload.defaultPaymentMethod===i.XL.PAY_PER_USAGE?i.iy.FINANCING:t.payload.paymentMethods.multibanco?i.iy.MULTIBANCO:e.paymentTab,paymentMethods:I(A({},R),{financing:I(A({},R.financing),{selected:null!==b&&void 0!==b?b:null===(O=R.financing)||void 0===O?void 0:O.selected}),others:I(A({},R.others),{selected:null!==w&&void 0!==w?w:null===(L=R.others)||void 0===L?void 0:L.selected})}),order:A(I(A({},e.order),{paymentMethodSelected:g?i.XL.GRATIS:D.paymentMethodSelected}),D),isLoading:!1,deliveries:(0,d.RU)(null===(C=e.user)||void 0===C?void 0:C.email)?e.deliveries:t.payload.deliveries});case n.gJ:if(u=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var x=E(t.payload),B=x.alertTextReturned,V=x.typeReturned;r={text:B,type:V}}return I(A({},e),{stepTwoCriticalError:!1,isLoading:!1,redirectToBasket:u,alert:I(A({},e.alert),{global:r})});case n.qA:return I(A({},e),{cart:I(A({},e.cart),{isLoading:!0})});case n.rE:var G,H,F,K,W,X,j,Z,q,$,z,J,Q,ee,te,re,ne,ie,ae,oe,ce,de,se=t.payload,le=se.cart,ue=se.paymentMethods,pe=se.deliveries,fe=se.billingAddresses,Ae=se.setNewDeliveryAgency,Ie=se.criticalErrors,ye=se.coupons,_e=se.payPerUseInstallments,ve=se.newDefaultPaymentMethod,Ee=ue.others.selected===i.XL.GRATIS,me=null!==(oe=ue.paymentCard.methods)&&void 0!==oe?oe:[],he=null!==(ce=ue.others.othersMethods)&&void 0!==ce?ce:[],Te=null!==(de=ue.financing.financingMethods)&&void 0!==de?de:[],Se=null===(G=y(me).concat(y(he),y(Te)).find((function(t){return(null===t||void 0===t?void 0:t.idPayment)===e.order.paymentMethodSelected})))||void 0===G?void 0:G.idPayment,Pe=Ie?p(Ie):void 0,Ne=fe.find((function(t){return t.addressData.id===e.order.billingAddressSelected})),Oe=Ne?e.order.billingAddressSelected:fe.length>0?null===(H=fe.find((function(e){return e.isChecked})))||void 0===H?void 0:H.addressData.id:void 0,Le=null===(F=e.addresses.billingAddresses.find((function(e){return e.addressData.id===Oe})))||void 0===F?void 0:F.addressData.country,Ce=null===(K=e.addresses.shippingAddresses.find((function(t){return t.addressData.id===e.order.shippingAddressSelected})))||void 0===K?void 0:K.addressData.province,ge=null===Ie||void 0===Ie?void 0:Ie.find((function(e){return e.code===i.LI.NO_ZONES_AVAILABLE_IN_MKTPLACE})),De=(0,a.pS)(Ce)&&!!ge,Re=le.articles.find((function(e){return e.id===l.fy})),Me=(!e.order.solidaryAmountChecked||"España"===Le||!Re)&&e.order.solidaryAmountChecked,be=v(ue),we=be.financingMethodSelected,Ue=be.otherPaymentMethodSelected,Ye=(0,d.RU)(null===(W=e.user)||void 0===W?void 0:W.email)?[]:pe.filter((function(e){return"marketplace"===e.type&&e.agencies.length>0})).map((function(e){return{id:String(e.idShop),orderKey:Number(e.orderKey),offers:e.offers,value:e.defaultAgency}})),ke=null===pe||void 0===pe?void 0:pe.find((function(e){return"pccomponentes"===e.type})),xe=!1,Be=!1;if((null===(X=ue.paymentCard)||void 0===X?void 0:X.methods)&&ue.paymentCard.methods.length>0){var Ve=!0,Ge=!1,He=void 0;try{for(var Fe,Ke=ue.paymentCard.methods[Symbol.iterator]();!(Ve=(Fe=Ke.next()).done);Ve=!0){var We=Fe.value;We.idPayment===i.XL.ADYEN&&(xe=!0),We.idPayment===i.XL.REDSYS&&(Be=!0)}}catch(e){Ge=!0,He=e}finally{try{Ve||null==Ke.return||Ke.return()}finally{if(Ge)throw He}}}var Xe=xe?i.XL.ADYEN:Be?i.XL.REDSYS:void 0,je=e.paymentTab;return!ve||Xe!==i.XL.ADYEN&&Xe!==i.XL.REDSYS||(je=i.iy.CARD),Se&&Se===s.XL.APLAZAME&&(je=i.iy.FINANCING),le.relatableOffers=e.cart.relatableOffers,I(A({},e),{cart:I(A({},le),{isLoading:!1}),hasShippingErrorInCanarias:De,coupons:ye,addresses:I(A({},e.addresses),{billingAddresses:fe}),stepTwoCriticalError:!De&&!!(null===Pe||void 0===Pe?void 0:Pe.blockNextStep),alert:I(A({},e.alert),{global:r,criticalErrors:{text:Pe&&!De?Pe.text:"",type:null===Pe||void 0===Pe?void 0:Pe.type,hasIcon:null===Pe||void 0===Pe?void 0:Pe.hasIcon}}),paymentTab:ue.multibanco||je!==i.iy.MULTIBANCO?je:i.iy.CARD,paymentMethods:I(A({},ue),{paymentCard:I(A({},ue.paymentCard),{newCard:e.paymentMethods.paymentCard.newCard}),financing:I(A({},ue.financing),{selected:null!==we&&void 0!==we?we:null===(j=ue.financing)||void 0===j?void 0:j.selected}),others:I(A({},ue.others),{selected:null!==Ue&&void 0!==Ue?Ue:null===(Z=ue.others)||void 0===Z?void 0:Z.selected})}),order:I(A({},e.order),{solidaryAmountChecked:Me,marketplaceAgencies:JSON.stringify(Ye)===JSON.stringify(e.order.marketplaceAgencies)?e.order.marketplaceAgencies:Ye,billingAddressSelected:Oe,deliveryAgency:Ae?null===ke||void 0===ke?void 0:ke.defaultAgency:e.order.deliveryAgency,adyen:(null===(q=e.order.adyen)||void 0===q?void 0:q.adyenData)?e.order.adyen:{adyenIdUserCard:(null===($=e.order.adyen)||void 0===$?void 0:$.adyenIdUserCard)||((null===(z=ue.paymentCard)||void 0===z||null===(J=z.storedPaymentCards)||void 0===J||null===(Q=J.cards)||void 0===Q?void 0:Q.length)&&ue.paymentCard.storedPaymentCards.cards.length>0?ue.paymentCard.storedPaymentCards.cards[0].clientId:void 0),adyenDataCard:(null===(ee=e.order.adyen)||void 0===ee?void 0:ee.adyenDataCard)||((null===(te=ue.paymentCard)||void 0===te||null===(re=te.storedPaymentCards)||void 0===re||null===(ne=re.cards)||void 0===ne?void 0:ne.length)&&ue.paymentCard.storedPaymentCards.cards.length>0?ue.paymentCard.storedPaymentCards.cards[0].recurringDetailReference:void 0)},paymentMethodSelected:(0,d.RU)(null===(ie=e.user)||void 0===ie?void 0:ie.email)?null!==Se&&void 0!==Se?Se:Xe:Ee?i.XL.GRATIS:je===i.iy.MULTIBANCO?e.order.paymentMethodSelected===i.XL.MULTIBANCO&&ue.multibanco?i.XL.MULTIBANCO:i.XL.ADYEN:je===i.iy.FINANCING?null!==we&&void 0!==we?we:ue.financing.selected:je===i.iy.OTHER_OPTIONS?null!==Ue&&void 0!==Ue?Ue:ue.others.selected:Se||Xe||i.XL.ADYEN}),deliveries:(0,d.RU)(null===(ae=e.user)||void 0===ae?void 0:ae.email)?e.deliveries:pe,payPerUseInstallments:null!==_e&&void 0!==_e?_e:[]});case n.Vi:if(u=f(t.payload,o._y)||f(t.payload,o.Yg)||f(t.payload,o.Ck)||f(t.payload,o.pY)){var Ze=E(t.payload),qe=Ze.alertTextReturned,$e=Ze.typeReturned;r={text:qe,type:$e}}return I(A({},e),{cart:I(A({},e.cart),{isLoading:!1}),redirectToBasket:u,stepTwoCriticalError:e.stepTwoCriticalError,alert:I(A({},e.alert),{global:r})});case n.Q1:return I(A({},e),{cart:I(A({},e.cart),{showModalRecoverOrderOptions:t.payload})});case n.F7:return A({},e);case n.wi:return I(A({},e,t.payload),{footer:t.payload});case n.Fg:return A({},e);case n.O3:return I(A({},e),{order:I(A({},e.order),{conditionsAccepted:t.payload})});case n.BE:return I(A({},e),{order:I(A({},e.order),{deliveryAgency:t.payload})});case n.Yb:return I(A({},e),{order:I(A({},e.order),{deliveryDate:t.payload})});case n.ZB:return I(A({},e),{order:I(A({},e.order),{deliveryTime:t.payload})});case n.ne:return I(A({},e),{order:I(A({},e.order),{deliveryDateTimeStr:t.payload})});case n.bZ:return I(A({},e),{order:I(A({},e.order),{isSameDay:t.payload})});case n.gM:return I(A({},e),{order:I(A({},e.order),{isNeutralOrder:t.payload})});case n.zr:return I(A({},e),{order:I(A({},e.order),{isSubmittingAdress:t.payload})});case n.f8:return I(A({},e),{order:I(A({},e.order),{isValidatingAddress:t.payload})});case n.LB:return I(A({},e),{order:I(A({},e.order),{isCheckingValidAddress:t.payload})});case n.Pe:return I(A({},e),{order:I(A({},e.order),{productsWithGiftPaper:y(e.order.productsWithGiftPaper).concat([t.payload])})});case n.iX:return I(A({},e),{order:I(A({},e.order),{productsWithGiftPaper:y(e.order.productsWithGiftPaper.filter((function(e){return e!==t.payload})))})});case n.Bs:return I(A({},e),{order:I(A({},e.order),{agencyObservations:t.payload})});case n.b0:return I(A({},e),{order:I(A({},e.order),{marketplaceAgencies:t.payload.marketplaceAgencies,deliveryAgency:t.payload.agencySelected})});case n.dp:var ze=e.order.marketplaceAgencies.findIndex((function(e){return e.id===t.payload.id&&e.orderKey===t.payload.orderKey}));if(ze>=0&&e.order.marketplaceAgencies[ze].value===t.payload.value)return A({},e);var Je=y(e.order.marketplaceAgencies);return-1===ze?Je.push(t.payload):Je[ze]=t.payload,I(A({},e),{order:I(A({},e.order),{marketplaceAgencies:Je})});case n.RB:var Qe=e.addresses.shippingAddresses.findIndex((function(e){return e.addressData.id===t.payload})),et=e.addresses.shippingAddresses.map((function(e,t){return I(A({},e),{isChecked:t===Qe})}));return I(A({},e),{addresses:I(A({},e.addresses),{shippingAddresses:et}),order:I(A({},e.order),{shippingAddressSelected:t.payload})});case n.T6:var tt=e.addresses.billingAddresses.findIndex((function(e){return e.addressData.id===t.payload})),rt=e.addresses.billingAddresses.map((function(e,t){return I(A({},e),{isChecked:t===tt})}));return I(A({},e),{addresses:I(A({},e.addresses),{billingAddresses:rt}),order:I(A({},e.order),{billingAddressSelected:t.payload})});case n.Qy:return I(A({},e),{order:I(A({},e.order),{pickingPointSelected:t.payload})});case n.sg:return I(A({},e),{pickingPointSearchValues:A({},e.pickingPointSearchValues,t.payload)});case n.tI:return I(A({},e),{order:I(A({},e.order),{shopSelected:t.payload})});case n.SQ:return I(A({},e),{order:I(A({},e.order),{shippingMethod:t.payload||i.sx.SHIPPING_ADDRESS})});case n.E$:return I(A({},e),{order:I(A({},e.order),{whoPicksUp:I(A({},e.order.whoPicksUp),{data:t.payload?A({},e.order.whoPicksUp.data,t.payload):e.order.whoPicksUp.data?A({},e.order.whoPicksUp.data):void 0})})});case n.rh:return I(A({},e),{order:I(A({},e.order),{whoPicksUp:I(A({},e.order.whoPicksUp),{isValid:t.payload})})});case n.WL:return I(A({},e),{paymentTab:t.payload});case n.Wu:case n.O9:return I(A({},e),{order:I(A({},e.order),{paymentMethodSelected:t.payload})});case n.Vf:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{financing:I(A({},e.paymentMethods.financing),{selected:t.payload})}),order:I(A({},e.order),{paymentMethodSelected:t.payload})});case n.md:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{others:I(A({},e.paymentMethods.others),{selected:t.payload})}),order:I(A({},e.order),{paymentMethodSelected:t.payload})});case n.oP:return I(A({},e),{isLoading:t.payload});case n.Bf:return I(A({},e),{isLoadingAddressForm:t.payload});case n.uY:return I(A({},e),{isAddressFormValid:t.payload});case n.kc:return I(A({},e),{order:I(A({},e.order),{adyen:{adyenData:t.payload.data}}),paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{newCard:I(A({},t.payload.cardData),{data:t.payload.data})})})});case n.Wf:var nt;return I(A({},e),{order:I(A({},e.order),{adyen:{adyenData:null===(nt=e.paymentMethods.paymentCard.newCard)||void 0===nt?void 0:nt.data}})});case n.Zd:var it,at;return I(A({},e),{order:I(A({},e.order),{adyen:{adyenIdUserCard:null===(it=t.payload)||void 0===it?void 0:it.adyenIdUserCard,adyenDataCard:null===(at=t.payload)||void 0===at?void 0:at.adyenDataCard}})});case n.gc:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{storedPaymentCards:t.payload})})});case n.$p:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{storedPaymentCards:void 0})})});case n.fj:var ot,ct=null===(ot=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===ot?void 0:ot.cards.filter((function(e){return e.recurringDetailReference!==t.payload}));return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{storedPaymentCards:ct&&ct.length>0?I(A({},e.paymentMethods.paymentCard.storedPaymentCards),{cards:ct}):void 0})}),order:I(A({},e.order),{adyen:ct&&ct.length>0?{adyenIdUserCard:ct[0].clientId,adyenDataCard:ct[0].recurringDetailReference}:e.paymentMethods.paymentCard.newCard?{adyenData:e.paymentMethods.paymentCard.newCard.data}:void 0})});case n.w_:var dt,st=null===(dt=e.paymentMethods.paymentCard.expiredCards)||void 0===dt?void 0:dt.cards.filter((function(e){return e.recurringDetailReference!==t.payload}));return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{expiredCards:st&&st.length>0?I(A({},e.paymentMethods.paymentCard.expiredCards),{cards:st}):void 0})})});case n.b9:return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{newCard:void 0})}),order:I(A({},e.order),{adyen:void 0})});case n.f_:var lt,ut;return I(A({},e),{paymentMethods:I(A({},e.paymentMethods),{paymentCard:I(A({},e.paymentMethods.paymentCard),{clientWithNoCards:t.payload})}),order:I(A({},e.order),{adyen:(null===(lt=e.paymentMethods.paymentCard)||void 0===lt||null===(ut=lt.newCard)||void 0===ut?void 0:ut.data)?{adyenData:e.paymentMethods.paymentCard.newCard.data}:void 0})});case n.hL:return I(A({},e),{order:I(A({},e.order),{selectedCoupon:t.payload})});case n.Nm:return I(A({},e),{datalayerCartItems:t.payload});case n.JB:return I(A({},e),{alert:I(A({},e.alert),{global:t.payload})});case n.XC:return I(A({},e),{alert:I(A({},e.alert),{criticalErrors:t.payload})});case n.qX:return I(A({},e),{order:I(A({},e.order),{giftCardCode:t.payload})});case n.nQ:return I(A({},e),{alert:I(A({},e.alert),{addressForm:t.payload})});case n.f4:return I(A({},e),{incompleteAddressType:t.payload});case n.f9:return I(A({},e),{invalidAddress:t.payload});case n.vR:return I(A({},e),{order:I(A({},e.order),{solidaryAmountChecked:t.payload})});case n.yU:return I(A({},e),{order:I(A({},e.order),{financingTerms:t.payload})});case n.Gt:return I(A({},e),{order:I(A({},e.order),{billingAddressSelected:t.payload.billingAddressId}),stepper:{currentStep:t.payload.step}});case n.DM:return I(A({},e),{deliveries:t.payload});default:return e}}},80899:(e,t,r)=>{r.d(t,{A3:()=>$,A4:()=>g,Ah:()=>Je,Ar:()=>Te,Bk:()=>v,Bo:()=>R,CY:()=>ce,Ch:()=>le,Co:()=>W,DX:()=>_,De:()=>Re,Dq:()=>Ne,E6:()=>at,EF:()=>ae,EV:()=>w,Ef:()=>ee,FM:()=>re,FY:()=>Q,HU:()=>V,Hq:()=>oe,It:()=>H,J:()=>D,L1:()=>K,LO:()=>te,LS:()=>U,MV:()=>we,MZ:()=>B,Oo:()=>Z,PY:()=>ve,Pf:()=>Y,Q0:()=>N,QE:()=>b,Qf:()=>ot,Qk:()=>ie,Qr:()=>y,Qv:()=>x,R_:()=>Ve,S2:()=>A,Sy:()=>Fe,Tn:()=>M,U8:()=>_e,UD:()=>j,VZ:()=>ke,Wi:()=>qe,Wu:()=>ye,Wv:()=>Le,X6:()=>m,XZ:()=>Me,Xp:()=>z,_I:()=>me,_p:()=>q,_v:()=>nt,aD:()=>Qe,cJ:()=>$e,cm:()=>se,dB:()=>O,dM:()=>G,dt:()=>Ee,eV:()=>T,eY:()=>ct,fW:()=>h,gH:()=>k,i6:()=>I,iB:()=>Be,jb:()=>Pe,k:()=>X,kE:()=>Ae,ku:()=>Ge,lV:()=>E,nT:()=>F,oy:()=>De,pt:()=>ue,qD:()=>C,qp:()=>J,rT:()=>xe,rc:()=>rt,rw:()=>Ue,sC:()=>Ye,sN:()=>Ce,tI:()=>it,uK:()=>fe,ue:()=>pe,v:()=>We,vC:()=>de,vZ:()=>he,w1:()=>ne,wG:()=>L,xl:()=>Ie,yT:()=>be,zw:()=>Ke});var n=r(22222),i=r(38483),a=r(26911),o=r(23031),c=r(37148),d=r(33945),s=r(3678),l=r(50519),u=function(e){return e.checkout},p=function(e){return e.user},f=(0,n.P1)(u,(function(e){return e.order})),A=(0,n.P1)(u,(function(e){return e.cart.showModalRecoverOrderOptions})),I=(0,n.P1)(u,(function(e){return e.isLoading})),y=(0,n.P1)(u,(function(e){return e.isLoadingAddressForm})),_=(0,n.P1)(u,(function(e){return e.isAddressFormValid})),v=(0,n.P1)(u,(function(e){return e.cart.articles})),E=(0,n.P1)(u,(function(e){return e.cart.relatableOffers})),m=(0,n.P1)(u,(function(e){return e.cart.awardedFinancing})),h=(0,n.P1)(u,(function(e){return e.deliveries})),T=(0,n.P1)(u,(function(e){return e.cart.articles})),S=(0,n.P1)(h,(function(e){return e.filter((function(e){return e.type===i.l.Dropshipping})).length})),P=(0,n.P1)(u,(function(e){return e.cart.dropShippingShippingCost})),N=(0,n.P1)(u,(function(e){return e.cart.articles.find((function(e){return"mañana"!==e.deliveryStr}))})),O=(0,n.P1)(u,(function(e){return!e.cart.articles.find((function(e){return e.type!==a.V7.DIGITAL}))})),L=(0,n.P1)(u,(function(e){return e.cart.refundShipping})),C=(0,n.P1)(u,(function(e){return e.redirectToBasket})),g=(0,n.P1)(u,(function(e){return e.allowFromBasketToStepTwo})),D=(0,n.P1)(u,(function(e){return e.cart.lastEditDate})),R=(0,n.P1)(P,S,(function(e,t){return(0,d.bO)(+(null!==e&&void 0!==e?e:"0")/+t)})),M=(0,n.P1)(u,(function(e){return e.addresses})),b=(0,n.P1)(u,(function(e){return e.countries})),w=(0,n.P1)(u,(function(e){return e.stepper.currentStep})),U=(0,n.P1)(u,(function(e){return e.coupons})),Y=(0,n.P1)(u,(function(e){return e.order.selectedCoupon})),k=(0,n.P1)(u,(function(e){return e.order.solidaryAmountChecked})),x=(0,n.P1)(u,(function(e){return e.order.financingTerms})),B=(0,n.P1)(u,(function(e){return e.cart.talonOneNotifications})),V=(0,n.P1)(u,(function(e){return{balance:e.cart.balance,balanceToSpend:e.cart.balanceToSpend,birthdayDiscount:e.cart.birthdayDiscount,price:e.cart.price,shippingCost:e.cart.shippingCost,marketPlaceShippingCost:e.cart.marketplaceShippingCost,dropShippingShippingCost:e.cart.dropShippingShippingCost,neutralPaperCost:e.cart.neutralPaperCost,giftPaperCost:e.cart.neutralPaperCost,talonPromotions:e.cart.talonPromotions,totalPaid:e.cart.totalPaid,totalDiscountInCart:e.cart.totalDiscountInCart,totalGiftCardDiscountInCart:e.cart.totalGiftCardDiscountInCart,total:e.cart.total,installation:e.cart.installation}})),G=(0,n.P1)(u,(function(e){return e.cart.canShowShippingPoints})),H=(0,n.P1)(u,(function(e){return e.footer.legalLinks})),F=(0,n.P1)(u,(function(e){return e.datalayerCartItems})),K=(0,n.P1)(u,(function(e){return e.order.shippingAddressSelected})),W=(0,n.P1)(M,K,(function(e,t){var r,n;return null===(n=null===(r=e.shippingAddresses)||void 0===r?void 0:r.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData})),X=(0,n.P1)(u,(function(e){return e.order.billingAddressSelected})),j=(0,n.P1)(M,X,(function(e,t){var r,n;return null===(n=null===(r=e.billingAddresses)||void 0===r?void 0:r.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData})),Z=(0,n.P1)(u,(function(e){return e.order.pickingPointSelected})),q=(0,n.P1)(u,(function(e){return e.pickingPointSearchValues})),$=(0,n.P1)(u,(function(e){return e.availableShops})),z=(0,n.P1)(u,(function(e){return e.order.whoPicksUp.data})),J=(0,n.P1)(u,(function(e){return e.order.isSubmittingAdress})),Q=(0,n.P1)(u,(function(e){return e.order.isValidatingAddress})),ee=(0,n.P1)(u,(function(e){return e.order.isCheckingValidAddress})),te=(0,n.P1)(u,(function(e){return e.order.shopSelected})),re=(0,n.P1)(u,(function(e){return e.order.shippingMethod})),ne=(0,n.P1)(u,(function(e){return e.paymentTab})),ie=(0,n.P1)(u,(function(e){return e.order.paymentMethodSelected})),ae=(0,n.P1)(u,(function(e){return e.paymentMethods.paymentCard.storedPaymentCards})),oe=(0,n.P1)(u,(function(e){return e.paymentMethods.paymentCard.expiredCards})),ce=(0,n.P1)(u,(function(e){var t,r=e.order,n=e.paymentMethods;return(null===(t=r.adyen)||void 0===t?void 0:t.adyenData)||!n.paymentCard.storedPaymentCards?a.iz.NEW:a.iz.STORED})),de=(0,n.P1)(u,(function(e){var t;return null===(t=e.order.adyen)||void 0===t?void 0:t.adyenData})),se=(0,n.P1)(u,(function(e){return e.paymentMethods.paymentCard.clientWithNoCards})),le=(0,n.P1)(u,(function(e){return e.paymentMethods.paymentCard.newCard})),ue=(0,n.P1)(u,(function(e){return e.paymentMethods.financing.financingMethods})),pe=(0,n.P1)(u,(function(e){var t;return null===(t=e.paymentMethods.financing)||void 0===t?void 0:t.selected})),fe=((0,n.P1)(u,(function(e){var t;return"Portugal"===(null===(t=e.addresses.billingAddresses.find((function(t){return t.addressData.id===e.order.billingAddressSelected})))||void 0===t?void 0:t.addressData.country)})),(0,n.P1)(u,(function(e){return e.paymentMethods.multibanco}))),Ae=(0,n.P1)(u,(function(e){return e.alert.global})),Ie=(0,n.P1)(u,(function(e){return e.alert.criticalErrors})),ye=(0,n.P1)(u,(function(e){return e.alert.addressForm})),_e=(0,n.P1)(u,(function(e){return e.alert.deliveryAlerts})),ve=(0,n.P1)(u,(function(e){return e.alert.paymentAlerts})),Ee=(0,n.P1)(u,(function(e){var t,r=e.paymentMethods,n=e.order;return(null===(t=r.others)||void 0===t?void 0:t.othersMethods)?(0,d.CZ)()||n.shippingMethod===a.sx.SHOP?r.others.othersMethods:r.others.othersMethods.filter((function(e){return"payinshop"!==e.slug})):[]})),me=(0,n.P1)(u,(function(e){return e.paymentMethods.othersNotAllowed.othersMethodsNotAllowed})),he=(0,n.P1)(u,(function(e){return e.paymentMethods.financingNotAllowed.financingMethodsNotAllowed})),Te=(0,n.P1)(u,(function(e){var t;return null===(t=e.paymentMethods.others)||void 0===t?void 0:t.selected})),Se=(0,n.P1)(u,(function(e){return e.stepTwoCriticalError})),Pe=(0,n.P1)(u,(function(e){return e.payPerUseInstallments})),Ne=(0,n.P1)(u,(function(e){var t,r=e.payPerUseInstallments,n=e.cart;if(0===r.length)return"";var i=null===(t=n.articles.find((function(e){return+e.id===r[0].articleId})))||void 0===t?void 0:t.name;return i||""})),Oe=(0,n.P1)(M,X,K,Se,(function(e,t,r,n){return!!r&&(!!t||0===e.billingAddresses.length)&&!n})),Le=(0,n.P1)(M,X,b,(function(e,t,r){return(0,d.Qu)(e,t,r)})),Ce=(0,n.P1)(M,K,b,(function(e,t,r){return(0,d.e$)(e,t,r)})),ge=(0,n.P1)(Oe,Le,Ce,(function(e,t,r){return e&&t&&r})),De=(0,n.P1)(u,(function(e){return e.incompleteAddressType})),Re=(0,n.P1)(u,(function(e){return e.invalidAddress})),Me=(0,n.P1)(u,(function(e){return e.order.deliveryAgency})),be=(0,n.P1)(u,(function(e){return e.order.deliveryDate})),we=(0,n.P1)(u,(function(e){return e.order.deliveryTime})),Ue=(0,n.P1)(u,(function(e){return e.order.deliveryDateTimeStr})),Ye=(0,n.P1)(u,(function(e){return e.order.isSameDay})),ke=(0,n.P1)(u,(function(e){return e.order.agencyObservations})),xe=(0,n.P1)(u,(function(e){return e.order.isNeutralOrder})),Be=(0,n.P1)(u,(function(e){return e.order.productsWithGiftPaper})),Ve=(0,n.P1)(u,(function(e){return e.order.marketplaceAgencies})),Ge=(0,n.P1)(u,(function(e){return!!e.cart.articles.find((function(e){return e.vendor}))})),He=(0,n.P1)(u,(function(e){return!!e.cart.articles.find((function(e){return a.EM.includes(e.id)}))})),Fe=(0,n.P1)(Ge,He,(function(e,t){return e&&t})),Ke=(0,n.P1)(u,p,(function(e){var t,r,n=e.paymentMethods,i=e.user;return(0,l.RU)(null===i||void 0===i?void 0:i.email)?null===(r=n.paymentCard.methods)||void 0===r?void 0:r.find((function(e){return e.idPayment===s.XL.REDSYS_CARD})):null===(t=n.paymentCard.methods)||void 0===t?void 0:t.find((function(e){return e.idPayment===a.XL.REDSYS}))})),We=(0,n.P1)(u,p,(function(e){var t,r,n=e.paymentMethods,i=e.user;return(0,l.RU)(null===i||void 0===i?void 0:i.email)?null===(r=n.paymentCard.methods)||void 0===r?void 0:r.find((function(e){return e.idPayment===s.XL.ADYEN_CARD})):null===(t=n.paymentCard.methods)||void 0===t?void 0:t.find((function(e){return e.idPayment===a.XL.ADYEN}))})),Xe=(0,n.P1)(f,(function(e){return!!e.pickingPointSelected&&e.whoPicksUp.isValid})),je=(0,n.P1)(f,(function(e){return!!e.shopSelected&&e.whoPicksUp.isValid})),Ze=(0,n.P1)(f,(function(e){return e.paymentMethodSelected===a.XL.REDSYS||!!e.adyen&&(!!e.adyen.adyenData||e.adyen.adyenDataCard&&e.adyen.adyenIdUserCard)})),qe=(0,n.P1)(f,(function(e){var t;return null===(t=e.adyen)||void 0===t?void 0:t.adyenDataCard})),$e=(0,n.P1)(u,(function(e){return e.cart.isLoading})),ze=(0,n.P1)(f,(function(e){return e.conditionsAccepted})),Je=(0,n.P1)(u,(function(e){return e.hasShippingErrorInCanarias})),Qe=(0,n.P1)(w,re,ne,ie,Oe,Xe,je,Ze,$e,ze,Se,_,(function(e,t,r,n,i,o,c,d,s,l,u,p){if(s)return!1;switch(e){case a.h8.CART:return!u;case a.h8.ADDRESSES:switch(t){case a.sx.SHIPPING_ADDRESS:return i||p;case a.sx.PICKUP_POINT:return o&&!u;case a.sx.SHOP:return c&&!u;default:return!1}case a.h8.PAYMENT:switch(r){case a.iy.CARD:return!!d;case a.iy.FINANCING:return!!n;case a.iy.MULTIBANCO:return n===a.XL.MULTIBANCO;case a.iy.OTHER_OPTIONS:return!!n;default:return!1}case a.h8.SUMMARY:return l&&!u;default:return!0}})),et=(0,n.P1)(ie,Ze,(function(e,t){return e===a.XL.ADYEN?!!t:!!e})),tt=(0,n.P1)(ge,Xe,je,(function(e,t,r){return e||t||r})),rt=(0,n.P1)(tt,et,(function(e,t){var r=a.h8.ADDRESSES;return e&&(r=a.h8.PAYMENT,t&&(r=a.h8.SUMMARY)),r})),nt=(0,n.P1)(ie,ce,Ze,qe,le,ae,ue,Ee,fe,x,(function(e,t,r,n,i,c,d,l,u,p){switch(e){case a.XL.REDSYS:return{info:(0,o.t)("checkout.payments.cardTitle")};case a.XL.ADYEN:case s.XL.ADYEN_CARD:var f="/prod/v1/img/iconos/32x32-VisaBlue.svg",A="Card logo visa",I="/prod/v1/img/iconos/32-mastercard.svg",y="Card logo mastercard";if(t===a.iz.STORED){var _,v=null===c||void 0===c||null===(_=c.cards)||void 0===_?void 0:_.find((function(e){return e.recurringDetailReference===n}));return{imgUrl:(null===v||void 0===v?void 0:v.brand)===a.H7.MASTER_CARD?I:f,altText:(null===v||void 0===v?void 0:v.brand)===a.H7.MASTER_CARD?y:A,name:null===v||void 0===v?void 0:v.name,info:(0,o.t)("checkout.summary.cardEndingIn"),endDigits:null===v||void 0===v?void 0:v.lastFourDigits}}return{imgUrl:(null===i||void 0===i?void 0:i.cardBrand)===a.H7.MASTER_CARD?I:f,altText:(null===i||void 0===i?void 0:i.cardBrand)===a.H7.MASTER_CARD?y:A,name:null===i||void 0===i?void 0:i.cardName,info:(0,o.t)("checkout.summary.cardEndingIn"),endDigits:null===i||void 0===i?void 0:i.endDigits};case a.XL.APLAZAME:case s.XL.APLAZAME:var E;return{imgUrl:"/Unilae/svg/32-aplazame.svg",altText:null===(E=null===d||void 0===d?void 0:d.find((function(e){return e.idPayment===a.XL.APLAZAME})))||void 0===E?void 0:E.name,info:"Con Aplázame a 6, 12, 20, 30 y 40 meses."};case a.XL.CETELEM:var m;return{imgUrl:"/Unilae/svg/cetelem_32x32.svg",altText:"cetelem logo",info:null===(m=null===d||void 0===d?void 0:d.find((function(e){return e.idPayment===a.XL.CETELEM})))||void 0===m?void 0:m.name};case a.XL.ONEY:var h,T;return{imgUrl:"/Unilae/svg/oneyLogo.svg",altText:"oney logo",info:"".concat(null!==(T=null===(h=d.find((function(e){return e.idPayment===a.XL.ONEY})))||void 0===h?void 0:h.name)&&void 0!==T?T:""," en ").concat(p?parseInt(p):""," plazos")};case a.XL.PAY_PER_USAGE:return{info:(0,o.t)("checkout.summary.rentingWithWiserentr")};case a.XL.BANK_TRANSFER:var S;return{info:null===(S=l.find((function(e){return e.idPayment===a.XL.BANK_TRANSFER})))||void 0===S?void 0:S.name};case a.XL.PAY_IN_SHOP:var P;return{info:null===(P=l.find((function(e){return e.idPayment===a.XL.PAY_IN_SHOP})))||void 0===P?void 0:P.name};case a.XL.GOOGLE_PAY:var N;return{imgUrl:"/Unilae/svg/google_pay_32x32.svg",altText:"google pay logo",info:null===(N=l.find((function(e){return e.idPayment===a.XL.GOOGLE_PAY})))||void 0===N?void 0:N.name};case a.XL.BIZUM:var O;return{imgUrl:"/Unilae/svg/bizum_32x32.svg",altText:"bizum logo",info:null===(O=l.find((function(e){return e.idPayment===a.XL.BIZUM})))||void 0===O?void 0:O.name};case a.XL.MULTIBANCO:return{imgUrl:"/Unilae/svg/230_multibanco.svg",altText:"multibanco logo",info:null===u||void 0===u?void 0:u.name};case a.XL.GRATIS:var L;return{info:null===(L=l.find((function(e){return e.idPayment===a.XL.GRATIS})))||void 0===L?void 0:L.name};case a.XL.INESPAY:var C;return{info:null===(C=l.find((function(e){return e.idPayment===a.XL.INESPAY})))||void 0===C?void 0:C.name};default:return{info:""}}})),it=(0,n.P1)(u,(function(e){return e.order.giftCardCode})),at=(0,n.P1)(u,(function(e){var t=e.cart,r=e.order;return!t.isLoading&&!!r.giftCardCode&&t.total>0})),ot=(0,n.P1)(c.$W,(function(e){return e===c.t4.PCCOMPONENTES})),ct=(0,n.P1)(ie,(function(e){return e===a.XL.CETELEM||e===a.XL.APLAZAME||e===a.XL.PAY_PER_USAGE}))},74782:(e,t,r)=>{r.d(t,{AH:()=>F,EI:()=>k,FU:()=>Y,IU:()=>w,IX:()=>h,J:()=>A,J9:()=>x,MM:()=>K,NJ:()=>D,OL:()=>C,P6:()=>g,Pz:()=>z,Vl:()=>m,WS:()=>N,Xq:()=>y,Yu:()=>v,ZY:()=>T,_Z:()=>_,dp:()=>b,ej:()=>V,fu:()=>q,jf:()=>E,kh:()=>B,lX:()=>$,lr:()=>U,m_:()=>H,od:()=>P,pY:()=>G,pc:()=>S,qI:()=>O,rU:()=>M,s3:()=>W,sl:()=>R,uz:()=>L,vD:()=>f,vs:()=>X,x9:()=>I,xF:()=>Z,zH:()=>j});var n=r(8442),i=r(28489),a=r(17738),o=r(89652);function c(e,t,r,n,i,a,o){try{var c=e[a](o),d=c.value}catch(e){return void r(e)}c.done?t(d):Promise.resolve(d).then(n,i)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){c(a,n,i,o,d,"next",e)}function d(e){c(a,n,i,o,d,"throw",e)}o(void 0)}))}}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){for(var t=1;t0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]5&&void 0!==arguments[5]?arguments[5]:null;return n.V0.fetch("/api-v1/user/address/validate",n.w$.POST,{address:e,cp:t,city:r,province:i,country:a,id:o})},P=function(e){return n.V0.fetch("/api-v1/user-panel/user/get?idUser=".concat(e),n.w$.GET)},N=function(e){return n.V0.fetch("/api-v1/user/address/shipping/".concat(e),n.w$.DELETE)},O=function(e){return n.V0.fetch("/api-v1/user/address/billing/".concat(e),n.w$.DELETE)},L=function(e,t){return n.V0.fetch("/api-v1/user/address/create-shipping",n.w$.POST,l({email:e,validated:!0},(0,a._s)(t)))},C=function(e,t){return n.V0.fetch("/api-v1/user/address/create-billing",n.w$.POST,l({email:e},t))},g=function(e,t){return n.V0.fetch("/api-v1/user/address/shipping",n.w$.PUT,l({addressId:e,validated:!0},(0,a.kW)(t)))},D=function(e,t){return n.V0.fetch("/api-v1/user/address/billing",n.w$.PUT,l({addressId:e},(0,a.YP)(t)))},R=function(){var e=d((function(e){return p(this,(function(t){return[2,n.V0.fetch("/api-v1/checkout/countries/".concat(e,"/provinces"),n.w$.GET)]}))}));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=d((function(e,t,r){return p(this,(function(i){return e&&t&&r?[2,n.V0.fetch("/api-v1/checkout/cart/shipping-points",n.w$.GET,{country:e,cp:t,idArticle:r})]:[2,n.V0.fetch("/api-v1/checkout/cart/shipping-points",n.w$.GET)]}))}));return function(t,r,n){return e.apply(this,arguments)}}(),b=function(e){return n.V0.fetch("/api-v1/user-panel/orders/payment/error/".concat(e),n.w$.GET)},w=function(){var e=d((function(e){var t;return p(this,(function(r){switch(r.label){case 0:return[4,n.V0.fetch("/api-v1/user-panel/user/orders/".concat(e,"/minimal"),n.w$.GET)];case 1:if((t=r.sent()).ok)return[2,t.data];throw(0,i.xK)(t)}}))}));return function(t){return e.apply(this,arguments)}}(),U=function(e){return n.V0.fetch("/api-v1/paynow/".concat(e),n.w$.GET)},Y=function(e,t){try{return n.V0.fetch("/api-v1/checkout/order/finish/".concat(t),n.w$.POST,e).then((function(e){if(e.ok&&e.data)return e.data;throw(0,i.xK)(e)}))}catch(e){throw(0,i.xK)(e)}},k=function(e,t){try{return n.V0.fetch("/api-v1/paynow/payunpaid/".concat(t),n.w$.POST,e).then((function(e){if(e.ok&&e.data)return e.data;throw(0,i.xK)(e)}))}catch(e){throw(0,i.xK)(e)}},x=function(e,t){return n.V0.fetch("/api-v1/user-panel/adm/web/alerts/".concat(e,"?domain=").concat(t),n.w$.GET).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)})).catch((function(){(0,o.Z)()}))},B=function(){var e=d((function(e){return p(this,(function(t){try{return[2,n.V0.fetch("/api-v1/user-panel/orders/payment/adyen/data?orderId=".concat(e),n.w$.POST,{}).then((function(e){var t;if(e.ok)return null===(t=e.data)||void 0===t?void 0:t.data;throw new i.pY({error:0,message:JSON.stringify(e.err)})}))]}catch(e){throw(0,i.xK)(e)}return[2]}))}));return function(t){return e.apply(this,arguments)}}(),V=function(e){try{return n.V0.fetch("/api-v1/user-panel/orders/payment/link/create/".concat(e),n.w$.POST,{}).then((function(e){if(e.ok&&e.data)return e.data.data;throw(0,i.xK)(e)}))}catch(e){throw(0,i.xK)(e)}},G=function(e){return n.V0.fetch("/api-v1/order-articles/".concat(e),n.w$.GET,{}).then((function(e){if(e.ok)return e;throw(0,i.xK)(e)}))},H=function(e){return n.V0.fetch("/api-v1/adyen/adyenAuthorization",n.w$.POST,e)},F=function(){return n.V0.fetch("/api-v1/user-panel/basket/",n.w$.GET).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},K=function(e,t,r){return n.V0.fetch("/api-v1/basket/?name=".concat(e,"&type=").concat(t,"&visibility=").concat(r),n.w$.POST).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},W=function(e,t,r){return n.V0.fetch("/api-v1/basket/add-to-wishlist?basketKey=".concat(e,"&cartId=").concat(t,"&sendEmail=").concat(r.toString()),n.w$.POST).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},X=function(e){return n.V0.fetch("/api-v1/basket/empty-basket?cartId=".concat(e),n.w$.DELETE).then((function(e){if(e.ok)return e.data;throw(0,i.xK)(e)}))},j=function(){return n.V0.fetch("/api-v1/oney/business-info-data",n.w$.GET,{}).then((function(e){if(e.ok)return e;throw(0,i.xK)(e)}))},Z=function(e,t){return n.V0.fetch("/api-v1/oney/variants-info-data/".concat(e),n.w$.POST,{variantCodes:t}).then((function(e){if(e.ok)return e;throw(0,i.xK)(e)}))},q=function(e,t){return n.V0.fetch("/api-v1/checkout/order/transaction/aplazame/init/".concat(e),n.w$.POST,t).then((function(e){if(e.ok&&e.data)return e.data;throw(0,i.xK)(e)}))},$=function(){return n.V0.fetch("/api-v1/checkout/cart/session/reset",n.w$.GET)},z=function(){var e=d((function(e){var t;return p(this,(function(r){switch(r.label){case 0:return[4,n.V0.fetch("/api-v1/show/marketing/orders",n.w$.POST,e)];case 1:if((t=r.sent()).ok)return[2,t.data];throw(0,i.xK)(t)}}))}));return function(t){return e.apply(this,arguments)}}()},26911:(e,t,r)=>{r.d(t,{Br:()=>L,D4:()=>Q,Ds:()=>s,EM:()=>V,H7:()=>y,Jj:()=>Z,LI:()=>O,Nl:()=>C,O0:()=>a,Ow:()=>D,PO:()=>X,SG:()=>q,Sh:()=>R,UG:()=>u,V7:()=>k,WF:()=>b,XL:()=>p,Xc:()=>x,Zl:()=>B,_V:()=>m,ck:()=>i,dt:()=>f,gM:()=>E,h8:()=>c,hb:()=>A,iy:()=>l,iz:()=>I,k0:()=>j,kW:()=>U,mw:()=>ee,nE:()=>Y,pL:()=>v,pe:()=>n,qU:()=>g,sK:()=>M,sx:()=>d,vo:()=>$,wr:()=>o,zc:()=>_});var n,i,a,o,c,d,s,l,u,p,f,A,I,y,_,v,E,m,h,T,S=r(91085),P=r(37148);function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e){e.MISSING_ADDRESS_FIELDS="missing-address-fields",e.ORDER_HAS_SPECIAL_ASSEMBLY_WITH_MARKETPLACE="order-has-special-assembly-with-marketplace",e.OUT_OF_STOCK="out-of-stock",e.EMPTY_CART="empty-cart",e.USER_NOT_FOUND="user-not-found",e.PCC_ARTICLE_SPLIT="pcc_article_split"}(n||(n={})),function(e){e.INDIVIDUAL="individual",e.FREELANCE="freelance",e.COMPANY="company"}(i||(i={})),function(e){e.PCC="pcc",e.MARKETPLACE="marketplace"}(a||(a={})),function(e){e[e.WITHOUT_MOVEMENT=0]="WITHOUT_MOVEMENT",e[e.IN_STOCK=1]="IN_STOCK",e[e.INMINENT_REPLENISHMENT=2]="INMINENT_REPLENISHMENT",e[e.HIGH_AVAILABILITY=3]="HIGH_AVAILABILITY",e[e.OUT_OF_STOCK=4]="OUT_OF_STOCK",e[e.PRESALE=5]="PRESALE",e[e.CONSULT=6]="CONSULT",e[e.DISCONTINUED=7]="DISCONTINUED",e[e.ZONE_NOT_AVAILABLE=9876]="ZONE_NOT_AVAILABLE",e[e.FORCE_DISCONTINUED=9999]="FORCE_DISCONTINUED"}(o||(o={})),function(e){e[e.CART=1]="CART",e[e.ADDRESSES=2]="ADDRESSES",e[e.DELIVERY=3]="DELIVERY",e[e.PAYMENT=4]="PAYMENT",e[e.SUMMARY=5]="SUMMARY"}(c||(c={})),function(e){e[e.SHIPPING_ADDRESS=1]="SHIPPING_ADDRESS",e[e.PICKUP_POINT=2]="PICKUP_POINT",e[e.SHOP=3]="SHOP"}(d||(d={})),function(e){e.PICKUP_POINT="?shipping=picking",e.SHOP="?shipping=shop"}(s||(s={})),function(e){e.CARD="card",e.FINANCING="financing",e.OTHER_OPTIONS="other-options",e.MULTIBANCO="multibanco"}(l||(l={})),function(e){e.TWO_HOURS="A2h"}(u||(u={})),function(e){e[e.ADYEN=23]="ADYEN",e[e.REDSYS=3]="REDSYS",e[e.APLAZAME=25]="APLAZAME",e[e.CETELEM=20]="CETELEM",e[e.PAY_PER_USAGE=40]="PAY_PER_USAGE",e[e.PAY_IN_SHOP=1]="PAY_IN_SHOP",e[e.BANK_TRANSFER=5]="BANK_TRANSFER",e[e.CASH_ON_DELIVERY=1]="CASH_ON_DELIVERY",e[e.GOOGLE_PAY=24]="GOOGLE_PAY",e[e.BIZUM=36]="BIZUM",e[e.INESPAY=37]="INESPAY",e[e.GRATIS=69]="GRATIS",e[e.MULTIBANCO=26]="MULTIBANCO",e[e.ONEY=27]="ONEY",e[e.RENTALL=41]="RENTALL"}(p||(p={})),function(e){e.BIZUM="bizum",e.CETELEM="financiacion12",e.APLAZAME="aplazame",e.BANK_TRANSFER="transferencia",e.INESPAY="inespay",e.MULTIBANCO="multibanco",e.ADYEN="adyen",e.PAY_PER_USAGE="payPerUsage",e.PAY_IN_SHOP="payinshop",e.REDSYS="tarjeta",e.ONEY="oney",e.GRATIS="free",e.RENTALL="rentall"}(f||(f={})),function(e){e.CETELEM="Cetelem",e.APLAZAME="Aplazame",e.PAY_IN_SHOP="Pagar en tienda",e.BANK_TRANSFER="Transferencia ordinaria",e.CASH_ON_DELIVERY="Contrarrembolso",e.GOOGLE_PAY="Google pay",e.BIZUM="Bizum",e.MULTIBANCO="Multibanco",e.INESPAY="Transferencia inmediata",e.GRATIS="Gratis",e.PAY_PER_USAGE="Renting",e.CREDIT_CARD="Tarjeta de crédito o débito",e.UNKNOWN="Desconocido"}(A||(A={})),function(e){e.STORED="STORED",e.NEW="NEW"}(I||(I={})),function(e){e.MASTER_CARD="mc",e.VISA="visa",e.GENERIC="card"}(y||(y={})),function(e){e[e.TALON=235577]="TALON"}(_||(_={})),function(e){e[e.TALON=235577]="TALON",e[e.CANON=133414]="CANON",e[e.SHIPPING_REFUND=20006]="SHIPPING_REFUND",e[e.BIRTHDAY_GIFT=20008]="BIRTHDAY_GIFT",e[e.PREMIUM=157154]="PREMIUM"}(v||(v={})),function(e){e.MADRID="30",e.MURCIA="1",e.BARCELONA="71",e.SALA="sala"}(E||(E={})),function(e){e[e.PAYMENT_TYPE_IS_DISABLED=32e3]="PAYMENT_TYPE_IS_DISABLED",e[e.PAYMENT_TYPE_EXCEED_PENDING_AMOUNT_WITH_SAME_PAYMENT=32007]="PAYMENT_TYPE_EXCEED_PENDING_AMOUNT_WITH_SAME_PAYMENT",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_BLACK_FRIDAY=32008]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_BLACK_FRIDAY",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_MARKETPLACE_ARTICLES=32001]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_MARKETPLACE_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DIGITAL_ARTICLES=32002]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DIGITAL_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DROP_SHIPPING=32003]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_DROP_SHIPPING",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_AT_MODIFYING=32004]="PAYMENT_TYPE_IS_UNAVAILABLE_AT_MODIFYING",e[e.PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_SPAIN=32005]="PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_SPAIN",e[e.PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_PORTUGAL=32006]="PAYMENT_TYPE_IS_ONLY_AVAILABLE_FOR_PORTUGAL",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PREMIUM_ARTICLE=32009]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PREMIUM_ARTICLE",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_AGENCY=32010]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_AGENCY",e[e.PAYMENT_TYPE_REACHED_PRICE_LIMIT=32011]="PAYMENT_TYPE_REACHED_PRICE_LIMIT",e[e.PAYMENT_TYPE_HAS_NOT_REACHED_MINIMUM_PRICE=32012]="PAYMENT_TYPE_HAS_NOT_REACHED_MINIMUM_PRICE",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_BUSINESS_OR_DISTRIBUTOR=32013]="PAYMENT_TYPE_UNAVAILABLE_FOR_BUSINESS_OR_DISTRIBUTOR",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_SHIPPING_POINT=32014]="PAYMENT_TYPE_UNAVAILABLE_FOR_SHIPPING_POINT",e[e.PAYMENT_TYPE_UNAVAILABLE_FOR_AUTHORIZED_POINT=32015]="PAYMENT_TYPE_UNAVAILABLE_FOR_AUTHORIZED_POINT",e[e.PAYMENT_TYPE_UNAVAILABLE_WITH_DEAL_ARTICLES=32016]="PAYMENT_TYPE_UNAVAILABLE_WITH_DEAL_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_FOR_DEFAULTER_USERS=32017]="PAYMENT_TYPE_IS_UNAVAILABLE_FOR_DEFAULTER_USERS",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOM_PCCOM_V2=32018]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOM_PCCOM_V2",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_ELECTRONIC_ARTICLES=32019]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_ELECTRONIC_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_REFURBISHED_ARTICLES=32020]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_REFURBISHED_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_BANNED_ARTICLES=32021]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_BANNED_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITHOUT_SHIPPING_ADDRESS=32022]="PAYMENT_TYPE_IS_UNAVAILABLE_WITHOUT_SHIPPING_ADDRESS",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_FOR_STORE_PICKUP=32023]="PAYMENT_TYPE_IS_UNAVAILABLE_FOR_STORE_PICKUP",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_PENDING_ORDER_WITH_SAME_PAYMENT_TYPE=32024]="PAYMENT_TYPE_IS_UNAVAILABLE_PENDING_ORDER_WITH_SAME_PAYMENT_TYPE",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PRESALE_ARTICLES=32025]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_PRESALE_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOMIZED_CASES_ARTICLES=32026]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_CUSTOMIZED_CASES_ARTICLES",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_USER_BANNED_FOR_THIS_PAYMENT=32027]="PAYMENT_TYPE_IS_UNAVAILABLE_USER_BANNED_FOR_THIS_PAYMENT",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_WITH_GIFT_CARDS=32028]="PAYMENT_TYPE_IS_UNAVAILABLE_WITH_GIFT_CARDS",e[e.PAY_PER_USE_PAYMENT_IS_NOT_AVAILABLE_FOR_THIS_CART=32030]="PAY_PER_USE_PAYMENT_IS_NOT_AVAILABLE_FOR_THIS_CART",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY=32031]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY",e[e.PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY_GENERIC=32032]="PAYMENT_TYPE_IS_UNAVAILABLE_IN_ANNIVERSARY_GENERIC"}(m||(m={})),function(e){e.BLACK_FRIDAY_START="2021-11-14 22:00:00",e.BLACK_FRIDAY_END="2021-11-28 23:59:59"}(h||(h={})),function(e){e.CYBER_MONDAY_START="2021-11-29 00:00:00",e.CYBER_MONDAY_END="2021-11-29 23:59:59"}(T||(T={}));var O,L,C,g,D,R,M,b,w,U=["deal","reaconditioned","refurbished","recertified"];!function(e){e[e.PAYMENT_TYPE_NOT_AVAILABLE=1109]="PAYMENT_TYPE_NOT_AVAILABLE",e[e.URGENT_LIMIT_STOCK_REACHED=1139]="URGENT_LIMIT_STOCK_REACHED",e[e.AGENCY_NOT_AVAILABLE=1117]="AGENCY_NOT_AVAILABLE",e[e.OUT_OF_STOCK=1119]="OUT_OF_STOCK",e[e.EMPTY_CART=1102]="EMPTY_CART",e[e.ORDER_NOT_MARK_AS_IN_EDITION=1429]="ORDER_NOT_MARK_AS_IN_EDITION",e[e.OEM_WITHOUT_ASSEMBLY=1145]="OEM_WITHOUT_ASSEMBLY",e[e.USER_NOT_FOUND=1301]="USER_NOT_FOUND",e[e.ARTICLE_CANT_BE_ALONE_IN_ORDER=1146]="ARTICLE_CANT_BE_ALONE_IN_ORDER",e[e.MARKETPLACE_OFFER_MATCH=1147]="MARKETPLACE_OFFER_MATCH",e[e.WEIGHT_INTERNATIONAL_SHIPPING=1148]="WEIGHT_INTERNATIONAL_SHIPPING",e[e.CP_BLOCKED=1149]="CP_BLOCKED",e[e.MARKET_PLACEORDER_WITHOUT_ADYEN=1150]="MARKET_PLACEORDER_WITHOUT_ADYEN",e[e.CANARY_LIMITATION=1156]="CANARY_LIMITATION",e[e.DROPSHIPPING_ADDRESS_LIMITATION=1155]="DROPSHIPPING_ADDRESS_LIMITATION",e[e.PREMIUM_TARIFF_ADDRESS_LIMITATION=1154]="PREMIUM_TARIFF_ADDRESS_LIMITATION",e[e.SHIPPING_COUNTRY_LIMITATION=1153]="SHIPPING_COUNTRY_LIMITATION",e[e.DIGITAL_CODES_AMOUNT_LIMITATION=1152]="DIGITAL_CODES_AMOUNT_LIMITATION",e[e.DIGITAL_CODES_ZONES_LIMITATION=1151]="DIGITAL_CODES_ZONES_LIMITATION",e[e.CART_WITHOUT_ADDRESS=1157]="CART_WITHOUT_ADDRESS",e[e.CHANGE_BILLING_MODIFIER=1158]="CHANGE_BILLING_MODIFIER",e[e.CART_WITHOUT_AGENCIES=1159]="CART_WITHOUT_AGENCIES",e[e.CART_WITHOUT_PAYMENTMETHODS=1160]="CART_WITHOUT_PAYMENTMETHODS",e[e.NO_ZONES_AVAILABLE_IN_MKTPLACE=1161]="NO_ZONES_AVAILABLE_IN_MKTPLACE",e[e.CART_FORCE_BILLING=1162]="CART_FORCE_BILLING",e[e.MAX_COD_DELIVERY_MODIFIER=1163]="MAX_COD_DELIVERY_MODIFIER",e[e.ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD=1168]="ARTICLE_AVAILABLE_IN_PAY_PER_USE_PAYMENT_METHOD",e[e.PAY_NOW_ORDER_NOT_FOUND=1402]="PAY_NOW_ORDER_NOT_FOUND",e[e.PAY_NOW_ORDER_IS_PAID=1421]="PAY_NOW_ORDER_IS_PAID",e[e.PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER=1169]="PAY_PER_USE_INSTALLMENTS_IMPOSSIBLE_TO_RECOVER",e[e.PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE=1170]="PICKING_POINT_OR_IN_SHOP_WITH_PAY_PER_USE",e[e.PORTUGAL_ARTICLES_VALIDATION=1171]="PORTUGAL_ARTICLES_VALIDATION",e[e.SHOP_ID_NEEDED_IN_CART=1172]="SHOP_ID_NEEDED_IN_CART",e[e.SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION=1173]="SHIPPING_IS_INCOMPATIBLE_WITH_BILLING_VALIDATION",e[e.NIF_ALREADY_EXISTS=1310]="NIF_ALREADY_EXISTS",e[e.GIFTCARD_NOT_AVAILABLE_WITH_MP_ARTICLES=1174]="GIFTCARD_NOT_AVAILABLE_WITH_MP_ARTICLES",e[e.INSTALLATION_PRICE_NOT_FOUND=38001]="INSTALLATION_PRICE_NOT_FOUND",e[e.INSTALLATION_SERVICE_NOT_FOUND=38002]="INSTALLATION_SERVICE_NOT_FOUND",e[e.ONEY_FINANCING_TERMS_NOT_FOUND=46001]="ONEY_FINANCING_TERMS_NOT_FOUND"}(O||(O={})),function(e){e.BBVA="bbva",e.CAJAMAR="cajamar",e.MILLENIUM="millenium"}(L||(L={})),function(e){e.BBVA="ES18 0182 3204 1702 0151 4921",e.CAJAMAR="ES03 3058 0202 0927 2001 3704",e.MILLENIUM="PT50 0033 0000 4550 3510 3390 5"}(C||(C={})),function(e){e[e.TYPE_LOAD_REDIRECT=1]="TYPE_LOAD_REDIRECT",e[e.TYPE_LOAD_FORM=2]="TYPE_LOAD_FORM",e[e.TYPE_LOAD_IFRAME=3]="TYPE_LOAD_IFRAME"}(g||(g={})),function(e){e.ES="com",e.PT="pt"}(D||(D={})),function(e){e.LAS_PALMAS="Las Palmas",e.TENERIFE="Tenerife"}(R||(R={})),function(e){e.REMOTE_ASSISTANCE_ONE_DEVICE="10463598",e.REMOTE_ASSISTANCE_FOUR_DEVICES="10463840"}(M||(M={})),function(e){e.HIDROGEL_SMARTPHONE="10464593",e.HIDROGEL_TABLET="10464596",e.HIDROGEL_SMARTWATCH="10464595",e.REMOTE_ASSISTANCE_ONE_DEVICE="10463598",e.REMOTE_ASSISTANCE_FOUR_DEVICES="10463840"}(b||(b={})),function(e){e.SO_INSTALLATION_ARTICLE_ID="31045",e.ASSEMBLY_ARTICLE_ID="31046",e.ASSEMBLY_AND_FLEX_RL_TEST_ARTICLE_ID="135052",e.ASSEMBLY_AND_HARD_RL_TEST_ARTICLE_ID="135028",e.BIOS_UPDATE_ARTICLE_ID="31044",e.OS_HOME_INSTALLATION_AND_CONFIGURATION_ID="281923",e.OS_W10PRO_INSTALLATION_AND_CONFIGURATION_ID="281623",e.OS_W11HOME_INSTALLATION_AND_CONFIGURATION_ID="615049",e.OS_W11PRO_INSTALLATION_AND_CONFIGURATION_ID="613681"}(w||(w={}));var Y,k,x,B=[p.ONEY],V=[w.SO_INSTALLATION_ARTICLE_ID,w.ASSEMBLY_ARTICLE_ID,w.ASSEMBLY_AND_FLEX_RL_TEST_ARTICLE_ID,w.ASSEMBLY_AND_HARD_RL_TEST_ARTICLE_ID,w.BIOS_UPDATE_ARTICLE_ID,w.OS_HOME_INSTALLATION_AND_CONFIGURATION_ID,w.OS_W10PRO_INSTALLATION_AND_CONFIGURATION_ID,w.OS_W11HOME_INSTALLATION_AND_CONFIGURATION_ID,w.OS_W11PRO_INSTALLATION_AND_CONFIGURATION_ID];!function(e){e[e.PCC_ARTICLE_SPLIT=n.PCC_ARTICLE_SPLIT]="PCC_ARTICLE_SPLIT"}(Y||(Y={})),function(e){e.DIGITAL="digital",e.COMPOUND="compound"}(k||(k={})),function(e){e.DIGITAL="digital"}(x||(x={}));var G,H,F,K,W,X=N({},p.INESPAY,"/api/paymentGateway/inespay/notification"),j=(N(G={},p.ADYEN,"/api/paymentGateway/adyen/authorise3d"),N(G,p.APLAZAME,"/cart/payment/aplazame/gw"),N(G,p.CETELEM,"/api/paymentGateway/cetelem/notification"),N(G,p.INESPAY,"/api/paymentGateway/inespay/notification"),N(G,p.ONEY,"/api/paymentGateway/oney/notification"),G),Z=(N(H={},p.CETELEM,S.Z5.ORDER_OK),N(H,p.INESPAY,"/api/paymentGateway/inespay/notification"),H),q=(N(F={},f.PAY_IN_SHOP,p.PAY_IN_SHOP),N(F,f.PAY_PER_USAGE,p.PAY_PER_USAGE),N(F,f.BIZUM,p.BIZUM),N(F,f.ADYEN,p.ADYEN),N(F,f.CETELEM,p.CETELEM),N(F,f.APLAZAME,p.APLAZAME),N(F,f.INESPAY,p.INESPAY),N(F,f.BANK_TRANSFER,p.BANK_TRANSFER),N(F,f.MULTIBANCO,p.MULTIBANCO),N(F,f.ONEY,p.ONEY),N(F,f.REDSYS,p.REDSYS),N(F,f.GRATIS,p.GRATIS),N(F,f.RENTALL,p.RENTALL),F);!function(e){e.ES="api-recomendador-carrito",e.PT="pt-api-recomendador-carrito",e.FR="fr-api-recomendador-carrito",e.IT="it-api-recomendador-carrito"}(K||(K={}));var $,z,J,Q=(N(W={},P.Pp.COM,K.ES),N(W,P.Pp.PT,K.PT),N(W,P.Pp.FR,K.FR),N(W,P.Pp.IT,K.IT),W);!function(e){e.MURCIA="Tienda Murcia",e.MADRID="Tienda Madrid",e.BARCELONA="Tienda Barcelona",e.SALA="Venta en sala"}($||($={})),function(e){e.MURCIA="/recogeTusPedidosRtMurcia/selectSide.php",e.MADRID="/recogeTusPedidosRtMadrid/selectSide.php"}(z||(z={}));var ee=(N(J={},E.MURCIA,z.MURCIA),N(J,E.BARCELONA,z.MURCIA),N(J,E.SALA,z.MURCIA),N(J,E.MADRID,z.MADRID),J)},33945:(e,t,r)=>{r.d(t,{$r:()=>H,$z:()=>P,A8:()=>Q,Ag:()=>ne,BT:()=>G,CZ:()=>te,E7:()=>de,E9:()=>B,Hu:()=>ee,Jl:()=>q,Kx:()=>Ae,Ld:()=>h,NL:()=>w,Of:()=>pe,Oq:()=>fe,Qu:()=>oe,SL:()=>ae,UJ:()=>W,bO:()=>J,c5:()=>V,dV:()=>j,e$:()=>ce,jF:()=>ie,kq:()=>b,nu:()=>K,pS:()=>se,uY:()=>L,um:()=>O,vA:()=>ue,vR:()=>U,vm:()=>le,zv:()=>N});var n=r(84479),i=r(38483),a=r(26911),o=r(27484),c=r.n(o),d=r(3618),s=r(46057),l=r(3678),u=r(23031),p=r(91085),f=r(40093),A=r(50519),I=r(37148);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(i=null===(n=r.find((function(e){return"payinshop"!==e.slug})))||void 0===n?void 0:n.idPayment);return{othersMethods:r,selected:i}},P=function(e){return e.map((function(e){return function(e){if(e){var t,r,n,i,a,o,c,d,s,l,u,p,f=null!==(p=null===(t=e.buybox)||void 0===t||null===(r=t.offersProductBuyBox)||void 0===r?void 0:r.map((function(e){return{id:e.shopId.toString(),name:e.shopName,offer:{id:e.idOffer.toString(),uuid:e.uuidOffer},price:e.totalPrice.toFixed(2),delivery:e.deliveryDateStr}})))&&void 0!==p?p:[],A=null===(n=e.buybox)||void 0===n||null===(i=n.offersProductBuyBox)||void 0===i?void 0:i.find((function(e){return"PcComponentes"===e.shopName}));return{id:e.idArticle.toString(),is_in_liquidation:void 0,article_reference:e.articleReference.toString(),name:e.name,base_price:e.basePrice.toFixed(2),ean:e.ean,part_number:e.trademarkRef,brand:e.trademark,category:"".concat(e.superFamily,"/").concat(e.family),main_category:e.family,main_category_clean:e.family,variant:void 0,list_name:void 0,sold_by_pcc:A?"yes":"no",quantity:"".concat(e.qty),price:e.unitPrice.toFixed(2),position:void 0,stock_web:e.availabilityCode.toString(),parent_id:null===(a=e.articleReference)||void 0===a?void 0:a.toString(),type:(null===(o=e.buybox)||void 0===o?void 0:o.isWinnerPCC)?"normal":"marketplace",marketplace:null===(c=e.buybox)||void 0===c?void 0:c.offersProductBuyBox[0].shopName,main_category_id:void 0,promotion_ids:e.promotions&&e.promotions.map((function(e){return e.idPromotion.toString()})),is_on_sale:e.promotions&&e.promotions.length>0?"yes":"no",stock_shop:[{murcia:e.storeAvailability[1]?"yes":"no"},{madrid:e.storeAvailability[30]?"yes":"no"}],financing:void 0,yard_sale:"deal"===e.type?"yes":"no",reconditioned:"reaconditioned"===e.type?"yes":"no",marketplaces:f,other_vendors:f.length>1?"yes":"no",img_url:"https://img.pccomponentes.com/".concat(e.articleImage),img_url_thumb:"https://thumb.pccomponentes.com/w-300-300/".concat(e.articleImage),rating_avg:null===(d=e.valoration)||void 0===d||null===(s=d.valoration)||void 0===s?void 0:s.avg.toFixed(1),rating_count:null===(l=e.valoration)||void 0===l||null===(u=l.valoration)||void 0===u?void 0:u.count.toFixed(),super_family:e.superFamily,super_family_id:void 0,description:function(){var t=e.detail;if(t){var r=document.createElement("div");return r.innerHTML=t,r.textContent||r.innerText||""}return""}(),original_price:e.basePrice.toFixed(2),added_date:e.date,url:"".concat(document.location.origin,"/").concat(e.slug),total_discount:"0.00",total_discount_percent:"0"}}return{}}(e)}))},N=function(e,t){var r,n,i,o,c=e.cart,d=[];c.articles&&(d=Array.isArray(c.articles)?c.articles:Object.values(c.articles));var s=d.find((function(e){return 2===e.idArticle})),l=null===(n=null===(r=e.agencies)||void 0===r?void 0:r.availableAgencies.find((function(t){return t.agencyId===e.agencySelected})))||void 0===n?void 0:n.free,p=null===(i=d.find((function(e){return 20008===e.idArticle})))||void 0===i?void 0:i.totalPrice,f=d.filter((function(e){return e.idArticle===a.zc.TALON})),A=f.reduce((function(e,t){return e+=t.totalPrice}),0),I=c.totalInstallationPrice,y=c.totalPrice+(l?c.shippingCost:0)+-A+(c.totalDiscountInCart?c.totalDiscountInCart:0)+(c.totalGiftCardDiscountInCart?c.totalGiftCardDiscountInCart:0)+(p?-p:0)+(s?-s.totalPrice:0)+(I?-I:0)+(c.surcharge||0),_=L(e,t).flatMap((function(e){return e.products})),m=_.map((function(e){return e.id}));d.filter((function(e){return!O.includes(e.idArticle)&&!m.includes(e.idArticle.toString())})).forEach((function(e){return _.push(E(v({},w(e,!0,d,t)),{availabilityCode:a.wr.ZONE_NOT_AVAILABLE,deliveryStr:(0,u.t)("checkout.shoppingBasket.zoneNotAvailable")}))}));var h,T=null===e||void 0===e?void 0:e.awardedFinancing;return{showModalRecoverOrderOptions:void 0,canShowShippingPoints:e.canShowShippingPoints,balance:c.balance||0,balanceToSpend:c.balanceToSpend||0,birthdayDiscount:p,total:c.totalToPay||0,shippingCost:c.shippingCost,dropShippingShippingCost:c.dropShippingShippingCost,marketplaceShippingCost:c.marketPlaceShippingCost,price:y||0,articles:_,refundShipping:c.shippingCost>0&&void 0!==l&&l,talonPromotions:f.map((function(e){return{amount:e.totalPrice,text:e.name,removable:""!==e.couponDiscountTextValue}})),talonOneNotifications:null!==(h=null===(o=c.talonOneNotifications)||void 0===o?void 0:o.map((function(e){return{body:e.notificationBody,title:e.notificationTitle,type:re(e.notificationType),fromCoupon:""!==e.couponDiscountTextValue}})))&&void 0!==h?h:[],neutralPaperCost:null===s||void 0===s?void 0:s.totalPrice,installation:I,totalPaid:c.totalPayed,totalDiscountInCart:c.totalDiscountInCart,totalGiftCardDiscountInCart:c.totalGiftCardDiscountInCart,awardedFinancing:T,relatableOffers:[]}},O=[a.pL.CANON,a.pL.SHIPPING_REFUND,a.pL.BIRTHDAY_GIFT,a.pL.PREMIUM,a.pL.TALON],L=function(e,t){var r=e.ordersAndDeliveries,o=e.agencySelected,d=e.deliveryTimeCollection,s=e.cart.cartShops,l=[],p=(null===r||void 0===r?void 0:r.flatMap((function(e){return e.deliveries.map((function(t){return t.type===i.l.PcComponentes?(l=t.articles.filter((function(e){return!O.includes(e.idArticle)&&e.articleReference>0})),E(v({},t),{articles:m(t.articles.filter((function(e){return 0===e.articleReference}))),idShop:e.idShop,orderKey:e.orderKey,shopName:e.shopName,offers:t.articles.filter((function(t){return t.mpOffer.deliveryKey===e.orderKey})).map((function(e){return e.mpOffer.idOffer}))})):E(v({},t),{idShop:e.idShop,orderKey:e.orderKey,shopName:e.shopName,offers:t.articles.filter((function(t){return t.mpOffer.deliveryKey===e.orderKey})).map((function(e){return e.mpOffer.idOffer}))})}))})))||[],f=r.flatMap((function(e){return e.deliveries.flatMap((function(e){return e.articles}))})),A=p.filter((function(e){return e.articles.find((function(e){return e.type===a.V7.DIGITAL}))})).map((function(e,r){return E(v({},e),{id:"".concat(r),isDigital:!0,defaultAgency:a.Xc.DIGITAL,idShop:e.idShop,shopName:e.shopName||"PcComponentes",type:e.type,isSameDay:e.deliveryDate.isSameDay,maxDeliveryDate:e.deliveryDate.maxDeliveryDate,minDeliveryDate:e.deliveryDate.minDeliveryDate,strDeliveryDate:(0,u.t)("checkout.delivery.today"),products:e.articles.filter((function(e){return!O.includes(e.idArticle)&&e.type===a.V7.DIGITAL})).map((function(r){return w(r,e.type===i.l.Marketplace,f,t)})),agencies:[{id:a.Xc.DIGITAL,name:(0,u.t)("checkout.delivery.digitalDownload"),moreInfoText:(0,u.t)("checkout.delivery.digitalDownloadMoreInfoText"),price:void 0,free:!1,isDigital:!0,value:a.Xc.DIGITAL,isSameDay:!1}]})})),I=p.map((function(r,l){var p="",A=r.deliveryDate.strDeliveryDate,I="";switch(i.l.PcComponentes===r.type&&(e.isCollectInShop||te())&&(I=function(){var e="",t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).sort(z);if(t.length>0){var r=new Date(t[0].maxDelivery),i=r.getTime();r.setHours(0,0,0,0);var a=new Date;if(a.setHours(0,0,0,0),(0,n.IT)(r,a)){if(te())return(0,u.t)("checkout.delivery.clientInShop");var o=3e5,d=new Date(Math.ceil(i/o)*o);e=(0,u.t)("checkout.delivery.availabilityInShop",{time:c()(d).format("HH:mm")})}else e=t[0].delivery}return e}(d)),r.type){case i.l.PcComponentes:I&&(A=I),o&&(p=o.toString());break;case i.l.Dropshipping:p="dropshipping";break;case i.l.Marketplace:var y,_,m,h=Array.isArray(s)&&(null===(y=s.find((function(e){return e.idShop.toString()===(null===r||void 0===r?void 0:r.idShop)})))||void 0===y||null===(_=y.deliveries)||void 0===_?void 0:_.find((function(e){return e.key===r.orderKey}))),T=null===(m=r.agencies)||void 0===m?void 0:m.find((function(e){return e.code===(null===h||void 0===h?void 0:h.selected)}));p=null===T||void 0===T?void 0:T.code}return E(v({},r),{id:"".concat(l),defaultAgency:p,idShop:r.idShop,orderKey:r.orderKey,isDigital:!1,shopName:r.shopName||"PcComponentes",type:r.type,isSameDay:r.deliveryDate.isSameDay,maxDeliveryDate:r.deliveryDate.maxDeliveryDate,minDeliveryDate:r.deliveryDate.minDeliveryDate,strDeliveryDate:A,products:r.articles.filter((function(e){return!O.includes(e.idArticle)&&e.type!==a.V7.DIGITAL&&e.totalPrice>0})).map((function(e){return w(e,r.type===i.l.Marketplace,f,t)})),agencies:C(r.agencies,r.type)})}));return l.length>0&&l.forEach((function(e){var r=0;I.forEach((function(n){n.articles.forEach((function(i){if(0===i.articleReference&&i.idArticle===e.articleReference&&r0}))},C=function(e,t){return e.map((function(e){switch(t){case"pccomponentes":return{id:e.agencyId&&"".concat(e.agencyId),name:e.name,moreInfoText:e.moreInfoText,price:+Math.round(100*e.price)/100,free:e.free,availableDates:e.availableDates?e.availableDates:[],timesAvailable:e.timesAvailable?e.timesAvailable:[],rangeDays:e.rangeDays,value:e.value,isSameDay:e.isSameDay};case"marketplace":return{id:e.code,name:e.label,moreInfoText:e.moreInfoText,price:+Math.round(100*e.price.calculatedPrice)/100,free:e.free||0===e.price.calculatedPrice,availableDates:[],timesAvailable:[],value:e.value,isSameDay:e.isSameDay};case"dropshipping":return{id:"dropshipping",name:"Envío especial",price:void 0,free:e.free,availableDates:[],timesAvailable:[],value:e.value,isSameDay:e.isSameDay}}}))},g=function(e,t){if(t){var r=t.idLine,n=t.qty,i=t.totalPrice;return{id:"".concat(e.insuranceId),name:e.insuranceName,detail:e.text,price:+e.price,active:!0,idLine:null===r||void 0===r?void 0:r.toString(),qty:n,totalPrice:i}}return{id:"".concat(e.insuranceId),name:e.insuranceName,detail:e.text,price:+e.price,active:!1,qty:0,totalPrice:0}},D=function(e,t){if(t){var r=t.idLine,n=t.qty,i=t.totalPrice;return{extraServiceId:e.extraServiceId,extraServiceArticleId:"".concat(e.extraServiceArticleId),name:e.name,price:+e.price,allowInMarketplace:e.allowInMarketplace,idLine:null===r||void 0===r?void 0:r.toString(),qty:n,totalPrice:i,active:!0}}return v({extraServiceId:e.extraServiceId,extraServiceArticleId:"".concat(e.extraServiceArticleId),name:e.name,price:+e.price,allowInMarketplace:e.allowInMarketplace,qty:0,totalPrice:0,active:!1},e.idLine?{idLine:e.idLine}:{},e.sellerId?{sellerId:e.sellerId}:{},e.condition?{condition:e.condition}:{})},R=function(e,t,r){if(r){var n=r.idLine,i=r.qty,a=r.totalPrice;return{id:"".concat(e.installationServiceId),name:e.text,price:+e.price,active:!0,idLine:null===n||void 0===n?void 0:n.toString(),qty:i,totalPrice:a,offerId:t,summaryWarningText:e.summaryWarningText,summaryNameText:e.summaryNameText,summaryModalTitle:e.summaryModalTitle,summaryModalDescription:e.summaryModalDescription}}return{id:"".concat(e.installationServiceId),name:e.text,price:+e.price,active:!1,qty:0,totalPrice:0,offerId:t,summaryWarningText:e.summaryWarningText,summaryNameText:e.summaryNameText,summaryModalTitle:e.summaryModalTitle,summaryModalDescription:e.summaryModalDescription}},M=["Portátiles","Mini PCs","Ordenadores Todo en uno","Tablets","Sobremesa","Portátiles SSD","Portáteis","portateis","Computadores Desktop","Desktops","desktops","Portáteis com SSD","portateis-com-ssd"],b=function(e){return{id:e.idArticle,price:e.price.price,valorationAvg:e.valoration.avg,valorationCount:e.valoration.total,name:e.name,image:e.image,idOffer:0}},w=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,o=n.map((function(e){var t;return null===(t=e.installationService)||void 0===t?void 0:t.installationServiceId})).filter(Boolean).map(Number),c=[];n.forEach((function(e){e.extendedInsurances.forEach((function(e){(null===e||void 0===e?void 0:e.insuranceId)&&c.push(e.insuranceId)}))}));var d,s=c.filter(Boolean).map(Number),l=n.filter((function(e){return o.includes(e.idArticle)})),p=0!==(null===(r=e.mpOffer)||void 0===r?void 0:r.shopName),f=[],I=[],y=n.filter((function(t){var r,n,i,a,o,c;return 0===(null===(r=e.mpOffer)||void 0===r?void 0:r.shopName)?(null===(n=t.insuranceSelected)||void 0===n?void 0:n.idArticle)===e.idArticle&&!(null===(i=t.insuranceSelected)||void 0===i?void 0:i.idOffer):(null===(a=t.insuranceSelected)||void 0===a?void 0:a.idArticle)===e.idArticle&&(null===(o=t.insuranceSelected)||void 0===o?void 0:o.idMpOffer)===(null===(c=e.mpOffer)||void 0===c?void 0:c.idOffer)})),_=n.filter((function(t){var r,n,a,o,c,d;return!(!(0,A.RU)(i)||!t.lineReference)||(0===(null===(r=e.mpOffer)||void 0===r?void 0:r.shopName)?(null===(n=t.extraServiceSelected)||void 0===n?void 0:n.idArticle)===e.idArticle&&!(null===(a=t.extraServiceSelected)||void 0===a?void 0:a.idOffer):(null===(o=t.extraServiceSelected)||void 0===o?void 0:o.idArticle)===e.idArticle&&(null===(c=t.extraServiceSelected)||void 0===c?void 0:c.idMpOffer)===(null===(d=e.mpOffer)||void 0===d?void 0:d.idOffer))}));if(e.extraServices&&Array.isArray(e.extraServices)&&e.extraServices.length>0&&(I=e.extraServices.map((function(t){return D(t,_.find((function(r){var n;return(0,A.RU)(i)?r.lineReference===e.idLine&&t.active:r.idArticle===t.extraServiceArticleId?!r.mpOfferReference||+r.mpOfferReference===(null===(n=e.mpOffer)||void 0===n?void 0:n.idOffer):void 0})))}))),e.extendedInsurances)if(Array.isArray(e.extendedInsurances))e.extendedInsurances.length>0&&(e.extendedInsurances.sort((function(e,t){return e.insuranceName.localeCompare(t.insuranceName)})),f=e.extendedInsurances.map((function(t){return g(t,y.find((function(r){var n;if(r.idArticle===t.insuranceId)return!r.mpOfferReference||+r.mpOfferReference===(null===(n=e.mpOffer)||void 0===n?void 0:n.idOffer)})))})));else{var v=Object.values(e.extendedInsurances);v.length>0&&(f=v.map((function(t){return g(t,y.find((function(r){var n;if(r.idArticle===t.insuranceId)return!r.mpOfferReference||+r.mpOfferReference===(null===(n=e.mpOffer)||void 0===n?void 0:n.idOffer)})))})))}if(e.installationService){var E,h=p?null===l||void 0===l?void 0:l.find((function(t){var r,n;return t.articleReference===e.idArticle&&t.mpOfferReference===(null===(r=e.mpOffer)||void 0===r||null===(n=r.idOffer)||void 0===n?void 0:n.toString())})):null===l||void 0===l?void 0:l.find((function(t){return t.articleReference===e.idArticle&&!t.mpOfferReference}));d=R(e.installationService,"".concat((null===(E=e.mpOffer)||void 0===E?void 0:E.idOffer)||0),h)}return{idLine:String(e.idLine),isService:0!==e.articleReference&&m(s).concat(m(o)).includes(e.idArticle),removable:0===e.articleReference||e.articleReference===e.idArticle,imgUrl:"//thumb.pccomponentes.com/w-85-85/".concat(null===e||void 0===e?void 0:e.articleImage),image:"//thumb.pccomponentes.com/w-85-85/".concat(null===e||void 0===e?void 0:e.articleImage),articleReference:e.articleReference,availabilityCode:null===e||void 0===e?void 0:e.availabilityCode,familyName:null===e||void 0===e?void 0:e.family,id:"".concat(null===e||void 0===e?void 0:e.idArticle),name:null===e||void 0===e?void 0:e.name,price:t?null===e||void 0===e?void 0:e.totalPrice:(null===e||void 0===e?void 0:e.totalPriceWithSpanishCanon)||(null===e||void 0===e?void 0:e.totalPrice),unitPrice:null===e||void 0===e?void 0:e.unitPrice,originalPrice:null===e||void 0===e?void 0:e.originalPrice,qty:null===e||void 0===e?void 0:e.qty,slug:null===e||void 0===e?void 0:e.slug,trademark:null===e||void 0===e?void 0:e.trademark,canAddGiftPaper:null===e||void 0===e?void 0:e.canAddGiftPaper,isDigital:e.type===a.V7.DIGITAL,isExtraServiceArticle:e.isExtraServiceArticle,type:e.type,deliveryStr:e.type!==a.V7.DIGITAL?e.deliveryDate.strDeliveryDate:(0,u.t)("checkout.delivery.digitalProductDeliveryDateText"),idOffer:e.mpOffer.idOffer,services:f,extraServices:I,installation:d,isComputerFamily:M.includes(e.family),vendor:p?{shopId:e.mpOffer.shopId,shopName:"".concat(e.mpOffer.shopName),shopSlug:e.mpOffer.shopSlug}:void 0,condition:e.mpOffer?e.mpOffer.condition:void 0,vendorType:p?a.O0.MARKETPLACE:a.O0.PCC}},U=function(e){var t=e.data,r=e.checkedShippingAddressId,n=e.checkedBillingAddressId,i=t.cart,a=Y({data:i,checkedBillingAddressId:n&&+n>0&&n});return{shippingAddresses:x({data:i,checkedShippingAddressId:r&&+r>0&&r}),billingAddresses:a}},Y=function(e){var t,r=e.data,n=e.checkedBillingAddressId,i=r.billingAddress,a=!!i&&!!(null===i||void 0===i?void 0:i.find((function(e){return e.defaultUser}))),o=i&&(t=Math).max.apply(t,m(i.map((function(e){return+e.idUser}))));return i?null===i||void 0===i?void 0:i.reduce((function(e,t){return m(e).concat([{addressData:{address:t.streetNumber?"".concat(t.address,", ").concat(t.streetNumber):t.address,billingType:k(t.billingType),city:t.city,country:t.country.name,cp:t.postalCode,id:"".concat(t.idUser),name:t.name,nif:t.nif,phone:t.cellPhone,province:t.province.name,surname:t.surname},isChecked:n?+n===t.idUser:t.defaultUser||!a&&+t.idUser===o,isDefault:t.defaultUser}])}),[]).sort((function(e,t){return X(e,t)})):[]},k=function(e){switch(e){case i.y.BUSINESS:return a.ck.COMPANY;case i.y.FREELANCE:return a.ck.FREELANCE;case i.y.INDIVIDUAL:default:return a.ck.INDIVIDUAL}},x=function(e){var t=e.data,r=e.checkedShippingAddressId,n=t.shippingAddress;if(!n)return[];var i=!!n&&!!n.find((function(e){return 1===e.default}));return n.map((function(e,t){return{addressData:v({address:e.streetNumber?"".concat(e.address,", ").concat(e.streetNumber):e.address,city:e.city,countryIsoCode:e.country.iso,country:e.country.name,cp:e.postalCode,id:"".concat(e.id),name:e.name,nif:e.nif,phone:e.phone,province:e.province.name,provinceIsoCode:String(e.province.id),surname:e.surname},e.optionalInformation?{optionalInformation:e.optionalInformation}:{}),isChecked:r?+r===e.id:i?1===e.default:n.length-1===t,isDefault:1===e.default,isValidated:e.validated}})).sort((function(e,t){return X(e,t)}))},B=function(e){return e.countries.map((function(e){return{iso:e.iso,name:e.name}}))},V=function(e){var t,r=e.talonCoupons;return null!==(t=null===r||void 0===r?void 0:r.map((function(e){var t=e.usageLimit,r=e.usageCounter,n=e.id,i=e.idGroup,a=e.creationDate,o=e.couponId,c=e.code,d=e.idCampaign,s=e.applicationId;return{activationCounter:e.activationCounter,applicationId:s,campaignId:d,code:c,couponId:o,creationDate:a,groupId:i,id:n,usageCounter:r,usageLimit:t}})))&&void 0!==t?t:[]},G=function(e){var t;return(null===(t=e.cart.availableShops)||void 0===t?void 0:t.map((function(e){return{name:Z(e),id:e?"".concat(e):""}})))||[]},H=function(e){var t,r,n,i,o,c=F(e.adyenBankstores);(null===(t=e.payPerUseInstallments)||void 0===t?void 0:t.length)>0?(r=null!==(i=e.payments)&&void 0!==i?i:[],n=null!==(o=e.paymentsNotAllowed)&&void 0!==o?o:[]):(r=e.payments?e.payments.filter((function(e){return e.idPayment!==a.XL.PAY_PER_USAGE})):[],n=e.paymentsNotAllowed?e.paymentsNotAllowed.filter((function(e){return e.idPayment!==a.XL.PAY_PER_USAGE})):[]);return{paymentCard:{storedPaymentCards:c?E(v({},c),{cards:c.cards.filter((function(e){return!e.expired}))}):void 0,expiredCards:c?E(v({},c),{cards:c.cards.filter((function(e){return e.expired}))}):void 0,newCard:e.cart.paymentIntention&&e.cart.paymentIntention.paymentMethod===l.XL.ADYEN_CARD&&e.cart.paymentIntention.paymentData?{cardBrand:e.cart.paymentIntention.paymentData.paymentMethod.brand,cardName:e.cart.paymentIntention.paymentData.paymentMethod.holderName,endDigits:e.cart.paymentIntention.paymentData.paymentMethod.endDigits,data:e.cart.paymentIntention.paymentData}:void 0,clientWithNoCards:!c,methods:r.filter((function(e){return"tarjeta"===e.groupType}))},multibanco:r.find((function(e){return e.idPayment===a.XL.MULTIBANCO})),financing:T(r),financingNotAllowed:{financingMethodsNotAllowed:n.filter((function(e){return"financiacion"===e.groupType})),selected:void 0},others:S(r),othersNotAllowed:{othersMethodsNotAllowed:n.filter((function(e){return"financiacion"!==e.groupType})),selected:void 0}}},F=function(e){var t;if(!e)return{cards:[]};var r=e.details;return r&&r.length<1?void 0:{cards:(null===(t=e.details)||void 0===t?void 0:t.reverse().map((function(e){var t=e.address,r=e.card,n=e.clientId,i=e.creationDate,a=e.paymentMethodVariant,o=e.recurringDetailReference,d=e.variant;return{expirationDate:{month:r.expiryMonth,year:r.expiryYear},name:r.holderName,lastFourDigits:r.number,brand:d,clientId:n,creationDate:i,paymentMethodVariant:a,recurringDetailReference:o,variant:d,address:t,expired:$(c()("".concat(r.expiryYear,"-").concat(+r.expiryMonth,"-01")).endOf("month"))}})))||[]}},K=function(e){var t=function(e){switch(e){case"info":default:return"info";case"warning":return"warning"}};return e.map((function(e){return{text:e.content,type:t(e.type)}}))},W=function(e){var t,r,n,i,a,o,c,d=!!(null===(t=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===t?void 0:t.cards.length),s=null===(r=e.deliveries)||void 0===r?void 0:r.find((function(e){return"pccomponentes"===e.type})),l=null===(n=e.deliveries)||void 0===n?void 0:n.filter((function(e){return"marketplace"===e.type}));return{conditionsAccepted:!1,shippingAddressSelected:null===(i=e.addresses.shippingAddresses.find((function(e){return e.isChecked})))||void 0===i?void 0:i.addressData.id,billingAddressSelected:null===(a=e.addresses.billingAddresses.find((function(e){return e.isChecked})))||void 0===a?void 0:a.addressData.id,pickingPointSelected:void 0,isNeutralOrder:!1,shopSelected:void 0,shippingMethod:1,paymentMethodSelected:e.defaultPaymentMethod,deliveryAgency:s?s.defaultAgency:void 0,agencyObservations:"",marketplaceAgencies:l.filter((function(e){return e.agencies.length>0})).map((function(e){return{id:e.idShop,orderKey:e.orderKey,offers:e.offers,value:e.defaultAgency}})),productsWithGiftPaper:[],selectedCoupon:void 0,whoPicksUp:{data:void 0,isValid:!1},adyen:d?{adyenData:void 0,adyenIdUserCard:null===(o=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===o?void 0:o.cards[0].clientId,adyenDataCard:null===(c=e.paymentMethods.paymentCard.storedPaymentCards)||void 0===c?void 0:c.cards[0].recurringDetailReference}:void 0,giftCardCode:void 0}},X=function(e,t){return t.isChecked||t.isDefault&&!e.isChecked?1:-1},j=function(e,t){var r;return null===(r=e.find((function(e){return e.name===t})))||void 0===r?void 0:r.iso},Z=function(e){switch(e){case 1:return a.vo.MURCIA;case 30:return a.vo.MADRID;case 71:return a.vo.BARCELONA}return"Unknow Shop"},q=function(e,t){switch(e){case a.XL.APLAZAME:case l.XL.APLAZAME:return a.hb.APLAZAME;case a.XL.CETELEM:return a.hb.CETELEM;case a.XL.PAY_PER_USAGE:return a.hb.PAY_PER_USAGE;case a.XL.PAY_IN_SHOP:case a.XL.CASH_ON_DELIVERY:return"payinshop"===t?a.hb.PAY_IN_SHOP:a.hb.CASH_ON_DELIVERY;case a.XL.BANK_TRANSFER:return a.hb.BANK_TRANSFER;case a.XL.BIZUM:return a.hb.BIZUM;case a.XL.MULTIBANCO:return a.hb.MULTIBANCO;case a.XL.INESPAY:return a.hb.INESPAY;case a.XL.ADYEN:case a.XL.REDSYS:return a.hb.CREDIT_CARD;case a.XL.GRATIS:return a.hb.GRATIS}return a.hb.UNKNOWN},$=function(e){return c()().diff(e,"day")>0},z=function(e,t){if(!e)return 1;if(!t)return-1;var r=c()(e.maxDelivery);return r.isBefore(t.maxDelivery)?1:r.isAfter(t.maxDelivery)?-1:0},J=function(e){var t=Math.round(100*(e+Number.EPSILON))/100;return t%1!==0?t.toLocaleString(void 0,{maximumFractionDigits:2,minimumFractionDigits:2}):t.toLocaleString()},Q=function(e,t){return e.split("&").filter((function(e){return!e.includes(t)})).toString().split(",").join("&")},ee=function(e,t){var r=function(e,t){if(0===e.length)return t;var n=Q(t,e[0]);return r(e.splice(1),n)};return r(t,e)},te=function(){return"1"===(0,d.e)("cookieInShop")&&((0,d.e)("shopVersion")===a.gM.MURCIA||(0,d.e)("shopVersion")===a.gM.MADRID||(0,d.e)("shopVersion")===a.gM.BARCELONA)},re=function(e){switch(e.toLocaleLowerCase()){case"info":default:return"info";case"error":return"danger";case"offer":return"success"}},ne=function(){return c()().diff(c()(f.GC))>0},ie=function(){return c()().diff(c()(f.YK))>0},ae=function(){return c()().diff(c()(f.Gb))>0},oe=function(e,t,r){var n;if(!e.billingAddresses.length)return!0;var i=null===(n=e.billingAddresses.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData,o=!i||(0,s.u)(j(r,i.country),i.cp);return(null===i||void 0===i?void 0:i.billingType)===a.ck.INDIVIDUAL?i&&!Object.values(i).some((function(e){return!e}))&&o||0===e.billingAddresses.length:i&&!Object.entries(i).some((function(e){return!e[1]&&"surname"!==e[0]}))&&o||0===e.billingAddresses.length},ce=function(e,t,r){var n;if(!e.shippingAddresses.length)return!0;var i=null===(n=e.shippingAddresses.find((function(e){return e.addressData.id===t})))||void 0===n?void 0:n.addressData,a=!i||(0,s.u)(j(r,i.country),i.cp);return i&&!Object.values(i).some((function(e){return!e}))&&a},de=function(e){return e===I.lI.pt_PT?a.Ow.PT:a.Ow.ES},se=function(e){return e===a.Sh.LAS_PALMAS||e===a.Sh.TENERIFE},le=function(e){return"facilypay_".concat(e.toLowerCase().split("x")[0],"x")},ue=function(e){var t=e.map((function(e){return e.id})),r=new Set(t),n=!1;if(r.size!==t.length){var i=!0,a=!1,o=void 0;try{for(var c,d=function(){var t=c.value;if(e.find((function(e){return e.vendorType&&t.vendorType&&e.id===t.id&&e.vendorType===t.vendorType&&e.price!==t.price})))return n=!0,"break"},s=e[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){if("break"===d())break}}catch(e){a=!0,o=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw o}}}return n},pe=function(e,t){return _({},a.nE.PCC_ARTICLE_SPLIT,{text:t||(0,u.t)("checkout.alerts.pccArticleSplit"),type:"warning",hasIcon:!0,alertSlug:a.pe.PCC_ARTICLE_SPLIT})[e]},fe=function(e){var t=e.shopVersion,r=e.shopCounter,n=e.idBilling,i=e.neutralOrder,o=e.shippingMethod,c=e.idShipping,s=e.selectedPickingPoint,l=e.whoPicksUp,u=e.selectedShop,f=e.marketplaceAgencies,A=e.selectedAgencyId,I=e.paymentMethod,y=e.newCardData,_=e.selectedCard,E=e.selectedCoupon,m=e.giftCardCode,h=e.selectedDeliveryDate,T=e.selectedDeliveryTime,S=e.isSameDay,P=e.observations,N=e.shopLocalSale,O=e.solidaryAmountChecked,L=e.financingTerms,C="".concat(window.location.origin).concat(a.PO[I]||p.Z5.ORDER_OK),g="".concat(window.location.origin).concat(a.k0[I]||""),D="".concat(window.location.origin).concat(a.Jj[I]||p.Z5.ORDER_KO),R=(0,d.S)(),M={},b={idBillingAddress:n,adyenUserAgent:"".concat(R.userAgent),adyenAcceptHeader:"application/json, text/javascript, */*; q=0.01",idPayment:String(I),paymentSlug:I===a.XL.ADYEN?"adyen":void 0,defaultSuccessUrl:"".concat(window.location.origin).concat(p.Z5.ORDER_OK),defaultFailUrl:"".concat(window.location.origin).concat(p.Z5.ORDER_KO),successUrl:C,failUrl:D,notificationUrl:g,shopCounter:"0"};switch(r&&(b.shopCounter="1"),i&&(M.neutralOrder=i.toString()),h&&(M.customerSelectedDeliveryDate=h),T&&(M.customerSelectedDeliveryTime=T),E&&(M.couponSelected=E),m&&(M.giftCardCode=m),M.isSameDay=S?"1":"0",P&&(M.shippingComment=P),N&&(M.shopLocalSale="1"),O&&(M.solidaryAmount="1"),M.setShippingDefault="0",M.deliveryNote="0",te()&&(b.shopId=(0,d.e)("shopVersion"),"1"===(0,d.e)("cookieMostrador")&&(b.shopCounter="1")),(null===f||void 0===f?void 0:f.length)>0&&f.forEach((function(e){e.offers.forEach((function(t){M["marketPlaceAgencies[".concat(e.id,"][").concat(e.orderKey,"][").concat(t,"]")]=e.value}))})),A&&o===a.sx.SHIPPING_ADDRESS&&!isNaN(+A)&&(b.idAgency=A),o){case a.sx.SHIPPING_ADDRESS:c&&(M.idShippingAddress=c);break;case a.sx.PICKUP_POINT:s&&l&&(M.shippingPointId=s,M.shippingPointName=l.name,M.shippingPointSurname=l.lastName,M.shippingPointNif=l.nif,M.shippingPointPhone=l.phoneNumber);break;case a.sx.SHOP:u&&l&&(M.idShippingAddress=t&&u===a.gM.SALA?"".concat(-t):"".concat(-u),M.pickerName=l.name,M.pickerSurname=l.lastName,M.pickerNif=l.nif,M.pickerPhone=l.phoneNumber)}if(_&&(b.adyenDataCard=_.recurringDetailReference,b.adyenIdUserCard=_.clientId,b.cardType=_.brand),y){Object.entries(y.browserInfo).forEach((function(e){M["adyenData[browserInfo][".concat(e[0],"]")]=e[1].toString()}));var w=Object.entries(y.clientStateDataIndicator);if(w.length>0?w.forEach((function(e){M["adyenData[clientStateDataIndicator][".concat(e[0],"]")]=e[1].toString()})):M["adyenData[clientStateDataIndicator]"]=y.clientStateDataIndicator.toString(),M["adyenData[storePaymentMethod]"]=y.storePaymentMethod.toString(),Object.entries(y.paymentMethod).forEach((function(e){M["adyenData[paymentMethod][".concat(e[0],"]")]="".concat(e[1])})),y.riskData)Object.entries(y.riskData).forEach((function(e){M["adyenData[riskData][".concat(e[0],"]")]="".concat(e[1])}))}return Object.entries((0,d.S)()).forEach((function(e){return M["browserInfo[".concat(e[0],"]")]=e[1].toString()})),I===a.XL.ONEY&&L&&(M.financingTerms=le(L)),v({},b,M)},Ae=function(e,t){return e.map((function(r){var n=t.find((function(e){return String(r.idArticle)===e.productId}));return null===n||void 0===n||n.relatableOffers.forEach((function(t){r.extraServices.push({extraServiceId:t.productId,extraServiceArticleId:+t.productId,name:t.productName,price:t.price.amountCents,allowInMarketplace:!0,active:e.reduce((function(e,n){return!!e||n.lineReference===r.idLine&&t.productId===String(n.idArticle)}),!1),idLine:r.idLine,sellerId:t.sellerId,condition:t.condition})})),r}))}}}]); //# sourceMappingURL=main-22e09d3c.js.map