1(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{1924:function(r,e,t){r.exports={}},2289:function(r,e,t){"use strict";t(1924)},2482:function(r,e,t){"use strict";t.r(e);var o=t(4),n=(t(7),t(50),t(17),t(19),t(35),t(8),t(0)),i=(t(1299),t(1300),t(280),t(9)),a={download(r,e){var t=this;return Object(o.a)(function*(){var o,{commit:n}=r;try{n("downloadInit");var{data:a}=yield t.$axios.get("".concat(t.app.$config.API_URL,"/api/v2/shop/orders/").concat(e.tokenValue,"/download-invoice"),{responseType:"arraybuffer",headers:{Accept:"application/json"},requireAuth:!0}),d=new Blob([a]),s=window.URL.createObjectURL(d),l=document.createElement("a");l.href=s;var u=t.$i18n.te("common_invoice.file_name")?t.$i18n.t("common_invoice.file_name",{orderNumber:e.number}):null===(o=e.number)||void 0===o?void 0:o.toString();return l.download="".concat(u,".pdf"),document.body.appendChild(l),l.click(),l.remove(),n("downloadSuccess"),!0}catch(r){var c=Object(i.a)(r);return n("downloadError",c),c}})()}},d=t(1),s={actions:a,getters:{downloadStatus:r=>r.downloadStatus,downloadError:r=>r.downloadEror,downloadProcessing:r=>r.downloadStatus===d.a.PROCESSING},mutations:{downloadInit(r){r.downloadStatus=d.a.PROCESSING,r.downloadEror=null},downloadSuccess(r){r.downloadStatus=d.a.SUCCESS,r.downloadEror=null},downloadError(r,e){r.downloadStatus=d.a.ERROR,r.downloadEror=e}},state:()=>({downloadStatus:d.a.INIT,downloadEror:null})},l={getOrder(r,e){var t=this;return Object(o.a)(function*(){var{commit:o}=r;try{o("getOrderInit");var{data:n}=yield t.$axios.get("".concat(t.app.$config.API_URL,"/api/v2/shop/orders/").concat(e),{requireAuth:!0});return o("getOrderSuccess",n),!0}catch(r){var a=Object(i.a)(r);return o("getOrderError",a),a}})()}},u=t(161),c={actions:l,getters:{getOrderStatus:r=>r.getOrderStatus,getOrderError:r=>r.getOrderError,order:r=>r.data,orderItems:r=>{var e,t;return null!==(t=null===(e=r.data)||void 0===e?void 0:e.items)&&void 0!==t?t:[]},orderIsNew:(r,e)=>{var t=e.order;return(null==t?void 0:t.state)===u.e.NEW},orderIsCart:(r,e)=>{var t=e.order;return(null==t?void 0:t.state)===u.e.CART},orderIsPaid:(r,e)=>{var t=e.order;return(null==t?void 0:t.paymentState)===u.c.PAID},returnRequests:r=>{var e,t;return null!==(t=null===(e=r.data)||void 0===e?void 0:e.returnRequests)&&void 0!==t?t:[]}},mutations:{getOrderInit(r){r.getOrderStatus=d.a.PROCESSING,r.getOrderError=null},getOrderSuccess(r,e){r.getOrderStatus=d.a.SUCCESS,r.getOrderError=null,r.data=e},getOrderError(r,e){r.getOrderStatus=d.a.ERROR,r.getOrderError=e}},state:()=>({getOrderStatus:d.a.INIT,getOrderError:null,data:null})},v={actions:{download(r,e){var t=this;return Object(o.a)(function*(){var o,{commit:n}=r;try{n("downloadInit");var{data:a}=yield t.$axios.get("".concat(t.app.$config.API_URL,"/api/v2/shop/orders/").concat(e.tokenValue,"/download-preinvoice"),{responseType:"arraybuffer",headers:{Accept:"application/json"},requireAuth:!0}),d=new Blob([a]),s=window.URL.createObjectURL(d),l=document.createElement("a");l.href=s;var u=t.$i18n.te("common_pre_invoice.file_name")?t.$i18n.t("common_pre_invoice.file_name",{orderNumber:e.number}):null===(o=e.number)||void 0===o?void 0:o.toString();return l.download="".concat(u,".pdf"),document.body.appendChild(l),l.click(),l.remove(),n("downloadSuccess"),!0}catch(r){var c=Object(i.a)(r);return n("downloadError",c),c}})()}},getters:{downloadStatus:r=>r.downloadStatus,downloadError:r=>r.downloadEror,downloadProcessing:r=>r.downloadStatus===d.a.PROCESSING},mutations:{downloadInit(r){r.downloadStatus=d.a.PROCESSING,r.downloadEror=null},downloadSuccess(r){r.downloadStatus=d.a.SUCCESS,r.downloadEror=null},downloadError(r,e){r.downloadStatus=d.a.ERROR,r.downloadEror=e}},state:()=>({downloadStatus:d.a.INIT,downloadEror:null})},p={getReturns(r){var e=this;return Object(o.a)(function*(){var{commit:t}=r;try{t("getReturnsInit");var{data:o}=yield e.$axios.get("".concat(e.app.$config.API_URL,"/api/v2/order-return-requests"),{requireAuth:!0});return t("getReturnsSuccess",o),!0}catch(r){return t("getReturnsError",Object(i.a)(r)),!1}})()}},m={getReturnsStatus:r=>r.getReturnsStatus,getReturnsError:r=>r.getReturnsError,loading:r=>r.getReturnsStatus===d.a.PROCESSING,data:r=>r.data,returns:r=>{var e;return null===(e=r.data)||void 0===e?void 0:e.data},returnsCount:r=>r.returns.length,pageRangeMin:r=>r.pageRangeMin,pageRangeMax:r=>r.pageRangeMax,currentPage:r=>{var e,t;return(null===(t=null===(e=r.data)||void 0===e?void 0:e.meta)||void 0===t?void 0:t.currentPage)||null},lastPage:r=>{var e,t;return(null===(t=null===(e=r.data)||void 0===e?void 0:e.meta)||void 0===t?void 0:t.lastPage)||1},total:r=>{var e,t;return(null===(t=null===(e=r.data)||void 0===e?void 0:e.meta)||void 0===t?void 0:t.totalItems)||0}},g=(t(24),t(1628)),b={modules:{invoice:s,order:c,"pre-invoice":v,returns:{actions:p,getters:m,mutations:{getReturnsInit(r){r.getReturnsStatus=d.a.PROCESSING,r.getReturnsError=null},getReturnsSuccess(r,e){r.getReturnsStatus=d.a.SUCCESS,r.getReturnsError=null,r.data=e},getReturnsError(r,e){r.getReturnsStatus=d.a.ERROR,r.getReturnsError=e},clear(r){Object.assign(r,Object(g.a)())}},state:()=>({getReturnsStatus:d.a.INIT,getReturnsError:null,data:null,pageRangeMin:1,pageRangeMax:1,returns:[],items:[]})}}},O=t(1260),w="view-order-inner",S=t(1264),h=t(37),_=t(371),R=t(2053),I=t(2054),P=t(2038),E=t(1525),y=t(2039),x=t(2034),f=t(2055),C=t(1526),k=t(2029),j=t(1712),$=t(1527),T=t(54),N=t(2056),M=t(2057),A=t(2035),L=t(1627),D=function(r,e,t,o){var n,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(r,e,t,o);else for(var d=r.length-1;d>=0;
1d--)(n=r[d])&&(a=(i<3?n(a):i>3?n(e,t,a):n(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a},G=class extends(Object(n.mixins)(h.a,_.a)){constructor(){super(...arguments),this.initialized=!1}get orderToken(){return this.$route.params.orderToken}get orderProcessing(){return this.getOrderStatus===d.a.INIT||this.getOrderStatus===d.a.PROCESSING}get orderNumber(){var r,e;return null!==(e=null===(r=this.order)||void 0===r?void 0:r.number)&&void 0!==e?e:"-"}get basicMetaTitle(){return this.$te("page_account_order_inner.meta_title")?this.$t("page_account_order_inner.meta_title",{orderNumber:this.orderNumber}).toString():null}get basicMetaDescription(){return this.$te("page_account_order_inner.meta_description")?this.$t("page_account_order_inner.meta_description").toString():null}get basicMetaKeywords(){return this.$te("page_account_order_inner.meta_keywords")?this.$t("page_account_order_inner.meta_keywords").toString():null}get downloadPreInvoiceErrorMessage(){var r,e,t;return(null===(t=null===(e=null===(r=this.preInvoiceDownloadError)||void 0===r?void 0:r.response)||void 0===e?void 0:e.data)||void 0===t?void 0:t.detail)||this.$t("common_pre_invoice.download_error").toString()}get downloadInvoiceErrorMessage(){var r,e,t;return(null===(t=null===(e=null===(r=this.invoiceDownloadError)||void 0===r?void 0:r.response)||void 0===e?void 0:e.data)||void 0===t?void 0:t.detail)||this.$t("common_invoice.download_error").toString()}getData(){var r=this;return Object(o.a)(function*(){var e;try{if(yield r.getOrder(r.orderToken),r.getOrderStatus===d.a.ERROR)throw r.getOrderError;(r.orderIsCart||r.orderIsNew)&&r.$router.replace(r.localePath({name:r.$routeNames.CHECKOUT,params:{orderToken:r.orderToken}}))}catch(t){if(403===(null===(e=r.getOrderError)||void 0===e?void 0:e.status))return r.setRedirectPath(r.$route.fullPath),void r.$router.replace(r.localePath({name:r.$routeNames.AUTH}));r.$nuxt.error(t)}})()}downloadPreInvoiceHandler(){var r=this;return Object(o.a)(function*(){yield r.preInvoiceDownload(r.order),r.preInvoiceDownloadStatus!==d.a.SUCCESS&&r.$modal.openModal({component:T.a,props:{message:r.downloadPreInvoiceErrorMessage,color:"error"}})})()}downloadInvoiceHandler(){var r=this;return Object(o.a)(function*(){yield r.invoiceDownload(r.order),r.invoiceDownloadStatus!==d.a.SUCCESS&&r.$modal.openModal({component:T.a,props:{message:r.downloadInvoiceErrorMessage,color:"error"}})})()}get availableToReturn(){var r,e;return null!==(e=null===(r=this.order)||void 0===r?void 0:r.availableToReturn)&&void 0!==e&&e}get returns(){var r,e,t;return null!==(t=null===(e=null===(r=this.order)||void 0===r?void 0:r.returnRequests)||void 0===e?void 0:e.filter(r=>r.submitState===S.a.STATE_SUBMITTED))&&void 0!==t?t:[]}get showReturns(){return this.returns.length>0}beforeCreate(){var r;(r=this.$store).hasModule(w)||Object(O.a)(r,[w],b)}created(){this.getData(),this.initialized=!0}get isOrderSplit(){var r;return Boolean(null===(r=this.order)||void 0===r?void 0:r.isSplit)}get allSubOrderNumbers(){var r,e;return this.isOrderSplit&&null!==(e=null===(r=this.orderItems)||void 0===r?void 0:r.map(r=>r.subOrderNumber))&&void 0!==e?e:[]}get shipments(){var r;return(null===(r=this.order)||void 0===r?void 0:r.shipments)||[]}get groupedSubOrdersWithShipping(){if(!this.isOrderSplit)return[];var r=this.orderItems.reduce((r,e)=>{if(!e.subOrderNumber)return r;var t=e.subOrderNumber;return r[t]||(r[t]=[]),r[t].push(e),r},{}),e=(this.shipments||[]).reduce((r,e)=>e.subOrderNumber?(r[e.subOrderNumber]=e,r):r,{});return Object.entries(r).map(r=>{var[t,o]=r;return{subOrderNumber:t,items:o,shipping:e[t]||null}})}showTrackingLink(r){return null!==(null==r?void 0:r.trackingLink)}trackingLink(r){var e;return null!==(e=null==r?void 0:r.trackingLink)&&void 0!==e?e:null}subOrderParcels(r){return Object(L.b)(this.order,r)}showSubOrderParcels(r){return this.subOrderParcels(r).length>1}statusText(r){return(null==r?void 0:r.state)?this.$t("page_account_order_inner.sub_order_shipping_status_".concat(null==r?void 0:r.state)).toString():""}};D([Object(n.Action)("view-order-inner/order/getOrder")],G.prototype,"getOrder",void 0),D([Object(n.Action)("view-order-inner/pre-invoice/download")],G.prototype,"preInvoiceDownload",void 0),D([Object(n.Action)("view-order-inner/invoice/download")],G.prototype,"invoiceDownload",void 0),D([Object(n.Action)("auth/log-in/setRedirectPath")],G.prototype,"setRedirectPath",void 0),D([Object(n.Mutation)("view-order-inner/navigation/setSnapshot")],G.prototype,"setRouteFromSnapshot",void 0),D([Object(n.Getter)("view-order-inner/order/getOrderStatus")],G.prototype,"getOrderStatus",void 0),D([Object(n.Getter)("view-order-inner/order/getOrderError")],G.prototype,"getOrderError",void 0),D([Object(n.Getter)("view-order-inner/order/order")],G.prototype,"order",void 0),D([Object(n.Getter)("view-order-inner/order/orderItems")],G.prototype,"orderItems",void 0),D([Object(n.Getter)("view-order-inner/order/orderIsNew")],G.prototype,"orderIsNew",void 0),D([Object(n.Getter)("view-order-inner/order/orderIsCart")],G.prototype,"orderIsCart",void 0),D([Object(n.Getter)("auth/main/isAuthorized")],G.prototype,"isAuthorized",void 0),D([Object(n.Getter)("view-account-orders-list/orders/currentPage")],G.prototype,"ordersCurrentPage",void 0),D([Object(n.Getter)("view-order-inner/pre-invoice/downloadStatus")],G.prototype,"preInvoiceDownloadStatus",void 0),D([Object(n.Getter)("view-order-inner/pre-invoice/downloadError")],G.prototype,"preInvoiceDownloadError",void 0),D([Object(n.Getter)("view-order-inner/pre-invoice/downloadProcessing")],G.prototype,"preInvoiceProcessing",void 0),D([Object(n.Getter)("view-order-inner/invoice/downloadStatus")],G.prototype,"invoiceDownloadStatus",void 0),D([Object(n.Getter)("view-order-inner/invoice/downloadError")],G.prototype,"invoiceDownloadError",void 0),D([Object(n.Getter)("view-order-inner/invoice/downloadProcessing")],G.prototype,"invoiceProcessing",void 0);var U=G=D([Object(n.Component)({components:{ReturnList:A.a,OrderReturnAction:N.a,OrderReturnActionSkeleton:M.a,OrderInvoiceActions:R.a,OrderMeta:P.a,OrderItemsList:y.a,OrderItemsTable:
1x.a,OrderSummary:f.a,OrderDetails:k.a,OrderInvoiceActionsSkeleton:I.a,OrderMetaSkeleton:E.a,OrderSummarySkeleton:C.a,OrderDetailsSkeleton:$.a,OrderParcels:j.a}})],G),H=(t(2289),t(2)),z=Object(H.a)(U,function(){var r=this,e=r._self._c;r._self._setupProxy;return e("div",{staticClass:"white min-h-full pt-6 pt-md-12 pb-8 pb-md-12"},[e("div",{staticClass:"layout-container page-container"},[e("div",{staticClass:"border-sm-light py-sm-8"},[e("div",{staticClass:"px-1 px-sm-5 px-md-7 mb-6 d-md-flex justify-space-between"},[e("div",{staticClass:"text-h6 mb-6 mb-md-0",domProps:{innerHTML:r._s(r.$sanitize(r.$t("page_order_inner.title",{orderNumber:r.orderNumber})))}}),r._v(" "),e("div",{staticClass:"mb-4 mb-sm-0 flex-grow-0 flex-shrink-0 max-w-sm-290px w-full w-sm-auto"},[r.orderProcessing?e("OrderInvoiceActionsSkeleton"):r.order?e("OrderInvoiceActions",{attrs:{order:r.order,"pre-invoice-processing":r.preInvoiceProcessing,"invoice-processing":r.invoiceProcessing},on:{actionPreInvoice:r.downloadPreInvoiceHandler,actionInvoice:r.downloadInvoiceHandler}}):r._e()],1)]),r._v(" "),!r.orderProcessing&&r.showReturns?e("div",{staticClass:"text-h6 mb-6 px-8",domProps:{innerHTML:r._s(r.$sanitize(r.$t("page_order_inner.returns_title",{orderNumber:r.orderNumber})))}}):r._e(),r._v(" "),r.showReturns?e("ReturnList",{staticClass:"px-1 px-sm-5 px-md-7 mb-6",attrs:{returns:r.returns,loading:r.orderProcessing,"order-number":r.orderNumber,"data-test":"returns-list"}}):r._e(),r._v(" "),r.orderProcessing?r._e():e("div",{staticClass:"text-h6 mb-6 px-8",domProps:{innerHTML:r._s(r.$sanitize(r.$t("page_order_inner.order_title",{orderNumber:r.orderNumber})))}}),r._v(" "),e("div",{staticClass:"px-1 px-sm-5 px-md-8 mb-4 mb-md-6"},[r.orderProcessing?e("OrderMetaSkeleton"):r.order?e("OrderMeta",{attrs:{order:r.order}}):r._e()],1),r._v(" "),r.isOrderSplit?r._e():e("v-divider",{staticClass:"mx-4 d-md-none"}),r._v(" "),r.isOrderSplit&&!r.orderProcessing?e("div",{staticClass:"mt-md-0 mt-6 pt-md-0 pt-4"},r._l(r.groupedSubOrdersWithShipping,function(t,o){return e("div",{key:o,staticClass:"px-0 px-md-8 mb-md-6 mb-4"},[e("div",{staticClass:"suborder-container"},[e("div",{staticClass:"d-flex align-center justify-space-between mb-md-6 mb-4"},[e("div",[e("div",{staticClass:"text-body-1 dark--text font-weight-bold",domProps:{innerHTML:r._s(r.$sanitize(r.$t("page_account_order_inner.sub_order_shipping_title",{number:o+1})))}}),r._v(" "),e("div",{staticClass:"text-body-2 dark-grey--text mt-1"},[r._v("\n "+r._s(r.statusText(t.shipping))+"\n ")]),r._v(" "),r.showSubOrderParcels(t.shipping)?e("div",{staticClass:"text-body-2 dark-grey--text mt-1 d-md-none",domProps:{innerHTML:r._s(r.$sanitize(r.$t("order_shipment.parcels_note",{count:r.subOrderParcels(t.shipping).length})))}}):r._e()]),r._v(" "),r.showSubOrderParcels(t.shipping)?e("div",{staticClass:"text-body-2 dark-grey--text d-none d-md-block",domProps:{innerHTML:r._s(r.$sanitize(r.$t("order_shipment.parcels_note",{count:r.subOrderParcels(t.shipping).length})))}}):r._e(),r._v(" "),r.showTrackingLink(t.shipping)&&!r.showSubOrderParcels(t.shipping)?e("v-btn",{staticClass:"track-button",attrs:{href:r.trackingLink(t.shipping),color:"primary"}},[e("span",{staticClass:"white--text",domProps:{innerHTML:r._s(r.$sanitize(r.$t("order_shipment.track_button")))}})]):r._e()],1),r._v(" "),r.showSubOrderParcels(t.shipping)?e("OrderParcels",{staticClass:"mb-4 mb-md-6",attrs:{parcels:r.subOrderParcels(t.shipping),"data-test":"sub-order-parcels"}}):r._e(),r._v(" "),r.isMobile?e("OrderItemsList",{attrs:{"order-items":t.items,"order-token":r.orderToken,split:r.isOrderSplit,processing:r.orderProcessing}}):e("OrderItemsTable",{attrs:{"order-items":t.items,"order-token":r.orderToken,split:r.isOrderSplit,processing:r.orderProcessing}})],1)])}),0):[e("div",{staticClass:"px-sm-8 mx-n4 mx-md-0"},[r.isMobile?e("OrderItemsList",{attrs:{"order-items":r.orderItems,"order-token":r.orderToken}}):e("OrderItemsTable",{attrs:{"order-items":r.orderItems,"order-token":r.orderToken}})],1)],r._v(" "),r.isOrderSplit?r._e():e("v-divider",{staticClass:"mx-8 mb-10 d-none d-md-block"}),r._v(" "),e("div",{staticClass:"mb-4 mb-md-10 mx-n3 mx-sm-0 px-sm-12"},[e("v-row",{attrs:{"no-gutters":""}},[e("v-col",{staticClass:"pl-md-5",attrs:{cols:"12",md:"5","offset-md":"7"}},[r.orderProcessing?e("OrderSummarySkeleton"):r.order?e("OrderSummary",{attrs:{order:r.order}}):r._e()],1)],1)],1),r._v(" "),e("v-divider",{staticClass:"mx-1 mx-sm-5 mb-4 mx-lg-8 mb-lg-6"}),r._v(" "),e("div",{staticClass:"px-1 px-sm-5 px-lg-8"},[r.orderProcessing?e("OrderDetailsSkeleton"):r.order?e("OrderDetails",{attrs:{order:r.order}}):r._e()],1),r._v(" "),r.availableToReturn?e("div",{staticClass:"px-4 px-lg-8 d-flex justify-end"},[r.orderProcessing?e("OrderReturnActionSkeleton"):r.order?e("OrderReturnAction",{attrs:{"order-token":r.orderToken}}):r._e()],1):r._e()],2)])])},[],!1,null,"0b66c4dc",null);e.default=z.exports}}]);
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.