1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0bfc8b35-e41f-5101-8632-7f874c245352")}catch(e){}}(); 3import{w as Fe,x as we,z as L}from"./chunk-UPRLQZ4Z.js";import"./chunk-XYSYRM6Z.js";import"./chunk-5FL4OI7B.js";import"./chunk-CMWXI3RU.js";import"./chunk-UCK4FYGQ.js";import"./chunk-GNHERFY5.js";import"./chunk-VDTYNO6X.js";import"./chunk-5IAPG7LT.js";import"./chunk-WXOSWNUC.js";import{b as Te}from"./chunk-MDPN7EUR.js";import{Q as Se}from"./chunk-4B5GITMJ.js";import"./chunk-CCBVBHEY.js";import{I as A}from"./chunk-GHFDRSJX.js";import"./chunk-QCYX7PRJ.js";import"./chunk-CKVKMKA6.js";import"./chunk-FI7PAQG6.js";import"./chunk-G4AQJQ7U.js";import"./chunk-AXTX7MOG.js";import"./chunk-4XXIEPQD.js";import"./chunk-FZDWNW7F.js";import"./chunk-2F2KM4VF.js";import"./chunk-HMMSVWI7.js";import"./chunk-W6GNF4US.js";import"./chunk-OXWZC74R.js";import"./chunk-LECWUFSV.js";import"./chunk-RLI2KNMN.js";import"./chunk-CUSGE7JV.js";import{a as fe}from"./chunk-3XNP4JBN.js";import{a as me}from"./chunk-AESV6YAN.js";import"./chunk-OL745NOE.js";import"./chunk-JNFXVYQX.js";import"./chunk-2SKOQBZW.js";import"./chunk-FV6P3LJY.js";import{Hb as Me,Vd as De,oc as Ee}from"./chunk-AQF37UGA.js";import{d as F}from"./chunk-ICRZCHAS.js";import"./chunk-3WZBJAGG.js";import"./chunk-5S4GSWQM.js";import"./chunk-PKR6DMSR.js";import"./chunk-X3DVRFTT.js";import{w as be,x as xe}from"./chunk-UFMNNIBJ.js";import"./chunk-YQZXM67H.js";import"./chunk-L5QO3ISF.js";import"./chunk-L7I332VI.js";import"./chunk-C6737PVF.js";import"./chunk-3LFUPBQN.js";import"./chunk-TABTMQZ7.js";import{h as Ce,k as he,p as ye}from"./chunk-DL5HIGYO.js";import"./chunk-NRNL7OY5.js";import{c as oe,j as re,k as ae,l as ue,m as ce}from"./chunk-ZWJJ6QV3.js";import"./chunk-QV67L76E.js";import{Ba as de,Eb as ve,Fb as w,Na as ge,Ta as x,Xb as ke,bc as Re,va as se}from"./chunk-OOLC7UNJ.js";import"./chunk-IQ65XKCP.js";import"./chunk-EJ7P67SK.js";import{b as _e}from"./chunk-DLICIVZE.js";import"./chunk-VWQPPZQH.js";import{C as pe,H as le}from"./chunk-MZYY3M4F.js";import{a as P,c as S}from"./chunk-SQGLTEYX.js";import{i as ie}from"./chunk-4CF7YNSH.js";import{$a as I,Ac as j,Ad as X,Bc as l,Cc as r,Dc as a,E as N,Ec as s,Ja as y,Kb as u,Kd as D,Mc as b,O as B,Pd as Z,Qd as T,Ra as d,Rd as ee,Sa as g,Sc as f,Ud as te,Vc as c,Vd as O,Wd as ne,Xa as W,Y as U,ac as M,ba as H,bd as Q,cd as q,dd as K,ec as E,ed as G,gc as v,hb as z,id as p,jd as Y,kd as k,r as V,uc as C,ud as J,wc as h,zc as $}from"./chunk-OWVPANHJ.js";import"./chunk-6GOPUL35.js";var Oe=(t,n)=>({disabled:t,accent:n});function Pe(t,n){t&1&&(r(0,"label",2),p(1,"\u042E\u0440. \u043B\u0438\u0446\u043E"),a())}function Ae(t,n){t&1&&(r(0,"mg-prefix-text",3),p(1,"\u042E\u0440. \u043B\u0438\u0446\u043E:"),a())}function Ve(t,n){if(t&1&&(r(0,"div",4),s(1,"mg-text-with-tooltip",5),a()),t&2){let e=n.option,i=c();l("mgHint",e.disabled?"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043C\u0430\u0440\u043A\u0435\u0442\u043F\u043B\u0435\u0439\u0441 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043D\u0430 \u044D\u0442\u043E\u043C \u044E\u0440.\u043B\u0438\u0446\u0435":null)("mgHintMaxWidth",210)("ngClass",X(4,Oe,e.disabled,e.value===i.currentCompanyId())),u(),l("text",e.name)}}var Le=(()=>{class t extends L{constructor(){super(...arguments),this.labelType=O("label"),this.marketplace=O(x.Wb),this.changeCompany=te(),this.companies=S(this.companiesFacade.getFilteredCompanies(F.Repricer,!1,null)),this.companyOptions=T(()=>this.companies()?.map(e=>({value:e.value,name:e.name,disabled:!this.checkValidCompanyById(this.companies()??[],e.value,this.marketplace())}))??[])}handleChangeCompany(e){this.companiesFacade.setCurrentCompany(e),this.changeCompany.emit(e)}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=z(t)))(o||t)}})()}static{this.\u0275cmp=M({type:t,selectors:[["app-repricer-company"]],inputs:{labelType:[1,"labelType"],marketplace:[1,"marketplace"]},outputs:{changeCompany:"changeCompany"},features:[E],decls:5,vars:4,consts:[["optionTemplate",""],[1,"w-100!",3,"ngModelChange","ngModel","optionContentTemplate","options"],["mg-label",""],[1,"text-nowrap","font-s","color-grey-50"],["mgHintDirection","left",1,"option",3,"mgHint","mgHintMaxWidth","ngClass"],[3,"text"]],template:function(i,o){if(i&1){let m=b();r(0,"mg-select",1),f("ngModelChange",function(Be){return d(m),g(o.handleChangeCompany(Be))}),C(1,Pe,2,0,"label",2)(2,Ae,2,0,"mg-prefix-text",3),v(3,Ve,2,7,"ng-template",null,0,D),a()}if(i&2){let m=K(4);l("ngModel",o.currentCompanyId())("optionContentTemplate",m)("options",o.companyOptions()),u(),h(o.labelType()==="label"?1:2)}},dependencies:[Re,ge,se,de,ke,w,ve,ie],styles:[`.option[_ngcontent-%COMP%]{font:var(--mg-font-medium-s)}
3.option.accent[_ngcontent-%COMP%]{color:var(--mg-color-accent-50)}.option.disabled[_ngcontent-%COMP%]{color:var(--mg-color-grey-40);pointer-events:initial!important;cursor:default} 4/*# sourceMappingURL=repricer-company.component-BK3W4PWL.css.map */`],changeDetection:0})}}return t})();var Ne=["confirmationTemplate"],Ue=(t,n)=>n.link;function He(t,n){t&1&&(r(0,"a",7),p(1,"\u0420\u0435\u043F\u0440\u0430\u0439\u0441\u0435\u0440"),a())}function We(t,n){if(t&1&&(r(0,"span"),p(1),a()),t&2){let e=c();u(),Y(e.currentTab())}}function ze(t,n){if(t&1&&s(0,"app-repricer-marketplace-toggle",5),t&2){let e=c();l("currentTab",e.currentTab())}}function $e(t,n){t&1&&s(0,"app-repricer-demo-toggle")}function je(t,n){if(t&1){let e=b();r(0,"mg-status-chip",8),p(1),a(),r(2,"button",9),f("click",function(){d(e);let o=c();return g(o.showModal(o.currentCompanyId()))}),s(3,"i",10),a()}if(t&2){let e=c(),i=e.isActiveDemo()?!0:e.isEnabledRepricer();l("color",i?"green":"red"),u(),k(" \u0420\u0435\u043F\u0440\u0430\u0439\u0441\u0435\u0440 ",i?"\u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442":"\u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D"," "),u(),l("disabled",e.isDemoUser())("mgHint",e.isDemoUser()?"\u0420\u0435\u043F\u0440\u0430\u0439\u0441\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D \u0434\u043B\u044F \u0414\u0435\u043C\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F":null)}}function Qe(t,n){if(t&1&&(r(0,"a",12),p(1),a()),t&2){let e=n.$implicit,i=c(2);l("testid",J("repricer-tab-",e.link))("routerLink",e.link)("disabled",!i.isWbMarketplace()&&e.link==="sales"),u(),k(" ",e.title," ")}}function qe(t,n){if(t&1){let e=b();r(0,"app-repricer-company",14),f("changeCompany",function(o){d(e);let m=c(2);return g(m.handleChangeCompany(o))}),a()}if(t&2){let e=c(2);G("width",25,"%"),l("marketplace",e.marketplace())}}function Ke(t,n){if(t&1&&(r(0,"div",11)(1,"mg-tab-group"),$(2,Qe,2,5,"a",12,Ue),a(),C(4,qe,1,3,"app-repricer-company",13),a(),s(5,"router-outlet")),t&2){let e=c();u(2),j(e.tabs),u(2),h(e.isShowCompanyFilter()?4:-1)}}function Ge(t,n){t&1&&s(0,"app-skeleton-loading",6)}function Ye(t,n){if(t&1){let e=b();r(0,"button",15),f("click",function(){d(e);let o=c();return g(o.modalRef.close())}),a(),r(1,"div",16),s(2,"div",17),r(3,"div")(4,"h1",18),p(5),a(),r(6,"div",19),p(7),s(8,"br"),p(9,"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435? "),a(),r(10,"div",20)(11,"button",21),f("click",function(){d(e);let o=c();return g(o.changeRepricerStatus(!o.isEnabledRepricer()))}),p(12," \u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044E "),a(),r(13,"button",22),f("click",function(){d(e);let o=c();return g(o.modalRef.close())}),p(14,"\u041E\u0442\u043C\u0435\u043D\u0430"),a()()()()}if(t&2){let e=c();u(5),k("",e.isEnabledRepricer()?"\u041E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435":"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435"," \u0440\u0435\u043F\u0440\u0430\u0439\u0441\u0435\u0440\u0430"),u(2),k(" \u041F\u043E\u0441\u043B\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F ",e.isEnabledRepricer()?"\u044D\u043A\u0441\u0442\u0440\u0435\u043D\u043D\u043E\u0433\u043E \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F, \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043D\u0443\u0442 \u0438\u0437\u043C\u0435\u043D\u044F\u0442\u044C\u0441\u044F \u0446\u0435\u043D\u044B \u043D\u0430 \u0432\u0441\u0435 \u0442\u043E\u0432\u0430\u0440\u044B.":"\u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F, \u0444\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B \u0440\u0435\u043F\u0440\u0430\u0439\u0441\u0435\u0440\u0430 \u0441\u0442\u0430\u043D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D."),u(4),l("isDisabled",e.isDemoUser())("isLoading",e.isLoadingRepricerStatus())}}var R=class t extends L{#t;#e;#i;#o;#n;constructor(){super(),this.#t=y(De),this.#e=y(Se),this.#i=y(ae),this.#o=y(Ce),this.#n=y(W),this.marketplace=this.filtersStore.marketplace,this.isActiveDemo=S(this.companiesFacade.isActiveDemoCompanies$),this.isDemoUser=this.#t.isDemoUser,this.isBetaTester=this.#t.isBetaTester,this.isEnabledRepricer=this.#e.repricer.enabled,this.isLoadingRepricerStatus=this.#e.isLoading,this.currentTab=I(""),this.isShowCompanyFilter=I(!1),this.isWbMarketplace=T(()=>this.marketplace()===x.Wb),this.confirmModal=ne("confirmationTemplate"),this.tabs=A,this.isNull=le,this.#a(),this.#u()}ngOnInit(){this.#r(location.pathname),this.#i.events.pipe(B(n=>n instanceof oe),P(this.#n)).subscribe(n=>{this.#r(n.url)})}showModal(n){this.modalRef=this.#o.open(this.confirmModal(),{panelClass:["mg-modal"]})}changeRepricerStatus(n){this.#e.updateModulesStatus({companyId:this.currentCompanyId(),marketplace:this.marketplace(),status:n,callback:()=>this.modalRef?.close()})}handleChangeCompany(n){this.filtersStore.setCompanyId(n)}#r(n){this.isShowCompanyFilter.set(n.includes("repricer/products")||n.includes("repricer/history")||n.includes("repricer/strategies")&&this.marketplace()===x.Oz||n.includes("repricer/stock")&&this.marketplace()===x.Oz);let e=n.split("/").splice(-1)[0],i=A.find(o=>o.link===e)?.title;i&&this.currentTab.set(i)}#a(){ee(()=>{let n=this.currentCompanyId(),e=this.marketplace();Z(()=>{n&&this.#e.getModulesStatus({companyId:n,marketplace:e,callback:i=>{i&&this.isDemoUser()&&!this.isActiveDemo()&&this.changeRepricerStatus(!1)}})})})}#u(){N([this.companiesFacade.getFilteredCompanies(F.Repricer,!1,null),this.companiesFacade.currentCompany$]).pipe(H(pe),B(([n])=>!!n.length),P(this.#n),U(1)).subscribe(([n,e])=>{if(this.currentCompanyId()&&e!==this.currentCompanyId()&&n.some(_=>_.value===this.currentCompanyId())){this.companiesFacade.setCurrentCompany(this.currentCompanyId());return}let i=n.filter(_=>this.checkValidCompanyById(n,_.value,this.marketplace()));if(i.some(_=>_.value===e)){this.filtersStore.setCompanyId(e),this.companiesFacade.setCurrentCompany(e);return}let m=i[0]?.value??null;m&&e!==m&&(this.companiesFacade.setCurrentCompany(m),this.filtersStore.setCompanyId(m))})}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=M({type:t,selectors:[["app-repricer-layout"]],viewQuery:function(e,i){e&1&&Q(i.
4confirmModal,Ne,5),e&2&&q()},features:[E],decls:11,vars:4,consts:[["confirmationTemplate",""],[1,"mb-24"],["routerLink","/repricer","mg-button-text","",4,"mgItem"],[4,"mgItem"],[1,"justify-content-end!","mb-16"],[1,"mr-auto",3,"currentTab"],["height","100%",1,"flex-grow-1"],["routerLink","/repricer","mg-button-text",""],[1,"align-self-center",3,"color"],[1,"btn-emergency",3,"click","disabled","mgHint"],[1,"mg-icon-off"],[1,"repricer-tabs-wrap","mb-24"],["mg-tab","","routerLinkActive","active",3,"routerLink","testid","disabled"],["labelType","prefix",1,"ml-auto",3,"marketplace","width"],["labelType","prefix",1,"ml-auto",3,"changeCompany","marketplace"],[1,"mg-modal__close",3,"click"],[1,"modal-content"],[1,"mg-icon-warning","mr-8"],[1,"mb-8"],[1,"color-grey-50","mb-16"],[1,"d-flex"],["mg-button","",1,"mr-12",3,"click","isDisabled","isLoading"],["mg-button","","appearance","secondary",3,"click"]],template:function(e,i){e&1&&(r(0,"mg-breadcrumbs",1),v(1,He,2,0,"a",2)(2,We,2,1,"span",3),a(),r(3,"app-between-row",4),C(4,ze,1,1,"app-repricer-marketplace-toggle",5),C(5,$e,1,0,"app-repricer-demo-toggle"),C(6,je,4,4),a(),C(7,Ke,6,1)(8,Ge,1,0,"app-skeleton-loading",6),v(9,Ye,15,4,"ng-template",null,0,D)),e&2&&(u(4),h(i.isBetaTester()?4:-1),u(),h(i.isWbMarketplace()?5:-1),u(),h(i.currentCompanyId()&&!i.isNull(i.isEnabledRepricer())?6:-1),u(),h(i.currentCompanyId()?7:i.isCompaniesLoading()?8:-1))},dependencies:[be,xe,ue,_e,he,w,re,ce,ye,Me,Fe,fe,me,Ee,we,Le],styles:[`@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex-direction:column;flex-grow:1}.btn-emergency[_ngcontent-%COMP%]{cursor:pointer;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;display:flex;align-items:center;justify-content:center;width:3.2rem;height:3.2rem;transition:border .3s,background-color .3s;border:.1rem solid var(--mg-color-red-40);border-radius:var(--mg-radius-8)}.btn-emergency[_ngcontent-%COMP%] .mg-icon-off[_ngcontent-%COMP%]{font-size:var(--mg-fs-l);transition:color .3s;color:var(--mg-color-red-40)}.btn-emergency[_ngcontent-%COMP%]:hover{background:var(--mg-color-red-10)}.btn-emergency[_ngcontent-%COMP%]:active{border-color:var(--mg-color-red-50);background:var(--mg-color-red-20)}.btn-emergency[_ngcontent-%COMP%]:active .mg-icon-off[_ngcontent-%COMP%]{color:var(--mg-color-red-50)}.repricer-tabs-wrap[_ngcontent-%COMP%]{display:flex;align-items:flex-end;min-height:3.6rem;gap:var(--mg-space-16)}.modal-content[_ngcontent-%COMP%]{display:flex;flex-direction:row}.modal-content[_ngcontent-%COMP%] .mg-icon-warning[_ngcontent-%COMP%]{font-size:1.8rem;line-height:1.2;color:var(--mg-color-orange-40)} 5/*# sourceMappingURL=repricer-layout.component-KRCDUDFT.css.map */`],changeDetection:0})}};V([Te()],R.prototype,"showModal",null);var At=[{path:"",component:R,children:[{path:"",pathMatch:"full",redirectTo:"strategies"},{path:"products",loadComponent:()=>import("./chunk-LMOD7PPW.js").then(t=>t.RepricerProductsComponent)},{path:"strategies",loadComponent:()=>import("./chunk-QWOGPARO.js").then(t=>t.RepricerStrategiesComponent)},{path:"sales",loadComponent:()=>import("./chunk-GGRBHOP7.js").then(t=>t.RepricerSalesComponent)},{path:"stock",loadComponent:()=>import("./chunk-G2DR3KUN.js").then(t=>t.RepricerOwnStockComponent)},{path:"history",loadComponent:()=>import("./chunk-27F3TKV3.js").then(t=>t.RepricerHistoryComponent)}]}];export{At as REPRICER_LAYOUT_ROUTES}; 6//# sourceMappingURL=chunk-RR5O5O2Q.js.map 7 8//# debugId=0bfc8b35-e41f-5101-8632-7f874c245352
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.