import{a as S}from"./chunk-C3CTRETK.js";import{A as I}from"./chunk-Y4LLAK7R.js";import{f as u}from"./chunk-UZOHO7NA.js";import{l as h,n as d}from"./chunk-O2KDIBGD.js";import{s as a}from"./chunk-QUA65JBC.js";import{Ca as n,J as c,Ma as l,Ra as s,a as p,fa as m,ya as f}from"./chunk-NRAZ4AKM.js";var g="cart",j=o=>o?{context:{headers:{"X-Profile-Id":`${o}`}}}:{},w=(()=>{let r=class r{constructor(e,t,i,k){this.httpLink=e,this.store=t,this.apollo=i,this.storeSelector=k,this.profileId$=this.getProfileId()}query(e,{profileId:t}={}){return(t?c(t):this.profileId$).pipe(m(1)).pipe(n(i=>this.apollo.use(g).query(p(p({},e),j(i)))))}mutate(e,{profileId:t}={}){return(t?c(t):this.profileId$).pipe(m(1)).pipe(n(i=>this.apollo.use(g).mutate(p(p({},e),j(i)))))}getProfileId(){return this.storeSelector.getWithSelector(h).pipe(n(e=>e?this.storeSelector.getWithSelector(I):c(void 0))).pipe(f(1))}};r.\u0275fac=function(t){return new(t||r)(s(S),s(a),s(u),s(d))},r.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();export{g as a,w as b};