/*! For license information please see analytics.min.js.LICENSE.txt */ (()=>{var e={487:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,s=0;n>>6-2*s);return r}},e.exports=r},738:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:(e,t,r)=>{var n,s,o,a,i;n=r(12),s=r(487).utf8,o=r(738),a=r(487).bin,(i=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):s.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),u=8*e.length,c=1732584193,d=-271733879,f=-1732584194,p=271733878,l=0;l>>24)|4278255360&(r[l]<<24|r[l]>>>8);r[u>>>5]|=128<>>9<<4)]=u;var g=i._ff,h=i._gg,m=i._hh,y=i._ii;for(l=0;l>>0,d=d+v>>>0,f=f+b>>>0,p=p+I>>>0}return n.endian([c,d,f,p])})._ff=function(e,t,r,n,s,o,a){var i=e+(t&r|~t&n)+(s>>>0)+a;return(i<>>32-o)+t},i._gg=function(e,t,r,n,s,o,a){var i=e+(t&n|r&~n)+(s>>>0)+a;return(i<>>32-o)+t},i._hh=function(e,t,r,n,s,o,a){var i=e+(t^r^n)+(s>>>0)+a;return(i<>>32-o)+t},i._ii=function(e,t,r,n,s,o,a){var i=e+(r^(t|~n))+(s>>>0)+a;return(i<>>32-o)+t},i._blocksize=16,i._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(i(e,t));return t&&t.asBytes?r:t&&t.asString?a.bytesToString(r):n.bytesToHex(r)}},147:e=>{"use strict";e.exports=JSON.parse('{"name":"analyticsframework","version":"1.2.5","description":"","main":"index.js","scripts":{"test":"echo \\"Error: no test specified\\" && exit 1","build":"webpack","dev":"webpack serve --config webpack.dev.js","dev:https":"webpack serve --config webpack.dev.js --https"},"repository":{"type":"git","url":"git+https://github.com/freestarcapital/analyticsframework.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/freestarcapital/analyticsframework/issues"},"homepage":"https://github.com/freestarcapital/analyticsframework#readme","devDependencies":{"@babel/core":"^7.20.12","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/preset-env":"^7.20.2","babel-loader":"^9.1.2","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-dev-server":"^4.11.1","webpack-merge":"^5.8.0"},"dependencies":{"js-cookie":"^3.0.1","md5":"^2.3.0","uuid":"^9.0.0"}}')}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(()=>{"use strict";const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let t;const n=new Uint8Array(16);function s(){if(!t&&(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(n)}const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));const a=function(t,r,n){if(e.randomUUID&&!r&&!t)return e.randomUUID();const a=(t=t||{}).random||(t.rng||s)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,r){n=n||0;for(let e=0;e<16;++e)r[n+e]=a[e];return r}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(a)},i={title:`Analytics v${r(147).version}`},u={string:{type:"string",default:""},array:{type:"array",default:[]},object:{type:"object",default:{}},number:{type:"number",default:void 0}},c=({key:e,type:t=u.string.type})=>{const r=sessionStorage.getItem(e);return t===u.object.type?r&&JSON.parse(r)instanceof Object?JSON.parse(r):u.object.default:t===u.array.type?r&&Array.isArray(JSON.parse(r))?JSON.parse(r):u.array.default:t===u.number.type?Number.isInteger(Number(r))?Number(r):u.number.default:r},d="fs.analytics",f=new class{constructor(){this.session=JSON.parse(c({key:d})),this.init()}init(){if(!this.session){const{id:e=a()}=JSON.parse(c({key:"fs.session"})),t=(()=>{const e={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content"].forEach((t=>{const r=(({name:e})=>{e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");let t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))})({name:t});!e[t]&&r&&(e[t]=r)})),e})(),r={startTime:new Date,id:e,...t};(({key:e,type:t=u.string,value:r})=>{r&&(t!==u.object&&t!==u.array||(r=JSON.stringify(r)),sessionStorage.setItem(e,r))})({key:d,type:u.object,value:r}),this.session=r}}getValue(e){return this.session[e]}};function p(e){for(var t=1;tl.get(e),h=r(568);class m{constructor(){this.content={},this.init()}init(){const e=(()=>{const e=Number(c({key:"fs.abtest.group"})),t=c({key:"fs.abtest.id"}),r=c({key:"fs.abtest.variant_type"});return void 0!==e&&void 0!==t&&void 0!==r&&{testGroup:e,testId:t,testVarientId:r}})();this.content={messageId:a(),sessionId:f.getValue("id"),referalURL:document.referrer,pageId:this.getPageId(),url:window.location.href,userAgent:navigator.userAgent,utmSource:f.getValue("utm_source"),utmMedium:f.getValue("utm_medium"),utmCampaign:f.getValue("utm_campaign"),utmTerm:f.getValue("utm_term"),utmContent:f.getValue("utm_contentd"),accountId:window.freestar.fsdata.accountId,siteId:window.freestar.fsdata.siteId,testName:e?e.testId:"",testGroup:e?e.testGroup:0,testVariantId:e?e.testVariantId:0,deploymentId:window.freestar.fsdata.deploymentId,templateVersionId:window.freestar.fsdata.templateVersionId,pageviewCount:window.freestar.msg.pageviewCount||1,admiralEnabled:g({name:"fs.admiral.whitelisted"})||!1}}add({event:e=null}){if(!e)return;let{type:t}=e;this.content[t]||(this.content[t]=[]),this.content[t].push(e.json())}getPageId(){return h(window.location.href+window.freestar.hitTime+window.freestar.msg.fpc)}json(){let e=this.content;return Object.keys(e).forEach((t=>{""!==e[t]&&void 0!==e[t]||delete e[t]})),e}}class y{constructor({type:e,args:t}){this.type=e,this.args={...t},this.init()}init(){this.args.adserverTargeting&&(this.args.adserverTargeting=[this.args.adserverTargeting]),this.args.creativeId&&(this.args.creativeId=`${this.args.creativeId}`),this.args.cpm&&(this.args.cpm=Math.trunc(1e4*this.args.cpm)),this.args.maxBid&&(this.args.maxBid=Math.trunc(1e4*this.args.maxBid)),this.args.renderer&&delete this.args.renderer}json(){return this.args}}const w=new class{constructor(){this.timer=null,this.queue=[],this.init()}init(){this.timer=setInterval((()=>{if(0===this.queue.length)return;const e=new m;for(let t=1;t<=50;t++){let t=this.queue.shift();if(e.add({event:t}),0===this.queue.length)break}this.sendMessage({message:e})}),500)}add({event:e}){this.queue.push(e)}async sendMessage({message:e}){try{freestar.log(i,"Attempting to send:",e.json());let t=await fetch("https://c.pub.network/v2/c",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e.json()),credentials:"include"});if(t.status>=400&&t.status<600)throw new Error("Bad Network Response");t=await t.text()}catch(t){console.error(t.toString(),e.json())}}},v=new class{constructor(){this.init()}init(){freestar.log({level:0,...i},"Loaded...")}track({type:e,args:t}){Array.isArray(t)?t.forEach((t=>{w.add({event:new y({type:e,args:t})})})):w.add({event:new y({type:e,args:t})})}};(()=>{if(window.freestar=window.freestar||{},window.freestar.analytics=window.freestar.analytics||{},window.freestar.analytics.queue=window.freestar.analytics.queue||[],!window.freestar.analytics.track||window.freestar.analytics.track!==v.track){const{track:e}=v;window.freestar.analytics.track=e}window.freestar.analytics.queue&&0!==window.freestar.analytics.queue.length&&(window.freestar.analytics.queue.forEach((e=>{window.freestar.analytics.track(e)})),delete window.freestar.analytics.queue)})()})()})();