1"use strict";(()=>{var Wl=Object.defineProperty;var p=(i,e)=>()=>(i&&(e=i(i=0)),e);var O=(i,e)=>{for(var t in e)Wl(i,t,{get:e[t],enumerable:!0})};var T=p(()=>{"use strict"});var z,pt=p(()=>{"use strict";z=class{static report(e){try{this.errors.unshift({...e,data:e.data?this.safeClone(e.data):void 0}),this.errors.length>this.MAX_ERRORS&&this.errors.pop()}catch(t){try{console.error("Error in error reporter:",t)}catch{}}}static getErrors(){try{return this.safeClone(this.errors)}catch{return[]}}static clearErrors(){try{this.errors=[]}catch{}}static safeClone(e){try{return JSON.parse(JSON.stringify(e))}catch{if(typeof e=="object"&&e!==null){let t={};for(let n in e){let r=e[n];typeof r!="object"||r===null?t[n]=r:t[n]="[Object]"}return t}return e}}static safeStringify(e){try{return JSON.stringify(e)}catch{return"[Object]"}}};z.errors=[],z.MAX_ERRORS=10});function N(i){return{success:!0,value:i,unwrap(){return this.value},unwrapOr(){return this.value}}}function be(i){return{success:!1,error:i,unwrap(){throw this.error},unwrapOr(e){return e}}}var Je=p(()=>{"use strict"});function c(i,e){try{return i()}catch{return e}}function E(i,e){try{return N(i())}catch(t){let n=t instanceof Error?t.message:String(t),r={...e,message:`${e.message}: ${n}`};try{z.report(r)}catch{try{console.error("Failed to handle error:",n)}catch{}}return be(r)}}async function b(i,e){try{return N(await i())}catch(t){let n=t instanceof Error?t.message:String(t),r=t==null?void 0:t.statusCode,o={...e,...typeof r=="number"?{statusCode:r}:{},message:`${e.message}: ${n}`};try{z.report(o)}catch{try{console.error("Failed to handle async error:",n)}catch{}}return be(o)}}var m=p(()=>{"use strict";pt();Je()});var U,bn=p(()=>{"use strict";U=class{static ensureInitialized(){this.initialized||(this.initialized=!0)}static get(){this.ensureInitialized();try{return!this.config.enabled||!this.staticData?null:{...this.staticData}}catch{return null}}static set(e){this.ensureInitialized();try{if(!this.config.enabled)return;this.staticData={...e},this.logCacheStats()}catch{}}static clear(){try{let e=this.staticData!==null;this.staticData=null,this.stats.lastClearTime=Date.now()}catch{this.staticData=null}}static invalidateArticleData(){try{if(this.staticData){let e=this.staticData.ex_articleData!==void 0;this.staticData={...this.staticData,ex_articleData:void 0}}}catch{}}static invalidateUserData(){try{if(this.staticData){let e=this.staticData.ex_userData!==void 0;this.staticData={...this.staticData,ex_userData:void 0}}}catch{}}static updateArticleData(e){try{if(!this.config.enabled)return;this.staticData&&(this.staticData={...this.staticData,ex_articleData:e})}catch{}}static updateUserData(e){try{if(!this.config.enabled)return;this.staticData&&(this.staticData={...this.staticData,ex_userData:e})}catch{}}static getStats(){return{...this.stats}}static setEnabled(e){try{let t=this.config.enabled;this.config.enabled=e,t!==e&&this.logCacheStats(),!e&&this.staticData!==null&&this.clear()}catch{}}static isEnabled(){return this.config.enabled}static recordHit(e){try{this.stats.hits++,this.stats.timeSavedMs+=e}catch{}}static recordMiss(){try{this.stats.misses++}catch{}}static resetStats(){this.stats={hits:0,misses:0,timeSavedMs:0,lastClearTime:Date.now()}}static logCacheStats(){try{let e=this.stats.hits+this.stats.misses>0?(this.stats.hits/(this.stats.hits+this.stats.misses)*100).toFixed(1):"0.0"}catch{}}};U.staticData=null,U.config={enabled:!0},U.stats={hits:0,misses:0,timeSavedMs:0,lastClearTime:Date.now()},U.initialized=!1});function Wo(i){let e={...Ce,...i||{}};return{...e,enabled:e.enabled===!0,mock:e.mock===!0,containerSelector:qo(e.containerSelector,Ce.containerSelector),unitSelector:qo(e.unitSelector,Ce.unitSelector),excludeSelectors:Array.isArray(e.excludeSelectors)?e.excludeSelectors.filter(t=>typeof t=="string"&&t.trim().length>0):[],includeOutbound:e.includeOutbound===!0,preserveQueryParams:Array.isArray(e.preserveQueryParams)?e.preserveQueryParams.filter(t=>typeof t=="string"&&t.length>0):[],window:e.window==="5m"||e.window==="30m"||e.window==="24h"?e.window:Ce.window,pollIntervalMs:Qi(e.pollIntervalMs,1e3,Ce.pollIntervalMs),chunkSize:Math.min(200,Qi(e.chunkSize,1,Ce.chunkSize)),staleAfterMs:Qi(e.staleAfterMs,1e3,Ce.staleAfterMs)}}function qo(i,e){return typeof i=="string"&&i.trim().length>0?i:e}function Qi(i,e,t){return typeof i!="number"||!Number.isFinite(i)?t:Math.max(e,Math.floor(i))}var Ce,$o=p(()=>{"use strict";Ce={enabled:!1,containerSelector:"body",unitSelector:"article",excludeSelectors:[],includeOutbound:!1,preserveQueryParams:[],window:"30m",pollIntervalMs:3e4,staleAfterMs:9e4,chunkSize:100,mock:!1}});var Xi,Cn,Ji,Zi,er,tr,Yo,nr,$l,ir,rr,d,w=p(()=>{"use strict";T();m();bn();$o();Xi={hiddenPageTimeout:3e4,enableSPATracking:!1,enableVisibilityTracking:!0,trackHashChanges:!1},Cn={enabled:!0,ping_interval_seconds:15,send_on_visibility_change:!0,min_active_time_for_visibility_ping:3,visibility_debounce_ms:1e3,enable_spa_tracking:!1,ping_decay_schedule:[],ping_sampling_rate:1},Ji={enabled:!0,maxEvents:100,ttlHours:24,maxAttempts:3},Zi={enabled:!1,report_interval_seconds:300},er={trackInertClicks:!1,inertClickSamplingRate:1,internalHosts:[]},tr={enabled:!1,samplingRate:1,rawHtmlCheck:!1,rawHtmlCheckSamplingRate:.01,maxChecksPayloadBytes:2048},Yo={enabled:!1,persist:!1,maxAgeDays:395,identityLawfulBasis:"consent"},nr={enabled:!0,articleDetection:"auto",articlePaths:[],wordCount:"auto"},$l="dataLayer",ir={enabled:!1,cookieName:"naviga_ab_session",variantCookiePrefix:"naviga_ab_variant_",tokenQueryParam:"naviga_ab_token",previewQueryParam:"naviga_ab_preview",headlineSelectors:["h1","h2","h3"],experimentTTLSeconds:60,variantCookieDays:30,exposureGating:!0,stickinessMode:"session"},rr={treatReplaceStateAsNavigation:!1},d=class{static set(e){c(()=>{this.config={...this.config,...e},e.enableEventDataCaching!==void 0&&U.setEnabled(e.enableEventDataCaching),this.validateEncryptionConfig()},void 0)}static get(){return c(()=>({...this.config}),{organisation_name:"",publication_name:"",publication_id:"",api_base_url:"",api_key:"",loggingEnabled:!1,sdk_health_enabled:!1,preload:!1})}static isSdkHealthEnabled(){return c(()=>this.config.sdk_health_enabled===!0,!1)}static disable_set(e){c(()=>{this.disable_config={...this.disable_config,...e}},void 0)}static disable_get(){return c(()=>this.disable_config,{DisableOption:!1})}static getValue(e){return c(()=>this.config[e],void 0)}static getArticleDetails(){return E(()=>{let e=this.config.articleDetailsMapping;if(!e||!e.variableName)return{};let t=this.getGlobalVariable(e.variableName,e.path);return t||{}}
1,{message:"Failed to get article details",severity:"medium",source:"ConfigManager.getArticleDetails",configKey:"articleDetailsMapping"})}static getUserDetails(){return E(()=>{let e=this.config.userDetailsMapping;if(!e||!e.variableName)return{};let t=this.getGlobalVariable(e.variableName,e.path);return t||{}},{message:"Failed to get user details",severity:"medium",source:"ConfigManager.getUserDetails",configKey:"userDetailsMapping"})}static getCustomEventCommonDetails(){return c(()=>{var n;let e=(n=this.config.customEvents)==null?void 0:n.commonDetailsMapping;if(!e||!e.variableName)return{};let t=this.getGlobalVariable(e.variableName,e.path);return!t||typeof t!="object"||Array.isArray(t)?{}:{...t}},{})}static getCustomEventExcludeKeys(){var e;return this.normalizeKeyList((e=this.config.customEvents)==null?void 0:e.excludeKeys)}static getCrossDomainLinkerHosts(){return c(()=>{var t;let e=(t=this.config.customEvents)==null?void 0:t.linkerHosts;return e===void 0?[".subscriberconcierge.com"]:Array.isArray(e)?e.filter(n=>typeof n=="string").map(n=>n.trim().toLowerCase()).filter(n=>n!==""):[]},[".subscriberconcierge.com"])}static getCustomEventBindings(){return c(()=>{var t;let e=(t=this.config.customEvents)==null?void 0:t.bindings;return Array.isArray(e)?e.filter(n=>n&&typeof n=="object"&&(n.sourceType==="dom"||n.sourceType==="knockout")&&typeof n.sourceEventName=="string"&&n.sourceEventName.trim()!==""&&typeof n.targetEventName=="string"&&n.targetEventName.trim()!==""&&(n.payloadMapper===void 0||typeof n.payloadMapper=="function")):[]},[])}static normalizeKeyList(e){return c(()=>{if(!Array.isArray(e))return[];let t=e.filter(n=>typeof n=="string").map(n=>n.trim()).filter(n=>n.length>0);return Array.from(new Set(t))},[])}static resolveMappedGlobal(e){return c(()=>!e||!e.variableName?null:this.getGlobalVariable(e.variableName,e.path),null)}static getGlobalVariable(e,t){return c(()=>{let n=window[e];return n?t?t.split(".").reduce((r,o)=>r&&r[o]!==void 0?r[o]:null,n):n:null},null)}static setPageLeaveConfig(e){c(()=>{this.pageLeaveConfig={...Xi,...e}},void 0)}static getPageLeaveConfig(){return c(()=>({...this.pageLeaveConfig}),{...Xi})}static setHeartbeatConfig(e){c(()=>{let t={};if(e.enabled!==void 0&&(t.enabled=e.enabled),e.ping_interval_seconds!==void 0&&(t.ping_interval_seconds=e.ping_interval_seconds),e.send_on_visibility_change!==void 0&&(t.send_on_visibility_change=e.send_on_visibility_change),e.min_active_time_for_visibility_ping!==void 0&&(t.min_active_time_for_visibility_ping=e.min_active_time_for_visibility_ping),e.visibility_debounce_ms!==void 0&&(t.visibility_debounce_ms=e.visibility_debounce_ms),e.enable_spa_tracking!==void 0&&(t.enable_spa_tracking=e.enable_spa_tracking),e.ping_decay_schedule!==void 0&&(t.ping_decay_schedule=e.ping_decay_schedule),e.ping_sampling_rate!==void 0&&(t.ping_sampling_rate=e.ping_sampling_rate),t.ping_decay_schedule!==void 0){let n=Array.isArray(t.ping_decay_schedule)?t.ping_decay_schedule:[],r=n.filter(o=>o&&Number.isFinite(o.after_seconds)&&Number.isFinite(o.interval_seconds)&&o.after_seconds>=0).map(o=>({after_seconds:Math.floor(o.after_seconds),interval_seconds:Math.min(300,Math.max(5,Math.floor(o.interval_seconds)))})).sort((o,s)=>o.after_seconds-s.after_seconds);r.length,n.length,t.ping_decay_schedule=r}if(t.ping_sampling_rate!==void 0){let n=t.ping_sampling_rate;(!Number.isFinite(n)||n<0||n>1)&&(t.ping_sampling_rate=1)}t.ping_interval_seconds!==void 0&&(t.ping_interval_seconds<5||t.ping_interval_seconds>60)&&(t.ping_interval_seconds=Cn.ping_interval_seconds),this.heartbeatConfig={...Cn,...t}},void 0)}static getHeartbeatConfig(){return c(()=>({...this.heartbeatConfig}),{...Cn})}static setABConfig(e){c(()=>
1{this.abTestingConfig={...ir,...e}},void 0)}static getABConfig(){return c(()=>({...this.abTestingConfig}),{...ir})}static setEventQueueConfig(e){c(()=>{this.eventQueueConfig={...Ji,...e}},void 0)}static getEventQueueConfig(){return c(()=>({...this.eventQueueConfig}),{...Ji})}static setTelemetryConfig(e){c(()=>{this.telemetryConfig={...Zi,...e}},void 0)}static getTelemetryConfig(){return c(()=>({...this.telemetryConfig}),{...Zi})}static setClickTrackingConfig(e){c(()=>{let t={...er};if(e&&e.trackInertClicks!==void 0&&(t.trackInertClicks=e.trackInertClicks===!0),e&&e.inertClickSamplingRate!==void 0){let n=e.inertClickSamplingRate;!Number.isFinite(n)||n<0||n>1||(t.inertClickSamplingRate=n)}e&&e.internalHosts!==void 0&&(t.internalHosts=this.normalizeKeyList(e.internalHosts).map(n=>n.toLowerCase())),this.clickTrackingConfig=t},void 0)}static getClickTrackingConfig(){return c(()=>({...this.clickTrackingConfig}),{...er})}static setContentReadinessConfig(e){c(()=>{this.contentReadinessConfig={...tr,...e}},void 0)}static getContentReadinessConfig(){return c(()=>({...this.contentReadinessConfig}),{...tr})}static setLinkStatsConfig(e){c(()=>{this.linkStatsConfig=Wo(e)},void 0)}static getLinkStatsConfig(){return c(()=>({...this.linkStatsConfig}),{...Ce})}static setConsentConfig(e){c(()=>{this.consentConfig={...this.consentConfig,...e}},void 0)}static setSpaNavigationConfig(e){c(()=>{let t={...rr};e&&e.treatReplaceStateAsNavigation!==void 0&&(t.treatReplaceStateAsNavigation=e.treatReplaceStateAsNavigation===!0),this.spaNavigationConfig=t},void 0)}static getConsentConfig(){return c(()=>({...this.consentConfig}),{...Yo})}static getSpaNavigationConfig(){return c(()=>({...this.spaNavigationConfig}),{...rr})}static setAutoContextConfig(e){c(()=>{let t={...nr};if(e&&e.enabled!==void 0&&(t.enabled=e.enabled),e&&e.articleDetection!==void 0&&(t.articleDetection=e.articleDetection),e&&e.articlePaths!==void 0&&(t.articlePaths=Array.isArray(e.articlePaths)?[...e.articlePaths]:[]),e&&e.wordCount!==void 0&&(t.wordCount=e.wordCount),e&&e.dataLayerMapping!==void 0){let n=e.dataLayerMapping;n&&typeof n=="object"&&(t.dataLayerMapping={variableName:typeof n.variableName=="string"&&n.variableName.trim()!==""?n.variableName:$l,fields:n.fields&&typeof n.fields=="object"?{...n.fields}:{}})}e&&e.profile!==void 0&&e.profile&&typeof e.profile=="object"&&(t.profile={...e.profile}),e&&e.pageClasses!==void 0&&(t.pageClasses=this.sanitizePageClasses(e.pageClasses)),this.autoContextConfig=t},void 0)}static getAutoContextConfig(){return c(()=>({...this.autoContextConfig}),{...nr})}static sanitizePageClasses(e){return c(()=>{if(!e||typeof e!="object"||Array.isArray(e))return;let t={};for(let[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;let o={},{hosts:s,paths:a}=r;Array.isArray(s)&&(o.hosts=[...s]),Array.isArray(a)&&(o.paths=[...a]),t[n]=o}return t},void 0)}static validateEncryptionConfig(){c(()=>{let{enableEncryption:e,publicKey:t,encryptionKeys:n}=this.config;if(n!==void 0){if(!Array.isArray(n))return;n.forEach((o,s)=>{typeof o!="string"||o.trim()===""||this.hasInvalidFieldPathCharacters(o)})}t!==void 0&&t!==""&&this.isValidPEMFormat(t),e===!0&&(!t||t.trim());let r=Array.isArray(n)&&n.some(o=>typeof o=="string"&&o.trim()!=="")},void 0)}static isValidPEMFormat(e){return c(()=>{let t=e.trim();return t.includes("-----BEGIN")&&t.includes("-----END")},!1)}static hasInvalidFieldPathCharacters(e){return c(()=>!/^[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)*$/.test(e),!1)}static getEncryptionConfig(){return c(()=>{let{enableEncryption:e,encryptionKeys:t,publicKey:n}=this.config;return{enabled:e===!0,keys:Array.isArray(t)?t.filter(r=>typeof r=="string"&&r.trim()!==""):[],publicKey:n&&n.trim()!==""?n:void 0}},{enabled:!1,keys:[],publicKey:void 0})}};d.config={organisation_name:"",publication_name:"",publication_id:"",api_base_url:"",bff_base_url:"",api_key:"",loggingEnabled:!1,sdk_health_enabled:!1,preload:!0},d.pageLeaveConfig={...Xi},d.heartbeatConfig={...Cn},d.abTestingConfig={...ir},d.eventQueueConfig={...Ji},d.telemetryConfig={...Zi},d.clickTrackingConfig={...er},d.contentReadinessConfig={...tr},d.linkStatsConfig={...Ce},d.consentConfig={...Yo},d.spaNavigationConfig={...rr},d.autoContextConfig={...nr},d.disable_config={DisableOption:!1}});var Yl,Oe,_n=p(()=>{"use strict";Yl={page_title:"",article_section:"",article_section_uuid:"",article_title:"",author_uuid:"",author_name:"",article_url:"",article_uuid:"",article_publication_date:"",article_is_premium:"",additional_info:{}
1,article_concept_uuid:"",article_concept_name:"",article_publication:"",article_content:""},Oe=Yl});function Xl(i){if(typeof i!="string")return null;let e=i.trim();if(e==="")return null;let t=Math.min(e.indexOf("?")===-1?e.length:e.indexOf("?"),e.indexOf("#")===-1?e.length:e.indexOf("#"));return e=e.slice(0,t),e===""?null:e.startsWith("/")?e:`/${e}`}function Jo(i){if(typeof i!="string")return null;let e=i.trim();if(e===""||e.length>Ql)return null;let t=e.endsWith("*")?e.slice(0,-1):e;return t.includes("*")||t===""?null:t.startsWith("/")?t:`/${t}`}function Jl(i,e){if(!i.startsWith(e))return!1;if(e.endsWith("/"))return!0;let t=i.charAt(e.length);return t===""||t==="/"}function Ut(i,e){return c(()=>{if(!Array.isArray(e)||e.length===0)return!1;let t=Xl(i);if(t===null)return!1;for(let n of e.slice(0,Xo)){let r=Jo(n);if(r!==null&&Jl(t,r))return!0}return!1},!1)}function gt(i){return c(()=>Array.isArray(i)?i.slice(0,Xo).some(e=>Jo(e)!==null):!1,!1)}var Xo,Ql,En=p(()=>{"use strict";m();Xo=50,Ql=256});function wn(i,e){let t=(i||"").toLowerCase();return t?e.some(n=>n.startsWith(".")?t===n.slice(1)||t.endsWith(n):t===n):!1}var or=p(()=>{"use strict"});function Bt(i){return!/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(i)&&!i.startsWith("//")}function sr(i){for(let t of Zl)if(i.has(t))return!0;let e=i.get("error");return!!(e!==null&&eu.has(e))}function ar(i){return sr(i)||i.has("code")&&i.has("state")}function Zo(i){return typeof i!="string"||i.indexOf("?")===-1?null:new URL(i,Bt(i)?Ft:void 0).searchParams}function cr(i){return c(()=>{let e=Zo(i);return e!==null&&sr(e)},!1)}function es(i){return c(()=>{let e=Zo(i);return e!==null&&ar(e)&&!sr(e)},!1)}var Zl,eu,Ft,lr=p(()=>{"use strict";m();Zl=["access_token","id_token","id_token_hint","refresh_token","code_verifier","code_challenge","client_secret","session_state","error_description","error_uri","response_type","grant_type","token_type","redirect_uri"],eu=new Set(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invali
1d_scope","server_error","temporarily_unavailable","interaction_required","login_required","account_selection_required","consent_required","invalid_request_uri","invalid_request_object","request_not_supported","request_uri_not_supported","registration_not_supported"]),Ft="http://relative.invalid"});function ns(){try{let i=window;return i[ts]===!0?!1:(i[ts]=!0,!0)}catch{return!0}}function fr(i){try{i()}catch{}}function Sn(i){if(Vt){fr(i);return}ur.push(i)}function is(i=dr,e){Vt||mt!==null||(mt=setTimeout(()=>{mt=null,e&&fr(e),pr("grace period elapsed without init()")},i))}function pr(i){if(Vt)return;Vt=!0,mt!==null&&(clearTimeout(mt),mt=null);let e=ur;ur=[],e.length>0;for(let t of e)fr(t)}function An(){return Vt}var ts,dr,Vt,ur,mt,kn=p(()=>{"use strict";ts="__navigaAnalyticsInstalled";dr=250,Vt=!1,ur=[],mt=null});function ru(){return c(()=>{var e;if(typeof performance=="undefined"||typeof performance.getEntriesByType!="function")return null;let i=performance.getEntriesByType("navigation");return!Array.isArray(i)||i.length===0?null:(e=i[0])!=null?e:null},null)}function ou(i){return c(()=>{let e=i.name;return typeof e!="string"||e===""||typeof window=="undefined"||!window.location?!1:new URL(e).pathname===window.location.pathname},!1)}function su(){return c(()=>{let i=ru();if(i===null||!ou(i))return null;let e=i.responseStatus;return typeof e!="number"||!Number.isFinite(e)?null:e>=tu&&e<=nu?e:null},null)}function au(){return c(()=>{if(typeof document=="undefined"||!document.body)return!1;let i=document.body.classList;return!i||typeof i.contains!="function"?!1:iu.some(e=>i.contains(e))},!1)}function rs(){return c(()=>su()!==null||au(),!1)}var tu,nu,iu,os=p(()=>{"use strict";m();tu=400,nu=599,iu=["error404","error-404","error_404"]});function ss(i){return Array.isArray(i)?i.filter(e=>typeof e=="string"&&e.trim()!==""):[]}function lu(i,e){if(!i)return!1;let t=i.toLowerCase();return ss(e).some(n=>n.toLowerCase()===t)}function as(i){return c(()=>{if(!i||typeof i!="object")return!1;let{hosts:e,paths:t}=i;return ss(e).length>0||gt(t)},!1)}function ls(i){return c(()=>new URL(i,Bt(i)?Ft:void 0),null)}function uu(){return c(()=>{if(typeof performance=="undefined"||typeof performance.getEntriesByType!="function")return null;let i=performance.getEntriesByType("navigation"),e=Array.isArray(i)&&i.length>0?i[0].name:"";return typeof e!="string"||e.trim()===""||ls(e)===null?null:e},null)}function us(){var i;Tn===null&&(Tn=(i=uu())!=null?i:c(()=>typeof window!="undefined"?window.location.href:"",""))}function gr(){return!cs&&Tn?Tn:null}function du(){var e,t;let i=gr();return i===null?null:(t=(e=ls(i))==null?void 0:e.pathname)!=null?t:null}function ds(){return c(()=>{let i=gr();return i===null?null:es(i)?fu:null},null)}var Ht,cu,Tn,cs,J,fu,ht=p(()=>{"use strict";w();or();lr();m();kn();os();En();Ht=["transit","commerce","content"],cu=new Set(["content","commerce","transit","error","unknown"]);Tn=null,cs=!1;J=class{static resolve(){if(this.decision)return{...this.decision};let e=c(()=>this.classify(),{pageClass:"unknown",source:"default"});return(this.apiOverride!==null||An())&&(this.decision=e),{...e}}static setPageClass(e){c(()=>{if(cu.has(e)&&(this.apiOverride=e,this.decision)){let t=this.decision;this.decision={pageClass:e,source:"api"};return}},void 0)}static reset(){this.decision=null,this.apiOverride=null,cs=!0}static isDecided(){return this.decision!==null}static classify(){if(this.apiOverride)return{pageClass:this.apiOverride,source:"api"};if(rs())return{pageClass:"error",source:"heuristic"};let e=this.resolveFromConfig();if(e)return{pageClass:e,source:"config"};let t=this.resolveFromHeuristic();return t?{pageClass:t,source:"heuristic"}:{pageClass:"unknown",source:"default"}}static resolveFromConfig(){var e,t;return(t=(e=this.resolveDeclaredPageClass())!=null?e:this.resolveFromConfigPatterns())!=null?t:this.resolveFromLinkerHosts()}static resolveDeclaredPageClass(){let e=d.getValue("pageClass");return typeof e=="string"&&Ht.includes(e)?e:null}static resolveFromConfigPatterns(){var s;let e=d.getAutoContextConfig().pageClasses;if(!e||typeof e!="object")return null;let t=c(()=>window.location.pathname,""),n=c(()=>window.location.hostname,""),r=du(),o=r!==null&&r!==t?r:null;for(let a of Ht){let l=e[a];if(!l||typeof l!="object")continue;let u=(s=l.paths)!=null?s:[];if(lu(n,l.hosts)||Ut(t,u)||o!==null&&Ut(o,u))return a}return null}static resolveFromLinkerHosts(){let e=d.getCrossDomainLinkerHosts();if(e.length===0)return null;let t=c(()=>window.location.hostname,"");return wn(t,e)?"commerce":null}static resolveFromHeuristic(){let e=c(()=>window.location.href,"");if(e&&cr(e))return"transit";let t=gr();return t!==null&&cr(t)?"transit":null}};J.decision=null,J.apiOverride=null;fu="oauth_url_shape"});var $,Ze=p(()=>{$={SDK_VERSION:"1.8.1",API_BASE_URL:"",Session:{session_key:"naviga-analytics-session",timeout_ms:18e5},DeviceId:{storage_key:"naviga-analytics-device-id"},ARTICLE_READING_SPEED_WPM:225,Heartbeat:{enabled:!0,ping_interval_seconds:15,send_on_visibility_change:!0,min_active_time_for_visibility_ping:3,visibility_debounce_ms:1e3,enable_spa_tracking:!1}}});var _e,Rn=p(()=>{"use strict";m();_e=class{constructor(e,t){this.loadPromise=null;this.loader=e,this.errorDetails=t}async get(){return this.loadPromise||(this.loadPromise=b(this.loader,this.errorDetails)),this.loadPromise}isLoaded(){return this.loadPromise!==null}preload(){this.loadPromise||(this.loadPromise=b(this.loader,this.errorDetails))}}});function hs(i){return bu.replace(/[xy]/g,e=>{let t=i();return(e==="x"?t:t&3|8).toString(16)})}function Ue(){if(typeof crypto!="undefined"&&crypto&&typeof crypto.randomUUID=="function")try{return crypto.randomUUID()}catch{}if(typeof crypto!="undefined"&&crypto&&typeof crypto.getRandomValues=="function")try{return hs(()=>crypto.getRandomValues(new Uint8Array(1))[0]%16)}catch{}return hs(()=>Math.random()*16|0)}var bu,zt=p(()=>{"use strict";bu="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"});var jt,Gt,qt,vs,Wt=p(()=>{"use strict";jt="ab_experiment_view",Gt="ab_experiment_click",qt="ab_experiment_qualified_click",vs="session"});function Y(i){return i===mr}function vt(i,e){return e&&Object.prototype.hasOwnProperty.call(e,i)&&e[i].length>0?[...e[i]]:Object.prototype.hasOwnProperty.call(ys,i)?[...ys[i]]:[...Cu]}function bs(i){return typeof i!="number"||!Number.isInteger(i)?!1:_u.indexOf(i)!==-1}var j,mr,Cu,ys,xn,_u,Ee=p(()=>{"use strict";Wt();j=["necessary","functional","analytics","marketing"],mr="necessary";
1Cu=["analytics"],ys={page_view:["analytics"],page_leave:["analytics"],engagement_ping:["analytics"],click:["analytics"],sdk_health:["necessary"],content_readiness:["functional"],identify:["functional","analytics"],[jt]:["functional","analytics"],[Gt]:["functional","analytics"],[qt]:["functional","analytics"]};xn={1:"functional",2:"marketing",3:"marketing",4:"marketing",5:"marketing",6:"marketing",7:"analytics",8:"analytics",9:"analytics",10:"analytics",11:"functional"},_u=[2,7,8,9,10,11]});function hr(i,e,t){let n={},r={};for(let s of j){let a=t?t[s]:void 0;n[s]=Cs(a)?a:"unknown",r[s]=Number.NEGATIVE_INFINITY}let o=Array.isArray(i)?i:[];for(let s of o){if(!s||typeof s!="object")continue;let{snapshot:a,precedence:l,regions:u}=s;if(!a||typeof a!="object"||a.regionApplies===!1||!vr(u,e))continue;let f=a.categories;if(!f||typeof f!="object")continue;let g=typeof l=="number"&&Number.isFinite(l)?l:0;for(let v of j){let y=f[v];Cs(y)&&g>r[v]&&(n[v]=y,r[v]=g)}}return n[mr]="granted",n}function vr(i,e){return!Array.isArray(i)||i.length===0?!0:i.some(t=>t===e||t==="GLOBAL")}function Cs(i){return i==="granted"||i==="denied"||i==="unknown"}var _s=p(()=>{"use strict";Ee()});function yr(){let i={};for(let e of j)i[e]="unknown";return i}var S,et=p(()=>{"use strict";m();w();_s();Ee();S=class{static register(e){c(()=>{if(!e||typeof e.id!="string")return;let t=this.providers.get(e.id),n=t?t.snapshot:null;t&&t.provider!==e&&(this.providers.delete(e.id),c(()=>t.provider.teardown(),void 0)),this.providers.set(e.id,{provider:e,snapshot:n});let r=o=>{c(()=>{var l,u;let s=this.providers.get(e.id);if(!s)return;let a=(u=(l=s.snapshot)==null?void 0:l.categories)!=null?u:{};s.snapshot={...o,categories:{...a,...o.categories}},this.recompute()},void 0)};c(()=>{let o=e.init(r);o&&typeof o.catch=="function"&&o.catch(s=>{})},void 0)},void 0)}static refresh(){return this.recompute()}static getState(){return c(()=>(this.state||this.recompute(),this.state?{...this.state}:yr()),this.state?{...this.state}:yr())}static hasAnySignal(){return c(()=>{for(let e of this.providers.values())if(e.snapshot)return!0;return!1},!1)}static hasDecisionFor(e){return c(()=>{if(Y(e))return!0;let t=this.getState()[e];return t==="granted"||t==="denied"},!1)}static assertedCategories(){return c(()=>{let e=hr(this.resolvableSnapshots(),this.resolveActiveRegion(),{}),t=new Set;for(let n of j){if(Y(n))continue;let r=e[n];(r==="granted"||r==="denied")&&t.add(n)}return t},new Set)}static getStampState(){return c(()=>{let e=this.getState(),t=[];for(let n of this.providers.values())n.snapshot&&t.push(n.provider.id);return{...e,_src:t,_region:this.resolveActiveRegion()}},{...yr(),_src:[],_region:"GLOBAL"})}static onChange(e){return c(()=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),()=>{})}static resolvableSnapshots(){let e=[];for(let t of this.providers.values())t.snapshot&&e.push({snapshot:t.snapshot,precedence:t.provider.precedence,regions:t.provider.regions});return e}static recompute(){return c(()=>{let e=this.resolveActiveRegion(),t=this.resolvableSnapshots();for(let a of this.providers.values())this.warnIfRegionExcluded(a,e);let n=d.getConsentConfig(),r=n.defaults&&n.defaults[e]||{},o=hr(t,e,r),s=!this.state||!this.statesEqual(this.state,o);return this.state=o,s&&this.notify(o),s},!1)}static warnIfRegionExcluded(e,t){if(!e.snapshot||vr(e.provider.regions,t))return;let n=Array.isArray(e.provider.regions)?e.provider.regions.join(", "):""}static resolveActiveRegion(){return c(()=>{let e=d.getConsentConfig().region;if(typeof e=="function"){let t=e();return typeof t=="string"&&t?t:"GLOBAL"}return typeof e=="string"&&e?e:"GLOBAL"},"GLOBAL")}static notify(e){for(let t of this.listeners)c(()=>t({...e}),void 0)}static statesEqual(e,t){for(let n of j)if(e[n]!==t[n])return!1;return!0}static reset(){c(()=>{let e=Array.from(this.providers.values());this.providers.clear(),this.listeners.clear(),this.state=null;for(let t of e)c(()=>t.provider.teardown(),void 0)},void 0)}static teardown(){this.reset()}};S.providers=new Map,S.state=null,S.listeners=new Set});var Eu,Pn,wu,Fe,br=p(()=>{"use strict";Eu="naviga_analytics_v1",Pn="event_queue",wu=1,Fe=class{constructor(){this.db=null}static isSupported(){return typeof indexedDB!="undefined"}async open(){if(!this.db)return new Promise((e,t)=>
1{let n=indexedDB.open(Eu,wu);n.onupgradeneeded=()=>{let r=n.result;r.objectStoreNames.contains(Pn)||r.createObjectStore(Pn,{keyPath:"id",autoIncrement:!0})},n.onsuccess=()=>{this.db=n.result,e()},n.onerror=()=>t(n.error||new Error("IDB open failed")),n.onblocked=()=>t(new Error("IDB open blocked by another tab"))})}async tx(e,t){return await this.open(),new Promise((n,r)=>{let o=this.db.transaction(Pn,e),s=o.objectStore(Pn),a=t(s);a.onsuccess=()=>n(a.result),a.onerror=()=>r(a.error),o.onabort=()=>r(o.error||new Error("IDB transaction aborted")),o.onerror=()=>r(o.error||new Error("IDB transaction failed"))})}async add(e){return await this.tx("readwrite",n=>n.add(e))}async update(e){await this.tx("readwrite",t=>t.put(e))}async getAll(){return await this.tx("readonly",e=>e.getAll())}async remove(e){await this.tx("readwrite",t=>t.delete(e))}async count(){return await this.tx("readonly",e=>e.count())}async clear(){await this.tx("readwrite",e=>e.clear())}}});function Es(i){return{get(e){return c(()=>i().getItem(e),null)},set(e,t,n){c(()=>{i().setItem(e,t)},void 0)},remove(e){c(()=>{i().removeItem(e)},void 0)},keys(){return c(()=>Object.keys(i()),[])}}}function ku(i){if(typeof document=="undefined"||!document.cookie)return null;let e=encodeURIComponent(i)+"=",t=document.cookie.split(";");for(let n of t){let r=n.trim();if(r.startsWith(e))return decodeURIComponent(r.substring(e.length))}return null}function _r(i){return encodeURIComponent(i)}function Tu(i,e,t){if(typeof document=="undefined")return;let n=typeof location!="undefined"&&location.protocol==="https:",r=(t==null?void 0:t.domain)===null?void 0:(t==null?void 0:t.domain)||d.getABConfig().cookieDomain,o=`${encodeURIComponent(i)}=${_r(e)}; path=/; SameSite=Lax`;r&&(o+=`; Domain=${r}`),n&&(o+="; Secure"),t!=null&&t.days&&t.days>0&&(o+=`; Max-Age=${Math.floor(t.days*86400)}`),document.cookie=o}function Ru(){return typeof document=="undefined"||!document.cookie?[]:document.cookie.split(";").map(i=>i.trim()).filter(i=>i.length>0).map(i=>{let e=i.indexOf("="),t=e===-1?i:i.substring(0,e);return c(()=>decodeURIComponent(t),t)})}function xu(i){if(typeof document=="undefined")return;let e=d.getABConfig().cookieDomain,t=e?`; Domain=${e}`:"";document.cookie=`${encodeURIComponent(i)}=; path=/${t}; Max-Age=0; SameSite=Lax`}function ws(i){Cr=i}function $t(i){return Lu[i]}var Su,Au,Pu,Cr,Iu,Lu,In=p(()=>{"use strict";m();w();br();Su=Es(()=>localStorage),Au=Es(()=>sessionStorage);Pu={get(i){return c(()=>ku(i),null)},set(i,e,t){c(()=>Tu(i,e,t),void 0)},remove(i){c(()=>xu(i),void 0)},keys(){return c(()=>Ru(),[])}},Cr=null;Iu={get(){return null},set(i,e,t){},remove(){if(Cr){try{let i=Cr();i&&typeof i.catch=="function"&&i.catch(e=>{})}catch{}return}if(Fe.isSupported())try{new Fe().clear().catch(i=>{})}catch{}},keys(){return[]}},Lu={local:Su,session:Au,cookie:Pu,idb:Iu}});function Nu(){try{return typeof process!="undefined"&&!!process.env&&!1}catch{return!1}}function Ou(i){let e=d.getABConfig(),t=e.cookieName||"naviga_ab_session";if(i===t||i===`${t}_exp`)return{category:"necessary",store:"cookie"};let n=e.variantCookiePrefix||"naviga_ab_variant_";return i.startsWith(n)?{category:"functional",store:"cookie",prefix:!0}:null}function Er(i){if(Object.prototype.hasOwnProperty.call(yt,i))return yt[i];for(let e of Object.keys(yt)){let t=yt[e];if(t.prefix&&i.startsWith(e))return t}return Ou(i)}function Ss(i){return Y(i)||d.getConsentConfig().enabled!==!0?!0:S.getState()[i]==="granted"}var Du,Mu,yt,h,B=p(()=>{"use strict";m();w();et();Ee();In();Ze();Du=$.Session.session_key,Mu=$.DeviceId.storage_key,yt={[Du]:{category:"analytics",store:"local"},[Mu]:{category:"analytics",store:"local"},"naviga-analytics-user-identity":{category:"functional",store:"local"},"naviga-analytics-last-page-view":{category:"analytics",store:"session"},"naviga-analytics-utm-session":{category:"analytics",store:"session"},"naviga-analytics-utm-first":{category:"analytics",store:"local"},naviga_visitor_seen:{category:"analytics",store:"local"},anonDeviceId:{category:"analytics",store:"cookie"},auth0_sub:{category:"analytics",store:"cookie"},"naviga-analytics-journey-session":{category:"analytics",store:"session"},naviga_ab_qualified_click_queue:{category:"analytics",store:"session"},naviga_ab_variant_:{category:"functional",store:"cookie",prefix:!0},"naviga-cr-audit:":{category:"functional",store:"local",prefix:!0},"naviga-cr-lock:":{category:"functional",store:"local",prefix:!0},"naviga-consent-record":{category:"necessary",store:"cookie"},naviga_ab_session:{category:"necessary",store:"cookie"},naviga_ab_session_exp:{category:"necessary",store:"cookie"},naviga_ab_admin:{category:"necessary",store:"local"},naviga_ab_selector_mode:{category:"necessary",store:"local"},naviga_ab_stats_mode:{category:"necessary",store:"local"},naviga_ab_stats_window:{category:"necessary",store:"local"},naviga_analytics_v1:{category:"analytics",store:"idb"}};h=class{static handleUnregistered(e){if(Nu())throw new Error(`[ConsentedStorage] Unregistered key "${e}" \u2014 add it to KEY_REGISTRY before use.`)}static get(e){let t=Er(e);return t?c(()=>Ss(t.category)?$t(t.store).get(e):null,null):(this.handleUnregistered(e),null)}static set(e,t,n){let r=Er(e);
1if(!r){this.handleUnregistered(e);return}c(()=>{Ss(r.category)&&$t(r.store).set(e,t,n)},void 0)}static remove(e){let t=Er(e);if(!t){this.handleUnregistered(e);return}c(()=>{$t(t.store).remove(e)},void 0)}static purgeUnconsented(e){c(()=>{for(let t of Object.keys(yt)){let n=yt[t];if(Y(n.category)||e[n.category]==="granted")continue;let r=$t(n.store);c(()=>{r.remove(t)},void 0),n.prefix&&c(()=>{for(let o of r.keys())o.startsWith(t)&&r.remove(o)},void 0)}},void 0)}}});var tt,As,ue,ks=p(()=>{"use strict";m();T();zt();Ze();B();tt=$.DeviceId.storage_key,As="anonymous-"+Math.random().toString(36).substring(2,15),ue=class{static getPersistentUUID(){return E(()=>{let e=h.get(tt);return e||(e=Ue(),h.set(tt,e)),e},{message:"Failed to get persistent UUID",severity:"high",source:"UUIDDeviceIdentifier.getPersistentUUID"}).unwrapOr(As)}static getCurrentDeviceId(){return E(()=>h.get(tt),{message:"Failed to get current device ID",severity:"low",source:"UUIDDeviceIdentifier.getCurrentDeviceId"}).unwrapOr(null)}static hasStoredDeviceId(){return E(()=>{let e=h.get(tt);return e!=null},{message:"Failed to check stored device ID",severity:"low",source:"UUIDDeviceIdentifier.hasStoredDeviceId"}).unwrapOr(!1)}static clearDeviceId(){E(()=>{h.remove(tt)},{message:"Failed to clear device ID",severity:"low",source:"UUIDDeviceIdentifier.clearDeviceId"})}static regenerateDeviceId(){return this.clearDeviceId(),this.getPersistentUUID()}static getDeviceIdStats(){return E(()=>{let e=this.getCurrentDeviceId(),t=this.hasStoredDeviceId();return{storageKey:tt,uuidDeviceId:e?e.substring(0,8)+"...":null,hasStoredUUID:t,fallbackId:As.substring(0,8)+"..."}},{message:"Failed to get UUID device ID statistics",severity:"low",source:"UUIDDeviceIdentifier.getDeviceIdStats"}).unwrapOr({})}static isValidUUID(e){return E(()=>/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e),{message:"Failed to validate UUID format",severity:"low",source:"UUIDDeviceIdentifier.isValidUUID"}).unwrapOr(!1)}static getStorageKey(){return tt}static getUUIDCapabilities(){return E(()=>({hasCryptoRandomUUID:typeof crypto!="undefined"&&typeof crypto.randomUUID=="function",hasCryptoGetRandomValues:typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function",hasLocalStorage:typeof localStorage!="undefined",mathRandomFallback:!0}),{message:"Failed to get UUID capabilities",severity:"low",source:"UUIDDeviceIdentifier.getUUIDCapabilities"}).unwrapOr({hasCryptoRandomUUID:!1,hasCryptoGetRandomValues:!1,hasLocalStorage:!1,mathRandomFallback:!0})}}});function Ln(i,e){try{return i()}catch{return e}}var Vm,Dn,Ts,Rs,Mn=p(()=>{"use strict";Vm=Ln(()=>"split","single"),Dn=Ln(()=>"analytics.abtesting.hud.1.8.1.min.js",""),Ts=Ln(()=>"",""),Rs=Ln(()=>!1,!0)});var xs={};O(xs,{load:()=>Uu});function Uu(){return Promise.reject(new Error("fingerprintjs is not bundled in this build (BUNDLE_MODE=split). Rebuild with INCLUDE_FINGERPRINT=1 if a site requires anonymousIdProcessor: 'fingerprint'."))}var Ps=p(()=>{});var wr,Be,Nn=p(()=>{"use strict";m();Rn();w();T();ks();pt();Mn();wr=new _e(()=>Promise.resolve().then(()=>(Ps(),xs)).then(i=>i.load()),{message:"Failed to load fingerprint library",severity:"high",source:"DeviceIdentifier.loadFingerprint",moduleName:"@fingerprintjs/fingerprintjs"}),Be=class{static async getVisitorId(){return await b(async()=>d.get().anonymousIdProcessor==="fingerprint"?Rs?await this.getFingerprintId():(z.report({message:"Site config requests anonymousIdProcessor 'fingerprint' but fingerprintjs is not bundled in this build \u2014 falling back to persistent UUID, which changes this site's device_id strategy. Rebuild with INCLUDE_FINGERPRINT=1.",severity:"high",source:"DeviceIdentifier.fingerprintNotBundled"}),ue.getPersistentUUID()):ue.getPersistentUUID(),{message:"Failed to generate visitor ID",severity:"high",source:"DeviceIdentifier.getVisitorId",fallbackUsed:!0})}static async getFingerprintId(){try{let e=await wr.get();if(!e.success)return ue.getPersistentUUID();let t=e.value;return t?(await t.get()).visitorId:ue.getPersistentUUID()}catch{return ue.getPersistentUUID()}}static getCurrentDeviceId(){return E(()=>d.get().anonymousIdProcessor==="fingerprint"?null:ue.getCurrentDeviceId(),{message:"Failed to get current device ID",severity:"low",source:"DeviceIdentifier.getCurrentDeviceId"}).unwrapOr(null)}static hasStoredDeviceId(){return E(()=>d.get().anonymousIdProcessor==="fingerprint"?!1:ue.hasStoredDeviceId(),{message:"Failed to check
1stored device ID",severity:"low",source:"DeviceIdentifier.hasStoredDeviceId"}).unwrapOr(!1)}static getDeviceIdType(){return E(()=>{let t=d.get().anonymousIdProcessor;return t==="fingerprint"?"fingerprint":"uuid"},{message:"Failed to get device ID type",severity:"low",source:"DeviceIdentifier.getDeviceIdType"}).unwrapOr("unknown")}static getDeviceIdStats(){return E(()=>{let e=this.getCurrentDeviceId(),t=this.hasStoredDeviceId(),n=this.getDeviceIdType(),r={currentDeviceId:e?e.substring(0,8)+"...":null,hasStoredId:t,idType:n,fingerprintLoaded:wr.isLoaded()};return n==="uuid"?{...r,...ue.getDeviceIdStats()}:r},{message:"Failed to get device ID statistics",severity:"low",source:"DeviceIdentifier.getDeviceIdStats"}).unwrapOr({})}static preload(){d.get().anonymousIdProcessor==="fingerprint"&&wr.preload()}}});var On,Un,Is,de,Yt=p(()=>{"use strict";T();m();Rn();Je();Un={detectPlatformType(){let i=navigator.userAgent.toLowerCase(),e=/ipad|android(?!.*mobile)|tablet|kindle|playbook/.test(i)||navigator.maxTouchPoints>1&&screen.width>=768&&screen.width<=1024;return/iphone|ipod|android.*mobile|blackberry|phone/.test(i)||navigator.maxTouchPoints>1&&screen.width<768?"mobile":e?"tablet":"desktop"},isIOSSafari(){let i=navigator.userAgent,e=/iPad|iPhone|iPod/.test(i),t=/Safari/.test(i)&&!/Chrome|CriOS|FxiOS|EdgiOS/.test(i);return e&&t},isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)},isDesktop(){return this.detectPlatformType()==="desktop"},detectPlatformModel(){let i=navigator.userAgent,e=[{pattern:/Edg\//i,name:"Edge"},{pattern:/Edge\//i,name:"Edge"},{pattern:/Arc\//i,name:"Arc"},{pattern:/Atlas\//i,name:"Atlas"},{pattern:/Comet\//i,name:"Comet"},{pattern:/Brave\//i,name:"Brave"},{pattern:/Vivaldi\//i,name:"Vivaldi"},{pattern:/OPR\//i,name:"Opera"},{pattern:/Opera/i,name:"Opera"},{pattern:/SamsungBrowser\//i,name:"Samsung Internet"},{pattern:/UCBrowser\//i,name:"UC Browser"},{pattern:/DuckDuckGo\//i,name:"DuckDuckGo"},{pattern:/Yandex\//i,name:"Yandex"},{pattern:/Chrome\//i,name:"Chrome"},{pattern:/Firefox\//i,name:"Firefox"},{pattern:/Safari\//i,name:"Safari"}];for(let{pattern:t,name:n}of e)if(t.test(i))return n;return"unknown"},detectPlatformVersion(){let i=navigator.userAgent,e=[{pattern:/Edg\/([\d.]+)/,name:"Edge"},{pattern:/Edge\/([\d.]+)/,name:"Edge"},{pattern:/Arc\/([\d.]+)/,name:"Arc"},{pattern:/Atlas\/([\d.]+)/,name:"Atlas"},{pattern:/Comet\/([\d.]+)/,name:"Comet"},{pattern:/Brave\/([\d.]+)/,name:"Brave"},{pattern:/Vivaldi\/([\d.]+)/,name:"Vivaldi"},{pattern:/OPR\/([\d.]+)/,name:"Opera"},{pattern:/Opera\/([\d.]+)/,name:"Opera"},{pattern:/SamsungBrowser\/([\d.]+)/,name:"Samsung Internet"},{pattern:/UCBrowser\/([\d.]+)/,name:"UC Browser"},{pattern:/DuckDuckGo\/([\d.]+)/,name:"DuckDuckGo"},{pattern:/Yandex\/([\d.]+)/,name:"Yandex"},{pattern:/Chrome\/([\d.]+)/,name:"Chrome"},{pattern:/Version\/([\d.]+)/,name:"Safari"},{pattern:/Firefox\/([\d.]+)/,name:"Firefox"}];for(let{pattern:t}of e){let n=i.match(t);if(n)return n[1]}return"unknown"},detectPlatformOS(){if(typeof navigator=="undefined")return"unknown";let i=navigator.userAgent;return/Android/i.test(i)?/Mobile/i.test(i)?"Android Phone":"Android Tablet":/iPhone|iPod/i.test(i)?"iOS Phone":/iPad/i.test(i)?"iOS Tablet":/Win|Windows/i.test(i)?"Windows":/Mac/i.test(i)&&!/iPhone|iPod|iPad/i.test(i)?"macOS":/CrOS/i.test(i)?"ChromeOS":/Linux/i.test(i)&&!/Android/i.test(i)?"Linux":"unknown"}},Is=new _e(async()=>Un,{message:"Failed to load platform detection",severity:"medium",source:"PlatformDetector.load",moduleName:"PlatformDetection"}),de=class{static async getPlatformInfo(){return On?N(On):await b(async()=>{let e=await Is.get();if(!e.success)throw new Error("Failed to load platform detection module");let t=e.value;return On={type:t.detectPlatformType(),model:t.detectPlatformModel(),version:t.detectPlatformVersion(),os:t.detectPlatformOS()},On},{message:"Failed to detect platform information",severity:"medium",source:"PlatformDetector.getPlatformInfo"})}static preload(){Is.preload()}static isIOSSafari(){return typeof navigator=="undefined"?!1:Un.isIOSSafari()}static isIOS(){return typeof navigator=="undefined"?!1:Un.isIOS()}static isDesktop(){return typeof navigator=="undefined"?!1:Un.isDesktop()}}});var Sr,Ve,Ls=p(()=>{"use strict";B();Sr="naviga-analytics-user-identity",Ve=class{static set(e,t){if(!(typeof e!="string"||e.length===0)&&typeof localStorage!="undefined")try{let n={userId:e,traits:t&&typeof t=="object"?t:void 0,identifiedAt:Date.now()};h.set(Sr,JSON.stringify(n))}catch{}}static clear(){typeof localStorage!="undefined"&&h.remove(Sr)}static getUserId(){var e,t;return(t=(e=this.read())==null?void 0:e.userId)!=null?t:null}static getTraits(){var e,t;return(t=(e=this.read())==null?void 0:e.traits)!=null?t:null}static hasIdentity(){return this.read()!==null}static identifiedAt(){var e,t;return(t=(e=this.read())==null?void 0:e.identifiedAt)!=null?t:null}static read(){if(typeof localStorage=="undefined")return null;try{let e=h.get(Sr);if(!e)return null;let t=JSON.parse(e);return typeof(t==null?void 0:t.userId)!="string"||t.userId.length===0?null:t}catch{return null}}}});var se,Ar=p(()=>{"use strict";Ls();et();se=class{static hold(e,t){this.held={userId:e,traits:t,persisted:!1},this.ensureSubscribed(),this.tryPersist()}static getUserId(){return this.held?this.held.userId:Ve.getUserId()}static getTraits(){var e;return this.held?(e=this.held.traits)!=null?e:null:Ve.getTraits()}static clear(){this.held=null,Ve.clear()}static reset(){this.held=null,this.unsubscribe&&this.unsubscribe(),this.unsubscribe=null}static ensureSubscribed(){this.unsubscribe||(this.unsubscribe=S.onChange(e=>{this.held&&this.held.persisted&&e.functional!=="granted"&&(this.held.persisted=!1),this.tryPersist()}))}static tryPersist(){if(!(!this.held||this.held.persisted||this.persisting)){this.persisting=!0;try{let{userId:e,traits:t}=this.held;Ve.set(e,t),this.held&&Ve.getUserId()===e&&(this.held.persisted=!0)}finally{this.persisting=!1}}}};se.held=null,se.unsubscribe=null,se.persisting=!1});var He,Qt=p(()=>{"use strict";He={explicit:100,gpc:75,tcf:50,persisted:10}});function Hu(){try{let i=document.currentScript,e=i&&i.src;if(!e)return"";let t=new URL(e,window.location.href);return`${t.origin}${t.pathname.replace(/[^/]*$/,"")}`}catch{return""}}function Os(){Kn===null&&(Kn=Hu())}function Us(){return Kn||""}function Fs(i){if(!i)return"";let e=Kn||""||Ts;return e?`${e.replace(/\/*$/,"/")}${i}`:""}var Kn,kr=p(()=>{"use strict";Mn();Kn=null});var Ku,we,zn=p(()=>{"use strict";m();Ku=new Set(["granted","metered","blocked"]),we=class{static set(e){c(()=>{Ku.has(e)&&(this.access=e)},void 0)}static get(){return this.access}
1static reset(){this.access=null}};we.access=null});var Se,qn=p(()=>{"use strict";m();w();Se=class{static merge(e){c(()=>{for(let[t,n]of Object.entries(e))n==null||n===""||(this.context[t]=n)},void 0)}static resolveSubscriptionData(){return c(()=>{if(typeof window=="undefined")return null;let e=window,t=e.Connext||e.CnnXt;if(!t||typeof t.GetAccountData!="function")return null;let n=t.GetAccountData();if(!n||typeof n!="object")return null;let r={};return Array.isArray(n.OwnedSubscriptions)&&n.OwnedSubscriptions.length>0&&(r.engage_subscriptions=n.OwnedSubscriptions),n.MasterId&&(r.engage_master_id=n.MasterId),n.DigitalAccess&&typeof n.DigitalAccess=="object"&&n.DigitalAccess.AccessLevel&&(r.engage_access_level=n.DigitalAccess.AccessLevel),Object.keys(r).length>0?r:null},null)}static getContext(){return c(()=>{var n,r;let e={...this.context},t=this.resolveSubscriptionData();if(t)for(let[o,s]of Object.entries(t))(e[o]===void 0||e[o]===null||e[o]==="")&&(e[o]=s);if(typeof window!="undefined"){let o=(r=(n=d.get())==null?void 0:n.customEvents)==null?void 0:r.commonDetailsMapping,s=o!=null&&o.variableName?d.resolveMappedGlobal(o):window.navigaEngageDetails;if(s&&typeof s=="object"&&!Array.isArray(s))for(let[a,l]of Object.entries(s))l==null||l===""||(e[a]===void 0||e[a]===null||e[a]==="")&&(e[a]=l)}return e},{})}static reset(){this.context={}}};Se.context={}});var Xn,Ws,Ke,Jn=p(()=>{"use strict";m();zt();Ze();T();B();Xn=$.Session.session_key,Ws=$.Session.timeout_ms,Ke=class{static isValidSession(e){return!!(e&&typeof e.id=="string"&&e.id.length>0&&typeof e.timestamp=="number"&&Number.isFinite(e.timestamp))}static getSessionId(){return E(()=>{let e=Date.now(),t=h.get(Xn),n=null;if(t)try{n=JSON.parse(t)}catch{n=null}this.isValidSession(n)||(n=null);let r=!n||e-n.timestamp>Ws;return!n||r?n={id:Ue(),timestamp:e}:n.timestamp=e,h.set(Xn,JSON.stringify(n)),n.id},{message:"Failed to manage session",severity:"high",source:"SessionStorage.getSessionId"})}static touchSession(){try{let e=h.get(Xn);if(!e)return;let t=JSON.parse(e);if(!this.isValidSession(t))return;let n=Date.now();if(n-t.timestamp>Ws)return;t.timestamp=n,h.set(Xn,JSON.stringify(t))}catch{}}}});var _t,$s=p(()=>{"use strict";m();T();_t=class{static async encryptValue(e,t){return await b(async()=>{if(typeof crypto=="undefined"||!crypto.subtle)throw new Error("Web Crypto API not available");let n=await this.importRsaPublicKey(t),r=await this.encryptWithRSA(e,n);return{encryptedValue:this.arrayBufferToBase64(r)}},{message:"Failed to encrypt field value",severity:"high",source:"PayloadEncryption.encryptValue"})}static async encryptWithRSA(e,t){let n=new TextEncoder().encode(e);return await crypto.subtle.encrypt({name:this.RSA_ALGORITHM},t,n)}static async importRsaPublicKey(e){let t=e.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s/g,""),n=this.base64ToArrayBuffer(t);return await crypto.subtle.importKey("spki",n,{name:this.RSA_ALGORITHM,hash:"SHA-256"},!1,["encrypt"])}static arrayBufferToBase64(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n="";for(let r=0;r<t.byteLength;r++)n+=String.fromCharCode(t[r]);return btoa(n)}static base64ToArrayBuffer(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}static isSupported(){return typeof crypto!="undefined"&&typeof crypto.subtle!="undefined"&&typeof crypto.subtle.encrypt=="function"}};_t.RSA_ALGORITHM="RSA-OAEP"});var Et,Dr=p(()=>{"use strict";Je();T();$s();Et=class{static async preparePayload(e,t){var n;try{if(!t.enabled||!((n=t.keys)!=null&&n.length)||!t.publicKey||!_t.isSupported())return N({data:e,encrypted:!1});let r=await this.encryptFields(e,t.keys,t.publicKey);if(!r.success)return be(r.error);let{encryptedData:o,metadata:s}=r.value;if(s.fields.length===0)return N({data:e,encrypted:!1});let a={...o,_encryption:s};return N({data:a,encrypted:!0})}catch(r){let o={message:`Failed to prepare payload: ${r instanceof Error?r.message:String(r)}`,severity:"high",source:"PayloadGenerator.preparePayload",data:{error:r}};return be(o)}}static async encryptFields(e,t,n){try{let r={...e},o=[];for(let a of t){let l=this.getFieldValue(r,a);if(l===void 0)continue;let u=typeof l=="string"?l:JSON.stringify(l),f=await _t.encryptValue(u,n);if(!f.success){let v={message:`Failed to encrypt field "${a}": ${f.error.message}`,severity:"high",source:"PayloadGenerator.encryptFields",data:{fieldPath:a,originalError:f.error}};return be(v)}let{encryptedValue:g}=f.value;this.setFieldValue(r,a,g),o.push(a)}
1return o.length===0?N({encryptedData:r,metadata:{fields:[],algorithm:"RSA-OAEP"}}):N({encryptedData:r,metadata:{fields:o,algorithm:"RSA-OAEP"}})}catch(r){let o={message:`Failed to encrypt fields: ${r instanceof Error?r.message:String(r)}`,severity:"high",source:"PayloadGenerator.encryptFields",data:{error:r}};return be(o)}}static getFieldValue(e,t){return t.split(".").reduce((n,r)=>n==null?void 0:n[r],e)}static setFieldValue(e,t,n){let r=t.split("."),o=r.pop(),s=e;for(let a of r){let l=s[a];if(!l||typeof l!="object")return;s[a]=Array.isArray(l)?[...l]:{...l},s=s[a]}s[o]=n}}});function Nr(i){let e=new AbortController,t=typeof(i==null?void 0:i.timeoutMs)=="number"&&i.timeoutMs>0?i.timeoutMs:Yu,n=setTimeout(()=>e.abort(),t),r=i==null?void 0:i.signal,o=()=>e.abort();return r&&(r.aborted?e.abort():r.addEventListener("abort",o,{once:!0})),{signal:e.signal,dispose:()=>{clearTimeout(n),r==null||r.removeEventListener("abort",o)}}}function wt(i){if(!i||typeof i!="object")return!1;let e=i;return typeof e.success=="boolean"&&typeof e.statusCode=="number"&&"response"in e}async function Or(i){try{let e=await i.json();if(!wt(e))return;let t=e.response,n={};return typeof(t==null?void 0:t.code)=="string"&&(n.code=t.code),typeof e.requestId=="string"&&(n.requestId=e.requestId),n.code||n.requestId?n:void 0}catch{return}}function Ur(i,e){return!i.success&&e?be({...i.error,...e}):i}var Mr,Yu,G,Xt=p(()=>{"use strict";m();Je();T();w();Dr();Mr=typeof window!="undefined"&&typeof fetch!="undefined",Yu=5e3;G=class{static resolveBaseUrl(e){let t=d.getValue("api_base_url")||"";return e==="bff"&&d.getValue("bff_base_url")||t}static async post(e,t,n,r="api",o){let s,a=await b(async()=>{if(!Mr)throw new Error("Not in browser environment");let l=this.resolveBaseUrl(r);if(!l)throw new Error("API configuration missing");let u=d.getEncryptionConfig(),f=await Et.preparePayload(t,u);if(!f.success)throw new Error("Failed to prepare payload: "+f.error.message);let{data:g}=f.value,v=JSON.stringify(g),y={"Content-Type":"application/json",...n||{}},_=l+e,C=Nr(o);try{let x=await fetch(_,{method:"POST",headers:y,body:v,signal:C.signal});if(!x.ok)throw s=await Or(x),Object.assign(new Error(`HTTP error! status: ${x.status}`),{statusCode:x.status});return await x.json()}finally{C.dispose()}},{message:"Failed to make API request",severity:"medium",source:"ApiClient.post",endpoint:this.resolveBaseUrl(r)+e,statusCode:0});return Ur(a,s)}static async patch(e,t,n,r="api"){let o,s=await b(async()=>{if(!Mr)throw new Error("Not in browser environment");let a=this.resolveBaseUrl(r);if(!a)throw new Error("API configuration missing");let l={"Content-Type":"application/json",...n||{}},u=a+e,f=Nr();try{let g=await fetch(u,{method:"PATCH",headers:l,body:JSON.stringify(t),signal:f.signal});if(!g.ok)throw o=await Or(g),new Error(`HTTP error! status: ${g.status}`);return await g.json()}finally{f.dispose()}},{message:"Failed to make API PATCH request",severity:"medium",source:"ApiClient.patch",endpoint:this.resolveBaseUrl(r)+e,statusCode:0});return Ur(s,o)}static async get(e,t,n="api",r){let o,s=await b(async()=>{if(!Mr)throw new Error("Not in browser environment");let a=this.resolveBaseUrl(n);if(!a)throw new Error("API configuration missing");let l={Accept:"application/json",...t||{}},u=a+e,f=Nr(r);try{let g=await fetch(u,{method:"GET",headers:l,signal:f.signal});if(!g.ok)throw o=await Or(g),new Error(`HTTP error! status: ${g.status}`);return await g.json()}finally{f.dispose()}},{message:"Failed to make API GET request",severity:"medium",source:"ApiClient.get",endpoint:this.resolveBaseUrl(n)+e,statusCode:0});return Ur(s,o)}}});var Zn,Ys=p(()=>{"use strict";m();w();T();Xt();Zn=class{static async getTimezoneData(){return await b(async()=>{let e=d.get(),t=e.organisation_name,n=e.publication_name;if(!t||!n)throw new Error("Organization name and publication name are required");let r=await G.post("/eventsConfig",{orgName:t,pubName:n});if(!r.success)throw new Error(r.error.message);return r.value},{message:"Failed to fetch timezone data from API",severity:"low",source:"TimezoneService.getTimezoneData"})}}});function Ae(i){var e;try{if(!i||i.indexOf("?")===-1)return i;let t=new Set(Qu),n=(e=d.getABConfig())==null?void 0:e.tokenQueryParam;typeof n=="string"&&n.trim()!==""&&t.add(n);let r=!1;for(let l of t)if(i.indexOf(l+"=")!==-1){r=!0;break}if(!r){for(let l of Qs)if(i.indexOf(l+"=")!==-1){r=!0;break}}if(!r)return i;let o=Bt(i),s=new URL(i,o?Ft:void 0);if(ar(s.searchParams))for(let l of Qs)t.add(l);let a=!1;for(let l of t)s.searchParams.has(l)&&(s.searchParams.delete(l),a=!0);return a?o?s.pathname+s.search+s.hash:s.href:i}catch{return i}}var Qu,Qs,ei=p(()=>{"use strict";w();lr();
1Qu=["naviga_ab_token","access_token","id_token","id_token_hint","refresh_token","code_verifier","client_secret","session_state"],Qs=["code","state"]});var Jt,Xs=p(()=>{"use strict";Jt=class{constructor(){this.records=new Map;this.nextId=1}async add(e){let t=this.nextId++;return this.records.set(t,{id:t,...e}),t}async update(e){this.records.has(e.id)&&this.records.set(e.id,e)}async getAll(){return Array.from(this.records.values()).sort((e,t)=>e.id-t.id)}async remove(e){this.records.delete(e)}async count(){return this.records.size}async clear(){this.records.clear(),this.nextId=1}}});var ti,Js,nt,Fr=p(()=>{"use strict";m();w();et();Ee();ti={action:"drop"},Js={action:"allow"},nt=class{static evaluate(e){return c(()=>{let t=d.getConsentConfig().categoryMap,n=vt(e,t);if(n.length===0)return ti;if(n.length>0&&n.every(Y))return Js;let r=S.getState();if(!r||typeof r!="object")return ti;for(let o of n)if(r[o]!=="granted")return ti;return Js},ti)}}});var Zs={};O(Zs,{EventQueue:()=>q});var q,ni=p(()=>{"use strict";m();w();T();Xt();br();Xs();In();Zt();Fr();et();Ee();At();q=class{static async init(){if(!d.getEventQueueConfig().enabled)return this.teardown(),!1;if(this.storage)return!0;if(this.initPromise)return this.initPromise;this.initPromise=this.doInit();try{return await this.initPromise}finally{this.initPromise=null}}static async doInit(){if(this.purgeHookRegistered||(this.purgeHookRegistered=!0,ws(()=>this.purgeAll())),Fe.isSupported()){let e=new Fe;try{await e.open(),this.storage=e}catch{this.storage=new Jt}}else this.storage=new Jt;if(this.preInitBuffer.length>0){let e=this.preInitBuffer.splice(0);for(let t of e)await this.enqueue(t)}return await this.prune(),this.drain(),typeof window!="undefined"&&(this.onlineHandler||(this.onlineHandler=()=>void this.drain(),window.addEventListener("online",this.onlineHandler)),this.drainTimer||(this.drainTimer=setInterval(()=>void this.drain(),3e4))),!0}static async enqueue(e){let t=d.getEventQueueConfig();if(t.enabled&&!A.isHealthEvent(e==null?void 0:e.event_name)){if(!this.storage){this.preInitBuffer.length<this.PRE_INIT_BUFFER_MAX&&this.preInitBuffer.push(e);return}if(this.consentGatingEnabled()){let n=this.consentCategoryKey(e==null?void 0:e.event_name);if(nt.evaluate(n).action==="drop")return}await b(async()=>{let n=Date.now(),r=await this.storage.count();if(r>=t.maxEvents){let o=await this.storage.getAll(),s=r-t.maxEvents+1,a=o.slice(0,s);for(let l of a)await this.storage.remove(l.id)}await this.storage.add({event:e,attemptCount:0,firstAttemptAt:n,lastAttemptAt:n})},{message:"EventQueue.enqueue failed",severity:"low",source:"EventQueue.enqueue"})}}static async drain(){var n,r;let e=this.storage;if(!e||this.draining)return;let t=d.getEventQueueConfig();if(t.enabled){this.draining=!0;try{await this.prune();let o=await e.getAll();for(let s of o){let a=(n=s.event)==null?void 0:n.event_name;if(A.isHealthEvent(a)){await e.remove(s.id);continue}if(s.attemptCount>=t.maxAttempts){await e.remove(s.id),A.recordDropped(a);continue}if(this.consentGatingEnabled()){let f=this.consentCategoryKey(a);if(nt.evaluate(f).action==="drop"){if(!this.consentDecidedForAll(f))continue;await e.remove(s.id);continue}}s.attemptCount+=1,s.lastAttemptAt=Date.now(),await e.update(s);let l=!1,u=!1;try{let f=await G.post("/event",this.markAsReplay(s.event,s.attemptCount));if(l=f.success,!f.success){let g=(r=f.error)==null?void 0:r.statusCode;u=typeof g=="number"&&g>=400&&g<500&&g!==408&&g!==429}}catch{l=!1}l?(await e.remove(s.id),A.recordReplayDelivered(a)):u&&(await e.remove(s.id),A.recordDropped(a))}}finally{this.draining=!1}}}static consentDecidedForAll(e){return c(()=>
1{let t=d.getConsentConfig().categoryMap;for(let n of vt(e,t))if(!S.hasDecisionFor(n))return!1;return!0},!1)}static consentGatingEnabled(){return d.getConsentConfig().enabled===!0}static consentCategoryKey(e){if(!e||typeof e!="string"||e.indexOf(St)!==0)return e;let t=e.slice(St.length);return it.has(t)?t:e}static markAsReplay(e,t){try{let n={};if(typeof e.additional_info=="string"&&e.additional_info)try{n=JSON.parse(e.additional_info)}catch{n={}}else e.additional_info&&typeof e.additional_info=="object"&&(n={...e.additional_info});return n.retry_attempt=t,{...e,additional_info:JSON.stringify(n)}}catch{return e}}static async prune(){let e=this.storage;if(!e)return;let t=d.getEventQueueConfig(),n=Date.now()-t.ttlHours*60*60*1e3,r=await e.getAll(),o=0;for(let s of r)s.firstAttemptAt<n&&(await e.remove(s.id),o++);o>0}static async purgeAll(){await b(async()=>{this.preInitBuffer.length=0,this.storage&&await this.storage.clear()},{message:"EventQueue.purgeAll failed",severity:"low",source:"EventQueue.purgeAll"})}static setStorageForTesting(e){this.storage=e}static getStorageForTesting(){return this.storage}static teardown(){this.storage=null,this.preInitBuffer=[],this.purgeHookRegistered=!1,this.draining=!1,this.drainTimer&&(clearInterval(this.drainTimer),this.drainTimer=null),this.onlineHandler&&typeof window!="undefined"&&(window.removeEventListener("online",this.onlineHandler),this.onlineHandler=null)}};q.storage=null,q.draining=!1,q.drainTimer=null,q.onlineHandler=null,q.initPromise=null,q.preInitBuffer=[],q.PRE_INIT_BUFFER_MAX=50,q.purgeHookRegistered=!1});var Br={};O(Br,{BeaconSender:()=>fe});var fe,rt=p(()=>{"use strict";m();T();w();Dr();At();ni();Zt();fe=class{static async send(e,t){return await b(async()=>{let n=t.event_name;if(!ea.has(n))return A.recordFailed(n),A.recordEnqueued(n),q.enqueue(t),{success:!1,method:"failed",error:"Event not in BeaconSender allow-list"};let r=d.getValue("api_base_url");if(!r)throw new Error("API configuration missing: api_base_url not set");let o=d.getEncryptionConfig(),s=await Et.preparePayload(t,o);if(!s.success)throw new Error("Failed to prepare payload: "+s.error.message);let{data:a}=s.value,l=r+e;if(A.recordAttempt(n),this.isBeaconSupported()&&this.sendViaBeacon(l,a))return A.recordDelivered(n,"beacon"),{success:!0,method:"beacon"};try{if(await this.sendViaFetchKeepalive(l,a))return A.recordDelivered(n,"fetch-keepalive"),{success:!0,method:"fetch-keepalive"}}catch{}return A.recordFailed(n),A.recordEnqueued(n),q.enqueue(t),{success:!1,method:"failed",error:"All transmission methods failed"}},{message:"Failed to send event via BeaconSender",severity:"medium",source:"BeaconSender.send",endpoint:e,statusCode:0})}static isBeaconSupported(){return typeof navigator!="undefined"&&typeof navigator.sendBeacon=="function"}static sendViaBeacon(e,t){try{let n=new Blob([JSON.stringify(t)],{type:"application/json"}),r=navigator.sendBeacon(e,n);return r}catch{return!1}}static async sendViaFetchKeepalive(e,t){try{return typeof fetch=="undefined"?!1:(await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0})).ok}catch{return!1}}}});var en={};O(en,{EventSender:()=>ae});var ae,Ie=p(()=>{"use strict";m();T();Xt();ni();Zt();ae=class{static async send(e){return await b(async()=>{let t=e.event_name;if(typeof t!="string"||t.trim()==="")return!0;A.recordAttempt(t);let n=await G.post("/event",e);if(n.success)return A.recordDelivered(t),!0;throw A.recordFailed(t),A.recordEnqueued(t),q.enqueue(e),new Error(n.error.message)},{message:"Failed to send analytics event",severity:"medium",source:"EventSender.send",endpoint:"/event",statusCode:0})}}});function Vr(){return{attempted:0,delivered:0,failed:0,enqueued:0,replay_delivered:0,dropped:0,delivered_via_beacon:0,delivered_via_fetch_keepalive:0,delivered_via_xhr_sync:0}}var ii,A,Zt=p(()=>{"use strict";w();ii="sdk_health",A=class{static isHealthEvent(e){return e===ii}static isEnabled(){try{return d.isSdkHealthEnabled()}catch{return!1}}static record(e){if(this.isEnabled())try{e(this.counters),this.dirty=!0,this.ensureStarted()}catch{}}static recordAttempt(e){this.isHealthEvent(e)||this.record(t=>{t.attempted++})}static recordDelivered(e,t){this.isHealthEvent(e)||this.record(n=>{n.delivered++,t==="beacon"?n.delivered_via_beacon++:t==="fetch-keepalive"&&n.delivered_via_fetch_keepalive++})}static recordFailed(e){this.isHealthEvent(e)||this.record(t=>{t.failed++})}static recordEnqueued(e){this.isHealthEvent(e)||this.record(t=>{t.enqueued++})}static recordReplayDelivered(e){this.isHealthEvent(e)||this.record(t=>{t.replay_delivered++})}static recordDropped(e){this.isHealthEvent(e)||this.record(t=>{t.dropped++})}static ensureStarted(){if(this.started||typeof window=="undefined")return;this.started=!0;let e=d.getTelemetryConfig().report_interval_seconds;this.flushTimer=setInterval(()=>{this.flush("interval")},Math.max(30,e)*1e3),this.beforeUnloadListener=()=>{this.flush("beforeunload")},window.addEventListener("beforeunload",this.beforeUnloadListener),this.pageHideListener=()=>{this.flush("pagehide")},window.addEventListener("pagehide",this.pageHideListener),Promise.all([Promise.resolve().then(()=>
1(pe(),tn)),Promise.resolve().then(()=>(rt(),Br)),Promise.resolve().then(()=>(Ie(),en))]).then(([t,n,r])=>{this.modules.EventFactory=t.EventFactory,this.modules.BeaconSender=n.BeaconSender,this.modules.EventSender=r.EventSender}).catch(()=>{})}static async flush(e){var n,r,o;if(!this.dirty||this.flushing||!this.isEnabled())return;this.flushing=!0;let t=this.counters;this.counters=Vr(),this.dirty=!1;try{let s=t.attempted,a={...t,delivery_rate_percent:s>0?Math.round(t.delivered/s*100):100,report_trigger:e},u=await((n=this.modules.EventFactory)!=null?n:(await Promise.resolve().then(()=>(pe(),tn))).EventFactory).createEvent(ii,a);if(!u.success||u.value===null)return;e==="pagehide"||e==="beforeunload"?await((r=this.modules.BeaconSender)!=null?r:(await Promise.resolve().then(()=>(rt(),Br))).BeaconSender).send("/event",u.value):await((o=this.modules.EventSender)!=null?o:(await Promise.resolve().then(()=>(Ie(),en))).EventSender).send(u.value)}catch{}finally{this.flushing=!1}}static getCountersForTesting(){return{...this.counters}}static resetForTesting(){this.counters=Vr(),this.dirty=!1,this.flushing=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.pageHideListener&&typeof window!="undefined"&&(window.removeEventListener("pagehide",this.pageHideListener),this.pageHideListener=null),this.beforeUnloadListener&&typeof window!="undefined"&&(window.removeEventListener("beforeunload",this.beforeUnloadListener),this.beforeUnloadListener=null),this.started=!1}};A.counters=Vr(),A.dirty=!1,A.started=!1,A.flushTimer=null,A.pageHideListener=null,A.beforeUnloadListener=null,A.flushing=!1,A.modules={}});function Hr(i){return`${St}${i}`}function Kr(i){return it.has(i)?new Set([i,Hr(i)]):new Set([i])}var ea,it,St,At=p(()=>{"use strict";Zt();ea=new Set(["page_leave","engagement_ping","click","article_page_view","article_page_leave","article_engagement_ping","ab_experiment_click",ii]),it=new Set(["page_view","page_leave","engagement_ping"]),St="article_"});function Zu(i){let e=new Map;for(let[t,n]of Object.entries(i)){let r=new Set(n);e.set(t,r),it.has(t)&&e.set(Hr(t),r)}return e}function ta(){return c(()=>{let i=d.get()[Xu];return i==="enforce"?"enforce":"observe"},"observe")}function na(i,e={}){return c(()=>{if(nd(e))return!1;let t=ed.get(i);if(!t)return!1;let{pageClass:n}=J.resolve();return!(!t.has(n)||td(n)&&ta()!=="enforce")},!1)}function td(i){return i!=="error"}function nd(i){return i.skipArticleContext===!0}function ia(){return c(()=>ta()!=="enforce"?!1:J.resolve().pageClass==="transit",!1)}var Xu,Ju,ed,zr=p(()=>{"use strict";w();At();m();ht();Xu="pageClassEnforcement",Ju={page_view:["transit"],engagement_ping:["commerce","transit","error"],page_leave:["commerce","transit","error"],click:["transit"]};ed=Zu(Ju)});var Gr={};O(Gr,{PageViewContext:()=>te});var nn,jr,W,te,ze=p(()=>{"use strict";ei();B();zt();zr();nn={uuid:"",url:"",title:""},jr="naviga-analytics-last-page-view",W=class W{static recordPageView(e,t){let n=Ae(e!=null?e:W.readWindowUrl()),r=t!=null?t:W.readDocumentTitle();this.current&&this.current.url===n||this.rotateTo(n,r)}static rotateForRestore(){this.rotateTo(Ae(W.readWindowUrl()),W.readDocumentTitle())}static correctCurrentUrl(e){if(!this.current)return;let t=Ae(e!=null?e:W.readWindowUrl());this.current.url!==t&&(this.current={...this.current,url:t},this.currentIsHiddenFromTrail||W.writeStoredView(this.current))}static rotateTo(e,t){this.current&&this.currentIsHiddenFromTrail||(this.current?this.previous={...this.current}:this.previous=W.readStoredView()),this.current={uuid:Ue(),url:e,title:t},this.currentIsHiddenFromTrail=ia(),this.currentIsHiddenFromTrail||W.writeStoredView(this.current)}static getEventFields(){this.current||this.rotateTo(Ae(W.readWindowUrl()),W.readDocumentTitle());let e=this.current;return{page_view_uuid:e.uuid,page_view_url:e.url,page_title:e.title,previous_page_view_uuid:this.previous.uuid,previous_page_view_url:this.previous.url}}static reset(){this.current=null,this.previous=nn,this.currentIsHiddenFromTrail=!1,W.clearStoredView()}static readStoredView(){try{let e=h.get(jr);if(!e)return nn;let t=JSON.parse(e);return!t||typeof t.uuid!="string"||t.uuid===""?nn:{uuid:t.uuid,url:typeof t.url=="string"?Ae(t.url):"",title:typeof t.title=="string"?t.title:""}}catch{return nn}}static writeStoredView(e){try{h.set(jr,JSON.stringify(e))}catch{}}static clearStoredView(){try{h.remove(jr)}catch{}}static readWindowUrl(){return typeof window!="undefined"?window.location.href:""}static readDocumentTitle(){return typeof document!="undefined"?document.title:""}};W.current=null,W.previous=nn,W.currentIsHiddenFromTrail=!1;te=W});var id,ot,qr=p(()=>{"use strict";id=/Googlebot|Bingbot|DuckDuckBot|Slackbot|Twitterbot|facebookexternalhit|LinkedInBot|WhatsApp|Discordbot|TelegramBot|Applebot|YandexBot|Baiduspider|HeadlessChrome|PhantomJS|puppeteer|playwright|GPTBot|OAI-SearchBot|ChatGPT-User|ClaudeBot|Claude-User|Claude-SearchBot|PerplexityBot|Perplexity-User|Google-Extended|GoogleOther|CCBot|Amazonbot|meta-externalagent|Bytespider|Applebot-Extended|MistralAI-User|DuckAssistBot/i,ot=class{static isSuspected(){return this.cached!==null?this.cached:(this.cached=this.compute(),this.cached)}static reset(){this.cached=null}static compute(){if(typeof navigator=="undefined")return!1;if(navigator.webdriver===!0)return!0;let e=navigator.userAgent||"";return id.test(e)}};ot.cached=null});var rd,ra,st,oa=p(()=>{"use strict";rd=/Electron|HeadlessChrome| Atlas\/|ChatGPT-Atlas|Comet\/|Claude-User|ChatGPT-User/i,ra=/SwiftShader|llvmpipe|softw
1are rasterizer|Mesa OffScreen|VirtualBox Graphics|VMware SVGA/i,st=class{static isSuspected(){return this.cachedSuspected!==null?this.cachedSuspected:(this.compute(),this.cachedSuspected)}static getSignals(){return this.cachedSignals!==null?this.cachedSignals:(this.compute(),this.cachedSignals)}static reset(){this.cachedSuspected=null,this.cachedSignals=null}static compute(){let e=[];if(typeof navigator!="undefined"){navigator.webdriver===!0&&e.push("webdriver");let t=navigator.userAgent||"";rd.test(t)&&e.push("ua_agent_marker"),Array.isArray(navigator.languages)&&navigator.languages.length===0&&e.push("no_languages")}if(typeof window!="undefined"){try{(window.__playwright__binding__!==void 0||window.__pwInitScripts!==void 0||window.cdc_adoQpoasnfa76pfcZLmcfl_Array!==void 0)&&e.push("cdp_artifact")}catch{}try{typeof window.outerWidth=="number"&&typeof window.outerHeight=="number"&&window.outerWidth===0&&window.outerHeight===0&&typeof window.innerWidth=="number"&&window.innerWidth>0&&e.push("headless_dimensions")}catch{}}if(typeof document!="undefined"&&typeof document.createElement=="function")try{let t=document.createElement("canvas");if(typeof t.getContext=="function"){let n=this.getWebGLContext(t);if(n&&typeof n.getExtension=="function"){let r=n.getExtension("WEBGL_debug_renderer_info");if(r){let o=n.getParameter(r.UNMASKED_RENDERER_WEBGL)||"",s=n.getParameter(r.UNMASKED_VENDOR_WEBGL)||"";(ra.test(o)||ra.test(s))&&e.push("webgl_software_renderer")}}}}catch{}this.cachedSuspected=e.length>0,this.cachedSignals=e.join(",")}static getWebGLContext(e){try{return e.getContext("webgl")||e.getContext("experimental-webgl")||e.getContext("webgl2")}catch{return null}}};st.cachedSuspected=null,st.cachedSignals=null});var $r,od,sa,Wr,ri,oi,aa=p(()=>{"use strict";B();$r=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],od=["gclid","fbclid","msclkid"],sa=[...$r,...od],Wr="naviga-analytics-utm-session",ri="naviga-analytics-utm-first",oi=class{static getAttribution(){let e=this.parseCurrentUrl();this.hasAnyKey(e)&&(this.writeSession(e),this.writeFirstTouchIfUnset(e));let t=this.readSession(),n=this.readFirstTouch();return this.toEventFields(t,n)}static reset(){typeof sessionStorage!="undefined"&&h.remove(Wr),typeof localStorage!="undefined"&&h.remove(ri)}static parseCurrentUrl(){if(typeof window=="undefined"||typeof window.location=="undefined")return{};try{let e=new URLSearchParams(window.location.search),t={};for(let n of sa){let r=e.get(n);r&&r.length>0&&(t[n]=r)}return t}catch{return{}}}static hasAnyKey(e){return Object.keys(e).length>0}static writeSession(e){if(typeof sessionStorage!="undefined")try{h.set(Wr,JSON.stringify(e))}catch{}}static readSession(){if(typeof sessionStorage=="undefined")return{};try{let e=h.get(Wr);if(!e)return{};let t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}static writeFirstTouchIfUnset(e){if(typeof localStorage!="undefined")try{if(h.get(ri))return;let n={};for(let r of $r)e[r]&&(n[r]=e[r]);if(Object.keys(n).length===0)return;h.set(ri,JSON.stringify(n))}catch{}}static readFirstTouch(){if(typeof localStorage=="undefined")return{};try{let e=h.get(ri);if(!e)return{};let t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}static toEventFields(e,t){let n={};for(let r of sa)n[r]=e[r]||"";for(let r of $r)n[`first_touch_${r}`]=t[r]||"";return n}}});var sd,kt,ca=p(()=>{"use strict";m();sd={"chatgpt.com":"chatgpt",chatgpt:"chatgpt",perplexity:"perplexity","perplexity.ai":"perplexity",copilot:"copilot",gemini:"gemini","claude.ai":"claude",deepseek:"deepseek"},kt=class{static resolve(e,t){let n=`${e}\0${t}`;if(this.cached!==null&&this.cached.key===n)return this.cached.value;let r=this.compute(e,t);return this.cached={key:n,value:r},r}static isAiReferrer(e){return this.resolve(e,"")!==""}static reset(){this.cached=null}static compute(e,t){let n=this.classifyReferrer(e);return n!==""?n:this.classifyUtm(t)}static classifyReferrer(e){return e?E(()=>{let t=new URL(e),n=t.hostname.toLowerCase(),r=t.pathname.toLowerCase(),o=s=>n===s||n.endsWith("."+s);return o("chatgpt.com")||o("chat.openai.com")?"chatgpt":o("perplexity.ai")||o("pplx.ai")?"perplexity":o("gemini.google.com")||o("bard.google.com")?"gemini":o("claude.ai")?"claude":o("copilot.microsoft.com")||o("bing.com")&&r.startsWith("/chat")?"copilot":o("meta.ai")?"meta":o("grok.com")||o("grok.x.ai")?"grok":o("deepseek.com")?"deepseek":o("you.com")||o("huggingface.co")&&r.startsWith("/chat")||o("mistral.ai")&&r.startsWith("/chat")||o("kagi.c
1om")&&r.startsWith("/assistant")?"other_ai":""},{message:"AiSourceResolver: referrer URL parse failed",severity:"LOW",source:"AiSourceResolver.classifyReferrer"}).unwrapOr(""):""}static classifyUtm(e){var n;if(!e)return"";let t=e.toLowerCase().trim();return(n=sd[t])!=null?n:""}};kt.cached=null});var ne,je,Yr=p(()=>{"use strict";T();m();Nn();Yt();Jn();w();Ze();Ys();bn();ze();ei();qr();oa();Ar();aa();ca();Je();ne=class ne{static generateSessionNonce(){try{if(typeof crypto!="undefined"&&typeof crypto.randomUUID=="function")return crypto.randomUUID().replace(/-/g,"").substring(0,12)}catch{}return(Date.now().toString(36)+Math.random().toString(36).substring(2,10)).substring(0,12)}static async getCommonEventData(){return await b(async()=>{let e=performance.now(),t=oi.getAttribution(),n=U.get();if(n){let x=await this.generateDynamicData(n.ex_timezone),k=performance.now();return U.recordHit(k-e),{...n,...x,...t}}U.recordMiss();let[r,o,s,a]=await Promise.all([Be.getVisitorId(),Ke.getSessionId(),de.getPlatformInfo(),Zn.getTimezoneData()]);if(!r.success)throw new Error("Failed to get visitor ID");if(!o.success)throw new Error("Failed to get session ID");if(!s.success)throw new Error("Failed to get platform info");let l=r.value,u=o.value,f=s.value,g=Ae(document.referrer||""),v=ne.getReferrerType(g).unwrapOr("unknown"),y=kt.resolve(g,t.utm_source||""),_={device_id:l,session_id:u,platform_type:f.type,platform_model:f.model.toLowerCase(),platform_name:"web",platform_version:f.version,platform_os_name:f.os||"unknown",organisation_name:d.getValue("organisation_name")||"",publication_name:d.getValue("publication_name")||"",publication_id:d.getValue("publication_id")||"",sdk_version:$.SDK_VERSION,referrer_url:g,referrer_type:v,bot_suspected:ot.isSuspected(),agent_suspected:st.isSuspected(),agent_signals:st.getSignals(),ai_source:y,ex_timezone:a.success?a.value.timezone:void 0,ex_timezone_offset:a.success?a.value.offset:void 0};U.set(_);let C=await this.generateDynamicData(_.ex_timezone);return{..._,...C,...t}},{message:"Failed to build common event data",severity:"high",source:"EventDataBuilder.getCommonEventData"})}static async generateDynamicData(e){let t=ne.generateEventId().unwrapOr(`${Date.now().toString(36)}-${ne.sessionNonce}-fb${(ne.eventIdCounter++).toString(36)}`),n=new Date,r,o,s,a;if(e)try{let v=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(n),y=Object.fromEntries(v.map(_=>[_.type,_.value]));r=parseInt(y.year),o=parseInt(y.month),s=parseInt(y.day),a=Math.floor(n.getTime()/1e3).toString()}catch{r=n.getUTCFullYear(),o=n.getUTCMonth()+1,s=n.getUTCDate(),a=Math.floor(n.getTime()/1e3).toString()}else r=n.getUTCFullYear(),o=n.getUTCMonth()+1,s=n.getUTCDate(),a=Math.floor(n.getTime()/1e3).toString();let l=ne.padStart(o,2,"0").unwrapOr(String(o).padStart(2,"0")),u=ne.padStart(s,2,"0").unwrapOr(String(s).padStart(2,"0")),f=`${r}-${l}-${u}`;return{event_id:t,event_time_epoc:a,event_create_year:r.toString(),event_create_month:l,event_create_date:u,event_timestamp_utc:n.toISOString().split(".")[0].replace("T"," ")+" +0000",event_creation_date:f}}static generateEventId(){return E(()=>{let e=Date.now().toString(36),t=(ne.eventIdCounter++).toString(36);return`${e}-${ne.sessionNonce}-${t}`},{message:"Failed to generate event ID",severity:"low",source:"EventDataBuilder.generateEventId"})}static getPageViewContextData(){return E(()=>te.getEventFields(),{message:"Failed to read page view context",severity:"low",source:"EventDataBuilder.getPageViewContextData"})}static getArticleEventData(){let e=d.getArticleDetails();return e.success&&Object.keys(e.value).length>0&&U.updateArticleData(e.value),e}static getUserEventData(){let e=d.getUserDetails(),t=e.success?e.value:{},n=se.getUserId(),r=se.getTraits(),o={...t,...r||{}};return n?(o.user_id=n,(o.is_logged_in===void 0||o.is_logged_in==="")&&(o.is_logged_in="true")):(o.is_logged_in===void 0||o.is_logged_in==="")&&(o.is_logged_in="false"),Object.keys(o).length>0&&U.updateUserData(o),N(o)}static getReferrerType(e){return E(()=>
1{if(!e||e.trim()==="")return"direct";let t=e.toLowerCase(),n=[/^https?:\/\/(www\.)?facebook\.com/i,/^https?:\/\/([a-zA-Z0-9-]+\.)?facebook\.com/i,/^https?:\/\/(www\.)?fb\.com/i,/^https?:\/\/(www\.)?m\.facebook\.com/i,/^https?:\/\/(www\.)?facebook\.com\.\w{2,3}/i,/^https?:\/\/fb\.me/i,/^fb:\/\//i,/^facebook:\/\//i,/^android-app:\/\/com\.facebook[.\w]*/i],r=[/^https?:\/\/(www\.)?twitter\.com/i,/^https?:\/\/(www\.)?x\.com/i,/^https?:\/\/(www\.)?mobile\.twitter\.com/i,/^https?:\/\/t\.co/i,/^https?:\/\/(www\.)?twitter\.com/i,/^t\.co/i,/^twitter:\/\//i,/^x:\/\//i,/^android-app:\/\/com\.twitter[.\w]*/i],o=[/^https?:\/\/(www\.)?linkedin\.com/i,/^https?:\/\/(www\.)?lnkd\.in/i,/^https?:\/\/(www\.)?business\.linkedin\.com/i,/^https?:\/\/(www\.)?learning\.linkedin\.com/i,/^linkedin:\/\//i,/^li:\/\//i,/^android-app:\/\/com\.linkedin[.\w]*/i],s=[/^https?:\/\/(www\.)?instagram\.com/i,/^https?:\/\/(www\.)?instagr\.am/i,/^https?:\/\/(www\.)?business\.instagram\.com/i];if(n.some(l=>l.test(t))||r.some(l=>l.test(t))||o.some(l=>l.test(t))||s.some(l=>l.test(t)))return"social";if(kt.isAiReferrer(e))return"ai_assistant";if([/^https?:\/\/(www\.)?google\.com/i,/^https?:\/\/(www\.)?bing\.com/i,/^https?:\/\/(www\.)?yahoo\.com/i,/^https?:\/\/(www\.)?duckduckgo\.com/i,/^https?:\/\/(www\.)?baidu\.com/i,/^https?:\/\/(www\.)?yandex\.com/i].some(l=>l.test(t)))return"organic";try{let l=window.location.hostname.toLowerCase(),f=new URL(t).hostname.toLowerCase();if(f!=l||t.includes(l)&&t.split(l+"/")[1])return"referral";if(f===l)return"direct"}catch{}return"direct"},{message:"Failed to determine referrer type",severity:"low",source:"EventDataBuilder.getReferrerType"})}static padStart(e,t,n){return E(()=>{let r=e.toString();return r.length>=t?r:n.repeat(t-r.length)+r},{message:"Failed to pad string",severity:"low",source:"EventDataBuilder.padStart"})}};ne.eventIdCounter=0,ne.sessionNonce=ne.generateSessionNonce();je=ne});function Tt(i){if(typeof i=="boolean")return i;if(i===1)return!0;if(i===0)return!1;if(typeof i=="string"){let e=i.trim().toLowerCase();if(ad.has(e))return!0;if(cd.has(e))return!1}return null}function ua(i){return i?"true":"false"}function gd(i){let e=i.trim();if(!ld.test(e))return null;let t=e.replace(/\//g,"-");return ud.test(t)?`${t}T00:00:00Z`:(t=t.replace(dd,"$1T"),t=t.replace(fd,"$1$2:$3"),pd.test(t)||(t+="Z"),t)}function md(i){return`${i.toISOString().split(".")[0].replace("T"," ")} +0000`}function hd(i){let e=Tt(i);return e===null?null:ua(!e)}function vd(i){let e=Tt(i);return e===null?null:ua(e)}function bd(i){var t;if(typeof i!="string")return null;let e=i.trim().toLowerCase();return(t=yd[e])!=null?t:null}function Cd(i){let e=Array.isArray(i)?i:[i],t=[],n=new Set;for(let r of e){if(typeof r!="string")continue;let o=r.trim();o===""||n.has(o)||(n.add(o),t.push(o))}return t.length>0?t.join(", "):null}function _d(i){let e;if(i instanceof Date)e=i;else if(typeof i=="string"){let n=gd(i);if(n===null)return null;e=new Date(n)}else return null;let t=e.getTime();return Number.isFinite(t)?md(e):null}function wd(i){var e;return i===void 0?la:(e=Ed[i])!=null?e:la}function si(i,e){return c(()=>wd(i)(e),null)}var ad,cd,ld,ud,dd,fd,pd,yd,Ed,la,rn=p(()=>{"use strict";m();ad=new Set(["true","yes","1"]),cd=new Set(["false","no","0"]);ld=/^\d{4}[-/]\d{2}[-/]\d{2}/,ud=/^\d{4}-\d{2}-\d{2}$/,dd=/^(\d{4}-\d{2}-\d{2}) /,fd=/\s*([+-])(\d{2})(\d{2})$/,pd=/(Z|[+-]\d{2}:\d{2})$/;yd={free:"false",locked:"true",metered:"true"};Ed=Object.freeze({invert:hd,toBoolString:vd,tierToBool:bd,joinList:Cd,isoDate:_d}),la=i=>i});function ai(i){switch(typeof i){case"string":{if(i.length>Qr)return null;let e=i.trim();return e===""?null:e}case"number":return Number.isFinite(i)?i:null;case"boolean":return i;default:return null}}function Z(i){return c(()=>{let e=[];for(let t of i){if(e.length>=ie)break;let n=ai(t);n!==null&&e.push(n)}return e.length===0?null:e.length===1?e[0]:e},null)}function ci(i){return Array.isArray(i)?Z(i):ai(i)}var Qr,ie,ke=p(()=>{"use strict";m();Qr=4096,ie=50});function on(i){if(typeof i!="string"||i===""||i.length>Sd)return null;try{return new RegExp(i)}catch{return null}}function da(i){let e=typeof i=="string"?i:String(i);return e.length>Ad?null:e}function li(i,e){let t=da(e);if(t===null)return!1;try{return i.test(t)}catch{return!1}}function fa(i,e){let t=da(e);if(t===null)return null;let n;try{n=i.exec(t)}catch{return null}if(n===null)return null;let r=n[1];if(typeof r!="string")return null;let o=r.trim();return o===""?null:o}var Sd,Ad,Xr=p(()=>{"use strict";ke();Sd=512,Ad=Qr});function pa(i,e){let t=e?" i":"";return`meta[name="${i}"${t}], meta[property="${i}"${t}]`}function ga(i,e=document){return c(()=>
1{if(typeof i!="string")return[];let t=i.trim();if(t===""||!kd.test(t))return[];let n;try{n=e.querySelectorAll(pa(t,!0))}catch{n=e.querySelectorAll(pa(t,!1))}let r=[];return n.forEach(o=>{let s=c(()=>o.getAttribute("content"),null);if(typeof s!="string")return;let a=s.trim();a!==""&&r.push(a)}),r},[])}var kd,ma=p(()=>{"use strict";m();kd=/^[A-Za-z0-9_.:-]+$/});function ha(i,e=document){return c(()=>Z(ga(i,e)),null)}var va=p(()=>{"use strict";ma();m();ke()});function Ge(i){if(typeof i!="string")return null;let e=i.trim();if(e==="")return null;let t=e.split(".");if(t.length>Jr)return null;for(let n of t)if(!Td.test(n)||Rd.has(n))return null;return t}function xd(i,e){if(!(typeof i!="object"||i===null)&&Object.prototype.hasOwnProperty.call(i,e))return c(()=>i[e],void 0)}function ya(i){let e=[];for(let t of i)Array.isArray(t)?e.push(...t):e.push(t);return e}function Rt(i,e,t){return c(()=>{let n=[i];for(let r of e){let o=t.fanOutArrays?ya(n):n,s=[];for(let a of o){let l=xd(a,r);l!==void 0&&s.push(l)}if(s.length===0)return[];n=s}return t.fanOutArrays?ya(n):n},[])}var Jr,Td,Rd,sn=p(()=>{"use strict";m();Jr=8,Td=/^[A-Za-z0-9_@:-]+$/,Rd=new Set(["__proto__","constructor","prototype"])});function ba(i){return i.trim().toLowerCase().replace(/^https?:\/\//,"").replace(/\/+$/,"")}function Ca(i,e){if(e===void 0)return[i];let t=ba(e);return t===""?[]:c(()=>Array.from(i.querySelectorAll("[itemtype]")).filter(n=>{var o;return((o=n.getAttribute("itemtype"))!=null?o:"").split(/\s+/).some(s=>s!==""&&ba(s)===t)}),[])}function _a(i,e=document){return c(()=>typeof i!="string"||i.trim()===""?!1:Ca(e,i).length>0,!1)}function Id(i,e){if(i.nodeType===9)return!0;let t=e.parentElement;for(;t!==null;){if(t===i)return!0;if(t.hasAttribute("itemscope"))return!1;t=t.parentElement}return!1}function Ld(i,e){return c(()=>Array.from(i.querySelectorAll(`[itemprop~="${e}"]`)).filter(n=>Id(i,n)).slice(0,Pd),[])}function Md(i){return c(()=>{if(i.hasAttribute("itemscope"))return null;let e=i.tagName.toLowerCase();if(e==="time"){let n=i.getAttribute("datetime");return n!==null?n:i.textContent}let t=Dd[e];return t!==void 0?i.getAttribute(t):i.textContent},null)}function Ea(i,e=void 0,t=document){return c(()=>{let n=Ge(i);if(n===null)return null;let r=[];for(let o of Ca(t,e)){if(r.length>=ie)break;wa(o,n,r)}return Z(r)},null)}function wa(i,e,t){let[n,...r]=e;for(let o of Ld(i,n)){if(t.length>=ie)return;if(r.length===0){let s=Md(o);s!==null&&t.push(s);continue}wa(o,r,t)}}var Pd,Dd,Zr=p(()=>{"use strict";m();ke();sn();Pd=50;Dd={meta:"content",a:"href",area:"href",link:"href",audio:"src",embed:"src",iframe:"src",img:"src",source:"src",track:"src",video:"src",object:"data",data:"value",meter:"value"}});function Ud(i){return typeof i=="string"?[i]:Array.isArray(i)?i.filter(e=>typeof e=="string"):[]}function Fd(i){return Ud(i["@type"]).some(t=>Od.has(t))}function Bd(i){if(typeof i.headline!="string"||i.headline.trim()==="")return!1;let e=i.image;if(e==null||Array.isArray(e)&&e.length===0||typeof i.datePublished!="string"||i.datePublished.trim()===""||typeof i.dateModified!="string"||i.dateModified.trim()==="")return!1;let t=i.author;if(!t)return!1;if(!(typeof t=="string"&&t.trim()!==""))if(typeof t=="object"&&!Array.isArray(t)){if(typeof t.name!="string")return!1}else if(Array.isArray(t)){if(t.length===0||!t.every(o=>typeof o=="object"&&o!==null&&typeof o.name=="string"))return!1}else return!1;let n=i.publisher;return!(!n||typeof n!="object"||Array.isArray(n)||typeof n.name!="string")}function eo(i){return i.replace(/\s+[|–—]\s+.*$/,"").toLowerCase().trim().replace(/\s+/g," ")}function Vd(i,e){if(i===e||i.includes(e)||e.includes(i))return!0;let t=i.length<=e.length?i:e,n=i.length<=e.length?e:i,r=Math.ceil(t.length*.8);return!!(r>0&&n.startsWith(t.slice(0,r)))}function Hd(i){let e=i.querySelector("h1");if(e&&e.textContent&&e.textContent.trim()!=="")return eo(e.textContent);let t=i.querySelector('meta[property="og:title"]');if(t){let n=t.getAttribute("content");if(n&&n.trim()!=="")return eo(n)}return null}function Kd(i,e){if(!e)return!0;let t=i.isAccessibleForFree;if(!(t===!1||typeof t=="string"&&t.toLowerCase()==="false"))return!1;let r=i.hasPart;return(Array.isArray(r)?r:r?[r]:[]).some(s=>{if(typeof s!="object"||s===null)return!1;let a=s;return typeof a.cssSelector=="string"&&a.cssSelector.trim()!==""})}var Nd,Od,Le,ui=p(()=>{"use strict";Nd=1e5,Od=new Set(["NewsArticle","Article","ReportageNewsArticle","AnalysisNewsArticle","Backgroun
1dNewsArticle","OpinionNewsArticle","ReviewNewsArticle","LiveBlogPosting","BlogPosting"]);Le=class i{static collect(e){var r;let t=Array.from(e.querySelectorAll('script[type="application/ld+json"]')),n=[];for(let o of t){let s=(r=o.textContent)!=null?r:"";if(s.length>Nd)continue;let a;try{a=JSON.parse(s)}catch{continue}if(Array.isArray(a))for(let l of a)typeof l=="object"&&l!==null&&n.push(l);else if(typeof a=="object"&&a!==null){let l=a;if(Array.isArray(l["@graph"]))for(let u of l["@graph"])typeof u=="object"&&u!==null&&n.push(u);else n.push(l)}}return n}static runChecks(e,t){let n=i.collect(e),r=n.length>0,o=n.find(g=>typeof g=="object"&&g!==null&&Fd(g)),s=o!==void 0,a=s,l=s&&Bd(o),u=!1;if(s&&typeof o.headline=="string"){let g=eo(o.headline),v=Hd(e);v!==null&&(u=Vd(g,v))}let f=s?Kd(o,t):!t;return[{id:"jsonld_present",audience:"A",pass:r},{id:"jsonld_newsarticle",audience:"B",pass:a},{id:"jsonld_required_props",audience:"B",pass:l},{id:"schema_dom_consistency",audience:"B",pass:u},{id:"paywall_markup",audience:"B",pass:f}]}}});function Sa(i){return i.trim().toLowerCase().replace(/^https?:\/\//,"").replace(/^schema\.org\//,"").replace(/^schema:/,"")}function Aa(i,e){if(e===void 0||e.length===0)return!0;let t=i["@type"],n=Array.isArray(t)?t:[t],r=new Set(n.filter(o=>typeof o=="string").map(Sa));return e.some(o=>typeof o=="string"&&r.has(Sa(o)))}function ka(i,e=document){return c(()=>c(()=>Le.collect(e),[]).some(n=>Aa(n,i)),!1)}function Ta(i,e=void 0,t=document){return c(()=>{let n=Ge(i);if(n===null)return null;let r=c(()=>Le.collect(t),[]),o=[];for(let s of r){if(o.length>=ie)break;let a=s;Aa(a,e)&&o.push(...Rt(a,n,{fanOutArrays:!0}))}return Z(o)},null)}var to=p(()=>{"use strict";ui();m();ke();sn()});function Ra(i,e,t=document){return c(()=>{if(typeof i!="string"||typeof e!="string")return null;let r=c(()=>Array.from(t.querySelectorAll(i)).slice(0,ie),[]).map(o=>c(()=>o.getAttribute(e),null));return Z(r)},null)}var xa=p(()=>{"use strict";m();ke()});function Pa(i,e=document){return c(()=>{if(typeof i!="string")return null;let n=c(()=>Array.from(e.querySelectorAll(i)).slice(0,ie),[]).map(r=>c(()=>r.textContent,null));return Z(n)},null)}var Ia=p(()=>{"use strict";m();ke()});function an(){return c(()=>typeof window!="undefined"?window:{},{})}function La(i,e=an()){return c(()=>{let t=Ge(i);if(t===null)return null;let n=Rt(e,t,{fanOutArrays:!1});if(n.length===0)return null;let[r]=n;return Array.isArray(r)?Z(r):Z(n)},null)}var no=p(()=>{"use strict";m();ke();sn()});function Da(i){let e=0,t=i.parentElement;for(;t!==null;)e++,t=t.parentElement;return e}function qd(i){return i.querySelector("article")===null}function Wd(i){for(let e of zd){let t=c(()=>Array.from(i.querySelectorAll(e)).filter(qd),[]);if(t.length!==0)return t.reduce((n,r)=>Da(r)>Da(n)?r:n)}for(let e of jd){let t=c(()=>i.querySelector(e),null);if(t!==null)return t}return null}function $d(i){var t;let e=((t=i.textContent)!=null?t:"").trim();return e===""?0:e.split(/\s+/).length}function Ma(i=document){return c(()=>{let e=Wd(i);if(e===null)return 0;let t=c(()=>e.cloneNode(!0),e);return t!==e&&c(()=>{t.querySelectorAll(Gd).forEach(n=>n.remove())},void 0),$d(t)},0)}var zd,jd,Gd,Na=p(()=>{"use strict";m();zd=['[itemprop="articleBody"]',".article-body, .entry-content","main article","article"],jd=["main","body"],Gd=["nav","aside","footer","figcaption",'[class*="related"]','[class*="recommend"]',"[data-related]"].join(", ")});function Oa(i,e=document){return c(()=>{if(i!=="wordCount")return null;let t=Ma(e);return Number.isFinite(t)&&t>0?t:null},null)}var Ua=p(()=>{"use strict";Na();m()});function Qd(i){if(i.length===0)return!1;for(let e=0;e<i.length;e++){let t=i.charCodeAt(e);if(t<48||t>57)return!1}return!0}function Xd(i){if(typeof i!="object"||i===null||Array.isArray(i))return!1;for(let e of Object.keys(i))if(e===Yd||Qd(e))return!1;return!0}function Va(i){if(typeof i!="object"||i===null||Array.isArray(i))return!1;let e=Object.getPrototypeOf(i);return e===Object.prototype||e===null}function io(i,e,t,n){for(let r of Object.keys(e)){let o=c(()=>e[r],Ba);if(o===Ba)continue;n.remaining--;let s=i[r];n.remaining>0&&t<Jd&&Va(s)&&Va(o)?i[r]=io(ef(s,n),o,t+1,n):i[r]=o}return i}function ef(i,e){return io(Object.create(null),i,0,e)}function tf(i){let e=Object.create(null),t={remaining:Zd};for(let n of i)Xd(n)&&io(e,n,0,t);return e}function nf(i,e){if(Object.prototype.hasOwnProperty.call(i,e))return i[e];let t=Ge(e);if(t===null)return;let n=Rt(i,t,{fanOutArrays:!1});return n.length===0?void 0:n[0]}function Ha(i,e=an(),t=Fa){return c(()=>{let n=typeof t=="string"&&t.trim()!==""?t.trim():Fa;if(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,n))return null;let r=c(()=>e[n],void 0);if(!Array.isArray(r))return null;let o=nf(tf(r),i);if(Array.isArray(o)){let s=o.length>ie?o.slice(0,ie):o.slice();return ci(si("joinList",s))}return ai(o)},null)}var Fa,Yd,Ba,Jd,Zd,Ka=p(()=>{"use strict";m();rn();ke();sn();no();Fa="dataLayer",Yd="event",Ba=Symbol("unreadable");Jd=Jr,Zd=2e4});function ro(){return{doc:document,globalScope:an()}}function Te(i){return typeof i=="string"&&i.trim()!==""?i:null}function rf(i,e){var f;let t=i,n=Te(t.meta);if(n!==null)return ha(n,e.doc);let r=Te(t.microdata);if(r!==null)return Ea(r,(f=Te(t.type))!=null?f:void 0,e.doc);let o=Te(t.jsonld);if(o!==null){let g=Array.isArray(t.type)?t.type.filter(v=>typeof v=="string"):void 0;return Ta(o,g,e.doc)}if(Array.isArray(t.attr)){let g=Te(t.attr[0]),v=Te(t.attr[1]);return g===null||v===null?null:Ra(g,v,e.doc)}let s=Te(t.text);if(s!==null)return Pa(s,e.doc);let a=Te(t.global);if(a!==null)return La(a,e.globalScope);let l=Te(t.datalayer);if(l!==null)return Ha(l,e.globalScope,e.dataLayerName);let u=Te(t.computed);return u!==null?Oa(u,e.doc):null}function of(i,e){let t=Array.isArray(i)?i:[i];if(e.matches!==void 0){let n=on(e.matches);if(n===null)return null;t=t.filter(r=>li(n,r))}if(e.extract!==void 0){let n=on(e.extract);if(n===null)return null;let r=[];for(let o of t){let s=fa(n,o);s!==null&&r.push(s)}t=r}return t.length===0?null:t}function sf(i,e){return!e||i.length===1?i[0]:i}function oo(i,e=ro()){return c(()=>
1{if(typeof i!="object"||i===null)return null;let t=rf(i,e);if(t===null)return null;let n=of(t,i);if(n===null)return null;let r=sf(n,i.all===!0);return i.transform===void 0?r:ci(si(i.transform,r))},null)}var za=p(()=>{"use strict";rn();m();ke();Xr();va();Zr();to();xa();Ia();no();Ua();Ka()});function so(){return{...ro(),path:c(()=>window.location.pathname,"")}}function uf(i){let e=i==null?void 0:i.articleDetection;if(e==null)return"auto";if(e==="auto"||e==="paths"||e==="off")return e;let t=typeof e=="string"?`"${e}"`:`a ${typeof e}`;return"auto"}function df(i){let e=i==null?void 0:i.articlePaths;return Array.isArray(e)?e:[]}function ff(i,e){return c(()=>{var a,l;let t={verdict:Array.isArray(i==null?void 0:i.verdict)?i.verdict:[],fields:i!=null&&i.fields&&typeof i.fields=="object"?i.fields:{}},n=e==null?void 0:e.profile,r=Array.isArray(n==null?void 0:n.verdict)?n.verdict:t.verdict,o={...t.fields};if(n!=null&&n.fields&&typeof n.fields=="object")for(let[u,f]of Object.entries(n.fields))Array.isArray(f)&&(o[u]=f);let s=(a=e==null?void 0:e.dataLayerMapping)==null?void 0:a.fields;if(s&&typeof s=="object")for(let[u,f]of Object.entries(s))typeof f!="string"||f.trim()===""||(o[u]=[{datalayer:f.trim()},...(l=o[u])!=null?l:[]]);return{verdict:r,fields:o}},{verdict:[],fields:{}})}function pf(i){return(i==null?void 0:i.path)===!0}function gf(i,e,t){return c(()=>{if(typeof i!="object"||i===null)return null;let n=i;if(n.path===!0)return gt(t)?Ut(e.path,t):null;if(typeof n.meta=="string"&&n.meta.trim()!=="")return mf(n,e);let r=ja(n.microdata);if(r!==null)return typeof r=="string"?_a(r,e.doc):null;let o=ja(n.jsonld);if(o!==null){let s=Array.isArray(o)?o.filter(a=>typeof a=="string"&&a.trim()!==""):[];return s.length===0?null:ka(s,e.doc)}return typeof n.bodyClass=="string"&&n.bodyClass.trim()!==""?hf(n.bodyClass,e.doc):null},null)}function ja(i){if(i==null||typeof i!="object")return null;let e=i.type;return e===void 0?null:e}function mf(i,e){let t=oo({meta:i.meta,all:!0},e);if(t===null)return!1;if(!Array.isArray(i.equals))return!0;let n=i.equals.filter(o=>typeof o=="string");return n.length===0?!0:(Array.isArray(t)?t:[t]).some(o=>n.includes(String(o)))}function hf(i,e){let t=on(i);if(t===null)return!1;let n=c(()=>{var r,o;return(o=(r=e.body)==null?void 0:r.getAttribute("class"))!=null?o:""},"");return n===""?!1:li(t,n)}function vf(i,e,t){return c(()=>{let n=uf(e);if(n==="off"||!Array.isArray(i)||i.length===0)return"no-opinion";let r=df(e),o=(n==="paths"?i.filter(pf):i).slice(0,lf),s=0;for(let a of o){let l=gf(a,t,r);if(l!==null&&(s+=1,l))return"article"}return s===0?"no-opinion":"not-article"},"no-opinion")}function yf(i,e){return c(()=>{let t={};if(!i||typeof i!="object")return t;for(let[n,r]of Object.entries(i).slice(0,af))if(Array.isArray(r))for(let o of r.slice(0,cf)){let s=c(()=>oo(o,e),null);if(s!==null){t[n]=s;break}}return t},{})}function Ga(i,e={},t=so(),n=!1){return c(()=>{let r=ff(i,e),o=vf(r.verdict,e,t),a=o==="article"||o==="no-opinion"&&n===!0?yf(r.fields,t):{};return{verdict:o,fields:a}},{verdict:"no-opinion",fields:{}})}var af,cf,lf,qa=p(()=>{"use strict";za();Xr();Zr();to();En();m();af=64,cf=32,lf=32});function $a(i){if(i===null||typeof i!="object")return i;for(let e of Object.values(i))$a(e);return Object.freeze(i)}var Wa,bf,cn,ln,Ya=p(()=>{"use strict";Wa="^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$",bf="https://schema.org/NewsArticle",cn=[];ln=$a({verdict:[{path:!0},{meta:"og:type",equals:["article","news article"]},{microdata:{type:bf}},{jsonld:{type:["NewsArticle","Article","ReportageNewsArticle","OpinionNewsArticle","BlogPosting"]}},{meta:"article:published_time",nonEmpty:!0},{bodyClass:"\\bsingle-(post|article)\\b"}],fields:{article_title:[{meta:"parsely-title"},{microdata:"headline"},{jsonld:"headline"},{meta:"article:title"},{meta:"headline"},{meta:"og:title"},{text:'main[itemtype*="NewsArticle"] h1'},{text:"article h1"}],article_url:[{meta:"parsely-link"},{attr:["link[rel=canonical]","href"]},{jsonld:"url"},{meta:"og:url"}],article_uuid:[{meta:"parsely-post-id"},{attr:['main[itemtype*="NewsArticle"] article',"data-uuid"]},{attr:['main[itemtype*="NewsArticle"] article',"id"]},{attr:["article","data-uuid"],matches:Wa},{attr:["article","id"],matches:Wa},{jsonld:"identifier"},{jsonld:"@id"}],article_section:[{meta:"parsely-section"},{microdata:"articleSection"},{meta:"article:section"},{meta:"article:mainsection"},{jsonld:"articleSection"}],author_name:[{meta:"parsely-author",all:!0,transform:"joinList"},{microdata:"creator.name",all:!0,transform:"joinList"},{microdata:"author.name",all:!0,transform:"joinList"},{jsonld:"author.name",all:!0,transform:"joinList"},{jsonld:"creator",all:!0,transform:"joinList"},{meta:"article:author",all:!0,transform:"joinList"},{meta:"docauthor"},{meta:"author"}],article_publication_date:[{meta:"parsely-pub-date",transform:"isoDate"},{microdata:"datePublished",transform:"isoDate"},{jsonld:"datePublished",transform:"isoDate"},{meta:"article:published_time",transform:"isoDate"},{meta:"pubdate",transform:"isoDate"},{attr:["time[itemprop=datePublished]","datetime"],transform:"isoDate"}],article_is_premium:[{jsonld:"isAccessibleForFree",transform:"invert"},{meta:"article:content_tier",transform:"tierToBool"}
1],article_concept_name:[{microdata:"keywords",all:!0,transform:"joinList"},{attr:["article","data-categories"]},{meta:"article:tag",all:!0,transform:"joinList"}],total_word_count:[{computed:"wordCount"}],article_section_uuid:cn,author_uuid:cn,article_concept_uuid:cn,article_publication:cn,article_content:cn}})});function ao(i){return c(()=>(i==null?void 0:i.enabled)!==!1,!0)}function _f(i){return c(()=>(i==null?void 0:i.wordCount)!=="off",!0)}function Ef(i){return i.filter(e=>(e==null?void 0:e.computed)===void 0)}function Qa(i){let e={};for(let[t,n]of Object.entries(i))e[t]=Array.isArray(n)?Ef(n):n;return e}function wf(i){let e=i.profile;return!e||typeof e!="object"||!e.fields||typeof e.fields!="object"?i:{...i,profile:{...e,fields:Qa(e.fields)}}}function Xa(i={}){return c(()=>{if(!ao(i))return Cf;let e=i&&typeof i=="object"?i:{};return _f(e)?{profile:ln,config:e}:{profile:{verdict:ln.verdict,fields:Qa(ln.fields)},config:wf(e)}},Sf)}var Cf,Sf,Ja=p(()=>{"use strict";Ya();m();Cf=Object.freeze({profile:Object.freeze({verdict:[],fields:{}}),config:Object.freeze({articleDetection:"off"})});Sf=Object.freeze({profile:ln,config:Object.freeze({})})});function co(){return{isArticle:!1,data:{}}}var Af,kf,un,Za,ge,lo=p(()=>{"use strict";w();m();qa();Ja();rn();Af=3e3,kf=100,un="article_is_premium",Za=Object.freeze({verdict:"no-opinion",fields:Object.freeze({})}),ge=class{static async resolve(){return(await this.resolveContext()).data}static async resolveContext(){if(this.ensureUnloadListeners(),this.decision)return this.currentContext();if(this.pending)return await this.pending,this.currentContext();let e=this.readLive();if(Object.keys(e).length>0)return this.latch(!0,e),this.currentContext();if(!this.isMappingConfigured()||this.unloadStarted)return this.latch(!1,{}),this.currentContext();this.pending=this.waitForArticleData();try{await this.pending}finally{this.pending=null}return this.currentContext()}static reset(){this.decision=null,this.pending=null}static isDecided(){return this.decision!==null}static currentContext(){let e=this.decision;if(!e||!e.isArticle)return co();let t=this.readLive(),n=Object.keys(t).length>0?t:e.data,r={...e.markupFields,...n};return Object.prototype.hasOwnProperty.call(n,un)&&Tt(n[un])===null&&Object.prototype.hasOwnProperty.call(e.markupFields,un)&&(r[un]=e.markupFields[un]),{isArticle:!0,data:r}}static latch(e,t){let n=this.resolveMarkup(e),r=e||n.verdict==="article";this.decision={isArticle:r,data:t,markupFields:n.fields}}static resolveMarkup(e){return c(()=>{let t=d.getAutoContextConfig();if(!ao(t))return Za;let{profile:n,config:r}=Xa(t);return Ga(n,r,this.resolverContext(r),e)},Za)}static resolverContext(e){var r;let t=so(),n=(r=e==null?void 0:e.dataLayerMapping)==null?void 0:r.variableName;return typeof n=="string"&&n.trim()!==""&&(t.dataLayerName=n.trim()),t}static readLive(){let e=d.getArticleDetails();return e.success&&e.value?e.value:{}}static isMappingConfigured(){let e=d.getValue("articleDetailsMapping");return!!(e&&e.variableName)}static readyTimeoutMs(){let e=d.getValue("articleDetailsMapping"),t=e&&typeof e.readyTimeoutMs=="number"?e.readyTimeoutMs:Af;return Math.max(0,Math.min(t,3e4))}static waitForArticleData(){let e=this.readyTimeoutMs(),t=Date.now();return new Promise(n=>{let r=(s,a,l)=>{this.decision||this.latch(s,a),n(this.decision)},o=()=>{let s=this.readLive();if(Object.keys(s).length>0){r(!0,s,"found");return}if(this.unloadStarted){r(!1,{},"unload started");return}if(Date.now()-t>=e){r(!1,{},`timeout ${e}ms`);return}setTimeout(o,kf)};o()})}static ensureUnloadListeners(){if(this.listenersInstalled||typeof window=="undefined")return;this.listenersInstalled=!0;let e=()=>{this.unloadStarted=!0};window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e),window.addEventListener("pageshow",()=>{this.unloadStarted=!1})}};ge.decision=null,ge.pending=null,ge.unloadStarted=!1,ge.listenersInstalled=!1});var Tf,di,uo=p(()=>{"use strict";Tf={event_id:"",publication_id:"",organisation_id:"",organisation_name:"",publication_name:"",event_time_epoc:"",event_create_year:"",event_create_month:"",event_create_date:"",platform_type:"",platform_model:"",platform_name:"",platform_version:"",platform_os_name:"",referrer_url:"",referrer_type:"",event_timestamp_utc:"",sdk_version:"",event_creation_date:"",device_id:"",session_id:"",page_view_uuid:"",page_view_url:"",page_title:"",previous_page_view_uuid:"",previous_page_view_url:"",bot_suspected:!1,agent_suspected:!1,agent_signals:"",utm_source:"",utm_medium:"",utm_campaign:"",utm_content:"",utm_term:"",gclid:"",fbclid:"",msclkid:"",first_touch_utm_source:"",first_touch_utm_medium:"",first_touch_utm_campaign:"",first_touch_utm_content:"",first_touch_utm_term:"",event_name:"",ai_source:""},di=Tf});var Rf,fi,fo=p(()=>{"use strict";Rf={user_id:"",is_logged_in:"",user_subscription:""},fi=Rf});var xf,ec,tc=p(()=>{"use strict";xf={scroll_depth_percent:"",time_spent_seconds:"",size_category:"",engaged_reading_depth_percentage:""},ec=xf});var Pf,nc,ic=p(()=>{"use strict";Pf={click_type:"",click_action:"",article_uuid:"",element_text:"",element_tag:"",element_url:""},nc=Pf});var If,rc,oc=p(()=>{"use strict";If={},rc=If});var Lf,sc,ac=p(()=>{"use strict";Lf={page_session_id:"",ping_sequence:"",ping_type:"",ping_interval_seconds:"",total_time_seconds:"",scroll_depth_percent:"",total_hidden_time_seconds:"",interval_active_seconds:"",interval_total_seconds:"",interval_hidden_seconds:"",is_visible:"",visibility_changes_count:"",has_scrolled:"",has_clicked:"",has_typed:"",page_load_time_epoc:"",time_since_page_load_seconds:"",time_spent_seconds:"",size_category:"",engaged_reading_depth_percentage:""},sc=Lf});var Df,cc,lc=p(()=>{"use strict";Df={experiment_id:"",experiment_name:"",variant:"",is_control:"",variant_source:"",variant_title:"",original_title:"",target_selector:"",target_url:"",target_type:""},cc=Df});var Mf,uc,dc=p(()=>{"use strict";Mf={click_target_tag:"",click_target_href:"",click_position:"",time_since_view_ms:""},uc=Mf});var Nf,fc,pc=p(()=>{"use strict";Nf={click_id:"",original_click_at:"",qualified_at:"",active_seconds_observed:""},fc=Nf});var dn,gc=p(()=>{"use strict";T();m();Ze();dn=class{static calculateEngageReadingDepth(e,t,n={}){return E(()=>
1{if(e<0||t<0)throw new Error("Word count and time spent must be non-negative values");let o=(n.avgReadingSpeedPerMinute||this.DEFAULT_READING_SPEED)/60,s=t*o,a=0;return e>0&&(a=s/e*100,a=Math.min(100,Math.ceil(a))),{totalReadingDepthPercentage:a,totalWordReadingCapacity:s,avgReadingSpeedPerSecond:o}},{message:"Failed to calculate engage reading depth percentage",severity:"low",source:"EngageReadingDepthCalculator.calculateScrollDepth"})}static calculateEngageReadingDepthWithCustomSpeed(e,t,n){return this.calculateEngageReadingDepth(e,t,{avgReadingSpeedPerMinute:n})}};dn.DEFAULT_READING_SPEED=$.ARTICLE_READING_SPEED_WPM});function po(i){return i==="click"||i.includes("_click")}var Of,Uf,pi,mc=p(()=>{"use strict";T();m();uo();_n();fo();tc();ic();oc();ac();lc();dc();pc();At();gc();Of=Kr("page_leave"),Uf=Kr("engagement_ping");pi=class i{static toIntegerString(e){if(e==null||e==="")return"0";let t=Number(e);return isNaN(t)?"0":Math.floor(t).toString()}static toBooleanString(e){if(e==null||e==="")return"false";if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="false"||t==="0")return"false"}return(!!e).toString()}static normalize(e){return E(()=>{let t=Of.has(e.event_name),n=Uf.has(e.event_name),r=e.event_name==="article_engagement_ping",o=e.event_name.startsWith("ab_experiment_"),s=e.event_name==="ab_experiment_qualified_click",a=e.event_name==="ab_experiment_click",l=!o&&po(e.event_name),u=e.event_name==="page_view"||e.event_name==="page_leave",f={...di,...l&&!u?nc:{},...!l&&!o&&!u&&!n?Oe:{},...!l&&!o&&u?rc:{},...!r&&n?{page_title:""}:{},...r?Oe:{},...fi,...t?ec:{},...n?sc:{},...o?cc:{},...a?uc:{},...s?fc:{}};if(e.event_name==="article_page_leave"||e.event_name==="article_engagement_ping"){let C=e.total_word_count||0,x=e.time_spent_seconds||e.total_time_seconds||0,k=dn.calculateEngageReadingDepth(C,x);if(k.success){let P=k.value;e.engaged_reading_depth_percentage=P.totalReadingDepthPercentage.toString()}else e.engaged_reading_depth_percentage="0";let X="",oe=e.total_word_count;if(oe!=null&&!isNaN(Number(oe))){let P=Number(oe);P<=500?X="Small":P>500&&P<=1200?X="Medium":P>1200&&(X="Large"),e.size_category=X}}e.scroll_depth_percent;let v=new Set(Object.keys(f));v.add("consent_state");let y={...f},_={};if(typeof e.additional_info=="string")try{_=JSON.parse(e.additional_info)}catch{_={}}else typeof e.additional_info=="object"&&e.additional_info!==null&&(_=e.additional_info);for(let C of Object.keys(e))if(!C.startsWith("ex_")&&C!=="additional_info"){if(C==="total_word_count"){(t||n)&&(_[C]=e[C]);continue}v.has(C)?y[C]=e[C]:_[C]=e[C]}if(y.additional_info=JSON.stringify(_),n){let C=["ping_sequence","time_spent_seconds","total_time_seconds","total_hidden_time_seconds","interval_total_seconds","interval_active_seconds","interval_hidden_seconds","time_since_page_load_seconds","visibility_changes_count","scroll_depth_percent","page_load_time_epoc","ping_interval_seconds"];for(let k of C)k in y&&(y[k]=i.toIntegerString(y[k]));let x=["is_visible","has_scrolled","has_clicked","has_typed"];for(let k of x)k in y&&(y[k]=i.toBooleanString(y[k]))}return y},{message:"Failed to normalize event data",severity:"medium",source:"EventNormalizer.normalize"})}}});function go(i){let e={};for(let t of Object.keys(i))Ff.has(t)&&(e[t]=i[t]);return e}var Ff,hc=p(()=>{"use strict";Ff=new Set(["organisation_name","publication_name","publication_id","sdk_version","event_id","event_time_epoc","event_create_year","event_create_month","event_create_date","event_timestamp_utc","event_creation_date","platform_type","platform_model","platform_name","platform_version","platform_os_name","bot_suspected","agent_suspected","agent_signals","event_name","organisation_id","consent_state"])});var tn={};O(tn,{CONDITIONAL_STAMP_KEYS:()=>vc,EventFactory:()=>V});var vc,V,pe=p(()=>{"use strict";T();m();Yr();lo();mc();w();At();Fr();et();Ee();hc();ht();zr();zn();vc=["content_access","page_class_signals"],V=class{static async createEvent(e,t={},n={}){return await b(async()=>{if(d.disable_get().DisableOption===!0||na(e,n))return null;let r=null,o=!1;if(d.getConsentConfig().enabled===!0){if(nt.evaluate(e).action==="drop")return null;
1r=S.getStampState(),o=vt(e,d.getConsentConfig().categoryMap).every(Y)}let[s,a,l]=await Promise.all([je.getCommonEventData(),n.skipArticleContext?Promise.resolve(co()):ge.resolveContext(),je.getUserEventData()]),u=po(e),f=!it.has(e),g=u?{}:a.data,v=je.getPageViewContextData(),y=v.success?v.value:{};if(!s.success)throw new Error("Failed to get common event data");let _=s.value,C=l.success?l.value:{},x=a.isArticle&&!f?`${St}${e}`:e;(!C.user_id||C.user_id==="false")&&(C.user_id=_.device_id);let k=c(()=>J.resolve(),{pageClass:"unknown",source:"default"}),X=a.isArticle?we.get():null,oe=c(()=>ds(),null),P={event_name:x,organisation_id:d.getValue("organisation_name"),...r?{consent_state:JSON.stringify(r)}:{},page_class:k.pageClass,page_class_source:k.source,...X!==null?{content_access:X}:{},...oe!==null?{page_class_signals:oe}:{}},Ne=o?go(P):P,Mt={...o?go(_):_,...o?{}:g,...o?{}:C,...o?{}:y,...t,...Ne};if(o)for(let Ot of[...Object.keys(P),...vc])Ot in Ne||delete Mt[Ot];let Nt=pi.normalize(Mt);if(!Nt.success)throw new Error("Failed to normalize event data");return Nt.value},{message:`Failed to create ${e} event`,severity:"medium",source:"EventFactory.createEvent"})}}});var mi={};O(mi,{PageViewTracker:()=>gi});var gi,hi=p(()=>{"use strict";m();pe();Ie();T();ze();gi=class{static async track(){return this.hasTrackedView?!1:(await b(async()=>{te.recordPageView();let t=await V.createEvent("page_view");if(!t.success)throw new Error("Failed to create page view event");if(t.value===null)return!1;let r=(await ae.send(t.value)).unwrapOr(!1);return r&&(this.hasTrackedView=!0),r},{message:"Failed to track page view",severity:"medium",source:"PageViewTracker.track",eventName:"page_view"})).unwrapOr(!1)}static reset(){this.hasTrackedView=!1}};gi.hasTrackedView=!1});var D,fn=p(()=>{"use strict";vi();D=class{static initialize(e={}){this.config={...this.config,...e},typeof document!="undefined"&&(this.state.isVisible=document.visibilityState==="visible",this.state.isVisible?this.state.visibleAt=Date.now():this.state.hiddenAt=Date.now())}static handleVisibilityChange(e){if(typeof document=="undefined")return;e&&(this.onHiddenTimeoutCallback=e);let t=document.visibilityState==="visible";t&&!this.state.isVisible?this.handlePageVisible():!t&&this.state.isVisible&&this.handlePageHidden()}static handlePageVisible(){if(this.hiddenTimer&&(clearTimeout(this.hiddenTimer),this.hiddenTimer=null),this.state.hiddenAt!==null){let e=Date.now()-this.state.hiddenAt;this.state.totalHiddenTime+=e}this.state.isVisible=!0,this.state.visibleAt=Date.now(),this.state.hiddenAt=null,ho()}static handlePageHidden(){mo(),this.state.isVisible=!1,this.state.hiddenAt=Date.now(),this.state.visibleAt=null,this.hiddenTimer=setTimeout(()=>{this.onHiddenTimeoutCallback&&this.onHiddenTimeoutCallback(),this.hiddenTimer=null},this.config.hiddenPageTimeout)}static getState(){return{...this.state}}static isHiddenTooLong(){return this.state.hiddenAt?Date.now()-this.state.hiddenAt>=this.config.hiddenPageTimeout:!1}static reset(){this.hiddenTimer&&(clearTimeout(this.hiddenTimer),this.hiddenTimer=null),this.state={isVisible:typeof document!="undefined"?document.visibilityState==="visible":!0,hiddenAt:null,visibleAt:null,totalHiddenTime:0},this.onHiddenTimeoutCallback=null}static getTotalHiddenTime(){let e=this.state.totalHiddenTime;return this.state.hiddenAt!==null&&(e+=Date.now()-this.state.hiddenAt),e}static getTotalHiddenTimeSeconds(){return Math.round(this.getTotalHiddenTime()/1e3)}};D.state={isVisible:typeof document!="undefined"?document.visibilityState==="visible":!0,hiddenAt:null,visibleAt:null,totalHiddenTime:0},D.hiddenTimer=null,D.config={hiddenPageTimeout:3e4},D.onHiddenTimeoutCallback=null});function re(i,e){return t=>{try{i(t)}catch(n){try{let r=n instanceof Error?n.message:String(n);console.error(`[${e}] Event listener error:`,r),n instanceof Error&&n.stack&&console.error(`[${e}] Stack trace:`,n.stack)}catch{}}}}function me(i,e){return()=>{try{i()}catch(t){try{let n=t instanceof Error?t.message:String(t);console.error(`[${e}] Callback error:`,n),t instanceof Error&&t.stack&&console.error(`[${e}] Stack trace:`,t.stack)}catch{}}}}var qe=p(()=>{"use strict"});function yi(){let i=window.scrollY||document.documentElement.scrollTop,e=window.innerHeight||document.documentElement.clientHeight,t=document.documentElement.scrollHeight;return Math.min(Math.ceil((i+e)/t*100),100)}var bi=p(()=>{"use strict"});function wi(){return typeof performance!="undefined"?performance.now():Date.now()}function bc(){at&&(Ci+=wi()-Ei,at=!1)}function Vf(){at||(Ei=wi(),at=!0)}function vo(){return at?Ci+(wi()-Ei):Ci}function Cc(){if(Re.length===0)return;let i=vo();for(let e=Re.length-1;e>=0;e--){let t=Re[e];if(i>=t.thresholdMs){Re.splice(e,1);try{t.callback()}catch{}}}
1Re.length===0&&ce&&(clearInterval(ce),ce=null)}function Hf(){if(ce||typeof setInterval=="undefined")return;ce=setInterval(()=>{at&&Cc()},Bf);let i=ce;typeof(i==null?void 0:i.unref)=="function"&&i.unref()}function _c(){Vf(),De&&clearTimeout(De),De=setTimeout(()=>{bc()},5e3),Cc()}var Bf,Ci,Ei,at,De,Re,ce,yc,We,yo=p(()=>{"use strict";qe();bi();Bf=250,Ci=0,Ei=typeof performance!="undefined"?performance.now():0,at=!0,De=null,Re=[],ce=null;yc=me(_c,"ActiveTimeMonitor.onUserActivity");typeof window!="undefined"&&(["scroll","mousemove","keydown","mousedown","touchstart"].forEach(i=>window.addEventListener(i,yc,{passive:!0})),yc());We={pause(){bc(),De&&(clearTimeout(De),De=null)},resume(){_c()},getActiveSecondsSincePageLoad(){return Math.round(vo()/1e3)},subscribeToThreshold(i,e){let t={thresholdMs:Math.max(0,i)*1e3,callback:e};if(vo()>=t.thresholdMs){try{e()}catch{}return()=>{}}return Re.push(t),Hf(),()=>{let n=Re.indexOf(t);n>=0&&Re.splice(n,1),Re.length===0&&ce&&(clearInterval(ce),ce=null)}},__resetForTests(){Ci=0,Ei=wi(),at=!0,De&&(clearTimeout(De),De=null),Re.length=0,ce&&(clearInterval(ce),ce=null)}}});var Ec={};O(Ec,{LeavePageTracker:()=>$e,pauseEngagementTimer:()=>mo,resumeEngagementTimer:()=>ho});function mo(){We.pause()}function ho(){We.resume()}var Si,$e,vi=p(()=>{"use strict";T();m();pe();rt();fn();qe();yo();bi();ei();Si=0;if(typeof window!="undefined"){let i=me(()=>{let e=yi();e>Si&&(Si=e)},"LeavePageTracker.updateScrollDepth");window.addEventListener("scroll",i)}$e=class i{static resetForNewView(){Si=0}static async track(e){return(await b(async()=>{let n={scroll_depth_percent:i.getScrollDepthPercent().toString(),time_spent_seconds:i.getTimeSpentSeconds().toString()};e&&(n.exit_reason=i.getExitReasonString(e),e.destinationUrl&&(n.destination_url=Ae(e.destinationUrl)));let r=D.getState();n.total_hidden_time_seconds=D.getTotalHiddenTimeSeconds().toString(),n.was_visible_at_exit=r.isVisible.toString();let o=await V.createEvent("page_leave",n);if(!o.success)throw new Error("Failed to create page leave event");if(o.value===null)return!1;let s=await fe.send("/event",o.value);return s.success?s.value.success:!1},{message:"Failed to track page leave",severity:"medium",source:"LeavePageTracker.track",eventName:"page_leave"})).unwrapOr(!1)}static getScrollDepthPercent(){return Si}static getTimeSpentSeconds(){return We.getActiveSecondsSincePageLoad()}static getExitReasonString(e){return e.type}}});var Ac={};O(Ac,{ClickTracker:()=>Co});var wc,Kf,zf,jf,Gf,Sc,qf,Wf,bo,$f,Yf,Qf,Xf,H,Co,kc=p(()=>{"use strict";T();m();pe();Ie();rt();Yr();w();Jn();wc=new Set(["ad","ads","advert","advertisement","advertising","banner"]),Kf=new Set(["share","youtube","social","facebook","twitter","linkedin","instagram","whatsapp","pinterest","mail","gmail","telegram","reddit"]),zf=new Set(["player","media","video"]),jf=/googlesyndication|doubleclick|googleadservices/,Gf=[/twitter\.com\/intent\//i,/\bx\.com\/intent\//i,/facebook\.com\/(sharer|dialog\/(share|feed))/i,/linkedin\.com\/(shareArticle|sharing\/share-offsite)/i,/pinterest\.[a-z.]+\/pin\/create/i,/reddit\.com\/submit/i,/(api|web)\.whatsapp\.com\/send/i,/\bwa\.me\//i,/t\.me\/share/i,/tumblr\.com\/(share|widgets\/share)/i,/service\.weibo\.com\/share/i,/telegram\.me\/share/i,/^mailto:\?(subject|body)=/i],Sc=200,qf=150,Wf=/\.(pdf|zip|doc|docx|xls|xlsx|ppt|pptx|csv|mp3|mp4|mov|avi|wmv|tar|gz|7z|rar|exe|dmg|apk|epub)(?:[?#]|$)/i,bo=/^(mailto|tel|sms):/i,$f=new Set(["button","select","textarea","input","option","label","summary","details"]),Yf=new Set(["button","link","checkbox","radio","switch","tab","menuitem","menuitemcheckbox","menuitemradio","option","treeitem","combobox","listbox","slider","spinbutton","searchbox","textbox"]),Qf=["onclick","aria-expanded","aria-controls","aria-haspopup"],Xf=5,H=class H{static async trackClick(e,t=!1,n){let r=t||e.wasRightClicked===!0,o=H.getEventTypeFromClick(e),s=H.resolveClickAction(r,n);if(H.isSyntheticLabelClick(e)||o==="inert"&&s==="left"&&!H.shouldTrackInertClick())return!1;Ke.touchSession();let a=await H.extractClickInfo(e);return(await b(async()=>{let u=await V.createEvent("click",{click_type:o,click_action:s,...a});if(!u.success)throw new Error("Failed to create click event");
1if(u.value===null)return!1;if(H.NAVIGATING_CLICK_TYPES.has(o)&&s==="left"){let g=await fe.send("/event",u.value);return g.success&&g.value.success}return(await ae.send(u.value)).unwrapOr(!1)},{message:"Failed to track click event",severity:"low",source:"ClickTracker.trackClick",eventName:"click"})).unwrapOr(!1)}static resolveClickAction(e,t){return e?"right":t?t.button===2?"right":t.button===1?"middle":t.ctrlKey||t.metaKey||t.shiftKey?"new_tab":"left":"left"}static isSyntheticLabelClick(e){var t;try{let n=Date.now(),r=H.lastLabelControl;if(e.tagName&&e.tagName.toLowerCase()==="label"){let o=e,s=(t=o.control)!=null?t:null;return!s&&o.htmlFor&&(s=document.getElementById(o.htmlFor)),H.lastLabelControl={control:s,at:n},!1}return r&&r.control===e&&n-r.at<=qf?(H.lastLabelControl=null,!0):!1}catch{return!1}}static shouldTrackInertClick(){try{let e=d.getClickTrackingConfig();if(e.trackInertClicks!==!0)return!1;let t=e.inertClickSamplingRate;return t>=1?!0:t<=0?!1:Math.random()<t}catch{return!1}}static async extractClickInfo(e){var u;let[t]=await Promise.all([je.getArticleEventData()]),{tag:n,text:r,href:o,iframeSrc:s,imgSrc:a}=this.normalizeTargetAttributes(e),l="";return n==="img"?l=a:n==="i"||n==="a"||o?l=o:l=s!=null?s:o,{article_uuid:t.success&&(u=t.value.article_uuid)!=null?u:"",element_tag:n,element_text:r,element_url:l}}static normalizeTargetAttributes(e){let t=e.tagName.toLowerCase(),n=H.normalizeElementText(e.textContent),r=(e.className||"").toLowerCase(),o=(e.id||"").toLowerCase(),s=e.href||e.getAttribute("href")||"";if(!s){let g=e.closest("a[href]");g&&(s=g.href||g.getAttribute("href")||"")}let a=s.toLowerCase(),l=`${r} ${o}`,u=this.getIframeSrc(e),f="";if(t==="img")f=e.src||"";else{let g=e.querySelector("img");g&&(f=g.src||"")}return{tag:t,text:n,classes:r,classIdText:l,id:o,href:s,hrefLower:a,iframeSrc:u,imgSrc:f}}static normalizeElementText(e){let t=(e||"").replace(/\s+/g," ").trim();return t.length>Sc?t.slice(0,Sc):t}static getIframeSrc(e){if(e.tagName.toLowerCase()==="iframe")return e.src||e.getAttribute("src")||"";let n=[".plyr",".flowplayer-embed-container",".video-container",".ew-embed",".article__iframe"];for(let o of n){let s=e.closest(o);if(s){let a=s.querySelector("iframe");if(a)return a.getAttribute("src")||a.src||""}}let r=e.querySelector("iframe");return(r==null?void 0:r.getAttribute("src"))||(r==null?void 0:r.src)||""}static getEventTypeFromClick(e){let{tag:t,classIdText:n,href:r,hrefLower:o,iframeSrc:s,imgSrc:a}=this.normalizeTargetAttributes(e),l=n.split(/[\W_]+/).filter(Boolean);return this.isAd(e,l,a,s)?"ad":this.isShare(l,o)?"share":t==="img"||t==="video"||t==="audio"||t==="iframe"||s||this.matchesAnyToken(l,zf)?"media":this.isMailtoTel(o)?"mailto_tel":this.isDownload(o)?"download":this.isOutbound(o)?"outbound":t==="a"||r?"link":this.isInteractiveClick(e)?"interactive":"inert"}static isInteractiveClick(e){try{let t=e,n=0;for(;t&&n<Xf;){if(H.isInteractiveElement(t))return!0;t=t.parentElement,n++}return!1}catch{return!1}}static isInteractiveElement(e){let t=e.tagName?e.tagName.toLowerCase():"";if($f.has(t)||t==="a"&&e.hasAttribute("href"))return!0;let n=(e.getAttribute("role")||"").trim().toLowerCase();if(n&&Yf.has(n))return!0;for(let o of Qf)if(e.hasAttribute(o))return!0;let r=e.getAttribute("tabindex");return r!==null&&r.trim()!==""&&Number(r)>=0||e.isContentEditable?!0:H.hasPointerCursor(e)}static hasPointerCursor(e){try{return typeof window=="undefined"||typeof window.getComputedStyle!="function"?!1:window.getComputedStyle(e).cursor==="pointer"}catch{return!1}}static isMailtoTel(e){return e?bo.test(e):!1}static isDownload(e){return!e||bo.test(e)?!1:Wf.test(e)}static isOutbound(e){if(!e||e.startsWith("#")||e.startsWith("?")||e.startsWith("/")&&!e.startsWith("//")||bo.test(e))return!1;try{let t=e.startsWith("//")?"https:"+e:e,n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"||typeof window=="undefined"||!window.location?!1:!H.isInternalHost(n.hostname.toLowerCase(),window.location.hostname.toLowerCase())}catch{return!1}}static isInternalHost(e,t){if(!e)return!1;let n=s=>s.startsWith("www.")?s.slice(4):s,r=n(e),o=n(t);if(r===o||r.endsWith("."+o)||o.endsWith("."+r))return!0;try{for(let s of d.getClickTrackingConfig().internalHosts){let a=String(s||"").trim().toLowerCase();if(a){if(a.startsWith(".")){if(e===a.slice(1)||e.endsWith(a))return!0}else if(e===a||n(a)===r)return!0}}}catch{}return!1}
1static isShare(e,t){return this.matchesAnyToken(e,Kf)?!0:t?Gf.some(n=>n.test(t)):!1}static matchesAnyToken(e,t){for(let n of e)if(t.has(n))return!0;return!1}static isAd(e,t,n,r){if(this.matchesAnyToken(t,wc)||e.hasAttribute("data-ad")||e.hasAttribute("data-google-ad")||typeof e.id=="string"&&e.id.startsWith("google_ads_"))return!0;let o=`${n} ${r}`.toLowerCase();if(!o.trim())return!1;let s=o.split(/[\W_]+/).filter(Boolean);return this.matchesAnyToken(s,wc)?!0:jf.test(o)}};H.NAVIGATING_CLICK_TYPES=new Set(["outbound","download","mailto_tel"]),H.lastLabelControl=null;Co=H});var xc={};O(xc,{TcfProvider:()=>_o,mapTcDataToSnapshot:()=>Rc});function Ai(i,e){if(!i||typeof i!="object")return{};let t=i[e];return!t||typeof t!="object"?{}:t}function Tc(i){return typeof i!="number"||!Number.isInteger(i)||i<=0?null:i}function Rc(i,e=xn,t={}){return c(()=>{let n=i&&typeof i=="object"?i:{},r=n.gdprApplies===!0,o=t&&typeof t=="object"?t:{},s=o.allowLegitimateInterest===!0,a=Tc(o.vendorId),l=Ai(n.purpose,"consents"),u=s?Ai(n.purpose,"legitimateInterests"):{},f=a===null?!0:Ai(n.vendor,"consents")[String(a)]===!0,g=a===null?!0:Ai(n.vendor,"legitimateInterests")[String(a)]===!0,v=e&&typeof e=="object"?e:xn,y={};for(let _ of j){let C=0,x=!1;for(let k of Object.keys(v)){let X=Number(k);if(v[X]!==_)continue;let oe=l[k],P=typeof oe=="boolean",Ne=oe===!0&&f,Mt=s&&bs(X),Nt=Mt?u[k]:void 0,Ot=Mt&&typeof Nt=="boolean",Go=Nt===!0&&g;!P&&!Ot||(C+=1,!Ne&&!Go&&(x=!0))}C!==0&&(y[_]=x?"denied":"granted")}return{source:"tcf",regionApplies:r,categories:y,raw:i,ts:Date.now()}},{source:"tcf",regionApplies:!1,categories:{},raw:i,ts:Date.now()})}var Jf,Zf,ep,_o,Pc=p(()=>{"use strict";m();Ee();Qt();Jf=3e3,Zf=100,ep=["tcloaded","useractioncomplete"];_o=class{constructor(e={}){this.id="tcf";this.precedence=He.tcf;this.regions=["EU"];this.emit=null;this.listenerId=null;this.listener=null;this.pollTimer=null;this.torndown=!1;this.waitForCmpMs=typeof e.waitForCmpMs=="number"&&e.waitForCmpMs>=0?e.waitForCmpMs:Jf,this.purposeMap=e.purposeMap&&typeof e.purposeMap=="object"?e.purposeMap:xn;let t=Tc(e.vendorId);e.vendorId,this.legalBasis={allowLegitimateInterest:e.allowLegitimateInterest===!0,...t!==null?{vendorId:t}:{}}}async init(e){this.emit=e,this.torndown=!1;let t=await this.waitForTcfApi();this.torndown||t&&c(()=>{this.listener=(n,r)=>this.onTcData(n,r),t("addEventListener",2,(n,r)=>{let o=n&&typeof n=="object"?n.listenerId:void 0;typeof o=="number"&&this.listenerId===null&&(this.listenerId=o),this.listener&&this.listener(n,r)})},void 0)}teardown(){this.torndown=!0,this.pollTimer!==null&&(clearInterval(this.pollTimer),this.pollTimer=null),c(()=>{let e=this.getTcfApi();e&&this.listenerId!==null&&this.listener&&e("removeEventListener",2,this.listener,this.listenerId)},void 0),this.listener=null,this.listenerId=null,this.emit=null}onTcData(e,t){c(()=>{if(this.torndown||!this.emit||t!==!0)return;let n=e&&typeof e=="object"?e.eventStatus:void 0;if(typeof n=="string"&&ep.indexOf(n)===-1)return;let r=Rc(e,this.purposeMap,this.legalBasis);this.emit(r)},void 0)}getTcfApi(){return c(()=>{let e=typeof window!="undefined"?window.__tcfapi:void 0;return typeof e=="function"?e:null},null)}waitForTcfApi(){return new Promise(e=>{let t=this.getTcfApi();if(t){e(t);return}let n=Date.now()+this.waitForCmpMs;this.pollTimer=setInterval(()=>{if(this.torndown){this.pollTimer!==null&&clearInterval(this.pollTimer),this.pollTimer=null,e(null);return}let r=this.getTcfApi();(r||Date.now()>=n)&&(this.pollTimer!==null&&clearInterval(this.pollTimer),this.pollTimer=null,e(r))},Zf)})}}});var ee,ki=p(()=>{"use strict";w();qe();m();ze();ee=class{static subscribe(e,t={}){return typeof window=="undefined"||typeof history=="undefined"?()=>{}:(t.trackHashChanges&&!this.config.trackHashChanges&&(this.config.trackHashChanges=!0,this.isInitialized&&this.setupHashChangeListener()),this.ensureInstalled(),this.subscribers.add(e),()=>{this.subscribers.delete(e)})}static initialize(e,t={}){this.subscribe(e,t)}static ensureInstalled(){this.isInitialized||(this.lastUrl=window.location.href,this.wrapPushState(),this.wrapReplaceState(),this.setupPopStateListener(),this.config.trackHashChanges&&this.setupHashChangeListener(),this.isInitialized=!0)}static wrapPushState(){this.originalPushState=history.pushState,history.pushState=(e,t,n
1)=>{this.originalPushState.call(history,e,t,n),this.hasUrlChanged()&&this.handleNavigation("pushState")}}static wrapReplaceState(){this.originalReplaceState=history.replaceState,history.replaceState=(e,t,n)=>{this.originalReplaceState.call(history,e,t,n),this.hasUrlChanged()&&(d.getSpaNavigationConfig().treatReplaceStateAsNavigation?this.handleNavigation("replaceState"):this.handleUrlCorrection())}}static handleUrlCorrection(){if(typeof window=="undefined")return;let e=window.location.href,t=this.lastUrl;this.lastUrl=e,c(()=>{te.correctCurrentUrl(e)},void 0)}static setupPopStateListener(){this.popstateListener=re(e=>{this.handlePopState(e)},"SPANavigationDetector.popstate"),window.addEventListener("popstate",this.popstateListener)}static handlePopState(e){this.hasUrlChanged()&&this.handleNavigation("popstate")}static setupHashChangeListener(){this.hashchangeListener||(this.hashchangeListener=re(e=>{this.handleHashChange(e)},"SPANavigationDetector.hashchange"),window.addEventListener("hashchange",this.hashchangeListener))}static handleHashChange(e){this.hasUrlChanged()&&this.handleNavigation("hashchange")}static hasUrlChanged(){return typeof window=="undefined"?!1:window.location.href!==this.lastUrl}static handleNavigation(e){if(typeof window=="undefined")return;let t=window.location.href,r={from:this.lastUrl,to:t,timestamp:Date.now(),method:e};this.lastUrl=t,this.subscribers.forEach(o=>{try{o(r)}catch{}})}static cleanup(){this.isInitialized&&(this.originalPushState&&(history.pushState=this.originalPushState),this.originalReplaceState&&(history.replaceState=this.originalReplaceState),this.popstateListener&&(window.removeEventListener("popstate",this.popstateListener),this.popstateListener=null),this.hashchangeListener&&(window.removeEventListener("hashchange",this.hashchangeListener),this.hashchangeListener=null),this.subscribers.clear(),this.lastUrl="",this.isInitialized=!1)}static getCurrentUrl(){return typeof window!="undefined"?window.location.href:""}static getIsInitialized(){return this.isInitialized}};ee.lastUrl="",ee.subscribers=new Set,ee.config={trackHashChanges:!1}
1,ee.isInitialized=!1,ee.popstateListener=null,ee.hashchangeListener=null});var he,Ti=p(()=>{"use strict";qe();he=class{static subscribe(e){return typeof window=="undefined"?()=>{}:(this.ensureInstalled(),this.subscribers.add(e),()=>{this.subscribers.delete(e)})}static ensureInstalled(){this.isInitialized||(this.pageshowListener=re(e=>{this.handlePageShow(e)},"BfcacheRestoreDetector.pageshow"),window.addEventListener("pageshow",this.pageshowListener),this.isInitialized=!0)}static handlePageShow(e){e.persisted&&this.subscribers.forEach(t=>{try{t()}catch{}})}static cleanup(){this.isInitialized&&(this.pageshowListener&&(window.removeEventListener("pageshow",this.pageshowListener),this.pageshowListener=null),this.subscribers.clear(),this.isInitialized=!1)}static getIsInitialized(){return this.isInitialized}static getSubscriberCount(){return this.subscribers.size}};he.subscribers=new Set,he.isInitialized=!1,he.pageshowListener=null});var Ic={};O(Ic,{PageLeaveCoordinator:()=>le});var le,Lc=p(()=>{"use strict";fn();ki();Ti();vi();m();T();Yt();qe();le=class{static initialize(e){this.isInitialized||typeof window!="undefined"&&(this.config={...this.config,...e},this.state.lastUrl=window.location.href,this.config.enableVisibilityTracking&&D.initialize({hiddenPageTimeout:this.config.hiddenPageTimeout}),this.config.enableSPATracking&&(this.spaUnsubscribe=ee.subscribe(t=>this.handleSPANavigation(t),{trackHashChanges:this.config.trackHashChanges})),this.setupEventListeners(),this.isInitialized=!0)}static setupEventListeners(){this.beforeUnloadListener=re(e=>{this.handleBeforeUnload(e)},"PageLeaveCoordinator.beforeunload"),window.addEventListener("beforeunload",this.beforeUnloadListener),this.pageHideListener=re(e=>{this.handlePageHide(e)},"PageLeaveCoordinator.pagehide"),window.addEventListener("pagehide",this.pageHideListener),this.bfcacheUnsubscribe=he.subscribe(()=>{this.handleBfcacheRestore()}),this.config.enableVisibilityTracking&&(this.visibilityChangeListener=re(e=>{this.handleVisibilityChange()},"PageLeaveCoordinator.visibilitychange"),document.addEventListener("visibilitychange",this.visibilityChangeListener))}static handleBeforeUnload(e){let t={type:"navigation",timestamp:Date.now()};this.triggerPageLeave(t,"beforeunload")}static handlePageHide(e){let t="browser_close";this.config.enableVisibilityTracking&&typeof document!="undefined"&&document.visibilityState==="hidden"&&(t="tab_switch");let n={type:t,timestamp:Date.now()};this.triggerPageLeave(n,"pagehide")}static handleBfcacheRestore(){this.reset(),$e.resetForNewView(),this.state.isRestoredFromCache=!0,(async()=>{try{let[e,t]=await Promise.all([Promise.resolve().then(()=>(ze(),Gr)),Promise.resolve().then(()=>(hi(),mi))]);e.PageViewContext.rotateForRestore(),t.PageViewTracker.reset(),await t.PageViewTracker.track()}catch{}})()}static handleVisibilityChange(){typeof document!="undefined"&&(this.config.enableVisibilityTracking&&D.handleVisibilityChange(()=>{let e={type:"timeout",timestamp:Date.now()};this.triggerPageLeave(e,"visibilitychange-timeout")}),document.visibilityState)}static async handleSPANavigation(e){let t={type:"spa_navigation",timestamp:e.timestamp,destinationUrl:e.to};if(this.shouldSendPageLeave("spa_navigation")){this.currentExitReason=t,this.markAsLeft();try{await $e.track(t)}catch{}}this.reset(),$e.resetForNewView(),this.state.lastUrl=e.to;try{let[n,r]=await Promise.all([Promise.resolve().then(()=>(ze(),Gr)),Promise.resolve().then(()=>(hi(),mi))]);n.PageViewContext.recordPageView(e.to),r.PageViewTracker.reset(),await r.PageViewTracker.track()}catch{}}static shouldProcessEvent(e){if(this.state.eventsFired.add(e),de.isIOSSafari()){if(this.state.eventsFired.has("pagehide")){let t=e==="pagehide";return t}return!0}if(de.isDesktop()){if(this.state.eventsFired.has("visibilitychange-timeout")){let t=e==="visibilitychange-timeout";return t}return!0}return!0}static shouldSendPageLeave(e){return!(!this.shouldProcessEvent(e)||this.state.hasLeft||this.state.leaveEventSentAt!==null&&Date.now()-this.state.leaveEventSentAt<100)}static markAsLeft(){this.state.hasLeft=!0,this.state.leaveEventSentAt=Date.now()}static getExitReason(){return this.currentExitReason}static reset(){this.state.hasLeft=!1,this.state.leaveEventSentAt=null,this.state.isRestoredFromCac
1he=!1,this.state.eventsFired.clear(),this.currentExitReason=null,this.config.enableVisibilityTracking&&D.reset()}static triggerPageLeave(e,t){b(async()=>{this.shouldSendPageLeave(t)&&(this.currentExitReason=e,this.markAsLeft(),await $e.track(e))},{message:"Failed to trigger page leave event",severity:"medium",source:"PageLeaveCoordinator.triggerPageLeave",eventName:"page_leave"})}static cleanup(){this.isInitialized&&(this.beforeUnloadListener&&(window.removeEventListener("beforeunload",this.beforeUnloadListener),this.beforeUnloadListener=null),this.pageHideListener&&(window.removeEventListener("pagehide",this.pageHideListener),this.pageHideListener=null),this.visibilityChangeListener&&(document.removeEventListener("visibilitychange",this.visibilityChangeListener),this.visibilityChangeListener=null),this.spaUnsubscribe&&(this.spaUnsubscribe(),this.spaUnsubscribe=null),this.bfcacheUnsubscribe&&(this.bfcacheUnsubscribe(),this.bfcacheUnsubscribe=null),this.reset(),this.isInitialized=!1)}static getState(){return{...this.state}}static getIsInitialized(){return this.isInitialized}};le.state={hasLeft:!1,leaveEventSentAt:null,currentSessionId:"",lastUrl:typeof window!="undefined"?window.location.href:"",isRestoredFromCache:!1,eventsFired:new Set},le.config={hiddenPageTimeout:3e4,enableSPATracking:!1,enableVisibilityTracking:!0,trackHashChanges:!1},le.isInitialized=!1,le.currentExitReason=null,le.beforeUnloadListener=null,le.pageHideListener=null,le.visibilityChangeListener=null,le.spaUnsubscribe=null,le.bfcacheUnsubscribe=null});function Ye(){return typeof performance!="undefined"&&performance.now?performance.now():(Dc||(Dc=!0),Date.now())}var Dc,I,Eo=p(()=>{"use strict";fn();qe();bi();Dc=!1;I=class{static initialize(){if(this.isInitialized||typeof window=="undefined")return;this.state.pageStartTime=Ye(),this.state.lastActiveTime=Ye(),D.getState().isVisible||(this.state.isActive=!1),this.setupActivityListeners(),this.setupScrollDepthTracking(),this.setupActiveTimeTracking(),this.isInitialized=!0}static setupActivityListeners(){this.scrollListener=me(()=>{this.state.hasScrolled=!0},"EngagementMetrics.onScroll"),window.addEventListener("scroll",this.scrollListener,{passive:!0}),this.clickListener=me(()=>{this.state.hasClicked=!0},"EngagementMetrics.onClick"),window.addEventListener("click",this.clickListener,{passive:!0}),this.mousedownListener=me(()=>{this.state.hasClicked=!0},"EngagementMetrics.onMousedown"),window.addEventListener("mousedown",this.mousedownListener,{passive:!0}),this.keydownListener=me(()=>{this.state.hasTyped=!0},"EngagementMetrics.onKeydown"),window.addEventListener("keydown",this.keydownListener,{passive:!0})}static setupScrollDepthTracking(){this.scrollDepthListener=me(()=>{let e=yi();e>this.state.maxScrollDepth&&(this.state.maxScrollDepth=e)},"EngagementMetrics.updateScrollDepth"),window.addEventListener("scroll",this.scrollDepthListener,{passive:!0}),this.scrollDepthListener(new Event("scroll"))}static setupActiveTimeTracking(){let t=me(()=>{this.resumeActiveTimer(),this.state.inactivityTimeout&&clearTimeout(this.state.inactivityTimeout),this.state.inactivityTimeout=setTimeout(()=>{this.pauseActiveTimer()},5e3)},"EngagementMetrics.onUserActivity");["scroll","mousemove","keydown","mousedown","touchstart"].forEach(r=>{let o=t;window.addEventListener(r,o,{passive:!0}),this.activityListeners.push({event:r,listener:o})}),t()}static pauseActiveTimer(){this.state.isActive&&(this.state.accumulatedActiveTime+=Ye()-this.state.lastActiveTime,this.state.isActive=!1)}static resumeActiveTimer(){this.state.isActive||(this.state.lastActiveTime=Ye(),this.state.isActive=!0)}static peekActiveTimeSeconds(){try{return this.isInitialized?this.getActiveTimeSeconds():0}catch{return 0}}static getActiveTimeSeconds(){let e=this.state.accumulatedActiveTime;return this.state.isActive&&(e+=Ye()-this.state.lastActiveTime),Math.round(e/1e3)}static getTotalTimeSeconds(){let e=Ye()-this.state.pageStartTime;return Math.round(e/1e3)}static getScrollDepthPercent(){return this.state.maxScrollDepth}static getTotalHiddenTimeSeconds(){return D.getTotalHiddenTimeSeconds()}static getVisibilityChangesCount(){return this.state.visibilityChangesCount}static isVisible(){return D.getState().isVisible}static calculateIntervalMetrics(e,t,n){let r=Math.max(0,e-this.state.previousActiveTime),o=Math.max(0,t-this.state.previousTotalTime),s=Math.max(0,n-this.state.previousHiddenTime);return{active:r,total:o,hidden:s}}static resetActivitySignals(){this.state.hasScrolled=!1,this.state.hasClicked=!1,this.state.hasTyped=!1}static getSnapshot(){try{this.isInitialized||this.initialize();let e=this.getActiveTimeSeconds(),t=this.getTotalTimeSeconds(),n=this.getScrollDepthPercent(),r=this.getTotalHiddenTimeSeconds(),o=this.getVisibilityChangesCount(),s=this.isVisible(),a=this.calculateIntervalMetrics(e,t,r),l=this.state.hasScrolled,u=this.state.hasClicked,f=this.state.hasTyped,g={time_spent_seconds:e,total_time_seconds:t,scroll_depth_percent:n,total_hidden_time_seconds:r,visibility_changes_count:o,is_visible:s,interval_active_seconds:a.active,interval_total_seconds:a.total,interval_hidden_seconds:a.hidden,has_scrolled:l,has_clicked:u,has_typed:f};return this.state.previousActiveTime=e,this.state.previousTotalTime=t,this.state.previousHiddenTime=r,this.resetActivitySignals(),g}catch(e){throw new Error(`Failed to generate engagement snapshot: ${e instanceof Error?e.message:String(e)}`)}}static incrementVisibilityChanges(){this.state.visibilityChangesCount++}static pause(){this.pauseActiveTimer(),this.state.inactivityTimeout&&(clearTimeout(this.state.inactivityTimeout),this.state.inactivityTimeout=null)}static resume(){this.resumeActiveTimer(),this.state.inactivityTimeout&&clearTimeout(this.state.inactivityTimeout),this.state.inactivityTimeout=setTimeout(()=>{this.pauseActiveTimer()},5e3)}static reset(){this.state.inactivityTimeout&&clearTimeout(this.state.inactivityTimeout);let e=0;try{e=D.getTotalHiddenTimeSeconds()}catch{e=0}this.state={hasScrolled:!1,hasClicked:!1,hasTyped:!1,previousActiveTime:0,previousTotalTime:0,previousHiddenTime:e,visibilityChangesCount:0,accumulatedActiveTime:0,lastActiveTime:Ye(),isActive:!0,inactivityTimeout:null,maxScrollDepth:0,pageStartTime:Ye()},this.isInitialized&&(this.removeActivityListeners(),this.setupActiveTimeTracking())}static removeActivityListeners(){typeof window!="undefined"&&(this.activityListeners.forEac
1h(({event:e,listener:t})=>{window.removeEventListener(e,t)}),this.activityListeners=[])}static cleanup(){typeof window!="undefined"&&(this.state.inactivityTimeout&&(clearTimeout(this.state.inactivityTimeout),this.state.inactivityTimeout=null),this.scrollListener&&(window.removeEventListener("scroll",this.scrollListener),this.scrollListener=null),this.clickListener&&(window.removeEventListener("click",this.clickListener),this.clickListener=null),this.mousedownListener&&(window.removeEventListener("mousedown",this.mousedownListener),this.mousedownListener=null),this.keydownListener&&(window.removeEventListener("keydown",this.keydownListener),this.keydownListener=null),this.scrollDepthListener&&(window.removeEventListener("scroll",this.scrollDepthListener),this.scrollDepthListener=null),this.removeActivityListeners(),this.isInitialized=!1)}};I.isInitialized=!1,I.state={hasScrolled:!1,hasClicked:!1,hasTyped:!1,previousActiveTime:0,previousTotalTime:0,previousHiddenTime:0,visibilityChangesCount:0,accumulatedActiveTime:0,lastActiveTime:0,isActive:!0,inactivityTimeout:null,maxScrollDepth:0,pageStartTime:0},I.scrollListener=null,I.clickListener=null,I.mousedownListener=null,I.keydownListener=null,I.activityListeners=[],I.scrollDepthListener=null});function Nc(){return typeof performance!="undefined"&&performance.now?performance.now():(Mc||(Mc=!0),Date.now())}var Mc,K,wo=p(()=>{"use strict";zt();Mc=!1;K=class{static generateNewSession(){return this.currentPageSessionId=Ue(),this.pageLoadTime=Math.floor(Date.now()/1e3),this.elapsedBaseline=Nc(),this.currentPageSessionId}static getCurrentPageSessionId(){return this.currentPageSessionId?this.currentPageSessionId:this.generateNewSession()}static getPageLoadTimeEpoc(){return this.pageLoadTime}static getTimeSincePageLoad(){if(this.pageLoadTime===0)return 0;let e=Nc()-this.elapsedBaseline;return Math.max(0,Math.floor(e/1e3))}static reset(){this.currentPageSessionId=null,this.pageLoadTime=0,this.elapsedBaseline=0}};K.currentPageSessionId=null,K.pageLoadTime=0,K.elapsedBaseline=0});var M,Oc=p(()=>{"use strict";Eo();wo();pe();rt();Jn();M=class{static initialize(e){this.isInitialized||typeof window!="undefined"&&(this.config=this.validateConfig(e||{}),this.isInitialized=!0)}static validateConfig(e){let t={enabled:e.enabled!==void 0?e.enabled:!0,firstPingDelaySeconds:2,pingIntervalSeconds:15,minEngagementThreshold:2,sendOnVisibilityChange:e.sendOnVisibilityChange!==void 0?e.sendOnVisibilityChange:!0,minActiveTimeForVisibilityPing:e.minActiveTimeForVisibilityPing!==void 0?e.minActiveTimeForVisibilityPing:3,visibilityDebounceMs:e.visibilityDebounceMs!==void 0?e.visibilityDebounceMs:1e3,sendClosingPing:e.sendClosingPing!==void 0?e.sendClosingPing:!0,minActiveTimeForClosingPing:e.minActiveTimeForClosingPing!==void 0?e.minActiveTimeForClosingPing:2,pingDecaySchedule:Array.isArray(e.pingDecaySchedule)?e.pingDecaySchedule:[],pingSamplingRate:e.pingSamplingRate!==void 0&&Number.isFinite(e.pingSamplingRate)&&e.pingSamplingRate>=0&&e.pingSamplingRate<=1?e.pingSamplingRate:1};return e.firstPingDelaySeconds!==void 0&&(e.firstPingDelaySeconds<2||e.firstPingDelaySeconds>60?t.firstPingDelaySeconds=2:t.firstPingDelaySeconds=e.firstPingDelaySeconds),e.pingIntervalSeconds!==void 0&&(e.pingIntervalSeconds<5||e.pingIntervalSeconds>60?t.pingIntervalSeconds=15:t.pingIntervalSeconds=e.pingIntervalSeconds),e.minEngagementThreshold!==void 0&&(e.minEngagementThreshold<0||e.minEngagementThreshold>60?t.minEngagementThreshold=2:t.minEngagementThreshold=e.minEngagementThreshold),e.minActiveTimeForClosingPing!==void 0&&(e.minActiveTimeForClosingPing<0||e.minActiveTimeForClosingPing>60?t.minActiveTimeForClosingPing=2:t.minActiveTimeForClosingPing=e.minActiveTimeForClosingPing),t}static start(){if(!this.isInitialized||!this.config.enabled||this.state.isRunning||(this.state.sampledOut=this.config.pingSamplingRate<1&&Math.random()>=this.config.pingSamplingRate,this.state.sampledOut))return;this.state.isRunning=!0;let e=this.config.firstPingDelaySeconds*1e3;this.state.firstPingTimerId=setTimeout(()=>{this.sendFirstPing().catch(t=>{})},e)}static async sendFirstPing(){try{if(this.state.pageLeaveInitiated){this.startRegularInterval();return}I.peekActiveTimeSeconds()>=this.config.minEngagementThreshold&&(await this.sendPing("timer"),this.state.firstPingSent=!0),this.startRegularInterval()}catch{this.startRegularInterval()}}static currentIntervalSeconds(){let e=this.config.pingDecaySchedule,t=this.config.pingIntervalSeconds;if(e&&e.length>0){let n=K.getTimeSincePageLoad();for(let r of e)if(n>=r.afterSeconds)t=r.intervalSeconds;else break}return t}static startRegularInterval(){this.state.isRunning&&(this.state.timerId&&(clearTimeout(this.state.timerId),this.state.timerId=null),this.scheduleNextPing(),this.state.lastPingTime=Date.now())}static scheduleNextPing(){if(!this.state.isRunning)return;let e=this.currentIntervalSeconds()*1e3;this.state.timerId=setTimeout(()=>{if(this.state.pageLeaveInitiated){this.scheduleNextPing();return}this.sendPing("timer").catch(t=>{}).finally(()=>{this.scheduleNextPing()})},e)}static stop(){this.state.isRunning&&(this.state.firstPingTimerId&&(clearTimeout(this.state.firstPingTimerId),this.state.firstPingTimerId=null),this.state.timerId&&(clearTimeout(this.state.timerId),this.state.timerId=null),this.state.isRunning=!1)}static pause(){this.state.isRunning&&(this.state.firstPingTimerId&&(clearTimeout(this.state.firstPingTimerId),this.state.firstPingTimerId=null),this.state.timerId&&(clearTimeout(this.state.timerId),this.state.timerId=null))}static resume(){if(!(!this.isInitialized||!this.config.enabled)&&this.state.isRunning)if(this.state.firstPingTimerId&&(clearTimeout(this.state.firstPingTimerId),this.state.firstPingTimerId=null),this.state.timerId&&(clearTimeout(this.state.timerId),this.state.timerId=null),this.state.firstPingSent)this.scheduleNextPing();else{let e=this.config.firstPingDelaySeconds*1e3;this.state.firstPingTimerId=setTimeout(()=>{this.sendFirstPing().catch(t=>{})},e)}}static handleVisibilityChange(){!this.isInitialized||!this.config.enabled||this.state.pageLeaveInitiated||this.state.sampledOut||this.config.sendOnVisibilityChange&&this.shouldSe
1ndVisibilityPing()&&(this.state.lastVisibilityChangeTime=Date.now(),this.sendPing("visibility_change").catch(e=>{}))}static shouldSendVisibilityPing(){return!(Date.now()-this.state.lastVisibilityChangeTime<this.config.visibilityDebounceMs||I.peekActiveTimeSeconds()<this.config.minActiveTimeForVisibilityPing)}static async sendPing(e){try{if(this.state.pageLeaveInitiated&&e!=="page_leave")return;e!=="page_leave"&&this.state.pingSequence++;let t;try{t=I.getSnapshot()}catch{t={time_spent_seconds:0,total_time_seconds:0,scroll_depth_percent:0,total_hidden_time_seconds:0,visibility_changes_count:0,is_visible:!0,interval_active_seconds:0,interval_total_seconds:0,interval_hidden_seconds:0,has_scrolled:!1,has_clicked:!1,has_typed:!1}}(t.interval_active_seconds>0||t.has_scrolled||t.has_clicked||t.has_typed)&&Ke.touchSession();let n,r,o;try{n=K.getCurrentPageSessionId(),r=K.getPageLoadTimeEpoc(),o=K.getTimeSincePageLoad()}catch{return}let s={page_session_id:n,ping_sequence:this.state.pingSequence,ping_type:e,ping_interval_seconds:this.currentIntervalSeconds(),ping_sample_rate:this.config.pingSamplingRate,time_spent_seconds:t.time_spent_seconds,total_time_seconds:t.total_time_seconds,scroll_depth_percent:t.scroll_depth_percent,total_hidden_time_seconds:t.total_hidden_time_seconds,interval_active_seconds:t.interval_active_seconds,interval_total_seconds:t.interval_total_seconds,interval_hidden_seconds:t.interval_hidden_seconds,is_visible:t.is_visible,visibility_changes_count:t.visibility_changes_count,has_scrolled:t.has_scrolled,has_clicked:t.has_clicked,has_typed:t.has_typed,page_load_time_epoc:r,time_since_page_load_seconds:o},a;try{a=await V.createEvent("engagement_ping",s)}catch{return}if(!a.success)return;let l=a.value;if(l===null)return;let u;try{u=await fe.send("/event",l)}catch{return}if(!u.success)return;this.state.lastPingTime=Date.now()}catch{}}static reset(){this.stop(),this.state={pingSequence:0,isRunning:!1,timerId:null,firstPingTimerId:null,lastVisibilityChangeTime:0,lastPingTime:0,firstPingSent:!1,pageLeaveInitiated:!1,sampledOut:!1}}static cleanup(){this.stop(),this.isInitialized=!1}static getPingSequence(){return this.state.pingSequence}static getConfig(){return{...this.config}}static isTrackerInitialized(){return this.isInitialized}static isTrackerRunning(){return this.state.isRunning}static async sendClosingPing(){if(!(!this.isInitialized||!this.config.enabled)&&(this.state.pageLeaveInitiated=!0,!this.state.sampledOut&&this.config.sendClosingPing&&this.shouldSendClosingPing()))try{await this.sendPing("page_leave")}catch{}}static shouldSendClosingPing(){try{return!(I.peekActiveTimeSeconds()<this.config.minActiveTimeForClosingPing)}catch{return!1}}};M.state={pingSequence:0,isRunning:!1,timerId:null,firstPingTimerId:null,lastVisibilityChangeTime:0,lastPingTime:0,firstPingSent:!1,pageLeaveInitiated:!1,sampledOut:!1},M.config={enabled:!0,firstPingDelaySeconds:2,pingIntervalSeconds:15,minEngagementThreshold:2,sendOnVisibilityChange:!0,minActiveTimeForVisibilityPing:3,visibilityDebounceMs:1e3,sendClosingPing:!0,minActiveTimeForClosingPing:2,pingDecaySchedule:[],pingSamplingRate:1},M.isInitialized=!1});var Uc={};O(Uc,{HeartbeatPingCoordinator:()=>ve});var ve,Fc=p(()=>{"use strict";Oc();Eo();wo();ki();Ti();fn();qe();ve=class{static initialize(e){if(this.isInitialized||typeof window=="undefined"||(this.config=this.validateConfig(e||{}),!this.config.enabled))return;K.generateNewSession(),I.initialize();let t={enabled:this.config.enabled,pingIntervalSeconds:this.config.pingIntervalSeconds,sendOnVisibilityChange:this.config.sendOnVisibilityChange,minActiveTimeForVisibilityPing:this.config.minActiveTimeForVisibilityPing,visibilityDebounceMs:this.config.visibilityDebounceMs,pingDecaySchedule:this.config.pingDecaySchedule,pingSamplingRate:this.config.pingSamplingRate};M.initialize(t),this.setupEventListeners(),this.config.enableSPATracking&&this.setupSPATracking(),this.isInitialized=!0}static validateConfig(e){return{enabled:e.enabled!==void 0?e.enabled:!0,pingIntervalSeconds:e.pingIntervalSeconds!==void 0?e.pingIntervalSeconds:15,sendOnVisibilityChange:e.sendOnVisibilityChange!==void 0?e.sendOnVisibilityChange:!0,minActiveTimeForVisibilityPing:e.minActiveTimeForVisibilityPing!==void 0?e.minActiveTimeForVisibilityPing:3,visibilityDebounceMs:e.visibilityDebounceMs!==void 0?e.visibilityDebounceMs:1e3,enableSPATracking:e.enableSPATracking!==void 0?e.enableSPATracking:!1,pingDecaySchedule:Array.isArray(e.pingDecaySchedule)?e.pingDecaySchedule:[],pingSamplingRate:e.pingSamplingRate!==void 0?e.pingSamplingRate:1}}static setupEventListeners(){this.visibilityChangeListener=re(e=>{this.handleVisibilityChange()},"HeartbeatPingCoordinator.visibilitychange"),document.addEventListener("visibilitychange",this.visibilityChangeListener),this.bfcacheUnsubscribe=he.subscribe(()=>{this.handleBfcacheRestore()}),this.beforeUnloadListener=re(e=>{this.handlePageLeave()},"HeartbeatPingCoordinator.beforeunload"),window.addEventListener("beforeunload",this.beforeUnloadListener),this.pageHideListener=re(e=>{this.handlePageLeave()},"HeartbeatPingCoordinator.pagehide"),window.addEventListener("pagehide",this.pageHideListener)}static setupSPATracking(){this.spaUnsubscribe=ee.subscribe(e=>{this.handleSPANavigation(e)},{trackHashChanges:!1})}static handleVisibilityChange(){D.handleVisibilityChange(),I.incrementVisibilityChanges(),document.visibilityState==="hidden"?(I.pause(),M.handleVisibilityChange(),M.pause()):(I.resume(),M.resume())}static handleBfcacheRestore(){this.resetForBfcache()}static handleSPANavigation(e){this.resetForNavigation()}static handlePageLeave(){this.pageLeaveTriggered||(this.pageLeaveTriggered=!0,M.sendClosingPing().catch(e=>{}),M.stop())}static start(){this.isInitialized&&this.config.enabled&&M.start()}static stop(){this.isInitialized&&M.stop()}static resetForNavigation(){M.stop(),K.reset(),K.generateNewSession(),I.reset(),M.reset(),M.start()}static resetForBfcache(){K.reset(),K.generateNewSession(),I.reset(),M.reset(),this.pageLeaveTriggered=!1,M.start()}static cleanup(){this.isInitialized&&(this.visibilityChangeListener&&(document.removeEventListener("visibilitychange",this.visibilityChangeListener),this.visibilityChangeListener=null),this.beforeUnloadListener&&(window.removeEventListener("beforeunload",this.beforeUnloadListener),this.beforeUnloadListener=null),this.pageHideListener&&(window.removeEventListener("pagehide",this.pageHideListener),this.pageHideListener=null),this.spaUnsubscribe&&(this.spaUnsubscribe(),this.spaUnsubscribe=null),this.bfcacheUnsubscribe&&(this.bfcacheUnsubscribe(),this.bfcacheUnsubscribe=null),M.cleanup(),I.cleanup(),K.reset(),this.isInitialized=!1,this.pageLeaveTriggered=!1)}static isEnabled(){return this.isInitialized&&this.config.enabled}static getConfig(){return{...this.config}}};ve.config={enabled:!0,pingIntervalSeconds:15,sendOnVisibilityChange:!0,minActiveTimeForVisibilityPing:3,visibilityDebounceMs:1e3,enableSPATracking:!1,pingDecaySchedule:[],pingSamplingRate:1},ve.isInitialized=!1,ve.visibilityChangeListener=null,ve.beforeUnloadListener=null,ve.pageHideListener=null,ve.pageLeaveTriggered=!1,ve.spaUnsubscribe=null,ve.bfcacheUnsubscribe=null});var pn,Bc=p(()=>{"use strict";m();pn=class{static extract(e){return c(()=>
1{if(typeof window=="undefined"||!window.location)return null;let n=new URL(window.location.href).searchParams.get(e);return n&&n.length>0?n:null},null)}static stripFromURL(e){c(()=>{if(typeof window=="undefined"||!window.history||!window.location)return;let t=new URL(window.location.href);if(!t.searchParams.has(e))return;t.searchParams.delete(e);let n=t.pathname+(t.search?t.search:"")+(t.hash?t.hash:"");window.history.replaceState(window.history.state,"",n)},void 0)}}});function tp(){h.set(Ri,"true")}function Vc(){h.remove(Ri)}var Ri,Me,Hc=p(()=>{"use strict";B();Ri="naviga_ab_admin";Me=class{static onUnauthorised(){Vc()}static clearAdminFlag(){Vc()}static markAdminFlagFromCookie(){tp()}}});function gn(i){if(!i)return null;let e=i.split(".");if(e.length!==3)return null;try{let t=decodeURIComponent(atob(e[1].replace(/-/g,"+").replace(/_/g,"/")).split("").map(s=>"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)).join("")),n=JSON.parse(t),r=typeof n.exp=="number"?n.exp:void 0,o=Array.isArray(n.permissions)?n.permissions:void 0;return{exp:r,permissions:o}}catch{return null}}function Kc(i){let e=gn(i);if(!(e!=null&&e.permissions))return!1;let t=e.permissions.find(n=>(n==null?void 0:n.id)===4);return(t==null?void 0:t.write)===!0}var zc=p(()=>{"use strict"});var ct,mn,jc=p(()=>{"use strict";Xt();Je();w();B();ct="/ab",mn=class{static async get(e,t){return G.get(ct+e,this.buildHeaders(t),"bff")}static async post(e,t,n){return G.post(ct+e,t,this.buildHeaders(n),"bff")}static async patchExperiment(e,t,n){let r=d.get(),o={org_name:r.organisation_name,publication_name:r.publication_name,...t},s=await G.patch(`${ct}/experiments/${encodeURIComponent(e)}`,o,this.buildHeaders(n),"bff");if(!s.success)return s;let a=s.value;if(wt(a)){let l=this.unwrapEnvelope(a);return N({experiment:l==null?void 0:l.experiment})}return N(a)}static async getExperiments(){let e=this.buildOrgPubQueryString(),t=await G.get(`${ct}/experiments${e}`,this.publicHeaders());return this.normalizeExperimentsResult(t)}static async getTests(){let e=this.buildOrgPubQueryString(),t=await G.get(`${ct}/test${e}`,this.publicHeaders());return this.normalizeExperimentsResult(t)}static async getExperimentMetrics(e,t){var s;let n=this.buildOrgPubQueryString(),r=await G.get(`${ct}/experiments/${encodeURIComponent(e)}/metrics${n}`,this.buildHeaders(t),"bff");if(!r.success)return r;let o=r.value;if(wt(o)){let a=this.unwrapEnvelope(o);return N((s=a==null?void 0:a.metrics)!=null?s:{})}return N(o)}static async getConcludedExperiments(e){let t=this.buildOrgPubQueryString(),n=await G.get(`${ct}/experiments${t}&status=concluded`,this.buildHeaders(e),"bff");return this.normalizeExperimentsResult(n)}static normalizeExperimentsResult(e){if(!e.success)return e;let t=e.value,n=this.unwrapEnvelope(t),r=[];return wt(t)?Array.isArray(n==null?void 0:n.experiments)?r=n.experiments:Array.isArray(n==null?void 0:n.records)&&(r=n.records):Array.isArray(n==null?void 0:n.experiments)&&(r=n.experiments),N({experiments:r})}static unwrapEnvelope(e){return wt(e)?e.response:e}static buildOrgPubQueryString(){let e=d.getValue("organisation_name"),t=d.getValue("publication_name");return`?org_name=${encodeURIComponent(e||"")}&publication_name=${encodeURIComponent(t||"")}`}static publicHeaders(){}static buildHeaders(e){let t=d.getABConfig().cookieName||"naviga_ab_session",n=e||h.get(t);if(n)return{Authorization:`Bearer ${n}`}}}});var ip,Qe,So=p(()=>{"use strict";m();T();w();jc();Wt();ip=15e3,Qe=class{static async loadActive(){return b(async()=>{var s,a;let t=((s=d.getABConfig().experimentTTLSeconds)!=null?s:60)*1e3,n=Date.now();if(this.cache&&n-this.cache.at<t)return this.cache.experiments;if(this.failure&&n-this.failure.at<ip)throw new Error(this.failure.message);let[r]=await Promise.all([mn.getExperiments()]);if(!r.success)throw this.failure={at:n,message:r.error.message},new Error(r.error.message);let o=Array.isArray((a=r.value)==null?void 0:a.experiments)?r.value.experiments:[];return this.cache={at:n,experiments:o},this.failure=null,o},{message:"Failed to load experiments",severity:"medium",source:"ExperimentLoader.loadActive"})}
1static invalidate(){this.cache=null,this.failure=null}static async loadConcluded(){return b(async()=>{var n;let e=await mn.getConcludedExperiments();if(!e.success)throw new Error(e.error.message);return Array.isArray((n=e.value)==null?void 0:n.experiments)?e.value.experiments:[]},{message:"Failed to load concluded experiments",severity:"low",source:"ExperimentLoader.loadConcluded"})}};Qe.cache=null,Qe.failure=null});var xi,Gc=p(()=>{"use strict";m();w();xi=class{static match(e){return c(()=>{var l,u;if(typeof document=="undefined"||!e||e.length===0)return[];let t=typeof window!="undefined"?window.location.pathname:"/",n=d.getABConfig().headlineSelectors||["h1","h2","h3"],o=[...e.filter(f=>this.isWithinSchedule(f))].sort((f,g)=>{var x,k;let v=(x=f.priority)!=null?x:0,y=(k=g.priority)!=null?k:0;if(y!==v)return y-v;let _=Date.parse(f.updatedAt||"")||0;return(Date.parse(g.updatedAt||"")||0)-_}),s=new WeakSet,a=[];for(let f of o){if(!f.target)continue;let g=[],v="path",y=((u=(l=f.variants)==null?void 0:l[0])==null?void 0:u.name)||"";if(f.target.type==="selector")g=this.querySelectorAll(f.target.value),v="selector";else if(f.target.type==="path"){if(!this.pathMatches(t,f.target.value))continue;let C=f.target.elementSelector||n.join(", ");g=this.queryAndFilterByText(C,y),v="path"}else if(f.target.type==="headline"){let C=f.target.elementSelector||n.join(", ");g=this.queryAndFilterByText(C,f.target.value),v="headline"}if(g.length===0)continue;let _=g.filter(C=>!s.has(C));_.length!==0&&(_.forEach(C=>s.add(C)),a.push({experiment:f,elements:_,matchedBy:v}))}return a},[])}static isWithinSchedule(e){return c(()=>{let t=Date.now();if(e.startAt){let n=Date.parse(e.startAt);if(!isNaN(n)&&n>t)return!1}if(e.endAt){let n=Date.parse(e.endAt);if(!isNaN(n)&&n<t)return!1}return!0},!0)}static querySelectorAll(e){return c(()=>{let t=document.querySelectorAll(e),n=[];return t.forEach(r=>{r instanceof HTMLElement&&n.push(r)}),n},[])}static queryAndFilterByText(e,t){let n=this.querySelectorAll(e);return t?n.filter(r=>this.isSimilar(r.textContent||"",t)):n}static pathMatches(e,t){return t==="*"||t==="/*"?!0:t.endsWith("*")?e.startsWith(t.slice(0,-1)):e===t}static isSimilar(e,t){let n=g=>g.toLowerCase().replace(/[^\p{L}\p{N}\s]/gu," ").replace(/\s+/g," ").trim(),r=n(e),o=n(t);if(!r||!o)return!1;if(r===o)return!0;let s=r.split(" "),a=o.split(" "),l=(g,v)=>v.length>=3&&g.length>=15;if(r.includes(o)&&l(o,a)||o.includes(r)&&l(r,s))return!0;if(s.length<3||a.length<3)return!1;let u=new Set(s);return a.filter(g=>u.has(g)).length/Math.max(u.size,a.length)>=.7}}});function op(i,e=0){let t=3735928559^e,n=1103547991^e;for(let r=0;r<i.length;r++){let o=i.charCodeAt(r);t=Math.imul(t^o,2654435761),n=Math.imul(n^o,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}function sp(i){return op(i)/9007199254740992}var Pi,qc=p(()=>{"use strict";m();w();B();Wt();Nn();Pi=class{static assign(e){var g;let t=e.variants||[];if(t.length===0)return{variantKey:"",source:"pinned"};if(e.activeVariant!=="RANDOM"){let v=t.find(y=>y.key===e.activeVariant);if(v)return{variantKey:v.key,source:"pinned"}}let n=d.getABConfig(),o=(n.variantCookiePrefix||"naviga_ab_variant_")+e.id,s=h.get(o);if(s&&t.some(v=>v.key===s))return{variantKey:s,source:"random-cookie"};let a=Be.getCurrentDeviceId(),l=this.rollByWeight(t,a?`${a}:${e.id}`:null),f=(n.stickinessMode||vs)==="persistent"?(g=n.variantCookieDays)!=null?g:30:0;return h.set(o,l,{days:f}),{variantKey:l,source:"random-assigned"}}static rollByWeight(e,t){var n;return c(()=>{let r=e.map(u=>typeof u.weight=="number"&&u.weight>0?u.weight:u.weight===void 0?1:0),o=r.reduce((u,f)=>u+f,0),s=t!=null?sp(t):Math.random();if(o<=0){let u=Math.floor(s*e.length);return e[Math.min(u,e.length-1)].key}let a=s*o,l=0;for(let u=0;u<e.length;u++)if(l+=r[u],a<l)return e[u].key;return e[e.length-1].key},((n=e[0])==null?void 0:n.key)||"")}}});var Wc,$c=p(()=>{"use strict";Wc="#abt-selection-hud, #abt-hud-launcher, #abt-headline-styles, .abt-headline-badge, .abt-modal-overlay, .abt-stats-pin, .abt-stats-card"});function Yc(i){return i.matches(Wc)}function ap(i){return Array.from(i.children).filter(e=>!Yc(e))}function hn(i){let e="";
1return i.childNodes.forEach(t=>{if(t.nodeType===Node.TEXT_NODE){e+=t.textContent||"";return}if(t.nodeType!==Node.ELEMENT_NODE)return;let n=t;Yc(n)||(e+=hn(n))}),e}function cp(i){let e=i;for(let t=0;t<10;t++){let n=hn(e).trim(),r=ap(e);if(r.length!==1||n.length===0)return e;let o=r[0];if(hn(o).trim()!==n)return e;e=o}return e}function Ii(i,e){let t=cp(i),n=!1;for(let r of Array.from(t.childNodes))r.nodeType===Node.TEXT_NODE&&(!n&&(r.textContent||"").trim().length>0?(r.textContent=e,n=!0):r.textContent="");n||t.insertBefore(document.createTextNode(e),t.firstChild)}var Qc=p(()=>{"use strict";$c()});var Ao,Li,Xc=p(()=>{"use strict";m();Qc();Ao="navigaAbExperimentId",Li=class{static apply(e,t,n){let r=e.variants||[],o=r[0],s=r.find(f=>f.key===n)||o,a=!!s&&!!o&&s.key===o.key,l=(o==null?void 0:o.name)||(t[0]?hn(t[0]).trim():""),u=(s==null?void 0:s.name)||l;for(let f of t)c(()=>{f.dataset.navigaAbOriginal||(f.dataset.navigaAbOriginal=l),f.dataset.navigaAbExperimentId=e.id,f.dataset.navigaAbVariant=n,f.dataset.navigaAbVariantText=u,!a&&typeof u=="string"&&u.length>0&&Ii(f,u)},void 0);return{variantTitle:u,originalTitle:l}}static restoreAllOriginals(){typeof document!="undefined"&&c(()=>{document.querySelectorAll("[data-naviga-ab-original]").forEach(t=>{if(t instanceof HTMLElement){let n=t.dataset.navigaAbOriginal;n&&Ii(t,n)}})},void 0)}static reapplyAllVariants(){typeof document!="undefined"&&c(()=>{document.querySelectorAll("[data-naviga-ab-variant-text]").forEach(t=>{if(t instanceof HTMLElement){let n=t.dataset.navigaAbVariantText,r=t.dataset.navigaAbVariant;r&&r!=="control"&&n&&Ii(t,n)}})},void 0)}}});function Mi(i){if(!i)return"";try{let e=new URL(i),t=e.protocol.toLowerCase(),n=e.hostname.toLowerCase(),r=e.port;(t==="http:"&&r==="80"||t==="https:"&&r==="443")&&(r="");let o=e.pathname||"/";o.length>1&&o.endsWith("/")&&(o=o.slice(0,-1));let s=r?`:${r}`:"";return`${t}//${n}${s}${o}`}catch{return i}}function ko(){return c(()=>{let i=h.get(Di);if(!i)return[];let e=JSON.parse(i);return Array.isArray(e)?e.filter(lp):[]},[])}function To(i){c(()=>{if(i.length===0){h.remove(Di);return}h.set(Di,JSON.stringify(i))},void 0)}function lp(i){return!!i&&typeof i.experimentId=="string"&&typeof i.variantKey=="string"&&typeof i.clickId=="string"&&typeof i.clickAt=="number"&&typeof i.targetHref=="string"&&typeof i.qualityActiveSeconds=="number"}var Di,Jc,xt,Ro=p(()=>{"use strict";m();B();Di="naviga_ab_qualified_click_queue",Jc=24*60*60*1e3;xt=class{static enqueue(e){c(()=>{let t={...e,targetHref:Mi(e.targetHref)},n=this.purgeStale(Jc,ko());n.push(t),To(n)},void 0)}static dequeueMatching(e){return c(()=>{let t=Mi(e);if(!t)return[];let n=this.purgeStale(Jc,ko()),r=[],o=[];for(let s of n)s.targetHref===t?r.push(s):o.push(s);return To(o),r},[])}static purgeStale(e,t){return c(()=>{let n=t!=null?t:ko(),r=Date.now()-e,o=n.filter(s=>s.clickAt>=r);return t||To(o),o},t!=null?t:[])}static __clearForTests(){h.remove(Di)}}});var ye,Ni=p(()=>{"use strict";m();T();pe();Ie();rt();Wt();Ro();ye=class i{static async trackView(e){e.source!=="preview"&&await b(async()=>{let t={experiment_id:e.experiment.id,experiment_name:e.experiment.name,variant:e.variantKey,is_control:String(this.isControl(e)),variant_source:e.source,variant_title:e.variantTitle,original_title:e.originalTitle,target_selector:this.elementSelector(e.match.elements[0]),target_url:this.currentUrl(),target_type:e.match.matchedBy},n=await V.createEvent(jt,t);if(!n.success)throw new Error("Failed to create ab_experiment_view event");if(n.value===null)return;(await ae.send(n.value)).success},{message:"Failed to track ab_experiment_view",severity:"medium",source:"ABEventTracker.trackView",eventName:jt})}static async trackClick(e,t,n){e.source!=="preview"&&await b(async()=>{var u,f;let r=t instanceof HTMLAnchorElement?t.href:(u=t.closest("a"))==null?void 0:u.href,o=i.makeClickId();r&&xt.enqueue({experimentId:e.experiment.id,experimentName:e.experiment.name,variantKey:e.variantKey,isControl:this.isControl(e),clickId:o,clickAt:Date.now(),targetHref:Mi(r),qualityActiveSeconds:(f=e.experiment.qualityActiveSeconds)!=null?f:15});let s={experiment_id:e.experiment.id,experiment_name:e.experiment.name,variant:e.variantKey,is_control:String(this.isControl(e)),variant_title:e.variantTitle,original_title:e.originalTitle,target_selector:this.elementSelector(t),target_url:this.currentUrl(),click_target_tag:t.tagName,click_target_href:r||null,click_position:{x:n.clientX,y:n.clientY},click_id:o,time_since_view_ms:Math.max(0,Date.now()-e.viewedAt)},a=await V.createEvent(Gt,s);if(!a.success)throw new Error("Failed to create ab_experiment_click event");
1if(a.value===null)return;let l=await fe.send("/event",a.value);!l.success||l.value.success},{message:"Failed to track ab_experiment_click",severity:"low",source:"ABEventTracker.trackClick",eventName:Gt})}static async trackQualifiedClick(e){await b(async()=>{let t={experiment_id:e.experimentId,experiment_name:e.experimentName,variant:e.variantKey,is_control:e.isControl,click_id:e.clickId,original_click_at:Math.floor(e.originalClickAt/1e3),qualified_at:Math.floor(e.qualifiedAt/1e3),active_seconds_observed:e.activeSecondsObserved,target_url:this.currentUrl()},n=await V.createEvent(qt,t);if(!n.success)throw new Error("Failed to create ab_experiment_qualified_click event");if(n.value===null)return;(await ae.send(n.value)).success},{message:"Failed to track ab_experiment_qualified_click",severity:"low",source:"ABEventTracker.trackQualifiedClick",eventName:qt})}static makeClickId(){try{let t=globalThis.crypto;if(t&&typeof t.randomUUID=="function")return t.randomUUID()}catch{}let e=()=>Math.floor(Math.random()*4294967295).toString(16).padStart(8,"0");return`${e()}${e()}-${e()}-${e()}`}static isControl(e){var n,r;let t=(r=(n=e.experiment.variants)==null?void 0:n[0])==null?void 0:r.key;return!!t&&t===e.variantKey}static elementSelector(e){if(!e)return"";let t=e.id?`#${e.id}`:"",n=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).join("."):"";return`${e.tagName.toLowerCase()}${t}${n}`}static currentUrl(){try{return window.location.href}catch{return""}}}});var Oi,Zc=p(()=>{"use strict";m();w();Ni();Oi=class{static track(e){c(()=>{let t=d.getABConfig().exposureGating!==!1,n=typeof window!="undefined"&&typeof window.IntersectionObserver!="undefined";if(!t||!n){ye.trackView(e);return}let r=e.match.elements[0];if(!r){ye.trackView(e);return}if(this.isMostlyVisible(r)){ye.trackView(e);return}let o=new IntersectionObserver(s=>{for(let a of s)if(a.isIntersecting&&a.intersectionRatio>=.5){ye.trackView(e),o.disconnect();return}},{threshold:.5});o.observe(r)},void 0)}static isMostlyVisible(e){try{let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight||0,r=window.innerWidth||document.documentElement.clientWidth||0;if(t.width===0||t.height===0)return!1;let o=Math.max(0,Math.min(t.bottom,n)-Math.max(t.top,0)),s=Math.max(0,Math.min(t.right,r)-Math.max(t.left,0)),a=o*s,l=t.width*t.height;return a/l>=.5}catch{return!1}}}});var el,Ui,tl=p(()=>{"use strict";m();B();el="naviga_visitor_seen",Ui=class{static classify(){return c(()=>h.get(el)?"returning":(h.set(el,new Date().toISOString()),"new"),"returning")}}});var Pt,nl=p(()=>{"use strict";Yt();tl();Pt=class{static async matches(e){if(!e)return!0;if(e.devices&&e.devices.length>0){let t=await this.getDeviceType();if(!t||!e.devices.includes(t))return!1}return!(e.visitorType&&this.getVisitorType()!==e.visitorType||e.urlPattern&&!this.urlMatches(e.urlPattern))}static async getDeviceType(){if(this.cachedDeviceType)return this.cachedDeviceType;try{let e=await de.getPlatformInfo();if(!e.success)return null;let t=e.value.type;return t==="mobile"||t==="tablet"||t==="desktop"?(this.cachedDeviceType=t,t):null}catch{return null}}static getVisitorType(){return this.cachedVisitorType?this.cachedVisitorType:(this.cachedVisitorType=Ui.classify(),this.cachedVisitorType)}static urlMatches(e){if(typeof window=="undefined")return!1;try{return new RegExp(e).test(window.location.pathname||"")}catch{return!1}}};Pt.cachedDeviceType=null,Pt.cachedVisitorType=null});var Fi,il=p(()=>{"use strict";m();w();Fi=class{static read(){return c(()=>{if(typeof window=="undefined")return new Map;let e=d.getABConfig().previewQueryParam||"naviga_ab_preview",t=window.location.search||"";if(!t)return new Map;let r=new URLSearchParams(t).get(e);return r?this.parse(r):new Map},new Map)}static parse(e){let t=new Map;if(!e||typeof e!="string")return t;let n=e.split(",");for(let r of n){let o=r.trim();if(!o)continue;let s=o.indexOf(":");if(s<=0||s===o.length-1)continue;let a=o.slice(0,s).trim(),l=o.slice(s+1).trim();!a||!l||t.set(a,l)}return t}}});var It,rl=p(()=>{"use strict";m();yo();Ni();Ro();It=class{static start(){this.started||c(()=>{this.started=!0;let e=this.getCurrentUrl();if(!e)return;let t=xt.dequeueMatching(e);if(t.length!==0)for(let n of t)this.armSubscription(n)},void 0)}static armSubscription(e){let t=We.getActiveSecondsSincePageLoad();We.subscribeToThreshold(e.qualityActiveSeconds,()=>{let n=We.getActiveSecondsSincePageLoad()-t;ye.trackQualifiedClick({experimentId:e.experimentId,experimentName:e.experimentName,variantKey:e.variantKey,isControl:e.isControl,clickId:e.clickId,originalClickAt:e.clickAt,qualifiedAt:Date.now(),activeSecondsObserved:n})})}static getCurrentUrl(){try{return typeof window!="undefined"&&window.location?window.location.href:""}catch{return""}}static __resetForTests(){this.started=!1}};It.started=!1});var Xe,ol=p(()=>{"use strict";m();T();So();Gc();qc();Xc();Ni();Zc();nl();il();rl();
1Xe=class{static async runQualifiedClickWatcher(){this.qualifiedClickStarted||(this.qualifiedClickStarted=!0,It.start())}static async run(){this.started||(this.started=!0,typeof document!="undefined"&&document.readyState==="loading"&&await new Promise(e=>{document.addEventListener("DOMContentLoaded",()=>e(),{once:!0})}),await b(async()=>{It.start();let e=await Qe.loadActive();if(!e.success)return;let t=xi.match(e.value);if(t.length===0)return;let n=Fi.read();for(let r of t){if(!await Pt.matches(r.experiment.audience))continue;let s=this.resolveAssignment(r.experiment,n);if(!s.variantKey)continue;let{variantTitle:a,originalTitle:l}=Li.apply(r.experiment,r.elements,s.variantKey),u={experiment:r.experiment,match:r,variantKey:s.variantKey,source:s.source,variantTitle:a,originalTitle:l,viewedAt:Date.now()};this.contexts.set(r.experiment.id,u),await Oi.track(u)}this.attachClickListener()},{message:"Failed to run variant orchestrator",severity:"medium",source:"VariantOrchestrator.run"}))}static resolveAssignment(e,t){let n=t.get(e.id);return n&&e.variants.some(r=>r.key===n)?{variantKey:n,source:"preview"}:Pi.assign(e)}static attachClickListener(){typeof document!="undefined"&&document.addEventListener("click",e=>{let t=e.target;if(!t||!t.closest)return;let n=`[data-${this.kebab(Ao)}]`,r=t.closest(n);if(!r)return;let o=r.dataset[Ao];if(!o)return;let s=this.contexts.get(o);s&&ye.trackClick(s,r,e)},{capture:!0})}static kebab(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}};Xe.started=!1,Xe.qualifiedClickStarted=!1,Xe.contexts=new Map});var sl,al=p(()=>{"use strict";sl="__navigaAbAdminEditor"});function Bi(i,e){z.report({message:`Admin A/B editor failed to load from ${e||"(no url could be resolved)"}: ${i}. Reader-side A/B is unaffected; only the editor is unavailable.`,severity:"medium",source:"AdminEditorLoader.remote",data:{url:e,reason:i,filename:Dn,capturedBase:Us()}})}function ll(){let i=window[sl];return i||null}function xo(){let i=ll();if(i)return Promise.resolve(i);if(lt)return lt;let e=Fs(Dn);return e?(lt=new Promise((t,n)=>{let r=document.createElement("script");r.src=e,r.async=!0;let o=!1,s=l=>{o||(o=!0,window.clearTimeout(a),l())},a=window.setTimeout(()=>{s(()=>{lt=null,Bi(`timed out after ${cl}ms`,e),n(new Error("admin editor load timed out"))})},cl);r.onload=()=>{let l=ll();s(l?()=>t(l):()=>{lt=null,Bi("script loaded but registered no editor global",e),n(new Error("admin editor did not register"))})},r.onerror=()=>{s(()=>{lt=null,Bi("network or CSP error fetching the script",e),n(new Error("admin editor script failed to load"))})},document.head.appendChild(r)}),lt):(Bi(Dn?"no base URL could be resolved (currentScript unavailable and no baked fallback)":"this build has no editor artifact",""),Promise.reject(new Error("admin editor URL could not be resolved")))}var cl,lt,ul=p(()=>{al();pt();T();Mn();kr();cl=1e4,lt=null});var xe,dl=p(()=>{"use strict";m();T();w();B();Bc();Hc();zc();ol();ul();xe=class{static async start(){this.started||(this.started=!0,await b(async()=>{var n;let e=d.getABConfig();if(!e.enabled)return;if(await Xe.runQualifiedClickWatcher(),(n=e.excludedPathPrefixes)!=null&&n.length&&typeof window!="undefined"){let r=window.location.pathname;if(e.excludedPathPrefixes.some(s=>r.startsWith(s)))return}await Xe.run(),await this.evaluateToken();let t=d.getABConfig().cookieName||"naviga_ab_session";this.attachLogoutListener(t),this.checkAdminFlag()&&(this.initializeHUD(),this.watchSessionExpiry(t))},{message:"Failed to start AB coordinator",severity:"medium",source:"ABTestingCoordinator.start"}))}static expiryKey(e){return`${e}_exp`}static async evaluateToken(){let e=d.getABConfig(),t=e.tokenQueryParam||"naviga_ab_token",n=e.cookieName||"naviga_ab_session",r=pn.extract(t);if(r){pn.stripFromURL(t);let l=gn(r);l&&typeof l.exp=="number"&&(this.persistSession(n,{session:r,expiresAt:l.exp}),Me.markAdminFlagFromCookie());return}let o=h.get(n);if(!o){Me.clearAdminFlag();return}let s=gn(o),a=Math.floor(Date.now()/1e3);s&&typeof s.exp=="number"&&s.exp>a?Me.markAdminFlagFromCookie():(h.remove(n),h.remove(this.expiryKey(n)),Me.clearAdminFlag())}static persistSession(e,t){h.set(e,t.session,{days:0}),h.set(this.expiryKey(e),String(t.expiresAt),{days:0})}static checkAdminFlag(){try{if(h.get(Ri)!=="true")return!1;let e=d.getABConfig().cookieName||"naviga_ab_session";return h.get(e)?!0:(Me.clearAdminFlag(),!1)}catch{return!1}}static canWrite(){try{let e=d.getABConfig().cookieName||"naviga_ab_session",t=h.get(e);return Kc(t)}catch{return!1}}static initializeHUD(){this.hudInitialized||(this.hudInitialized=!0,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.openHeadlineSelector()):this.openHeadlineSelector())}static async openHeadlineSelector(){try{(await xo()).initialize(!0)}catch{}}static watchSessionExpiry(e){this.expiryInterval||(this.expiryInterval=setInterval(()=>{this.checkSessionValid(e)},this.EXPIRY_POLL_MS),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&this.checkSessionValid(e)}))}static attachLogoutListener(e){this.logoutListenerAttached||(this.logoutListenerAttached=!0,window.addEventListener("message",t=>{var n;((n=t.data)==null?void 0:n.type)==="naviga_ab_logout"&&this.handleSessionExpired(e,"logout")}))}static checkSessionValid(e){let t=h.get(e);if(!t){this.handleSessionExpired(e);return}let n=gn(t),r=Math.floor(Date.now()/1e3);
1(!n||typeof n.exp!="number"||n.exp<=r)&&this.handleSessionExpired(e)}static handleSessionExpired(e,t="expired"){if(this.expiryInterval&&(clearInterval(this.expiryInterval),this.expiryInterval=null),h.remove(e),h.remove(this.expiryKey(e)),Me.clearAdminFlag(),!this.hudInitialized)return;this.hudInitialized=!1;let n=t==="logout"?'You were logged out of the dashboard \u2014 relaunch "Launch Console" to continue.':"A/B HUD session expired \u2014 relaunch from the dashboard to continue.";xo().then(r=>{r.teardown(),r.notify(n)}).catch(()=>{})}};xe.started=!1,xe.hudInitialized=!1,xe.expiryInterval=null,xe.logoutListenerAttached=!1,xe.EXPIRY_POLL_MS=3e4});function fl(i){try{window[dp]=i}catch{}}var dp,pl=p(()=>{"use strict";dp="__navigaAnalyticsCoreInternals"});var gl={};O(gl,{ABTesting:()=>fp});var fp,ml=p(()=>{"use strict";dl();w();pt();So();B();pl();fp={start:()=>(fl({ConfigManager:d,ErrorReporter:z,ABTestingCoordinator:xe,ExperimentLoader:Qe,ConsentedStorage:h}),xe.start())}});function Po(i){var e,t;return(t=(e=i.querySelector("article"))!=null?e:i.querySelector("main"))!=null?t:i.body}function pp(i){return Array.from(i.querySelectorAll("h1,h2,h3,h4,h5,h6"))}function gp(i){var t;let e=((t=i.textContent)!=null?t:"").trim();return e?e.split(/\s+/).length:0}function mp(i){var n;let e=!!((n=i.querySelector("article"))!=null?n:i.querySelector("main")),t=i.querySelectorAll("h1").length;return{id:"semantic_structure",audience:"A",pass:e&&t===1}}function hp(i){var r;let e=i.querySelector('link[rel="canonical"]'),t=(r=e==null?void 0:e.getAttribute("href"))!=null?r:"";return{id:"canonical_present",audience:"B",pass:/^https?:\/\//i.test(t)}}function vp(i){return{id:"robots_not_noindex",audience:"B",pass:!Array.from(i.querySelectorAll('meta[name="robots" i], meta[name="googlebot" i]')).some(n=>{var r;return/\bnoindex\b/i.test((r=n.getAttribute("content"))!=null?r:"")})}}function yp(i){return{id:"og_tags_complete",audience:"B",pass:["og:title","og:description","og:image"].every(n=>{var o;let r=i.querySelector(`meta[property="${n}"]`);return!!((o=r==null?void 0:r.getAttribute("content"))!=null&&o.trim())})}}function bp(i){var r,o;let e=i.querySelector('meta[name="description"]'),t=(o=(r=e==null?void 0:e.getAttribute("content"))==null?void 0:r.trim())!=null?o:"";return{id:"meta_description",audience:"B",pass:t.length>0&&t.length<=350}}function Cp(i){if(i.querySelectorAll("h1").length!==1)return{id:"headline_hierarchy",audience:"B",pass:!1};let t=Po(i),n=pp(t);if(n.length===0)return{id:"headline_hierarchy",audience:"B",pass:!0};let r=parseInt(n[0].tagName[1],10);for(let o=1;o<n.length;o++){let s=parseInt(n[o].tagName[1],10);if(s>r+1)return{id:"headline_hierarchy",audience:"B",pass:!1};r=s}return{id:"headline_hierarchy",audience:"B",pass:!0}}function _p(i){let e=Po(i),n=Array.from(e.querySelectorAll("img")).filter(s=>!(s.getAttribute("role")==="presentation"||s.getAttribute("aria-hidden")==="true"));return n.length===0?{id:"image_alt_coverage",audience:"C",pass:!0}:{id:"image_alt_coverage",audience:"C",pass:n.filter(s=>{var a;return((a=s.getAttribute("alt"))!=null?a:"").trim()!==""}).length/n.length>=.9}}function Ep(i){var n;let e=i.querySelector('meta[name="viewport"]');
1return{id:"viewport_meta",audience:"C",pass:!!((n=e==null?void 0:e.getAttribute("content"))!=null&&n.trim())}}function wp(i){let e=Po(i);return{id:"word_count_sane",audience:"C",pass:gp(e)>50}}var Sp,Vi,Ap,hl=p(()=>{"use strict";Sp=[{id:"semantic_structure",fn:mp},{id:"canonical_present",fn:hp},{id:"robots_not_noindex",fn:vp},{id:"og_tags_complete",fn:yp},{id:"meta_description",fn:bp},{id:"headline_hierarchy",fn:Cp},{id:"image_alt_coverage",fn:_p},{id:"viewport_meta",fn:Ep},{id:"word_count_sane",fn:wp}],Vi=class{static runChecks(e){return Sp.map(({id:t,fn:n})=>{var r;try{return n(e)}catch{let s=(r=Ap[t])!=null?r:"C";return{id:t,audience:s,pass:!1}}})}},Ap={semantic_structure:"A",canonical_present:"B",robots_not_noindex:"B",og_tags_complete:"B",meta_description:"B",headline_hierarchy:"B",image_alt_coverage:"C",viewport_meta:"C",word_count_sane:"C"}});var kp,L,ut,Io=p(()=>{"use strict";kp=2500,L=class L{static start(){if(L.observer===null)try{L.observer=new PerformanceObserver(e=>{let t=e.getEntries();t.length>0&&(L.latestLcpMs=t[t.length-1].startTime)}),L.observer.observe({type:"largest-contentful-paint",buffered:!0}),L.supported=!0}
1catch{L.observer=null,L.supported=!1}}static getProvisionalLcpMs(){return L.latestLcpMs}static toCheckResult(){return!L.supported||L.latestLcpMs===null?null:{id:"cwv_lcp",audience:"C",pass:L.latestLcpMs<kp}}static reset(){if(L.observer)try{L.observer.disconnect()}catch{}L.observer=null,L.latestLcpMs=null,L.supported=!1}};L.latestLcpMs=null,L.observer=null,L.supported=!1;ut=L});function xp(i){return!(i.origin!==window.location.origin||i.protocol!=="http:"&&i.protocol!=="https:")}function yl(i){return i.toLowerCase().replace(/\s+/g," ").trim()}function Pp(i){var n,r,o;let e=(r=(n=i.querySelector("article"))!=null?n:i.querySelector("main"))!=null?r:i.body,t=((o=e==null?void 0:e.textContent)!=null?o:"").trim();return t?t.split(/\s+/).length:0}var vl,Tp,Rp,Hi,bl=p(()=>{"use strict";w();ui();vl=2e6,Tp=5e3,Rp=150;Hi=class{static async run(e){var g,v;let t={result:null,checked:!1},n=d.getContentReadinessConfig();if(!n.rawHtmlCheck||Math.random()>=n.rawHtmlCheckSamplingRate)return t;let r=navigator.connection;if(r&&(r.saveData===!0||typeof r.effectiveType=="string"&&r.effectiveType.includes("2g")))return t;let o;try{o=new URL(window.location.href)}catch{return t}if(!xp(o))return t;let s=new AbortController,a=setTimeout(()=>s.abort(),Tp),l;try{let y=await fetch(o.toString(),{credentials:"omit",redirect:"follow",signal:s.signal});if(!y.ok)return t;l=await y.text()}catch{return t}finally{clearTimeout(a)}l.length>vl&&(l=l.slice(0,vl));let u=new DOMParser().parseFromString(l,"text/html"),f;if(e.isPremium){let _=Le.runChecks(u,!0).find(C=>C.id==="paywall_markup");f=(_==null?void 0:_.pass)===!0}else{let{headlineText:y}=e;if(y===null)f=!1;else{u.querySelectorAll("script, style, noscript, template").forEach(X=>X.remove());let _=yl(y),C=yl((v=(g=u.body)==null?void 0:g.textContent)!=null?v:""),x=_.length>0&&C.includes(_),k=Pp(u);f=x&&k>=Rp}}return{result:{id:"ssr_article_body",audience:"A",pass:f},checked:!0}}}});function Dp(i){var n,r,o;let e=(r=(n=i.querySelector("article"))!=null?n:i.querySelector("main"))!=null?r:i.body,t=((o=e==null?void 0:e.textContent)!=null?o:"").trim();return t?t.split(/\s+/).length:0}var Ip,Lp,vn,Cl=p(()=>{"use strict";ui();hl();Io();bl();w();rn();Ip=.2,Lp=5;vn=class{async run(){var a,l;let e=[],t=!1,n=null;try{let u=d.getArticleDetails();if(u.success){let f=u.value;t=Tt(f.article_is_premium)===!0;let g=f.total_word_count;if(typeof g=="number"&&g>0)n=g;else if(typeof g=="string"){let v=parseInt(g,10);!isNaN(v)&&v>0&&(n=v)}}}catch{}try{let u=Le.runChecks(document,t);e.push(...u)}catch{}try{let u=Vi.runChecks(document);e.push(...u)}catch{}if(n!==null)try{let u=Dp(document),f=n*Ip,g=n*Lp,v=u>=f&&u<=g;
1e.push({id:"word_count_sane_mapped",audience:"C",pass:v})}catch{}let r=!1;try{let u=document.querySelector("h1"),f=(l=(a=u==null?void 0:u.textContent)==null?void 0:a.trim())!=null?l:null,g=await Hi.run({isPremium:t,headlineText:f});r=g.checked,g.result!==null&&e.push(g.result)}catch{}let o=ut.toCheckResult();o!==null&&e.push(o);let s=ut.getProvisionalLcpMs();return{results:e,rawHtmlChecked:r,lcpMs:s}}}});function El(i){let e={A:{weightPassed:0,weightRun:0},B:{weightPassed:0,weightRun:0},C:{weightPassed:0,weightRun:0}};for(let n of i){let r=Mp[n.id];if(!r)continue;let o=e[r.audience];o.weightRun+=r.weight,n.pass&&(o.weightPassed+=r.weight)}let t=n=>n.weightRun===0?-1:Math.round(100*n.weightPassed/n.weightRun);return{abc_agent_score:t(e.A),abc_bot_score:t(e.B),abc_consumer_score:t(e.C)}}var _l,Mp,wl=p(()=>{"use strict";_l="1",Mp={jsonld_present:{audience:"A",weight:1},jsonld_newsarticle:{audience:"B",weight:2},jsonld_required_props:{audience:"B",weight:2},schema_dom_consistency:{audience:"B",weight:1},paywall_markup:{audience:"B",weight:2},semantic_structure:{audience:"A",weight:1},canonical_present:{audience:"B",weight:1},robots_not_noindex:{audience:"B",weight:1},og_tags_complete:{audience:"B",weight:1},meta_description:{audience:"B",weight:1},headline_hierarchy:{audience:"B",weight:1},image_alt_coverage:{audience:"C",weight:1},viewport_meta:{audience:"C",weight:1},word_count_sane:{audience:"C",weight:1},cwv_lcp:{audience:"C",weight:1},word_count_sane_mapped:{audience:"C",weight:1},ssr_article_body:{audience:"A",weight:2}}});var Al={};O(Al,{ContentReadinessAuditor:()=>Lo});var Sl,Np,Op,F,Lo,kl=p(()=>{"use strict";qr();ze();w();B();pe();Ie();Cl();Io();wl();Sl="naviga-cr-audit:",Np="naviga-cr-lock:",Op=60,F=class F{static initialize(e){var u;if(!e||e.enabled!==!0||typeof window=="undefined"||typeof document=="undefined"||this.initialized)return;try{if(window.self!==window.top)return}catch{return}if(ot.isSuspected())return;let t=(u=e.samplingRate)!=null?u:1;if(Math.random()>=t)return;let n=F.resolveArticleKey(),r=F.todayString(),o=Sl+n;if(h.get(o)===r)return;let a=Np+n,l=h.get(a);if(l){let f=parseInt(l,10);if((Date.now()-f)/1e3<Op)return}h.set(a,String(Date.now())),this.initialized=!0,this.config=e,ut.start(),F.scheduleRun(n,r,a)}static setCheckRunner(e){F.runner=e}static reset(){F.initialized=!1,F.runner=new vn,F.config=null}static scheduleRun(e,t,n){let r=()=>F.run(e,t,n),o=()=>{typeof window.requestIdleCallback=="function"?window.requestIdleCallback(r,{timeout:1e4}):setTimeout(r,3e3)};document.readyState==="complete"?o():window.addEventListener("load",o,{once:!0})}
1static async run(e,t,n){var f,g;let r=F.config;if(!r)return;let s=(f=te.getEventFields().page_view_uuid)!=null?f:"",a=[],l=!1,u=null;try{let v=await F.runner.run();a=v.results,l=v.rawHtmlChecked,u=(g=v.lcpMs)!=null?g:null}catch{F.releaseLock(n);return}h.set(Sl+e,t),F.releaseLock(n),a.length!==0&&await F.emit(a,s,r,l,u)}static async emit(e,t,n,r=!1,o=null){let{abc_agent_score:s,abc_bot_score:a,abc_consumer_score:l}=El(e),u=e.filter(y=>!y.pass).map(y=>y.id),f=u;if(JSON.stringify(u).length>n.maxChecksPayloadBytes){let y=[];for(let _ of u){if(JSON.stringify([...y,_,"truncated"]).length>n.maxChecksPayloadBytes)break;y.push(_)}y.push("truncated"),f=y}let v={abc_agent_score:s,abc_bot_score:a,abc_consumer_score:l,abc_failed_checks:f,abc_checks_run:e.length,abc_validator_version:_l,abc_lcp_ms:o,abc_raw_html_checked:r,page_view_uuid:t};try{let y=await V.createEvent("content_readiness",v);if(!y.success||y.value===null)return;await ae.send(y.value)}catch{}}static resolveArticleKey(){var e;try{let t=d.getArticleDetails();if(t.success){let n=(e=t.value)==null?void 0:e.article_uuid;if(n&&typeof n=="string"&&n.trim()!=="")return n.trim()}}catch{}try{return window.location.pathname.replace(/\/+$/,"")||"/"}catch{return"unknown"}}static todayString(){let e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}static releaseLock(e){h.remove(e)}};F.initialized=!1,F.runner=new vn,F.config=null;Lo=F});var Do,Up,Ki,Fp,Bp,Vp,Tl,Hp,Mo,zi,Rl=p(()=>{"use strict";m();B();Do="g2i_",Up=new Set(["ofrgp_id","sp_offergroupid","returnurl","naviga_jid","campaignid","campaignname","conversationid","conversationname","conversationcode","meterlevel","meterlevelid"]),Ki={campaignid:"campaignId",campaignname:"campaignName",conversationid:"conversationId",conversationname:"conversationName",conversationcode:"conversationCode",meterlevel:"meterLevel",meterlevelid:"meterLevelId"},Fp=new Set(["campaignId","conversationId","meterLevelId"]),Bp=2048,Vp=24,Tl=new Set(["g2i_actionid","ofrgp_id","returnurl","naviga_jid","campaignid","conversationid","meterlevelid"]),Hp=[["anonDeviceId","aui"],["auth0_sub","auth0Id"]],Mo="naviga-analytics-journey-session",zi=class{static getContext(){let e={...c(()=>this.getUrlParams(),{}),...c(()=>this.getCookieFields(),{})},t={};for(let[n,r]of Object.entries(e))if(Fp.has(n)&&typeof r=="string"){let o=Number(r);t[n]=isNaN(o)?r:o}else t[n]=r;if(t.ofrgp_id&&!t.sp_offerGroupId){let n=Number(t.ofrgp_id);t.sp_offerGroupId=isNaN(n)?t.ofrgp_id:n}return t}static reset(){try{h.remove(Mo)}catch{}}static getUrlParams(){let e=this.parseCurrentUrl();return Object.keys(e).length>0&&this.writeSession(e),{...e,...this.readSession()}}static getCookieFields(){let e={};for(let[t,n]of Hp){let r=h.get(t);r&&(e[n]=r)}return e}static parseCurrentUrl(){try{if(typeof window=="undefined"||typeof window.location=="undefined")return{};let e=new URLSearchParams(window.location.search),t={};return e.forEach((n,r)=>{let o=r.toLowerCase();if(!o.startsWith(Do)&&!Up.has(o)||!n||n.length>Bp||Object.keys(t).length>=Vp)return;let s=r,a=o.startsWith(Do)?o.slice(Do.length):o;Ki[a]?s=Ki[a]:Ki[o]&&(s=Ki[o]),t[s]=n}),t}catch{return{}}}static writeSession(e){try{let t=this.readSession(),n=this.isNewJourney(t,e)?{}:t;h.set(Mo,JSON.stringify({...n,...e}))}catch{}}static readSession(){try{let e=h.get(Mo);if(!e)return{};let t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:{}}catch{return{}}}static isNewJourney(e,t){let n=new Map;for(let[r,o]of Object.entries(e)){let s=r.toLowerCase();Tl.has(s)&&n.set(s,o)}for(let[r,o]of Object.entries(t)){let s=r.toLowerCase();if(!Tl.has(s))continue;let a=n.get(s);if(a!==void 0&&a!==o)return!0}return!1}}});var Oo={};O(Oo,{CustomEventPayload:()=>yn});var No,Kp,zp,jp,yn,ji=p(()=>{"use strict";w();m();Rl();qn();_n();uo();fo();No=new Set(["event_id","event_name","event_time_epoc","platform_name","platform_type","device_id","session_id","organisation_id","organisation_name","publication_id","publication_name","bot_suspected","agent_suspected","event_creation_date","event_create_year","event_create_month","event_create_date","page_view_uuid","consent_state","page_class","page_class_source","page_class_signals"]),Kp=new Set(Object.keys(Oe).filter(i=>i!=="page_title"&&i!=="additional_info")),zp=new Set([...Object.keys(di),...Object.keys(Oe),...Object.keys(fi)]),jp="src_",yn=class{static withoutRe
1servedKeys(e,t){let n={},r=[];for(let[o,s]of Object.entries(e)){if(No.has(o)){r.push(o);continue}n[o]=s}return r.length>0,n}static namespaceAutoTrackedKeys(e){return this.namespaceCollidingKeys(e,"auto-tracked payload")}static namespaceCollidingKeys(e,t){let n={},r=[];for(let[o,s]of Object.entries(e)){if(zp.has(o)||No.has(o)){n[`${jp}${o}`]=s,r.push(o);continue}n[o]=s}return r.length>0,n}static journeyFields(){return c(()=>this.namespaceCollidingKeys(zi.getContext(),"journey context"),{})}static engageFields(){return c(()=>this.namespaceCollidingKeys(Se.getContext(),"engage context"),{})}static withCommonProperties(e){let t=this.withoutReservedKeys(e||{},"track() properties"),n={...this.engageFields(),...this.journeyFields()},r=c(()=>d.getCustomEventCommonDetails(),{}),s={...Object.keys(r).length===0?{}:this.withoutReservedKeys(r,"customEvents.commonDetailsMapping"),...t};for(let[a,l]of Object.entries(n)){let u=s[a];(u==null||u==="")&&(s[a]=l)}return s}static stripArticleFields(e){return c(()=>{let t=Object.keys(e).filter(r=>Kp.has(r));if(t.length===0)return e;let n={...e};for(let r of t)delete n[r];return n},e)}static applyExclusions(e){return c(()=>{let t=d.getCustomEventExcludeKeys();if(t.length===0)return e;let n=t.filter(o=>!No.has(o));if(n.length===0)return e;let r={...e};for(let o of n)delete r[o];if(typeof r.additional_info=="string"&&r.additional_info){let o=null;try{let s=JSON.parse(r.additional_info);o=s&&typeof s=="object"&&!Array.isArray(s)?s:null}catch{o=null}if(o){let s=!1;for(let a of n)a in o&&(delete o[a],s=!0);s&&(r.additional_info=JSON.stringify(o))}}return r},e)}}});var Uo={};O(Uo,{CustomEventTracker:()=>Gi});var Gi,Fo=p(()=>{"use strict";w();m();ji();Gi=class{static bindingKey(e){return`${e.sourceType}|${e.sourceEventName}|${e.targetEventName}`}static dispatch({binding:e,active:t},n,r,o){if(t)try{let s=e.payloadMapper?e.payloadMapper(n):r();s!=null&&o(e.targetEventName,yn.namespaceAutoTrackedKeys(s))}catch{}}static initBindings(e,t){let n=t!=null?t:d.getCustomEventBindings();if(!n||n.length===0)return;let r=[];for(let a of n){let l=this.bindingKey(a);if(this.bound.has(l))continue;let u={binding:a,active:!0};this.bound.set(l,u),r.push(u)}if(r.length===0)return;let o=r.filter(a=>a.binding.sourceType==="dom"),s=r.filter(a=>a.binding.sourceType==="knockout");o.length>0&&this.initDomBindings(o,e),s.length>0&&this.initKnockoutBindings(s,e)}static unbindBindings(e){for(let t of e){let n=this.bindingKey(t),r=this.bound.get(n);r&&(r.active=!1,r.off&&c(r.off,void 0),this.bound.delete(n))}}static initDomBindings(e,t){e.forEach(n=>{let{binding:r}=n;c(()=>{let o=s=>{this.dispatch(n,s,()=>{let a=s.detail;return a==null?{}:typeof a=="object"?{...a}:{value:a}},t)};document.addEventListener(r.sourceEventName,o),n.off=()=>document.removeEventListener(r.sourceEventName,o)},void 0)})}static initKnockoutBindings(e,t){c(()=>{let n=window;if(n.ko&&n.ko.postbox&&typeof n.ko.postbox.subscribe=="function"){this.subscribeKnockoutEvents(e,t);return}let r=0,o=100,s=setInterval(()=>{r++,n.ko&&n.ko.postbox&&typeof n.ko.postbox.subscribe=="function"?(clearInterval(s),this.subscribeKnockoutEvents(e,t)):r>=o&&(clearInterval(s),this.subscribeKnockoutEventsAsDomEvents(e,t))},100)},void 0)}static subscribeKnockoutEventsAsDomEvents(e,t){e.forEach(n=>{let{binding:r}=n;n.active&&c(()=>{let o=s=>{let a=s.detail;this.dispatch(n,a,()=>typeof a=="object"&&a!==null?{...a}:{value:a},t)};document.addEventListener(r.sourceEventName,o),n.off=()=>document.removeEventListener(r.sourceEventName,o)},void 0)})}static subscribeKnockoutEvents(e,t){let n=window;e.forEach(r=>{let{binding:o}=r;r.active&&c(()=>{let s=n.ko.postbox.subscribe(o.sourceEventName,a=>{this.dispatch(r,a,()=>typeof a=="object"&&a!==null?{...a}:{value:a},t)});s&&typeof s.dispose=="function"&&(r.off=()=>s.dispose())},void 0)})}};Gi.bound=new Map});var Vo={};O(Vo,{CrossDomainLinker:()=>qi,LINKER_PARAM:()=>Bo});var Bo,Gp,qi,Ho=p(()=>{"use strict";w();or();m();ze();qn();Bo="naviga_jid",Gp=["campaignId","campaignName","conversationId","conversationName","conversationCode","meterLevel","meterLevelId"],qi=class{static install(){c(()=>{this.installed||typeof document!="undefined"&&this.linkerHosts().length!==0&&(document.addEventListener("click",e=>this.onClick(e),!0),this.installed=!0)},void 0)}static reset(){this.installed=!1}static onClick(e){c(()=>{let t=this.anchorFor(e.target);if(!t)return;let n=t.getAttribute("href");if(!n)return;let r=this.decorate(n);r&&r!==n&&t.setAttribute("href",r)},void 0)}static decorate(e){return c(()=>
1{if(typeof window=="undefined")return null;let t=new URL(e,window.location.href);if(!this.isLinkerHost(t.hostname))return null;let n=this.journeyId();n&&!t.searchParams.has(Bo)&&t.searchParams.set(Bo,n);let r=Se.getContext();for(let o of Gp){let s=r[o];s!=null&&s!==""&&!t.searchParams.has(o)&&t.searchParams.set(o,String(s))}return t.toString()},null)}static journeyId(){let e=te.getEventFields(),t=e&&e.page_view_uuid;return typeof t=="string"&&t!==""?t:null}static anchorFor(e){let t=e;for(;t&&t!==document.body;){if(t.tagName&&t.tagName.toLowerCase()==="a")return t;t=t.parentElement}return null}static isLinkerHost(e){return wn(e,this.linkerHosts())}static linkerHosts(){return c(()=>d.getCrossDomainLinkerHosts(),[])}};qi.installed=!1});var xl={};O(xl,{CacheInvalidationManager:()=>Lt});var Lt,Pl=p(()=>{"use strict";bn();lo();ht();zn();ki();Ti();Lt=class{static initialize(){this.isInitialized||typeof window!="undefined"&&(this.setupSPANavigationListener(),this.setupBFCacheListener(),this.isInitialized=!0)}static setupSPANavigationListener(){try{this.spaUnsubscribe=ee.subscribe(e=>{U.clear(),ge.reset(),J.reset(),we.reset()},{trackHashChanges:!1})}catch{}}static setupBFCacheListener(){try{this.bfcacheUnsubscribe=he.subscribe(()=>{U.clear(),ge.reset(),J.reset(),we.reset()})}catch{}}static cleanup(){if(this.isInitialized)try{this.spaUnsubscribe&&(this.spaUnsubscribe(),this.spaUnsubscribe=null),this.bfcacheUnsubscribe&&(this.bfcacheUnsubscribe(),this.bfcacheUnsubscribe=null),this.isInitialized=!1}catch{}}static getIsInitialized(){return this.isInitialized}};Lt.isInitialized=!1,Lt.bfcacheUnsubscribe=null,Lt.spaUnsubscribe=null});T();w();w();w();m();var Qo=typeof window!="undefined"&&typeof console!="undefined",Pe=class{static logMessage(e,...t){c(()=>{try{if(!d.get().loggingEnabled||!Qo)return;console[e]("[NavigaAnalytics]",...t)}catch{}},void 0)}static warnAlways(...e){c(()=>{try{if(!Qo)return;console.warn("[NavigaAnalytics]",...e)}catch{}},void 0)}static log(...e){this.logMessage("log",...e)}static info(...e){this.logMessage("info",...e)}static warn(...e){this.logMessage("warn",...e)}static error(...e){this.logMessage("error",...e)}};m();_n();En();ht();var fs=new Set([...Object.keys(Oe),"total_word_count"]),pu=2048,gu=["email","phone","mobile","msisdn","ipaddress","latitude","longitude","geolocation","postcode","postalcode","zipcode","address","city","firstname","lastname","fullname","username","birth","gender","ssn","password","creditcard","subscriber","subscription","household"],mu=["ip","lat","lng","lon","zip","dob","gps"],Kt=class{static validate(e){c(()=>{let t=d.get();this.checkRoutingKeys(t),this.checkIneffectiveKeys(e),this.checkMappingVariableName("articleDetailsMapping",t.articleDetailsMapping),this.checkMappingVariableName("userDetailsMapping",t.userDetailsMapping),this.checkArticleMappingContents(t.articleDetailsMapping),this.checkAutoContextArticlePaths(e),this.checkPageClass(e),this.checkPageClassEnforcement(e),this.checkPageClassPatternRules(e),this.checkSpaNavigationConfig(e)},void 0)}static checkRoutingKeys(e){c(()=>{let t=[];this.isNonEmptyString(e.organisation_name)||t.push("organisation_name"),this.isNonEmptyString(e.publication_name)||t.push("publication_name"),t.length!==0&&Pe.warnAlways(`[ConfigValidator] Missing required config: ${t.join(" and ")}. Every event from this page will be unroutable and will NOT reach the warehouse \u2014 ingestion routes on organisation_name#publication_name#event_name. Set these in Analytics.init().`)},void 0)}static checkIneffectiveKeys(e){c(()=>{if(!(!e||typeof e!="object"))for(let t of this.INEFFECTIVE_KEYS){let[n,r]=t.split("."),o=r?e[n]:e;!o||typeof o!="object"||(r!=null?r:n)in o}},void 0)}static checkMappingVariableName(e,t){c(()=>{let n=t&&t.variableName;this.isNonEmptyString(n)&&n.includes(".")&&Pe.warnAlways(`[ConfigValidator] ${e}.variableName "${n}" will never resolve \u2014 the SDK looks the name up directly on window, it does not walk a dotted path. Use { ${this.suggestMappingFix(n)} } instead.`)},void 0)}static checkArticleMappingContents(e){c(()=>{if(!e||!this.isNonEmptyString(e.variableName)||typeof window=="undefined")return;let t=d.resolveMappedGlobal(e);if(!t||typeof t!="object"||Array.isArray(t))return;let n=Object.keys(t);if(n.length===0)return;let r=n.filter(f=>!fs.has(f)),o=n.length-r.length;o===0&&Pe.warnAlways(`[ConfigValidator] articleDetailsMapping resolved "${e.variableName}" but none of its ${n.length} keys are article fields the SDK recognises \u2014 every value is being swept into additional_info instead of its own column. Expected keys include ${this.sampleRecognisedKeys().join(", ")}. Check the mapping points at the right object, or rename the keys to match.`);let s=this.serialisedSize(t,r),a=r.filter(f=>this.looksPersonal(f)).length,l=s>pu,u=o===0&&a>0},void 0)}static checkAutoContextArticlePaths(e){c(()=>{var r;let t=e==null?void 0:e.autoContext;if(!t)return;let n=(r=t.articleDetection)!=null?r:"auto";n!=="paths"&&!this.verdictIsPathsOnly(t)||gt(t.articlePaths)||Pe.warnAlways(`[ConfigValidator] autoContext has no usable articlePaths, and the only article test configured is the URL path one (articleDetection: '${n}'). No page's markup will ever classify it as an article, so article context will only be attached where your own declared article data supplies it \u2014 pages relying on the markup get none. List the URL path prefixes that identify articles, e.g. articlePaths: ['/news/', '/sport/'].`)},void 0)}static verdictIsPathsOnly(e){return c(()=>{var n;let t=(n=e==null?void 0:e.profile)==null?void 0:n.verdict;return!Array.isArray(t)||t.length===0?!1:t.every(r=>(r==null?void 0:r.path)===!0)},!1)}static checkPageClass(e){c(()=>{let t=e==null?void 0:e.pageClass;t!==void 0&&Ht.includes(t)},void 0)}static checkPageClassEnforcement(e){c(()=>{let t=e==null?void 0:e.pageClassEnforcement},void 0)}static checkPageClassPatternRules(e){c(()=>{var n;let t=(n=e==null?void 0:e.autoContext)==null?void 0:n.pageClasses;if(!(!t||typeof t!="object"))for(let r of Ht)r in t&&as(t[r])},void 0)}static checkSpaNavigationConfig(e){c(()=>{var n;let t=(n=e==null?void 0:e.spaNavigation)==null?void 0:n.treatReplaceStateAsNavigation},void 0)}static suggestMappingFix(e){return c(()=>{let t=e.replace(/^window\./,""),n=t.indexOf(".");return n===-1||n===t.length-1?`variableName: '${t.replace(/\.$/,"")}'`:`variableName: '${t.slice(0,n)}', path: '${t.slice(n+1)}'`},`variableName: '${e}'`)}static sampleRecognisedKeys(){return c(()=>Array.from(fs).filter(e=>e!=="additional_info"&&!e.endsWith("_uuid")).slice(0,4),[])}static serialisedSize(e,t){return c(()=>{let n={};for(let r of t)n[r]=e[r];return JSON.stringify(n).length},0)}static looksPersonal(e){return c(()=>{let t=e.toLowerCase().replace(/[^a-z0-9]/g,"");return t===""?!1:mu.includes(t)?!0:gu.some(n=>t.includes(n))},!1)}static isNonEmptyString(e){return typeof e=="string"&&e.trim()!==""}};Kt.INEFFECTIVE_KEYS=["api_key","enableBotFiltering","organisation_id","telemetry.enabled","abTesting.dashboardUrl","abTesting.loggingEnabled","heartbeatConfig.send_closing_ping","heartbeatConfig.min_active_time_for_closing_ping"];m();function hu(i){return c(()=>
1{if(typeof i!="string")return null;let e=i.trim().split("/");if(e.length!==2)return null;let t=e[0].trim(),n=e[1].trim();return t===""||n===""?null:{organisation_name:t,publication_name:n}},null)}function gs(i){return c(()=>{let e={notices:[]};if(!i||typeof i!="object"||i.site===void 0)return e;let t=hu(i.site);return t?(ps(i,e,"organisation_name",t.organisation_name),ps(i,e,"publication_name",t.publication_name),e):(e.notices.push(`[SiteShorthand] site: ${JSON.stringify(i.site)} is not of the form 'organisation/publication' (exactly one '/', neither half blank). It has been ignored \u2014 organisation_name and publication_name are left exactly as passed.`),e)},{notices:[]})}function ps(i,e,t,n){let r=i[t];if(typeof r=="string"&&r.trim()!==""){r!==n&&e.notices.push(`[SiteShorthand] ${t} '${r}' disagrees with site '${i.site}', which expands to '${n}'. The explicit ${t} wins. One of the two is wrong \u2014 events will be filed under the explicit value.`);return}e[t]=n}Ze();pt();m();function ms(i){return new Proxy(i,{get(e,t){let n=Reflect.get(e,t);return typeof n=="function"?yu(n.bind(e)):n}})}function yu(i){return(...e)=>{try{let t=i(...e);return t instanceof Promise?t.catch(()=>{}):t}catch{return}}}Rn();Nn();Yt();Ar();et();m();Qt();var Fn=class{constructor(){this.id="explicit";this.precedence=He.explicit;this.regions=["GLOBAL"];this.emit=null}async init(e){this.emit=e}setConsent(e){c(()=>{if(!e||typeof e!="object")return;let t={};for(let r of Object.keys(e)){let o=this.coerce(e[r]);o&&(t[r]=o)}let n={source:this.id,regionApplies:!0,categories:t,ts:Date.now()};this.emit&&this.emit(n)},void 0)}teardown(){this.emit=null}coerce(e){return e===!0?"granted":e===!1?"denied":e==="granted"||e==="denied"||e==="unknown"?e:null}};m();Qt();function Fu(){return c(()=>{if(!(typeof navigator=="undefined"||!navigator))return navigator.globalPrivacyControl},void 0)}var Bn=class{constructor(){this.id="gpc";this.precedence=He.gpc;this.regions=["GLOBAL"];this.emit=null}async init(e){if(this.emit=e,Fu()!==!0)return;let t={source:this.id,regionApplies:!0,categories:{analytics:"denied",marketing:"denied"},ts:Date.now()};this.emit&&this.emit(t)}teardown(){this.emit=null}};Ee();Qt();var Vn=class{constructor(e){this.record=e;this.id="persisted";this.precedence=He.persisted;this.regions=["GLOBAL"];this.emit=null}async init(e){this.emit=e;let t=this.record;if(!t)return;let n={};for(let o of j){if(Y(o))continue;let s=t.resolved[o];(s==="granted"||s==="denied")&&(n[o]=s)}if(Object.keys(n).length===0)return;let r={source:this.id,regionApplies:!0,categories:n,ts:t.ts};this.emit&&this.emit(r)}teardown(){this.emit=null}};m();w();B();In();var Ds="naviga-consent-record",Hn=1,Ms=395,Bu=5*60*1e3,Vu=3072;function Ns(){return c(()=>{let i=d.getConsentConfig().maxAgeDays;return typeof i=="number"&&Number.isFinite(i)&&i>0?i:Ms},Ms)}var bt=class{static save(e){c(()=>{let t=JSON.stringify(e);typeof t!="string"||_r(t).length>Vu||h.set(Ds,t,{days:Ns(),domain:d.getConsentConfig().cookieDomain||null})},void 0)}static load(){return c(()=>{let e=h.get(Ds);if(typeof e!="string"||e.length===0)return null;let t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return null;let n=t;if(n.v!==Hn)return null;let r=n.ts;if(typeof r!="number"||!Number.isFinite(r))return null;let o=Date.now();if(r>o+Bu||o-r>Ns()*864e5)return null;let s=n.resolved;return!s||typeof s!="object"||Array.isArray(s)?null:{v:Hn,ts:r,region:typeof n.region=="string"?n.region:"GLOBAL",resolved:s,src:Array.isArray(n.src)?n.src.filter(a=>typeof a=="string"):[]}},null)}};Ee();B();kn();kr();ht();zn();kn();var zu=50,jn=[],Tr=!1,Bs=!1;function Gn(i,e){return(t,n)=>{if(An()){(!e||e())&&i(t,n);return}if(jn.length>=zu){Bs||(Bs=!0);return}jn.push({eventName:t,properties:n,track:i,shouldSend:e}),Tr||(Tr=!0,Sn(()=>{let r=jn;jn=[],Tr=!1;for(let o of r)try{if(o.shouldSend&&!o.shouldSend())continue;o.track(o.eventName,o.properties)}catch{}}))}}w();qn();function Wn(i){var r,o,s;Se.merge(i);let e=window,t=(s=(o=(r=d.get())==null?void 0:r.customEvents)==null?void 0:o.commonDetailsMapping)==null?void 0:s.variableName,n=typeof t=="string"&&t.trim()!==""?t.trim():"navigaEngageDetails";e[n]=e[n]||{},Object.assign(e[n],i)}function Rr(i){var n,r,o,s,a,l,u,f,g,v,y;let e=(o=(r=(n=i.OfferId)!=null?n:i.offerId)!=null?r:i.Id)!=null?o:i.id,t=(s=i.Type)!=null?s:i.type;return{id:e!=null?String(e):"",planName:(f=(u=(l=(a=i.Name)!=null?a:i.name)!=null?l:i.PlanName)!=null?u:i.planName)!=null?f:"",price:(y=(v=(g=i.TotalPrice)!=null?g:i.totalPrice)!=null?v:i.Amount)!=null?y:i.Price,type:i.IsPrint&&i.IsDigital?"Both":i.IsDigital?"Digital":i.IsPrint?"Print":t!=null?t:""}}function Vs(i){let e=Array.prototype.map.call(i,t=>
1t&&t.pid).filter(Boolean);return e.length>0?e.join(","):void 0}function ju(i){let e={};if(i.promotionsList){let t=Vs(i.promotionsList);t!==void 0&&(e.sp_pid=t)}if(i.params&&i.params.presentationName&&(e.sp_presentationName=i.params.presentationName),i.offer){let{id:t,planName:n,price:r,type:o}=Rr(i.offer);e.sp_offerId=t,e.sp_offerPlanName=n,r!==void 0&&(e.sp_offerPrice=r),e.sp_offerType=o}return i.internalSessionId&&(e.internalSessionId=i.internalSessionId),e}function xr(i){let e={};return i.offerGroupId!=null&&(e.sp_offerGroupId=i.offerGroupId),i.siteCode&&(e.sp_siteCode=i.siteCode),i.clientCode&&(e.sp_clientCode=i.clientCode),i.zipCode&&(e.sp_zipCode=i.zipCode),i.url&&(e.sp_url=i.url),i.MG2Fingerprint&&(e.sp_mg2Fingerprint=i.MG2Fingerprint),e}function Ct(i){return{...ju(i),...xr(i)}}var $n=[{sourceType:"dom",sourceEventName:"onMeterLevelSet",targetEventName:"ignored",payloadMapper:i=>{let e=i.detail||{},t={};return e.MeterLevelId!=null&&(t.meterLevelId=e.MeterLevelId),e.MeterLevel!=null&&(t.meterLevel=e.MeterLevel),e.CampaignId!=null&&(t.campaignId=e.CampaignId),e.CampaignName!=null&&(t.campaignName=e.CampaignName),Wn(t),null}},{sourceType:"dom",sourceEventName:"onConversationDetermined",targetEventName:"ignored",payloadMapper:i=>{let e=i.detail||{},t={},n=e.Conversation||{},r=n.Props||n.Properties||{};return e.CampaignId!=null&&(t.campaignId=e.CampaignId),n.Id!=null&&(t.conversationId=n.Id),n.Code!=null&&(t.conversationCode=n.Code),n.Name!=null&&(t.conversationName=n.Name),r.Views!=null&&(t.conversationViews=r.Views),r.ArticleLeft!=null&&(t.conversationArticleLeft=r.ArticleLeft),r.Date&&(r.Date.Started!=null&&(t.conversationDateStarted=r.Date.Started),r.Date.Ended!=null&&(t.conversationDateEnded=r.Date.Ended),r.Date.Expiration!=null&&(t.conversationDateExpiry=r.Date.Expiration)),Wn(t),null}},{sourceType:"dom",sourceEventName:"onFinish",targetEventName:"on_finish",payloadMapper:i=>{let e=i.detail||{};if(e.MG2AccountData&&typeof e.MG2AccountData=="object"){let t=e.MG2AccountData,n={};Array.isArray(t.OwnedSubscriptions)&&t.OwnedSubscriptions.length>0&&(n.engage_subscriptions=t.OwnedSubscriptions),t.MasterId&&(n.engage_master_id=t.MasterId),t.DigitalAccess&&typeof t.DigitalAccess=="object"&&t.DigitalAccess.AccessLevel&&(n.engage_access_level=t.DigitalAccess.AccessLevel),Object.keys(n).length>0&&Wn(n)}return{...e||{},_sdk_auto_tracked:!0}}},{sourceType:"dom",sourceEventName:"RegistrationSuccess",targetEventName:"user_registered",payloadMapper:i=>{let e=i&&i.detail!==void 0?i.detail:i||{},n=(e.EventData||{}).RegistrationContext||e.RegistrationContext||{},r={_sdk_auto_tracked:!0},o=new Set(["email","emailaddress","useremail","e-mail"]);if(typeof n=="object"&&n!==null)for(let[f,g]of Object.entries(n))o.has(f.toLowerCase())||g!=null&&g!==""&&(r[f]=g);let s=e.auth0Id||e.auth0_id||n.auth0Id||n.auth0_id;s&&(r.auth0Id=s,r.auth0_id=s);let a=e.siteCode||n.siteCode;a&&(r.siteCode=a);let l=e.clientCode||n.clientCode;l&&(r.clientCode=l);let u=e.source||n.source;return u&&(r.source=u),r}},{sourceType:"dom",sourceEventName:"onActionShown",targetEventName:"action_shown",payloadMapper:i=>{let t=(i.detail||{}).EventData||{},n={1:"Paywall",2:"Newsletter",3:"Registration",4:"Redirect",5:"InArticle",6:"Custom"},r=null;try{t.UserDefinedData&&(r=JSON.parse(t.UserDefinedData))}catch{r=t.UserDefinedData}return(t.Id||t.Name)&&Wn({actionId:t.Id,actionName:t.Name,ActionId:t.Id,ActionName:t.Name}),{actionId:t.Id,actionName:t.Name,actionDescription:t.Description,actionType:t.ActionType||n[t.ActionTypeId]||"",userDefinedData:JSON.stringify(r),_sdk_auto_tracked:!0}}},{sourceType:"dom",sourceEventName:"click",targetEventName:"click_action",payloadMapper:i=>{let e=i.target;if(!e)return null;let t=e,n=null;for(;t&&t!==document.body;){if(t.hasAttribute("data-mg2-action")){n=t.getAttribute("data-mg2-action");break}t=t.parentElement}if(!n||["login","activation","register","logout","subscribe","click"].indexOf(n.toLowerCase())===-1)return null;let s={login:"Login",activation:"Activate",register:"Register",logout:"Logout",subscribe:"Subscribe",click:"CheckoutStart"}[n.toLowerCase()]||n,a=null,l=null,u=null,f=t;for(;f&&f!==document.body;){let P=f.getAttribute&&f.getAttribute("href");if(P&&P!=="#"){a=P;try{let Ne=new URL(P,window.location.href).searchParams;l=Ne.get("G2I_ActionId"),u=Ne.get("ofrgp_id")}catch{}break}f=f.parentElement}let g=null,v=null,y=window,_=y.CnnXt||y.Connext;if(_){if(_.GetCurrentConversation){let P=_.GetCurrentConversation();P&&(g=P.Name)}if(_.GetCurrentConversationViewCount){let P=_.GetCurrentConversationViewCount();P!==null&&(v=P+"")}}let C=Se.getContext(),x=g||C.conversationName||null,k=v||(C.conversationViews!=null?String(C.conversationViews):null),X=C.actionName||C.ActionName||null,oe=l||C.actionId||C.ActionId||null;return{ClickAction:s,ActionName:X,ActionId:oe,ButtonText:(e.textContent||e.innerText||"").replace(/\s+/g," ").trim(),ConversationName:x,ArticleViews:k,ClickDestination:a,DestinationActionId:l,DestinationOfferGroupId:u,_sdk_auto_tracked:!0}}},{sourceType:"knockout",sourceEventName:"presentation_loaded_e",targetEventName:"checkout_started",payloadMapper:i=>{let e={...xr(i||{}),_sdk_auto_tracked:!0};if(i&&i.promotionsList){let t=Vs(i.promotionsList);t!==void 0&&(e.sp_pid=t)}return i&&i.params&&i.params.presentationName&&(e.sp_presentationName=i.params.presentationName),i&&i.internalSessionId&&(e.internalSessionId=i.internalSessionId),e}},{sourceType:"knockout",sourceEventName:"offers_presented_e",targetEventName:"offers_presented",payloadMapper:i=>{let e={...xr(i||{}),_sdk_auto_tracked:!0},t=i&&i.offers?i.offers:[],n=[],r=[],o=[];return t.forEach(s=>{let{id:a,planName:l}=Rr(s);n.push(a),r.push(l),o.push(a+":"+l)}),e.sp_offerIds=n.toString(),e.sp_offerPlanNames=r.toString(),e.sp_offerPlanConcat=o.toString(),i&&i.params&&i.params.presentationName&&(e.sp_presentationName=i.params.presentationName),i&&i.internalSessionId&&(e.internalSessionId=i.internalSessionId),e}},{sourceType:"knockout",sourceEventName:"offer_selected_e",targetEventName:"offer_selected",payloadMapper:i=>({...Ct(i||{}),_sdk_auto_tracked:!0})},{sourceType:"knockout",sourceEventName:"created_new_user_e",targetEventName:"new_registration",payloadMapper:i=>({...Ct(i||{}),_sdk_auto_tracked:!0})},{sourceType:"knockout",sourceEventName:"user_info_completed_e",targetEventName:"user_info_completed",payloadMapper:i=>({...Ct(i||{}),_sdk_auto_tracked:!0})},{sourceType:"knockout",sourceEventName:"delivery_address_completed_e",targetEventName:"delivery_address_completed",payloadMapper:i=>({...Ct(i||{}),_sdk_auto_tracked:!0})},{sourceType:"knockout",sourceEventName:"billing_address_completed_e",targetEventName:"billing_address_completed",payloadMapper:i=>({...Ct(i||{}),_sdk_auto_tracked:!0})},{sourceType:"knockout",sourceEventName:"add_subscription_success_e",targetEventName:"subscription_success",payloadMapper:i=>{let e=i||{},t=e.offer||{},n=e.subscription||{},{id:r,planName:o,price:s,type:a}=Rr(t),l={sp_offerId:r,sp_offerPlanName:o,sp_offerType:a,_sdk_auto_tracked:!0};return s!==void 0&&(l.sp_offerPrice=s),n.EventId&&(l.sp_subEventId=n.EventId),n.AccountNumber&&(l.sp_accountNumber=n.AccountNumber),n.PaymentAuthorizationCode&&(l.sp_paymentAuthorizationCode=n.PaymentAuthorizationCode),n.SubscriptionID&&(l.sp_subSubscriptionId=n.SubscriptionID),n.SubscriberID&&(l.sp_subSubscriberId=n.SubscriberID),n.RedirectUrl&&(l.sp_redirectUrl=n.RedirectUrl),e.params&&e.params.presentationName&&(l.sp_presentationName=e.params.presentationName),e.internalSessionId&&(l.internalSessionId=e.internalSessionId),l}},...["credit_card","bank_account","bill_me","apple_pay","paypal"].map(i=>({sourceType:"knockout",sourceEventName:`${i}_completed_e`,targetEventName:"payment_completed",payloadMapper:e=>{let t={credit_card:"Credit Card",bank_account:"Bank Account",bill_me:"Bill Me",apple_pay:"Apple Pay",paypal:"Paypal"},n=Ct(e||{});return n.sp_paymentType=t[i]||"",n._sdk_auto_tracked=!0,n}}))];var Pr={"naviga-relay":$n};function Ks(){return[].concat(...Object.values(Pr))}var Hs=new Set;function Yn(i){return typeof i=="string"&&/^\s*(none|off)\s*$/i.test(i)}
1function Ir(i){try{if(typeof i!="string")return[];let e=i.trim();if(e===""||Yn(e))return[];let t=Pr[e];return t||(Hs.has(e)||(Hs.add(e),Pe.warnAlways(`[Analytics] Unknown custom-event preset '${e}' \u2014 no auto-tracking bindings were registered. Known presets: ${Object.keys(Pr).join(", ")}.`)),[])}catch{return[]}}var Gu=",",js="naviga-data-attributes";function qu(i){if(i===null)return null;try{let e=JSON.parse(i);return!e||typeof e!="object"||Array.isArray(e)?null:e}catch{return null}}function Wu(i){return i.split(Gu).map(e=>e.trim()).filter(e=>e!=="")}function $u(i){try{if(!i||typeof i.getAttribute!="function")return null;let e={},t=i.getAttribute("data-site");t!==null&&(e.site=t);let n=i.getAttribute("data-api-base-url");n!==null&&(e.api_base_url=n);let r=i.getAttribute("data-preset");r!==null&&(e.preset=r);let o=qu(i.getAttribute("data-auto-context")),s=i.getAttribute("data-article-paths");if(s!==null){let v=o!=null?o:{};v.articlePaths=Wu(s),e.autoContext=v}else o&&(e.autoContext=o);let a=i.getAttribute("data-publication-id");a!==null&&(e.publication_id=a);let l=i.getAttribute("data-organisation-name");l!==null&&(e.organisation_name=l);let u=i.getAttribute("data-publication-name");u!==null&&(e.publication_name=u);let f=i.getAttribute("data-organisation-id");f!==null&&(e.organisation_id=f);let g=i.getAttribute("data-page-class");return g!==null&&(e.pageClass=g),Object.keys(e).length>0?e:null}catch{return null}}var Qn=null,zs=!1;function Gs(){if(!zs){zs=!0;try{Qn=$u(document.currentScript)}catch{Qn=null}}}function Lr(){return Qn}function qs(i){let e=Qn;if(!e)return i;let t=i&&typeof i=="object"?{...i}:{};for(let n of Object.keys(e))t[n]===void 0&&(t[n]=e[n]);return t}var Q=typeof window!="undefined"&&typeof document!="undefined";Q&&(Os(),us());var Il=new _e(()=>Promise.resolve().then(()=>(hi(),mi)),{message:"Failed to load PageViewTracker module",severity:"medium",source:"LazyLoad.PageViewTracker"}),qp=new _e(()=>Promise.resolve().then(()=>(vi(),Ec)),{message:"Failed to load LeavePageTracker module",severity:"medium",source:"LazyLoad.LeavePageTracker"}),Wi=new _e(()=>Promise.resolve().then(()=>(kc(),Ac)),{message:"Failed to load ClickTracker module",severity:"low",source:"LazyLoad.ClickTracker"}),$i=null,Ll=null,Dl=null,Ml=null,Nl=!1,Ko=!1,Yi=!1,Ol=null,Ul=!1,Fl=null;function zo(i){return j.map(e=>`${e}=${i[e]}`).join(";")}function Wp(i){c(()=>{let e=zo(i);e!==Fl&&(Fl=e)},void 0)}function Gl(i){S.hasAnySignal()&&(h.purgeUnconsented(i),Wp(i))}function Bl(i){d.getConsentConfig().enabled===!0&&(Gl(i),$p(i))}var Vl=null;function $p(i){c(()=>{if(d.getConsentConfig().persist!==!0||!S.hasAnySignal())return;let e=S.getStampState(),t=Array.isArray(e._src)?e._src:[],n=t.filter(y=>y!=="persisted");if(n.length===0)return;let r=S.assertedCategories(),o={};for(let y of j){if(!r.has(y))continue;let _=i[y];(_==="granted"||_==="denied")&&(o[y]=_)}if(Object.keys(o).length===0)return;let s=e._region,a=zo(o),l=bt.load(),u=t.includes("persisted")&&l?l.src:[],f=Array.from(new Set([...n,...u])),g=`${a}|${s}|${f.join(",")}`;if(g===Vl)return;Vl=g;let v=l!==null&&zo(l.resolved)===a;bt.save({v:Hn,ts:v?l.ts:Date.now(),region:s,resolved:o,src:f})},void 0)}var jo=!1;function FA(){jo=!1}var Hl=typeof $.API_BASE_URL=="string"?$.API_BASE_URL.trim():"";function Yp(i,e){return c(()=>{var a,l;let t={...i},n=[],r=gs(i);n.push(...r.notices),r.organisation_name!==void 0&&(t.organisation_name=r.organisation_name),r.publication_name!==void 0&&(t.publication_name=r.publication_name),i.publication_id===void 0&&typeof t.publication_name=="string"&&t.publication_name.trim()!==""&&(t.publication_id=t.publication_name),(typeof i.api_base_url=="string"?i.api_base_url.trim():"")===""&&Hl!==""&&(t.api_base_url=Hl),Xp(t.api_base_url,n);let s=t.customEvents?{...t.customEvents}:{};if(!e){let u=(l=(a=t.preset)!=null?a:s.preset)!=null?l:"naviga-relay",f=Ir(u);if(f.length>0){let g=Array.isArray(s.bindings)?s.bindings:[];s.bindings=[...g,...f]}s.commonDetailsMapping===void 0&&(s.commonDetailsMapping={variableName:"navigaEngageDetails"})}return s.linkerHosts===void 0&&(s.linkerHosts=[".subscriberconcierge.com"]),t.customEvents=s,{config:t,notices:n}},{config:i,notices:[]})}var ft=!1,Kl=!1;function zl(i){let e=i==null?void 0:i.customEvents,t=[i==null?void 0:i.preset,e==null?void 0:e.preset];if(t.some(Yn)||(e==null?void 0:e.enabled)===!1)return!0;
1if(t.some(n=>typeof n=="string"&&n.trim()!=="")||(e==null?void 0:e.enabled)===!0)return!1}function Qp(i,e){var t;return(t=zl(i))!=null?t:ft||zl(e)===!0}function Xp(i,e){c(()=>{if(typeof i!="string"||i.trim()==="")return;let t=null;try{t=new URL(i)}catch{t=null}if(!t){e.push(`[Analytics] api_base_url '${i}' is not an absolute URL \u2014 every request the SDK makes will fail. Expected e.g. 'https://ingest.example.com'.`);return}t.protocol!=="https:"&&e.push(`[Analytics] api_base_url '${i}' is not https. Using it as given (http is expected for local development), but production traffic should be https.`)},void 0)}var dt={init:i=>{E(()=>{let e=qs(i.initOptions);ft=Qp(i.initOptions,e);let t=Yp(e,ft);d.set(t.config),t.notices.forEach(r=>{});let n=e.pageLeaveTracking||e.pageLeaveConfig;if(n&&d.setPageLeaveConfig(n),e.heartbeatConfig&&d.setHeartbeatConfig(e.heartbeatConfig),e.abTesting&&d.setABConfig(e.abTesting),e.contentReadiness&&d.setContentReadinessConfig(e.contentReadiness),e.linkStats&&d.setLinkStatsConfig(e.linkStats),e.eventQueue&&d.setEventQueueConfig(e.eventQueue),e.clickTracking&&d.setClickTrackingConfig(e.clickTracking),e.autoContext&&d.setAutoContextConfig(e.autoContext),e.spaNavigation&&d.setSpaNavigationConfig(e.spaNavigation),e.telemetry&&d.setTelemetryConfig(e.telemetry),i.initOptions.consent&&(d.setConsentConfig(i.initOptions.consent),d.getConsentConfig().enabled===!0)){Ko=!0;try{!Ul&&d.getConsentConfig().persist===!0&&(Ul=!0,Ol=bt.load()),$i=new Fn,S.register($i),Nl||(Nl=!0,S.onChange(a=>{if(Ko){Yi=!0;return}Yi=!1,Bl(a)}),Q&&window.addEventListener("storage",()=>{c(()=>{d.getConsentConfig().enabled===!0&&Gl(S.getState())},void 0)})),Ll=new Bn,S.register(Ll),d.getConsentConfig().persist===!0&&(Dl=new Vn(Ol),S.register(Dl))}finally{Ko=!1}S.refresh(),Yi&&(Yi=!1,Bl(S.getState()));let r=S.getState();if(j.filter(a=>!Y(a)&&r[a]==="unknown").length>0&&S.hasAnySignal()){let a=S.getStampState()._region}let s=d.getConsentConfig().tcf;(s==null?void 0:s.enabled)===!0&&Promise.resolve().then(()=>(Pc(),xc)).then(a=>{Ml=new a.TcfProvider({waitForCmpMs:s.waitForCmpMs,purposeMap:s.purposeMap,allowLegitimateInterest:s.allowLegitimateInterest,vendorId:s.vendorId}),S.register(Ml)}).catch(a=>{})}e.articleDetailsMapping,e.userDetailsMapping,Kt.validate(e),Q&&e.preload!==!1&&setTimeout(()=>{Be.preload(),de.preload(),Il.preload(),qp.preload(),Wi.preload()},1e3),Q&&Promise.resolve().then(()=>(ni(),Zs)).then(r=>r.EventQueue.init()).catch(r=>{}),dt.initializeHeartbeatTracking(),dt.initializeABTesting(),dt.initializeContentReadiness(),dt.initializeCustomEventBindings(),dt.initializeCrossDomainLinker(),pr("init() completed")},{message:"Failed to initialize analytics",severity:"high",source:"Analytics.init"})},disableEvents:i=>{E(()=>{d.disable_set({DisableOption:i.DisableOption})},{message:"Failed to disable analytics",severity:"high",source:"Analytics.disableEvents"})},setConsent:i=>{E(()=>{$i&&$i.setConsent(i)},{message:"Failed to set consent",severity:"low",source:"Analytics.setConsent"})},revokeConsent:()=>{let i={};for(let e of j)Y(e)||(i[e]="denied");dt.setConsent(i)},getConsent:()=>c(()=>({...S.getState(),_gated:d.getConsentConfig().enabled===!0}),{_gated:!1}),onConsentChange:i=>c(()=>S.onChange(i),()=>{}),track:(i,e={})=>{Q&&(typeof i!="string"||i.trim()===""||jl(i,{...e||{}}))},identify:(i,e={})=>{if(!Q||typeof i!="string"||i.trim()==="")return;c(()=>se.hold(i,e||{}),void 0);let t={...e||{}};Gn((n,r)=>Jp(r),()=>se.getUserId()===i)("identify",t)},reset:()=>{c(()=>se.clear(),void 0)},setPageClass:i=>{c(()=>J.setPageClass(i),void 0)},setContentAccess:i=>{c(()=>we.set(i),void 0)},getConfig:()=>c(()=>d.get(),{organisation_name:"",publication_name:"",publication_id:"",api_base_url:"",api_key:""}),trackPageView:()=>{if(!Q)return;let i=()=>{b(async()=>{let e=await Il.get();if(!e.success)throw new Error("Failed to load PageViewTracker module");return await e.value.PageViewTracker.track()},{message:"Failed to track page view",severity:"medium",source:"Analytics.trackPageView"})};document.readyState==="complete"?i():window.addEventListener("load",i)},initializeLeavePageTracking:()=>{Q&&E(()=>{let i=d.getPageLeaveConfig();Promise.resolve().then(()=>(Lc(),Ic)).then(e=>{e.PageLeaveCoordinator.initialize({hiddenPageTimeout:i.hiddenPageTimeout,enableSPATracking:i.enableSPATracking,enableVisibilityTracking:i.enableVisibilityTracking,trackHashChanges:i.trackHashChanges})}).catch(e=>{})},{message:"Failed to initialize page leave tracking",severity:"medium",s
1ource:"Analytics.initializeLeavePageTracking"})},initializeHeartbeatTracking:()=>{Q&&E(()=>{let i=d.getHeartbeatConfig();Promise.resolve().then(()=>(Fc(),Uc)).then(e=>{e.HeartbeatPingCoordinator.initialize({enabled:i.enabled,pingIntervalSeconds:i.ping_interval_seconds,sendOnVisibilityChange:i.send_on_visibility_change,minActiveTimeForVisibilityPing:i.min_active_time_for_visibility_ping,visibilityDebounceMs:i.visibility_debounce_ms,enableSPATracking:i.enable_spa_tracking,pingDecaySchedule:(i.ping_decay_schedule||[]).map(t=>({afterSeconds:t.after_seconds,intervalSeconds:t.interval_seconds})),pingSamplingRate:i.ping_sampling_rate}),i.enabled&&e.HeartbeatPingCoordinator.start()}).catch(e=>{})},{message:"Failed to initialize heartbeat tracking",severity:"medium",source:"Analytics.initializeHeartbeatTracking"})},trackClickEvents:()=>{if(!Q)return;let i=()=>{jo||(jo=!0,document.addEventListener("click",e=>{let t=e.target;if(!t||e.button===1)return;let n={button:e.button,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey};b(async()=>{let r=await Wi.get();if(!r.success)throw new Error("Failed to load ClickTracker module");return await r.value.ClickTracker.trackClick(t,!1,n)},{message:"Failed to handle click event",severity:"low",source:"Analytics.handleClick"})}),document.addEventListener("auxclick",e=>{let t=e.target;if(!t||e.button!==1)return;let n={button:e.button,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey};b(async()=>{let r=await Wi.get();if(!r.success)throw new Error("Failed to load ClickTracker module");return await r.value.ClickTracker.trackClick(t,!1,n)},{message:"Failed to handle middle-click event",severity:"low",source:"Analytics.handleMiddleClick"})}),document.addEventListener("contextmenu",e=>{let t=e.target;t&&b(async()=>{let n=await Wi.get();if(!n.success)throw new Error("Failed to load ClickTracker module");return await n.value.ClickTracker.trackClick(t,!0)},{message:"Failed to handle right-click event",severity:"low",source:"Analytics.handleRightClick"})}))};document.readyState==="complete"?i():window.addEventListener("load",i)},initializeABTesting:()=>{Q&&d.getABConfig().enabled&&E(()=>{Promise.resolve().then(()=>(ml(),gl)).then(i=>i.ABTesting.start()).catch(i=>{})},{message:"Failed to initialize A/B testing",severity:"low",source:"Analytics.initializeABTesting"})},initializeContentReadiness:()=>{Q&&d.getContentReadinessConfig().enabled&&E(()=>{let i=d.getContentReadinessConfig();Promise.resolve().then(()=>(kl(),Al)).then(e=>e.ContentReadinessAuditor.initialize(i)).catch(e=>{})},{message:"Failed to initialize content readiness auditor",severity:"low",source:"Analytics.initializeContentReadiness"})},initializeCustomEventBindings:()=>{Q&&E(()=>{let i=d.getCustomEventBindings(),e=ft&&!Kl;Kl=ft,(e||i&&i.length>0)&&Promise.resolve().then(()=>(Fo(),Uo)).then(t=>{e&&t.CustomEventTracker.unbindBindings(Ks()),t.CustomEventTracker.initBindings(jl)}).catch(t=>{})},{message:"Failed to initialize custom event bindings",severity:"low",source:"Analytics.initializeCustomEventBindings"})},initializeCrossDomainLinker:()=>{Q&&E(()=>{d.getCrossDomainLinkerHosts().length!==0&&Promise.resolve().then(()=>(Ho(),Vo)).then(i=>i.CrossDomainLinker.install()).catch(i=>{})},{message:"Failed to initialize cross-domain linker",severity:"low",source:"Analytics.initializeCrossDomainLinker"})},getErrorLogs:()=>c(()=>z.getErrors(),[]),clearErrorLogs:()=>{c(()=>z.clearErrors(),void 0)}},Dt=ms(dt);function ql(i,e){typeof i!="string"||i.trim()===""||b(async()=>{let[{EventFactory:t},{EventSender:n},{CustomEventPayload:r}]=await Promise.all([Promise.resolve().then(()=>(pe(),tn)),Promise.resolve().then(()=>(Ie(),en)),Promise.resolve().then(()=>(ji(),Oo))]),o=r.withCommonProperties(e||{}),s=await t.createEvent(i.trim(),o,{skipArticleContext:!0});if(!s.success)throw new Error(`Failed to create custom event ${i}`);if(s.value===null)return!1;let a=r.stripArticleFields(s.value);return await n.send(r.applyExclusions(a)),!0},{message:`Failed to track custom event ${i}`,severity:"low",source:"Analytics.track"})}function Jp(i){b(async()=>{let[{EventFactory:e},{EventSender:t},{CustomEventPayload:n}]=await Promise.all([Promise.resolve().then(()=>
1(pe(),tn)),Promise.resolve().then(()=>(Ie(),en)),Promise.resolve().then(()=>(ji(),Oo))]),r=await e.createEvent("identify",i||{},{skipArticleContext:!0});if(!r.success)throw new Error("Failed to create identify event");return r.value===null?!1:(await t.send(n.stripArticleFields(r.value)),!0)},{message:"Failed to identify user",severity:"low",source:"Analytics.identify"})}var jl=Gn(ql),Zp=Gn(ql,()=>!ft);function eg(){Lr()&&Dt.init({name:js,initOptions:{}})}Q&&ns()&&(E(()=>{Gs()},{message:"Failed to read data-* configuration from the script tag",severity:"low",source:"Analytics.captureScriptData"}),E(()=>{var n;let i=(n=Lr())==null?void 0:n.preset;if(Yn(i))return;let t=Ir(i||"naviga-relay");t.length!==0&&Promise.resolve().then(()=>(Fo(),Uo)).then(r=>{ft||r.CustomEventTracker.initBindings(Zp,t)}).catch(r=>{})},{message:"Failed to register default custom event bindings",severity:"low",source:"Analytics.presetBindings"}),E(()=>{typeof document!="undefined"&&Promise.resolve().then(()=>(Ho(),Vo)).then(i=>i.CrossDomainLinker.install()).catch(i=>{})},{message:"Failed to pre-install cross-domain linker",severity:"low",source:"Analytics.preInstallLinker"}),E(()=>{Promise.resolve().then(()=>(Pl(),xl)).then(i=>{i.CacheInvalidationManager.initialize()}).catch(i=>{})},{message:"Failed to initialize cache invalidation",severity:"low",source:"Analytics.initCacheInvalidation"}),E(()=>{Sn(()=>{Dt.trackPageView(),Dt.initializeLeavePageTracking(),Dt.trackClickEvents()}),is(dr,eg)},{message:"Failed to initialize automatic tracking",severity:"medium",source:"Analytics.autoInit"}),E(()=>{window.NavigaAnalytics=Dt,Dt.NavigaRelayPreset=$n},{message:"Failed to expose Analytics globally",severity:"low",source:"global.expose"}));})();
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.