import{b as me}from"./chunk-64LTZBFY.js";import{Ca as de,Ga as le,H as ie,Ha as fe,La as v,Ld as M,O as se,Oa as c,Qa as p,Ra as a,Sa as A,Td as w,Ud as _,Va as D,Vd as Re,a as f,ab as k,ac as he,b as R,ec as U,fb as F,la as ce,lb as pe,nb as ye,p as m,pb as E,s as ne,t as I,u as re,ua as ue,va as ae,x as oe}from"./chunk-WNE7PXNE.js";function We(e){e||(F(We),e=a(E));let t=new m(r=>e.onDestroy(r.next.bind(r)));return r=>r.pipe(de(t))}function Je(e,t){!t?.injector&&F(Je);let r=t?.injector??a(ye),n=new re(1),o=Re(()=>{let i;try{i=e()}catch(s){_(()=>n.error(s));return}_(()=>n.next(i))},{injector:r,manualCleanup:!0});return r.get(E).onDestroy(()=>{o.destroy(),n.complete()}),n.asObservable()}function N(e,t){let r=!t?.manualCleanup;r&&!t?.injector&&F(N);let n=r?t?.injector?.get(E)??a(E):null,o;t?.requireSync?o=U({kind:0}):o=U({kind:1,value:t?.initialValue});let i=e.subscribe({next:s=>o.set({kind:1,value:s}),error:s=>{if(t?.rejectErrors)throw s;o.set({kind:2,error:s})}});return n?.onDestroy(i.unsubscribe.bind(i)),w(()=>{let s=o();switch(s.kind){case 1:return s.value;case 2:throw s.error;case 0:throw new fe(601,"`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.")}})}var $={};function Xe(e,t){if($[e]=($[e]||0)+1,typeof t=="function")return P(e,(...n)=>R(f({},t(...n)),{type:e}));switch(t?t._as:"empty"){case"empty":return P(e,()=>({type:e}));case"props":return P(e,n=>R(f({},n),{type:e}));default:throw new Error("Unexpected config.")}}function et(){return{_as:"props",_p:void 0}}function P(e,t){return Object.defineProperty(t,"type",{value:e,writable:!1})}function G(e){return e.charAt(0).toUpperCase()+e.substring(1)}function tt(e){return e.charAt(0).toLowerCase()+e.substring(1)}function mn(e){let{source:t,events:r}=e;return Object.keys(r).reduce((n,o)=>R(f({},n),{[nt(o)]:Xe(rt(t,o),r[o])}),{})}function vn(){return et()}function nt(e){return e.trim().split(" ").map((t,r)=>r===0?tt(t):G(t)).join("")}function rt(e,t){return`[${e}] ${t}`}var Ue="@ngrx/store/init",g=(()=>{let t=class t extends I{constructor(){super({type:Ue})}next(n){if(typeof n=="function")throw new TypeError(`
        Dispatch expected an object, instead it received a function.
        If you're using the createAction function, make sure to invoke the function
        before dispatching the action. For example, someAction should be someAction().`);if(typeof n>"u")throw new TypeError("Actions must be objects");if(typeof n.type>"u")throw new TypeError("Actions must have a type property");super.next(n)}complete(){}ngOnDestroy(){super.complete()}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=v({token:t,factory:t.\u0275fac});let e=t;return e})(),ot=[g],Me=new c("@ngrx/store Internal Root Guard"),ve=new c("@ngrx/store Internal Initial State"),Z=new c("@ngrx/store Initial State"),_e=new c("@ngrx/store Reducer Factory"),ge=new c("@ngrx/store Internal Reducer Factory Provider"),Ne=new c("@ngrx/store Initial Reducers"),z=new c("@ngrx/store Internal Initial Reducers"),Ee=new c("@ngrx/store Store Features"),be=new c("@ngrx/store Internal Store Reducers"),V=new c("@ngrx/store Internal Feature Reducers"),Se=new c("@ngrx/store Internal Feature Configs"),Pe=new c("@ngrx/store Internal Store Features"),Ie=new c("@ngrx/store Internal Feature Reducers Token"),ze=new c("@ngrx/store Feature Reducers"),Fe=new c("@ngrx/store User Provided Meta Reducers"),x=new c("@ngrx/store Meta Reducers"),we=new c("@ngrx/store Internal Resolved Meta Reducers"),xe=new c("@ngrx/store User Runtime Checks Config"),je=new c("@ngrx/store Internal User Runtime Checks Config"),b=new c("@ngrx/store Internal Runtime Checks"),H=new c("@ngrx/store Check if Action types are unique"),q=new c("@ngrx/store Root Store Provider"),Ce=new c("@ngrx/store Feature State Provider");function Y(e,t={}){let r=Object.keys(e),n={};for(let i=0;i<r.length;i++){let s=r[i];typeof e[s]=="function"&&(n[s]=e[s])}let o=Object.keys(n);return function(s,d){s=s===void 0?t:s;let l=!1,y={};for(let u=0;u<o.length;u++){let h=o[u],T=n[h],ee=s[h],te=T(ee,d);y[h]=te,l=l||te!==ee}return l?y:s}}function it(e,t){return Object.keys(e).filter(r=>r!==t).reduce((r,n)=>Object.assign(r,{[n]:e[n]}),{})}function Ve(...e){return function(t){if(e.length===0)return t;let r=e[e.length-1];return e.slice(0,-1).reduceRight((o,i)=>i(o),r(t))}}function $e(e,t){return Array.isArray(t)&&t.length>0&&(e=Ve.apply(null,[...t,e])),(r,n)=>{let o=e(r);return(i,s)=>(i=i===void 0?n:i,o(i,s))}}function st(e){let t=Array.isArray(e)&&e.length>0?Ve(...e):r=>r;return(r,n)=>(r=t(r),(o,i)=>(o=o===void 0?n:o,r(o,i)))}var S=class extends m{},j=class extends g{},ct="@ngrx/store/update-reducers",C=(()=>{let t=class t extends I{get currentReducers(){return this.reducers}constructor(n,o,i,s){super(s(i,o)),this.dispatcher=n,this.initialState=o,this.reducers=i,this.reducerFactory=s}addFeature(n){this.addFeatures([n])}addFeatures(n){let o=n.reduce((i,{reducers:s,reducerFactory:d,metaReducers:l,initialState:y,key:u})=>{let h=typeof s=="function"?st(l)(s,y):$e(d,l)(s,y);return i[u]=h,i},{});this.addReducers(o)}removeFeature(n){this.removeFeatures([n])}removeFeatures(n){this.removeReducers(n.map(o=>o.key))}addReducer(n,o){this.addReducers({[n]:o})}addReducers(n){this.reducers=f(f({},this.reducers),n),this.updateReducers(Object.keys(n))}removeReducer(n){this.removeReducers([n])}removeReducers(n){n.forEach(o=>{this.reducers=it(this.reducers,o)}),this.updateReducers(n)}updateReducers(n){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:ct,features:n})}ngOnDestroy(){this.complete()}};t.\u0275fac=function(o){return new(o||t)(p(j),p(Z),p(Ne),p(_e))},t.\u0275prov=v({token:t,factory:t.\u0275fac});let e=t;return e})(),ut=[C,{provide:S,useExisting:C},{provide:j,useExisting:g}],Q=(()=>{let t=class t extends ne{ngOnDestroy(){this.complete()}};t.\u0275fac=(()=>{let n;return function(i){return(n||(n=pe(t)))(i||t)}})(),t.\u0275prov=v({token:t,factory:t.\u0275fac});let e=t;return e})(),at=[Q],O=class extends m{},Oe=(()=>{let t=class t extends I{constructor(n,o,i,s){super(s);let l=n.pipe(ie(oe)).pipe(le(o)),y={state:s},u=l.pipe(ae(dt,y));this.stateSubscription=u.subscribe(({state:h,action:T})=>{this.next(h),i.next(T)}),this.state=N(this,{manualCleanup:!0,requireSync:!0})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}};t.INIT=Ue,t.\u0275fac=function(o){return new(o||t)(p(g),p(S),p(Q),p(Z))},t.\u0275prov=v({token:t,factory:t.\u0275fac});let e=t;return e})();function dt(e={state:void 0},[t,r]){let{state:n}=e;return{state:r(n,t),action:t}}var lt=[Oe,{provide:O,useExisting:Oe}],W=(()=>{let t=class t extends m{constructor(n,o,i){super(),this.actionsObserver=o,this.reducerManager=i,this.source=n,this.state=n.state}select(n,...o){return pt.call(null,n,...o)(this)}selectSignal(n,o){return w(()=>n(this.state()),o)}lift(n){let o=new t(this,this.actionsObserver,this.reducerManager);return o.operator=n,o}dispatch(n){this.actionsObserver.next(n)}next(n){this.actionsObserver.next(n)}error(n){this.actionsObserver.error(n)}complete(){this.actionsObserver.complete()}addReducer(n,o){this.reducerManager.addReducer(n,o)}removeReducer(n){this.reducerManager.removeReducer(n)}};t.\u0275fac=function(o){return new(o||t)(p(O),p(g),p(C))},t.\u0275prov=v({token:t,factory:t.\u0275fac});let e=t;return e})(),ft=[W];function pt(e,t,...r){return function(o){let i;if(typeof e=="string"){let s=[t,...r].filter(Boolean);i=o.pipe(ue(e,...s))}else if(typeof e=="function")i=o.pipe(se(s=>e(s,t)));else throw new TypeError(`Unexpected type '${typeof e}' in select operator, expected 'string' or 'function'`);return i.pipe(ce())}}var J="https://ngrx.io/guide/store/configuration/runtime-checks";function Te(e){return e===void 0}function Ae(e){return e===null}function qe(e){return Array.isArray(e)}function yt(e){return typeof e=="string"}function ht(e){return typeof e=="boolean"}function Rt(e){return typeof e=="number"}function Be(e){return typeof e=="object"&&e!==null}function mt(e){return Be(e)&&!qe(e)}function Ke(e){if(!mt(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function B(e){return typeof e=="function"}function vt(e){return B(e)&&e.hasOwnProperty("\u0275cmp")}function gt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Et=!1;function bt(){return Et}function De(e,t){return e===t}function St(e,t,r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!0;return!1}function Le(e,t=De,r=De){let n=null,o=null,i;function s(){n=null,o=null}function d(u=void 0){i={result:u}}function l(){i=void 0}function y(){if(i!==void 0)return i.result;if(!n)return o=e.apply(null,arguments),n=arguments,o;if(!St(arguments,n,t))return o;let u=e.apply(null,arguments);return n=arguments,r(o,u)?o:(o=u,u)}return{memoized:y,reset:s,setResult:d,clearResult:l}}function Ge(...e){return Ft(Le)(...e)}function It(e,t,r,n){if(r===void 0){let i=t.map(s=>s(e));return n.memoized.apply(null,i)}let o=t.map(i=>i(e,r));return n.memoized.apply(null,[...o,r])}function Ft(e,t={stateFn:It}){return function(...r){let n=r;if(Array.isArray(n[0])){let[u,...h]=n;n=[...u,...h]}else n.length===1&&xt(n[0])&&(n=jt(n[0]));let o=n.slice(0,n.length-1),i=n[n.length-1],s=o.filter(u=>u.release&&typeof u.release=="function"),d=e(function(...u){return i.apply(null,u)}),l=Le(function(u,h){return t.stateFn.apply(null,[u,o,h,d])});function y(){l.reset(),d.reset(),s.forEach(u=>u.release())}return Object.assign(l.memoized,{release:y,projector:d.memoized,setResult:l.setResult,clearResult:l.clearResult})}}function wt(e){return Ge(t=>{let r=t[e];return!bt()&&M()&&!(e in t)&&console.warn(`@ngrx/store: The feature name "${e}" does not exist in the state, therefore createFeatureSelector cannot access it.  Be sure it is imported in a loaded module using StoreModule.forRoot('${e}', ...) or StoreModule.forFeature('${e}', ...).  If the default state is intended to be undefined, as is the case with router state, this development-only warning message can be ignored.`),r},t=>t)}function xt(e){return!!e&&typeof e=="object"&&Object.values(e).every(t=>typeof t=="function")}function jt(e){let t=Object.values(e),r=Object.keys(e),n=(...o)=>r.reduce((i,s,d)=>R(f({},i),{[s]:o[d]}),{});return[...t,n]}function gn(e){let{name:t,reducer:r,extraSelectors:n}=e,o=wt(t),i=Ct(o,r),s=f({[`select${G(t)}State`]:o},i),d=n?n(s):{};return f(f({name:t,reducer:r},s),d)}function Ct(e,t){let r=Ot(t);return(Ke(r)?Object.keys(r):[]).reduce((o,i)=>R(f({},o),{[`select${G(i)}`]:Ge(e,s=>s?.[i])}),{})}function Ot(e){return e(void 0,{type:"@ngrx/feature/init"})}function Tt(e){return e instanceof c?a(e):e}function At(e,t){return t.map((r,n)=>{if(e[n]instanceof c){let o=a(e[n]);return{key:r.key,reducerFactory:o.reducerFactory?o.reducerFactory:Y,metaReducers:o.metaReducers?o.metaReducers:[],initialState:o.initialState}}return r})}function Dt(e){return e.map(t=>t instanceof c?a(t):t)}function Ze(e){return typeof e=="function"?e():e}function kt(e,t){return e.concat(t)}function Ut(){if(a(W,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function Mt(e,t){return function(r,n){let o=t.action(n)?K(n):n,i=e(r,o);return t.state()?K(i):i}}function K(e){Object.freeze(e);let t=B(e);return Object.getOwnPropertyNames(e).forEach(r=>{if(!r.startsWith("\u0275")&&gt(e,r)&&(!t||r!=="caller"&&r!=="callee"&&r!=="arguments")){let n=e[r];(Be(n)||B(n))&&!Object.isFrozen(n)&&K(n)}}),e}function _t(e,t){return function(r,n){if(t.action(n)){let i=L(n);ke(i,"action")}let o=e(r,n);if(t.state()){let i=L(o);ke(i,"state")}return o}}function L(e,t=[]){return(Te(e)||Ae(e))&&t.length===0?{path:["root"],value:e}:Object.keys(e).reduce((n,o)=>{if(n)return n;let i=e[o];return vt(i)?n:Te(i)||Ae(i)||Rt(i)||ht(i)||yt(i)||qe(i)?!1:Ke(i)?L(i,[...t,o]):{path:[...t,o],value:i}},!1)}function ke(e,t){if(e===!1)return;let r=e.path.join("."),n=new Error(`Detected unserializable ${t} at "${r}". ${J}#strict${t}serializability`);throw n.value=e.value,n.unserializablePath=r,n}function Nt(e,t){return function(r,n){if(t.action(n)&&!he.isInAngularZone())throw new Error(`Action '${n.type}' running outside NgZone. ${J}#strictactionwithinngzone`);return e(r,n)}}function Pt(e){return M()?f({strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!0,strictActionImmutability:!0,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1},e):{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function zt({strictActionSerializability:e,strictStateSerializability:t}){return r=>e||t?_t(r,{action:n=>e&&!X(n),state:()=>t}):r}function Vt({strictActionImmutability:e,strictStateImmutability:t}){return r=>e||t?Mt(r,{action:n=>e&&!X(n),state:()=>t}):r}function X(e){return e.type.startsWith("@ngrx")}function $t({strictActionWithinNgZone:e}){return t=>e?Nt(t,{action:r=>e&&!X(r)}):t}function qt(e){return[{provide:je,useValue:e},{provide:xe,useFactory:Bt,deps:[je]},{provide:b,deps:[xe],useFactory:Pt},{provide:x,multi:!0,deps:[b],useFactory:Vt},{provide:x,multi:!0,deps:[b],useFactory:zt},{provide:x,multi:!0,deps:[b],useFactory:$t}]}function He(){return[{provide:H,multi:!0,deps:[b],useFactory:Kt}]}function Bt(e){return e}function Kt(e){if(!e.strictActionTypeUniqueness)return;let t=Object.entries($).filter(([,r])=>r>1).map(([r])=>r);if(t.length)throw new Error(`Action types are registered more than once, ${t.map(r=>`"${r}"`).join(", ")}. ${J}#strictactiontypeuniqueness`)}function En(e,t,r={}){return k([...Qt(e,t,r),Yt])}function Lt(e={},t={}){return[{provide:Me,useFactory:Ut},{provide:ve,useValue:t.initialState},{provide:Z,useFactory:Ze,deps:[ve]},{provide:z,useValue:e},{provide:be,useExisting:e instanceof c?e:z},{provide:Ne,deps:[z,[new A(be)]],useFactory:Tt},{provide:Fe,useValue:t.metaReducers?t.metaReducers:[]},{provide:we,deps:[x,Fe],useFactory:kt},{provide:ge,useValue:t.reducerFactory?t.reducerFactory:Y},{provide:_e,deps:[ge,we],useFactory:$e},ot,ut,at,lt,ft,qt(t.runtimeChecks),He()]}function Gt(){a(g),a(S),a(Q),a(W),a(Me,{optional:!0}),a(H,{optional:!0})}var Zt=[{provide:q,useFactory:Gt},{provide:D,multi:!0,useFactory(){return()=>a(q)}}];function bn(e,t){return k([...Lt(e,t),Zt])}function Ht(){a(q);let e=a(Pe),t=a(ze),r=a(C);a(H,{optional:!0});let n=e.map((o,i)=>{let d=t.shift()[i];return R(f({},o),{reducers:d,initialState:Ze(o.initialState)})});r.addFeatures(n)}var Yt=[{provide:Ce,useFactory:Ht},{provide:D,multi:!0,useFactory(){return()=>a(Ce)}}];function Qt(e,t,r={}){return[{provide:Se,multi:!0,useValue:e instanceof Object?{}:r},{provide:Ee,multi:!0,useValue:{key:e instanceof Object?e.name:e,reducerFactory:!(r instanceof c)&&r.reducerFactory?r.reducerFactory:Y,metaReducers:!(r instanceof c)&&r.metaReducers?r.metaReducers:[],initialState:!(r instanceof c)&&r.initialState?r.initialState:void 0}},{provide:Pe,deps:[Se,Ee],useFactory:At},{provide:V,multi:!0,useValue:e instanceof Object?e.reducer:t},{provide:Ie,multi:!0,useExisting:t instanceof c?t:V},{provide:ze,multi:!0,deps:[V,[new A(Ie)]],useFactory:Dt},He()]}function Sn(...e){let t=e.pop(),r=e.map(n=>n.type);return{reducer:t,types:r}}function In(e,...t){let r=new Map;for(let n of t)for(let o of n.types){let i=r.get(o);if(i){let s=(d,l)=>n.reducer(i(d,l),l);r.set(o,s)}else r.set(o,n.reducer)}return function(n=e,o){let i=r.get(o.type);return i?i(n,o):n}}var Ye=function(e){return e.initial="initial",e.loading="loading",e.success="success",e.error="error",e}(Ye||{});function xn(){return{status:Ye.initial}}var Wt="B2B",Jt="B2C",Qe={b2b:Wt,b2c:Jt};var Xt=e=>e===Qe.b2c;var An=()=>Xt(me.getChannel());export{We as a,Je as b,N as c,Xe as d,et as e,mn as f,vn as g,Ue as h,g as i,Z as j,b as k,q as l,Ce as m,S as n,j as o,ct as p,Q as q,O as r,W as s,pt as t,bt as u,Ge as v,wt as w,gn as x,En as y,bn as z,Sn as A,In as B,An as C,Ye as D,xn as E};