1import{a as q}from"./chunk-4Z5MUJO3.js";import{Da as m,Pa as k,Ta as I,Ue as A,V as h,c as l,ed as x,fa as d,fd as C,qa as f,u,ua as c,ud as b}from"./chunk-PMSJWPYZ.js";import{a as p,h as T}from"./chunk-NIF3MU5U.js";var y=(()=>{class r{constructor(){this.document=c(m),this.platformId=c(I),this.request=c(x,{optional:!0}),this.responseInit=c(C,{optional:!0}),this.documentIsAccessible=b(this.platformId)}static getCookieRegExp(e){let i=e.replace(/([[\]{}()|=;+?,.*^$\\])/gi,"\\$1");return new RegExp("(?:^"+i+"|;\\s*"+i+")=(.*?)(?:;|$)")}static safeDecodeURIComponent(e){try{return decodeURIComponent(e)}catch(i){return e}}check(e){return e=encodeURIComponent(e),r.getCookieRegExp(e).test(this.documentIsAccessible?this.document.cookie:this.getRequestCookies())}get(e){if(this.check(e)){e=encodeURIComponent(e);let t=r.getCookieRegExp(e).exec(this.documentIsAccessible?this.document.cookie:this.getRequestCookies());return t?.[1]?r.safeDecodeURIComponent(t[1]):""}return""}getAll(){let e={},i=this.documentIsAccessible?this.document?.cookie:this.getRequestCookies();return i&&i!==""&&i.split(";").forEach(t=>{let s=t.trim();if(!s)return;let o=s.indexOf("=");if(o===-1)return;let n=s.substring(0,o),g=s.substring(o+1);e[r.safeDecodeURIComponent(n)]=r.safeDecodeURIComponent(g)}),e}set(e,i,t,s,o,n,g,E){let a=this.normalizeOptions(t,s,o,n,g,E);if(!this.documentIsAccessible){this.responseInit&&this.setServerCookie(e,i,a);return}a.sameSite==="None"&&!a.secure&&(a.secure=!0,console.warn(`[ngx-cookie-service] Cookie ${e} was forced with secure flag because SameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`));let S=this.buildCookieString(e,i,a);this.document.cookie=S}delete(e,i,t,s,o="Lax"){if(!this.documentIsAccessible&&!this.responseInit)return;let n=new Date("Thu, 01 Jan 1970 00:00:01 GMT");this.set(e,"",{expires:n,path:i,domain:t,secure:s,sameSite:o})}deleteAll(e,i,t,s="Lax"){if(!this.documentIsAccessible&&!this.responseInit)return;let o=this.getAll();for(let n in o)o.hasOwnProperty(n)&&this.delete(n,e,i,t,s)}getRequestCookies(){if(!this.request)return null;if(this.request.headers&&typeof this.request.headers.get=="function")return this.request.headers.get("cookie");let e=this.request;if(typeof e.get=="function"){let t=e.get("cookie")||e.get("Cookie");if(t)return t}let i=this.request.headers;if(i&&typeof i=="object"){if(i.cookie)return i.cookie;if(i.Cookie)return i.Cookie}return null}setServerCookie(e,i,t={}){if(!this.responseInit)return;t.sameSite==="None"&&!t.secure&&(t.secure=!0);let s=this.buildCookieString(e,i,t);this.appendSetCookieHeader(s)}normalizeOptions(e,i,t,s,o,n){return typeof e=="object"&&!(e instanceof Date)?p({},e):{expires:e,path:i,domain:t,secure:s,sameSite:o,partitioned:n}}buildCookieString(e,i,t={}){let s=encodeURIComponent(e)+"="+encodeURIComponent(i)+";";if(t.expires)if(typeof t.expires=="number"){let o=new Date(Date.now()+t.expires*1e3*60*60*24);s+="Expires="+o.toUTCString()+";"}else s+="Expires="+t.expires.toUTCString()+";";return t.maxAge!==void 0&&(s+="Max-Age="+t.maxAge+";"),t.path&&(s+="Path="+t.path+";"),t.domain&&(s+="Domain="+t.domain+";"),t.secure&&(s+="Secure;"),s+="SameSite="+(t.sameSite??"Lax")+";",t.partitioned&&(s+="Partitioned;"),t.httpOnly&&(s+="HttpOnly;"),s}appendSetCookieHeader(e){if(!this.responseInit)return;this.responseInit.headers||(this.responseInit.headers=new Headers);let i=this.responseInit.headers;if(i instanceof Headers)i.append("Set-Cookie",e);else if(Array.isArray(i))i.push(["Set-Cookie",e]);else{let t=i,s=t["Set-Cookie"];s?t["Set-Cookie"]=Array.isArray(s)?[...s,e]:[s,e]:t["Set-Cookie"]=e}}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var R=T(q());var L=(()=>{class r extends y{changeTrigger$=new l;winRef=c(A);check$(...e){return this.changeTrigger$.pipe(d(void 0),u(()=>this.check(...e)),h())}delete(...e){super.delete(...e),this.changeTrigger$.next()}deleteAll(...e){super.deleteAll(...e),this.changeTrigger$.next()}get$(...e){return this.changeTrigger$.pipe(d(void 0),u(()=>this.get(...e)),h())}getAll$(...e){return this.changeTrigger$.pipe(d(void 0),u(()=>this.getAll(...e)),h(R.isEqual))}set(...e){super.set(...e),this.changeTrigger$.next()}static \u0275fac=(()=>{let e;return function(t){return(e||(e=k(r)))(t||r)}})();static \u0275prov=f({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{y as a,L as b};
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.