-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathUniversal-Federated-Analytics-Min.js
More file actions
68 lines (68 loc) · 29.4 KB
/
Universal-Federated-Analytics-Min.js
File metadata and controls
68 lines (68 loc) · 29.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
!function(){var e=!1,t=[],a=[],r={GWT_GA4ID:["G-CSLL4ZEK4L"],FORCE_SSL:!0,ANONYMIZE_IP:!0,AGENCY:"",SUB_AGENCY:"",VERSION:"20250702 v8.7 - GA4",SITE_TOPIC:"",SITE_PLATFORM:"",SCRIPT_SOURCE:"",URL_PROTOCOL:location.protocol,USE_MAIN_CUSTOM_DIMENSIONS:!0,MAIN_AGENCY_DIMENSION:"agency",MAIN_SUBAGENCY_DIMENSION:"subagency",MAIN_CODEVERSION_DIMENSION:"version",MAIN_SITE_TOPIC_DIMENSION:"site_topic",MAIN_SITE_PLATFORM_DIMENSION:"site_platform",MAIN_SCRIPT_SOURCE_URL_DIMENSION:"script_source",
MAIN_URL_PROTOCOL_DIMENSION:"protocol",MAIN_INTERACTION_TYPE_DIMENSION:"interaction_type",MAIN_USING_PARALLEL_DIMENSION:"using_parallel_tracker",MAIN_HOSTNAME_DIMENSION:"hostname_dimension",USE_PARALLEL_CUSTOM_DIMENSIONS:!1,PARALLEL_AGENCY_DIMENSION:"agency",PARALLEL_SUBAGENCY_DIMENSION:"subagency",PARALLEL_CODEVERSION_DIMENSION:"version",PARALLEL_SITE_TOPIC_DIMENSION:"site_topic",PARALLEL_SITE_PLATFORM_DIMENSION:"site_platform",PARALLEL_SCRIPT_SOURCE_URL_DIMENSION:"script_source",
PARALLEL_URL_PROTOCOL_DIMENSION:"protocol",PARALLEL_INTERACTION_TYPE_DIMENSION:"interaction_type",PARALLEL_USING_PARALLEL_DIMENSION:"using_parallel_tracker",PARALLEL_HOSTNAME_DIMENSION:"hostname_dimension",COOKIE_DOMAIN:location.hostname.replace(/^www\./,"").toLowerCase(),COOKIE_TIMEOUT:63072e3,
SEARCH_PARAMS:"q|query|nasaInclude|k|querytext|keys|qt|search_input|search|globalSearch|goog|s|gsearch|search_keywords|SearchableText|sp_q|qs|psnetsearch|locate|lookup|search_api_views_fulltext|keywords|request|_3_keywords|searchString",YOUTUBE:!1,HTMLVIDEO:!0,YT_MILESTONE:25,AUTOTRACKER:!0,WEBVITALS:!1,EXTS:"doc|docx|xls|xlsx|xlsm|ppt|pptx|exe|zip|pdf|js|txt|csv|dxf|dwgd|rfa|rvt|dwfx|dwg|wmv|jpg|msi|7z|gz|tgz|wma|mov|avi|mp3|mp4|csv|mobi|epub|swf|rar",SUBDOMAIN_BASED:!0,GA4_NAME:"GSA_GA4_ENOR",
USE_CUSTOM_URL:!1,USE_CUSTOM_TITLE:!1,USING_PARALLEL_TRACKER:"no",ACTIVATE_DEV:!1,HOSTNAME:location.hostname.replace(/^www\./,"").toLowerCase()};!function(){if("undefined"!=typeof _fedParmsGTM){var e=_fedParmsGTM.toLowerCase().split("&");r.SCRIPT_SOURCE="GTM"}else{var t=document.getElementById("_fed_an_ua_tag");_fullParams=t.src.match(/^([^\?]*)(.*)$/i)[2].replace("?",""),e=_fullParams.split("&"),r.SCRIPT_SOURCE=t.src.split("?")[0]}
for(t=0;t<e.length;t++)switch(_keyValuePair=decodeURIComponent(e[t].toLowerCase()),_key=_keyValuePair.split("=")[0],_value=_keyValuePair.split("=")[1],_key){case"pua":for(var o=_value.split(","),i=0;i<o.length;i++)_(o[i])&&(r.GWT_GA4ID.push(o[i].toUpperCase()),r.USING_PARALLEL_TRACKER="pua");break;case"pga4":for(o=_value.split(","),i=0;i<o.length;i++)_(o[i])&&(r.GWT_GA4ID.push(o[i].toUpperCase()),r.USING_PARALLEL_TRACKER="pga4");break;case"agency":r.AGENCY=_value.toUpperCase();break
;case"subagency":r.SUB_AGENCY=_value.toUpperCase();break;case"sitetopic":r.SITE_TOPIC=_value;break;case"siteplatform":r.SITE_PLATFORM=_value;break;case"parallelcd":_value=d(_value),!0!==_value&&!1!==_value||(r.USE_PARALLEL_CUSTOM_DIMENSIONS=_value);break;case"custurl":_value=d(_value),!0!==_value&&!1!==_value||(r.USE_CUSTOM_URL=_value);break;case"custitle":_value=d(_value),!0!==_value&&!1!==_value||(r.USE_CUSTOM_TITLE=_value);break;case"dapdev":_value=d(_value),
!0!==_value&&!1!==_value||(r.ACTIVATE_DEV=_value);break;case"palagencydim":_value=c("d",_value),""!==_value&&(r.PARALLEL_AGENCY_DIMENSION=_value);break;case"palsubagencydim":_value=c("d",_value),""!==_value&&(r.PARALLEL_SUBAGENCY_DIMENSION=_value);break;case"palversiondim":_value=c("d",_value),""!==_value&&(r.PARALLEL_CODEVERSION_DIMENSION=_value);break;case"paltopicdim":_value=c("d",_value),""!==_value&&(r.PARALLEL_SITE_TOPIC_DIMENSION=_value);break;case"palplatformdim":_value=c("d",_value),
""!==_value&&(r.PARALLEL_SITE_PLATFORM_DIMENSION=_value);break;case"palscriptsrcdim":_value=c("d",_value),""!==_value&&(r.PARALLEL_SCRIPT_SOURCE_URL_DIMENSION=_value);break;case"palurlprotocoldim":_value=c("d",_value),""!==_value&&(r.PARALLEL_URL_PROTOCOL_DIMENSION=_value);break;case"palinteractiontypedim":_value=c("d",_value),""!==_value&&(r.PARALLEL_INTERACTION_TYPE_DIMENSION=_value);break;case"cto":r.COOKIE_TIMEOUT=2628e3*parseInt(_value);break;case"sp":
r.SEARCH_PARAMS+="|"+_value.replace(/,/g,"|");break;case"exts":r.EXTS+="|"+_value.replace(/,/g,"|");break;case"htmlvideo":_value=d(_value),!0!==_value&&!1!==_value||(r.HTMLVIDEO=_value);break;case"yt":_value=d(_value),!0!==_value&&!1!==_value||(r.YOUTUBE=_value);break;case"ytm":r.YT_MILESTONE=/^(10|20|25)$/.test(_value)?parseInt(_value):25;break;case"autotracker":_value=d(_value),!0!==_value&&!1!==_value||(r.AUTOTRACKER=_value);break;case"webvitals":_value=d(_value),
!0!==_value&&!1!==_value||(r.WEBVITALS=_value);break;case"sdor":r.SUBDOMAIN_BASED=d(_value);break;case"qsp":for(o=_value.split(","),i=0;i<o.length;i++)a.push(o[i].toLowerCase())}}(),(document.location.href.match(/([?&])(dap-dev-env)([^&$]*)/i)||r.ACTIVATE_DEV)&&(r.GWT_GA4ID[0]="G-9TNNMGP8WJ"),function(){if(/^(\/((index|home(page)?)(\.[a-zA-Z]{2,5})?)?)$/i.test(location.pathname)?r.WEBVITALS=!0:r.WEBVITALS=!1,r.WEBVITALS){function e({name:e,delta:t,value:a,id:r,entries:o,rating:i,attribution:n}){
u(e,{value:t,metric_id:r,metric_value:a,metric_delta:t,metric_rating:i,debug_target:n?n.largestShiftTarget||n.element||n.eventTarget||"":"(not set)",debug_event_type:n&&n.eventType||"",debug_timing:n&&n.loadState||"",event_time:n&&(n.largestShiftTime||n.lcpEntry&&n.lcpEntry.startTime||n.eventTime)||""})}(t=document.createElement("script")).src="https://dap.digitalgov.gov/web-vitals/dist/web-vitals.attribution.iife.js",t.onload=function(){webVitals.onCLS(e),webVitals.onFID(e),webVitals.onLCP(e),
webVitals.onFCP(e),webVitals.onTTFB(e),webVitals.onINP(e)},document.head.appendChild(t)}var t}();var o,i=document.getElementsByTagName("head").item(0),n=document.createElement("script");function s(){dataLayer.push(arguments)}function d(e){switch(e.toString().toLowerCase()){case"true":case"on":case"yes":case"1":return!0;case"false":case"off":case"no":case"0":return!1;default:return e}}function _(e){
return null!==(e=(e=e.toLowerCase()).match(/^g\-([0-9a-z])+$/))&&0<e.length&&e[0]!==r.GWT_GA4ID[0].toLowerCase()}n.setAttribute("type","text/javascript"),n.setAttribute("src","https://www.googletagmanager.com/gtag/js?id="+r.GWT_GA4ID[0]),i.appendChild(n),window.dataLayer=window.dataLayer||[],s("js",new Date),s("set",{cookie_flags:"SameSite=Strict;Secure",transport_type:"beacon"}),window.gas=function(t,a,r,o,i,n,s){
if(void 0!==t&&""!==t&&void 0!==a&&""!==a&&void 0!==r&&""!==r)if("pageview"===a.toLowerCase())try{u("page_view",{page_location:r=N(C(r)).split(/[#]/)[0],page_title:void 0===o||""===o?document.title:o}),e&&p({search_term:e})}catch(e){}else if("event"===a.toLowerCase()&&void 0!==o&&""!==o)try{var _=!1;void 0!==s&&"boolean"==typeof d(s)&&(_=d(s)),u("dap_event",{event_category:r,event_action:o,event_label:void 0===i?"":i,event_value:void 0===n||""===n||isNaN(n)?0:parseInt(n),non_interaction:_})
}catch(e){}else-1!=a.toLowerCase().indexOf("dimension")||a.toLowerCase().indexOf("metric")},window.gas4=function(t,a){if(void 0!==t&&""!==t&&void 0!==a&&"object"==typeof a)if("page_view"===(t=c("e",t)).toLowerCase())try{if(0!==Object.keys(a).length){var r=a.page_location?a.page_location:location.href;a.page_location=N(C(r)).split(/[#]/)[0],a.page_title=a.page_title?a.page_title:document.title,u("page_view",a),e&&p({search_term:e})}}catch(e){}else try{
var o=/^(((email|telephone|image|cta|navigation|faq|accordion|social)_)?click|file_download|view_search_results|video_(start|pause|progress|complete|play)|official_USA_site_banner_click|form_(start|submit|progress)|content_view|share|error|sort|filter|was_this_helpful_submit)$/gi.test(t)?t:"dap_event";0!==Object.keys(a).length?u(o,a):u(o)}catch(e){}},function(){if(window._isRedacted=window._isRedacted||!1,!window._isRedacted){window._isRedacted=!0;try{
var e=window.navigator.sendBeacon,t=r.GWT_GA4ID.join("|");window.navigator.sendBeacon=function(){if(arguments&&arguments[0].match(/google-analytics\.com.*v\=2\&/i)&&arguments[0].match(new RegExp(t))){var a={endpoint:arguments[0].split("?")[0],query:L(arguments[0].split("?")[1],"ga4"),events:[]};arguments[1]&&arguments[1].split("\r\n").forEach(function(e){a.events.push(L(e,"ga4"))}),arguments[0]=[a.endpoint,a.query].join("?"),arguments[1]&&a.events.length>0&&(a.events.join("\r\n"),
arguments[1]=a.events.join("\r\n"))}return e.apply(this,arguments)}}catch(t){return e.apply(this,arguments)}}}(),/(([^.\/]+\.[^.\/]{2,3}\.[^.\/]{2})|(([^.\/]+\.)[^.\/]{2,4}))(\/.*)?$/.test(r.SUBDOMAIN_BASED.toString())?(r.COOKIE_DOMAIN=r.SUBDOMAIN_BASED.toLowerCase().replace(/^www\./i,""),r.SUBDOMAIN_BASED=!0):!1===r.SUBDOMAIN_BASED?(r.COOKIE_DOMAIN=document.location.hostname.match(/(([^.\/]+\.[^.\/]{2,3}\.[^.\/]{2})|(([^.\/]+\.)[^.\/]{2,4}))(\/.*)?$/)[1],
r.SUBDOMAIN_BASED=!0):(r.COOKIE_DOMAIN=location.hostname.toLowerCase().replace(/^www\./i,""),r.SUBDOMAIN_BASED=!1),r.AGENCY=r.AGENCY||"unspecified:"+r.COOKIE_DOMAIN,r.SUB_AGENCY=r.SUB_AGENCY||""+r.COOKIE_DOMAIN,r.SITE_TOPIC=r.SITE_TOPIC||"unspecified:"+r.COOKIE_DOMAIN,r.SITE_PLATFORM=r.SITE_PLATFORM||"unspecified:"+r.COOKIE_DOMAIN,t=(o={
default:["utm_id","utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_source_platform","utm_creative_format","utm_marketing_tactic","gbraid","wbraid","_gl","gclid","dclid","gclsrc","affiliate","dap-dev-env","v","lat","lon"],gsa:["challenge","state"],dhs:["appreceiptnum"],
doc:["station","meas","start","atlc","epac","cpac","basin","fdays","cone","tswind120","gm_track","50wind120","hwind120","mltoa34","swath","radii","wsurge","key_messages","inundation","rainqpf","ero","gage","wfo","spanish_key_messages","key_messages","sid","lan","office","pil","product","product1","site","issuedby","wwa"],hhs:["s_cid","selectedfacets"],hud:["postid"],nasa:["feature","productid","selectedfacets","topic","titleid"],nps:["gid","mapid","site","webcam","id"],
nsf:["meas","start","atlc","epac","cpac","basin","fdays","cone","tswind120","gm_track","50wind120","hwind120","mltoa34","swath","radii","wsurge","key_messages","inundation","rainqpf","ero","gage","wfo","spanish_key_messages","key_messages","sid"],va:["id"],dod:["p"],opm:["l","soc","jt","j","rmi","smin","hp","g","d","a"]}).default.concat(o[r.AGENCY.toLowerCase()]).concat(r.SEARCH_PARAMS.toLowerCase().split("|")).concat(a),function(){var t,a,o=/^\/.*$/i;try{
t=r.USE_CUSTOM_URL&&o.test(custom_dap_data.url)?location.protocol+"//"+location.hostname+custom_dap_data.url.replace(location.protocol+"//"+location.hostname,""):document.location.href,a=r.USE_CUSTOM_TITLE?custom_dap_data.title:document.title}catch(e){t=document.location.href,a=document.title}var i=t.split(document.location.hostname)[1];-1!==document.title.search(/404|not found/i)&&(i=("/vpv404/"+i).replace(/\/\//g,"/")+(document.referrer?"/"+document.referrer:document.referrer))
;for(var n=N(C(-1!==document.title.search(/404|not found/gi)?document.location.protocol+"//"+document.location.hostname+i:t)),d={},_=0;_<r.GWT_GA4ID.length;_++)if(0===_)d={groups:r.GA4_NAME+_,cookie_expires:parseInt(r.COOKIE_TIMEOUT),page_location:n,page_title:a,[r.MAIN_AGENCY_DIMENSION]:r.AGENCY.toUpperCase(),[r.MAIN_SUBAGENCY_DIMENSION]:r.SUB_AGENCY.toUpperCase(),[r.MAIN_SITE_TOPIC_DIMENSION]:r.SITE_TOPIC.toLowerCase(),[r.MAIN_SITE_PLATFORM_DIMENSION]:r.SITE_PLATFORM.toLowerCase(),
[r.MAIN_SCRIPT_SOURCE_URL_DIMENSION]:r.SCRIPT_SOURCE.toLowerCase(),[r.MAIN_CODEVERSION_DIMENSION]:r.VERSION.toLowerCase(),[r.MAIN_URL_PROTOCOL_DIMENSION]:r.URL_PROTOCOL.toLowerCase(),[r.MAIN_USING_PARALLEL_DIMENSION]:r.USING_PARALLEL_TRACKER.toLowerCase(),[r.MAIN_HOSTNAME_DIMENSION]:r.HOSTNAME.toLowerCase()},document.referrer&&-1!==document.referrer.search(location.hostname)?d.page_referrer=C(document.referrer):d.page_referrer=document.referrer,l=h(l=O(l=L(S(d),"default"))),
s("config",r.GWT_GA4ID[_],l);else if(_>0&&r.USE_PARALLEL_CUSTOM_DIMENSIONS)d={groups:r.GA4_NAME+_,cookie_expires:parseInt(r.COOKIE_TIMEOUT),page_location:n,page_title:a,[r.PARALLEL_AGENCY_DIMENSION]:r.AGENCY.toUpperCase(),[r.PARALLEL_SUBAGENCY_DIMENSION]:r.SUB_AGENCY.toUpperCase(),[r.PARALLEL_SITE_TOPIC_DIMENSION]:r.SITE_TOPIC.toLowerCase(),[r.PARALLEL_SITE_PLATFORM_DIMENSION]:r.SITE_PLATFORM.toLowerCase(),[r.PARALLEL_SCRIPT_SOURCE_URL_DIMENSION]:r.SCRIPT_SOURCE.toLowerCase(),
[r.PARALLEL_CODEVERSION_DIMENSION]:r.VERSION.toLowerCase(),[r.PARALLEL_URL_PROTOCOL_DIMENSION]:r.URL_PROTOCOL.toLowerCase(),[r.PARALLEL_USING_PARALLEL_DIMENSION]:r.USING_PARALLEL_TRACKER.toLowerCase(),[r.PARALLEL_HOSTNAME_DIMENSION]:r.HOSTNAME.toLowerCase()},document.referrer&&-1!==document.referrer.search(location.hostname)?d.page_referrer=C(document.referrer):d.page_referrer=document.referrer,l=h(l=O(l=L(S(d),"default"))),s("config",r.GWT_GA4ID[_],l);else{var l;d={groups:r.GA4_NAME+_,
cookie_expires:parseInt(r.COOKIE_TIMEOUT),page_location:n,page_title:a},document.referrer&&-1!==document.referrer.search(location.hostname)?d.page_referrer=C(document.referrer):d.page_referrer=document.referrer,l=h(l=O(l=L(S(d),"default"))),s("config",r.GWT_GA4ID[_],l)}e&&p({search_term:e})}();var l=1;function c(e,t){try{return null!==(t=t.replace(/\s/g,"_").replace(/([^\w]+)/g,"").match(/[A-Za-z]\w*$/gi))?t[0].toLowerCase():"d"===e?"custom_dimension_"+l++:"dap_event"}catch(e){}}function u(e,t){
for(var a="",o=0;o<r.GWT_GA4ID.length;o++)try{a+=r.GA4_NAME+o+","}catch(e){}var i=L(S(t),"json");(i=h(i=O(i))).send_to=a.replace(/.$/,""),i.event_name_dimension=e,s("event",e,i)}function p(t){u("view_search_results",t),e=!1}if(r.YOUTUBE){var m=document.createElement("script");m.src="https://www.youtube.com/iframe_api";var g=document.getElementsByTagName("script")[0];g.parentNode.insertBefore(m,g);var v=[],E=[],I=[],A=r.YT_MILESTONE,f=[];onYouTubeIframeAPIReady=function(){
for(var e=0;e<v.length;e++)E[e]=new YT.Player(v[e],{events:{onReady:onPlayerReady,onStateChange:onPlayerStateChange,onError:onPlayerError}})},onPlayerReady=function(e){},onPlayerError=function(e){u("video_error",{videotitle:void 0!==e.target.playerInfo?e.target.playerInfo.videoData.title:e.target.getVideoData().title})},onPlayerStateChange=function(e){try{
for(var t=0,a=void 0!==e.target.playerInfo?e.target.playerInfo.videoData.video_id:e.target.getVideoData().video_id,r=0;r<v.length;r++)v[r]==a&&(t=r);var o=void 0!==E[t].playerInfo?Math.round(E[t].playerInfo.currentTime):Math.round(E[t].getCurrentTime()),i=void 0!==E[t].playerInfo?Math.round(E[t].playerInfo.duration):Math.round(E[t].getDuration()),n={video_current_time:o,video_duration:i,video_percent:(o/i*100).toFixed(),video_provider:"youtube",
video_title:void 0!==E[t].playerInfo?E[t].playerInfo.videoData.title:E[t].getVideoData().title,video_id:void 0!==E[t].playerInfo?E[t].playerInfo.videoData.video_id:E[t].getVideoData().video_id,video_url:void 0!==E[t].playerInfo?E[t].playerInfo.videoUrl:E[t].getVideoUrl()};e.data==YT.PlayerState.PLAYING&&0==n.video_percent?(u("video_start",n),cCi=0,A&&(f.push([t,function(e){for(var a=1;a<=100/A;a++)100/A==4&&a===100/A?I[a-1]={id:t,milestone:95,triggered:!1}:A*a!==100&&(I[a-1]={id:t,milestone:A*a,
triggered:!1});setInterval(function(){var e=void 0!==E[t].playerInfo?Math.round(E[t].playerInfo.currentTime):Math.round(E[t].getCurrentTime()),a=void 0!==E[t].playerInfo?Math.round(E[t].playerInfo.duration):Math.round(E[t].getDuration()),r={video_current_time:e,video_duration:a,video_percent:(e/a*100).toFixed(),video_provider:"youtube",video_title:void 0!==E[t].playerInfo?E[t].playerInfo.videoData.title:E[t].getVideoData().title,
video_id:void 0!==E[t].playerInfo?E[t].playerInfo.videoData.video_id:E[t].getVideoData().video_id,video_url:void 0!==E[t].playerInfo?E[t].playerInfo.videoUrl:E[t].getVideoUrl()};r.video_percent<=I[I.length-1]&&cCi<I.length&&r.video_percent>=I[cCi].milestone&&!I[cCi].triggered&&I[t].id===t&&(I[cCi].triggered=!0,r.video_percent=I[cCi].milestone,r.video_current_time=Math.round(r.video_duration/I.length*(cCi+1)),u("video_progress",r),cCi++)
},(void 0!==E[t].playerInfo?Math.round(E[t].playerInfo.duration):Math.round(E[t].getDuration()))/I.length)}]),f[f.length-1][1](t))):e.data==YT.PlayerState.PLAYING&&u("video_play",n),e.data==YT.PlayerState.ENDED&&u("video_complete",n),e.data==YT.PlayerState.PAUSED&&u("video_pause",n)}catch(e){}},youtube_parser=function(e){var t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(t&&11==t[2].length)return t[2]},IsYouTube=function(e){
var t=e.match(/(.*)(youtu\.be\/|youtube(\-nocookie)?\.([A-Za-z]{2,4}|[A-Za-z]{2,3}\.[A-Za-z]{2})\/)(watch|embed\/|vi?\/)?(\?vi?=)?([^#&\?\/]{11}).*/);return null!=t&&t.length>0},YTUrlHandler=function(e){return e=e.replace(/origin\=(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})\&?/gi,"origin="+document.location.protocol+"//"+document.location.host),stAdd="",adFlag=!1,-1==e.indexOf("https")&&(e=e.replace("http","https")),-1==e.indexOf("?")&&(stAdd="?flag=1"),
-1==e.indexOf("enablejsapi")&&(stAdd+="&enablejsapi=1",adFlag=!0),-1==e.indexOf("origin")&&(stAdd+="&origin="+document.location.protocol+"//"+document.location.host,adFlag=!0),1==adFlag?e+stAdd:e},_initYouTubeTracker=function(){for(var e=0,t=document.getElementsByTagName("iframe"),a=0;a<t.length;a++){var r=t[a].src;if(IsYouTube(r)){t[a].src=YTUrlHandler(r);var o=youtube_parser(r);v[e]=o,t[a].setAttribute("id",o),e++}}}}function h(e){try{if(Object(e)!==e||Array.isArray(e))return e
;var t,a,r,o,i,n={};for(var s in e){t=n,a="",o=0;do{r=s.indexOf(".",o),i=s.substring(o,-1!==r?r:void 0),t=t[a]||(t[a]=isNaN(parseInt(i))?{}:[]),a=i,o=r+1}while(r>=0);t[a]=e[s]}return n[""]}catch(e){}}function S(e){return Object.keys(e).reduce(function(t,a,r){return[t,0===r?"":"&",a=encodeURIComponent(a),"=",encodeURIComponent(e[a])].join("")},"")}function O(e){var t=e.split("&"),a={};return t.forEach(function(e){var t=e.split("="),r=t[0],o=decodeURIComponent(t[1]||"")
;!isNaN(Number(o))&&/^(value|metric_(value|delta)|event_time|(video|audio)_(duration|percent|current_time))$/i.test(r)&&(o=Number(o)),a[r]?"[object Array]"===Object.prototype.toString.call(a[r])?a[r].push(o):a[r]=[a[r],o]:a[r]=o}),JSON.parse(JSON.stringify(a))}function L(e,a){try{var r="dl|dr|dt|dt|en|ep.|up.|uid",o=[{name:"EMAIL",regex:/[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/gi},{name:"TEL",
regex:/((tel|(tele)?phone|mob(ile)?|cell(ular)?)\=)?((\+\d{1,2}[\s\.\-]?)?\d{3}[\s\.\-]\d{3}[\s\.\-]\d{4})([^\&\s\?\/]*)/gi},{name:"SSN",regex:/((full)?(([\-\_])?)?ssn\=)?(\d{3}([\s\.\-\+]|%20)\d{2}([\s\.\-\+]|%20)\d{4})([^\&\s\?\/]*)/gi},{name:"NAME",regex:/((first|last|middle|sur|f|l|user)([\-\_])?)?name\=([^\&\s\?\/]*)/gi},{name:"PASSWORD",regex:/(((confirm([\-\_])?)?password)|passwd|pwd)\=([^\&\s\?\/]*)/gi},{name:"ZIP",regex:/(post(al)?[\s]?code|zip[\s]?code|zip)\=([^\&\s\?\/]*)/gi},{
name:"ADDRESS",regex:/add(ress)?([1-2])?\=([^\&\s\?\/]*)/gi}];e="object"==typeof e&&/json|default/.test(a)?(function(e){try{var t={};return function e(a,r){if(Object(a)!==a)t[r]=a;else if(Array.isArray(a)){for(var o=0,i=a.length;o<i;o++)e(a[o],r?r+"."+o:""+o);0==i&&(t[r]=[])}else{var n=!0;for(var s in a)n=!1,e(a[s],r?r+"."+s:s);n&&(t[r]={})}}(e,""),t}catch(e){}}(e),e=S(e)):e;for(var i=t.toString().toLowerCase().replace(/\,/g,"=|")+"=",n=e.split("&"),s=0;s<n.length;s++){
var d,_="",l=n[s].split("="),c=l.length>2?l.slice(1).join("="):l[1];l.splice(2),l[1]=c;try{d=decodeURIComponent(decodeURIComponent(l[1]))}catch(e){d=decodeURIComponent(l[1])}try{if(/^https?:\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/i.test(d))if(/^(dl|page_location)$/.test(l[0]))d=d.replace(/www\./i,"");else{var u=d.replace(/https?:\/\//i,"").split("/")[0];/\.(gov|mil)/.test(u)&&(d=d.replace(/www\./i,""))}}catch(e){}
if((null!=l[0].match(new RegExp(r))||/query|json/gi.test(a))&&d.indexOf("?")>-1){var p=d.split("?").splice(1).join("&").split("&"),m=[];for(pa=0;pa<p.length;pa++)p[pa].indexOf("?")>-1&&m.push(p[pa].split("?")[1]);p=p.concat(m);for(var g=0;g<p.length;g++)null!=p[g].toLowerCase().match(new RegExp(i))&&(_+=p[g]+"&");d=d.replace(/\?.*/,"?"+_.replace(/\&$/,""))}"json"===a?o.push({name:"DOB",
regex:/(((birth)?date|dob)\=)(19|20)\d\d([\s\.\/\-]|%20)(0?[1-9]|1[012])([\s\.\/\-]|%20)(0?[1-9]|[12][0-9]|3[01])([^\&\s\?\/]*)/gi,format:"YYYY-MM-DD"},{name:"DOB",regex:/(((birth)?date|dob)\=)(19|20)\d\d([\s\.\/\-]|%20)(0?[1-9]|[12][0-9]|3[01])([\s\.\/\-]|%20)(0?[1-9]|1[012])([^\&\s\?\/]*)/gi,format:"YYYY-DD-MM"},{name:"DOB",regex:/(((birth)?date|dob)\=)(0?[1-9]|[12][0-9]|3[01])([\s\.\/\-]|%20)(0?[1-9]|1[012])([\s\.\/\-]|%20)(19|20)\d\d([^\&\s\?\/]*)/gi,format:"DD-MM-YYYY"},{name:"DOB",
regex:/(((birth)?date|dob)\=)(0?[1-9]|1[012])([\s\.\/\-]|%20)(0?[1-9]|[12][0-9]|3[01])([\s\.\/\-]|%20)(19|20)\d\d([^\&\s\?\/]*)/gi,format:"MM-DD-YYYY"}):("query"===a||"json"===a&&/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/.test(d))&&o.push({name:"TEL",regex:/((tel|(tele)?phone|mob(ile)?|cell(ular)?)\=)?((\+\d{1,2}[\s\.\-]?)?\d{3}[\s\.\-]?\d{3}[\s\.\-]?\d{4})([^\&\s\?\/]*)/gi},{name:"SSN",
regex:/((full)?(([\-\_])?)?ssn\=)?(\d{3}([\s\.\-\+]|%20)?\d{2}([\s\.\-\+]|%20)?\d{4})([^\&\s\?\/]*)/gi},{name:"DOB",regex:/(((birth)?date|dob)\=)?(19|20)\d\d([\s\.\/\-]|%20)(0?[1-9]|1[012])([\s\.\/\-]%20)(0?[1-9]|[12][0-9]|3[01])([^\&\s\?\/]*)/gi,format:"YYYY-MM-DD"},{name:"DOB",regex:/(((birth)?date|dob)\=)?(19|20)\d\d([\s\.\/\-]|%20)(0?[1-9]|[12][0-9]|3[01])([\s\.\/\-]|%20)(0?[1-9]|1[012])([^\&\s\?\/]*)/gi,format:"YYYY-DD-MM"},{name:"DOB",
regex:/(((birth)?date|dob)\=)?(0?[1-9]|[12][0-9]|3[01])([\s\.\/\-]|%20)(0?[1-9]|1[012])([\s\.\/\-]|%20)(19|20)\d\d([^\&\s\?\/]*)/gi,format:"DD-MM-YYYY"},{name:"DOB",regex:/(((birth)?date|dob)\=)?(0?[1-9]|1[012])([\s\.\/\-]|%20)(0?[1-9]|[12][0-9]|3[01])([\s\.\/\-]%20)(19|20)\d\d([^\&\s\?\/]*)/gi,format:"MM-DD-YYYY"}),
(null!=l[0].match(new RegExp(r))&&null!=l[0].match(new RegExp("ep.agency||ep.subagency|ep.site_topic|ep.site_platform|ep.script_source|ep.version|ep.protocol"))||/query|json|default/gi.test(a))&&(o.forEach(function(e){/^lat$/i.test(l[0])&&/^(-?[1-8]?\d(?:\.\d{1,18})?|90(?:\.0{1,18})?)$/.test(d)||/^lon$/i.test(l[0])&&/^(-?(?:1[0-7]|[1-9])?\d(?:\.\d{1,18})?|180(?:\.0{1,18})?)$/.test(d)||(d=d.replace(e.regex,"[REDACTED_"+e.name+"]"))}),
l[1]=encodeURIComponent(d.replace(/\?$/,""))||d.replace(/\?$/,""),n[s]=l.join("="))}return n.join("&")}catch(e){}}function N(t){var a=new RegExp("([?&])("+r.SEARCH_PARAMS+")(=[^&]+)","i");return a.test(t)&&(t=t.replace(a,"$1query$3"),e=t.match(/([?&])(query\=)([^&#?]*)/i)[3]),t}function C(e){RegExp.escape=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}
;var a=new RegExp(`^(https?:\\/\\/(www\\.)?)?${RegExp.escape(document.location.hostname.replace(/^www\\./,""))}`,"ig"),r="",o=(a.test(e)?e:document.location.protocol+"//"+document.location.hostname+e).toLowerCase(),i=o.split("?")[0];return o.split("?").length>1?(o.split("?")[1].split("&").forEach(function(e,a){t.toString().toLowerCase().indexOf(e.split("=")[0])>-1&&(r=r+"&"+e)}),r.length>0?i+"?"+L(r.substring(1),"query"):i):i}function T(){var e,t;r.AUTOTRACKER&&(e=function(e){
var t=e.href.toLowerCase().replace(/[#?&].*/,"").split(e.hostname)[1].split("."),a=t[t.length-1];return null!=a.match(new RegExp("^("+r.EXTS+")$"))&&a},t=function(t){try{if(("mousedown"===t.type||"keydown"===t.type&&13===t.keyCode)&&("A"===t.target.nodeName||null!==t.target.closest("a"))){
var a=r.COOKIE_DOMAIN,o="",i="",n=/^mailto:[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/i,s=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/i,d="",_="",l={},c=/^(tel:)(.*)$/i,p=t.target.closest("a");if("mousedown"===t.type?_="Mouse Click":"keydown"===t.type&&13===t.keyCode&&(_="Enter Key Keystroke"),n.test(p.href)||s.test(p.href)||c.test(p.href))try{s.test(p.href)?(i=p.hostname.toLowerCase().replace(/^www\./i,""),
d="l"):n.test(p.href)?(i=p.href.split("@")[1].toLowerCase(),d="m"):c.test(p.href)&&(i=(i=p.href).toLowerCase(),d="t")}catch(e){}(r.SUBDOMAIN_BASED?-1!==i.indexOf(a):i===a)?"m"===d?(o=p.href.match(/[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/),u("email_click",l={link_id:p.id,link_url:o[0],link_domain:o[0].split("@")[1],link_text:p.text.replace(/(?:[\r\n]+)+/g,"").trim(),link_classes:p.className,interaction_type:_})):"l"===d&&e(p)?u("file_download",l={file_name:o=p.pathname.split(/[#?&?]/)[0],
file_extension:e(p),link_text:p.text.replace(/(?:[\r\n]+)+/g,"").trim(),link_id:p.id,link_url:p.href.replace(/[#?&].*/,""),link_domain:p.hostname.replace(/^www\./i,""),interaction_type:_}):"l"===d&&e(p):"l"===d&&e(p)?u("file_download",l={file_name:o=p.pathname.split(/[#?&?]/)[0],file_extension:e(p),link_text:p.text.replace(/(?:[\r\n]+)+/g,"").trim(),link_id:p.id,link_url:p.href.replace(/[#?&].*/,""),link_domain:p.hostname.replace(/^www\./i,""),outbound:!0,interaction_type:_
}):"l"!==d||e(p)?"m"===d?(o=p.href.match(/[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}/),u("email_click",l={link_id:p.id,link_url:o[0],link_domain:o[0].split("@")[1],link_text:p.text.replace(/(?:[\r\n]+)+/g,"").trim(),link_classes:p.className,outbound:!0,interaction_type:_})):"t"===d&&u("telephone_click",l={link_id:p.id,link_url:p.href.split("tel:")[1],link_text:p.text.replace(/(?:[\r\n]+)+/g,"").trim(),link_classes:p.className,interaction_type:_}):(l={link_id:p.id,link_classes:p.className,
outbound:!0,interaction_type:_},/^https?:\/\/(www\.)?addtoany\.com/i.test(p.href)&&/^(a2a_(button|i))/i.test(p.className)?(l.method=p.href.match(/\/add_to\/([^?]*)/i)[1],l.content_name=p.href.match(/linkname=(.*?)(([&#?])link(url|note|media)=|$)/i)[1],l.shared_via="add to any: "+l.method,p.href.match(/linkmedia=(.*?)(([&#?])link(url|name|note)=|$)/i)?(l.content_type="media",l.content_url=p.href.match(/linkmedia=(.*?)(([&#?])link(url|name|note)=|$)/i)[1]):(l.content_type="content",
l.content_url=p.href.match(/linkurl=(.*?)(([&#?])link(name|note|media)=|$)/i)[1]),u("share",l),ß):(l.link_domain=p.hostname.replace(/^www\./i,""),l.link_url=p.href.replace(/[#?&].*/,""),l.link_text=p.text.replace(/(?:[\r\n]+)+/g,"").trim(),u("click",l)))}}catch(e){}},document.addEventListener?document.addEventListener("mousedown",t,!1):document.attachEvent&&document.attachEvent("onmousedown",t),
document.addEventListener?document.addEventListener("keydown",t,!1):document.attachEvent&&document.attachEvent("onkeydown",t)),r.YOUTUBE&&_initYouTubeTracker(),r.HTMLVIDEO&&function(){var e=r.YT_MILESTONE,t={};function a(a){var r="VIDEO"===a.target.nodeName?"video":"audio",o={};switch(o="video"===r?{video_provider:"html5 video",video_title:decodeURIComponent(a.target.currentSrc.split("/")[a.target.currentSrc.split("/").length-1]),video_id:a.target.id,
video_url:decodeURIComponent(a.target.currentSrc)}:{audio_provider:"html5 audio",audio_title:decodeURIComponent(a.target.currentSrc.split("/")[a.target.currentSrc.split("/").length-1]),audio_id:a.target.id,audio_url:decodeURIComponent(a.target.currentSrc)},a.type){case"timeupdate":t[a.target.id].current=Math.round(a.target.currentTime);var i=Math.floor(100*t[a.target.id].current/Math.round(a.target.duration))
;for(var n in t[a.target.id]._progress_milestones)i>=n&&n>t[a.target.id].latest_milestone&&(t[a.target.id].latest_milestone=n);t[a.target.id].latest_milestone&&!t[a.target.id]._progress_milestones[t[a.target.id].latest_milestone]&&(t[a.target.id]._progress_milestones[t[a.target.id].latest_milestone]=!0,"video"===r?(o.video_current_time=t[a.target.id].current,o.video_duration=Math.round(a.target.duration),
o.video_percent=t[a.target.id].latest_milestone):(o.audio_current_time=t[a.target.id].current,o.audio_duration=Math.round(a.target.duration),o.audio_percent=t[a.target.id].latest_milestone),u(r+"_progress",o));break;case"play":"video"===r?(o.video_current_time=t[a.target.id].current,o.video_duration=Math.round(a.target.duration),o.video_percent=t[a.target.id].latest_milestone):(o.audio_current_time=t[a.target.id].current,o.audio_duration=Math.round(a.target.duration),
o.audio_percent=t[a.target.id].latest_milestone),u(0===t[a.target.id].current?r+"_start":r+"_play",o);break;case"pause":t[a.target.id].current!==Math.round(a.target.duration)&&("video"===r?(o.video_current_time=t[a.target.id].current,o.video_duration=Math.round(a.target.duration),o.video_percent=t[a.target.id].latest_milestone):(o.audio_current_time=t[a.target.id].current,o.audio_duration=Math.round(a.target.duration),o.audio_percent=t[a.target.id].latest_milestone),u(r+"_pause",o));break
;case"ended":"video"===r?(o.video_current_time=t[a.target.id].current,o.video_duration=Math.round(a.target.duration),o.video_percent="100"):(o.audio_current_time=t[a.target.id].current,o.audio_duration=Math.round(a.target.duration),o.audio_percent="100"),u(r+"_complete",o),t[a.target.id].current=0,t[a.target.id].latest_milestone=0;for(var s=1;s<=100/e;s++)100/e==4&&s===100/e?t[a.target.id].progress_point=95:e*s!==100&&(t[a.target.id].progress_point=e*s),
t[a.target.id]._progress_milestones[t[a.target.id].progress_point]=!1}}for(var o=document.querySelectorAll("video,audio"),i=0;i<o.length;i++){var n;o[i].getAttribute("id")?n=o[i].getAttribute("id"):(n="html5_media_"+Math.random().toString(36).slice(2),o[i].setAttribute("id",n)),t[n]={},t[n].latest_milestone=0,t[n]._progress_milestones={};for(var s=1;s<=100/e;s++)100/e==4&&s===100/e?t[n].progress_point=95:e*s!==100&&(t[n].progress_point=e*s),t[n]._progress_milestones[t[n].progress_point]=!1
;t[n].current=0,o[i].addEventListener("play",a,!1),o[i].addEventListener("pause",a,!1),o[i].addEventListener("ended",a,!1),o[i].addEventListener("timeupdate",a,!1),o[i].addEventListener("ended",a,!1)}}(),function(){try{var e=document.querySelector("section.usa-banner button.usa-accordion__button");e&&e.addEventListener("click",function(e){gas4("official_usa_site_banner_click",{link_text:e.target.textContent.trim(),section:"header"})})}catch(e){}}()}function w(){
return("interactive"===document.readyState||"complete"===document.readyState)&&(T(),!0)}w()||(document.addEventListener?document.addEventListener("DOMContentLoaded",T):document.attachEvent&&document.attachEvent("onreadystatechange",w))}();
//# sourceMappingURL=Universal-Federated-Analytics-Min.js.map