PageSourceSearch

https://www.northernlakesveterinaryhospital.com/_next/static/chunks/8302-881f45a0174d8bf4.js

js northernlakesveterinaryhospital.com collected 2026-10-08 16:01:31 UTC 15,343 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8302],{58302:(e,t,i)=>{i.d(t,{CarterAnalytics:()=>v});var s=Object.defineProperty,r=(e,t,i)=>(((e,t,i)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),i);let n={name:"@carter-rmn/cpix-js",version:"1.0.8"},a={DEBUG:!1,TRACKER_FUNC_NAME:"cpix",API_URL:"",QUEUE_MAX_RETRIES:3,QUEUE_INITIAL_DELAY:1e4,version:n.version,package:n.name,USER_PROPERTIES:{},SESSION_EXPIRY_DAYS:14,COMMON_PROPERTIES:{}},o={SESSION:"cpix_session",META_PARAMETERS:"cpix_meta_parameters",ACCESS_TOKEN:"cpix_access_token",UTM:"cpix_utm"},l=["utm_source","utm_medium","utm_term","utm_content","utm_campaign"],c={debug:function(...e){a.DEBUG&&console.log(...e)},error:function(...e){console.error(...e)}};class u extends EventTarget{constructor(e={maxRetries:3,initialDelay:1e4,consumerHandler:e=>(c.debug("Consuming event:",e),Promise.resolve())}){super(),r(this,"dataQueue"),r(this,"retryQueue"),r(this,"maxRetries"),r(this,"initialDelay"),r(this,"publishEvent"),r(this,"retryEvent"),r(this,"handler"),this.dataQueue=[],this.retryQueue=[],this.maxRetries=e.maxRetries,this.initialDelay=e.initialDelay,this.handler=e.consumerHandler,this.publishEvent=new Event("eventPublished"),this.retryEvent=new Event("retryMessage"),this.consume(),this.retry()}publish(e){c.debug("publishing event");let t={data:e,id:`${Date.now()+Math.random()}`,retryCount:0,retryDelay:this.initialDelay};this.dataQueue.push(t),this.dispatchEvent(this.publishEvent)}consume(){c.debug("Started Consumer Queue"),this.addEventListener("eventPublished",async()=>{for(;this.dataQueue.length>0;){let e=this.dataQueue.shift(),{data:t={}}=e;try{await this.handler(t),this.acknowledge(null==e?void 0:e.id)}catch(t){c.error("Failed to publish event:",t),this.scheduleRetry(e)}}})}scheduleRetry(e){if(e.retryCount>=this.maxRetries)return void c.error("Max retries reached for message:",e);setTimeout(()=>{this.retryQueue.push({...e,retryCount:e.retryCount+1,retryDelay:2*e.retryDelay}),this.dispatchEvent(this.retryEvent)},e.retryDelay)}acknowledge(e){this.dataQueue=this.dataQueue.filter(t=>t.id!==e)}retry(){c.debug("Started Retry Queue"),this.addEventListener("retryMessage",async()=>{for(;this.retryQueue.length>0;){let e=this.retryQueue.shift(),{data:t={}}=e;try{await this.handler(t),this.acknowledge(null==e?void 0:e.id)}catch(t){c.error("Failed to publish event:",t),this.scheduleRetry(e)}}})}}class d{static getBrowserInfo(){var e,t,i,s,r;let n,a,o=navigator.userAgent||"";return/chrome/i.test(o)?(n="Chrome",a=null==(e=o.match(/chrome\/(\d+)/i))?void 0:e[1]):/firefox/i.test(o)?(n="Firefox",a=null==(t=o.match(/firefox\/(\d+)/i))?void 0:t[1]):/safari/i.test(o)?(n="Safari",a=null==(i=o.match(/version\/(\d+)/i))?void 0:i[1]):/edge/i.test(o)?(n="Edge",a=null==(s=o.match(/edge\/(\d+)/i))?void 0:s[1]):/trident/i.test(o)?(n="Internet Explorer",a=null==(r=o.match(/rv:(\d+)/i))?void 0:r[1]):(n="Unknown",a="Unknown"),`${n} ${a}`}static getBrowserName(){let e=navigator.userAgent||"";return/chrome/i.test(e)&&!/edge/i.test(e)?"Chrome":/firefox/i.test(e)?"Firefox":/safari/i.test(e)&&!/chrome/i.test(e)?"Safari":/edge/i.test(e)?"Edge":/trident/i.test(e)?"Internet Explorer":"Unknown"}static getBrowserVersion(){var e,t,i,s,r;let n=navigator.userAgent||"";return/chrome/i.test(n)&&!/edge/i.test(n)?(null==(e=n.match(/chrome\/(\d+)/i))?void 0:e[1])||"Unknown":/firefox/i.test(n)?(null==(t=n.match(/firefox\/(\d+)/i))?void 0:t[1])||"Unknown":/safari/i.test(n)&&!/chrome/i.test(n)?(null==(i=n.match(/version\/(\d+)/i))?void 0:i[1])||"Unknown":/edge/i.test(n)?(null==(s=n.match(/edge\/(\d+)/i))?void 0:s[1])||"Unknown":/trident/i.test(n)&&(null==(r=n.match(/rv:(\d+)/i))?void 0:r[1])||"Unknown"}static getScreenResolution(){return typeof window>"u"||!window.screen?"Unknown":`${window.screen.width}x${window.screen.height}`}static getViewportSize(){return typeof window>"u"?"Unknown":`${window.innerWidth}x${window.innerHeight}`}static getLanguage(){var e;return typeof navigator>"u"?"Unknown":navigator.language||(null==(e=navigator.languages)?void 0:e[0])||"Unknown"}
1static getOSVersion(){let e=navigator.userAgent||"",t="Unknown";if(/iphone|ipad|ipod/i.test(e)){let i=e.match(/os (\d+[._]\d+)/i);i&&(t=i[1].replace("_","."))}else if(/android/i.test(e)){let i=e.match(/android (\d+(\.\d+)?)/i);i&&(t=i[1])}else if(/windows/i.test(e))if(/windows nt 10.0/i.test(e))t="10";else if(/windows nt 6.3/i.test(e))t="8.1";else if(/windows nt 6.2/i.test(e))t="8";else if(/windows nt 6.1/i.test(e))t="7";else{let i=e.match(/windows nt (\d+\.\d+)/i);i&&(t=i[1])}else if(/mac|Macintosh/i.test(e)){let i=e.match(/mac os x (\d+[._]\d+)/i);i&&(t=i[1].replace("_","."))}return t}static getUserAgent(){return typeof navigator>"u"||!navigator.userAgent?"Unknown":navigator.userAgent}static getDeviceCategory(){let e=navigator.userAgent;return/mobile/i.test(e)?"Mobile":/tablet/i.test(e)?"Tablet":"Desktop"}static getDevicePlatform(){let e=navigator.userAgent;return/android/i.test(e)?"Android":/iphone|ipad|ipod/i.test(e)?"iOS":/windows phone/i.test(e)?"Windows Phone":/mac|Macintosh/i.test(e)?"Mac":/windows|Microsoft/i.test(e)?"Windows":/linux/i.test(e)?"Linux":"Unknown"}static getDeviceManufacturer(){let e=navigator.userAgent;return/iphone|ipad|ipod|mac|Macintosh/i.test(e)?"Apple":/samsung/i.test(e)?"Samsung":/google/i.test(e)?"Google":/huawei/i.test(e)?"Huawei":/xiaomi/i.test(e)?"Xiaomi":/oneplus/i.test(e)?"OnePlus":/dell/i.test(e)?"Dell":/lenovo/i.test(e)?"Lenovo":/acer/i.test(e)?"Acer":/asus/i.test(e)?"Asus":/toshiba/i.test(e)?"Toshiba":"Unknown"}static async getDeviceNetworkParameters(){try{let e=await fetch(`${a.API_URL}/api/geolocation`),{data:t}=await e.json();return{city:t.city||"Unknown",region:t.region||"Unknown",country:t.country||"Unknown",timezone:t.timezone||"Unknown",loc:t.loc||"Unknown",ip_address:t.ip_address||"Unknown"}}catch(e){return c.error("Error retrieving device network parameters:",e),{city:"Unknown",region:"Unknown",country:"Unknown",timezone:"Unknown",loc:"Unknown",ip_address:"Unknown"}}}static async aquireAccessToken(e){try{return(await (await fetch(`${a.API_URL}/api/authenticate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:e,metadata:{sdk:a.package,version:a.version,hostname:window.location.hostname}})})).json()).accessToken}catch(e){throw c.error("Error acquiring access token:",e),Error("[CPIX] Authentication error")}}}class h{static isPresent(e){return"u">typeof e&&null!==e&&""!==e}static now(){return+new Date().getTime()}static guid(){return n.version+"-xxxxxxxx-".replace(/[x]/g,function(e){let t=36*Math.random()|0;return("x"==e?t:3&t|8).toString(36)})+(+new Date().getTime()).toString(36)}static optionalData(e){return!1===h.isPresent(e)?"":"object"==typeof e?h.optionalData(JSON.stringify(e)):"function"==typeof e?h.optionalData(e()):String(e)}static sleep(e){return new Promise(t=>setTimeout(t,e))}}class g{static getParametersByName(e,t){let i;t||(t=window.location.href);let s=RegExp("[?&]"+(e=e.replace(/[[\]]/g,"\\$&"))+"(=([^&#]*)|&|#|$)","gi"),r=[];for(;null!==(i=s.exec(t));)i[2]&&r.push(decodeURIComponent(i[2].replace(/\+/g," ")));return r.length>0?r:null}static externalHost(e){var t;return e.hostname!=location.hostname&&(null==(t=null==e?void 0:e.protocol)?void 0:t.indexOf("http"))===0}}class m{static prefix(){return`__${a.TRACKER_FUNC_NAME}__`}static get(e){let t=`${m.prefix()}${e}`,i=document.cookie.split("; ").find(e=>e.startsWith(`${t}=`));return i?i.split("=")[1]:void 0}static set(e,t,i){let s=`${m.prefix()}${e}`,r=new Date;r.setTime(r.getTime()+60*i*1e3),document.cookie=`${s}=${t}; expires=${r.toUTCString()}; path=/`}static delete(e){let t=`${m.prefix()}${e}`;document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}static clear(){document.cookie.split("; ").filter(e=>e.startsWith(m.prefix())).forEach(e=>{let t=e.split("=")[0];document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`})}static exists(e){return!!m.get(e)}static setUtms(){let e=!1;for(let t=0;t<l.length;t++){let i=l[t];if(h.isPresent(g.getParametersByName(i,window.location.href))){e=!0;break}}if(e){let e,t=[];for(let i=0;i<l.length;i++){let s=l[i];
1e=g.getParametersByName(s,window.location.href),t.push({[s]:encodeURIComponent(e)})}m.set(o.UTM,JSON.stringify(t),24*a.SESSION_EXPIRY_DAYS*60)}}static getUtms(){let e=m.get(o.UTM);return h.isPresent(e)?JSON.parse(e):{}}static createSession(e=!1){(e||!m.exists(o.SESSION))&&m.set(o.SESSION,h.guid(),24*a.SESSION_EXPIRY_DAYS*60),m.setUtms()}}class p{static isBot(){var e;if(typeof window>"u"||typeof navigator>"u")return!1;if(!0===navigator.webdriver)return c.debug("[CPIX] Bot detected: navigator.webdriver is true"),!0;let t=(null==(e=navigator.userAgent)?void 0:e.toLowerCase())||"";return this.BOT_USER_AGENTS.some(e=>t.includes(e.toLowerCase()))?(c.debug("[CPIX] Bot detected: User agent matches bot pattern"),!0):this.hasMissingBrowserFeatures()?(c.debug("[CPIX] Bot detected: Missing browser features"),!0):!!this.isHeadlessBrowser()&&(c.debug("[CPIX] Bot detected: Headless browser indicators"),!0)}static hasMissingBrowserFeatures(){let e=typeof navigator.plugins>"u"||0===navigator.plugins.length,t=typeof navigator.languages>"u"||0===navigator.languages.length;return!!(e&&t)}static isHeadlessBrowser(){var e,t;return!!(null!=(e=navigator.userAgent)&&e.includes("HeadlessChrome"))||0===window.outerWidth&&0===window.outerHeight&&0===window.innerWidth&&0===window.innerHeight&&(0===screen.width||0===screen.height)||(typeof navigator.permissions>"u"&&null!=(t=navigator.userAgent)&&t.includes("Chrome"),!1)}}r(p,"BOT_USER_AGENTS",["googlebot","bingbot","slurp","duckduckbot","baiduspider","yandexbot","sogou","exabot","facebot","ia_archiver","siteauditbot","semrushbot","ahrefsbot","mj12bot","dotbot","megaindex","blexbot","petalbot","applebot","crawler","spider","scraper","headless","phantom","selenium","webdriver","puppeteer","playwright","chromium","chrome-lighthouse"]);class w{constructor(){if(r(this,"instances",[]),r(this,"initialized",!1),r(this,"sessionCreated",!1),r(this,"accessToken",""),r(this,"metaParameters",{}),r(this,"queue"),r(this,"isBot",!1),!window)throw Error("[CPIX] CarterAnalytics SDK can only be used in a browser environment");this.queue=new u({maxRetries:a.QUEUE_MAX_RETRIES,initialDelay:a.QUEUE_INITIAL_DELAY,consumerHandler:this.publishEventToServer.bind(this)})}async initialize(e){if(!e||0===e.length)throw Error("[CPIX] At least one instance configuration is required for initialization");if(this.isBot=p.isBot(),this.isBot){c.debug("[CPIX] Bot detected - SDK will not track events for this session"),this.instances=e,a.DEBUG=!0===this.instances[0].options.debug,this.initialized=!0;return}this.instances=e,a.DEBUG=!0===this.instances[0].options.debug,a.API_URL=this.instances[0].options.tracker_server_url,a.USER_PROPERTIES=this.instances[0].options.user_properties||{},a.SESSION_EXPIRY_DAYS=this.instances[0].options.session_expiry_days||14,a.COMMON_PROPERTIES=this.instances[0].options.common_properties||{},m.exists(o.SESSION)||(m.createSession(),this.sessionCreated=!0);let t=m.get(o.SESSION);if(m.exists(o.META_PARAMETERS)){let e=m.get(o.META_PARAMETERS);if(e)try{let i=JSON.parse(e);i.session!==t?(c.debug("Session ID mismatch detected, regenerating meta parameters"),this.metaParameters=await this.generateMetaParameters(),m.set(o.META_PARAMETERS,JSON.stringify(this.metaParameters),1440)):this.metaParameters=i}catch(e){c.error("Failed to parse meta parameters, regenerating:",e),this.metaParameters=await this.generateMetaParameters(),m.set(o.META_PARAMETERS,JSON.stringify(this.metaParameters),1440)}else this.metaParameters=await this.generateMetaParameters(),m.set(o.META_PARAMETERS,JSON.stringify(this.metaParameters),1440)}else this.metaParameters=await this.generateMetaParameters(),m.set(o.META_PARAMETERS,JSON.stringify(this.metaParameters),1440);if(m.setUtms(),this.initialized)throw Error("[CPIX] CarterAnalytics SDK has already been initialized");if(!this.metaParameters)throw Error("[CPIX] Meta parameters have not been generated");m.exists(o.ACCESS_TOKEN)||(this.accessToken=await d.aquireAccessToken(this.instances[0].client_id),m.set(o.ACCESS_TOKEN,this.accessToken,240)),this.initialized=!0,c.debug("CPIX Initialized"),c.debug("Carter Analytics SDK initialized with options:",this.instances),this.sessionCreated&&this.publishInit(),this.attachHistoryListener()}publishInit(){this.publish({event:"init",user_properties:a.USER_PROPERTIES,...this.metaParameters})}attachHistoryListener(){let e=history.pushState,t=history.replaceState,i=()=>{this.publish({event:"page_view",event_properties:{title:document.title,page:window.location.pathname,url:window.location.href},user_properties:a.USER_PROPERTIES,...this.metaParameters})};history.pushState=(...t)=>{e.apply(history,t),i()},history.replaceState=(...e)=>{t.apply(history,e),i()},window.addEventListener("popstate",i),i()}publish(e){if(!this.initialized)throw Error("[CPIX] CarterAnalytics SDK has not been initialized. Please initialize before publishing events.");if(this.isBot||p.isBot())return void c.debug("[CPIX] Event publishing blocked - bot detected");let t={...e,...this.metaParameters};if(t.utm_params=m.getUtms(),document.referrer&&(t.referrer=encodeURIComponent(document.referrer)),c.debug("Publishing event:",t),this.queue.publish(t),"logout"===e.event){m.delete(o.SESSION),m.delete(o.META_PARAMETERS),m.createSession(!0);let e=m.get(o.SESSION);if(!e)return void c.error("[CPIX] Failed to create new session on logout");this.generateMetaParameters().then(t=>{t.session!==e&&(c.error("[CPIX] Session ID mismatch after logout, updating meta parameters"),t.session=e),this.metaParameters=t,m.set(o.META_PARAMETERS,JSON.stringify(this.metaParameters),1440),this.publishInit()})}}async generateMetaParameters(){if(!window)throw Error("[CPIX] Meta parameters can only be generated in a browser environment");let e=await d.getDeviceNetworkParameters();return{client_id:this.instances[0].client_id,session:m.get(o.SESSION),location:{city:e.city,region:e.region,loc:e.loc,timezone:e.timezone,country:e.country},device:{category:d.getDeviceCategory(),brand:d.getDeviceManufacturer(),ip_address:e.ip_address,platform:d.getDevicePlatform(),browser_name:d.getBrowserName(),browser_version:d.getBrowserVersion(),screen_resolution:d.getScreenResolution(),viewport_size:d.getViewportSize(),language:d.getLanguage(),os_version:d.getOSVersion(),user_agent:d.getUserAgent(),cpix_sdk_version:a.version},referrer:encodeURIComponent(document.referrer)}}async publishEventToServer(e){try{e.timestamp=Date.now(),e.event_properties={url:window.location.href,...a.COMMON_PROPERTIES,...e.event_properties},e.device&&(e.device.cpix_sdk_version=a.version);let t=await fetch(`${a.API_URL}
1/api/event`,{method:"POST",body:JSON.stringify({event_data:e}),headers:{"Content-Type":"application/json",Authorization:`Bearer ${m.get(o.ACCESS_TOKEN)}`}});if(!t.ok)throw 401===t.status&&(this.accessToken=await d.aquireAccessToken(this.instances[0].client_id),m.set(o.ACCESS_TOKEN,this.accessToken,240)),Error("[CPIX] Failed to publish event");c.debug("Event published:",t.ok)}catch(e){throw c.error("Failed to publish event:",e),Error("[CPIX] Failed to publish event")}}}let v=new w;"u">typeof window&&(window.cpix=v)}}]);

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.