1"use strict";(self.webpackChunkchefworks_theme=self.webpackChunkchefworks_theme||[]).push([[66],{97296(e,r,t){t.r(r),t.d(r,{HeaderInfo:()=>u});var n=t(14041),s=t(7459);const o="FufKKAhDt7KoqjEZNKYP",a="GkPnU55u7AQ7tZQ2ndKk",i="hKUBOvgg5WsP19Xm0nwc";function u(e){var r=e.title,t=void 0===r?void 0:r,u=e.className,c=void 0===u?void 0:u,d=e.titleClassName,l=void 0===d?void 0:d,f=e.textClassName,p=void 0===f?void 0:f,h=e.children;return n.createElement("div",{className:(0,s.classes)(o,c||"")},t&&n.createElement("div",{className:(0,s.classes)(a,l||"")},t),n.createElement("div",{className:(0,s.classes)(i,p||"")},h))}},49849(e,r,t){t.r(r),t.d(r,{ReorderAction:()=>y});var n,s=t(14041),o=t(64836),a=t(30004),i=t(7459),u=t(44188),c=t(55146),d=function(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e},l=(0,t(1588).gql)(n||(n=d(["\n mutation CUSTOM_REORDER(\n $orderNumber: String!\n ) {\n customReorder(\n orderNumber: $orderNumber\n ) {\n result\n redirectUrl\n userErrors {\n message\n code\n }\n }\n }\n"],["\n mutation CUSTOM_REORDER(\n $orderNumber: String!\n ) {\n customReorder(\n orderNumber: $orderNumber\n ) {\n result\n redirectUrl\n userErrors {\n message\n code\n }\n }\n }\n"]))),f=t(11168),p=t(45257),h=t(85515),m=t(68476),v=t(30405);const g={LargeMobile:"(max-width: 1040px) and (min-width: 876px)",MediumMobile:"(max-width: 875px) and (min-width: 591px)",SmallMobile:"(max-width: 590px) and (min-width: 401px)",VerySmallMobile:"(max-width: 400px)",reorderActionPopupContent:"nCpkRPQCDJuFI9KTLXFT"};var _=function(e,r,t,n){return new(t||(t=Promise))(function(s,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function i(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var r;e.done?s(e.value):(r=e.value,r instanceof t?r:new t(function(e){e(r)})).then(a,i)}u((n=n.apply(e,r||[])).next())})},b=function(e,r){var t,n,s,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=i(0),a.throw=i(1),a.return=i(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(u){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(o=0)),o;)try{if(t=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=r.call(e,o)}catch(e){i=[6,e],n=0}finally{t=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};var y=(0,c.connectCart)(function(e){var r=this,t=e.order,n=e.setWrapperHasZIndex,c=void 0===n?void 0:n,d=e.setOrderHeaderToggleEnabled,y=void 0===d?void 0:d,w=e.className,E=void 0===w?void 0:w,S=e.showMessages,T=void 0===S||S,I=e.showMessagesInPopup,M=void 0===I||I,P=e.getCartList,k=(0,s.useState)(!1),C=k[0],O=k[1],x=(0,s.useState)(!1),N=x[0],A=x[1],R=(0,s.useState)(!1),U=R[0],D=R[1],K=(0,s.useState)(!1),q=K[0],B=K[1],W=(0,s.useState)(void 0),j=W[0],L=W[1],F=(0,s.useState)([]),H=F[0],$=F[1],Q=(0,s.useState)([]),Z=Q[0],G=Q[1],V=(0,s.useState)(!1),X=V[0],Y=V[1],J=(0,s.useState)(!1),z=J[0],ee=J[1],re=(0,a.usePhraseTranslater)(),te=(0,u.useNavigate)(),ne=t.number,se=t.is_magento_order,oe=t.items,ae=function(){return _(r,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:return[4,P()];case 1:return e.sent(),[2]}})})},ie=(0,o.useMutation)(l,{fetchPolicy:"no-cache",errorPolicy:"all",onError:function(){ae().then(),G([re("Something went wrong while reordering the Order #%1. Please, try again later.",ne)]),ee(!0)},onCompleted:function(e){ae().then();var r=e.customReorder,t=r.result,n=r.redirectUrl,s=r.userErrors,o=null!=s?s:[],a=o.length>0;L(n||void 0);var i=[];if(t){var u=[];u.push(re("The Order #%1 has been reordered successfully.",ne)),n&&n.length>0&&(M?u.push(re("You will be redirected to the cart page in few seconds after closing this popup.")):u.push(re("Redirecting to the cart in few seconds..."))),$(u),Y(!0)}else{var c=re("Reorder action has been failed for Order #%1. Please, try again later.",ne);i.push(c),a&&o.forEach(function(e){var r=e.message;i.push(r)}),G(i),ee(!0)}}})[0],ue=function(){return _(r,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:return Y(!1),ee(!1),L(void 0),B(!0),[4,ie({variables:{orderNumber:ne}})];case 1:return e.sent(),[2]}})})};return(0,s.useEffect)(function(){D(T&&M&&(X||z))},[T,M,X,z]),(0,s.useEffect)(function(){oe.forEach(function(e){C||!C&&e.product_is_rma_shipping_fee&&O(!0)});var e=(0,v.hasAvailableOrderItems)(oe);A(e)},[oe]),(0,s.useEffect)(function(){c&&c(U),y&&y(!U)},[U]),se&&N&&!C?s.createElement("div",{className:(0,i.classes)(g.reorder,E||"")},q&&s.createElement("div",{className:(0,i.classes)(g.reorderRow,g.archivingLabel)},re("Reordering...")),!q&&s.createElement(s.Fragment,null,s.createElement("div",{className:(0,i.classes)(g.reorderRow,g.reorderActionSection)},s.createElement(h.Link,{label:re("Reorder"),linkClassName:g.reorderBtn,href:"/",opacityOnHover:!0,action:function(e){e&&e.preventDefault(),e&&e.stopPropagation(),ue().finally(function(){B(!1)})}})),T&&M&&s.createElement(m.default,{isVisible:U,onClose:function(){D(!1),j&&j.length&&setTimeout(function(){(0,f.navigateToUrl)({navigate:te,url:j})},2e3)},classNameContentCnt:g.reorderActionPopupContent},s.createElement(p.Messages,{mainWrapperClassName:(0,i.classes)(g.reorderRow,g.reorderMessages),successMessages:H,showSuccessMessages:X,setShowSuccessMessages:Y,errorMessages:Z,showErrorMessages:z,setShowErrorMessages:ee,hideMessages:!1})),T&&!M&&s.createElement(p.Messages,{mainWrapperClassName:(0,i.classes)(g.reorderRow,g.reorderMessages),successMessages:H,showSuccessMessages:X,setShowSuccessMessages:Y,hideSuccessMessagesDelay:5e3,errorMessages:Z,showErrorMessages:z,setShowErrorMessages:ee,hideErrorMessagesDelay:7e3}))):null})},30405(e,r,t){t.r(r),t.d(r,{buyAgainAllowedTypes:()=>s,gasExistingInOtherWebsitesOrThirdPartyOrderItems:()=>h,getAddToCartItem:()=>c,getAddToCartOrderItemIds:()=>u,getAddToCartOrderItems:()=>l,getAddToCartSkus:()=>g,getAddToCartThirdPartySkus:()=>_,getAvailableEmbOrderItems:()=>p,getAvailableOrderItems:()=>
1f,getOrderItemsByIds:()=>a,getOrderItemsSkus:()=>i,getSuccessfullyAddedSkus:()=>v,getThirdPartyItemsToAddToCart:()=>b,getThirdPartyToCartItem:()=>d,hasAvailableOrderItems:()=>m,isEmbItem:()=>o});var n=t(76398),s=[(0,n.getProductTypeSimple)(),(0,n.getProductTypeConfigurable)(),(0,n.getProductTypeBundle)()],o=function(e){var r=e.eid,t=e.epid,n=e.has_embroidered_items;return!!(r||t||n)},a=function(e,r){return e.filter(function(e){return r.includes(e.id)})},i=function(e){return e.map(function(e){return e.associated_product_sku})},u=function(e){return e.map(function(e){return e.id})},c=function(e){var r=e.associated_product_sku,t=e.add_to_cart_options,n=e.quantity_ordered;return{quantity:n>0?n:1,sku:r,selected_options:t||[]}},d=function(e){var r=e.id,t=e.associated_product_sku,n=e.third_party_info,s=e.quantity_ordered,o=!!(null==n?void 0:n.product_exists_in_current_website);return{id:r,sku:t,quantity:s>0?s:1,isThirdParty:!o&&!!(null==n?void 0:n.is_third_party),productExistsInOtherWebsites:!o&&!!(null==n?void 0:n.product_exists_in_other_websites)}},l=function(e){var r=[],t={};return e.forEach(function(e){var s=e.parentBundleItem,o=e.product_type;if(s||o===(0,n.getProductTypeBundle)()){var a=s||e,i=a.id;if(!t[i]){t[i]=a;var u=c(a);r.push(u)}}else{var d=c(e);r.push(d)}}),r},f=function(e){var r=e.orderItems,t=e.isThirdPartyEnabled;return r.filter(function(e){var r=e.product_type,n=e.product_is_salable,a=e.product_is_third_party;return s.includes(r)&&n&&!o(e)&&(!a||t)})},p=function(e){var r=e.orderItems,t=e.isThirdPartyEnabled;return r.filter(function(e){var r=e.product_is_salable,n=e.product_is_third_party;return r&&o(e)&&(!n||t)})},h=function(e){var r=e.orderItems;return e.isThirdPartyEnabled?r.filter(function(e){var r=e.product_is_salable,t=e.third_party_info,n=e.product_sale_price.value;return!r&&n>0&&t&&!t.product_exists_in_current_website&&(t.is_third_party||t.product_exists_in_other_websites)}):[]},m=function(e){var r=f({orderItems:e}),t=p({orderItems:e}),n=h({orderItems:e});return r.length>0||t.length>0||n.length>0},v=function(e,r){return e.filter(function(e){return void 0!==r.find(function(r){var t=r.product.sku;return e===t})})},g=function(e){return e.map(function(e){return e.sku})},_=function(e){return e.map(function(e){return e.sku})},b=function(e){return e.map(function(e){return d(e)})}}}]); 2//# sourceMappingURL=66.bundle.fbbd6d4aa042a8cd1913.js.map
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.