1import{O as Fd,Pn as dI,Si as v,Wr as oe,Xn as gE,it as M,nn as Y,sr as hr,yi as ur}from"./chunk-ZDNP4dbO.js";import{O as tr}from"./chunk-DnJ3ki3y.js";var r=(function(e){return e.Decorator=`decorator`,e.Stub=`stub`,e.Page=`page`,e})(r||{});var u=class{constructor(){this.source=r.Page,this.consentType=`default`}};var a=class{constructor(s,t){this.consentType=s,this.payload=t,this.source=r.Stub}};var h=class{constructor(s){this.state=s,this.source=null}};var l=class{constructor(s){this.payload=s,this.source=r.Decorator,this.consentType=s.options.consentType,this.waitFor=s.options.waitFor,this.requestConsent=s.options.requestConsent,this.disableQueue=s.options.disableQueue}};function I(e){return function(s){return s.pipe(hr(t=>t instanceof e))}}function c(e,s){return function(t){return t.pipe(Fd(o=>o instanceof e&&s(o)))}}var A=new M(`IPersonalDataProtectionPolicy`);var d=new M(`RequestPersonalDataProtectionConsent`);var x=new M(`WAIT_FOR_GA_COOKIE`);var R=new M(`TConsentType`);var G=(()=>{class e{constructor(){this.policy=v(A),this.requestConsentFn=v(d),this.defaultConsentType=v(R),this.platformId=v(dI),this.actionsSubject$=new oe,this.consentSubject$=new ur(null),this.applyAction=t=>this.actionsSubject$.next(t),this.initActionsSubscriptions=()=>this.actionsSubject$.pipe(c(u,t=>this.processPageLoad(t)),c(l,t=>this.processProtectedMethod(t)),c(a,t=>this.processStubClicked(t)),c(h,t=>this.processConsentStateUpdate(t))).subscribe(t=>t),tr(this.platformId)&&(this.initConsentSubject(),this.initActionsSubscriptions())}get policyInstance(){return this.policy}get actions$(){return this.actionsSubject$.asObservable().pipe(gE(1))}get consent$(){return this.consentSubject$.asObservable().pipe(hr(t=>t!==null))}async processStubClicked(t){await this.normalizeAsyncResult(this.policy.isConsentRequired(t.consentType,t.source))&&this.showConsent(t)}async processPageLoad(t){await this.normalizeAsyncResult(this.policy.isConsentRequired(t.consentType,t.source))&&this.showConsent(t)}async processProtectedMethod(t){t.requestConsent&&await this.normalizeAsyncResult(this.policy.isConsentRequired(t.consentType,t.source))&&this.showConsent(t)}async showConsent(t){let o=await this.requestConsentFn(t.consentType,t.source);this.processConsentStateUpdate({state:o})}processConsentStateUpdate({state:t}){this.consentSubject$.next(t),this.policy.saveConsent(t)}async initConsentSubject(){let t=await this.normalizeAsyncResult(this.policy.getGlobalConsentState());this.consentSubject$.next(t)}normalizeAsyncResult(t){return t instanceof Promise?t:Promise.resolve(t)}static{this.ɵfac=function(o){return new(o||e)}}static{this.ɵprov=Y({token:e,factory:e.ɵfac,providedIn:`root`})}}return e})();export{a,l as c,x as d,R as i,r as l,G as n,d as o,I as r,h as s,A as t,u}; 2//# debugId=1adcab25-deb2-535d-b6dc-b2deacafa53b 3//# sourceMappingURL=chunk-CLH4okcp.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.