1class AmSessionCookieSync{COOKIE_NAME="am_session_id";ONE_YEAR=31536e6;MAX_ATTEMPTS=50;intervalId=null;attempts=0;constructor(t=500){this.interval=t,this.hasCookie()||this.tryStoreSession()||this.start()}hasCookie(){return document.cookie.split("; ").some(t=>t.startsWith(this.COOKIE_NAME+"="))}setCookie(t){const s=new Date(Date.now()+this.ONE_YEAR).toUTCString();document.cookie=`${this.COOKIE_NAME}=${t}; expires=${s}; path=/`}getSessionId(){try{return window.storage?.getAmSessionId?.()||null}catch{return null}}tryStoreSession=()=>{const t=this.getSessionId();return t?(this.setCookie(t),this.stop(),!0):(++this.attempts>=this.MAX_ATTEMPTS&&this.stop(),!1)};start(){this.intervalId||(this.intervalId=setInterval(this.tryStoreSession,this.interval))}stop(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const amSessionCookieSync=()=>new AmSessionCookieSync;export{amSessionCookieSync};
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.