1import{la as E}from"./chunk-UUINFXB4.js";import{F as S,Xb as f,ab as p,ob as m,xc as g,yc as h}from"./chunk-DXEQN5ME.js";import{Aa as d,Fa as r,K as n,R as l,o as a,ra as c,x as s}from"./chunk-Z3P4APZX.js";var I=class o{constructor(){this.http=r(S);this.occEndpoints=r(m);this.globalMessageService=r(h);this.windowRef=r(p);this.userIdService=r(f);this.activeCartFacade=r(E);this.COMNORM_SESSION="comnorm-session";this.COMNORM_SESSION_KEY="comnorm-session-key";this.TRADEPLACE_SESSION="tradeplace-session"}loginTradePlaceUser(e,t){let i={uid:e,tradeplaceToken:t};return this.http.post(this.occEndpoints.buildUrl("tradeplaceApiLogin"),i).pipe(l(()=>(this.globalMessageService.add({key:"login.api.loginError"},g.MSG_TYPE_ERROR),a({}))))}setTradePlaceSession(e){this.windowRef.localStorage&&(e?this.windowRef.localStorage.setItem(this.TRADEPLACE_SESSION,JSON.stringify(!0)):this.windowRef.localStorage.removeItem(this.TRADEPLACE_SESSION))}isTradePlaceSession(){return this.windowRef.localStorage?this.windowRef.localStorage.getItem(this.TRADEPLACE_SESSION)==="true":!1}markCartAsTradePlaceSession(){return s([this.userIdService.takeUserId(),this.activeCartFacade.getActiveCartId().pipe(n(e=>e!=""))]).pipe(c(([e,t])=>{let i={userId:e,cartId:t};return this.http.post(this.occEndpoints.buildUrl("markAsTradeplaceCart",{urlParams:i}
1),{})}))}setComNormSession(e){this.windowRef.localStorage&&(this.windowRef.localStorage.setItem(this.COMNORM_SESSION,JSON.stringify(!0)),this.windowRef.localStorage.setItem(this.COMNORM_SESSION_KEY,e))}isComNormSession(){return this.windowRef.localStorage?this.windowRef.localStorage.getItem(this.COMNORM_SESSION)==="true":!1}getComNormAddToCartUrl(e){let t="";return this.windowRef.localStorage&&(t=this.windowRef.localStorage.getItem(this.COMNORM_SESSION_KEY)||""),`/addToCart?Method=GetProductInfo&ProductNumber=${e}&SessionKey=${t}`}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})}};export{I as a};
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.