//tealium universal tag - utag.297 ut4.0.201908281927, Copyright 2019 Tealium.com Inc. All Rights Reserved.
try{(function(id,loader){var u={"id":id};utag.o[loader].sender[id]=u;if(utag.ut===undefined){utag.ut={};}
var match=/ut\d\.(\d*)\..*/.exec(utag.cfg.v);if(utag.ut.loader===undefined||!match||parseInt(match[1])<41){u.loader=function(o,a,b,c,l,m){utag.DB(o);a=document;if(o.type=="iframe"){m=a.getElementById(o.id);if(m&&m.tagName=="IFRAME"){b=m;}else{b=a.createElement("iframe");}o.attrs=o.attrs||{};utag.ut.merge(o.attrs,{"height":"1","width":"1","style":"display:none"},0);}else if(o.type=="img"){utag.DB("Attach img: "+o.src);b=new Image();}else{b=a.createElement("script");b.language="javascript";b.type="text/javascript";b.async=1;b.charset="utf-8";}if(o.id){b.id=o.id;}for(l in utag.loader.GV(o.attrs)){b.setAttribute(l,o.attrs[l]);}b.setAttribute("src",o.src);if(typeof o.cb=="function"){if(b.addEventListener){b.addEventListener("load",function(){o.cb();},false);}else{b.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded"){this.onreadystatechange=null;o.cb();}};}}if(o.type!="img"&&!m){l=o.loc||"head";c=a.getElementsByTagName(l)[0];if(c){utag.DB("Attach to "+l+": "+o.src);if(l=="script"){c.parentNode.insertBefore(b,c);}else{c.appendChild(b);}}}};}else{u.loader=utag.ut.loader;}
if(utag.ut.typeOf===undefined){u.typeOf=function(e){return({}).toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase();};}else{u.typeOf=utag.ut.typeOf;}
u.ev={"view":1};u.scriptrequested=false;u.map={};u.extend=[function(a,b){try{if(1){window.fswf=window.fswf||{};if(typeof b['lang_pref']!=='undefined'){fswf.lang_pref=b['lang_pref'].toString().toUpperCase();}else{fswf.lang_pref='EN';}
if(b['app_id']==='OSMP'){var stringInUrlArray=['thankyou','thank_you','delete','cancel','decline','timeout'];fswf.FSRinvite='no';stringInUrlArray.forEach(function(string){if((window.location.href.toLowerCase()).indexOf(string)>-1){fswf.FSRinvite='yes';}});}
if(b['app_id']==='OAM'){if(b['page_id']==='CHANGEUSERNAME'||b['page_id']==='CHANGEPASSWORD'||b['page_id']==='CEEA'){fswf.FSRinvite='no';}}
if(b['app_id']=='WWW'&&(document.getElementById('zipStateForm')!==null)){fswf.FSRinvite='no';}
}}catch(e){utag.DB(e)}},function(a,b){try{if(1){try{b['foresee_gatewaymin']=b.tealium_js_path.replace("main/utag.js","survey/gateway.min.js")}catch(e){}}}catch(e){utag.DB(e)}},function(a,b){try{if(1){b['foresee_environment']='production'}}catch(e){utag.DB(e)}}];u.send=function(a,b){if(u.ev[a]||u.ev.all!==undefined){utag.DB("send:297");utag.DB(b);var c,d,e,f;for(c=0;c<u.extend.length;c++){try{d=u.extend[c](a,b);if(d==false)return}catch(e){}};utag.DB("send:297:EXTENSIONS");utag.DB(b);u.data={"file_path":b.foresee_gatewaymin};c=[];for(d in utag.loader.GV(u.map)){if(b[d]!==undefined&&b[d]!==""){e=u.map[d].split(",");for(f=0;f<e.length;f++){u.data[e[f]]=b[d];}}}
utag.DB("send:297:MAPPINGS");utag.DB(u.data);if(!u.data.file_path){utag.DB(u.id+": Tag not fired: Required attribute not populated");return;}
u.isSPA=false;if(!u.scriptrequested){u.scriptrequested=true;u.loader({"type":"script","src":u.data.file_path,"cb":null,"loc":"script","id":"utag_297","attrs":{"data-vendor":"fs","data-mode":"selfhost","data-environment":b.foresee_environment,"data-hasssl":"true","data-client":"wellsfargo","data-codelocation":b.foresee_gatewaymin.replace("gateway.min.js","code/"),"data-isselfhosted":"true","data-product-assets":b.foresee_gatewaymin.replace("gateway.min.js","code/"),"data-role":"gateway"}});window["fsReady"]=function(){var aT="__fsReady_stk__";window[aT]=window[aT]||[];window[aT].push(arguments);};}
else{u.isSPA=true;}
fsReady(function(){if(u.isSPA===true){FSR.run();}
FSR.CPPS.set('wfacookie',b['mpuid']);var environment='';if(typeof b['environment']!=='undefined'&&b['environment']!==''){var env=b['environment'].toString().toLowerCase()
if(env=='production'||env=='prod'){environment='Prod';}else{environment='preProd';}}
FSR.CPPS.set('environment',environment);if(b['app_id']==='WWW'&&b['dom.pathname']==='/search/search'){var search_term=b['dom.query_string'].split('&')[0].split('=')[1];FSR.CPPS.set('search_termWWW',search_term);}
if(b['app_id']==='OSMP'){FSR.CPPS.set('product_code',b['product_code']);FSR.CPPS.set('subproduct_code',b['subproduct_code']);FSR.CPPS.set('page_id',b['page_id']);}
FSR.onInviteShown.subscribe(function(){FSR.CPPS.set('invite_presented_date',new Date().toLocaleDateString('en-US',{timeZone:'UTC'}));FSR.CPPS.set('invite_presented_time',new Date().toLocaleTimeString('en-US',{timeZone:'UTC'})+" UTC");},true,false);});utag.DB("send:297:COMPLETE");}};utag.o[loader].loader.LOAD(id);}("297","wfc.main"));}catch(error){utag.DB(error);}
