1"use strict";(self.webpackChunkintershop_pwa=self.webpackChunkintershop_pwa||[]).push([[6807],{29329:(j,$,i)=>{i.d($,{E:()=>x});var a=i(81383),t=i(92434),e=i(91817),d=i(70271),E=i(36647),F=i(84957),N=i(19244);const m=(0,a.UX)("productNotifications");var y=i(38123);const h=(0,a.Mz)(m,n=>n?n.productNotifications:y.ue),v=(0,a.Mz)(h,n=>n.loading),M=(0,a.Mz)(h,n=>n.error),{selectAll:b}=y.Ic.getSelectors(h);var T=i(37580);let x=(()=>{class n{constructor(g){this.store=g,this.productNotificationsLoading$=this.store.pipe((0,a.Lt)(v)),this.productNotificationsError$=this.store.pipe((0,a.Lt)(M)),this.productNotificationType$=this.store.pipe((0,a.Lt)((0,F.NL)("notificationType")),(0,e.F)(),(0,d.T)(P=>P||"price")),this.productNotificationsByRoute$=this.productNotificationType$.pipe((0,E.n)(P=>this.productNotifications$(P)))}productNotifications$(g){return this.store.dispatch(N.J.loadProductNotifications({type:g})),this.store.pipe((0,a.Lt)((n=>(0,a.Mz)(b,_=>_.filter(g=>g.type===n)))(g)))}productNotificationBySku$(g,P){return this.store.dispatch(N.J.loadProductNotifications({type:P})),this.store.pipe((0,a.Lt)(((n,_)=>(0,a.Mz)(b,g=>g.filter(P=>P.sku===n&&P.type===_)))(g,P))).pipe((0,d.T)(O=>O?.length?O[0]:void 0),(0,e.F)(t.A))}createProductNotification(g){this.store.dispatch(N.J.createProductNotification({productNotification:g}))}updateProductNotification(g,P){this.store.dispatch(N.J.updateProductNotification({sku:g,productNotification:P}))}deleteProductNotification(g,P,O){this.store.dispatch(N.J.deleteProductNotification({sku:g,productNotificationType:P,productNotificationId:O}))}static{this.\u0275fac=function(P){return new(P||n)(T.KVO(a.il))}}static{this.\u0275prov=T.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})()},34278:(j,$,i)=>{i.d($,{w:()=>e});var a=i(69444),t=i(37580);let e=(()=>{class d{static{this.\u0275fac=function(N){return new(N||d)}}static{this.\u0275mod=t.$C({type:d})}static{this.\u0275inj=t.G2t({imports:[a.SharedModule]})}}return d})()},96690:(j,$,i)=>{i.d($,{Z:()=>v});var a=i(27382),t=i(29329),e=i(37580),d=i(80329),E=i(60316),F=i(39143),N=i(17518),m=i(90852);const y=function(){return["fas","trash-alt"]},h=function(M,b,C){return{confirmText:M,rejectText:b,titleText:C}};let v=(()=>{class M{constructor(C,S){this.productNotificationsFacade=C,this.context=S}ngOnInit(){this.productName$=this.context.select("product","name")}openConfirmationDialog(C){C.show()}deleteProductNotification(){const C=this.context.get("sku");this.productNotificationsFacade.deleteProductNotification(C,this.productNotification.type,this.productNotification.id)}static{this.\u0275fac=function(S){return new(S||M)(e.rXU(t.E),e.rXU(a.v))}}static{this.\u0275cmp=e.VBU({type:M,selectors:[["ish-product-notification-delete"]],inputs:{productNotification:"productNotification",cssClass:"cssClass"},decls:10,vars:20,consts:[["type","button","data-testing-id","product-notification-delete",3,"ngClass","title","click"],[3,"icon"],[3,"options","confirmed"],["deleteDialog",""],[3,"ishServerHtml"]],template:function(S,T){if(1&S){const x=e.RV6();e.j41(0,"button",0),e.bIt("click",function(){e.eBV(x);const _=e.sdS(4);return e.Njj(T.openConfirmationDialog(_))}),e.nI1(1,"translate"),e.nrm(2,"fa-icon",1),e.k0s(),e.j41(3,"ish-modal-dialog",2,3),e.bIt("confirmed",function(){return T.deleteProductNotification()}),e.nI1(5,"translate"),e.nI1(6,"translate"),e.nI1(7,"async"),e.nrm(8,"div",4),e.nI1(9,"translate"),e.k0s()}2&S&&(e.Y8G("ngClass",T.cssClass)("title",e.bMT(1,5,"product.notification.delete.link.title")),e.R7$(2),e.Y8G("icon",e.lJ4(15,y)),e.R7$(1),e.Y8G("options",e.sMw(16,h,e.bMT(5,7,"product.notification.delete.button.label"),e.bMT(6,9,"product.notification.delete.cancel.button.label"),e.bMT(7,11,T.productName$))),e.R7$(5),e.Y8G("ishServerHtml",e.bMT(9,13,"product.notification.delete.message")))},dependencies:[d.p,E.YU,F.Y,N.aY,E.Jj,m.D9],encapsulation:2,changeDetection:0})}}return M})()},67646:(j,$,i)=>{i.d($,{O:()=>L});var a=i(24398),t=i(37580),e=i(49074),d=i(95072),E=i(70271),F=i(64334),N=i(86859),m=i(27382),y=i(82340),h=i(60316),v=i(17518),M=i(34456),b=i(59452),C=i(36647),S=i(86301),T=i(8412),x=i(71663),n=i(29329),_=i(7047),g=i(90349),P=i(95860),O=i(74385);let U=(()=>{class l{constructor(o,c){this.appFacade=o,this.context=c}ngOnChanges(){if(this.userEmail&&this.form){const o=this.context.get("product"),c=this.context.get("prices");this.model=this.productNotification?{alertType:this.productNotification.type,email:this.productNotification.notificationMailAddress,priceValue:this.productNotification.price?.value,productNotificationId:this.productNotification.id}:{alertType:void 0,email:this.userEmail,priceValue:c?.salePrice?.value||99.99},this.fields=this.productNotification?this.getFieldsForProductNotification(this.productNotification,o):this.getFieldsForNoProductNotification(o)}}getFieldsForProductNotification(o,c){return[{key:"alertType",type:"ish-radio-field",props:{label:"product.notification.edit.form.no_notification.label",fieldClass:"ps-0",value:"delete"}},{key:"productNotificationId"},..."price"===o?.type||c?.available?this.getPriceConfigForProductNotification():[],..."stock"!==o?.type&&c?.available?[]:this.getStockConfigForProductNotification(),...this.getEmailConfig()]}getFieldsForNoProductNotification(o){return[{key:"alertType",props:{value:""}},{type:"ish-fieldset-field",props:{legend:o?.available?"product.notification.edit.form.price_notification.label":"product.notification.edit.form.instock_notification.label",legendClass:"row mb-3"},fieldGroup:[...o?.available?this.getPriceConfig():[],...this.getEmailConfig()]}]}getPriceConfigForProductNotification(){return[{key:"alertType",type:"ish-radio-field",props:{label:"product.notification.edit.form.price_notification.label",fieldClass:"ps-0",value:"price"}},...this.getPriceConfig()]}getStockConfigForProductNotification(){return[{key:"alertType",type:"ish-radio-field",props:{label:"product.notification.edit.form.instock_notification.label",fieldClass:"ps-0",value:"stock"}}]}getPriceConfig(){return[{key:"priceValue",type:"ish-text-input-field",props:{postWrappers:[{wrapper:"input-addon",index:-1}],label:"product.notification.edit.form.price.label",required:!0,hideRequiredMarker:!0,addonLeft:{text:this.appFacade.currencySymbol$()},mask:"separator.2"},validation:{messages:{required:"product.notification.edit.form.price.error.required"}}}]}getEmailConfig(){return[{key:"email",type:"ish-email-field",props:{label:"product.notification.edit.form.email.label",required:!0,hideRequiredMarker:!0}}]}static{this.\u0275fac=function(c){return new(c||l)(t.rXU(T.K),t.rXU(m.v))}}static{this.\u0275cmp=t.VBU({type:l,selectors:[["ish-product-notification-edit-form"]],inputs:{form:"form",productNotification:"productNotification",userEmail:"userEmail"},features:[t.OA$],decls:2,vars:3,consts:[[1,"px-3"],[3,"form","fields","model"]],template:function(c,p){1&c&&(t.j41(0,"div",0),t.nrm(1,"formly-form",1),t.k0s()),2&c&&(t.R7$(1),t.Y8G("form",p.form)("fields",p.fields)("model",p.model))},dependencies:[O.aF],encapsulation:2,changeDetection:0})}}return l})();var G=i(90852);const V=["modal"];function u(l,I){if(1&l&&(t.qex(0),t.EFF(1),t.bVm()),2&l){const o=I.ngIf;t.R7$(1),t.SpI(" ",o.name," ")}}function K(l,I){if(1&l){const o=t.RV6();t.qex(0),t.j41(1,"form",7,8),t.bIt("ngSubmit",function(){t.eBV(o);const p=t.XpG(2);
1return t.Njj(p.submitForm())}),t.j41(3,"div",9),t.nrm(4,"ish-product-image",10)(5,"ish-product-notification-edit-form",11),t.nI1(6,"async"),t.k0s(),t.j41(7,"div",12)(8,"button",13),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.j41(11,"button",14),t.bIt("click",function(){t.eBV(o);const p=t.XpG(2);return t.Njj(p.hide())}),t.EFF(12),t.nI1(13,"translate"),t.k0s()()(),t.bVm()}if(2&l){const o=I.ngIf,c=t.sdS(2),p=t.XpG(2);t.R7$(1),t.Y8G("formGroup",p.productNotificationForm),t.R7$(4),t.Y8G("form",p.productNotificationForm)("productNotification",o)("userEmail",t.bMT(6,7,p.userEmail$)),t.R7$(3),t.Y8G("disabled",p.productNotificationForm.invalid&&c.submitted),t.R7$(1),t.SpI(" ",t.bMT(10,9,"product.notification.edit.form.update.button.label")," "),t.R7$(3),t.SpI(" ",t.bMT(13,11,"product.notification.edit.form.cancel.button.label")," ")}}function r(l,I){if(1&l){const o=t.RV6();t.j41(0,"form",7),t.bIt("ngSubmit",function(){t.eBV(o);const p=t.XpG(2);return t.Njj(p.submitForm())}),t.j41(1,"div",9),t.nrm(2,"ish-product-image",10)(3,"ish-product-notification-edit-form",15),t.nI1(4,"async"),t.k0s(),t.j41(5,"div",12)(6,"button",16),t.EFF(7),t.nI1(8,"translate"),t.k0s(),t.j41(9,"button",14),t.bIt("click",function(){t.eBV(o);const p=t.XpG(2);return t.Njj(p.hide())}),t.EFF(10),t.nI1(11,"translate"),t.k0s()()()}if(2&l){const o=t.XpG(2);t.Y8G("formGroup",o.productNotificationForm),t.R7$(3),t.Y8G("form",o.productNotificationForm)("userEmail",t.bMT(4,5,o.userEmail$)),t.R7$(4),t.SpI(" ",t.bMT(8,7,"product.notification.edit.form.create.button.label")," "),t.R7$(3),t.SpI(" ",t.bMT(11,9,"product.notification.edit.form.cancel.button.label")," ")}}function s(l,I){if(1&l){const o=t.RV6();t.j41(0,"div",1)(1,"h2",2),t.DNE(2,u,2,1,"ng-container",3),t.nI1(3,"async"),t.k0s(),t.j41(4,"button",4),t.bIt("click",function(){t.eBV(o);const p=t.XpG();return t.Njj(p.hide())}),t.nI1(5,"translate"),t.k0s()(),t.DNE(6,K,14,13,"ng-container",5),t.nI1(7,"async"),t.DNE(8,r,12,11,"ng-template",null,6,t.C5r)}if(2&l){const o=t.sdS(9),c=t.XpG();t.R7$(2),t.Y8G("ngIf",t.bMT(3,4,c.product$)),t.R7$(2),t.Y8G("title",t.bMT(5,6,"dialog.close.text")),t.R7$(2),t.Y8G("ngIf",t.bMT(7,8,c.productNotification$))("ngIfElse",o)}}let f=(()=>{class l{constructor(o,c,p,R,B){this.ngbModal=o,this.context=c,this.accountFacade=p,this.productNotificationsFacade=R,this.appFacade=B,this.productNotificationForm=new M.J3({}),this.destroyRef=(0,t.WQX)(t.abz)}ngOnInit(){this.product$=this.context.select("product");const o=this.context.select("product","available");this.userEmail$=this.accountFacade.userEmail$,this.appFacade.currentCurrency$.pipe((0,x.zV)(),(0,e.pQ)(this.destroyRef)).subscribe(c=>{this.currentCurrency=c}),this.productNotification$=this.productNotification?(0,b.of)(this.productNotification):o.pipe((0,C.n)(c=>this.productNotificationsFacade.productNotificationBySku$(this.context.get("sku"),c?"price":"stock").pipe((0,S.t)(1))))}hide(){this.productNotificationForm.reset(),this.modal&&this.modal.close()}show(){this.modal=this.ngbModal.open(this.modalTemplate,{ariaLabelledBy:"product-notification-edit-modal-title"})}submitForm(){if(this.productNotificationForm.valid){const o=this.context.get("sku"),c=this.productNotificationForm.value,p=void 0===c.priceValue?"stock":"price",B={id:void 0,type:p,sku:o,notificationMailAddress:this.productNotificationForm.value.email,price:{type:"Money",value:c.priceValue,currency:this.currentCurrency}};void 0!==c.alertType&&"delete"===c.alertType?this.productNotificationsFacade.deleteProductNotification(o,p,void 0!==c.productNotificationId?c.productNotificationId:""):void 0===c.alertType||"price"!==c.alertType&&"stock"!==c.alertType?this.productNotificationsFacade.createProductNotification(B):this.productNotificationsFacade.updateProductNotification(o,B),this.hide()}}static{this.\u0275fac=function(c){return new(c||l)(t.rXU(_.Bq),t.rXU(m.v),t.rXU(N.K),t.rXU(n.E),t.rXU(T.K))}}static{this.\u0275cmp=t.VBU({type:l,selectors:[["ish-product-notification-edit-dialog"]],viewQuery:function(c,p){if(1&c&&t.GBs(V,5),2&c){let R;t.mGM(R=t.lsd())&&(p.modalTemplate=R.first)}},inputs:{productNotification:"productNotification"},decls:2,vars:0,consts:[["modal",""],[1,"modal-header"],["id","product-notification-edit-modal-title",1,"modal-title"],[4,"ngIf"],["type","button",1,"btn-close",3,"title","click"],[4,"ngIf","ngIfElse"],["createNotificationButton",""],["ishFormSubmit","","novalidate","",3,"formGroup","ngSubmit"],["form","ngForm"],[1,"modal-body"],["imageType","L"],[3,"form","productNotification","userEmail"],[1,"modal-footer"],["type","submit","data-testing-id","product-notification-edit-dialog-edit",1,"btn","btn-primary",3,"disabled"],["type","button",1,"btn","btn-secondary",3,"click"],[3,"form","userEmail"],["type","submit",1,"btn","btn-primary"]],template:function(c,p){1&c&&t.DNE(0,s,10,10,"ng-template",null,0,t.C5r)}
1,dependencies:[h.bT,g.S,M.qT,M.cb,M.j4,P.y,U,h.Jj,G.D9],encapsulation:2,changeDetection:0})}}return l})();const D=function(){return["fas","pencil-alt"]};function Z(l,I){if(1&l){const o=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(o);const p=t.XpG(2),R=t.sdS(3);return t.Njj(p.openModal(R))}),t.nI1(1,"translate"),t.nrm(2,"fa-icon",8),t.k0s()}if(2&l){const o=t.XpG(2);t.Y8G("ngClass",o.cssClass)("title",t.bMT(1,3,"product.notification.edit.link.title")),t.R7$(2),t.Y8G("icon",t.lJ4(5,D))}}function X(l,I){if(1&l){const o=t.RV6();t.qex(0),t.j41(1,"div",4)(2,"button",9),t.bIt("click",function(){t.eBV(o);const p=t.XpG(2),R=t.sdS(3);return t.Njj(p.openModal(R))}),t.nI1(3,"translate"),t.nI1(4,"async"),t.EFF(5),t.nI1(6,"translate"),t.nI1(7,"async"),t.k0s()(),t.bVm()}if(2&l){const o=t.XpG(2);t.R7$(2),t.Y8G("ngClass",o.cssClass)("title",t.bMT(3,3,t.bMT(4,5,o.buttonKey("title")))),t.R7$(3),t.SpI(" ",t.bMT(6,7,t.bMT(7,9,o.buttonKey("label")))," ")}}function Y(l,I){if(1&l&&(t.qex(0,3),t.j41(1,"div",4),t.DNE(2,Z,3,6,"button",5),t.k0s(),t.DNE(3,X,8,11,"ng-container",6),t.bVm()),2&l){const o=t.XpG();t.Y8G("ngSwitch",o.displayType),t.R7$(2),t.Y8G("ngSwitchCase","icon"),t.R7$(1),t.Y8G("ngSwitchCase","button")}}let L=class A{constructor(I,o,c){this.context=I,this.accountFacade=o,this.router=c,this.displayType="button",this.destroyRef=(0,t.WQX)(t.abz)}ngOnInit(){this.visible$=this.context.select("displayProperties","addToNotification")}buttonKey(I){return this.context.select("product","available").pipe((0,E.T)(o=>`product.notification.${o?"price":"stock"}.notification.button.${I}`))}openModal(I){this.accountFacade.isLoggedIn$.pipe((0,F.s)(1),(0,e.pQ)(this.destroyRef)).subscribe(o=>{o?I.show():this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.routerState.snapshot.url,messageKey:"productnotification"}})})}static{this.\u0275fac=function(o){return new(o||A)(t.rXU(m.v),t.rXU(N.K),t.rXU(d.Ix))}}static{this.\u0275cmp=t.VBU({type:A,selectors:[["ish-product-notification-edit"]],inputs:{productNotification:"productNotification",displayType:"displayType",cssClass:"cssClass"},decls:4,vars:4,consts:[[3,"ngSwitch",4,"ngIf"],[3,"productNotification"],["modal",""],[3,"ngSwitch"],[1,"d-grid"],["type","button","class","btn","data-testing-id","product-notification-edit",3,"ngClass","title","click",4,"ngSwitchCase"],[4,"ngSwitchCase"],["type","button","data-testing-id","product-notification-edit",1,"btn",3,"ngClass","title","click"],[3,"icon"],["type","button","data-testing-id","product-notification-edit",3,"ngClass","title","click"]],template:function(o,c){1&o&&(t.DNE(0,Y,4,3,"ng-container",0),t.nI1(1,"async"),t.nrm(2,"ish-product-notification-edit-dialog",1,2)),2&o&&(t.Y8G("ngIf",t.bMT(1,2,c.visible$)),t.R7$(2),t.Y8G("productNotification",c.productNotification))},dependencies:[h.YU,h.bT,h.ux,h.e1,v.aY,f,h.Jj,G.D9],encapsulation:2,changeDetection:0})}};L=(0,a.Cg)([(0,y.z)(),(0,a.Sn)("design:paramtypes",[m.v,N.K,d.Ix])],L)},19244:(j,$,i)=>{i.d($,{J:()=>e,Z:()=>d});var a=i(81383),t=i(8615);const e=(0,a.EQ)({source:"Product Notifications",events:{"Load Product Notifications":(0,t.lM)(),"Create Product Notification":(0,t.lM)(),"Update Product Notification":(0,t.lM)(),"Delete Product Notification":(0,t.lM)()}}),d=(0,a.EQ)({source:"Product Notification API",events:{"Load Product Notifications Success":(0,t.lM)(),"Load Product Notifications Fail":(0,t.p2)(),"Create Product Notification Success":(0,t.lM)(),"Create Product Notification Fail":(0,t.p2)(),"Update Product Notification Success":(0,t.lM)(),"Update Product Notification Fail":(0,t.p2)(),"Delete Product Notification Success":(0,t.lM)(),"Delete Product Notification Fail":(0,t.p2)()}})},38123:(j,$,i)=>{i.d($,{Ic:()=>E,ue:()=>F,v3:()=>N});var a=i(72351),t=i(81383),e=i(8615),d=i(19244);const E=(0,a.p)(),F=E.getInitialState({loading:!1,error:void 0}),N=(0,t.vy)(F,(0,e.KI)(d.J.loadProductNotifications,d.J.createProductNotification,d.J.updateProductNotification,d.J.deleteProductNotification),(0,e.Qe)(d.Z.loadProductNotificationsFail,d.Z.createProductNotificationFail,d.Z.updateProductNotificationFail,d.Z.deleteProductNotificationFail),(0,e.qj)(d.Z.loadProductNotificationsSuccess,d.Z.createProductNotificationSuccess,d.Z.updateProductNotificationSuccess,d.Z.deleteProductNotificationSuccess),(0,t.on)(d.Z.loadProductNotificationsSuccess,(m,y)=>E.upsertMany(y.payload.productNotifications,{...E.removeMany(h=>h.type===y.payload.type,m)})),(0,t.on)(d.Z.createProductNotificationSuccess,(m,y)=>E.addOne(y.payload.productNotification,m)),(0,t.on)(d.Z.updateProductNotificationSuccess,(m,y)=>E.upsertOne(y.payload.productNotification,m)),(0,t.on)(d.Z.deleteProductNotificationSuccess,(m,y)=>({...E.removeOne(y.payload.productNotificationId,m)})))},31611:(j,$,i)=>{i.r($),i.d($,{PRODUCT_NOTIFICATIONS_STORE_CONFIG:()=>G,ProductNotificationsConfig:()=>U,ProductNotificationsStoreModule:()=>V});var a=i(37580),t=i(97624),e=i(81383),d=i(71292),E=i(71907),F=i(36647),N=i(70271),m=i(1365),y=i(51903),h=i(13725),v=i(71663),M=i(64334),b=i(77919),C=i(40735),S=i(72823);let T=(()=>{class u{static fromData(r,s){if(r)return{id:r.sku.concat("_").concat(s),type:s,sku:r.sku,notificationMailAddress:r.notificationMailAddress,price:r.price};throw new Error("productNotificationData is required")}static{this.\u0275fac=function(s){return new(s||u)}}static{this.\u0275prov=a.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})(),x=(()=>{class u{constructor(r,s){this.apiService=r,this.store=s,this.currentCustomer$=this.store.pipe((0,e.Lt)(S.AY),(0,v.zV)(),(0,M.s)(1))}getProductNotifications(r){return this.currentCustomer$.pipe((0,F.n)(s=>this.apiService.get(s.isBusinessCustomer?`customers/${this.apiService.encodeResourceId(s.customerNo)}/users/-/notifications/${r}`:`privatecustomers/-/notifications/${r}`).pipe((0,C.b)(),this.apiService.resolveLinks(),(0,N.T)(f=>f.map(D=>T.fromData(D,r))))))}createProductNotification(r){return r?this.currentCustomer$.pipe((0,F.n)(s=>this.apiService.post(s.isBusinessCustomer?`customers/${this.apiService.encodeResourceId(s.customerNo)}/users/-/notifications/${r.type}`:`privatecustomers/-/notifications/${r.type}`,r).pipe(this.apiService.resolveLink(),(0,N.T)(f=>T.fromData(f,r.type))))):(0,b.$)(()=>new Error("createProductNotification() called without notification"))}updateProductNotification(r,s){return r?s?this.currentCustomer$.pipe((0,F.n)(f=>this.apiService.put(f.isBusinessCustomer?`customers/${this.apiService.encodeResourceId(f.customerNo)}/users/-/notifications/${s.type}/${this.apiService.encodeResourceId(r)}`:`privatecustomers/-/notifications/${s.type}/${this.apiService.encodeResourceId(r)}`,s).pipe((0,N.T)(D=>T.fromData(D,s.type))))):(0,b.$)(()=>new Error("updateProductNotification() called without notification")):(0,b.$)(()=>new Error("updateProductNotification() called without sku"))}deleteProductNotification(r,s){return r?s?this.currentCustomer$.pipe((0,F.n)(f=>this.apiService.delete(f.isBusinessCustomer?`customers/${this.apiService.encodeResourceId(f.customerNo)}/users/-/notifications/${s}/${this.apiService.encodeResourceId(r)}`:`privatecustomers/-/notifications/${s}/${this.apiService.encodeResourceId(r)}`))):(0,b.$)(()=>new Error("deleteProductNotification() called without type")):(0,b.$)(()=>new Error("deleteProductNotification() called without sku"))}static{this.\u0275fac=function(s){return new(s||u)(a.KVO(C.G),a.KVO(e.il))}}static{this.\u0275prov=a.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})();var n=i(19244);let _=(()=>{class u{constructor(r,s){this.actions$=r,this.productNotificationsService=s,this.loadProductNotifications$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.J.loadProductNotifications),(0,v.hh)("type"),(0,F.n)(f=>this.productNotificationsService.getProductNotifications(f).pipe((0,N.T)(D=>n.Z.loadProductNotificationsSuccess({productNotifications:D,type:f})),(0,v.qt)(n.Z.loadProductNotificationsFail))))),this.createProductNotification$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.J.createProductNotification),(0,v.aV)(),(0,v.zV)(),(0,m.Z)(f=>this.productNotificationsService.createProductNotification(f.productNotification).pipe((0,m.Z)(D=>[n.Z.createProductNotificationSuccess({productNotification:D}),(0,h.T0)({message:"product.notification.create.success.message"})]),(0,v.qt)(n.Z.createProductNotificationFail))))),this.updateProductNotification$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.J.updateProductNotification),(0,v.aV)(),(0,v.zV)(),(0,y.H)(f=>this.productNotificationsService.updateProductNotification(f.sku,f.productNotification).pipe((0,m.Z)(D=>[n.Z.updateProductNotificationSuccess({productNotification:D}),(0,h.T0)({message:"product.notification.update.success.message"})]),(0,v.qt)(n.Z.updateProductNotificationFail))))),this.deleteProductNotification$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.J.deleteProductNotification),(0,v.aV)(),(0,m.Z)(f=>this.productNotificationsService.deleteProductNotification(f.sku,f.productNotificationType).pipe((0,m.Z)(()=>[n.Z.deleteProductNotificationSuccess({productNotificationId:f.productNotificationId}),(0,h.T0)({message:"product.notification.delete.success.message"})]),(0,v.qt)(n.Z.deleteProductNotificationFail))))),this.displayProductNotificationErrorMessage$=(0,t.EH)(()=>this.actions$.pipe((0,t.gp)(n.Z.loadProductNotificationsFail,n.Z.createProductNotificationFail,n.Z.updateProductNotificationFail,n.Z.deleteProductNotificationFail),(0,v.hh)("error"),(0,N.T)(f=>(0,h.sP)({message:f.message}))))}static{this.\u0275fac=function(s){return new(s||u)(a.KVO(t.En),a.KVO(x))}}static{this.\u0275prov=a.jDH({token:u,factory:u.\u0275fac})}}return u})();const P={productNotifications:i(38123).v3},O=[_];let U=(()=>{class u{constructor(){this.metaReducers=[E.aX]}static{this.\u0275fac=function(s){return new(s||u)}}static{this.\u0275prov=a.jDH({token:u,factory:u.\u0275fac})}}return u})();const G=new a.nKC("productNotificationsStoreConfig");let V=(()=>
1{class u{static forTesting(...r){return e.md.forFeature("productNotifications",(0,d.A)(P,r))}static{this.\u0275fac=function(s){return new(s||u)}}static{this.\u0275mod=a.$C({type:u})}static{this.\u0275inj=a.G2t({providers:[{provide:G,useClass:U}],imports:[t.Vm.forFeature(O),e.md.forFeature("productNotifications",P,G)]})}}return u})()}}]); 2//# sourceMappingURL=product-notifications.142204abbf0a7361.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.