1"use strict";(self.webpackChunkpuratos_react=self.webpackChunkpuratos_react||[]).push([[4554],{6010(e,t,r){r.d(t,{S:()=>s,z:()=>n});r(96540);var l=r(74848);const a={display:"initial"},n={sm:"-13",md:"",lg:"-15"},s=e=>{let{id:t,className:r,label:s="",selected:o,onChange:i,size:c=n.md,centered:d,list:u=!1,hideMobile:p=!1,hideDesktop:m=!1,disabled:h=!1}=e;return(0,l.jsxs)("div",{className:"p-checkbox"+c+(d?" center":"")+(u?" list":"")+(p?" important-hide-mobile":"")+(m?" important-hide-desktop":"")+(h?" disabled":""),children:[(0,l.jsx)("input",{id:t,type:"checkbox",className:r,checked:o,onChange:i,disabled:h}),(0,l.jsx)("label",{htmlFor:t,className:"p-cursor-pointer",style:a,children:s})]})}},36173(e,t,r){r.d(t,{A:()=>i});r(96540);var l=r(5556),a=r.n(l),n=r(67849),s=r(74848);const o=e=>{let{amount:t,label:r,pluralLabel:l}=e;const a=(0,n.GO)()(1!==t?l:r).replace("{0}","<span>"+t+"</span>");return(0,s.jsx)("h3",{className:"p-section-result-counter p-margin-none",dangerouslySetInnerHTML:{__html:a}})};o.propTypes={amount:a().number,label:a().string,pluralLabel:a().string},o.defaultProps={pluralLabel:"{0} items",label:"{0} item",amount:0};const i=o},9713(e,t,r){r.d(t,{A:()=>k});var l=r(96540),a=r(19115),n=r(5556),s=r.n(n),o=r(74802),i=r.n(o),c=r(9496),d=r(42325),u=r(74848);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,l)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var l=r.call(e,t||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const f=e=>{let{item:t,getItemProps:r}=e;return(0,u.jsx)("li",m(m({className:"tt-suggestion tt-selectable"},r({item:t})),{},{children:(0,u.jsx)("span",{children:t})}))},b=e=>{let{getToggleButtonProps:t,toggleMenu:r,selectedAmount:l,option:a,isOpen:n,disabled:s}=e;return(0,u.jsxs)("span",m(m({},t({disabled:s.length<2})),{},{onClick:r,onKeyDown:e=>"Enter"===e.key&&r(),role:"button",tabIndex:0,className:"form-control form-icon ".concat(n&&"form-control--border-red"),children:[l||a,(0,u.jsx)("span",{className:"p-select--icon"})]}))},g=e=>{let{title:t,total:r,options:a,handleAmountInput:n}=e;return(0,u.jsxs)("div",{className:"form-group",children:[(0,u.jsx)("label",{className:"form-label",children:t}),(0,u.jsx)(d.Ay,{onChange:e=>((e,t,r)=>{t(-1!==e?e:void 0,r)})(e,n,r),children:e=>{let{getItemProps:t,isOpen:n,toggleMenu:s,selectedItem:o,getToggleButtonProps:d}=e;return(0,u.jsxs)("span",{children:[(0,u.jsx)(b,{selectedAmount:o,option:a[0]&&a[0].value||c.GL,toggleMenu:s,getToggleButtonProps:d,isOpen:n,disabled:a}),(0,u.jsx)("ol",{className:"tt-dataset tt-dataset-suggest tt-rounded p-block p-absolute ".concat(n&&(null===a||void 0===a?void 0:a.length)>2&&"tt-open"),children:n&&(null===a||void 0===a?void 0:a.length)>=2&&a.map((e,a,n)=>(0,u.jsx)(l.Fragment,{children:(0===a||r>e||n[0===a?0:a-1]<=r&&n[a]>=r)&&(0,u.jsx)(f,{item:e,getItemProps:t})},i()(a)))})]})}})]})};g.defaultProps={total:0,options:[]},g.propTypes={title:s().string,total:s().number,options:s().arrayOf(s().number),handleAmountInput:s().func};const v=g;var j=r(99507),x=r(67849);const y=["context","label","total","options","updatePaginationAndPage","translate","pagination"];function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,l)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?P(Object(r),!0).forEach(function(t){O(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function O(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var l=r.call(e,t||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const w={updatePaginationAndPage:j.E2},C=[],k=(0,x.lI)((0,a.connect)(void 0,w)(function(e){let{context:t,label:r,total:a,options:n,updatePaginationAndPage:s,translate:o,pagination:i}=e,c=function(e,t){if(null==e)return{};var r,l,a=function(e,t){if(null==e)return{};var r={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(-1!==t.indexOf(l))continue;r[l]=e[l]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)r=n[l],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,y);const d=l.useCallback((e,r)=>s({context:t,value:e,total:r}),[t]);return n&&n[0]?a<n[0]&&(n=[n[0]]):n=C,(0,u.jsx)("div",{className:"p-filter-toolbar__item",children:(0,u.jsx)(v,N(N({},c),{},{title:o(r),total:a,options:n,handleAmountInput:d}))},"amount")}))},54170(e,t,r){r.d(t,{A:()=>o});var l=r(96540),a=r(67849),n=r(28208),s=r(74848);const o=(0,n.G)((0,a.lI)(function(e){let{label:t,initialValue:r,onChange:a,translate:n,placeholder:o,reset:i}=e;const[c,d]=l.useState(""),[u,p]=l.useState("");return l.useEffect(()=>d(r),[r]),(0,s.jsxs)("div",{className:"form-group",children:[(0,s.jsx)("label",{className:"form-label",children:t&&n(t)}),(0,s.jsxs)("form",{onSubmit:e=>((e,t,r)=>{e&&e.preventDefault&&e.preventDefault(),r(t)})(e,c,a),className:"p-margin-none dropdown",children:[(0,s.jsx)("input",{type:"text",className:"form-control form-icon round",ref:e=>p(e),placeholder:o&&n(o),onInput:e=>((e,t)=>{e.persist(),t(e&&e.target&&e.target.value||"")})(e,d)}),(0,s.jsxs)("button",{type:"submit",className:"p-filter-form__btn",children:[(0,s.jsx)("span",{className:"sr-only",children:n("Search")}),(0,s.jsx)("span",{className:"svg-search-black-circle"})]})]}),(0,s.jsx)("a",{className:"p-filter-toolbar__reset",onClick:()=>((e,t,r)=>{t&&(t.value=""),e&&e(""),r()})(d,u,i),children:(0,s.jsx)("span",{children:n("Reset search")})})]})}))},68797(e,t,r){r.d(t,{W:()=>p});var l=r(96540),a=r(5556),n=r(19115),s=r(82960),o=r(67849),i=r(88481),c=r(73354),d=r(74848);function u(e){let{children:t,translate:r}=e;const[a,n]=l.useState(!1);return(0,d.jsx)("div",{className:"row",children:(0,d.jsxs)("div",{className:"col-sm-12",children:[(0,d.jsx)("div",{className:"collapse p-filter-toolbar"+(a?" in":""),children:t}),(0,d.jsx)("div",{className:"p-filter-toggle p-margin-bottom-md",children:(0,d.jsxs)("div",{className:"p-flex p-flex-align-center",onClick:()=>n(!a),children:[(0,d.jsx)("span",{className:"p-filter-toggle__icon svg-reset-red-circle"}),(0,d.jsx)("span",{className:"p-filter-toggle__text",children:r("filtersText")})]})})]})})}u.propTypes={hasFiltering:a.bool,translate:a.func.isRequired,filters:a.object};const p=(0,s.Zz)(o.lI,(0,n.connect)((e,t)=>({hasFiltering:(0,c.RI)((0,i.vD)(e,t.filterId))})))(u);p.FilterSection=e=>{let{children:t}=e;return(0,d.jsx)("div",{className:"p-filter-toolbar__items",children:t})},p.SearchSection=e=>{let{children:t}=e;return(0,d.jsx)("div",{className:"p-filter-toolbar__search",children:t})}},39501(e,t,r){r.d(t,{A:()=>T});var l=r(96540),a=r(5556),n=r.n(a),s=r(90249),o=r(84193),i=r(74848);const c=e=>{let{activePage:t,pageClickHandler:r,amountOfPages:l,amountToShow:a}=e;return(0,i.jsxs)("ul",{className:"pagination pagination-sm",children:[(0,i.jsx)("li",{className:1===t?"disabled":"",children:(0,i.jsx)("a",{href:"#","aria-label":"Previous",onClick:()=>1!==t&&r(t-1),children:(0,i.jsx)("span",{"aria-hidden":"true"})})}),(0,i.jsx)("li",{className:1===t?"active":"",children:(0,i.jsx)("a",{href:"#",onClick:()=>r(1),children:"1"})}),(0,i.jsx)("li",{className:t-(a-1)/2>2?"":"hide",children:(0,i.jsx)("a",{href:"#",onClick:()=>r(t-3),children:"..."})}),Array(Math.ceil(l-2<0?0:l-2)).fill().map((e,l)=>(0,i.jsx)("li",{className:(t===l+2?"active":"")+(t-(a-1)/2>l+2||t+(a-1)/2<l+2?"hide":""),children:(0,i.jsx)("a",{href:"#",onClick:()=>r(l+2),children:l+2})},l+1)),(0,i.jsx)("li",{className:l-t-(a-1)/2>=2?"":"hide",children:(0,i.jsx)("a",{href:"#",onClick:()=>r(t+3),children:"..."})}),(0,i.jsx)("li",{className:(t===Math.ceil(l)?"active ":"")+(l<=1?"hide":""),children:(0,i.jsx)("a",{href:"#",onClick:()=>r(Math.ceil(l)),children:Math.ceil(l)})}),(0,i.jsx)("li",{className:l<=t?"disabled":"",children:(0,i.jsx)("a",{href:"#","aria-label":"Next",onClick:()=>!(l<=t)&&r(t+1),children:(0,i.jsx)("span",{"aria-hidden":"true"})})})]})};c.propTypes={activePage:n().number,amountOfPages:n().number,pageClickHandler:n().func,amountToShow:n().number},c.defaultProps={activePage:1,amountOfPages:1,amountToShow:5};const d=(0,o.X)(c);var u=r(36173),p=r(37961),m=r(19115),h=r(746),f=r(24518),b=r(68797),g=r(9496),v=r(29521),j=r(88481),x=r(99507),y=r(93390),P=r(67849),N=r(13956),O=r(17477),w=r(6010);const C=e=>{let{total:t,payInvoices:r,disabled:l,blockButton:a,mobileSticky:n,selectAll:s,isAllSelected:o}=e;const c=(0,P.GO)(),d=(0,O.a)("1000px");return(0,i.jsxs)("div",{className:"p-flex p-flex-align-center p-filtered-list ".concat(n&&d?"mobile-section sticky p-flex-justify-content-space-between p-flex-wrap":"p-flex-justify-content-end"," ").concat(d&&a?"top-section":""),style:n&&d?{display:"none"}:null,children:[(0,i.jsx)("div",{className:"p-flex p-filtered-list-amount ".concat(n&&d?"p-margin-top-xs p-margin-bottom-xs":""),children:(0,i.jsx)("p",{className:"p-filtered-list-total",children:c("Total selected: {0}",t)})}),(0,i.jsx)(N.$,{color:"primary",onClick:r,disabled:l,block:d&&!n,children:c(d?"Pay invoices":"Pay")}),d&&a&&(0,i.jsx)("div",{className:"p-flex p-filtered-list-amount p-margin-top-sm ".concat(n?"p-margin-bottom-xs":""),children:(0,i.jsx)(w.S,{id:"selectAllMobile",selected:o,onChange:s,label:c("Select all"),centered:!0},"selectAllMobile")}
1)]})};var k=r(32809);function A(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var l=r.call(e,t||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class S extends l.Component{constructor(){super(...arguments),A(this,"handlePageClick",e=>this.props.updateActivePage({context:this.props.context,value:e}))}shouldRenderPagination(e,t){return!(!e||0===e||!t||0===t)}render(){const{i18n:e,aemResource:t,totalAmount:r,activePage:a,children:n,loading:o,total:c,allowedRoles:m,itemsPerPage:h,notAllowedRoles:g,eCommerceRequired:j,activeFilters:x,className:P,context:N,listHeader:O,listFooter:w,invoicesAmount:A,payButtonDisabled:S,payInvoices:_,onlinePaymentEnabled:T=!1,selectAll:I,isAllSelected:R,skeletonType:D=k.N.PRODUCTS}=this.props,M="invoices"===N||"orders"===N;return(0,i.jsxs)(v.E.Provider,{value:N,children:[(0,i.jsx)("div",{className:"row",children:(0,i.jsx)(p.d,{roles:m,eCommerceRequired:j,children:(0,i.jsx)("div",{className:"col-xs-12",children:l.Children.map(n,e=>e.type===b.W?e:null)})})}),(0,i.jsx)(f.E,{loading:o,messages:t,total:c,allowedRoles:m,activeFilters:x,notAllowedRoles:g,eCommerceRequired:j,children:(0,i.jsxs)("div",{className:"row "+P,children:[(0,i.jsxs)("div",{className:"col-xs-12 p-flex p-justify-space-between p-flex-align-end ".concat(M?"invoice-filter":""),children:[(0,i.jsx)(u.A,{amount:c}),M&&T?(0,i.jsx)(C,{total:r,payInvoices:_,disabled:S,blockButton:!0,selectAll:I,isAllSelected:R}):null]}),(0,i.jsxs)("div",{className:"col-xs-12",children:[(0,i.jsx)(y.XI,{children:(0,i.jsx)(s.x,{listModel:t,i18n:e,loading:o,activePage:a,amountOfItems:h,resultsHeader:O,listFooter:w,skeletonType:D,children:l.Children.map(n,(e,t)=>e.type!==b.W?e:null)})}),M&&T?(0,i.jsx)(C,{total:r,payInvoices:_,disabled:S,mobileSticky:!0}):null,(0,i.jsx)("div",{className:"row",children:(0,i.jsx)("div",{className:"col-sm-12",children:(0,i.jsx)("nav",{"aria-label":"Page navigation",className:"p-flex p-justify-space-around",children:this.shouldRenderPagination(h,c)&&(0,i.jsx)(d,{activePage:a,amountOfPages:Math.ceil(c/h),pageClickHandler:this.handlePageClick})})})})]})]})})]})}}S.propTypes={loading:n().bool,itemsPerPage:n().number,context:n().string,activePage:n().number.isRequired,activeFilters:n().object.isRequired,className:n().string},S.defaultProps={loading:!0,allowedRoles:[h.ai.puratosCustomerValidated,h.ai.puratosCustomerNoAuth],notAllowedRoles:[h.ai.puratosNoCustomer,h.ai.puratosCustomerUnvalidated],activeFilters:{},itemsPerPage:g.GL,className:""};const _={updateActivePage:x.fl},T=(0,m.connect)((e,t)=>({i18n:e.myPuratos_i18n.i18n,activePage:(0,j.WE)(e,t.context),activeFilters:(0,j.vD)(e,t.context)}),_)(S)},73969(e,t,r){r.d(t,{A:()=>b});var l=r(96540),a=r(5556),n=r.n(a),s=r(62962),o=r.n(s),i=r(19115),c=r(94940),d=r(70223),u=r(54950),p=r(74848);function m(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var l=r.call(e,t||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class h extends l.Component{constructor(){super(...arguments),m(this,"state",{open:!1,activeId:void 0}),m(this,"handleClose",()=>{const{activeId:e}=this.state;e&&this.props.removeAlertMessage(e),this.props.resetQuantity&&this.props.resetQuantity(1)}),m(this,"shouldDisplayModal",()=>{const{alerts:e}=this.props,t=e.filter(e=>d.Wg.includes(e.type||e));t&&t.length>0?(this.setState({activeId:t[0]}),this.setState({open:!0})):this.setState({open:!1})})}componentDidUpdate(e){const{alerts:t}=this.props;e.alerts!==t&&this.shouldDisplayModal()}render(){const{open:e}=this.state,{title:t,alerts:r,lastProductAdded:l,i18n:a}=this.props,n=r.map(e=>{switch(e.type||e){case d.oA.allProducts.addToCart:case d.oA.promotions.addToCart:case d.oA.myProducts.addToCart:return"".concat((0,u.T)(a,"Product")," ").concat(l?l.aemProdName+" ":"").concat((0,u.T)(a,"has been added to your cart"));default:return}});return(0,p.jsx)(o(),{show:e,large:!0,className:"modal modal-print p-modal fade my-puratos",onHide:this.handleClose,children:(0,p.jsx)("div",{className:"",children:(0,p.jsx)("div",{className:"p-modal__content",children:(0,p.jsxs)("div",{className:"modal-dialog modal-dialog-print p-modal__dialog ",role:"document",children:[(0,p.jsx)("button",{type:"button",className:"close p-modal__close",onClick:this.handleClose,children:(0,p.jsx)("span",{"aria-hidden":"true",children:"\xd7"})}),(0,p.jsx)("h3",{children:(0,u.T)(a,t)}),(0,p.jsx)(o().Body,{className:"well p-modal__well text-center",children:(0,p.jsx)("p",{className:"p-margin-top-sm",children:n})})]})})})})}}h.propTypes={activeItem:n().object,handleToggleModal:n().func},h.defaultProps={alerts:[]};const f={removeAlertMessage:c.Mt},b=(0,i.connect)(e=>({i18n:e.myPuratos_i18n.i18n,alerts:e.myPuratos_alerts.alerts,lastProductAdded:e.myPuratos_alerts.lastProductAdded,myProductsResource:e.myPuratos_myProducts.aemResource,allProductsResource:e.myPuratos_allProducts.aemResource,resetQuantity:e.myPuratos_myProducts.resetQuantity}),f)(h)}}]); 2//# sourceMappingURL=4554.3561b884.chunk.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.