PageSourceSearch

https://usautoinsurancenow.com/_next/static/chunks/session-manager.95220b7ae4d1c753.js

js usautoinsurancenow.com collected 2026-09-26 18:59:23 UTC 7,453 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[967],{72169:(e,t,s)=>{s.d(t,{M:()=>i});class i{constructor(e,t){if(!e.onEnd)throw Error("onEnd handler is required");if(!t)throw Error("ms duration is required");this.onEnd=e.onEnd,this.initialMs=t,this.startTimestamp=Date.now(),this.timer=this.create(this.onEnd,t)}create(e,t){return this.timer&&this.clear(),setTimeout(()=>e?e():this.onEnd(),t||this.initialMs)}clear(){clearTimeout(this.timer),this.timer=null}end(){this.clear(),this.onEnd()}isValid(){return this.initialMs-(Date.now()-this.startTimestamp)>0}}},90226:(e,t,s)=>{s.d(t,{setupAgentSession:()=>x});var i=s(12525),r=s(80326),n=s(47468),o=s(87516),a=s(29452),h=s(72169),u=s(8068),c=s(26196),l=s(9219),d=s(62719);class m extends h.M{constructor(e,t){super(e,t),this.onPause="function"==typeof e.onPause?e.onPause:()=>{},this.onRefresh="function"==typeof e.onRefresh?e.onRefresh:()=>{},this.onResume="function"==typeof e.onResume?e.onResume:()=>{},this.readStorage=e.readStorage,this.remainingMs=void 0,e.refreshEvents||(e.refreshEvents=["click","keydown","scroll"]);try{this.abortController=new AbortController}catch(e){}if(u.RI&&e.ee){if(e.ee){this.ee=e.ee;let t=(0,d.s)(this.refresh.bind(this),500,{leading:!0});this.refreshHandler=s=>{e.refreshEvents.includes(s?.[0]?.type)&&t()},e.ee.on("fn-end",this.refreshHandler)}(0,l.u)(e=>{"hidden"===e?this.pause():this.resume()},!1,!1,this.abortController?.signal)}}abort(){this.clear(),this.abortController?.abort(),this.refreshHandler&&(this.ee.removeEventListener("fn-end",this.refreshHandler),this.refreshHandler=this.ee=null)}pause(){this.onPause(),clearTimeout(this.timer),this.remainingMs=this.initialMs-(Date.now()-this.startTimestamp)}resume(){try{let t=this.readStorage(),s="string"==typeof t?JSON.parse(t):t;e(s.expiresAt)||e(s.inactiveAt)?this.end():(this.refresh(),this.onResume())}catch(e){this.end()}function e(e){return Date.now()>e}}refresh(e,t){this.clear(),this.timer=this.create(e,t),this.startTimestamp=Date.now(),this.remainingMs=void 0,this.onRefresh()}}var f=s(19603),p=s(94204),g=s(48532),y=s(47539),v=s(56804),A=s(89578),S=s(98183);let w={value:"",inactiveAt:0,expiresAt:0,updatedAt:Date.now(),sessionReplayMode:c.g.OFF,sessionReplaySentFirstChunk:!1,sessionTraceMode:c.g.OFF,traceHarvestStarted:!1,loggingMode:S.A$.OFF,logApiMode:S.A$.OFF,serverTimeDiff:null,custom:{},numOfResets:0,consent:!1};class M{constructor(e){let{agentRef:t,key:s,storage:i}=e;if(!t||!s||!i)throw Error("Missing required field(s):".concat(!t?" agentRef":"").concat(!s?" key":"").concat(i?"":" storage"));this.agentRef=t,this.storage=i,this.state={},this.key=s,this.ee=t.ee,(0,f.u)(this.ee),this.setup(e),u.RI&&(0,A.sp)("storage",e=>{if(e.key===this.lookupKey){let t="string"==typeof e.newValue?JSON.parse(e.newValue):e.newValue;this.sync(t),this.ee.emit(c.tS.UPDATE,[c.iL.CROSS_TAB,this.state])}})}setup({value:e=(0,n.LA)(16),expiresMs:t=c.wk,inactiveMs:s=c.BB,numOfResets:i=0}){let r={serverTimeDiff:this.state.serverTimeDiff||w.serverTimeDiff,consent:this.state.consent||w.consent};this.state={},this.sync({...w,...r}),this.state.value=e,this.expiresMs=t,this.inactiveMs=s;let o=this.read();t?(this.state.expiresAt=o?.expiresAt||this.getFutureTimestamp(t),this.state.numOfResets=o?.numOfResets||i,this.expiresTimer=new h.M({onEnd:()=>{this.collectSM("expired"),this.collectSM("duration"),this.reset()}},this.state.expiresAt-Date.now())):this.state.expiresAt=1/0,s?(this.state.inactiveAt=o?.inactiveAt||this.getFutureTimestamp(s),this.inactiveTimer=new m({onEnd:()=>{this.collectSM("inactive"),this.collectSM("duration"),this.reset()},onRefresh:this.refresh.bind(this),onResume:()=>{this.ee.emit(c.tS.RESUME)},onPause:()=>{this.initialized&&this.ee.emit(c.tS.PAUSE),this.write((0,p.a)(this.state,w))},ee:this.ee,refreshEvents:["click","keydown","scroll"],readStorage:()=>this.storage.get(this.lookupKey)},this.state.inactiveAt-Date.now())):this.state.inactiveAt=1/0,this.isNew||=!Object.keys(o).length,this.isNew?this.write((0,p.a)(this.state,w),!0):this.sync(o),this.initialized=!0,this.ee.emit(c.tS.STARTED,[this.isNew])}get lookupKey(){return"".concat(c.H3,"_").concat(this.key)}sync(e){Object.assign(this.state,e)}read(){try{let e=this.storage.get(this.lookupKey);if(!e)return{};let t="string"==typeof e?JSON.parse(e):e;if(this.isInvalid(t))return{};if(this.isExpired(t.expiresAt))return this.collectSM("expired"),this.collectSM("duration",t,!0),this.reset();if(this.isExpired(t.inactiveAt))return this.collectSM("inactive"),this.collectSM("duration",t,!0),this.reset();return t}catch(e){return(0,o.R)(10,e),{}}}write(e){try{if(!e||"object"!=typeof e)return;return e.updatedAt=Date.now(),this.sync(e),this.storage.set(this.lookupKey,(0,a.A)(this.state)),this.ee.emit(c.tS.UPDATE,[c.iL.SAME_TAB,this.state]),e}catch(e){return(0,o.R)(11,e),null}}reset(){try{return(0,o.R)(66),this.initialized&&(this.ee.emit(c.tS.RESET),this.state.numOfResets++),this.storage.remove(this.lookupKey),this.inactiveTimer?.abort?.(),this.expiresTimer?.clear?.(),delete this.isNew,this.setup({agentRef:this.agentRef,key:this.key,storage:this.storage,expiresMs:this.expiresMs,inactiveMs:this.inactiveMs,numOfResets:this.state.numOfResets}),this.read()}catch(e){return{}}}refresh(){let e=this.read();this.write({...e,inactiveAt:this.getFutureTimestamp(this.inactiveMs)})}isExpired(e){return Date.now()>e}isInvalid(e){return!Object.keys(w).every(t=>Object.keys(e).includes(t))}collectSM(e,t,s){let i,r;"duration"===e&&(i=this.getDuration(t,s),r="Session/Duration/Ms"),"expired"===e&&(r="Session/Expired/Seen"),"inactive"===e&&(r="Session/Inactive/Seen"),r&&(0,g.p)(y.xV,[r,i],void 0,v.K7.metrics,this.ee)}getDuration(e=this.state,t){let s=e.expiresAt-this.expiresMs;return(t?Date.now():e.updatedAt)-s}getFutureTimestamp(e){return Date.now()+e}
1syncCustomAttribute(e,t){if(u.RI)if(null===t){let t=this.read();t.custom&&(delete t.custom[e],this.write({...t}))}else{let s=this.read();this.custom={...s?.custom||{},[e]:t},this.write({...s,custom:this.custom})}}}class R{get(e){try{return localStorage.getItem(e)||void 0}catch(e){return""}}set(e,t){try{if(null==t)return this.remove(e);return localStorage.setItem(e,t)}catch(e){}}remove(e){try{localStorage.removeItem(e)}catch(e){}}}var E=s(54821),b=s(84089),k=s(53724);function x(e){if(e.runtime.session)return e.runtime.session;let t=e.init.session;e.runtime.session=new M({agentRef:e,key:c.uh,storage:new R,expiresMs:t?.expiresMs,inactiveMs:t?.inactiveMs});let s=e.runtime.session.state.custom;s&&Object.keys(s).length&&(e.info=(0,E.D)({...e.info,jsAttributes:{...s,...e.info.jsAttributes}})),e.runtime.jsAttributesMetadata=function(e,t){let s=e[t]??={},i={bytes:Object.keys(s).reduce((e,t)=>e+t.length+(0,a.A)(s[t]).length,0)};return e[t]=new Proxy(s,{set:(e,t,s)=>(i.bytes+=t.length+(0,a.A)(s).length,e[t]=s,!0),deleteProperty:(e,t)=>(i.bytes-=t.length+(0,a.A)(e[t]).length,delete e[t])}),i}(e.info,"jsAttributes");let n=e.ee;return(0,r.i)("api-setCustomAttribute",(t,s,i)=>{e.runtime.session.syncCustomAttribute(s,i)},"session",n),(0,r.i)("api-setUserId",(t,s,i)=>{e.runtime.session.syncCustomAttribute(s,i)},"session",n),(0,r.i)("api-setUserIdAndResetSession",t=>{e.runtime.session.reset(),(0,g.p)(y.xV,["API/"+b.Dl+"/resetSession/called"],void 0,v.K7.metrics,n),(0,k.U)(e,"enduser.id",t,b.Dl,!0)},"session",n),(0,r.i)("api-consent",t=>{e.runtime.session.write({consent:void 0===t||t})},"session",n),(0,i.Ze)(e,"session"),e.runtime.session}}}]);

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.