/*
 @overview es6-promise - a tiny implementation of Promises/A+.
 @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 @license   Licensed under MIT license
            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
 @version   4.1.0+f046478d
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(x){var m=0;return function(){return m<x.length?{done:!1,value:x[m++]}:{done:!0}}};$jscomp.arrayIterator=function(x){return{next:$jscomp.arrayIteratorImpl(x)}};$jscomp.makeIterator=function(x){var m="undefined"!=typeof Symbol&&Symbol.iterator&&x[Symbol.iterator];return m?m.call(x):$jscomp.arrayIterator(x)};
(function(x,m){"object"===typeof exports&&"undefined"!==typeof module?module.exports=m():"function"===typeof define&&define.amd?define(m):x.ES6Promise=m()})(this,function(){function x(){return function(){return process.nextTick(E)}}function m(){return"undefined"!==typeof aa?function(){aa(E)}:r()}function Q(){var d=0,h=new b(E),l=document.createTextNode("");h.observe(l,{characterData:!0});return function(){l.data=d=++d%2}}function U(){var d=new MessageChannel;d.port1.onmessage=E;return function(){return d.port2.postMessage(0)}}
function r(){var d=setTimeout;return function(){return d(E,1)}}function E(){for(var d=0;d<R;d+=2)(0,c[d])(c[d+1]),c[d]=void 0,c[d+1]=void 0;R=0}function u(){try{var d=require("vertx");aa=d.runOnLoop||d.runOnContext;return m()}catch(h){return r()}}function e(d,h){var l=arguments,n=this,v=new this.constructor(N);void 0===v[k]&&O(v);var y=n._state;y?function(){var K=l[y-1];S(function(){return H(y,v,K,n._result)})}():B(n,v,d,h);return v}function F(d){if(d&&"object"===typeof d&&d.constructor===this)return d;
var h=new this(N);A(h,d);return h}function N(){}function Z(d){try{return d.then}catch(h){return T.error=h,T}}function V(d,h,l,n){try{d.call(h,l,n)}catch(v){return v}}function W(d,h,l){S(function(n){var v=!1,y=V(l,h,function(K){v||(v=!0,h!==K?A(n,K):z(n,K))},function(K){v||(v=!0,q(n,K))},"Settle: "+(n._label||" unknown promise"));!v&&y&&(v=!0,q(n,y))},d)}function L(d,h){h._state===X?z(d,h._result):h._state===Y?q(d,h._result):B(h,void 0,function(l){return A(d,l)},function(l){return q(d,l)})}function p(d,
h,l){h.constructor===d.constructor&&l===e&&h.constructor.resolve===F?L(d,h):l===T?(q(d,T.error),T.error=null):void 0===l?z(d,h):"function"===typeof l?W(d,h,l):z(d,h)}function A(d,h){if(d===h)q(d,new TypeError("You cannot resolve a promise with itself"));else{var l=typeof h;null===h||"object"!==l&&"function"!==l?z(d,h):p(d,h,Z(h))}}function C(d){d._onerror&&d._onerror(d._result);G(d)}function z(d,h){d._state===t&&(d._result=h,d._state=X,0!==d._subscribers.length&&S(G,d))}function q(d,h){d._state===
t&&(d._state=Y,d._result=h,S(C,d))}function B(d,h,l,n){var v=d._subscribers,y=v.length;d._onerror=null;v[y]=h;v[y+X]=l;v[y+Y]=n;0===y&&d._state&&S(G,d)}function G(d){var h=d._subscribers,l=d._state;if(0!==h.length){for(var n,v,y=d._result,K=0;K<h.length;K+=3)n=h[K],v=h[K+l],n?H(l,n,v,y):v(y);d._subscribers.length=0}}function w(){this.error=null}function H(d,h,l,n){var v="function"===typeof l,y=void 0,K=void 0,da=void 0,ea=void 0;if(v){try{y=l(n)}catch(ha){ca.error=ha,y=ca}y===ca?(ea=!0,K=y.error,
y.error=null):da=!0;if(h===y){q(h,new TypeError("A promises callback cannot return that same promise."));return}}else y=n,da=!0;h._state===t&&(v&&da?A(h,y):ea?q(h,K):d===X?z(h,y):d===Y&&q(h,y))}function J(d,h){try{h(function(l){A(d,l)},function(l){q(d,l)})}catch(l){q(d,l)}}function O(d){d[k]=fa++;d._state=void 0;d._result=void 0;d._subscribers=[]}function P(d,h){this._instanceConstructor=d;this.promise=new d(N);this.promise[k]||O(this.promise);ba(h)?(this._remaining=this.length=h.length,this._result=
Array(this.length),0===this.length?z(this.promise,this._result):(this.length=this.length||0,this._enumerate(h),0===this._remaining&&z(this.promise,this._result))):q(this.promise,Error("Array Methods must be provided an Array"))}function D(d){this[k]=fa++;this._result=this._state=void 0;this._subscribers=[];if(N!==d){if("function"!==typeof d)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof D)J(this,d);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
}}var M=void 0,ba=M=Array.isArray?Array.isArray:function(d){return"[object Array]"===Object.prototype.toString.call(d)},R=0,aa=void 0,I=void 0,S=function(d,h){c[R]=d;c[R+1]=h;R+=2;2===R&&(I?I(E):g())},a=(M="undefined"!==typeof window?window:void 0)||{},b=a.MutationObserver||a.WebKitMutationObserver;a="undefined"===typeof self&&"undefined"!==typeof process&&"[object process]"==={}.toString.call(process);var f="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==
typeof MessageChannel,c=Array(1E3),g=void 0;g=a?x():b?Q():f?U():void 0===M&&"function"===typeof require?u():r();var k=Math.random().toString(36).substring(16),t=void 0,X=1,Y=2,T=new w,ca=new w,fa=0;P.prototype._enumerate=function(d){for(var h=0;this._state===t&&h<d.length;h++)this._eachEntry(d[h],h)};P.prototype._eachEntry=function(d,h){var l=this._instanceConstructor,n=l.resolve;n===F?(n=Z(d),n===e&&d._state!==t?this._settledAt(d._state,h,d._result):"function"!==typeof n?(this._remaining--,this._result[h]=
d):l===D?(l=new l(N),p(l,d,n),this._willSettleAt(l,h)):this._willSettleAt(new l(function(v){return v(d)}),h)):this._willSettleAt(n(d),h)};P.prototype._settledAt=function(d,h,l){var n=this.promise;n._state===t&&(this._remaining--,d===Y?q(n,l):this._result[h]=l);0===this._remaining&&z(n,this._result)};P.prototype._willSettleAt=function(d,h){var l=this;B(d,void 0,function(n){return l._settledAt(X,h,n)},function(n){return l._settledAt(Y,h,n)})};D.all=function(d){return(new P(this,d)).promise};D.race=
function(d){var h=this;return ba(d)?new h(function(l,n){for(var v=d.length,y=0;y<v;y++)h.resolve(d[y]).then(l,n)}):new h(function(l,n){return n(new TypeError("You must pass an array to race."))})};D.resolve=F;D.reject=function(d){var h=new this(N);q(h,d);return h};D._setScheduler=function(d){I=d};D._setAsap=function(d){S=d};D._asap=S;D.prototype={constructor:D,then:e,"catch":function(d){return this.then(null,d)}};D.polyfill=function(){var d=void 0;if("undefined"!==typeof global)d=global;else if("undefined"!==
typeof self)d=self;else try{d=Function("return this")()}catch(n){throw Error("polyfill failed because global object is unavailable in this environment");}var h=d.Promise;if(h){var l=null;try{l=Object.prototype.toString.call(h.resolve())}catch(n){}if("[object Promise]"===l&&!h.cast)return}d.Promise=D};D.Promise=D;D.polyfill();return D});
var fcdsc=function(){function x(){return new Promise(function(a,b){e("trackVisit");var f=new U;f.load(window.location.href);var c=L("_fcdscv");if(!f.hasUtmData()){if(c){e("No UTM data in URL and cookie exists, exiting.");return}f.UtmSource="internal"}var g=new E;c?(g.load(c),g.addVisit(f),g.save().then(function(k){e("Success! "+k.Message);g.resetAndSaveToCookie();a(k.Message)},function(k){e("Failed!",k);b(k)})):(e("getVisitorId"),W("https://st.fullcircleinsights.com/v1/visitors/create",JSON.stringify({CustomerId:"2d544b1e-5d59-4e48-873b-fb473b8e70bc"})).then(function(k){k=
JSON.parse(k.Message);e("VisitorId:"+k.VisitorId);g.Visitor=new r(null,k.VisitorId);g.saveToCookie();g.addVisit(f);g.save().then(function(t){e("Success! "+t.Message);g.resetAndSaveToCookie();a(t.Message)},function(t){e("Failed!",t);b(t)})},function(k){console.error("Failed!",k);k="Error creating new visitor. "+k+" Response: "+R+" Page: "+window.location.pathname;g.DiagnosticMessage=k;e(k);N(g)}))})}function m(a){return new Promise(function(b,f){e("m_trackFormFill");var c=new E;if(z()){var g="trackFormFill cannot save because DoNotTrack is enabled";
c.DiagnosticMessage=g;e(g);F(c,b,f)}else(g=L("_fcdscv"))?(c.load(g),c.Visitor.ExternalVisitorId?(c.Visitor=new r(a,c.Visitor.ExternalVisitorId),c.Activities.push(new u("Form",a)),e("m_trackFormFill::vi: "+c.toString()),c.convert().then(function(k){e("m_trackFormFill::vi.convert response::"+k.Message);c.resetAndSaveToCookie();I="";b(k.Message)},function(k){e("m_trackFormFill::vi.convert error::",k);f(k)})):(g="trackFormFill cannot save because there is no visitor id",c.DiagnosticMessage=g,e(g),F(c,
b,f))):(g="trackFormFill cannot save because cookie does not exist or value is blank. Page: "+window.location.pathname,c.DiagnosticMessage=g,e(g),F(c,b,f))})}function Q(a){if(!a)return!1;for(var b="dfinsolutions.com,ebrevia.com,dfinsolutions.com.cn".toString().split(","),f=0;f<b.length;f++)if(a.includes(b[f]))return!0;return!1}function U(){this.SessionStartTime=this.ReferrerPageRaw=this.ReferrerPage=this.UtmContent=this.UtmTerm=this.UtmCampaign=this.UtmMedium=this.UtmSource=this.UrlRaw=this.UrlPath=this.Email=this.Origin=
this.VisitDateTime=null;this.load=function(a){this.VisitDateTime=Z(new Date);var b;e("getSessionStartTime");(b=p("_fcdscst"))?(b=new Date(parseInt(b)),b=Z(b)):(e("Visit::getSessionStartTime: cannot save session time because session cookie not found"),b=null);this.SessionStartTime=b;this.UrlPath=encodeURIComponent(window.location.pathname);this.Origin=encodeURIComponent(window.location.hostname);this.UrlRaw=encodeURIComponent(window.location);a=a.split("?");if(1<a.length)for(a=a[1].split("&"),b=0;b<
a.length;b++){var f=a[b].split("=");"utm_source"==f[0]?this.UtmSource=f[1]:"utm_medium"==f[0]?this.UtmMedium=f[1]:"utm_campaign"==f[0]?this.UtmCampaign=f[1]:"utm_term"==f[0]?this.UtmTerm=f[1]:"utm_content"==f[0]&&(this.UtmContent=f[1])}if(document.referrer){if(b=document.referrer,a=encodeURIComponent(b),this.ReferrerPageRaw=255<a.length?a.substring(0,255):a,a=document.createElement("a"),a.href=b,a=a.hostname,f=encodeURIComponent(a),this.ReferrerPage=255<f.length?f.substring(0,255):f,!this.hasUtmData()){b=
b.split("?");if(1<b.length)for(f=b[1].split("&"),b=0;b<f.length;b++){var c=f[b].split("=");if("q"==c[0]&&a.startsWith("www.bing.")){this.UtmTerm=c[1];break}}a.startsWith("www.bing.")?(this.UtmSource="bing",this.UtmMedium="organic"):a.startsWith("search.yahoo.")?(this.UtmSource="yahoo",this.UtmMedium="organic"):a.startsWith("www.google.")?(this.UtmSource="google",this.UtmMedium="organic"):a.startsWith("www.facebook.")?(this.UtmSource="facebook",this.UtmMedium="social"):a.startsWith("www.linkedin.")||
a.startsWith("www.lnkd.")?(this.UtmSource="linkedin",this.UtmMedium="social"):a.startsWith("www.twitter.")||a.startsWith("t.co")?(this.UtmSource="twitter",this.UtmMedium="social"):Q(a)||(this.UtmSource="referral")}}else this.hasUtmData()||(this.UtmSource="direct")};this.loadFromJSON=function(a){this.VisitDateTime=a.VisitDateTime;this.UrlPath=a.UrlPath;this.Origin=a.Origin;this.UrlRaw=a.UrlRaw;this.Email=a.Email;this.UtmSource=a.UtmSource;this.UtmMedium=a.UtmMedium;this.UtmCampaign=a.UtmCampaign;this.UtmTerm=
a.UtmTerm;this.UtmContent=a.UtmContent;this.ReferrerPage=a.ReferrerPage;this.ReferrerPageRaw=a.ReferrerPageRaw};this.equals=function(a){return this.UtmSource==a.UtmSource&&this.UtmMedium==a.UtmMedium&&this.UtmCampaign==a.UtmCampaign&&this.UtmTerm==a.UtmTerm&&this.UtmContent==a.UtmContent};this.hasUtmData=function(){return null!==this.UtmSource||null!==this.UtmMedium||null!==this.UtmCampaign||null!==this.UtmTerm||null!==this.UtmContent}}function r(a,b){this.Email=a;this.ExternalVisitorId=b}function E(){this.CustomerId=
"2d544b1e-5d59-4e48-873b-fb473b8e70bc";this.Visitor=null;this.Visits=[];this.Activities=[];this.DiagnosticMessage=null;this.load=function(a){a=JSON.parse(a);this.CustomerId=a.CustomerId;this.Visitor=a.Visitor;this.Activities=a.Activities;this.DiagnosticMessage=a.DiagnosticMessage;for(var b=0;b<a.Visits.length;b++){var f=new U;f.loadFromJSON(a.Visits[b]);this.Visits.push(f)}};this.addActivity=function(a){this.Activities.push(a)};this.addVisit=function(a){if(0!==this.Visits.length)for(var b=0;b<this.Visits.length;b++)if(this.Visits[b].equals(a))return;
this.Visits.push(a)};this.save=function(){return W("https://st.fullcircleinsights.com/v1/visits/queue",JSON.stringify(this))};this.convert=function(){return W("https://st.fullcircleinsights.com/v1/visits/convert",JSON.stringify(this))};this.toString=function(){return JSON.stringify(this)};this.encode=function(){return window.btoa(this.toString())};this.saveToCookie=function(){e("VisitInfo::saveToCookie");var a=this.toString();A("_fcdscv",a,730);e("VisitInfo::saveToCookie::vi: "+a)};this.reset=function(){e("VisitInfo::reset");
this.Visits=[];this.Activities=[]};this.resetAndSaveToCookie=function(){e("VisitInfo::resetAndSaveToCookie");this.Visits=[];this.Activities=[];this.saveToCookie()};this.updateVisitsAfterForm=function(a){e("VisitInfo::updateVisitsAfterForm");0!==this.Visits.length&&(this.Visits[this.Visits.length-1].Email=a)}}function u(a,b){this.ActivityDateTime=Z(new Date);this.Type=a;this.UrlPath=encodeURIComponent(window.location.pathname);this.Email=b}function e(a){P&&console.log("FCDSC v1.0.47("+window.location.hostname+
"): "+a)}function F(a,b,f){a.save().then(function(c){e("sendDiagnostic::vi.save response::"+c.Message);b(c.Message)},function(c){e("sendDiagnostic::vi.save error::",c);f(c)})}function N(a){a.save().then(function(b){e("sendDiagnostic::vi.save response::"+b.Message)},function(b){e("sendDiagnostic::vi.save error::",b)})}function Z(a){var b=a.getUTCFullYear().toString()+"-",f=(a.getUTCMonth()+1).toString();1==f.length&&(f="0"+f);var c=a.getUTCDate().toString();1==c.length&&(c="0"+c);var g=a.getUTCHours().toString();
1==g.length&&(g="0"+g);var k=a.getUTCMinutes().toString();1==k.length&&(k="0"+k);a=a.getUTCSeconds().toString();1==a.length&&(a="0"+a);return b+(f+"-"+c+" "+g+":"+k+":"+a)}function V(a,b){return new Promise(function(f,c){function g(){var t=new XMLHttpRequest;t.open("POST",a);t.setRequestHeader("x-api-key","S8NbLMTigL5p2zgHCWb9l1vgFjTCx18y3s0UCilD");t.setRequestHeader("origin-fci",window.location.origin);t.onload=function(){e("post::Status: "+t.status);200==t.status?""==t.response||"undefined"===typeof t.response?c(Error("Empty response. User agent: "+
navigator.userAgent)):f(t.response):c(Error(t.statusText))};t.onerror=function(){5>k?(k++,g()):(R=t.response,c(Error("Network errors. Origin: "+self.origin+" User agent: "+navigator.userAgent)))};t.send(b)}e("post");var k=0;g()})}function W(a,b){return V(a,b).then(function(f){R=f;return JSON.parse(f)})}function L(a){a+="=";for(var b=decodeURIComponent(document.cookie).split(";"),f=0;f<b.length;f++){for(var c=b[f];" "==c.charAt(0);)c=c.substring(1);if(0===c.indexOf(a))return window.atob(c.substring(a.length,
c.length))}return""}function p(a){a+="=";for(var b=decodeURIComponent(document.cookie).split(";"),f=0;f<b.length;f++){for(var c=b[f];" "==c.charAt(0);)c=c.substring(1);if(0===c.indexOf(a))return c.substring(a.length,c.length)}return""}function A(a,b,f){var c=new Date;c.setTime(c.getTime()+864E5*f);f="expires="+c.toUTCString();document.cookie=a+"="+window.btoa(b)+";"+f+";domain=dfinsolutions.com;path=/;SameSite=Lax"}function C(a,b){document.cookie=a+"="+b+";domain=dfinsolutions.com;path=/;SameSite=Lax"}
function z(){if(!aa||"false"==aa)return!1;var a=window.doNotTrack||window.navigator.doNotTrack||window.navigator.msDoNotTrack;return a?"1"===a.charAt(0)||"yes"===a?(e("DoNotTrack is enabled, exiting"),!0):!1:!1}function q(a){e("m_handleSubmit");var b=null,f=a.currentTarget;try{a.preventDefault();e("form id: "+f.id);if(I)b=I;else{if("pardot-form"===f.id)for(var c=0;c<f.childNodes.length;c++)if(f.childNodes[c].classList&&f.childNodes[c].classList.contains("form-field")&&f.childNodes[c].classList.contains("email"))for(a=
0;a<f.childNodes[c].childNodes.length;a++)if("input"==f.childNodes[c].childNodes[a].nodeName.toLowerCase()){var g=f.childNodes[c].childNodes[a].id;e("email field id: "+g);b=f.elements.namedItem(g).value;break}if("elq-form"===f.className||f.action&&"string"===typeof f.action&&f.action.includes("eloqua")||f.className.includes("eloqua-form")||f.className.includes("elq-form")){var k=f.getElementsByTagName("input");for(c=0;c<k.length;c++)if("emailAddress"==k[c].name){e("email field id: "+k[c].id);b=k[c].value;
break}}if(f.id&&"string"===typeof f.id&&0===f.id.indexOf("gform")){k=f.getElementsByTagName("input");for(c=0;c<k.length;c++)if(k[c].parentElement.classList.contains("ginput_container_email")){e("email field id: "+k[c].id);e("email field value: "+k[c].value);b=k[c].value;break}if(b){setTimeout(function(){m(b)},500);f.submit();return}}f.classList.contains("fcidstform")&&document.getElementById("email")&&f.contains(document.getElementById("email"))&&(b=document.getElementById("email").value)}b?ba?setTimeout(function(){m(b)},
500):window==window.top?w(b):parent.postMessage('{ "sender" : "fcdsc", "type": "setuppendingsave", "email" : "'+b+'"}',"*"):e("could not find email field/value");f.submit()}catch(t){f.submit()}}function B(a){e("m_handleSubmitHS");var b=null,f=null;a=a.target;for(var c=0;c<a.elements.length;c++)a.elements[c].name&&"email"===a.elements[c].name.toLowerCase()&&(b=a.elements[c].value),a.elements[c].name&&"hs_context"===a.elements[c].name.toLowerCase()&&(f=JSON.parse(a.elements[c].value));b?f?f.redirectUrl?
w(b):setTimeout(function(){m(b)},500):e("could not find hs_context"):e("could not find email field/value")}function G(){e("m_checkForPendingSave");if(window==window.top){var a=L("_fcdsctmp");e("email: "+a);a?(A("_fcdsctmp","",""),m(a)):e("email cookie _fcdsctmp not present, exiting")}else parent.postMessage('{ "sender" : "fcdsc", "type": "checkforpendingsave" }',"*")}function w(a){e("m_setupPendingSave");A("_fcdsctmp",a,1)}function H(a){e("m_setupPendingMultiSave");A("_fcdscms",a,1)}function J(a,
b){try{e("m_handleSubmitMkto");if(!I)return e("prefilledEmail variable is blank, so trackFormFill must have already been called. Exiting"),!0;e("values: "+JSON.stringify(a));e("followUpUrl: "+b);var f=I;a&&a.Email&&(f=a.Email);e("email: "+f);m(f).then(function(c){e("m_handleSubmitMkto success");return!0},function(c){e("m_handleSubmitMkto error");return!0})}catch(c){}return!0}function O(a){e("m_addMutationObservers");a&&"string"===typeof a&&(D=a);if("NO_DYNAMIC_NODES"!==D){var b=D.toString().split(",");
a=new MutationObserver(function(g){g=$jscomp.makeIterator(g);for(var k=g.next();!k.done;k=g.next())"childList"===k.value.type&&fcdsc.getForms()});var f={attributes:!1,childList:!0,subtree:!0};if(0<b.length){var c=null;b=$jscomp.makeIterator(b);for(c=b.next();!c.done;c=b.next()){c=c.value;if("FCI-ALL"===c){document.body?(e("adding mutation observer to body"),a.observe(document.body,f)):e("cannot add mutation observer to body because it has not rendered yet");break}c=document.getElementById(c);null!=
c&&a.observe(c,f)}}}}var P=false,D="NO_DYNAMIC_NODES",M="email",ba=!0,R="placeholder",aa=true,I="",S=true;return{init:function(){var a=void 0;a=window.location.href;var b="l".replace(/[\[\]]/g,"\\$&");b=(new RegExp("[?&]"+b+"(=([^&#]*)|&|#|$)")).exec(a);"fcidevqa"===(b?b[2]?decodeURIComponent(b[2].replace(/\+/g," ")):"":null)&&(P=!0);a=p("_fcdscst");b=new Date;a?(a=new Date(parseInt(a)),a.setMinutes(a.getMinutes()+
parseInt("60"))<b&&C("_fcdscst",b.getTime().toString())):C("_fcdscst",b.getTime().toString())},isValidOrigin:function(a){return Q(a)},trackVisit:function(){return x()},getForms:function(){e("getForms");for(var a=document.getElementsByTagName("form"),b=0;b<a.length;b++){e("form: "+a[b].id);var f=!S||"false"==S;if(a[b].classList&&a[b].classList.contains("fcidstform"))if(document.getElementById(M)&&a[b].contains(document.getElementById(M)))document.getElementById(M).addEventListener("change",
fcdsc.handleEmailFieldChange);else if(0<a[b].getElementsByTagName("input").length&&a[b].getElementsByTagName("input")[M])a[b].getElementsByTagName("input")[M].addEventListener("change",fcdsc.handleEmailFieldChange);else for(var c=a[b].getElementsByTagName("input"),g=0;g<c.length;g++)if(c[g].type==M){c[g].value&&(I=c[g].value);c[g].addEventListener("change",fcdsc.handleEmailFieldChange);break}("elq-form"===a[b].className||a[b].action&&"string"===typeof a[b].action&&a[b].action.includes("eloqua")||
a[b].className.includes("eloqua-form")||a[b].className.includes("elq-form"))&&f&&(ba=!1,a[b].addEventListener("submit",fcdsc.handleSubmit,!1));if("pardot-form"===a[b].id)for(g=0;g<a[b].childNodes.length;g++)if(a[b].childNodes[g].classList&&(a[b].childNodes[g].classList.contains("form-field")||a[b].childNodes[g].classList.contains("form-group"))&&a[b].childNodes[g].classList.contains("email"))for(var k=0;k<a[b].childNodes[g].childNodes.length;k++)if("input"==a[b].childNodes[g].childNodes[k].nodeName.toLowerCase()){a[b].childNodes[g].childNodes[k].value&&
f&&(I=a[b].childNodes[g].childNodes[k].value,a[b].addEventListener("submit",fcdsc.handleSubmit,!1));e("adding change event listener to email field id: "+a[b].childNodes[g].childNodes[k].id);a[b].childNodes[g].childNodes[k].addEventListener("change",fcdsc.handleEmailFieldChange);break}if("elq-form"===a[b].className||a[b].action&&"string"===typeof a[b].action&&a[b].action.includes("eloqua")||a[b].className.includes("eloqua-form")||a[b].className.includes("elq-form"))for(c=a[b].getElementsByTagName("input"),
g=0;g<c.length;g++)if("emailAddress"==c[g].name){c[g].value&&(I=c[g].value);e("adding change event listener to email field id: "+c[g].id);c[g].addEventListener("change",fcdsc.handleEmailFieldChange);break}if(a.item(b).classList&&(a.item(b).classList.contains("mktoForm")||a.item(b).classList.contains("marketo-form")))for(e("reached mktoForm block"),c=a[b].getElementsByTagName("input"),g=0;g<c.length;g++)if("Email"==c[g].id){c[g].value&&(e("prefilledEmail: "+c[g].value),I=c[g].value);e("adding change event listener to Marketo email field");
c[g].addEventListener("change",fcdsc.handleEmailFieldChange);break}if(a[b].id&&"string"===typeof a[b].id&&0===a[b].id.indexOf("gform"))for(c=a[b].getElementsByTagName("input"),g=0;g<c.length;g++)c[g].parentElement.classList.contains("ginput_container_email")&&(c[g].value&&(I=c[g].value),e("adding change event listener to email field id: "+c[g].id),c[g].addEventListener("change",fcdsc.handleEmailFieldChange))}a=document.getElementsByClassName("pardot-form");for(b=0;b<a.length;b++){var t=a[b].getElementsByTagName("form");
for(g=0;g<t.length;g++)for(c=t[g].getElementsByTagName("input"),k=0;k<c.length;k++)c[k].name.includes("email")&&(c[k].value&&f&&(I=c[k].value,t[g].addEventListener("submit",fcdsc.handleSubmit,!1)),e("adding change event listener to Pardot email field"),c[k].addEventListener("change",fcdsc.handleEmailFieldChange))}f=document.getElementsByClassName("cta-form");for(b=0;b<f.length;b++)for(c=f[b].getElementsByTagName("form"),g=0;g<c.length;g++)if(k=c[g].querySelector("[data-mapping='email']"))k.value&&
(I=k.value),e("adding change event listener to Uberflip email field"),k.addEventListener("change",fcdsc.handleEmailFieldChange)},handleSubmit:function(a){q(a)},handleSubmitHS:function(a){B(a)},handleEmailFieldChange:function(a){e("m_handleEmailFieldChange");a=a.target.value;e("email: "+a);/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a)?(window==window.top?w(a):parent.postMessage('{ "sender" : "fcdsc", "type": "setuppendingsave", "email" : "'+a+'"}',"*"),m(a)):e("Invalid email")},setEmailFieldId:function(a){e("m_setEmailFieldId");
a&&(M=a)},setNoRedirect:function(a){e("m_setNoRedirect");"boolean"==typeof a&&(ba=a)},handleSubmitMkto:function(a,b){return J(a,b)},receiveMessage:function(a){e("m_receiveMessage");e("event.data: "+a.data);e("event.origin: "+a.origin);if("string"==typeof a.data)try{var b=JSON.parse(a.data);if(a.data.includes("pageId")){var f=a.data;e("m_handleSubmitUnbounce");var c=f.split("&");a=null;for(f=0;f<c.length;f++){var g=c[f].split("=");"pageId"==g[0].replace(/['"]+/g,"")&&(a=g[1])}if(a){var k=document.getElementsByName("pageId");
if(k[0].value==a){var t=k[0].parentElement,X=document.getElementById("email");if(!1===t.contains(X))e("email element is not part of correct form");else if("input"!=X.nodeName.toLowerCase())e("email element is not input, exiting");else{var Y=X.value;Y?w(Y):e("could not find email field/value")}}}}if(b.sender&&"fcdsc"===b.sender){var T=b.type.toLowerCase();"trackformfill"===T&&m(b.email);"setuppendingsave"===T&&w(b.email);"setuppendingmultisave"===T&&H(b.email);"checkforpendingsave"===T&&G()}}catch(ca){e("error in m_receiveMessage: "+
ca)}},checkForPendingSave:function(){G()},setupPendingSave:function(a){w(a)},setupPendingMultiSave:function(a){H(a)},trackFormFill:function(a){return m(a)},log:function(a){e(a)},addMutationObservers:function(a){O(a)},isDoNotTrackEnabled:function(){return z()},hasPrefilledEmail:function(){var a=I?!0:!1;return a}}}();
function fcdscLoad(){fcdsc.init();if(fcdsc.isValidOrigin(window.location.hostname)){fcdsc.getForms();fcdsc.checkForPendingSave();fcdsc.addMutationObservers();window==window.top&&("undefined"!==typeof MktoForms2&&fcdsc.hasPrefilledEmail()&&MktoForms2.whenReady(function(m){m.onSuccess(fcdsc.handleSubmitMkto)}),window.addEventListener("message",fcdsc.receiveMessage,!1),window.addEventListener("hsvalidatedsubmit",fcdsc.handleSubmitHS,!1),fcdsc.isDoNotTrackEnabled()||fcdsc.trackVisit());var x=new CustomEvent("fcdscOnLoad");
window.dispatchEvent(x)}else console.log("FCDSC: not a valid origin, exiting")}window.addEventListener?window.addEventListener("load",fcdscLoad,!1):window.attachEvent&&window.attachEvent("onload",fcdscLoad);String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(x,m){pos=0<m?m|0:0;return this.substring(pos,pos+x.length)===x}});
String.prototype.includes||(String.prototype.includes=function(x,m){"number"!==typeof m&&(m=0);return m+x.length>this.length?!1:-1!==this.indexOf(x,m)});"".trim||(String.prototype.trim=function(){return this.replace(/^[\s\ufeff]+|[\s\ufeff]+$/g,"")});
(function(x){x.DOMException||((DOMException=function(r){this.message=r}).prototype=Error());var m=/[\11\12\14\15\40]/,Q=0,U=function(r,E){if(""===E)throw new DOMException("Failed to execute '"+r+"' on 'DOMTokenList': The token provided must not be empty.");if(-1!==(Q=E.search(m)))throw new DOMException("Failed to execute '"+r+"' on 'DOMTokenList': The token provided ('"+E[Q]+"') contains HTML space characters, which are not valid in tokens.");};"function"!==typeof DOMTokenList&&function(r){function E(){if(!W)throw TypeError("Illegal constructor");
}function u(){var p=r.event,A=p.propertyName;if(!L&&("className"===A||"classList"===A&&!V)){p=p.srcElement;var C=p[" uCLp"],z=""+p[A],q=z.trim().split(m),B=p["classList"===A?" uCL":"classList"],G=C.length,w=0,H=C.length=q.length;C=0;a:for(;w!==H;++w){for(var J=0;J!==w;++J)if(q[J]===q[w]){C++;continue a}B[w-C]=q[w]}for(w=H-C;w<G;++w)delete B[w];"classList"===A&&(L=1,p.classList=B,p.className=z,L=0,B.length=q.length-C)}}function e(p){if(!(p&&"innerHTML"in p))throw TypeError("Illegal invocation");p.detachEvent("onpropertychange",
u);W=1;try{(function(){}).prototype=new E}finally{W=0}var A=protoObj.prototype,C=new protoObj,z=p.className.trim().split(m),q=0,B=z.length,G=0;a:for(;q!==B;++q){for(var w=0;w!==q;++w)if(z[w]===z[q]){G++;continue a}this[q-G]=z[q]}A.length=B-G;A.value=p.className;A[" uCL"]=p;V?(V(p,"classList",{enumerable:1,get:function(){return C},configurable:0,set:function(H){L=1;p.className=A.value=H+="";L=0;var J=H.trim().split(m);H=A.length;var O=0,P=A.length=J.length,D=0;a:for(;O!==P;++O){for(var M=0;M!==O;++M)if(J[M]===
J[O]){D++;continue a}C[O-D]=J[O]}for(J=P-D;J<H;++J)delete C[J]}}),V(p," uCLp",{enumerable:0,configurable:0,writeable:0,value:protoObj.prototype}),V(A," uCL",{enumerable:0,configurable:0,writeable:0,value:p})):(p.classList=C,p[" uCL"]=C,p[" uCLp"]=protoObj.prototype);p.attachEvent("onpropertychange",u)}var F=r.document,N=r.Object,Z=N.prototype.hasOwnProperty,V=N.defineProperty,W=0,L=0;E.prototype.toString=E.prototype.toLocaleString=function(){return this.value};E.prototype.add=function(){var p=0,A=
arguments.length,C=this[" uCL"],z=C[" uCLp"];a:for(;p!==A;++p){var q=arguments[p]+"";U("add",q);for(var B=0,G=z.length,w=q;B!==G;++B)if(this[B]===q)continue a;else w+=" "+this[B];this[G]=q;z.length+=1;z.value=w}L=1;C.className=z.value;L=0};E.prototype.remove=function(){for(var p=0,A=arguments.length,C,z=this[" uCL"],q=z[" uCLp"];p!==A;++p){C=arguments[p]+"";U("remove",C);for(var B=0,G=q.length,w="",H=0;B!==G;++B)H?this[B-1]=this[B]:this[B]!==C?w+=this[B]+" ":H=1;H&&(delete this[G],--q.length,q.value=
w)}L=1;z.className=q.value;L=0};r.DOMTokenList=E;try{r.Object.defineProperty(r.Element.prototype,"classList",{enumerable:1,get:function(p){Z.call(this,"classList")||e(this);return this.classList},configurable:0,set:function(p){this.className=p}})}catch(p){r[" uCL"]=e,F.documentElement.firstChild.appendChild(F.createElement("style")).styleSheet.cssText='_*{x-uCLp:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}[class]{x-uCLp/**/:expression(!this.hasOwnProperty("classList")&&window[" uCL"](this))}'}}(x);
(function(r,E){r.item||(r.item=function(u){u=this[u];return void 0===u?null:u});r.toggle&&!1===E.toggle("a",0)||(r.toggle=function(u){if(1<arguments.length)return this[arguments[1]?"add":"remove"](u),!!arguments[1];var e=this.value;return this.remove(e),e===this.value&&(this.add(u),!0)});r.replace&&"boolean"===typeof E.replace("a","b")||(r.replace=function(u,e){U("replace",u);U("replace",e);var F=this.value;return this.remove(u),this.value!==F&&(this.add(e),!0)});r.contains||(r.contains=function(u){for(var e=
0,F=this.length;e!==F;++e)if(this[e]===u)return!0;return!1});r.forEach||(r.forEach=function(u){if(1===arguments.length)for(var e=0,F=this.length;e!==F;++e)u(this[e],e,this);else{e=0;F=this.length;for(var N=arguments[1];e!==F;++e)u.call(N,this[e],e,this)}});r.entries||(r.entries=function(){var u=0,e=this;return{next:function(){return u<e.length?{value:[u,e[u++]],done:!1}:{done:!0}}}});r.values||(r.values=function(){var u=0,e=this;return{next:function(){return u<e.length?{value:e[u++],done:!1}:{done:!0}}}});
r.keys||(r.keys=function(){var u=0,e=this;return{next:function(){return u<e.length?{value:u++,done:!1}:{done:!0}}}})})(x.DOMTokenList.prototype,x.document.createElement("div").classList)})(window);(function(){if("function"===typeof window.CustomEvent)return!1;window.CustomEvent=function(x,m){m=m||{bubbles:!1,cancelable:!1,detail:null};var Q=document.createEvent("CustomEvent");Q.initCustomEvent(x,m.bubbles,m.cancelable,m.detail);return Q}})();fcdscLoad();