1export const __webpack_esm_id__=1168;export const __webpack_esm_ids__=[1168];export const __webpack_esm_modules__={21895(e,i,s){s.d(i,{A:()=>n});s(98992),s(54520),s(81454);var t=s(85575);const n=async(e,i)=>{let s=[];const n=e.filter(e=>void 0!==e.merchantInfo?.merchantSku).map(e=>({id:e.id,merchantSku:e.merchantInfo.merchantSku}));if(Object.keys(e).length>0)try{const e=await axios.post("/cart/check-items-selling-country",{items:n,countryToShip:i});200===e.status&&(s=e.data)}catch(e){return t.A.error("Error in checking items selling country",e),s}return s}},42321(e,i,s){s.d(i,{A:()=>l});var t=s(41425);s(98992),s(81454),s(37550);var n=s(82124),d=s(19300),a=s(85575),r=s(28808);const o={name:"CartValidation",data:()=>({globalMessages:[],itemMessages:[],isLoading:!1,validationError:!1}),computed:{hasGenericErrors(){return Object.values(this.globalMessages).some(e=>"Generic-error"===e.code)},hasGlobalMessages(){return this.globalMessages&&this.globalMessages.length>0},hasItemMessages(){return this.itemMessages&&Object.keys(this.itemMessages).length>0},hasMatchingItemMessages(){const e=this.allJobsList.map(e=>e.uniqueStableId);return Object.keys(this.itemMessages).some(i=>-1!==e.indexOf(i))},...(0,n.L8)("cart",["allJobsList","validationResult","validationPending"]),...(0,n.L8)("links",["cartLink"])},methods:{async handleValidationResult(e){const{validation_response:i,shopping_cart_dto:s}=this.validationResult;if(i){const{can_checkout:t,global_messages:n,item_messages:o}=i;this.globalMessages=n,this.itemMessages=o;const l=this.hasItemMessages||this.hasGlobalMessages;let c=!1;(s&&l||s&&e.forceCartUpdate)&&(await this.$store.dispatch("cart/update",{cart:s}),c=!0),(c||e.updatedCartAtLogin)&&(async()=>{if("undefined"!=typeof tC&&void 0!==tC?.event?.dataLayerVariablesCartUpdated&&("basket"===window.envTemplate||"funnel"===window.envTemplate)){const e=await(0,r.A)({refresh:!0});a.A.log("refreshed dataLayer values",e);const{dataLayerVariables:i,definedDataLayerVariables:s}=e;window.dl_vars=i,window.tc_vars={...window.tc_vars,...s},tC.event.dataLayerVariablesCartUpdated(void 0,{triggerName:"updated"}),a.A.log("dataLayerVariablesUpdated tc event triggered")}})(),t?this.hasMatchingItemMessages||this.hasGlobalMessages?(this.isLoading=!1,d.A.$emit("open-modal-cart-validation",{modalTarget:e.modalTarget,globalMessages:n,itemMessages:o,canCheckout:t})):e.targetURL?window.location=e.targetURL:e.completedAction&&e.completedAction(this.validationResult):(this.isLoading=!1,this.validationError=!0,this.hasGenericErrors||!this.hasMatchingItemMessages&&!this.hasGlobalMessages?d.A.$emit("open-modal-generic-error"):d.A.$emit("open-modal-cart-validation",{modalTarget:e.modalTarget,globalMessages:n,itemMessages:o,canCheckout:t}))}else{if("failure"===this.validationResult.status){const e={CHECKOUT_FAILURES:()=>{const e=this.validationResult?.data?.message;d.A.$emit("open-modal-checkout-failure",e)},"CART-EMPTY":()=>{window.location.href=this.cartLink},default:()=>{d.A.$emit("open-modal-generic-error"),this.isLoading=!1,this.validationError=!0}};(e[this.validationResult?.data?.errorCode]||e.default)()}e.completedAction(this.validationResult)}},async validateCart(e){if(a.A.log("CartValidation.validateCart"),!this.validationPending){this.isLoading=!0;const i=e.isValidationOnLoad||!1;await this.$store.dispatch("cart/validate",{forceValidation:e.forceValidation,isValidationOnLoad:i}),await this.handleValidationResult(e),this.isLoading=!1}},async handleDuplicateItemValidation(e,i){a.A.log("CartValidation.validateCart"),this.validationPending||(this.isLoading=!0,await this.$store.dispatch("cart/handleDuplicateItemValidation",e),await this.handleValidationResult(i),this.isLoading=!1)},async validateCartAndCheckout(e){if(a.A.log("CartValidation.validateCartAndCheckout"),!this.validationPending){this.isLoading=!0;const i=e.isValidationOnLoad||!1;await this.$store.dispatch("cart/validateAndCheckout",{parameters:e.parameters,isValidationOnLoad:i}),await this.handleValidationResult(e),this.isLoading=!1}},async validateCartOnAddressSelection(e){if(!this.validationPending){this.isLoading=!0;const i=e.isValidationOnLoad||!1;await this.$store.dispatch("cart/validateOnAddressSelection",{parameters:e.parameters,isValidationOnLoad:i,validationType:e.validationType}),await this.handleValidationResult(e),this.isLoading=!1,e.isFirstShippingAddressCreated&&window.location.reload()}},...(0,n.i0)({startLoading:"recap/loadingStarted",endLoading:"recap/loadingEnded"})},watch:{isLoading(e){!0===e?this.startLoading():this.endLoading()}}};const l=(0,s(66262).A)(o,[["render",function(e,i,s,n,d,a){return(0,t.uX)(),(0,t.CE)("div",null,[(0,t.RG)(e.$slots,"trigger",{validate:a.validateCart,handleDuplicateItemValidation:a.handleDuplicateItemValidation,validateCartAndCheckout:a.validateCartAndCheckout,loaderFromValidation:d.isLoading,validationError:d.validationError,validateCartOnAddressSelection:a.validateCartOnAddressSelection})])}]])},57522(e,i,s){s.d(i,{default:()=>Ks}),s.r(i);var t=s(41425);s(74423),s(98992),s(54520),s(25509),s(65223),s(43375),s(60321),s(41927),s(11632),s(64377),s(39225),s(66771),s(13972),s(12516),s(99209),s(68931),s(25714),s(52514),s(35694),s(52774),s(49536),s(21926),s(17561),s(16864),s(66197),s(16215);var n=s(82124);const d={class:"row"},a={class:"col-12 col-lg-8"},r={class:"guided-step-collapsed-header"},o={class:"guided-step-title-wrap"},l={class:"guided-step-title"},c={class:"section-text"},p={class:"title"},u={class:"guided-step-recap"},h={key:0,class:"alert alert-danger","data-test":"guided-step-validation-error"},g={class:"font-bold"},m={key:1,class:"guided-step-content","data-test":"guided-step-shipping-expanded"},v={class:"guided-step-opened-header"},y={class:"guided-step-title-wrap"},k={class:"guided-step-title"},b={class:"section-text"},A={class:"title"},S={key:0,class:"guided-step-footer"},C={class:"guided-step-collapsed-header"},f={class:"guided-step-title-wrap"},L={class:"guided-step-title"},V={class:"section-text"},P={class:"title"},_={class:"guided-step-recap"},B={key:0,class:"alert alert-danger","data-test":"guided-step-sender-validation-error"},w={class:"font-bold"},x={key:1,class:"guided-step-content addresses-container","data-test":"guided-step-sender-expanded"},O={class:"guided-step-opened-header"},E={class:"guided-step-title-wrap"},M={class:"guided-step-title"},I={class:"section-text"},F={class:"title"},T={class:"guided-step-footer"},R={class:"guided-step-collapsed-header"},D={class:"billing-step"},q={class:"billing-header-step"},G={class:"guided-step-title-wrap"},N={class:"guided-step-title"},U={class:"section-text"},W={class:"title"},$={class:"billing-header-actions"},X={key:0,class:"billing-text-step"},z={class:"billing-recap-address","data-test":"guided-step-billing-inline-recap"},j={class:"row billing-recap-head d-none d-sm-flex"},H={class:"col-4"},Q={class:"col-4"},K={class:"col-4"},J={class:"row billing-recap-body"},Y={class:"col-12 col-sm-4 name"},Z={class:"col-12 col-sm-4"},ee={class:"col-12 col-sm-4"},ie={key:0,class:"alert alert-danger","data-test":"guided-step-billing-validation-error"},se={class:"font-bold"},te={key:1,class:"guided-step-content","data-test":"guided-step-billing-expanded"},ne={class:"guided-step-opened-header"},de={class:"billing-step"},ae={class:"billing-header-step"},re={class:"guided-step-title-wrap"},oe={class:"section-text"},le={class:"title"},ce={class:"billing-header-actions"},pe={class:"div-alert"},ue={key:0,class:"alert alert-danger","data-test":"guided-step-billing-validation-error-expanded"},he={class:"font-bold"},ge={key:0,class:"guided-step-footer"},me={class:"col-12 col-lg-4"},ve={key:0,class:"test-options"},ye={class:"col-12"};s(44114),s(23215),s(72577),s(81454),s(3949),s(78898);
1var ke=s(65127),be=s(55561),Ae=s(85575),Se=s(39030),Ce=s(19300),fe=s(62414),Le=s(50716),Ve=s(7374),Pe=s(70203),_e=s(95666),Be=s(62998);const we={class:"terms-container address-step","data-test":"terms-container"},xe={class:"terms-title"},Oe=["innerHTML"],Ee={key:0,class:"alert alert-danger error-message text-danger","data-test":"terms-error-message"},Me={class:"font-bold"};var Ie=s(23576);const Fe={name:"TermsAndConditions",components:{Checkbox:Ie.A},computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"]),...(0,n.L8)("recap/terms",["title","text","termsAccepted","isErrorMessageShown"])},methods:{...(0,n.i0)({acceptTerms:"recap/terms/accept",rejectTerms:"recap/terms/reject"}),toggleAccept(e){!0===e?this.acceptTerms():this.rejectTerms()}}};var Te=s(66262);const Re=(0,Te.A)(Fe,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("checkbox");return(0,t.bo)(((0,t.uX)(),(0,t.CE)("div",we,[(0,t.Lk)("div",xe,(0,t.v_)(e.title),1),(0,t.Lk)("div",{class:"terms-scroller border-all",innerHTML:e.text},null,8,Oe),(0,t.bF)(r,{class:(0,t.C4)({"error-message":e.isErrorMessageShown}),checked:e.termsAccepted,onCheckboxChanged:a.toggleAccept},{checkboxText:(0,t.k6)(()=>[(0,t.Lk)("div",{class:(0,t.C4)(["textCheck",{"text-danger":e.isErrorMessageShown}]),"data-test":"recap-page-terms-check"},(0,t.v_)(e.getDictionaryVoice("addresses","popup_condizioni")),3)]),_:1},8,["class","checked","onCheckboxChanged"]),e.isErrorMessageShown?((0,t.uX)(),(0,t.CE)("div",Ee,[i[0]||(i[0]=(0,t.Lk)("i",{class:"icon icon-alert_20px"},null,-1)),(0,t.Lk)("div",Me,(0,t.v_)(e.getDictionaryVoice("addresses","alert_msg_terms")),1)])):(0,t.Q3)("",!0)],512)),[[t.aG,""!==e.title]])}],["__scopeId","data-v-09c4f4ed"]]),De={class:"addresses-container"},qe={class:"section-title"},Ge={key:1},Ne=["innerHTML"],Ue={class:"col-12 item-column div-alert"},We={key:0,class:"alert alert-danger",role:"alert"},$e=["innerHTML"],Xe={class:"address-btns address-step"},ze={key:0,class:"text-center"},je={key:1},He={class:"search-btn align-col"},Qe={class:"col-12 div-alert"},Ke={key:2},Je={class:"col-12 div-alert"};const Ye={class:"row toggle-button pick-up"};const Ze={name:"ToggleShippingMethod",emits:["click-shipping-by-address","click-shipping-by-pup"],props:{isUserShippingAddressSelected:{type:Boolean,required:!1,default:!0}},computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"])}},ei=(0,Te.A)(Ze,[["render",function(e,i,s,n,d,a){return(0,t.uX)(),(0,t.CE)("div",Ye,[(0,t.Lk)("div",{class:(0,t.C4)(["btn shipping-address",{active:s.isUserShippingAddressSelected}]),onClick:i[0]||(i[0]=i=>e.$emit("click-shipping-by-address"))},(0,t.v_)(e.getDictionaryVoice("addresses","btn_shipping")),3),(0,t.Lk)("div",{class:(0,t.C4)(["btn pickup-address",{active:!s.isUserShippingAddressSelected}]),onClick:i[1]||(i[1]=i=>e.$emit("click-shipping-by-pup"))},(0,t.v_)(e.getDictionaryVoice("addresses","btn_ship_pickup")),3)])}],["__scopeId","data-v-5335b9a4"]]);const ii=["id"],si={class:"row"},ti={class:"col-12 col-sm-3 title margin-xs"},ni={class:"company margin-xs"},di={class:"col-6 col-sm-3 margin-xs"},ai={class:"col-6 col-sm-3 margin-xs"},ri={key:0},oi={class:"exemption-pill-div col-12"},li={class:"col-6 col-sm-3"},ci={class:"address-actions"},pi={class:"col alert-div"},ui=["innerHTML"];var hi=s(97874),gi=s(78331);const mi={name:"RecapItem",props:{item:{type:Object,required:!0},type:{type:String,required:!0},selectedAddress:{type:Boolean,required:!0},displayWarning:{type:Boolean,required:!1},viesWarningText:{type:String,required:!1}},components:{PillAddressExemption:gi.A,BAlert:hi.D},data:()=>({selected:!1,typeAddress:[]}),computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"]),addressesCategoriesTags(){return this.item?.addressesCategoriesTags??[]}},methods:{setAddress(e,i){this.$emit("setAddress",e.id,i)}}},vi=(0,Te.A)(mi,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("pill-address-exemption"),o=(0,t.g2)("b-button"),l=(0,t.g2)("b-alert");return(0,t.uX)(),(0,t.CE)("div",{id:s.item.id,class:"body"},[(0,t.Lk)("div",si,[(0,t.Lk)("div",ti,[(0,t.Lk)("div",ni,(0,t.v_)(s.item.company)+(0,t.v_)(s.item.firstName)+" "+(0,t.v_)(s.item.lastName),1)]),(0,t.Lk)("div",di,[(0,t.eW)((0,t.v_)(s.item.streetName),1),i[1]||(i[1]=(0,t.Lk)("br",null,null,-1)),(0,t.eW)(" "+(0,t.v_)(s.item.postalCode)+" "+(0,t.v_)(s.item.city)+" "+(0,t.v_)(s.item.state),1),i[2]||(i[2]=(0,t.Lk)("br",null,null,-1)),(0,t.eW)(" "+(0,t.v_)(e.getDictionaryVoice("countries",`country_${s.item.country}`)),1)]),(0,t.Lk)("div",ai,[(0,t.Lk)("p",null,(0,t.v_)(s.item.mobile),1),"billing"===s.type?((0,t.uX)(),(0,t.CE)("p",ri,(0,t.v_)(s.item.vatid)+" "+(0,t.v_)(s.item.siren)+" "+(0,t.v_)(s.item.nif)+" "+(0,t.v_)(s.item.utr),1)):(0,t.Q3)("",!0)]),(0,t.Lk)("div",oi,[(0,t.bF)(r,{addressesCategoriesTags:a.addressesCategoriesTags},null,8,["addressesCategoriesTags"])]),(0,t.Lk)("div",li,[(0,t.Lk)("div",ci,[(0,t.bF)(o,{class:"float-end blue-empty-btn small-btn",disabled:s.selectedAddress,onClick:i[0]||(i[0]=e=>a.setAddress(s.item,s.type))},{default:(0,t.k6)(()=>[(0,t.eW)((0,t.v_)(s.selectedAddress?e.getDictionaryVoice("addresses","selected_address"):e.getDictionaryVoice("addresses","set_address")),1)]),_:1},8,["disabled"])])]),(0,t.Lk)("div",pi,[(0,t.bF)(l,{variant:"warning","model-value":s.displayWarning},{default:(0,t.k6)(()=>[(0,t.Lk)("span",{innerHTML:s.viesWarningText},null,8,ui)]),_:1},8,["model-value"])])])],8,ii)}]]),yi={key:0,class:"form-group"},ki={class:"search-container"},bi=["value","placeholder"];const Ai={name:"AddressesSearchBar",props:{isShown:{type:Boolean,required:!1,default:!0},modelValue:{type:String,required:!0}},computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"])}},Si=(0,Te.A)(Ai,[["render",function(e,i,s,n,d,a){return s.isShown?((0,t.uX)(),(0,t.CE)("div",yi,[(0,t.Lk)("label",null,(0,t.v_)(e.getDictionaryVoice("addresses","riepilogo_dati_cerca_indirizzo")),1),(0,t.Lk)("div",ki,[(0,t.Lk)("input",{class:"form-control",type:"text",value:s.modelValue,onInput:i[0]||(i[0]=i=>e.$emit("update:modelValue",i.target.value)),placeholder:e.getDictionaryVoice("addresses","riepilogo_dati_cerca_indirizzo")},null,40,bi),(0,t.bo)((0,t.Lk)("span",{class:"clear-input-text",onClick:i[1]||(i[1]=i=>e.$emit("update:modelValue",""))},(0,t.v_)(e.getDictionaryVoice("addresses","clear")),513),[[t.aG,s.modelValue.length>0]])])])):(0,t.Q3)("",!0)}
1],["__scopeId","data-v-60bf7be5"]]),Ci={class:"addresses-table"},fi={key:0,class:"row head d-none d-sm-flex"},Li={class:"col-3"},Vi={class:"col-3"},Pi={class:"col-3"},_i={key:1,class:"no-results"};const Bi={class:"search-nav"},wi={key:0},xi={class:"pagination"},Oi=["onClick"];const Ei={name:"AddressesSearchNav",props:{pages:{type:Number,required:!0},currentPage:{type:Number,required:!1,default:0}},methods:{changePage(e){Ce.A.$emit("change-navigation-page",e)}}},Mi={name:"PaginatedAddresses",components:{AddressesSearchNav:(0,Te.A)(Ei,[["render",function(e,i,s,n,d,a){return(0,t.uX)(),(0,t.CE)("div",Bi,[i[0]||(i[0]=(0,t.Lk)("span",{class:"results-number"},null,-1)),s.pages>1?((0,t.uX)(),(0,t.CE)("nav",wi,[(0,t.Lk)("ul",xi,[((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(s.pages,(e,i)=>((0,t.uX)(),(0,t.CE)("li",{key:i,class:(0,t.C4)(["page-item",{active:s.currentPage===i}])},[(0,t.Lk)("a",{class:"page-link",href:"javascript:void(0);",onClick:e=>a.changePage(i)},(0,t.v_)(i+1),9,Oi)],2))),128))])])):(0,t.Q3)("",!0)])}]])},props:{addresses:{type:Array,required:!0,default:()=>[]}},data:()=>({addressesPerPage:5,currentPage:0}),computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"]),pages(){return Math.ceil(this.addresses.length/this.addressesPerPage)},paginated(){return this.addresses.length>this.addressesPerPage?this.addresses.slice(this.currentPage*this.addressesPerPage,this.currentPage*this.addressesPerPage+this.addressesPerPage):this.addresses}},created(){EventBus.$on("change-navigation-page",e=>{this.currentPage=e})},watch:{addresses(){this.currentPage=0}}},Ii=(0,Te.A)(Mi,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("addresses-search-nav");return(0,t.uX)(),(0,t.CE)("div",Ci,[a.paginated.length>0?((0,t.uX)(),(0,t.CE)("div",fi,[(0,t.Lk)("div",Li,(0,t.v_)(e.getDictionaryVoice("user","societa"))+"/"+(0,t.v_)(e.getDictionaryVoice("user","name")),1),(0,t.Lk)("div",Vi,(0,t.v_)(e.getDictionaryVoice("user","indirizzo")),1),(0,t.Lk)("div",Pi,(0,t.v_)(e.getDictionaryVoice("user","user_contact")),1),i[0]||(i[0]=(0,t.Lk)("div",{class:"col-3"},null,-1))])):((0,t.uX)(),(0,t.CE)("div",_i,(0,t.v_)(e.getDictionaryVoice("addresses","nessun_risultato")),1)),(0,t.RG)(e.$slots,"default",{paginatedAddresses:a.paginated}),(0,t.bF)(r,{pages:a.pages,"current-page":d.currentPage},null,8,["pages","current-page"])])}]]);s(37550);var Fi=s(7187),Ti=s(96077);const Ri={name:"FilteredAddresses",inject:["domainLang"],props:{countryList:{type:Array,required:!0},searchTextFilter:{type:String,required:!1,default:""},addresses:{type:Array,required:!0,default:()=>[]},addressesType:{type:String,required:!0,validator:e=>["shipping","billing"].includes(e)},currentShippingCountryCode:{type:String,required:!1,default:""},selectedAddressId:{type:[String,Number],required:!1,default:""}},computed:{textSearchableShippingFields:()=>["firstName","lastName","company","streetName","city","postalCode","phone","region"],textSearchableBillingFields(){return this.textSearchableShippingFields.concat(["vatid","siren","codiceFiscale","nif","utr"])},reversed(){return Object.keys(this.addresses).reverse().map(e=>({...this.addresses[e]}))},addressesWithSelectedFirst(){return(0,Ve.A)(this.selectedAddressId)?(0,Ti.A)(this.reversed,e=>String(e.id)===String(this.selectedAddressId)):this.reversed},filtered(){return"shipping"===this.addressesType?this.filteredShipping:"billing"===this.addressesType?this.filteredBilling:this.addresses},filteredShipping(){return this.addressesWithSelectedFirst.filter(e=>{const i=(0,Fi.A)(this.domainLang,e.country);return this.applySearchFilterOnGivenAddressFields(e,this.textSearchableShippingFields)||this.applySearchFilterOnGivenVariable(i)})},filteredBilling(){return this.addressesWithSelectedFirst.filter(e=>{const i=this.currentShippingCountryCode,s=(0,Fi.A)(this.domainLang,i);return this.countryList.length<2?(this.applySearchFilterOnGivenAddressFields(e,this.textSearchableBillingFields)||this.applySearchFilterOnGivenVariable(s))&&this.applyGivenStringFilterOnGivenVariable(i,e.country):(this.applySearchFilterOnGivenAddressFields(e,this.textSearchableBillingFields)||this.applySearchFilterOnGivenVariable(s))&&this.applyGivenOptionsFilterOnGivenVariable(this.countryList,e.country)})}},methods:{applySearchFilterOnGivenAddressFields(e,i){return i.some(i=>this.applySearchFilterOnGivenVariable(e[i]))},applySearchFilterOnGivenVariable(e){return this.applyGivenStringFilterOnGivenVariable(this.searchTextFilter,e)},applyGivenStringFilterOnGivenVariable:(e,i)=>i&&i.toLowerCase().includes(e.toLowerCase()),applyGivenOptionsFilterOnGivenVariable:(e,i)=>e&&e.includes(i)}},Di=(0,Te.A)(Ri,[["render",function(e,i,s,n,d,a){return(0,t.uX)(),(0,t.CE)("div",null,[(0,t.RG)(e.$slots,"default",{filteredAddresses:a.filtered})])}
1]]),qi={name:"PaginatedShippingAddresses",components:{FilteredAddresses:Di,PaginatedAddresses:Ii,AddressesSearchBar:Si,RecapItem:vi},emits:["close"],props:{shippingOptions:{type:Array,required:!0},onSetAddress:{type:Function,required:!0},selectedAddressId:{required:!1}},data:()=>({searchShipping:""}),computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"])}},Gi=(0,Te.A)(qi,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("addresses-search-bar"),o=(0,t.g2)("recap-item"),l=(0,t.g2)("paginated-addresses"),c=(0,t.g2)("filtered-addresses");return(0,t.uX)(),(0,t.CE)("div",{class:(0,t.C4)(e.$attrs.class)},[(0,t.Lk)("i",{class:"icon icon-c-close_20px times",onClick:i[0]||(i[0]=i=>e.$emit("close"))}),(0,t.bF)(r,{modelValue:d.searchShipping,"onUpdate:modelValue":i[1]||(i[1]=e=>d.searchShipping=e)},null,8,["modelValue"]),(0,t.bF)(c,{addresses:s.shippingOptions,"search-text-filter":d.searchShipping,"selected-address-id":s.selectedAddressId,"addresses-type":"shipping"},{default:(0,t.k6)(({filteredAddresses:e})=>[(0,t.bF)(l,{addresses:e},{default:(0,t.k6)(({paginatedAddresses:e})=>[((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(e,e=>((0,t.uX)(),(0,t.Wv)(o,{key:e.id,item:e,type:"shipping","selected-address":e.id===s.selectedAddressId,onSetAddress:s.onSetAddress},null,8,["item","selected-address","onSetAddress"]))),128))]),_:1},8,["addresses"])]),_:1},8,["addresses","search-text-filter","selected-address-id"])],2)}]]);var Ni=s(22614),Ui=s(37497);const Wi={class:"container"},$i={class:"row field"},Xi={class:"col-12 col-md-4"},zi={class:"form-group firstName"},ji={class:"align"}
1,Hi=["placeholder","value"],Qi={key:0,class:"text-danger form-text"},Ki={class:"col-12 col-md-4"},Ji={class:"form-group lastName"},Yi={class:"align"},Zi=["placeholder","value"],es={key:0,class:"text-danger form-text"},is={class:"col-12 col-md-4"},ss={class:"form-group phone"},ts=["placeholder","value"],ns={key:0,class:"text-danger form-text"},ds={class:"col-12"},as={class:"pickup-section"},rs={class:"title"},os={key:0,class:"btn-search"},ls={key:1,class:"row"},cs={class:"col-10 col-sm-8"},ps={class:"row"},us={class:"col-12"},hs={class:"address-pickup"},gs={class:"name"},ms={class:"street"},vs={class:"btn-change-pickup"},ys={class:"col-2 col-sm-4"};s(64979),s(71678);var ks=s(80230);const bs={name:"ModalPickUp",mixins:[ks.A],props:{googleMapsApiKey:{type:String,required:!1},pickupPointsRestrictions:{type:Object,required:!0}},computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"]),languageMap(){return["addressInputPlaceholder","locatingYourPostion","locateMyPosition","findingPickupPoints","searchButtonTitle","geolocationErrorPermissionDenied","geolocationErrorPositionUnavailable","geolocationErrorTimeout","geolocationErrorPermissionUnknown","monday","tuesday","wednesday","thursday","friday","saturday","sunday","openHours","nonstop","selectPickupPoint","searchThisArea","noPickupPointSearchResults","errorCouldNotSearch","searchWelcomeText","noPlaceSearchResults"].reduce((e,i)=>({...e,[i]:this.getVoice(i)}),{})}},data(){return{restrictions:this.pickupPointsRestrictions,idModal:"modal-pick-up"}},methods:{managePupResponse(e){const i=e.pickupPoint;this.$emit("selectedPickupPoint",i)},initModal(){this.$nextTick(()=>{window.cimpressPickupPointsUI.initialize({iframeHostElement:document.getElementById("pup-container"),onPickupPointSelected:this.managePupResponse,googleApiKey:this.googleMapsApiKey}),window.cimpressPickupPointsUI.mount({restrictions:structuredClone(this.restrictions),languageMap:structuredClone(this.languageMap)})})},leaveModal(){this.isVisible=!1,this.$nextTick(()=>{window.cimpressPickupPointsUI.unmount({restrictions:"",languageMap:""})})},getVoice(e){return this.getDictionaryVoice("pickup_points_widget",e)}}},As=(0,Te.A)(bs,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("b-modal");return(0,t.uX)(),(0,t.Wv)(r,{size:"xl",id:d.idModal,modelValue:e.internalState,"onUpdate:modelValue":i[0]||(i[0]=i=>e.internalState=i),onShown:a.initModal,onHidden:a.leaveModal,"hide-footer":""},{"header-close":(0,t.k6)(()=>[...i[1]||(i[1]=[(0,t.Lk)("i",{class:"icon icon-c-close_20px"},null,-1)])]),default:(0,t.k6)(()=>[...i[2]||(i[2]=[(0,t.Lk)("div",{id:"pup-container"},null,-1)])]),_:1},8,["id","modelValue","onShown","onHidden"])}]]),Ss={class:"titleText"};const Cs={name:"ModalConfirmDeletePickupPointAddress",mixins:[ks.A],data:()=>({idModal:"modal-confirm-delete-pickup-point-address",isVisible:!1}),computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"])},methods:{deleteItem(){this.$emit("resetPickupAddress"),this.closeModal()},modalInit(){this.isVisible=!0},leaveModal(){this.isVisible=!1}},mounted(){document.addEventListener("keyup",e=>{"Enter"===e.key&&!0===this.isVisible&&this.deleteItem()})}},fs={components:{ModalConfirmDeletePickupPointAddress:(0,Te.A)(Cs,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("b-button"),o=(0,t.g2)("b-modal");return(0,t.uX)(),(0,t.Wv)(o,{id:d.idModal,modelValue:e.internalState,"onUpdate:modelValue":i[0]||(i[0]=i=>e.internalState=i),ref:"modal-confirm-delete-pickup-point",size:"lg",onShow:a.modalInit,onHide:a.leaveModal},{"header-close":(0,t.k6)(()=>[...i[1]||(i[1]=[(0,t.Lk)("i",{class:"icon icon-c-close_20px"},null,-1)])]),title:(0,t.k6)(()=>[(0,t.Lk)("div",Ss,(0,t.v_)(e.getDictionaryVoice("modals","text_confirm_delete_pickup_point_address")),1)]),footer:(0,t.k6)(()=>[(0,t.bF)(r,{class:"blue-empty-btn",onClick:e.closeModal},{default:(0,t.k6)(()=>[(0,t.eW)((0,t.v_)(e.getDictionaryVoice("common","cancel")),1)]),_:1},8,["onClick"]),(0,t.bF)(r,{class:"red-btn",onClick:a.deleteItem},{default:(0,t.k6)(()=>[(0,t.eW)((0,t.v_)(e.getDictionaryVoice("modals","button_confirm_delete_shipping_address")),1)]),_:1},8,["onClick"])]),_:1},8,["id","modelValue","onShow","onHide"])}]]),ModalPickUp:As},mixins:[fe.A],name:"PickupPointWidget",props:{googleMapsApiKey:{type:String,required:!1},pickupPointsRestrictions:{type:Object,required:!0},pickupPointAddress:{type:Object,required:!1},customerValidationMessages:{type:Object,required:!1}},computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"])},data:()=>({pickUpChoosen:!1,validationMessages:{}}),watch:{customerValidationMessages:{handler(e){console.log("pickup widget received errors",e),this.validationMessages={...e}},deep:!0,immediate:!0}},methods:{...(0,n.i0)("modals",["toggleModal"]),onSelectedPickupPoint(e){const i=e;(0,Le.A)(this.$refs)||(i.firstName=this.$refs.firstName?.value,i.lastName=this.$refs.lastName?.value,i.phone=this.$refs.phone?.value),this.$emit("selectedPickupPoint",i),this.toggleModal({id:"modal-pick-up",isActive:!1})},openModalPickup(){this.toggleModal({id:"modal-pick-up",isActive:!0}),this.pickUpChoosen=!0},openModalDeletePickup(){this.toggleModal({id:"modal-confirm-delete-pickup-point-address",isActive:!0})},onResetPickupAddress(){this.$emit("resetPickupAddress"),this.pickUpChoosen=!1},onInputFirstname(e){this.$emit("customerInformationChanged",{firstName:e.target.value})},onInputLastname(e){this.$emit("customerInformationChanged",{lastName:e.target.value})},onInputPhone(e){this.$emit("customerInformationChanged",{phone:e.target.value})}}},Ls=(0,Te.A)(fs,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("modal-pick-up"),o=(0,t.g2)("modal-confirm-delete-pickup-point-address");return(0,t.uX)(),(0,t.CE)("div",Wi,[(0,t.Lk)("div",$i,[(0,t.Lk)("div",Xi,[(0,t.Lk)("div",zi,[(0,t.Lk)("label",ji,(0,t.v_)(e.getDictionaryVoice("user","nome")),1),(0,t.Lk)("input",{type:"text",class:"form-control","aria-describedby":"",placeholder:e.getDictionaryVoice("user","nome"),name:"firstName",ref:"firstName",value:s.pickupPointAddress.firstName,onInput:i[0]||(i[0]=(...e)=>a.onInputFirstname&&a.onInputFirstname(...e))},null,40,Hi),e.hasValidationMessage("pickup-point::firstName")?((0,t.uX)(),(0,t.CE)("small",Qi,(0,t.v_)(e.getValidationMessage("pickup-point::firstName")),1)):(0,t.Q3)("",!0)])]),(0,t.Lk)("div",Ki,[(0,t.Lk)("div",Ji,[(0,t.Lk)("label",Yi,(0,t.v_)(e.getDictionaryVoice("user","cognome")),1),(0,t.Lk)("input",{type:"text",class:"form-control","aria-describedby":"",placeholder:e.getDictionaryVoice("user","cognome"),name:"lastName",ref:"lastName",value:s.pickupPointAddress.lastName,onInput:i[1]||(i[1]=(...e)=>a.onInputLastname&&a.onInputLastname(...e))},null,40,Zi),e.hasValidationMessage("pickup-point::lastName")?((0,t.uX)(),(0,t.CE)("small",es,(0,t.v_)(e.getValidationMessage("pickup-point::lastName")),1)):(0,t.Q3)("",!0)])]),(0,t.Lk)("div",is,[(0,t.Lk)("div",ss,[(0,t.Lk)("label",null,(0,t.v_)(e.getDictionaryVoice("user","telefono")),1),(0,t.Lk)("input",{type:"tel",class:"form-control","aria-describedby":"",placeholder:e.getDictionaryVoice("user","telefono"),name:"phone",ref:"phone",value:s.pickupPointAddress.phone,onInput:i[2]||(i[2]=(...e)=>a.onInputPhone&&a.onInputPhone(...e))},null,40,ts)]),e.hasValidationMessage("pickup-point::phone")?((0,t.uX)(),(0,t.CE)("small",ns,(0,t.v_)(e.getValidationMessage("pickup-point::phone")),1)):(0,t.Q3)("",!0)]),(0,t.Lk)("div",ds,(0,t.v_)(e.getDictionaryVoice("addresses","description_pickup_form")),1)]),(0,t.Lk)("div",as,[(0,t.Lk)("div",rs,(0,t.v_)(e.getDictionaryVoice("addresses","pick_up_point")),1),s.pickupPointAddress.pickupPointUrl?((0,t.uX)(),(0,t.CE)("div",ls,[(0,t.Lk)("div",cs,[(0,t.Lk)("div",ps,[(0,t.Lk)("div",us,[(0,t.Lk)("div",hs,[i[8]||(i[8]=(0,t.Lk)("i",{class:"icon icon-pointer_16px"},null,-1)),(0,t.Lk)("div",null,[(0,t.Lk)("div",gs,(0,t.v_)(s.pickupPointAddress.name),1),(0,t.Lk)("div",ms,[(0,t.eW)((0,t.v_)(s.pickupPointAddress.streetName),1),i[6]||(i[6]=(0,t.Lk)("br",null,null,-1)),(0,t.eW)(" "+(0,t.v_)(s.pickupPointAddress.city),1),i[7]||(i[7]=(0,t.Lk)("br",null,null,-1)),(0,t.eW)(" "+(0,t.v_)(s.pickupPointAddress.country),1)])])])]),(0,t.Lk)("div",{class:"col-12",onClick:i[4]||(i[4]=(...e)=>
1a.openModalPickup&&a.openModalPickup(...e))},[(0,t.Lk)("div",vs,(0,t.v_)(e.getDictionaryVoice("addresses","btn-change-pickup")),1)])])]),(0,t.Lk)("div",ys,[(0,t.Lk)("a",{class:"delete-address",onClick:i[5]||(i[5]=(...e)=>a.openModalDeletePickup&&a.openModalDeletePickup(...e)),href:"javascript:void(0)"},[...i[9]||(i[9]=[(0,t.Lk)("span",{class:"icon icon-delete_32px"},null,-1)])])])])):((0,t.uX)(),(0,t.CE)("div",os,[(0,t.Lk)("div",{class:"btn blue-btn",onClick:i[3]||(i[3]=(...e)=>a.openModalPickup&&a.openModalPickup(...e))},(0,t.v_)(e.getDictionaryVoice("addresses","pick_up_search")),1)]))]),(0,t.bF)(r,{"google-maps-api-key":s.googleMapsApiKey,"pickup-points-restrictions":s.pickupPointsRestrictions,onSelectedPickupPoint:a.onSelectedPickupPoint},null,8,["google-maps-api-key","pickup-points-restrictions","onSelectedPickupPoint"]),(0,t.bF)(o,{onResetPickupAddress:a.onResetPickupAddress},null,8,["onResetPickupAddress"])])}],["__scopeId","data-v-f0560db6"]]);var Vs=s(89462),Ps=s(21895),_s=s(94960);const Bs={name:"RecapShippingMethods",mixins:[fe.A],emits:["shipping-addresses-added","shipping-address-changed","shipping-address-edited","pickup-point-selected"],components:{BSpinner:ke._,ToggleShippingMethod:ei,PaginatedShippingAddresses:Gi,TableNewShippingAddress:Ni.A,TableAddressesShipping:Ui.A,PickupPointWidget:Ls,ModalReviewBasket:(0,t.$V)(()=>Promise.all([s.e(2050),s.e(6910),s.e(5124)]).then(s.bind(s,22443)))},props:{selectedShippingAddress:{type:Object,required:!1,default:null},shippingOptions:{type:Array,required:!0},countryList:{type:Array,required:!0},provincesList:{type:Object,required:!0},countryCode:{type:String,required:!1},customerValidationMessages:{type:Object,required:!1}},data:()=>({searchShippingAddressVisible:!1,newShippingFormOpen:!1,newShippingAddressModel:{id:"",firstName:"",lastName:"",country:"",streetName:"",postalCode:"",city:"",phone:"",mobile:"",addressType:"shippingAddresses"},validationMessages:{},countryToShip:"",notShippableJobs:[]}),computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"]),...(0,n.L8)("recap",["loqateApiKey","googleMapApiKey","isLoading","isUserReseller"]),...(0,n.L8)("recap/recapShipping",["enabledShippingFields","isScrolling","isUserShippingAddressSelected","pickupPointsRestrictions","isPickupPointsEnabled","isPickUpPointShippingMethodSelected","isCustomerAddressShippingMethodSelected"]),...(0,n.L8)("cart",["allJobsList","getSelectedPickupPoint","cartLoaded"]),...(0,n.L8)("links",["cartLink"]),...(0,n.L8)("recap/pickupPointAddress",["isPickupPointSelected","pickupPointAddress"]),unshippableProductNotificationMessage(){const e=this.getDictionaryVoice("countries",`country_${this.countryToShip}`);return this.getDictionaryVoice("shipping","unshippable_jobs_checkout").replace("#COUNTRY_NAME#",e).replace("#NUMBER_OF_JOBS#",this.countNotShippableJobs)},hasNotShippableJobs(){return this.countNotShippableJobs>0},selectedAddressId(){return this.selectedShippingAddress?.id??""},selectedShippingCountry(){return this.isCustomerAddressShippingMethodSelected&&this.selectedShippingAddress?.country?this.selectedShippingAddress.country:this.isPickUpPointShippingMethodSelected&&this.pickupPointAddress?.country?this.pickupPointAddress.country:""},countNotShippableJobs(){return this.notShippableJobs?.length??0}},methods:{pad:Vs.A,...(0,n.i0)({shipByPup:"recap/recapShipping/shipByPup",shipByUserAddress:"recap/recapShipping/shipByUserAddress",loadSelectedPickupPoint:"cart/loadSelectedPickupPoint",updatePickUpPointAddress:"recap/pickupPointAddress/patch",updatePickUpPointCustomerInformation:"recap/pickupPointAddress/partialPatch",resetPickUpPointAddress:"recap/pickupPointAddress/reset",toggleModal:"modals/toggleModal"}),toggleSearchShipping(){this.searchShippingAddressVisible=!this.searchShippingAddressVisible,this.resetShippingAddressFields()},onToggleNewForm(e){!0===e&&(this.searchShippingAddressVisible=!1,this.resetShippingAddressFields())},resetShippingAddressFields(){this.newShippingFormOpen=!1,this.newShippingAddressModel={id:"",firstName:"",lastName:"",country:"",streetName:"",postalCode:"",city:"",phone:"",mobile:"",addressType:"shippingAddresses"}},onAddedShippingAddresses(e){this.newShippingFormOpen=!1,this.$emit("shipping-addresses-added",e)},onSetAddress(e,i){this.searchShippingAddressVisible=!1,this.$emit("shipping-address-changed",e,i)},onEditSelectedAddress(e,i){this.$emit("shipping-address-edited",e,i)},openShippingAddress(){this.shipByUserAddress(),this.clearValidationMessages()},openPickupPoint(){this.shipByPup(),this.clearValidationMessages()},onPickupPointCustomerInformationChanged(e){this.updatePickUpPointCustomerInformation(e)},onSelectedPickupPoint(e){this.updatePickUpPointAddress({firstName:e.firstName,lastName:e.lastName,country:e.address.countryCode,streetName:e.address.addressLine1,postalCode:e.address.postalCode,region:e.address.county,city:e.address.city,phone:e.phone,mobile:e.phone,name:e.name,pickupPointUrl:e._links.self.href,pickupPointsProvi
1derId:e.pickupPointsProviderId}),this.$emit("pickup-point-selected",e)},onResetPickupAddress(){this.resetPickUpPointAddress(),Ae.A.log("Reset pickup point address")},async processCheckItemsSellingCountry(e){try{const i=await(0,Ps.A)(this.allJobsList,e);this.countryToShip=i.countryToShip;const s=Object.keys(i.itemsSellingCountry).filter(e=>!i.itemsSellingCountry[e]);this.notShippableJobs=this.allJobsList.map((e,i)=>({...e,jobNumber:this.pad(i+1)})).filter(e=>s.includes(e.id))}catch(e){Ae.A.error("Error in processCheckItemsSellingCountry",e)}},openModalReview(){this.toggleModal({id:"modal-review-basket",isActive:!0})}},watch:{customerValidationMessages(e){this.validationMessages={...e}},isScrolling(e){e&&this.$nextTick(()=>{this.$refs["alert-shipping"].scrollIntoView({behavior:"smooth"})})},hasNotShippableJobs(e){this.$emit("has-not-shippable-jobs",e)},selectedShippingCountry:{handler(e){!(0,_e.A)(e)&&this.cartLoaded&&this.processCheckItemsSellingCountry(e)},immediate:!0},cartLoaded(e){e&&this.selectedShippingCountry&&this.processCheckItemsSellingCountry(this.selectedShippingCountry)}},mounted(){this.loadSelectedPickupPoint();const e=this.getSelectedPickupPoint;this.updatePickUpPointAddress(e);const{pickupPointsProviders:i}=this.pickupPointsRestrictions;i.includes(e.pickupPointsProviderId)||this.resetPickUpPointAddress();!((0,_e.A)(e)||Object.values(e).every(_e.A))&&this.isPickupPointShippingMethodSelected&&this.isPickupPointsEnabled&&this.openPickupPoint(),(0,_s.A)("click",".review-basket-items",()=>{this.openModalReview()})}},ws=(0,Te.A)(Bs,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("toggle-shipping-method"),o=(0,t.g2)("table-addresses-shipping"),l=(0,t.g2)("b-spinner"),c=(0,t.g2)("table-new-shipping-address"),p=(0,t.g2)("paginated-shipping-addresses"),u=(0,t.g2)("pickup-point-widget"),h=(0,t.g2)("modal-review-basket");return(0,t.uX)(),(0,t.CE)("div",De,[(0,t.Lk)("div",qe,(0,t.v_)(e.getDictionaryVoice("addresses","spedizione")),1),e.isPickupPointsEnabled?((0,t.uX)(),(0,t.Wv)(r,{key:0,"is-user-shipping-address-selected":e.isUserShippingAddressSelected,onClickShippingByAddress:a.openShippingAddress,onClickShippingByPup:a.openPickupPoint},null,8,["is-user-shipping-address-selected","onClickShippingByAddress","onClickShippingByPup"])):(0,t.Q3)("",!0),e.isUserShippingAddressSelected?((0,t.uX)(),(0,t.CE)("div",Ge,[(0,t.Lk)("div",{class:"section-title-address",innerHTML:e.getDictionaryVoice("addresses","delivery_address")},null,8,Ne),s.selectedShippingAddress?((0,t.uX)(),(0,t.Wv)(o,{key:s.selectedShippingAddress.id,"element-id":s.selectedShippingAddress.id,address:s.selectedShippingAddress,"selected-address":!0,"enabled-fields":e.enabledShippingFields,"loqate-api-key":e.loqateApiKey,"provinces-list":s.provincesList,onUpdateSelectedAddress:a.onEditSelectedAddress},null,8,["element-id","address","enabled-fields","loqate-api-key","provinces-list","onUpdateSelectedAddress"])):(0,t.Q3)("",!0),(0,t.Lk)("div",Ue,[a.hasNotShippableJobs?((0,t.uX)(),(0,t.CE)("div",We,[(0,t.Lk)("div",{innerHTML:a.unshippableProductNotificationMessage},null,8,$e)])):(0,t.Q3)("",!0)]),(0,t.Lk)("div",Xe,[e.isLoading?((0,t.uX)(),(0,t.CE)("div",ze,[(0,t.bF)(l,{variant:"primary",class:"spinner",label:"Spinning"})])):((0,t.uX)(),(0,t.CE)("div",je,[(0,t.Lk)("div",He,[(0,t.eW)((0,t.v_)(e.getDictionaryVoice("addresses","label-shipping-incorrect"))+" ",1),i[2]||(i[2]=(0,t.Lk)("br",null,null,-1)),(0,t.bo)((0,t.Lk)("a",{class:(0,t.C4)(["btn-link",{disable:d.searchShippingAddressVisible}]),onClick:i[0]||(i[0]=(...e)=>a.toggleSearchShipping&&a.toggleSearchShipping(...e))},(0,t.v_)(e.getDictionaryVoice("addresses","select_registered_address")),3),[[t.aG,s.shippingOptions.length>1]])]),(0,t.bF)(c,{"loqate-api-key":e.loqateApiKey,"enabled-fields":e.enabledShippingFields,"country-list":s.countryList,"provinces-list":s.provincesList,"country-code":s.countryCode,"can-close-form":s.shippingOptions.length>0,"show-header":0!==s.shippingOptions.length,"open-form":0===s.shippingOptions.length,"search-address-visible":d.searchShippingAddressVisible,onToggleNewForm:a.onToggleNewForm,onUpdateAddresses:a.onAddedShippingAddresses},null,8,["loqate-api-key","enabled-fields","country-list","provinces-list","country-code","can-close-form","show-header","open-form","search-address-visible","onToggleNewForm","onUpdateAddresses"])]))]),(0,t.bo)((0,t.bF)(p,{class:"search-shipping-address",shippingOptions:s.shippingOptions,onSetAddress:a.onSetAddress,"selected-address-id":a.selectedAddressId,onClose:i[1]||(i[1]=()=>d.searchShippingAddressVisible=!1)},null,8,["shippingOptions","onSetAddress","selected-address-id"]),[[t.aG,d.searchShippingAddressVisible]]),(0,t.Lk)("div",Qe,[(0,t.bo)((0,t.Lk)("div",{class:"alert alert-danger",ref:"alert-shipping"},(0,t.v_)(e.getValidationMessage("shippingAddress")),513),[[t.aG,e.hasValidationMessage("shippingAddress")]])])])):!e.isUserShippingAddressSelected&&e.isPickupPointsEnabled?((0,t.uX)(),(0,t.CE)("div",Ke,[(0,t.bF)(u,{"google-maps-api-key":e.googleMapApiKey,"pickup-point-address":e.pickupPointAddress,"pickup-points-restrictions":e.pickupPointsRestrictions,"customer-validation-messages":s.customerValidationMessages,onCustomerInformationChanged:a.onPickupPointCustomerInformationChanged,onSelectedPickupPoint:a.onSelectedPickupPoint,onResetPickupAddress:a.onResetPickupAddress},null,8,["google-maps-api-key","pickup-point-address","pickup-points-restrictions","customer-validation-messages","onCustomerInformationChanged","onSelectedPickupPoint","onResetPickupAddress"]),(0,t.Lk)("div",Je,[(0,t.bo)((0,t.Lk)("div",{class:"alert alert-danger",ref:"alert-shipping"},(0,t.v_)(e.getValidationMessage("shippingAddress")),513),[[t.aG,e.hasValidationMessage("shippingAddress")]])])])):(0,t.Q3)("",!0),a.hasNotShippableJobs?((0,t.uX)(),(0,t.Wv)(h,{key:3,"not-shippable-jobs":d.notShippableJobs,"country-to-ship":d.countryToShip},null,8,["not-shippable-jobs","country-to-ship"])):(0,t.Q3)("",!0)])}],["__scopeId","data-v-489b877a"]]),xs={class:"billing addresses-container","data-test":"billing-addresses-container"},Os={key:0,class:"billing-addresses-header"},Es={class:"section-title billing"},Ms={key:0},Is={class:"col-12 div-alert"};var Fs=s(438);const Ts=["innerHTML"],Rs={class:"address-btns"},Ds={class:"billing"},qs={class:"search-btn billing-search col-12 col-md-6"};const Gs={name:"PaginatedBillingAddresses",components:{FilteredAddresses:Di,PaginatedAddresses:Ii,AddressesSearchBar:Si,RecapItem:vi},props:{billingOptions:{type:Array,required:!0},countryList:{type:Array,required:!0},showViesWarning:{type:Boolean,required:!1,default:!1},viesWarningText:{type:String,required:!1,default:""},selectedAddressId:{required:!1},onSetAddress:{type:Function,required:!0},currentShippingCountryCode:{type:String,required:!0}},data:()=>({searchBilling:""}),computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"])}},Ns=(0,Te.A)(Gs,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("addresses-search-bar"),o=(0,t.g2)("recap-item"),l=(0,t.g2)("paginated-addresses"),c=(0,t.g2)("filtered-addresses");return(0,t.uX)(),(0,t.CE)("div",null,[(0,t.Lk)("div",{class:"section-title-address",innerHTML:e.getDictionaryVoice("addresses","order_header")},null,8,Ts),(0,t.Lk)("div",Rs,[(0,t.Lk)("div",Ds,[(0,t.bo)((0,t.Lk)("div",qs,[(0,t.bF)(r,{modelValue:d.searchBilling,"onUpdate:modelValue":i[0]||(i[0]=e=>d.searchBilling=e),"is-shown":s.billingOptions.length>1},null,8,["modelValue","is-shown"])],512),[[t.aG,s.billingOptions.length>=1]]),(0,t.RG)(e.$slots,"default",{},void 0,!0)])]),(0,t.bo)((0,t.Lk)("div",null,[(0,t.bF)(c,{addresses:s.billingOptions,"search-text-filter":d.searchBilling,"current-shipping-country-code":s.currentShippingCountryCode,"country-list":s.countryList,"selected-address-id":s.selectedAddressId,"addresses-type":"billing",class:"search-billing-address"},{default:(0,t.k6)(({filteredAddresses:e})=>[(0,t.bF)(l,{addresses:e},{default:(0,t.k6)(({paginatedAddresses:e})=>[((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(e,(e,i)=>((0,t.uX)(),(0,t.Wv)(o,{key:e.id,item:e,type:"billing","display-warning":0===i&&!0===s.showViesWarning,"selected-address":e.id===s.selectedAddressId,"vies-warning-text":s.viesWarningText,onSetAddress:s.onSetAddress},null,8,["item","display-warning","selected-address","vies-warning-text","onSetAddress"]))),128))]),_:1},8,["addresses"])]),_:1},8,["addresses","search-text-filter","current-shipping-country-code","country-list","selected-address-id"])],512),[[t.aG,s.billingOptions.length>=1]])])}],["__scopeId","data-v-0306a972"]]),Us={name:"RecapBillingMethods",emits:["invoice-yes","invoice-no","billing-address-changed","billing-addresses-added"],mixins:[fe.A],components:{TableNewBillingAddress:Fs.A,PaginatedBillingAddresses:Ns,ToggleButtonInvoice:(0,t.$V)(()=>
1Promise.all([s.e(9776),s.e(588)]).then(s.bind(s,54115)))},props:{customerValidationMessages:{type:Object,required:!1},explicitlyRequestForBillingAddressSelection:{type:Boolean,required:!0},billingOptions:{type:Array,required:!0},selectedBillingAddressId:{type:Array,required:!1},currentShippingCountryCode:{type:String,required:!0},countryList:{type:Array,required:!0},initialBillingAddressUponCreation:{type:Object,required:!1,default:null},hideBillingAddressesHeader:{type:Boolean,required:!1,default:!1}},data:()=>({validationMessages:{},searchBillingAddressVisible:!0,newBillingFormOpen:!1}),computed:{...(0,n.L8)("dictionary",["getDictionaryVoice"]),...(0,n.L8)("recap",["loqateApiKey"]),...(0,n.L8)("recap/recapBilling",["isViesWarningShown","viesWarningText","enabledBillingFields","viesLinks","vatIdPrefixes","userCategory","isScrolling","invoice"])},methods:{scrollToDiv:be.A,...(0,n.i0)({editViesWarningText:"recap/recapBilling/editViesWarningText",setViesWarningVisibility:"recap/recapBilling/setViesWarningVisibility",toggleOnInvoiceButton:"recap/recapBilling/toggleOnInvoiceButton",toggleOffInvoiceButton:"recap/recapBilling/toggleOffInvoiceButton"}),onOpenForm(){this.toggleOnInvoiceButton()},onCloseForm(){this.toggleOffInvoiceButton()},onViesWarningUpdate(e){this.editViesWarningText(e)},onSetAddress(e,i){this.$emit("billing-address-changed",e,i)},onToggleNewFormBilling(e){!0===e&&(this.searchBillingAddressVisible=!1,this.resetBillingAddressFields())},resetBillingAddressFields(){this.newBillingFormOpen=!1,this.newBillingAddressModel={id:"",firstName:"",lastName:"",country:"",streetName:"",postalCode:"",city:"",phone:"",mobile:"",addressType:"billingAddresses"}},onAddedBillingAddresses(e){const{responseAddresses:i,showViesWarning:s}=e,t=Object.keys(i).length>Object.keys(this.billingOptions).length;this.setViesWarningVisibility((t&&s)??!1),this.newBillingFormOpen=!1,this.$emit("billing-addresses-added",e)}},watch:{customerValidationMessages(e){this.validationMessages={...e}},isScrolling(e){e&&this.$nextTick(()=>{this.$refs["alert-billing"].scrollIntoView({behavior:"smooth"})})}}},Ws=(0,Te.A)(Us,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("toggle-button-invoice"),o=(0,t.g2)("table-new-billing-address"),l=(0,t.g2)("paginated-billing-addresses");return(0,t.uX)(),(0,t.CE)("div",xs,[s.hideBillingAddressesHeader?(0,t.Q3)("",!0):((0,t.uX)(),(0,t.CE)("div",Os,[(0,t.Lk)("div",Es,(0,t.v_)(e.getDictionaryVoice("addresses","fatturazione")),1),s.explicitlyRequestForBillingAddressSelection?(0,t.Q3)("",!0):((0,t.uX)(),(0,t.CE)("div",Ms,[(0,t.bF)(r,{invoice:e.invoice,onOpenForm:a.onOpenForm,onCloseForm:a.onCloseForm},null,8,["invoice","onOpenForm","onCloseForm"])]))])),e.invoice||s.explicitlyRequestForBillingAddressSelection?((0,t.uX)(),(0,t.Wv)(l,{key:1,billingOptions:s.billingOptions,"country-list":s.countryList,showViesWarning:e.isViesWarningShown,viesWarningText:e.viesWarningText,selectedAddressId:s.selectedBillingAddressId,onSetAddress:a.onSetAddress,currentShippingCountryCode:s.currentShippingCountryCode},{default:(0,t.k6)(()=>[(0,t.bF)(o,{"init-address":s.initialBillingAddressUponCreation,"loqate-api-key":e.loqateApiKey,"country-list":s.countryList,"country-code":s.currentShippingCountryCode,"enabled-fields":e.enabledBillingFields,"can-close-form":!e.invoice,"open-form":e.invoice&&0===s.billingOptions.length,"show-header":s.billingOptions.length>=1,"search-address-visible":d.searchBillingAddressVisible,"is-country-enabled":s.countryList.length>1,"vies-links":e.viesLinks,"vat-id-prefixes":e.vatIdPrefixes,onViesWarningTextUpdated:a.onViesWarningUpdate,onToggleNewForm:a.onToggleNewFormBilling,onUpdateAddresses:a.onAddedBillingAddresses,"user-category":e.userCategory},null,8,["init-address","loqate-api-key","country-list","country-code","enabled-fields","can-close-form","open-form","show-header","search-address-visible","is-country-enabled","vies-links","vat-id-prefixes","onViesWarningTextUpdated","onToggleNewForm","onUpdateAddresses","user-category"])]),_:1},8,["billingOptions","country-list","showViesWarning","viesWarningText","selectedAddressId","onSetAddress","currentShippingCountryCode"])):(0,t.Q3)("",!0),(0,t.Lk)("div",Is,[(0,t.bo)((0,t.Lk)("div",{class:"alert alert-danger",ref:"alert-billing"},(0,t.v_)(e.getValidationMessage("billingAddress")),513),[[t.aG,e.hasValidationMessage("billingAddress")]])])])}],["__scopeId","data-v-44dfcc77"]]);var $s=s(95813);const Xs={props:{validateCart:{type:Function,required:!0},defaultShippingAddress:{type:[Object,Array],required:!1},defaultBillingAddress:{type:[Object,Array],required:!1},billingAddress:{type:[Object,Array],required:!0},shippingAddresses:{type:[Object,Array],required:!0}
1,validateCartAndCheckout:{type:Function,required:!0},isPixartpro:{type:Boolean,required:!1},displayVatAmount:{type:Boolean,required:!0,default:!0},displayShippingAmount:{type:Boolean,required:!0,default:!0},ppWallet:{type:[Object,Array],required:!1},validationError:{type:Boolean,required:!1},showEmptyShippingPrice:{type:Boolean,required:!1,default:!1},allowedShippingCountries:{type:Array,required:!0},validateCartOnAddressSelection:{type:Function,required:!0},taxValidationAddressSelection:{type:Boolean,required:!0,default:!1},loaderFromValidation:{type:Boolean}},components:{CheckoutSteps:$s.A,RecapBillingMethods:Ws,RecapShippingMethods:ws,BSpinner:ke._,TermsAndConditions:Re,Checkbox:Ie.A,CheckoutNewRecap:(0,t.$V)(()=>Promise.all([s.e(3267),s.e(4819),s.e(5618),s.e(1592)]).then(s.bind(s,54514))),SummaryRecap:(0,t.$V)(()=>Promise.all([s.e(3874),s.e(3267),s.e(9830),s.e(3569),s.e(6726)]).then(s.bind(s,13758)))},mixins:[fe.A],data(){return{shippingOptions:[],billingOptions:[],selectedShippingAddress:null,selectedBillingAddress:null,shippingAddressesModel:{...this.shippingAddresses},billingAddressesModel:{...this.billingAddress},addressModel:{},addressSource:{},billingAddressModel:{...this.billingAddress},ppActive:this.ppWallet?.active||!1,ppBalance:this.ppWallet?.balance||0,checkoutWorking:!1,cartPointsLoaded:!1,simulatePromoErrors:!1,checkoutInProgress:!1}},computed:{mstPrd:()=>window.mstPrd,isBillingAddressSet(){return""!==this.addressId.billing&&void 0!==this.addressId.billing},isShippingAddressSet(){return""!==this.addressId.shipping},addressId(){const e=this.selectedShippingAddress?this.selectedShippingAddress.id:"";return{shipping:e,billing:this.selectedBillingAddress?this.selectedBillingAddress.id:"",ghost:this.invoice?"":e}},pixartproDataLoaded(){return this.ppActive&&!(0,Le.A)(this.ppBalance)&&this.cartPointsLoaded},currentShippingCountryCode(){if(this.isUserShippingAddressSelected){if(this.selectedShippingAddress&&(0,Ve.A)(this.selectedShippingAddress.country))return this.selectedShippingAddress.country}else if(this.pickupPointAddress&&(0,Ve.A)(this.pickupPointAddress.country))return this.pickupPointAddress.country;return this.countryCode},explicitlyRequestForBillingAddressSelection(){return!this.isUserShippingAddressSelected||(this.mandatoryInvoiceCountryList[this.selectedShippingAddress?.country]??[]).includes(this.selectedShippingAddress?.postalCode)},...(0,n.L8)("cart",{totalAmountAllTaxIncluded:"totalAmountAllTaxIncluded",validationPending:"validationPending",validationOnLoadCompleted:"validationOnLoadCompleted",willPerformValidationOnLoad:"willPerformValidationOnLoad",cartShippingAddress:"shippingAddress",cartBillingAddress:"billingAddress",lineItems:"lineItems"}),...(0,n.L8)("dictionary",["getDictionaryVoice"]),...(0,n.L8)("links",["thankYouPageLink","cartLink"]),...(0,n.L8)("cart",["allJobsList","internalCheckout","skipDocReview","simulatePromoErrors"]),...(0,n.L8)("recap",["countryCode","shippingCountryList","billingCountryList","provincesList","customSender","getCustomSenderErrors","getPickupPointErrors","isCustomSenderSet","googleMapApiKey","loqateApiKey","pickupPointAddress","isPickupPointSelected","isLoading","isUserReseller","mandatoryInvoiceCountryList","isUserShippingAddressSelected","invoice","termsAccepted","isCheckoutDisabled"]),...(0,n.L8)("recap/recapShipping",["isSenderCustomizationShown","isCustomSenderAllowedToChange"]),...(0,n.L8)("experience",["experimentData","getVariation"]),isCheckoutNewRecap(){return"new_cart"===this.getVariation("checkout_new_cart")}},methods:{...(0,n.i0)({startLoading:"recap/loadingStarted",stopLoading:"recap/loadingEnded",toggleOnInvoiceButton:"recap/recapBilling/toggleOnInvoiceButton",enableCheckout:"recap/enableCheckout",disableCheckout:"recap/disableCheckout",updateCountryCode:"recap/updateCountryCode"}),scrollToDiv:be.A,updateProductRecommenderMetrics:Be.A,updateRecommenderMetricsForOnlyOneItem(){const e=this.lineItems.filter(e=>(0,Ve.A)(e?.merchantInfo?.recommendationId)),[i]=e,s=i?.merchantInfo?.recommendationId;if(s){const e=i?.merchantInfo.pageId,t=i?.price;this.updateProductRecommenderMetrics("ordered",s,e,t)}},async completeCheckout(e){Ae.A.log("completeCheckout",e),(0,Pe.A)(e?.status)||"failure"!==e.status?(this.updateRecommenderMetricsForOnlyOneItem(),await this.$store.dispatch("cart/clearSelectedPickupPoint"),this.$emit("resetPickupAddress"),window.location.href=this.thankYouPageLink):(this.goToRecapWorking=!1,this.enableCheckout())},async proceedWithCheckout(){if(!this.checkoutInProgress){this.checkoutInProgress=!0;try{this.checkoutWorking=!0,Ae.A.log("RecapAddresses.validateCartAndCheckout"),await this.validateCartAndCheckout({modalTarget:"checkout",parameters:{address:this.addressId,senderType:this.customSender.senderType,customSender:this.customSender,noInvoice:!this.invoice,pickupPointAddress:this.isUserShippingAddressSelected?null:this.pickupPointAddress,experimentData:this.experimentData,internalCheckout:this.internalCheckout,skipDocReview:this.skipDocReview,simulatePromoErrors:this.simulatePromoErrors},completedAction:this.completeCheckout})}finally{this.checkoutInProgress=!1}}},async checkoutOrder(){this.clearValidationMessages(),this.checkShippingAddress()&&(this.isUserShippingAddressSelected&&(await this.$store.dispatch("cart/clearSelectedPickupPoint"),this.$emit("resetPickupAddress")),this.checkPickupPoint()&&this.checkCustomSender()&&this.checkBillingAddress()&&this.checkTerms()&&await this.proceedWithCheckout())},getFilteredShippingAddresses(e,i){return this.allowedShippingCountries.includes("*")?e:Object.fromEntries(Object.entries(e).filter(([e,s])=>i.includes(s.country)))},setupSelectOptionsShipping(e,i){const s=this.getFilteredShippingAddresses(e,this.allowedShippingCountries);
1Object.keys(s).forEach((s,t)=>{i[t]=[],i[t]={...i[t],value:t,id:s,firstName:e[s].firstName,lastName:e[s].lastName,streetName:e[s].streetName,company:e[s].company,postalCode:e[s].postalCode,city:e[s].city,state:e[s].state,country:e[s].country,phone:e[s].phone,mobile:e[s].mobile,region:e[s].region}})},setupSelectOptionsBilling(e,i){Object.keys(e).forEach((s,t)=>{i[t]=[],i[t]={...i[t],value:t,id:s,firstName:e[s].firstName,lastName:e[s].lastName,streetName:e[s].streetName,company:e[s].company,postalCode:e[s].postalCode,city:e[s].city,state:e[s].state,country:e[s].country,phone:e[s].phone,mobile:e[s].mobile,vatid:e[s].vatid,siren:e[s].siren,codiceFiscale:e[s].codiceFiscale,utr:e[s].utr,nif:e[s].nif,region:e[s].region,invoiceCycle:e[s].invoiceCycle,exemptionCategories:e[s].exemptionCategories,addressesCategoriesTags:e[s].addressesCategoriesTags}})},onSetAddress(e,i,s=!1){"billing"===i?(this.clearValidationMessages(),this.selectedBillingAddress=this.billingOptions.find(i=>i.id===e)):"shipping"===i&&(this.selectedShippingAddress=this.shippingOptions.find(i=>i.id===e),this.updateBillingAddressAvailability(),this.explicitlyRequestForBillingAddressSelection&&this.toggleOnInvoiceButton(),this.isShippingAddressSet&&this.taxValidationAddressSelection&&this.validateCartOnAddressSelection({modalTarget:"same-page",parameters:{address:this.addressId,noInvoice:!this.invoice,validationType:"tax_only"},isFirstShippingAddressCreated:s}))},onAddedShippingAddresses(e){const{responseAddresses:i}=e;this.clearValidationMessages(),this.shippingAddressesModel=i;const s=0===this.shippingOptions.length;this.setupSelectOptionsShipping(i,this.shippingOptions),this.onSetAddress(this.shippingOptions[this.shippingOptions.length-1].id,"shipping",s),this.isPixartpro&&this.ppActive&&this.enablePixartpro(),(0,Se.A)("Saved New Shipping Address","add_shipping",{})},onAddedBillingAddresses(e){const{responseAddresses:i}=e;this.clearValidationMessages(),this.billingAddressesModel=i,this.setupSelectOptionsBilling(i,this.billingOptions),this.onSetAddress(this.billingOptions[this.billingOptions.length-1].id,"billing"),this.isPixartpro&&this.ppActive&&this.enablePixartpro()},onUpdateSelectedAddress(e,i){this.clearValidationMessages(),"billing"===i?this.billingOptions=this.processUpdateSelectedAddress(this.billingOptions,e):"shipping"===i&&(this.shippingOptions=this.processUpdateSelectedAddress(this.shippingOptions,e),this.selectedShippingAddress?.id===e.id&&(this.selectedShippingAddress={...this.selectedShippingAddress,...e})),this.isPixartpro&&this.ppActive&&this.enablePixartpro()},processUpdateSelectedAddress:(e,i)=>e.map(e=>e.id===i.id?{...e,...i}:e),updateCartStore(e){this.cartPointsLoaded=!0;const{is_pixart_pro_enabled:i,total_cart_vat:s,total_cart_points:t,details:n}=e,d=i?t:0;
1this.$store.dispatch("cart/updatePixartpro",{vatAmountPixartPro:s,pixartProTotalPoints:t,pixartProActivePrice:d,isPixartProEnabled:i,pixartProDetails:n})},enablePixartpro(){axios.post("/pixartpro/toggle/",{enabled:1}).then(e=>{const{data:i}=e;"failure"===i.status?Ae.A.log("pixartpro error"):(Ae.A.log("use PixartPro",i),this.updateCartStore(i))})},updateBillingAddressAvailability(){(this.isUserShippingAddressSelected&&this.selectedBillingAddress&&this.selectedShippingAddress&&this.selectedBillingAddress.country!==this.selectedShippingAddress.country||!this.isUserShippingAddressSelected&&this.selectedBillingAddress&&this.isPickupPointSelected&&this.selectedBillingAddress.country!==this.pickupPointAddress.country)&&(this.selectedBillingAddress=null)},setupSelectedAddresses(){const e=this.cartShippingAddress??this.defaultShippingAddress,i=this.cartBillingAddress??this.defaultBillingAddress;e&&(this.selectedShippingAddress=this.shippingOptions.find(i=>i.id===e.id)??(1===this.shippingOptions.length?this.shippingOptions.at(0):null)),i&&(this.selectedBillingAddress=this.billingOptions.find(e=>e.id===i.id))},checkCustomSender(){if("custom"===this.customSender.senderType&&!this.isCustomSenderSet){console.log({senderType:this.customSender.senderType,isCustomSenderSet:this.isCustomSenderSet,errors:this.getCustomSenderErrors}),this.updateValidationMessages({customSenderAddress:this.getDictionaryVoice("addresses","no_mittente_selected")});const e=this.getCustomSenderErrors;return(0,_e.A)(e)||(this.updateValidationMessages(e),this.$store.dispatch("recap/customSender/triggerScrollTo")),!1}return!0},checkBillingAddress(){return!(!0===this.invoice&&!this.isBillingAddressSet)||(this.updateValidationMessages({billingAddress:this.getDictionaryVoice("addresses","no_billing_selected")}),this.$store.dispatch("recap/recapBilling/triggerScrollTo"),!1)},checkTerms(){return!!this.termsAccepted||(this.$store.dispatch("recap/terms/showErrorMessage"),this.$nextTick(()=>{this.$refs.terms.$el.scrollIntoView({behavior:"smooth"})}),!1)},checkPickupPoint(){if(!this.isUserShippingAddressSelected){const e=this.getPickupPointErrors;if(!(0,_e.A)(e))return this.updateValidationMessages(e),this.$store.dispatch("recap/recapShipping/triggerScrollTo"),!1}return!0},checkShippingAddress(){return!(!this.isShippingAddressSet&&this.isUserShippingAddressSelected)||(this.updateValidationMessages({shippingAddress:this.getDictionaryVoice("addresses","no_dest_selected")}),this.$store.dispatch("recap/recapShipping/triggerScrollTo"),!1)},hasNotShippableJobs(e){e?this.disableCheckout():this.enableCheckout()},updateSimulatePromoErrors(e){this.simulatePromoErrors=e},onModalValidationCompleteCheckout(){this.proceedWithCheckout()},onModalValidationExitClicked(){window.location.reload()}},watch:{validationPending(e){this.checkoutWorking?this.disableCheckout():this.willPerformValidationOnLoad?this.validationOnLoadCompleted&&(e?this.disableCheckout():this.enableCheckout()):this.willPerformValidationOnLoad||(e?this.disableCheckout():this.enableCheckout())},validationError(e){!0===e&&(this.checkoutWorking=!1,this.enableCheckout(),this.stopLoading())},isUserShippingAddressSelected(){this.updateBillingAddressAvailability()},currentShippingCountryCode(e){this.updateCountryCode(e)}},created(){Ce.A.$on("modal-validation-complete-checkout",this.onModalValidationCompleteCheckout),Ce.A.$on("modal-validation-exit-clicked",this.onModalValidationExitClicked),this.isPixartpro&&this.ppActive&&this.enablePixartpro()},mounted(){this.setupSelectOptionsShipping(this.shippingAddressesModel,this.shippingOptions),this.setupSelectOptionsBilling(this.billingAddressesModel,this.billingOptions),this.setupSelectedAddresses(),this.updateBillingAddressAvailability(),this.explicitlyRequestForBillingAddressSelection&&this.toggleOnInvoiceButton(),this.willPerformValidationOnLoad&&this.disableCheckout(),this.$store.dispatch("preference/setShowCurrencySelectorForPage",!0)},beforeUnmount(){Ce.A.$off("modal-validation-complete-checkout",this.onModalValidationCompleteCheckout),Ce.A.$off("modal-validation-exit-clicked",this.onModalValidationExitClicked)}},zs={name:"RecapAddresses",extends:Xs,props:{hideSenderOptions:{type:Boolean,required:!1,default:!1}},components:{ToggleButtonInvoice:(0,t.$V)(()=>
1Promise.all([s.e(9776),s.e(588)]).then(s.bind(s,54115))),SenderCustomization:(0,t.$V)(()=>Promise.all([s.e(5411),s.e(5503)]).then(s.bind(s,43280)))},data:()=>({activeGuidedStep:null,completedGuidedSteps:[],isTermsErrorVisible:!1,billingValidationErrorVisible:!1,shippingValidationErrorVisible:!1,senderValidationErrorVisible:!1}),computed:{guidedStepOrder(){const e=["shipping"];return this.isSenderCustomizationShown&&e.push("sender"),e.push("billing"),e},shippingStepRecap(){if(!this.isGuidedStepReady("shipping"))return"";const e=this.isUserShippingAddressSelected?this.selectedShippingAddress:this.pickupPointAddress;if(!e)return"";const i=[e.firstName,e.lastName].filter(Boolean).join(" "),s=[e.name,e.company,i].filter(Boolean).join(" - "),t=[e.postalCode,e.city].filter(Boolean).join(" ");return[s,e.streetName,t,this.getDictionaryVoice("countries",`country_${e.country}`)].filter(Boolean).join(", ")},senderStepRecap(){return this.isSenderCustomizationShown?this.isPixartOnlySenderMode?this.getDictionaryVoice("addresses","pixartprinting"):"custom"===this.customSender.senderType?this.customSender.name||"":"pixart"===this.customSender.senderType?"Pixartprinting":this.customSender.senderType:""},isBillingStepExpanded(){return this.isGuidedStepActive("billing")&&(this.invoice||this.explicitlyRequestForBillingAddressSelection)},showBillingToggle(){return this.isUserShippingAddressSelected},isPickupPointFlow(){return!this.isUserShippingAddressSelected},isPixartOnlySenderMode(){return this.isPickupPointFlow||this.hideSenderOptions},showBillingInlineDetails(){return Boolean(this.billingRecapAddress)},normalizedBillingCountryList(){return(this.billingCountryList||[]).map(e=>this.normalizeCountryCode(e))},hasCompatibleDefaultBillingAddress(){const e=this.normalizeCountryCode(this.defaultBillingAddress?.country);return this.normalizedBillingCountryList.includes(e)},billingRecapAddress(){if(!this.invoice)return null;if(this.selectedBillingAddress){const e=this.normalizeCountryCode(this.selectedBillingAddress.country);return this.normalizedBillingCountryList.includes(e)?this.selectedBillingAddress:null}return this.completedGuidedSteps.includes("billing")?this.initialBillingAddressUponCreation:!this.completedGuidedSteps.length&&this.hasCompatibleDefaultBillingAddress&&this.defaultBillingAddress||null},showPickupPointBillingEdit(){return this.isPickupPointFlow&&this.invoice&&!this.showBillingInlineDetails},initialBillingAddressUponCreation(){return this.isUserShippingAddressSelected?this.selectedShippingAddress:null},hasInitialBillingAddressCandidate(){return Boolean(this.isUserShippingAddressSelected&&this.selectedShippingAddress)},hasShippingAddressBookEntries(){return Object.keys(this.shippingAddressesModel).length>0},hasBillingAddressBookEntries(){return Object.keys(this.billingAddressesModel).length>0},showBillingValidationError(){return Boolean(this.validationMessages.addressValidation&&this.billingValidationErrorVisible)},isBillingAddressCreationRequired(){return this.invoice&&0===this.billingOptions.length&&!this.selectedBillingAddress&&!this.hasCompatibleDefaultBillingAddress},shouldHideBillingFooterButtons(){return this.isBillingStepExpanded&&this.isBillingAddressCreationRequired},isNewCustomer(){return!(this.hasShippingAddressBookEntries||this.hasBillingAddressBookEntries||this.defaultShippingAddress||this.defaultBillingAddress||this.cartShippingAddress||this.cartBillingAddress)},shippingShowAlert(){return this.validationMessages.addressValidation&&this.shippingValidationErrorVisible},guidedBillingValidationMessages(){const{billingAddress:e,...i}=this.validationMessages;return i},...(0,n.L8)("experience",["experimentData"])},methods:{isEmpty:_e.A,...(0,n.i0)({patchCustomSender:"recap/customSender/patch",toggleOffInvoiceButton:"recap/recapBilling/toggleOffInvoiceButton"}),ensurePickupPointSenderType(){this.isPixartOnlySenderMode&&"pixart"!==this.customSender.senderType&&this.patchCustomSender({senderType:"pixart"})},showNonValidAddressError(){this.updateValidationMessages({addressValidation:this.getDictionaryVoice("addresses","address_msg_alert")})},areGuidedPrerequisitesReady(e){const i=this.guidedStepOrder.indexOf(e);if(i<=0)return!0;return this.guidedStepOrder.slice(0,i).every(e=>this.isGuidedStepReady(e))},isGuidedStepActive(e){return this.activeGuidedStep===e},isGuidedStepReady(e){return"shipping"===e?this.isUserShippingAddressSelected?this.isShippingAddressSet:this.isPickupPointSelected&&(0,_e.A)(this.getPickupPointErrors):this.checkPickupPoint()?"sender"===e?"custom"!==this.customSender.senderType||this.isCu
1stomSenderSet:"billing"===e&&(!this.invoice||(this.isBillingAddressSet||this.hasCompatibleDefaultBillingAddress)):(this.shippingValidationErrorVisible=!0,this.showNonValidAddressError(),void(this.activeGuidedStep=null))},initializeGuidedFlow(){this.completedGuidedSteps=[],this.isNewCustomer?this.activeGuidedStep=this.guidedStepOrder[0]:this.activeGuidedStep=null},openGuidedStep(e){const i=this.guidedStepOrder.indexOf(e);if(-1!==i){if(this.activeGuidedStep&&this.activeGuidedStep!==e)this.isGuidedStepReady(this.activeGuidedStep)?(this.clearValidationMessages(),this.shippingValidationErrorVisible=!1,this.billingValidationErrorVisible=!1,this.senderValidationErrorVisible=!1):(this.showNonValidAddressError(),this.shippingValidationErrorVisible="shipping"===this.activeGuidedStep,this.billingValidationErrorVisible="billing"===this.activeGuidedStep,this.senderValidationErrorVisible="sender"===this.activeGuidedStep);else{"shipping"===e&&this.shippingValidationErrorVisible||(this.clearValidationMessages(),this.shippingValidationErrorVisible=!1,this.billingValidationErrorVisible=!1,this.senderValidationErrorVisible=!1)}this.activeGuidedStep=e,this.completedGuidedSteps=this.completedGuidedSteps.filter(e=>this.guidedStepOrder.indexOf(e)<i)}},onOpenBillingStep(){if(this.hasInitialBillingAddressCandidate)return this.clearValidationMessages(),this.billingValidationErrorVisible=!1,this.shippingValidationErrorVisible=!1,this.toggleOnInvoiceButton(),void this.openGuidedStep("billing");this.areGuidedPrerequisitesReady("billing")?(this.clearValidationMessages(),this.shippingValidationErrorVisible=!1,this.billingValidationErrorVisible=!1):(this.showNonValidAddressError(),this.shippingValidationErrorVisible=!0,this.billingValidationErrorVisible=!1),this.toggleOnInvoiceButton(),this.openGuidedStep("billing")},onCloseBillingStep(){this.toggleOffInvoiceButton(),this.billingValidationErrorVisible=!1,this.clearValidationMessages(),this.activeGuidedStep=null,this.completedGuidedSteps=this.completedGuidedSteps.filter(e=>"billing"!==e)},goBackGuidedStep(e){const i=this.guidedStepOrder.indexOf(e);if(i<=0)return;const s=this.guidedStepOrder[i-1];this.activeGuidedStep=s,this.billingValidationErrorVisible=!1,this.shippingValidationErrorVisible=!1,this.clearValidationMessages(),this.completedGuidedSteps=this.completedGuidedSteps.filter(e=>this.guidedStepOrder.indexOf(e)<i),this.toggleOffInvoiceButton()},confirmGuidedStep(e){if(!this.isGuidedStepReady(e)){if(this.billingValidationErrorVisible="billing"===e,this.shippingValidationErrorVisible="shipping"===e,this.senderValidationErrorVisible="sender"===e,"shipping"===e&&!this.isUserShippingAddressSelected){const e=this.getPickupPointErrors;(0,_e.A)(e)||this.updateValidationMessages(e)}return this.showNonValidAddressError(),"billing"===e&&(this.activeGuidedStep="billing"),"shipping"!==e&&"sender"!==e||(this.activeGuidedStep=null),void("billing"===e&&this.$nextTick(()=>{"function"==typeof this.$refs.terms?.$el?.scrollIntoView&&this.$refs.terms.$el.scrollIntoView({behavior:"smooth",block:"start"})}))}this.clearValidationMessages(),this.billingValidationErrorVisible=!1,this.shippingValidationErrorVisible=!1,this.senderValidationErrorVisible=!1,this.completedGuidedSteps.includes(e)||(this.completedGuidedSteps=[...this.completedGuidedSteps,e]);const i=this.guidedStepOrder.indexOf(e),s=this.guidedStepOrder[i+1]??null;this.activeGuidedStep=s,"billing"===e&&null===s&&this.$nextTick(()=>{"function"==typeof this.$refs.terms?.$el?.scrollIntoView&&this.$refs.terms.$el.scrollIntoView({behavior:"smooth",block:"start"})})},onSetAddress(e,i,s=!1){const t=this.normalizeCountryCode(this.currentShippingCountryCode);if("billing"===i&&(this.billingValidationErrorVisible=!1),"shipping"===i&&(this.shippingValidationErrorVisible=!1),Xs.methods.onSetAddress.call(this,e,i,s),"shipping"===i){const e=this.normalizeCountryCode(this.currentShippingCountryCode);this.resetBillingRecapIfShippingCountryChanged(t,e)}},checkBillingAddress(){return!(!0===this.invoice&&!this.isBillingAddressSet)||(this.updateValidationMessages({billingAddress:this.getDictionaryVoice("addresses","no_billing_selected")}),!1)},async checkoutOrder(){return this.clearValidationMessages(),this.billingValidationErrorVisible=!1,this.shippingValidationErrorVisible=!1,this.checkShippingAddress()?(this.isUserShippingAddressSelected&&(await this.$store.dispatch("cart/clearSelectedPickupPoint"),this.$emit("resetPickupAddress")),this.checkPickupPoint()?this.checkCustomSender()?(this.reconcileBillingSelectionBeforeValidation(),this.checkBillingAddress()?void(this.checkTerms()?(this.isTermsErrorVisible=!1,await this.proceedWithCheckout()):this.isTermsErrorVisible=!0):(this.billingValidationErrorVisible=!0,this.shippingValidationErrorVisible=!1,this.showNonValidAddressError(),void(this.activeGuidedStep="billing"))):(this.senderValidationErrorVisible=!0,void this.showNonValidAddressError()):(this.shippingValidationErrorVisible=!0,this.showNonValidAddressError(),void(this.activeGuidedStep="shipping"))):(this.shippingValidationErrorVisible=!0,this.showNonValidAddressError(),void(this.activeGuidedStep="shipping"))},onShippingAddressUpdated(e){const i=this.normalizeCountryCode(this.currentShippingCountryCode);this.onUpdateSelectedAddress(e,"shipping");const s=this.normalizeCountryCode(this.currentShippingCountryCode);this.resetBillingRecapIfShippingCountryChanged(i,s)},normalizeCountryCode:e=>e?String(e).toUpperCase():"",restoreBillingSelectionFromCompatibleDefault(){if
1(this.selectedBillingAddress||!this.hasCompatibleDefaultBillingAddress||!this.defaultBillingAddress?.id)return;const e=String(this.defaultBillingAddress.id),i=this.billingOptions.find(i=>String(i.id)===e);i&&(this.selectedBillingAddress=i)},resetBillingRecapIfShippingCountryChanged(e,i){e&&i&&e!==i&&(this.selectedBillingAddress=null,this.billingValidationErrorVisible=!1,this.completedGuidedSteps=this.completedGuidedSteps.filter(e=>"billing"!==e),this.invoice&&this.toggleOffInvoiceButton())},reconcileBillingSelectionBeforeValidation(){if(this.selectedBillingAddress){const e=this.normalizeCountryCode(this.selectedBillingAddress.country);this.normalizedBillingCountryList.includes(e)||(this.selectedBillingAddress=null)}this.restoreBillingSelectionFromCompatibleDefault()}},watch:{activeGuidedStep(e){"billing"===e&&this.restoreBillingSelectionFromCompatibleDefault()},isUserShippingAddressSelected(){this.ensurePickupPointSenderType()},selectedBillingAddress(e){this.isUserShippingAddressSelected&&e&&!this.invoice&&this.toggleOnInvoiceButton()}},mounted(){if(Xs.mounted.call(this),!this.selectedBillingAddress&&this.defaultBillingAddress){const e=this.billingOptions.find(e=>e.id===this.defaultBillingAddress.id);e&&(this.selectedBillingAddress=e)}this.ensurePickupPointSenderType(),this.selectedBillingAddress&&!this.explicitlyRequestForBillingAddressSelection&&this.toggleOnInvoiceButton(),this.selectedBillingAddress||this.explicitlyRequestForBillingAddressSelection||this.toggleOffInvoiceButton(),this.initializeGuidedFlow()}};const js={name:"RecapContainer",components:{RecapAddresses:(0,Te.A)(zs,[["render",function(e,i,s,n,ke,be){const Ae=(0,t.g2)("checkout-steps"),Se=(0,t.g2)("recap-shipping-methods"),Ce=(0,t.g2)("sender-customization"),fe=(0,t.g2)("toggle-button-invoice"),Le=(0,t.g2)("recap-billing-methods"),Ve=(0,t.g2)("terms-and-conditions"),Pe=(0,t.g2)("b-spinner"),_e=(0,t.g2)("b-button"),Be=(0,t.g2)("checkout-new-recap"),we=(0,t.g2)("summary-recap"),xe=(0,t.g2)("checkbox");return(0,t.uX)(),(0,t.CE)("div",d,[(0,t.Lk)("div",a,[(0,t.bF)(Ae,{step:"2"}),(0,t.Lk)("section",{class:(0,t.C4)(["guided-step",{active:be.isGuidedStepActive("shipping")}])},[be.isGuidedStepActive("shipping")?((0,t.uX)(),(0,t.CE)("div",m,[(0,t.Lk)("div",v,[(0,t.Lk)("div",y,[i[12]||(i[12]=(0,t.Lk)("span",{class:"icon-step"},[(0,t.Lk)("i",{class:"icon icon-box_16px"})],-1)),(0,t.Lk)("div",null,[(0,t.Lk)("span",k,(0,t.v_)(e.getDictionaryVoice("addresses","step_title"))+" 1",1),(0,t.Lk)("div",b,[(0,t.Lk)("div",A,(0,t.v_)(e.getDictionaryVoice("addresses","spedizione")),1)])])])]),(0,t.bF)(Se,{"selected-shipping-address":e.selectedShippingAddress,"shipping-options":e.shippingOptions,"country-list":e.shippingCountryList,"provinces-list":e.provincesList,"country-code":e.countryCode,"customer-validation-messages":e.validationMessages,onShippingAddressesAdded:e.onAddedShippingAddresses,onShippingAddressChanged:be.onSetAddress,onShippingAddressEdited:be.onShippingAddressUpdated,onPickupPointSelected:e.updateBillingAddressAvailability,onHasNotShippableJobs:e.hasNotShippableJobs},null,8,["selected-shipping-address","shipping-options","country-list","provinces-list","country-code","customer-validation-messages","onShippingAddressesAdded","onShippingAddressChanged","onShippingAddressEdited","onPickupPointSelected","onHasNotShippableJobs"]),e.isUserShippingAddressSelected&&e.shippingOptions.length>0||be.isPickupPointFlow&&e.isPickupPointSelected?((0,t.uX)(),(0,t.CE)("div",S,[(0,t.Lk)("button",{type:"button",class:"btn blue-btn","data-test":"guided-step-shipping-confirm",onClick:i[1]||(i[1]=e=>be.confirmGuidedStep("shipping"))},(0,t.v_)(e.getDictionaryVoice("addresses","confirm_btn")),1)])):(0,t.Q3)("",!0)])):((0,t.uX)(),(0,t.CE)("div",{key:0,class:(0,t.C4)(["guided-step-collapsed",{"alert-step":be.shippingShowAlert}]),"data-test":"guided-step-shipping-collapsed"},[(0,t.Lk)("div",r,[(0,t.Lk)("div",o,[i[9]||(i[9]=(0,t.Lk)("span",{class:"icon-step"},[(0,t.Lk)("i",{class:"icon icon-box_16px"})],-1)),(0,t.Lk)("div",null,[(0,t.Lk)("span",l,(0,t.v_)(e.getDictionaryVoice("addresses","step_title"))+" 1",1),(0,t.Lk)("div",c,[(0,t.Lk)("div",p,(0,t.v_)(e.getDictionaryVoice("addresses","spedizione")),1),(0,t.Lk)("div",u,(0,t.v_)(be.shippingStepRecap),1)])])]),(0,t.Lk)("button",{type:"button",class:"btn-link guided-step-edit","data-test":"guided-step-shipping-edit",onClick:i[0]||(i[0]=e=>be.openGuidedStep("shipping"))},[i[10]||(i[10]=(0,t.Lk)("i",{class:"icon icon-edit_16px"},null,-1)),(0,t.eW)(" "+(0,t.v_)(e.getDictionaryVoice("addresses","edit_btn")),1)])]),be.shippingShowAlert?((0,t.uX)(),(0,t.CE)("div",h,[i[11]||(i[11]=(0,t.Lk)("i",{class:"icon icon-alert_20px"},null,-1)),(0,t.Lk)("div",g,(0,t.v_)(e.validationMessages.addressValidation),1)])):(0,t.Q3)("",!0)],2))],2),e.isSenderCustomizationShown?((0,t.uX)(),(0,t.CE)("section",{key:0,class:(0,t.C4)(["guided-step",{active:be.isGuidedStepActive("sender")}])},[be.isGuidedStepActive("sender")?((0,t.uX)(),(0,t.CE)("div",x,[(0,t.Lk)("div",O,[(0,t.Lk)("div",E,[i[16]||(i[16]=(0,t.Lk)("span",{class:"icon-step"},[(0,t.Lk)("i",{class:"icon icon-card-info_16px"}
1)],-1)),(0,t.Lk)("div",null,[(0,t.Lk)("span",M,(0,t.v_)(e.getDictionaryVoice("addresses","step_title"))+" 2",1),(0,t.Lk)("div",I,[(0,t.Lk)("div",F,(0,t.v_)(e.getDictionaryVoice("addresses","mittente")),1)])])])]),(0,t.bF)(Ce,{"is-allowed-to-change":!be.isPixartOnlySenderMode&&e.isCustomSenderAllowedToChange,"show-only-pixart":be.isPixartOnlySenderMode,"is-user-reseller":e.isUserReseller,"country-codes":e.shippingCountryList,"is-loading":e.isLoading,"customer-validation-messages":e.validationMessages},null,8,["is-allowed-to-change","show-only-pixart","is-user-reseller","country-codes","is-loading","customer-validation-messages"]),(0,t.Lk)("div",T,[(0,t.Lk)("button",{type:"button",class:"btn btn-outline-dark","data-test":"guided-step-sender-back",onClick:i[3]||(i[3]=e=>be.goBackGuidedStep("sender"))},(0,t.v_)(e.getDictionaryVoice("addresses","back_btn")),1),(0,t.Lk)("button",{type:"button",class:"btn blue-btn","data-test":"guided-step-sender-confirm",onClick:i[4]||(i[4]=e=>be.confirmGuidedStep("sender"))},(0,t.v_)(e.getDictionaryVoice("addresses","confirm_btn")),1)])])):((0,t.uX)(),(0,t.CE)("div",{key:0,class:(0,t.C4)(["guided-step-collapsed",{"alert-step":ke.senderValidationErrorVisible}]),"data-test":"guided-step-sender-collapsed"},[(0,t.Lk)("div",C,[(0,t.Lk)("div",f,[i[13]||(i[13]=(0,t.Lk)("span",{class:"icon-step"},[(0,t.Lk)("i",{class:"icon icon-card-info_16px"})],-1)),(0,t.Lk)("div",null,[(0,t.Lk)("span",L,(0,t.v_)(e.getDictionaryVoice("addresses","step_title"))+" 2",1),(0,t.Lk)("div",V,[(0,t.Lk)("div",P,(0,t.v_)(e.getDictionaryVoice("addresses","mittente")),1),(0,t.Lk)("div",_,(0,t.v_)(be.senderStepRecap),1)])])]),(0,t.Lk)("button",{type:"button",class:"btn-link guided-step-edit","data-test":"guided-step-sender-edit",onClick:i[2]||(i[2]=e=>be.openGuidedStep("sender"))},[i[14]||(i[14]=(0,t.Lk)("i",{class:"icon icon-edit_16px"},null,-1)),(0,t.eW)(" "+(0,t.v_)(e.getDictionaryVoice("addresses","edit_btn")),1)])]),ke.senderValidationErrorVisible?((0,t.uX)(),(0,t.CE)("div",B,[i[15]||(i[15]=(0,t.Lk)("i",{class:"icon icon-alert_20px"},null,-1)),(0,t.Lk)("div",w,(0,t.v_)(e.validationMessages.addressValidation),1)])):(0,t.Q3)("",!0)],2))],2)):(0,t.Q3)("",!0),(0,t.Lk)("section",{class:(0,t.C4)(["guided-step",{active:be.isGuidedStepActive("billing")}])},[be.isBillingStepExpanded?((0,t.uX)(),(0,t.CE)("div",te,[(0,t.Lk)("div",ne,[(0,t.Lk)("div",de,[(0,t.Lk)("div",ae,[(0,t.Lk)("div",re,[i[24]||(i[24]=(0,t.Lk)("span",{class:"icon-step"},[(0,t.Lk)("i",{class:"icon icon-invoices_16px"})],-1)),(0,t.Lk)("div",null,[i[23]||(i[23]=(0,t.Lk)("span",{class:"guided-step-title"},"Step 3",-1)),(0,t.Lk)("div",oe,[(0,t.Lk)("div",le,(0,t.v_)(e.getDictionaryVoice("addresses","fatturazione")),1)])])]),(0,t.Lk)("div",ce,[be.showBillingToggle?((0,t.uX)(),(0,t.Wv)(fe,{key:0,class:"guided-step-billing-toggle","data-test":"guided-step-billing-toggle",invoice:e.invoice,onOpenForm:be.onOpenBillingStep,onCloseForm:be.onCloseBillingStep},null,8,["invoice","onOpenForm","onCloseForm"])):(0,t.Q3)("",!0)])])])]),(0,t.bF)(Le,{"customer-validation-messages":be.guidedBillingValidationMessages,"explicitly-request-for-billing-address-selection":e.explicitlyRequestForBillingAddressSelection,"billing-options":e.billingOptions,"selected-billing-address-id":e.addressId.billing,"current-shipping-country-code":e.currentShippingCountryCode,"hide-billing-addresses-header":!0,"initial-billing-address-upon-creation":be.initialBillingAddressUponCreation,"country-list":e.billingCountryList,onBillingAddressChanged:be.onSetAddress,onBillingAddressesAdded:e.onAddedBillingAddresses},null,8,["customer-validation-messages","explicitly-request-for-billing-address-selection","billing-options","selected-billing-address-id","current-shipping-country-code","initial-billing-address-upon-creation","country-list","onBillingAddressChanged","onBillingAddressesAdded"]),(0,t.Lk)("div",pe,[be.showBillingValidationError?((0,t.uX)(),(0,t.CE)("div",ue,[i[25]||(i[25]=(0,t.Lk)("i",{class:"icon icon-alert_20px"},null,-1)),(0,t.Lk)("div",he,(0,t.v_)(e.validationMessages.addressValidation),1)])):(0,t.Q3)("",!0)]),be.shouldHideBillingFooterButtons?(0,t.Q3)("",!0):((0,t.uX)(),(0,t.CE)("div",ge,[(0,t.Lk)("button",{type:"button",class:"btn btn-outline-dark","data-test":"guided-step-billing-back",onClick:i[7]||(i[7]=e=>be.goBackGuidedStep("billing"))},(0,t.v_)(e.getDictionaryVoice("addresses","back_btn")),1),(0,t.Lk)("button",{type:"button",class:"btn blue-btn","data-test":"guided-step-billing-confirm",onClick:i[8]||(i[8]=e=>be.confirmGuidedStep("billing"))},(0,t.v_)(e.getDictionaryVoice("addresses","confirm_btn")),1)]))])):((0,t.uX)(),(0,t.CE)("div",{key:0,class:(0,t.C4)(["guided-step-collapsed",{"alert-step":be.showBillingValidationError}]),"data-test":"guided-step-billing-collapsed"},[(0,t.Lk)("div",R,[(0,t.Lk)("div",D,[(0,t.Lk)("div",q,[(0,t.Lk)("div",G,[i[17]||(i[17]=(0,t.Lk)("span",{class:"icon-step"},[(0,t.Lk)("i",{class:"icon icon-invoices_16px"})],-1)),(0,t.Lk)("div",null,[(0,t.Lk)("span",N,(0,t.v_)(e.getDictionaryVoice("addresses","step_title"))+" 3",1),(0,t.Lk)("div",U,[(0,t.Lk)("div",W,(0,t.v_)(e.getDictionaryVoice("addresses","fatturazione")),1)])])]),(0,t.Lk)("div",$,[be.showPickupPointBillingEdit?((0,t.uX)(),(0,t.CE)("button",{key:0,t
1ype:"button",class:"btn-link guided-step-edit","data-test":"guided-step-billing-edit-pickup",onClick:i[5]||(i[5]=e=>be.openGuidedStep("billing"))},[...i[18]||(i[18]=[(0,t.Lk)("i",{class:"icon icon-edit_16px"},null,-1),(0,t.eW)(" Edit ",-1)])])):(0,t.Q3)("",!0),be.showBillingToggle?((0,t.uX)(),(0,t.Wv)(fe,{key:1,class:"guided-step-billing-toggle","data-test":"guided-step-billing-toggle",invoice:e.invoice,onOpenForm:be.onOpenBillingStep,onCloseForm:be.onCloseBillingStep},null,8,["invoice","onOpenForm","onCloseForm"])):(0,t.Q3)("",!0)])]),be.showBillingInlineDetails?((0,t.uX)(),(0,t.CE)("div",X,[(0,t.Lk)("div",z,[(0,t.Lk)("div",j,[(0,t.Lk)("div",H,(0,t.v_)(e.getDictionaryVoice("user","societa"))+"/"+(0,t.v_)(e.getDictionaryVoice("user","name")),1),(0,t.Lk)("div",Q,(0,t.v_)(e.getDictionaryVoice("user","indirizzo")),1),(0,t.Lk)("div",K,(0,t.v_)(e.getDictionaryVoice("user","user_contact")),1)]),(0,t.Lk)("div",J,[(0,t.Lk)("div",Y,(0,t.v_)(be.billingRecapAddress.company)+" "+(0,t.v_)(be.billingRecapAddress.firstName)+" "+(0,t.v_)(be.billingRecapAddress.lastName),1),(0,t.Lk)("div",Z,[(0,t.eW)((0,t.v_)(be.billingRecapAddress.streetName),1),i[19]||(i[19]=(0,t.Lk)("br",null,null,-1)),(0,t.eW)(" "+(0,t.v_)(be.billingRecapAddress.postalCode)+" "+(0,t.v_)(be.billingRecapAddress.city),1),i[20]||(i[20]=(0,t.Lk)("br",null,null,-1)),(0,t.eW)(" "+(0,t.v_)(e.getDictionaryVoice("countries",`country_${be.billingRecapAddress.country}`)),1)]),(0,t.Lk)("div",ee,(0,t.v_)(be.billingRecapAddress.mobile||be.billingRecapAddress.phone),1)])]),(0,t.Lk)("button",{type:"button",class:"btn-link guided-step-edit","data-test":"guided-step-billing-edit",onClick:i[6]||(i[6]=e=>be.openGuidedStep("billing"))},[i[21]||(i[21]=(0,t.Lk)("i",{class:"icon icon-edit_16px"},null,-1)),(0,t.eW)(" "+(0,t.v_)(e.getDictionaryVoice("addresses","edit_btn")),1)])])):(0,t.Q3)("",!0)])]),be.showBillingValidationError?((0,t.uX)(),(0,t.CE)("div",ie,[i[22]||(i[22]=(0,t.Lk)("i",{class:"icon icon-alert_20px"},null,-1)),(0,t.Lk)("div",se,(0,t.v_)(e.validationMessages.addressValidation),1)])):(0,t.Q3)("",!0)],2))],2),(0,t.bF)(Ve,{ref:"terms"},null,512),(0,t.bF)(_e,{class:"green-btn float-end d-none d-md-block recap-btn","data-test":"recap-page-purchase-btn",variant:"success",onClick:be.checkoutOrder,disabled:e.isCheckoutDisabled},{default:(0,t.k6)(()=>[e.isLoading?((0,t.uX)(),(0,t.Wv)(Pe,{key:0,small:""})):(0,t.Q3)("",!0),(0,t.eW)(" "+(0,t.v_)(e.getDictionaryVoice("common","acquista")),1)]),_:1},8,["onClick","disabled"])]),(0,t.Lk)("div",me,[e.isCheckoutNewRecap?((0,t.uX)(),(0,t.Wv)(Be,{key:0,"is-loading":e.isLoading,"pixartpro-data-loaded":e.pixartproDataLoaded,"show-empty-shipping-price":e.showEmptyShippingPrice,"display-vat-amount":e.displayVatAmount,"display-shipping-amount":e.displayShippingAmount,"is-shipping-address-set":e.isShippingAddressSet,"tax-validation-address-selection":e.taxValidationAddressSelection,"checkout-disabled":e.isCheckoutDisabled,"is-pixartpro":!1,"show-summary-toggle":!0,"cta-label-namespace":"common","cta-label-key":"acquista",onConfirmCheckout:be.checkoutOrder,onCtaClick:be.checkoutOrder},null,8,["is-loading","pixartpro-data-loaded","show-empty-shipping-price","display-vat-amount","display-shipping-amount","is-shipping-address-set","tax-validation-address-selection","checkout-disabled","onConfirmCheckout","onCtaClick"])):((0,t.uX)(),(0,t.Wv)(we,{key:1,"is-loading":e.isLoading,"pixartpro-data-loaded":e.pixartproDataLoaded,"show-empty-shipping-price":e.showEmptyShippingPrice,"display-vat-amount":e.displayVatAmount,"display-shipping-amount":e.displayShippingAmount,"is-shipping-address-set":e.isShippingAddressSet,"tax-validation-address-selection":e.taxValidationAddressSelection,"checkout-disabled":e.isCheckoutDisabled,onCheckoutOrder:be.checkoutOrder},null,8,["is-loading","pixartpro-data-loaded","show-empty-shipping-price","display-vat-amount","display-shipping-amount","is-shipping-address-set","tax-validation-address-selection","checkout-disabled","onCheckoutOrder"]))]),e.mstPrd?(0,t.Q3)("",!0):((0,t.uX)(),(0,t.CE)("div",ve,[(0,t.Lk)("div",ye,[i[27]||(i[27]=(0,t.Lk)("p",null,"Test/Debug Options",-1)),(0,t.bF)(xe,{checked:e.simulatePromoErrors,onCheckboxChanged:e.updateSimulatePromoErrors},{checkboxText:(0,t.k6)(()=>[...i[26]||(i[26]=[(0,t.Lk)("div",{class:"textCheck"},"Simulate errors on my promocodes",-1)])]),_:1},8,["checked","onCheckboxChanged"])])]))])}],["__scopeId","data-v-06228544"]]),CartValidation:s(42321).A},props:{shippingCountryList:{type:Array,required:!0},billingCountryList:{type:Array,required:!0},allowedBillingCountryRules:{type:Array,required:!0},provincesList:{type:Object,required:!0},countryCode:{type:String,required:!0},defaultShippingAddress:{type:[Object,Array],required:!1},defaultBillingAddress:{type:[Object,Array],required:!1},billingAddress:{type:[Object,Array],required:!0},shippingAddresses:{type:[Object,Array],required:!0},allowedShippingCountries:{type:Array,required:!0},isInvoiceRequestedByDefault:{type:Boolean,required:!0},mandatoryInvoiceCountriesList:{type:Object,required:!0},userCategory:{type:String,required:!1},termsTitle:{type:String,required:!0},termsText:{type:String,required:!0},isPixartpro:{type:Boolean,required:!1},displayVatAmount:{type:Boolean,required:!0,default:!0},displayShippingAmount:{type:Boolean,required:!0,default:!0},ppWallet:{type:[Object,Array],required:!1},senderOptionsEnabled:{type:Boolean,required:!1},enabledShippingFields:{type:Object,required:!0},enabledBillingFields:{type:Object,required:!0},loqateApiKey:{type:String,required:!1},googleMapsApiKey:{type:String,required:!1},viesLinks:{type:Object,required:!1},vatIdPrefixes:{type:Object,required:!1},isPickupPointsEnabled:{type:Boolean,required:!0,default:!1},isUserReseller:{type:Boolean,required:!1,default:!1},pickupPointsRestrictions:{type:Object,required:!0},showEmptyShippingPrice:{type:Boolean,required:!1,default:!1},pageExperience:{type:Object,required:!1,default:null},hideSenderOptions:{type:Boolean,required:!1},taxValidationAddressSelection:{type:Boolean,required:!0,default:!1}},computed:{...(0,n.L8)("cart",["cartLoaded"]),filteredShippingCountriesList(){if(this.allowedShippingCountries.includes("*"))return this.shippingCountryList;const e=new Set(this.shippingCountryList);return this.allowedShippingCountries.filter(i=>e.has(i))}},created(){this.addExperimentData(this.pageExperience?.experimentData??[]),this.initializeRecapStore({initializeShippingCountryList:this.filteredShippingCountriesList,initializeBilling
1CountryRules:this.allowedBillingCountryRules,initializeProvincesList:this.provincesList,initializeGoogleMapApiKey:this.googleMapsApiKey,initializeLoqateApiKey:this.loqateApiKey,initializeIsUserReseller:this.isUserReseller,initializeMandatoryInvoiceCountryList:this.mandatoryInvoiceCountriesList,"recapBilling/initializeEnabledBillingFields":this.enabledBillingFields,"recapBilling/initializeViesLinks":this.viesLinks,"recapBilling/initializeVatIdPrefixes":this.vatIdPrefixes,"recapBilling/initializeInvoiceDefaultValue":this.isInvoiceRequestedByDefault,"recapBilling/initializeUserCategory":this.userCategory,"recapShipping/initializePickupPointStatus":this.isPickupPointsEnabled,"recapShipping/initializePickupPointsRestrictions":this.pickupPointsRestrictions,"recapShipping/initializeSenderCustomizationIsAllowedToChange":this.senderOptionsEnabled,"recapShipping/initializeEnabledShippingFields":this.enabledShippingFields,"terms/initializeTermsText":this.termsText,"terms/initializeTermsTitle":this.termsTitle}),this.updateCountryCode(this.countryCode)},methods:{...(0,n.i0)({initializeRecapStore:"recap/initialize",updateCountryCode:"recap/updateCountryCode",addExperimentData:"experience/addExperimentData",turnOffSenderCustomization:"recap/recapShipping/turnOffSenderCustomization"})}},Hs=(0,Te.A)(js,[["render",function(e,i,s,n,d,a){const r=(0,t.g2)("recap-addresses"),o=(0,t.g2)("cart-validation");return(0,t.uX)(),(0,t.Wv)(o,null,{trigger:(0,t.k6)(({validate:i,validateCartAndCheckout:n,loaderFromValidation:d,validationError:a,validateCartOnAddressSelection:o})=>[e.cartLoaded?((0,t.uX)(),(0,t.Wv)(r,{key:0,"validate-cart":i,"validate-cart-and-checkout":n,"loader-from-validation":d,"validation-error":a,"billing-address":s.billingAddress,"default-shipping-address":s.defaultShippingAddress,"default-billing-address":s.defaultBillingAddress,"shipping-addresses":s.shippingAddresses,"is-pixartpro":s.isPixartpro,"display-vat-amount":s.displayVatAmount,"display-shipping-amount":s.displayShippingAmount,"pp-wallet":s.ppWallet,"show-empty-shipping-price":s.showEmptyShippingPrice,"allowed-shipping-countries":s.allowedShippingCountries,"validate-cart-on-address-selection":o,"tax-validation-address-selection":s.taxValidationAddressSelection,"hide-sender-options":s.hideSenderOptions},null,8,["validate-cart","validate-cart-and-checkout","loader-from-validation","validation-error","billing-address","default-shipping-address","default-billing-address","shipping-addresses","is-pixartpro","display-vat-amount","display-shipping-amount","pp-wallet","show-empty-shipping-price","allowed-shipping-countries","validate-cart-on-address-selection","tax-validation-address-selection","hide-sender-options"])):(0,t.Q3)("",!0)]),_:1})}]]);var Qs=s(74629);const Ks=()=>{const e=(0,t.Ef)({components:{RecapContainer:Hs},provide:{domainLang:window.domainLang}});(0,Qs.A)(e,"#recap-addresses-container")}},61059(e,i,s){s.d(i,{a:()=>a,u:()=>d});var t=s(68966),n=s(41425);const d=(e,i,s={})=>{const d=(0,n.tB)((0,n.lW)(e)),a=(0,n.KR)(!1),r=(0,n.KR)(Date.now()+d.value),{isActive:o,pause:l,resume:c,timestamp:p}=(0,t.k)({interval:i,controls:!0,callback:e=>{e>=r.value&&(a.value=!1,l())},...s}),u=(0,n.EW)(()=>r.value-p.value),h=()=>{r.value=Date.now()+d.value,c()};(0,n.wB)(d,()=>{h()});return{isActive:(0,n.tB)(o),isPaused:(0,n.tB)(a),stop:()=>{l(),p.value=r.value,a.value=!1},pause:()=>{a.value=!0,l()},resume:()=>{a.value=!1;const e=r.value-p.value;r.value=Date.now()+e,c()},restart:h,value:u}},a=(e,i,s)=>{const d=(0,t.l)(e);return(0,n.wB)(d,e=>{(0,n.BA)(i).modelValueIgnoresHover||(e?(0,n.BA)(i).noHoverPause||s.pause():(0,n.BA)(i).noResumeOnHoverLeave||s.resume())}),{isHovering:d}}},61605(e,i,s){s.d(i,{_:()=>n});var t=s(41425);const n=(0,t.pM)({__name:"BTransition",props:{appear:{type:Boolean,default:!1},mode:{default:void 0},noFade:{type:Boolean,default:!1},transProps:{default:void 0}},emits:["after-appear","after-enter","after-leave","appear","before-appear","before-enter","before-leave","enter","appear-cancelled","enter-cancelled","leave","leave-cancelled"],setup(e,{emit:i}){const s=e,n=i,d=(0,t.EW)(()=>{const e={name:"",enterActiveClass:"",enterToClass:"",leaveActiveClass:"",leaveToClass:"showing",enterFromClass:"showing",leaveFromClass:""}
1,i={...e,enterActiveClass:"fade showing",leaveActiveClass:"fade showing"};return s.noFade?e:i}),a=(0,t.EW)(()=>({mode:s.mode,css:!0,...d.value}));return(e,i)=>((0,t.uX)(),(0,t.Wv)(t.eB,(0,t.v6)({...a.value,...s.transProps},{appear:s.appear,onAfterAppear:i[0]||(i[0]=e=>n("after-appear",e)),onAfterEnter:i[1]||(i[1]=e=>n("after-enter",e)),onAfterLeave:i[2]||(i[2]=e=>n("after-leave",e)),onAppear:i[3]||(i[3]=e=>n("appear",e)),onBeforeAppear:i[4]||(i[4]=e=>n("before-appear",e)),onBeforeEnter:i[5]||(i[5]=e=>n("before-enter",e)),onBeforeLeave:i[6]||(i[6]=e=>n("before-leave",e)),onEnter:i[7]||(i[7]=e=>n("enter",e)),onAppearCancelled:i[8]||(i[8]=e=>n("appear-cancelled",e)),onEnterCancelled:i[9]||(i[9]=e=>n("enter-cancelled",e)),onLeave:i[10]||(i[10]=e=>n("leave",e)),onLeaveCancelled:i[11]||(i[11]=e=>n("leave-cancelled",e))}),{default:(0,t.k6)(()=>[(0,t.RG)(e.$slots,"default")]),_:3},16,["appear"]))}})},62998(e,i,s){s.d(i,{A:()=>r});var t=s(43766),n=s.n(t),d=s(85575),a=s(7374);const r=(e,i,s=null,t=null)=>{if((0,a.A)(e)&&(0,a.A)(i)){if(!window.anonToken)return void d.A.error("Product Recommender: missing anonToken!");const r={tenant:"pixart",token:window.anonToken,recommendationId:i,action:e};(0,a.A)(s)&&(r.item_id=s),t&&(r.item_price=t),d.A.log(`Product Recommender: sending ${e.toUpperCase()} metrics to service`),n().updateMetric(r,window.devEnv).catch(e=>{d.A.error("Product Recommender: errors on UpdateMetrics library function!",e)})}else d.A.error("Product Recommender: unable to send metrics 'cause Action or RecommendationId are empty!")}},68183(e,i,s){var t=s(79504),n=s(91291),d=s(655),a=s(67750),r=t("".charAt),o=t("".charCodeAt),l=t("".slice),c=function(e){return function(i,s){var t,c,p=d(a(i)),u=n(s),h=p.length;return u<0||u>=h?e?"":void 0:(t=o(p,u))<55296||t>56319||u+1===h||(c=o(p,u+1))<56320||c>57343?e?r(p,u):t:e?l(p,u,u+2):c-56320+(t-55296<<10)+65536}};e.exports={codeAt:c(!1),charAt:c(!0)}},70203(e,i,s){s.d(i,{A:()=>t});const t=e=>void 0===e},78898(e,i,s){var t=s(46518),n=s(68183).charAt,d=s(67750),a=s(91291),r=s(655);t({target:"String",proto:!0,forced:!0},{at:function(e){var i=r(d(this)),s=i.length,t=a(e),o=t>=0?t:s+t;return o<0||o>=s?void 0:n(i,o)}})},89462(e,i,s){function t(e){return e.toString().padStart(2,"0")}s.d(i,{A:()=>t})},94960(e,i,s){s.d(i,{A:()=>t});const t=(e,i,s)=>{document.addEventListener(e,e=>{const t=e.target.closest(i);t&&s(e,t)},!1)}},95813(e,i,s){s.d(i,{A:()=>h});var t=s(41425);const n={class:"wrapper"},d={class:"checkout-steps","data-test":"checkout-steps"},a=["href"],r=["href"],o={class:"title weight-700"},l={key:0},c={key:1};s(74423);var p=s(82124);const u={name:"CheckoutSteps",props:{step:{type:String,required:!0,validator:e=>["1","2","3"].includes(e)}},computed:{...(0,p.L8)("dictionary",["getDictionaryVoice"]),...(0,p.L8)("links",["cartLink","recapLink"])}};const h=(0,s(66262).A)(u,[["render",function(e,i,s,p,u,h){return(0,t.uX)(),(0,t.CE)("div",n,[(0,t.Lk)("div",d,[(0,t.Lk)("div",{class:(0,t.C4)(["step",{current:"1"===s.step,validated:s.step>"1"}])},[(0,t.Lk)("a",{href:e.cartLink,class:(0,t.C4)({nolink:s.step>="3"})},[(0,t.Lk)("i",{class:(0,t.C4)(["icon",s.step>"1"?"icon-32-selected_32px":"icon-cart_16px"])},null,2),(0,t.Lk)("span",null,(0,t.v_)(e.getDictionaryVoice("cart","basket_step")),1)],10,a)],2),(0,t.Lk)("div",{class:(0,t.C4)(["step",{current:"2"===s.step||"0"===s.step,validated:s.step>"2"}])},[(0,t.Lk)("a",{href:e.recapLink,class:(0,t.C4)({nolink:s.step>="3"})},[(0,t.Lk)("i",{class:(0,t.C4)(["icon",s.step>"2"?"icon-32-selected_32px":"icon-box_16px"])},null,2),(0,t.Lk)("span",null,(0,t.v_)(e.getDictionaryVoice("cart","shipping_and_billing_step")),1)],10,r)],2),(0,t.Lk)("div",{class:(0,t.C4)(["step",{current:"3"===s.step,validated:s.step>"3"}])},[(0,t.Lk)("a",{href:"#",class:(0,t.C4)({nolink:s.step>="3"})},[(0,t.Lk)("i",{class:(0,t.C4)(["icon",s.step>"3"?"icon-32-selected_32px":"icon-p-cash-on-delivery_1_16px"])},null,2),(0,t.Lk)("span",null,(0,t.v_)(e.getDictionaryVoice("cart","payment_and_files_step")),1)],2)],2)]),(0,t.Lk)("p",o,["1"===s.step?((0,t.uX)(),(0,t.CE)("strong",l,(0,t.v_)(e.getDictionaryVoice("cart","basket_step")),1
1)):(0,t.Q3)("",!0),"2"===s.step?((0,t.uX)(),(0,t.CE)("strong",c,(0,t.v_)(e.getDictionaryVoice("cart","shipping_and_billing_step")),1)):(0,t.Q3)("",!0)])])}],["__scopeId","data-v-1cb4c18d"]])},97874(e,i,s){s.d(i,{D:()=>u});var t=s(41425),n=s(61605),d=s(8082),a=s(8490),r=s(61059),o=s(82191),l=s(4977),c=s(98936);const p=(0,t.pM)({__name:"BAlert",props:(0,t.zz)({closeClass:{default:void 0},closeContent:{default:void 0},closeLabel:{default:"Close"},closeVariant:{default:"secondary"},dismissible:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},interval:{default:"requestAnimationFrame"},noHoverPause:{type:Boolean,default:!1},noResumeOnHoverLeave:{type:Boolean,default:!1},showOnPause:{type:Boolean,default:!0},variant:{default:"info"}},{modelValue:{type:[Boolean,Number],default:!1},modelModifiers:{}}),emits:(0,t.zz)(["close","close-countdown","closed"],["update:modelValue"]),setup(e,{expose:i,emit:s}){const c=e,p=(0,o.u)(c,"BAlert"),u=s,h=(0,t.Ht)(),g=(0,t.KR)(null),m=(0,t.fn)(e,"modelValue"),v=(0,t.EW)(()=>!(0,l.i)(h.close)),y=(0,t.EW)(()=>"boolean"==typeof m.value?0:m.value),k=(0,t.EW)(()=>({[`alert-${p.variant}`]:null!==p.variant,"alert-dismissible":p.dismissible})),b=(0,t.EW)(()=>[p.closeClass,{"btn-close-custom":v.value}]),{isActive:A,pause:S,resume:C,stop:f,isPaused:L,restart:V,value:P}=(0,r.u)(y,p.interval,{immediate:"number"==typeof m.value&&p.immediate});(0,r.a)(g,(0,t.EW)(()=>({noHoverPause:p.noHoverPause,noResumeOnHoverLeave:p.noResumeOnHoverLeave,modelValueIgnoresHover:"boolean"==typeof m.value})),{pause:S,resume:C});const _=(0,t.EW)(()=>"boolean"==typeof m.value?m.value:A.value||p.showOnPause&&L.value),B=(0,t.EW)(()=>({variant:v.value?p.closeVariant:void 0,class:b.value}));(0,t.nT)(()=>{u("close-countdown",P.value)});const w=()=>{u("close"),"boolean"==typeof m.value?m.value=!1:(m.value=0,f()),u("closed")};return i({pause:S,resume:C,stop:f,restart:V}),(e,i)=>((0,t.uX)(),(0,t.Wv)(n._,{"no-fade":!(0,t.R1)(p).fade,"trans-props":{enterToClass:"show"}},{default:(0,t.k6)(()=>[_.value?((0,t.uX)(),(0,t.CE)("div",{key:0,ref_key:"element",ref:g,class:(0,t.C4)(["alert",k.value]),role:"alert","aria-live":"polite","aria-atomic":"true"},[(0,t.RG)(e.$slots,"default",{},void 0,!0),(0,t.R1)(p).dismissible?((0,t.uX)(),(0,t.CE)(t.FK,{key:0},[v.value||(0,t.R1)(p).closeContent?((0,t.uX)(),(0,t.Wv)(a._,(0,t.v6)({key:0},B.value,{onClick:w}),{default:(0,t.k6)(()=>[(0,t.RG)(e.$slots,"close",{},()=>[(0,t.eW)((0,t.v_)((0,t.R1)(p).closeContent),1)],!0)]),_:3},16)):((0,t.uX)(),(0,t.Wv)(d._,(0,t.v6)({key:1,"aria-label":(0,t.R1)(p).closeLabel},B.value,{onClick:w}),null,16,["aria-label"]))],64)):(0,t.Q3)("",!0)],2)):(0,t.Q3)("",!0)]),_:3},8,["no-fade"]))}}),u=(0,c._)(p,[["__scopeId","data-v-2f3988be"]])}};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.