G.A.T.E-Research/ressources/The DARK Truth_ They Diagnose Indigo Children With ADHD To Stop Them From Evolving – Awareness Act_files/fbevents.js.Download
2022-06-05 10:32:50 +01:00

25 lines
32 KiB
Plaintext

/**
* Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Platform Policy
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
fbq.version="2.8.0";
fbq.pendingConfigs=["global_config"];
(function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){var g=a.fbq;g.execStart=a.performance&&a.performance.now&&a.performance.now();if(!function(){var o=a.postMessage||function(){};if(!g){o({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*");if("error"in console)console.error("Facebook Pixel Error: Pixel code is not installed correctly on this page");return false}return true}())return;"use strict";if(!g.__fbeventsModules){g.__fbeventsModules={};g.__fbeventsResolvedModules={};g.getFbeventsModules=function(o){if(!g.__fbeventsResolvedModules[o])g.__fbeventsResolvedModules[o]=g.__fbeventsModules[o]();return g.__fbeventsResolvedModules[o]};g.fbIsModuleLoaded=function(o){return!!g.__fbeventsModules[o]};g.ensureModuleRegistered=function(o,e){if(!g.fbIsModuleLoaded(o))g.__fbeventsModules[o]=e}}g.ensureModuleRegistered("SignalsFBEventsPlugin",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";function h(n){this.plugin=n;this.__fbEventsPlugin=1;return this}e.exports=h})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("undefined",function(){return undefined});"use strict";var h=g.getFbeventsModules("SignalsFBEventsPlugin"),i={AUTO_CONFIG_OPT_OUT:1<<0,AUTO_CONFIG:1<<1,CONFIG_LOADING:1<<2,SUPPORTS_DEFINE_PROPERTY:1<<3,SUPPORTS_SEND_BEACON:1<<4,HAS_INVALIDATED_PII:1<<5},j=false;function k(){try{Object.defineProperty({},"test",{})}catch(o){return false}return true}function l(){return!!(a.navigator&&a.navigator.sendBeacon)}function m(o,p){return o?p:0}var n=new h(function(g,o){if(j)return;var p={};g.on("pii_invalidated",function(q){if(q!=null)p[typeof q==="string"?q:q.id]=true});g.on("getCustomParameters",function(q){if(q!=null){var r=o.optIns,s=m(r.isOptedOut(q.id,"AutomaticSetup"),i.AUTO_CONFIG_OPT_OUT),t=m(r.isOptedIn(q.id,"AutomaticSetup"),i.AUTO_CONFIG),u=m(g.disableConfigLoading!==true,i.CONFIG_LOADING),v=m(k(),i.SUPPORTS_DEFINE_PROPERTY),w=m(l(),i.SUPPORTS_SEND_BEACON),x=m(q!=null&&p[q.id],i.HAS_INVALIDATED_PII),y=s|t|u|v|w|x;return{o:y}}return{}});j=true});n.OPTIONS=i;e.exports=n;if(g.registerPlugin)g.registerPlugin("fbevents.plugins.opttracking",e.exports);g.ensureModuleRegistered("fbevents.plugins.opttracking",function(){return e.exports})})();return e.exports})(window,document,location,history);
(function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){var g=a.fbq;g.execStart=a.performance&&a.performance.now&&a.performance.now();if(!function(){var A=a.postMessage||function(){};if(!g){A({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*");if("error"in console)console.error("Facebook Pixel Error: Pixel code is not installed correctly on this page");return false}return true}())return;"use strict";var aa=function(){function A(B,C){var D=[],E=true,F=false,G=undefined;try{for(var H=B[typeof Symbol==="function"?Symbol.iterator:"@@iterator"](),I;!(E=(I=H.next()).done);E=true){D.push(I.value);if(C&&D.length===C)break}}catch(J){F=true;G=J}finally{try{if(!E&&H["return"])H["return"]()}finally{if(F)throw G}}return D}return function(B,C){if(Array.isArray(B))return B;else if((typeof Symbol==="function"?Symbol.iterator:"@@iterator")in Object(B))return A(B,C);else throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ba=typeof Symbol==="function"&&typeof (typeof Symbol==="function"?Symbol.iterator:"@@iterator")==="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol==="function"&&A.constructor===Symbol&&A!==(typeof Symbol==="function"?Symbol.prototype:"@@prototype")?"symbol":typeof A};function ca(A){if(Array.isArray(A)){for(var B=0,C=Array(A.length);B<A.length;B++)C[B]=A[B];return C}else return Array.from(A)}if(!g.__fbeventsModules){g.__fbeventsModules={};g.__fbeventsResolvedModules={};g.getFbeventsModules=function(A){if(!g.__fbeventsResolvedModules[A])g.__fbeventsResolvedModules[A]=g.__fbeventsModules[A]();return g.__fbeventsResolvedModules[A]};g.fbIsModuleLoaded=function(A){return!!g.__fbeventsModules[A]};g.ensureModuleRegistered=function(A,e){if(!g.fbIsModuleLoaded(A))g.__fbeventsModules[A]=e}}g.ensureModuleRegistered("SignalsParamList",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A="deep",B="shallow";function C(E){if(typeof JSON==="undefined"||JSON===null||!JSON.stringify)return Object.prototype.toString.call(E);else return JSON.stringify(E)}function D(E){if(E===null||E===undefined)return true;var F=typeof E==="undefined"?"undefined":ba(E);return F==="number"||F==="boolean"||F==="string"}function h(E){this._params=[];this._piiTranslator=E}h.ERROR_PII_WITH_NO_TRANSLATOR="Provide a PII Translation function in order to append PII data to the ParamList.";h.prototype.addRange=function(E){var F=this;E.each(function(G,H){return F.append(G,H)})};h.prototype.containsKey=function(E){for(var F=0;F<this._params.length;F++)if(this._params[F].name===E)return true;return false};h.prototype.get=function(E){var F=E;for(var G=0;G<this._params.length;G++)if(this._params[G].name===F)return this._params[G].value;return null};h.prototype.append=function(E,F,G){this._append(encodeURIComponent(E),F,A,G);return this};h.prototype.appendHash=function(E,F){for(var G in E)if(Object.prototype.hasOwnProperty.call(E,G))this._append(G,E[G],A,F);return this};h.fromHash=function(E,F){return new h(F).appendHash(E)};h.prototype._append=function(E,F,G,H){if(D(F))this._appendPrimitive(E,F,H);else if(G===A)this._appendObject(E,F,H);else this._appendPrimitive(E,C(F),H)};h.prototype._translateValue=function(E,F,G){if(typeof F==="boolean")return F?"true":"false";if(!G)return""+F;if(!this._piiTranslator)throw new Error(h.ERROR_PII_WITH_NO_TRANSLATOR);return this._piiTranslator(E,""+F)};h.prototype._appendPrimitive=function(E,F,G){if(F!=null){var H=this._translateValue(E,F,G);if(H!=null)this._params.push({name:E,value:H})}};h.prototype._appendObject=function(E,F,G){var H=null;for(var I in F)if(Object.prototype.hasOwnProperty.call(F,I)){var J=E+"["+encodeURIComponent(I)+"]";try{this._append(J,F[I],B,G)}catch(K){if(H==null)H=K}}if(H!=null)throw H};h.prototype.each=function(E){for(var F=0;F<this._params.length;F++){var G=this._params[F],H=G.name,I=G.value;E(H,I)}};h.prototype.toQueryString=function(){var E=[];this.each(function(F,G){E.push(F+"="+encodeURIComponent(G))});return E.join("&")};h.prototype.toFormData=function(){var E=new FormData();this.each(function(F,G){E.append(F,G)});return E};e.exports=h})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsUtils",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A="console",B="error",C="Facebook Pixel Error",D="Facebook Pixel Warning",E="warn",h=g.getFbeventsModules("SignalsParamList"),F=Object.prototype.toString,G=!("addEventListener"in b),H=function H(){},I=a[A]||{},J=a.postMessage||H;function ka(U){return Array.isArray?Array.isArray(U):F.call(U)==="[object Array]"}function ma(U){return typeof U==="number"||typeof U==="string"&&/^\d+$/.test(U)}var K={};function r(U){if(Object.prototype.hasOwnProperty.call(K,U.message)===false){K[U.message]=true;q(U)}}function q(U){try{J({action:"FB_LOG",logType:C,logMessage:U.toString()},"*")}catch(V){}try{var W=Math.random();if(W<.01){var X=new h(null);X.append("p","pixel");X.append("v",a.fbq&&a.fbq.version?a.fbq.version:"unknown");X.append("e",U.toString());if(U instanceof Error){X.append("f",U.fileName);X.append("s",U.stackTrace||U.stack)}Ra(X,"https://connect.facebook.net/log/error")}}catch(V){}if(B in I)I[B](C+": "+U.toString())}function L(U){J({action:"FB_LOG",logType:D,logMessage:U},"*");if(E in I)I[E](D+": "+U)}function M(U,V,W){V=G?"on"+V:V;var X=G?U.attachEvent:U.addEventListener,Y=G?U.detachEvent:U.removeEventListener,Z=function Z(){if(Y)Y.call(U,V,Z,false);W()};if(X)X.call(U,V,Z,false)}function N(U,V,W){var X=U[V],Y=na(W);U[V]=function(){var Z=X.apply(this,arguments);Y.apply(this,arguments);return Z}}var O=Object.prototype.hasOwnProperty,P=!{toString:null}.propertyIsEnumerable("toString"),Q=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],R=Q.length;function p(U){if(Object.keys)return Object.keys(U);if((typeof U==="undefined"?"undefined":ba(U))!=="object"&&(typeof U!=="function"||U===null))throw new TypeError("Object.keys called on non-object");var V=[];for(var W in U)if(O.call(U,W))V.push(W);if(P)for(var X=0;X<R;X++)if(O.call(U,Q[X]))V.push(Q[X]);return V}function S(U,V){if(Array.prototype.map)return Array.prototype.map.call(U,V);var W=void 0,X=void 0;if(U==null)throw new TypeError(" array is null or not defined");var Y=Object(U),Z=Y.length>>>0;if(typeof V!=="function")throw new TypeError(V+" is not a function");W=new Array(Z);X=0;while(X<Z){var $,Ua;if(X in Y){$=Y[X];Ua=V.call(null,$,X,Y);W[X]=Ua}X++}return W}function T(U){if(this==null)throw new TypeError("Array.prototype.some called on null or undefined");if(typeof U!=="function")throw new TypeError();var V=Object(this),W=V.length>>>0,X=arguments.length>=2?arguments[1]:void 0;for(var Y=0;Y<W;Y++)if(Y in V&&U.call(X,V[Y],Y,V))return true;return false}function la(U){return p(U).length===0}function Pa(U){if(this===void 0||this===null)throw new TypeError();var V=Object(this),W=V.length>>>0;if(typeof U!=="function")throw new TypeError();var X=[],Y=arguments.length>=2?arguments[1]:void 0;for(var Z=0;Z<W;Z++)if(Z in V){var $=V[Z];if(U.call(Y,$,Z,V))X.push($)}return X}function o(U){this.items=U==null?[]:U}o.prototype.has=function(U){return T.call(this.items,function(V){return V===U})};o.prototype.add=function(U){this.items.push(U)};function na(U){if(typeof U!=="function")return U;return function(){try{return U.apply(this,arguments)}catch(V){Ta.logError(V)}return undefined}}function Qa(U,V){var W=U.toQueryString(),X=V+"?"+W;if(X.length<2048){var Y=new Image();Y.src=X;return true}return false}function Ra(U,V){var W="fb"+Math.random().toString().replace(".",""),X=b.createElement("form");X.method="post";X.action=V;X.target=W;X.acceptCharset="utf-8";X.style.display="none";var Y=!!(a.attachEvent&&!a.addEventListener),Z=Y?'<iframe name="'+W+'">':"iframe",$=b.createElement(Z);$.src="javascript:false";$.id=W;$.name=W;X.appendChild($);M($,"load",function(){U.each(function(W,Ua){var Va=b.createElement("input");Va.name=W;Va.value=Ua;X.appendChild(Va)});M($,"load",function(){if(X.parentNode)X.parentNode.removeChild(X)});X.submit()});b.body.appendChild(X);return true}function Sa(U,V){if(a.navigator&&a.navigator.sendBeacon){a.navigator.sendBeacon(V,U.toFormData());return true}return false}var Ta={injectMethod:N,isArray:ka,isEmptyObject:la,isNumber:ma,keys:p,listenOnce:M,logError:q,logErrorOnce:r,logWarning:L,makeSafe:na,map:S,sendGET:Qa,sendPOST:Ra,sendBeacon:Sa,FBSet:o,each:function n(U,V){S.call(this,U,V)},some:function U(V,W){return T.call(V,W)},filter:function U(V,W){return Pa.call(V,W)}};e.exports=Ta})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsEvents",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsFBEventsUtils"),q=A.logError,p=A.keys,B=0;function j(){this._listeners={}}j.prototype.on=function(D,E){var F=this,G=B++;if(!this._listeners[D])this._listeners[D]={};this._listeners[D][G.toString()]=E;return function(){F._unsubscribe(D,G.toString())}};j.prototype.once=function(D,E){var F=this,G=arguments,H=this.on(D,function(){H();return E.apply(F,G)});return H};j.prototype.trigger=function(D){var E=this;for(var F=arguments.length,G=Array(F>1?F-1:0),H=1;H<F;H++)G[H-1]=arguments[H];if(!this._listeners[D])return[];return p(this._listeners[D]).map(function(I){try{if(!E._listeners[D][I])return[];return E._listeners[D][I].apply(null,G)}catch(J){q(J)}return null})};j.prototype._unsubscribe=function(D,E){var F=this._listeners[D];if(F&&F[E]){delete F[E];if(p(F).length===0)delete this._listeners[D]}};function C(){return new j()}var x=new j(),ia=x.on.bind(x),ja=x.once.bind(x),m=x.trigger.bind(x);e.exports={on:ia,once:ja,trigger:m,instance:x,spawn:C,PixelEvents:j}})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsPixelEndpoint",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsEvents"),B=g.getFbeventsModules("SignalsFBEventsUtils"),C=B.sendGET,D=B.sendPOST,E=B.sendBeacon,h=g.getFbeventsModules("SignalsParamList"),m=A.trigger,F={ENDPOINT:"https://www.facebook.com/tr/"},G=a.top!==a,H=false,I=function I(L){H=L};function J(L,M,N,O){L.append("id",M);L.append("ev",N);L.append("dl",c.href);L.append("rl",b.referrer);L.append("if",G);L.append("ts",new Date().valueOf());L.append("cd",O);return L}function y(L,M,N,O,P){var Q=new h(P);J(Q,L,M,N);if(O)Q.addRange(O);if(H&&E(Q,F.ENDPOINT)){m("fired","BEACON",Q);return}if(C(Q,F.ENDPOINT)){m("fired","GET",Q);return}if(D(Q,F.ENDPOINT)){m("fired","POST",Q);return}throw new Error("No working send method found for this fire.")}function K(L,M,N,O,P){if(a.navigator&&a.navigator.sendBeacon){var Q=new h(P);J(Q,L,M,N);if(O)Q.addRange(O);E(Q,F.ENDPOINT)}}e.exports={CONFIG:F,sendEvent:y,sendBeaconPII:K,setUseBeacon:I}})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsEventValidation",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=/^[+-]?\d+(\.\d+)?$/,B="number",C="currency_code",D={AED:1,ARS:1,AUD:1,BOB:1,BRL:1,CAD:1,CHF:1,CLP:1,CNY:1,COP:1,CRC:1,CZK:1,DKK:1,EUR:1,GBP:1,GTQ:1,HKD:1,HNL:1,HUF:1,IDR:1,ILS:1,INR:1,ISK:1,JPY:1,KRW:1,MOP:1,MXN:1,MYR:1,NIO:1,NOK:1,NZD:1,PEN:1,PHP:1,PLN:1,PYG:1,QAR:1,RON:1,RUB:1,SAR:1,SEK:1,SGD:1,THB:1,TRY:1,TWD:1,USD:1,UYU:1,VEF:1,VND:1,ZAR:1},E={value:{type:B,isRequired:true},currency:{type:C,isRequired:true}},F={PageView:{},ViewContent:{},Search:{},AddToCart:{},AddToWishlist:{},InitiateCheckout:{},PixelInitialized:{},AddPaymentInfo:{},Purchase:{validationSchema:E},Lead:{},CompleteRegistration:{},CustomEvent:{validationSchema:{event:{isRequired:true}}}},G={agent:true},H=Object.prototype.hasOwnProperty;function I(L,M,N){this.error=null;this.warnings=[];this.eventName=L;this.params=M||{};this.metadata=N}I.prototype.validateMetadata=function(){if(this.metadata){var L=this.metadata.toLowerCase(),M=G[L];if(!M)return this._error("Unsupported metadata argument: "+L)}return this};I.prototype.validateEvent=function(){var L=this.eventName;if(!L)return this;var M=F[L];if(!M){this.warnings.push("You are sending a non-standard event '"+L+"'. The preferred way to send events is using trackCustom. See https://www.facebookmarketingdevelopers.com/pixels/up#sec-custom for more information");return this}var N=M.validationSchema;for(var O in N)if(H.call(N,O)){var P=N[O];if(P){if(P.isRequired&&!H.call(this.params,O))return this._error('Required parameter "'+O+'" is missing for event "'+L+'"');if(P.type&&typeof P.type==="string")if(!this._validateParam(O,P.type))return this._error('Parameter "'+O+'" is invalid for event "'+L+'"')}}return this};I.prototype._validateParam=function(L,M){var N=this.params[L];switch(M){case B:var O=(typeof N==="string"||typeof N==="number")&&A.test(""+N);if(O&&Number(N)<0)this.warnings.push('Parameter "'+L+'" is negative for event "'+(this.eventName?this.eventName:"null")+'"');return O;case C:return typeof N==="string"&&!!D[N.toUpperCase()]}return true};I.prototype._error=function(L){this.error=L;return this};function J(L){return new I(null,null,L).validateMetadata()}function K(L,M){return new I(L,M).validateEvent()}e.exports={validateMetadata:J,validateEvent:K,Validator:I}})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsOptIn",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsFBEventsUtils"),n=A.each,B=A.filter,p=A.keys,C=A.some;function D(F){n(p(F),function(G){if(C(F[G],function(H){return Object.prototype.hasOwnProperty.call(F,H)}))throw new Error("Circular subOpts are not allowed. "+G+" depends on another subOpt")})}function E(F){this._opts={};this._subOpts=F||{};D(this._subOpts)}E.prototype._getOpts=function(F){return[].concat(ca(Object.prototype.hasOwnProperty.call(this._subOpts,F)?this._subOpts[F]:[]),[F])};E.prototype._setOpt=function(F,G,H){if(!this._opts[G])this._opts[G]={};this._opts[G][F]=H};E.prototype.optIn=function(F,G){var H=this,I=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;n(this._getOpts(G),function(J){var K=I==true&&H.isOptedOut(F,G);if(!K)H._setOpt(F,J,true)});return this};E.prototype.optOut=function(F,G){var H=this;n(this._getOpts(G),function(I){return H._setOpt(F,I,false)});return this};E.prototype.isOptedIn=function(F,G){return this._opts[G]&&this._opts[G][F]===true};E.prototype.isOptedOut=function(F,G){return this._opts[G]&&this._opts[G][F]===false};E.prototype.listPixelIds=function(F){var G=this;return this._opts[F]?B(p(this._opts[F]),function(H){return G._opts[F][H]}):[]};e.exports=E})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsQE",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=function A(){return Math.random()};function B(D){var B=A();for(var E=0;E<D.length;E++){var F=D[E],G=F.passRate,H=aa(F.range,2),I=H[0],J=H[1];if(G<0||G>1)throw new Error("passRate should be between 0 and 1 in "+F.name);if(B>=I&&B<J){var K=A()<G;return{name:F.name,isInExperimentGroup:K,code:F.code+(K?"1":"0")}}}return null}function C(D){this._groups=D;this._result=null;this._hasRolled=false}C.prototype={get:function D(E){if(!this._hasRolled){var F=B(this._groups);if(F!=null)this._result=F;this._hasRolled=true}if(!E)return this._result;if(this._result!=null&&this._result.name===E)return this._result;return null}};e.exports=C})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsPluginPath",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=/([/]en_US)?[/](fbevents|signals)([.]js|[/])/;function B(){var E=null,F=null,G=b.getElementsByTagName("script");for(var H=0;H<G.length&&!E;H++){var I=G[H].src.split(A);if(I.length>1){E=I[0];F=G[H]}}return{baseURL:E,scriptElement:F}}var C=null;function D(){if(!C)C=B();return C}e.exports={get:D}})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsFireLock",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsFBEventsUtils"),n=A.each,p=A.keys;function B(){this._locks={};this._callbacks=[]}B.prototype={lock:function C(D){this._locks[D]=true},release:function C(D){if(Object.prototype.hasOwnProperty.call(this._locks,D)){delete this._locks[D];if(p(this._locks).length===0)n(this._callbacks,function(E){return E(D)})}},onUnlocked:function C(D){this._callbacks.push(D)},isLocked:function C(){return p(this._locks).length>0}};B.global=new B();B.global.lockPlugin=function(C){this.lock("plugin:"+C)};B.global.releasePlugin=function(C){this.release("plugin:"+C)};B.global.lockConfig=function(C){this.lock("config:"+C)};B.global.releaseConfig=function(C){this.release("config:"+C)};e.exports=B})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsConstants",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";e.exports={ERRORS:{PREFIX:function A(B,C){if(B!=null)return"[ID:"+(typeof B==="string"?B:B.id)+"] "+C;else return C},PII_INVALID:function A(B,C){return"An invalid "+B+" was specified for '"+C+"'. This data will not be sent with any events for this Pixel."}}}})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("SignalsFBEventsFBQ",function(){return function(a,b,c,d){var e={exports:{}},f=e.exports;(function(){"use strict";var A=g.getFbeventsModules("SignalsFBEventsOptIn"),B=g.getFbeventsModules("SignalsFBEventsQE"),h=g.getFbeventsModules("SignalsParamList"),i=g.getFbeventsModules("SignalsPixelEndpoint"),ea=g.getFbeventsModules("SignalsFBEventsPluginPath"),k=g.getFbeventsModules("SignalsFBEventsUtils"),l=g.getFbeventsModules("SignalsEventValidation"),fa=g.getFbeventsModules("SignalsFBEventsFireLock"),ga=g.getFbeventsModules("SignalsFBEventsConstants"),ha=ga.ERRORS,n=k.each,p=k.keys,q=k.logError,r=k.logErrorOnce,C=k.map,D=k.some,E={Dwell:true,InferredEvents:true,Microdata:true,FPCookie:true,Sessions:true,TimeSpent:true,Interaction:true},F=["InferredEvents","Microdata"],G={AutomaticSetup:F},H={Dwell:["dwell"],FPCookie:["fpcookie"],InferredEvents:["inferredevents","identity"],Microdata:["microdata","identity"],Sessions:["sessions"],TimeSpent:["timespent"],Interaction:["interaction","timespent"]};function I(M){return!!(E[M]||G[M])}function J(M,N){var O=ea.get();if(typeof O.baseURL!="string"||!(O.scriptElement&&O.scriptElement.parentNode))throw new Error("fbevents script element not found.");var P=O.baseURL+"/signals/config/"+M+"?v="+N,Q=b.createElement("script");Q.src=P;Q.async=true;if(O.scriptElement&&O.scriptElement.parentNode)O.scriptElement.parentNode.insertBefore(Q,O.scriptElement)}var K={VALID_FEATURES:E,optIn:function M(N,O){var P=this,Q=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(typeof O!=="string"||!I(O))throw new Error('Invalid Argument: "'+O+'" is not a valid opt-in feature');if(I(O)){this.optIns.optIn(N,O,Q);n([O].concat(ca(G[O]||[])),function(R){if(H[R])n(H[R],function(S){return P.fbq.loadPlugin(S)})})}return this},optOut:function M(N,O){this.optIns.optOut(N,O);return this},trackSingleCustom:function M(N,O,P){var Q=typeof N==="string"?N:N.id,R=this.getDefaultSendData(Q,O);R.customData=P;this.fire(R,false);return this},enqueue:function M(){for(var N=arguments.length,O=Array(N),P=0;P<N;P++)O[P]=arguments[P];this.queue.append(O);return this},_validateSend:function M(N,O){if(!N.eventName||!N.eventName.length)throw new Error("Event name not specified");if(!N.pixelId||!N.pixelId.length)throw new Error("PixelId not specified");if(N.set)n(C(p(N.set),function(Q){return l.validateMetadata(Q)}),function(Q){if(Q.error)throw new Error(Q.error);if(Q.warnings.length)n(Q.warnings,k.logWarning)});if(O){var P=l.validateEvent(N.eventName,N.customData||{});if(P.error)throw new Error(P.error);if(P.warnings&&P.warnings.length)n(P.warnings,k.logWarning)}return this},fire:function M(N){var O=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;this._validateSend(N,O);if(N.userData&&p(N.userData).length>0&&!this.fbq.loadPlugin("identity")){this.enqueue("fire",N);return this}var P=new h(this.fbq.piiTranslator);try{P.append("ud",N.userData,true)}catch(Q){this.fbq.trigger("pii_invalidated",N.pixelId,Q.message);r(new Error(ha.PREFIX(N.pixelId,Q.message)))}P.append("v",this.fbq.version);N.set&&N.set.agent&&P.append("a",N.set.agent);var R=this.fbq.trigger("getCustomParameters",{id:N.pixelId});n(R,function(S){return n(p(S),function(T){if(P.containsKey(T))q(new Error("Custom parameter "+T+" has already been specified."));else P.append(T,S[T])})});i.sendEvent(N.pixelId,N.eventName,N.customData,P);return this},callMethod:function ya(M){var N=M[0],O=Array.prototype.slice.call(M,1);if(typeof this[N]==="function")try{this[N].apply(this,O)}catch(P){q(P)}else q(new Error("Invalid FBQ method "+N))},getDefaultSendData:function M(N,O){var P=this.getPixel(N),Q={pixelId:N,eventName:O};if(P){if(P.userData)Q.userData=P.userData;if(P.agent)Q.set={agent:P.agent};else if(this.fbq.agent)Q.set={agent:this.fbq.agent}}return Q},getOptedInPixels:function M(N){var O=this;return this.optIns.listPixelIds(N).map(function(P){return O.pixelsByID[P]})},ensurePixel:function M(N){if(!Object.prototype.hasOwnProperty.call(this.pixelsByID,N))throw new Error('Pixel "'+N+'" not found')},getPixel:function M(N){this.ensurePixel(N);return this.pixelsByID[N]},loadConfig:function M(N){if(this.fbq.disableConfigLoading||Object.prototype.hasOwnProperty.call(this.configsLoaded,N))return;this.locks.lockConfig(N);if(!this.fbq.pendingConfigs||D(this.fbq.pendingConfigs,function(O){return O===N})==false)J(N,this.VERSION)},setExperiments:function M(N){this._defaultExperiments=new B(N)},getExperiments:function M(){return this._defaultExperiments},configLoaded:function M(N){this.configsLoaded[N]=true;this.locks.releaseConfig(N);this.fbq.trigger("configLoaded",N)}};function L(g,w){var M=this;this.VERSION=g.version;this.pixelsByID=w;this.fbq=g;this.optIns=new A(G);this.configsLoaded={};this._defaultExperiments=new B([]);this.locks=fa.global;n(g.pendingConfigs||[],function(N){return M.locks.lockConfig(N)})}L.prototype=K;e.exports=L})();return e.exports}(a,b,c,d)});g.ensureModuleRegistered("undefined",function(){return undefined});"use strict";var g=a.fbq;g.execStart=a.performance&&typeof a.performance.now==="function"?a.performance.now():null;var h=g.getFbeventsModules("SignalsParamList"),i=g.getFbeventsModules("SignalsPixelEndpoint"),j=g.getFbeventsModules("SignalsEvents"),k=g.getFbeventsModules("SignalsFBEventsUtils"),l=g.getFbeventsModules("SignalsEventValidation"),da=g.getFbeventsModules("SignalsFBEventsFBQ"),ea=g.getFbeventsModules("SignalsFBEventsPluginPath"),fa=g.getFbeventsModules("SignalsFBEventsFireLock"),ga=g.getFbeventsModules("SignalsFBEventsConstants"),ha=ga.ERRORS,ia=j.on,ja=j.once,m=j.trigger,n=k.each,o=k.FBSet,ka=k.isArray,la=k.isEmptyObject,ma=k.isNumber,p=k.keys,q=k.logError,r=k.logErrorOnce,na=k.makeSafe,s=fa.global;function oa(A){return g.getFbeventsModules(A)}function pa(A){return g.fbIsModuleLoaded(A)}var t={},u=-1,qa=Array.prototype.slice,ra=Object.prototype.hasOwnProperty,sa=c.href,ta=false,ua=false,v=[],w={},va=b.referrer,wa={PageView:new o(),PixelInitialized:new o()},x=new da(g,w);function xa(A){for(var B in A)if(ra.call(A,B))this[B]=A[B];return this}function ya(A){try{if(s.isLocked()){g.queue.push(arguments);return}var B=qa.call(arguments),C=B.length===1&&ka(B[0]);if(C)B=B[0];if(typeof B[0]!=="string")q(new Error("The first argument to fbq must be a method name."));if(A.slice(0,6)==="report"){var D=A.slice(6);if(D==="CustomEvent"){D=(B[1]||{}).event||D;B=["trackCustom",D].concat(B.slice(1))}else B=["track",D].concat(B.slice(1))}A=B.shift();switch(A){case"addPixelId":ta=true;Aa.apply(this,B);break;case"init":ua=true;Aa.apply(this,B);break;case"set":za.apply(this,B);break;case"track":if(ma(B[0])){Fa.apply(this,B);break}if(C){Ea.apply(this,B);break}Da.apply(this,B);break;case"trackCustom":Ea.apply(this,B);break;case"send":Ga.apply(this,B);break;case"on":ia.apply(null,B);break;case"loadPlugin":z(B[0]);break;default:x.callMethod(arguments);break}}catch(E){q(E)}}function za(A){for(var B=arguments.length,C=Array(B>1?B-1:0),D=1;D<B;D++)C[D-1]=arguments[D];switch(A){case"endpoint":var E=C[0];if(typeof E!=="string")throw new Error("endpoint value must be a string");i.CONFIG.ENDPOINT=E;break;case"autoConfig":var F=C[0],G=C[1],H=F===true||F==="true"?"optIn":"optOut";if(typeof G!=="string")throw new Error("Invalid pixelID supplied to set autoConfig.");x.callMethod([H,G,"AutomaticSetup"]);break;case"experiments":var I=C[0];x.setExperiments(I);break;default:var J=C[0],K=C[1];if(typeof A!=="string")throw new Error("The metadata setting provided in the 'set' call is invalid.");if(typeof J!=="string")throw new Error("The metadata value must be a string.");if(typeof K!=="string")throw new Error("Invalid pixelID supplied to set call.");Ca(A,J,K);break}}g._initHandlers=[];g._initsDone={};function Aa(A,B,C){u=u===-1?Date.now():u;if(ra.call(w,A)){if(B&&la(w[A].userData)){w[A].userData=B;z("identity")}else k.logError(new Error("Duplicate Pixel ID: "+A));return}var D={agent:C?C.agent:null,id:A,userData:B||{},eventCount:0};v.push(D);w[A]=D;if(B!=null)z("identity");Ba();x.loadConfig(A)}function Ba(){for(var A=0;A<g._initHandlers.length;A++){var B=g._initHandlers[A];if(!g._initsDone[A])g._initsDone[A]={};for(var C=0;C<v.length;C++){var D=v[C];if(!g._initsDone[A][D.id]){g._initsDone[A][D.id]=true;B(D)}}}}function Ca(A,B,C){var D=l.validateMetadata(A);if(D.error)k.logError(D.error);if(D.warnings)for(var E=0;E<D.warnings.length;E++)k.logWarning(D.warnings[E]);if(ra.call(w,C)){for(var F=0,G=v.length;F<G;F++)if(v[F].id===C){v[F][A]=B;break}}else k.logWarning("Trying to set argument "+B+(" for uninitialized pixel ID "+C))}function Da(A,B){B=B||{};var C=l.validateEvent(A,B);if(C.error)k.logError(C.error);if(C.warnings)for(var D=0;D<C.warnings.length;D++)k.logWarning(C.warnings[D]);if(A==="CustomEvent"&&typeof B.event==="string")A=B.event;Ea.call(this,A,B)}function Ea(A,B){for(var C=0,D=v.length;C<D;C++){var E=v[C];if(!(A==="PageView"&&this.allowDuplicatePageViews)&&Object.prototype.hasOwnProperty.call(wa,A)&&wa[A].has(E.id))continue;y(E,A,B);if(Object.prototype.hasOwnProperty.call(wa,A))wa[A].add(E.id)}}function Fa(A,B){y(null,A,B)}function Ga(A,B){for(var C=0,D=v.length;C<D;C++)y(v[C],A,B)}function Ha(A){var B=new h(g.piiTranslator);try{B.append("ud",A&&A.userData||{},true)}catch(C){m("pii_invalidated",A,C.message);r(new Error(ha.PREFIX(A,C.message)))}B.append("v",g.version);B.append("a",A&&A.agent?A.agent:g.agent);if(A){B.append("ec",A.eventCount);A.eventCount++}var D=m("getCustomParameters",A);n(D,function(E){return n(p(E),function(F){if(B.containsKey(F))q(new Error("Custom parameter "+F+" has already been specified."));else B.append(F,E[F])})});B.append("it",u);return B}function y(A,B,C){i.sendEvent(A?A.id:null,B,C,Ha(A))}function Ia(){while(g.queue.length&&!s.isLocked()){var A=g.queue.shift();ya.apply(g,A)}}function Ja(A){return"fbevents.plugins."+A}function z(A){if(/^[a-zA-Z]\w+$/.test(A)===false){q(new Error("'"+A+"' is an invalid plugin name."));return true}var B=Ja(A);if(t[B])return true;if(pa(B)){Ka(B,oa(B));return true}var C=ea.get();if(C.baseURL&&C.scriptElement){var D=C.baseURL+"/signals/plugins/"+A+".js?v="+g.version;if(!t[B]){s.lockPlugin(B);var E=b.createElement("script");E.src=D;E.async=true;if(C.scriptElement&&C.scriptElement.parentNode)C.scriptElement.parentNode.insertBefore(E,C.scriptElement)}}return false}function Ka(A,B){if(Object.prototype.hasOwnProperty.call(t,A))return;if(ra.call(B,"__fbEventsPlugin")&&B.__fbEventsPlugin===1){t[A]=B;t[A].plugin(g,x);m("pluginLoaded",A)}s.releasePlugin(A)}s.onUnlocked(function(){Ia()});if(g.pixelId){ta=true;Aa(g.pixelId)}if(ta&&ua||a.fbq!==a._fbq)k.logWarning("Multiple pixels with conflicting versions were detected on this page");if(v.length>1)k.logWarning("Multiple different pixels were detected on this page");function La(){if(g.disablePushState===true)return;if(!d.pushState||!d.replaceState)return;var A=na(function(){va=sa;sa=c.href;if(sa===va)return;var B=new xa({allowDuplicatePageViews:true});ya.call(B,"trackCustom","PageView")});k.injectMethod(d,"pushState",A);k.injectMethod(d,"replaceState",A);a.addEventListener("popstate",A,false)}ja("fired",function(){return La()});function Ma(A){g._initHandlers.push(A);Ba()}function Na(){return{pixelInitializationTime:u,pixels:v}}function Oa(g){g.instance=x;g.callMethod=ya;g.loadPlugin=z;g.registerPlugin=Ka;g._initHandlers=[];g._initsDone={};g.on=ia;g.once=ja;g.send=Ga;g.trigger=m;g.getEventCustomParameters=Ha;g.addInitHandler=Ma;g.getState=Na;g.init=Aa;g.set=za}Oa(a.fbq);Ia();e.exports={addInitHandler:function Ma(A){g._initHandlers.push(A);Ba()},doExport:Oa,getState:Na,getEventCustomParameters:Ha,sendEvent:y,loadPlugin:z};m("execEnd");m("initialized",g);if(g.registerPlugin)g.registerPlugin("fbevents",e.exports);g.ensureModuleRegistered("fbevents",function(){return e.exports})})();return e.exports})(window,document,location,history);
fbq.registerPlugin("global_config", {__fbEventsPlugin: 1, plugin: function(fbq, instance) { fbq.loadPlugin("opttracking");instance.configLoaded("global_config"); }});