if (self.CavalryLogger) { CavalryLogger.start_js(["kBHTB"]); } __d("PixelRatioConst",[],(function(a,b,c,d,e,f){e.exports={cookieName:"dpr"}}),null); __d("camelize",[],(function(a,b,c,d,e,f){e.exports=a;var g=/-(.)/g;function a(a){return a.replace(g,function(a,b){return b.toUpperCase()})}}),null); __d("getOpacityStyleName",[],(function(a,b,c,d,e,f){e.exports=a;var g=!1,h=null;function a(){if(!g){if(document.body&&"opacity"in document.body.style)h="opacity";else{var a=document.createElement("div");a.style.filter="alpha(opacity=100)";a.style.filter&&(h="filter")}g=!0}return h}}),null); __d("hyphenate",[],(function(a,b,c,d,e,f){e.exports=a;var g=/([A-Z])/g;function a(a){return a.replace(g,"-$1").toLowerCase()}}),null); __d("getStyleProperty",["camelize","hyphenate"],(function(a,b,c,d,e,f){e.exports=a;function g(a){return a==null?"":String(a)}function a(a,c){var d;if(window.getComputedStyle){d=window.getComputedStyle(a,null);if(d)return g(d.getPropertyValue(b("hyphenate")(c)))}if(document.defaultView&&document.defaultView.getComputedStyle){d=document.defaultView.getComputedStyle(a,null);if(d)return g(d.getPropertyValue(b("hyphenate")(c)));if(c==="display")return"none"}return a.currentStyle?c==="float"?g(a.currentStyle.cssFloat||a.currentStyle.styleFloat):g(a.currentStyle[b("camelize")(c)]):g(a.style&&a.style[b("camelize")(c)])}}),null); __d("StyleCore",["invariant","camelize","containsNode","ex","getOpacityStyleName","getStyleProperty","hyphenate"],(function(a,b,c,d,e,f,g){function h(a,b){a=n.get(a,b);return a==="auto"||a==="scroll"}var i=new RegExp("\\s*([^\\s:]+)\\s*:\\s*([^;('\"]*(?:(?:\\([^)]*\\)|\"[^\"]*\"|'[^']*')[^;(?:'\"]*)*)(?:;|$)","g");function j(a){var b={};a.replace(i,function(a,c,d){b[c]=d;return d});return b}function k(a){var b="";for(var c in a)a[c]&&(b+=c+":"+a[c]+";");return b}function l(a){return a!==""?"alpha(opacity="+a*100+")":""}function m(a,c,d){switch(b("hyphenate")(c)){case"font-weight":case"line-height":case"opacity":case"z-index":case"animation-iteration-count":case"-webkit-animation-iteration-count":break;case"width":case"height":var e=parseInt(d,10)<0;e&&g(0,826,a,c,d);default:isNaN(d)||!d||d==="0"||g(0,827,a,c,d,d+"px");break}}var n={set:function(a,c,d){m("Style.set",c,d);if(a==null)return;a=a.style;switch(c){case"opacity":b("getOpacityStyleName")()==="filter"?a.filter=l(d):a.opacity=d;break;case"float":a.cssFloat=a.styleFloat=d||"";break;default:try{a[b("camelize")(c)]=d}catch(a){throw new Error(b("ex")('Style.set: "%s" argument is invalid: %s',c,d))}}},apply:function(a,c){var d;for(d in c)m("Style.apply",d,c[d]);"opacity"in c&&b("getOpacityStyleName")()==="filter"&&(c.filter=l(c.opacity),delete c.opacity);var e=j(a.style.cssText);for(d in c){var f=c[d];delete c[d];var g=b("hyphenate")(d);for(var h in e)(h===g||h.indexOf(g+"-")===0)&&delete e[h];c[g]=f}Object.assign(e,c);a.style.cssText=k(e)},get:b("getStyleProperty"),getFloat:function(a,b){return parseFloat(n.get(a,b),10)},getOpacity:function(a){if(b("getOpacityStyleName")()==="filter"){var c=n.get(a,"filter");if(c){c=/(\d+(?:\.\d+)?)/.exec(c);if(c)return parseFloat(c.pop())/100}}return n.getFloat(a,"opacity")||1},isFixed:function(a){while(b("containsNode")(document.body,a)){if(n.get(a,"position")==="fixed")return!0;a=a.parentNode}return!1},getScrollParent:function(a){if(!a)return null;while(a&&a!==document.body){if(h(a,"overflow")||h(a,"overflowY")||h(a,"overflowX"))return a;a=a.parentNode}return window}};a=n;e.exports=a}),null); __d("Style",["StyleCore","$"],(function(a,b,c,d,e,f){a=babelHelpers["extends"]({},b("StyleCore"),{get:function(a,c){typeof a==="string"&&(a=b("$")(a));return b("StyleCore").get(a,c)},getFloat:function(a,c){typeof a==="string"&&(a=b("$")(a));return b("StyleCore").getFloat(a,c)}});e.exports=a}),null); __d("PlatformDialog",["cx","CSS","DOMEvent","DOMEventListener"],(function(a,b,c,d,e,f,g){var h;a=function(){"use strict";a.getInstance=function(){return h};function a(a,c,d){var e=this;h=this;this.$1=a;this.$2=c;this.$3=!1;b("DOMEventListener").add(this.$1,"submit",function(c){if(e.$3){new(b("DOMEvent"))(c).kill();return}e.$3=!0;d&&b("CSS").addClass(a,"_32qa")})}var c=a.prototype;c.getForm=function(){return this.$1};c.getDisplay=function(){return this.$2};c.hasBeenSubmitted=function(){return this.$3};return a}();a.RESPONSE="platform/dialog/response";e.exports=a}),null); __d("FBJSON",[],(function(a,b,c,d,e,f){e.exports={parse:JSON.parse,stringify:JSON.stringify}}),null); __d("BanzaiConsts",[],(function(a,b,c,d,e,f){a={SEND:"Banzai:SEND",OK:"Banzai:OK",ERROR:"Banzai:ERROR",SHUTDOWN:"Banzai:SHUTDOWN",BASIC:"basic",VITAL:"vital",BASIC_WAIT:6e4,BASIC_WAIT_COMET:2e3,VITAL_WAIT:1e3,BATCH_SIZE_LIMIT:64e3,EXPIRY:864e5,BATCH_TIMEOUT:1e4,LAST_STORAGE_FLUSH:"banzai:last_storage_flush",STORAGE_FLUSH_INTERVAL:12*60*6e4,ODS_ROUTE:"categorized_ods",POST_READY:0,POST_INFLIGHT:1,POST_SENT:2};e.exports=a}),null); __d("CurrentUser",["Cookie","CurrentUserInitialData"],(function(a,b,c,d,e,f){var g,h={getID:function(){return(g||(g=b("CurrentUserInitialData"))).USER_ID},getAccountID:function(){return(g||(g=b("CurrentUserInitialData"))).ACCOUNT_ID},getEmployeeWorkUserID:function(){return(g||(g=b("CurrentUserInitialData"))).WORK_USER_ID},getName:function(){return(g||(g=b("CurrentUserInitialData"))).NAME},getShortName:function(){return(g||(g=b("CurrentUserInitialData"))).SHORT_NAME},isLoggedIn:function(){return(g||(g=b("CurrentUserInitialData"))).USER_ID!=="0"},isLoggedInNow:function(){var a;if(!h.isLoggedIn())return!1;if((g||(g=b("CurrentUserInitialData"))).IS_INTERN_SITE)return!0;if((g||(g=b("CurrentUserInitialData"))).IS_WORK_USER)return!0;return(g||(g=b("CurrentUserInitialData"))).ORIGINAL_USER_ID!=null&&(g||(g=b("CurrentUserInitialData"))).ORIGINAL_USER_ID!=""?(g||(g=b("CurrentUserInitialData"))).ORIGINAL_USER_ID===b("Cookie").get("c_user"):(g||(g=b("CurrentUserInitialData"))).USER_ID===((a=b("Cookie").get("i_user"))!=null?a:b("Cookie").get("c_user"))},isEmployee:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_EMPLOYEE},isTestUser:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_TEST_USER},hasWorkUser:function(){return!!(g||(g=b("CurrentUserInitialData"))).HAS_WORK_USER},isWorkUser:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_WORK_USER},isGray:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_GRAY},isUnderage:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_UNDERAGE},isMessengerOnlyUser:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_MESSENGER_ONLY_USER},isDeactivatedAllowedOnMessenger:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_DEACTIVATED_ALLOWED_ON_MESSENGER},isMessengerCallGuestUser:function(){return!!(g||(g=b("CurrentUserInitialData"))).IS_MESSENGER_CALL_GUEST_USER},isBusinessPersonAccount:function(){return(g||(g=b("CurrentUserInitialData"))).IS_BUSINESS_PERSON_ACCOUNT},hasSecondaryBusinessPerson:function(){return(g||(g=b("CurrentUserInitialData"))).HAS_SECONDARY_BUSINESS_PERSON},getAppID:function(){return(g||(g=b("CurrentUserInitialData"))).APP_ID}};e.exports=h}),null); __d("BanzaiUtils",["BanzaiConsts","CurrentUser","FBLogger","WebSession","performanceAbsoluteNow"],(function(a,b,c,d,e,f){"use strict";var g,h,i={canSend:function(a){return a[2]>=(g||(g=b("performanceAbsoluteNow")))()-(h||(h=b("BanzaiConsts"))).EXPIRY},filterPost:function(a,c,d,e){if(e.overlimit)return!0;if(!e.sendMinimumOnePost&&a[4]+e.currentSize>(h||(h=b("BanzaiConsts"))).BATCH_SIZE_LIMIT)return!0;var f=a.__meta;if(f.status!=null&&f.status>=(h||(h=b("BanzaiConsts"))).POST_SENT||!i.canSend(a))return!1;if(f.status!=null&&f.status>=(h||(h=b("BanzaiConsts"))).POST_INFLIGHT)return!0;var g=f.compress!=null?f.compress:!0,j=(f.webSessionId!=null?f.webSessionId:"null")+(f.userID!=null?f.userID:"null")+(f.appID!=null?f.appID:"null")+(g?"compress":""),k=e.wadMap.get(j);k||(k={app_id:f.appID,needs_compression:g,posts:[],user:f.userID,webSessionId:f.webSessionId},e.wadMap.set(j,k),c.push(k));f.status=(h||(h=b("BanzaiConsts"))).POST_INFLIGHT;Array.isArray(k.posts)?k.posts.push(a):b("FBLogger")("banzai").mustfix("Posts were a string instead of array");d.push(a);e.currentSize+=a[4];e.currentSize>=(h||(h=b("BanzaiConsts"))).BATCH_SIZE_LIMIT&&(e.overlimit=!0);return e.keepRetryable&&Boolean(f.retry)},resetPostStatus:function(a){a.__meta.status=(h||(h=b("BanzaiConsts"))).POST_READY},retryPost:function(a,c,d){var e=a;e.__meta.status=(h||(h=b("BanzaiConsts"))).POST_READY;e[3]=(e[3]||0)+1;e.__meta.retry!==!0&&c>=400&&c<600&&d.push(a)},wrapData:function(a,c,d,e,f){d=[a,c,d,0,(a=f)!=null?a:c?JSON.stringify(c).length:0];d.__meta={appID:b("CurrentUser").getAppID(),retry:e===!0,status:(h||(h=b("BanzaiConsts"))).POST_READY,userID:b("CurrentUser").getID(),webSessionId:b("WebSession").getId()};return d}};e.exports=i}),null); __d("cancelIdleCallback",["requireCond","cr:692209"],(function(a,b,c,d,e,f){a=b("cr:692209");e.exports=a}),null); __d("IdleCallbackImplementation",["performanceNow","requestAnimationFramePolyfill"],(function(a,b,c,d,e,f){f.requestIdleCallback=c;f.cancelIdleCallback=q;var g,h=[],i=0,j=0,k=-1,l=!1,m=1e3/60,n=2;function o(a){return a}function p(a){return a}function c(b,c){var d=j++;h[d]=b;r();if(c!=null&&c.timeout>0){var e=o(d);a.setTimeout(function(){return x(e)},c.timeout)}return o(d)}function q(a){a=p(a);h[a]=null}function r(){l||(l=!0,b("requestAnimationFramePolyfill")(function(a){l=!1,t((g||(g=b("performanceNow")))()-a)}))}function s(a){var b=m-n;if(ab||ak){a=s(a);if(a>0){c=c+a;w(c);k=c}}u()&&r()}function u(){return i=Date.now()?b[0]:null};c.$3=function(a){var c=k();if(!c)return;a=a==null?1e3:a;a=Date.now()+a;(g||(g=b("WebStorage"))).setItemGuarded(c,"mutex_"+this.name,j+":"+a)};c.hasLock=function(){return this.$2()===j};c.lock=function(a,c,d){var e=this;this.$1&&b("clearTimeout")(this.$1);j===(this.$2()||j)&&this.$3(d);this.$1=b("setTimeout")(function(){e.$1=null;var b=e.hasLock()?a:c;b&&b(e)},0)};c.unlock=function(){this.$1&&b("clearTimeout")(this.$1);var a=k();a&&this.hasLock()&&a.removeItem("mutex_"+this.name)};return a}();e.exports=a}),null); __d("BanzaiStorage",["BanzaiConsts","BanzaiUtils","CurrentUser","FBJSON","SetIdleTimeoutAcrossTransitions","WebSession","WebStorage","WebStorageMutex","isInIframe","performanceAbsoluteNow"],(function(a,b,c,d,e,f){"use strict";var g,h,i,j="bz:",k=b("isInIframe")(),l,m=!1,n=null;function o(){var a="check_quota";try{var b=p();if(!b)return!1;b.setItem(a,a);b.removeItem(a);return!0}catch(a){return!1}}function p(){m||(m=!0,l=(g||(g=b("WebStorage"))).getLocalStorage());return l}a={flush:function(a){if(k)return;var c=p();if(c){n==null&&(n=parseInt(c.getItem((h||(h=b("BanzaiConsts"))).LAST_STORAGE_FLUSH),10));var d=n&&(i||(i=b("performanceAbsoluteNow")))()-n>=(h||(h=b("BanzaiConsts"))).STORAGE_FLUSH_INTERVAL;d&&a();(d||!n)&&(n=(i||(i=b("performanceAbsoluteNow")))(),(g||(g=b("WebStorage"))).setItemGuarded(c,(h||(h=b("BanzaiConsts"))).LAST_STORAGE_FLUSH,n.toString()))}},restore:function(a){if(k)return;var c=p();if(!c)return;var d=function(d){var e=[];for(var f=0;f=4){var a=j.indexOf(g);a>=0&&j.splice(a,1);try{a=g.status}catch(b){a=0}a==200?(c&&c(),e||o.inform((i||(i=b("BanzaiConsts"))).OK)):(d&&d(a),e||o.inform((i||(i=b("BanzaiConsts"))).ERROR))}};j.push(g);g.send(a,!1)},setHooks:function(a){},setUnloadHook:function(a){b("Run").onAfterUnload(a._unload)},onUnload:function(a){b("Run").onAfterUnload(a)},isOkToSendViaBeacon:function(){return!0}};e.exports=o}),null); __d("ArbiterFrame",[],(function(a,b,c,d,e,f){a={inform:function(a,b,c){var d=parent.frames,e=d.length,f;b.crossFrame=!0;for(var g=0;gh}function b(){return y()&&r}function c(){return x()||i}function d(){return x()||j}function z(){return x()||k}function e(){return z()}function A(){return x()||l}function B(){return x()||o}function C(){return x()||n}function D(){return x()||p}function E(){return x()||s}function F(){return x()||s||t||q||w}function G(){return x()||v!=null?null:u}function H(){return x()||q}function I(){return x()||t}}),null); __d("isScalar",[],(function(a,b,c,d,e,f){e.exports=a;function a(a){return/string|number|boolean/.test(typeof a)}}),null); __d("DOM",["DOMQuery","Event","FBLogger","FbtResultBase","HTML","TAAL","UserAgent_DEPRECATED","$","createArrayFromMixed","isNode","isScalar","isTextNode"],(function(a,b,c,d,e,f){var g=babelHelpers["extends"]({},b("DOMQuery"),{create:function(a,b,c){a=document.createElement(a);b&&g.setAttributes(a,b);c!=null&&g.setContent(a,c);return a},setAttributes:function(a,c){c.type&&(a.type=c.type);for(var d in c){var e=c[d],f=/^on/i.test(d);f&&typeof e!=="function"&&b("FBLogger")("dom").warn("Handlers passed to DOM.setAttributes must be functions. Handler passed for %s was %s",d,typeof e);if(d=="type")continue;else d=="style"?typeof e==="string"?a.style.cssText=e:Object.assign(a.style,e):f?b("Event").listen(a,d.substr(2),e):d in a?a[d]=e:a.setAttribute&&a.setAttribute(d,e)}},prependContent:function(a,c){if(!a)throw new Error(b("TAAL").blameToPreviousFile("reference element is not a node"));return i(c,a,function(b){a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)})},insertAfter:function(a,c){if(!a||!a.parentNode)throw new Error(b("TAAL").blameToPreviousFile("reference element does not have a parent"));var d=a.parentNode;return i(c,d,function(b){a.nextSibling?d.insertBefore(b,a.nextSibling):d.appendChild(b)})},insertBefore:function(a,c){if(!a||!a.parentNode)throw new Error(b("TAAL").blameToPreviousFile("reference element does not have a parent"));var d=a.parentNode;return i(c,d,function(b){d.insertBefore(b,a)})},setContent:function(a,c){if(!a)throw new Error(b("TAAL").blameToPreviousFile("reference element is not a node"));while(a.firstChild)h(a.firstChild);return g.appendContent(a,c)},appendContent:function(a,c){if(!a)throw new Error(b("TAAL").blameToPreviousFile("reference element is not a node"));return i(c,a,function(b){a.appendChild(b)})},replace:function(a,c){if(!a||!a.parentNode)throw new Error(b("TAAL").blameToPreviousFile("reference element does not have a parent"));var d=a.parentNode;return i(c,d,function(b){d.replaceChild(b,a)})},remove:function(a){h(typeof a==="string"?b("$")(a):a)},empty:function(a){a=typeof a==="string"?b("$")(a):a;while(a.firstChild)h(a.firstChild)}});Object.assign(g,b("DOMQuery"));function h(a){a.parentNode&&a.parentNode.removeChild(a)}function i(a,c,d){a=b("HTML").replaceJSONWrapper(a);if(a instanceof b("HTML")&&c.firstChild===null&&-1===a.toString().indexOf("7&&!b("DOMQuery").isNodeOfType(c,["table","tbody","thead","tfoot","tr","select","fieldset"])){var f=e?' ':"";c.innerHTML=f+a;e&&c.removeChild(c.firstChild);return Array.from(c.childNodes)}}else if(b("isTextNode")(c)){c.data=a;return[a]}f=document.createDocumentFragment();var g;e=[];c=[];a=b("createArrayFromMixed")(a);a.length===1&&a[0]instanceof b("FbtResultBase")&&(a=a[0].getContents());for(var h=0;h3?d-3:0),f=3;f=b&&i[a in i?a:"log"](h)};f.log=b;c=-1;f.level=c;d=b.bind(null,"debug",a.DEBUG);f.debug=d;e=b.bind(null,"info",a.INFO);f.info=e;c=b.bind(null,"warn",a.WARNING);f.warn=c;d=b.bind(null,"error",a.ERROR);f.error=d}),null); __d("Queue",[],(function(a,b,c,d,e,f){var g={};a=function(){function a(a){this._timeout=null,this._interval=(a==null?void 0:a.interval)||0,this._processor=a==null?void 0:a.processor,this._queue=[],this._stopped=!0}var b=a.prototype;b._dispatch=function(a){var b=this;a===void 0;if(this._stopped||this._queue.length===0)return;a=this._processor;if(a==null){this._stopped=!0;throw new Error("No processor available")}var c=this._interval;if(c!=null)a.call(this,this._queue.shift()),this._timeout=setTimeout(function(){return b._dispatch()},c);else while(this._queue.length)a.call(this,this._queue.shift())};b.enqueue=function(a){this._processor&&!this._stopped?this._processor(a):this._queue.push(a);return this};b.start=function(a){a&&(this._processor=a);this._stopped=!1;this._dispatch();return this};b.isStarted=function(){return!this._stopped};b.dispatch=function(){this._dispatch(!0)};b.stop=function(a){this._stopped=!0;a&&this._timeout!=null&&clearTimeout(this._timeout);return this};b.merge=function(a,b){if(b){(b=this._queue).unshift.apply(b,a._queue)}else{(b=this._queue).push.apply(b,a._queue)}a._queue=[];this._dispatch();return this};b.getLength=function(){return this._queue.length};a.get=function(b,c){var d;b in g?d=g[b]:d=g[b]=new a(c);return d};a.exists=function(a){return a in g};a.remove=function(a){return delete g[a]};return a}();e.exports=a}),null); __d("resolveWindow",[],(function(a,b,c,d,e,f){function a(a){if(a==null)return null;var b=window;a=a.split(".");try{for(var c=0;cthis._lastResizeAckId&&(this._lastResizeAckId=b.id)}.bind(this))},getQueue:function(){this._queue||(this._queue=new(b("Queue"))());return this._queue},setChannelUrl:function(a){var b=this;this.getQueue().start(function(c){return b.send(c,a)})},send:function(a,c){a===void 0&&(a=null);c===void 0&&(c=null);c=c||this._opts.channelUrl;if(!c){this.getQueue().enqueue(a);return}var d={};c=new(g||(g=b("URI")))(c);Object.assign(d,a,(h||(h=b("PHPQuerySerializer"))).deserialize(c.getFragment()));c=new g(d.origin);if(c.getDomain()===""){b("Log").error("No valid domain for XD message target.");return}var e=c.getOrigin();if(typeof d.relation!=="string"){b("Log").error("No relation specified to resolve XD target window.");return}var f=b("resolveWindow")(d.relation.replace(/^parent\./,"")),i=1;c=function c(){try{f.postMessage((h||(h=b("PHPQuerySerializer"))).serialize(d),e)}catch(d){--i?window.setTimeout(c,200):b("sdk.Scribe").log("jssdk_error",{error:"POST_MESSAGE",extra:{message:d.message+", html/js/modules/XD.js:139",ancestor_origins:JSON.stringify(location.ancestorOrigins),referrer:document.referrer,data:a}})}};c()},_computeSize:function(){var a=b("DOMDimensions").getDocumentDimensions(),c=0;if(this._opts.resizeWidth){var d=document.body;if(d!=null){if(d.clientWidthc&&(c=d)}}c=Math.max(c,i._forcedMinWidth)}else c=i._forcedMinWidth}a.width=c;this._opts.allowShrink&&(this._shrinker||(this._shrinker=b("DOM").create("div")),b("DOM").appendContent(document.body,this._shrinker),a.height=Math.max(this._shrinker.offsetTop,0));return a},_startResizeMonitor:function(){var a,c;a=(a=document.documentElement)!=null?a:{};if(this._opts.hideOverflow){a.style.overflow="hidden";((a=document.body)!=null?a:{}).style.overflow="hidden"}a=function(){var a=this._computeSize(),d=Date.now();if(!c||this._opts.allowShrink&&c.width!=a.width||!this._opts.allowShrink&&c.width0&&(d/=g,e/=g);if(!isFinite(d)||!isFinite(e))return;j[0]+=d;arguments.length>=5&&(j[1]||(j[1]=0),j[1]+=e)};return a}();var h=new a();b("Banzai").subscribe(b("Banzai").SEND,function(){return h.flush()});c=h;e.exports=c}),null); __d("BanzaiScuba",["Banzai","FBLogger"],(function(a,b,c,d,e,f){var g="scuba_sample";a=function(){function a(a,c,d){this.posted=!1,a||b("FBLogger")("BanzaiScuba").warn("Can't post a sample without a dataset"),this.dataset=a,this.$1=c,this.options=d}var c=a.prototype;c.$2=function(a,c,d){if(this.posted){b("FBLogger")("BanzaiScuba").warn("Trying to add to an already posted sample");return a}a=a||{};a[c]=d;return a};c.addNormal=function(a,b){this.normal=this.$2(this.normal,a,b);return this};c.addInteger=function(a,b){this["int"]=this.$2(this["int"],a,b);return this};c.addDenorm=function(a,b){this.denorm=this.$2(this.denorm,a,b);return this};c.addTagSet=function(a,b){this.tags=this.$2(this.tags,a,b);return this};c.addNormVector=function(a,b){this.normvector=this.$2(this.normvector,a,b);return this};c.post=function(a){if(this.posted){b("FBLogger")("BanzaiScuba").warn("Trying to re-post");return}if(!this.dataset)return;var c={};c._ds=this.dataset;c._options=this.options;this.normal&&(c.normal=this.normal);this["int"]&&(c["int"]=this["int"]);this.denorm&&(c.denorm=this.denorm);this.tags&&(c.tags=this.tags);this.normvector&&(c.normvector=this.normvector);this.$1!==null&&this.$1!==""&&this.$1!==void 0&&(c._lid=this.$1);b("Banzai").post(g,c,a);this.posted=!0};return a}();e.exports=a}),null); __d("getDataWithLoggerOptions",[],(function(a,b,c,d,e,f){"use strict";e.exports=a;function a(a,b){return babelHelpers["extends"]({},a,{__options:babelHelpers["extends"]({},{event_time:Date.now()/1e3},b)})}}),null); __d("GeneratedLoggerUtils",["invariant","Banzai","getDataWithLoggerOptions"],(function(a,b,c,d,e,f,g){"use strict";var h=window.location.search.indexOf("showlog")>-1;function a(a,c,d,e){c=b("getDataWithLoggerOptions")(c,e);b("Banzai").post(a,c,d);h}c={log:a,serializeVector:function(a){if(!a)return a;if(Array.isArray(a))return a;if(a.toArray){var b=a;return b.toArray()}if(typeof a==="object"&&a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"])return Array.from(a);g(0,3874,a)},serializeMap:function(a){if(!a)return a;if(a.toJS){var b=a;return b.toJS()}if(typeof a==="object"&&a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]){b=a;var c={};for(var b=b,d=Array.isArray(b),e=0,b=d?b:b[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var f;if(d){if(e>=b.length)break;f=b[e++]}else{e=b.next();if(e.done)break;f=e.value}f=f;c[f[0]]=f[1]}return c}if(Object.prototype.toString.call(a)==="[object Object]")return a;g(0,3875,a)},checkExtraDataFieldNames:function(a,b){Object.keys(a).forEach(function(a){Object.prototype.hasOwnProperty.call(b,a)&&g(0,3876,a)})},warnForInvalidFieldNames:function(a,b,c,d){},throwIfNull:function(a,b){a||g(0,3877,b);return a}};e.exports=c}),null); __d("randomInt",["invariant"],(function(a,b,c,d,e,f,g){e.exports=a;function a(a,b){a=b===void 0?[0,a]:[a,b];b=a[0];a=a[1];a>b||g(0,1180,a,b);var c=this.random||Math.random;return Math.floor(b+c()*(a-b))}}),null); __d("ClientIDs",["randomInt"],(function(a,b,c,d,e,f){f.getNewClientID=a;f.isExistingClientID=c;var g=new Set();function a(){var a=Date.now();a=a+":"+(b("randomInt")(0,4294967295)+1);g.add(a);return a}function c(a){return g.has(a)}}),null); __d("forEachObject",[],(function(a,b,c,d,e,f){"use strict";e.exports=a;var g=Object.prototype.hasOwnProperty;function a(a,b,c){for(var d in a){var e=d;g.call(a,e)&&b.call(c,a[e],e,a)}}}),null); __d("cancelIdleCallbackBlue",["IdleCallbackImplementation","TimerStorage","TimeSlice"],(function(a,b,c,d,e,f){e.exports=c;var g=b("TimerStorage").IDLE_CALLBACK,h=(d=a.cancelIdleCallback)!=null?d:b("IdleCallbackImplementation").cancelIdleCallback;function c(a){b("TimerStorage").unset(g,a);var c=g+String(a);b("TimeSlice").cancelWithToken(c);h(a)}}),null); /** * License: https://www.facebook.com/legal/license/WRsJ32R7YJG/ */ __d("SnappyCompress",[],(function(a,b,c,d,e,f){"use strict";function g(){return typeof process==="object"&&(typeof process.versions==="object"&&typeof process.versions.node!=="undefined")?!0:!1}function h(a){return a instanceof Uint8Array&&(!g()||!Buffer.isBuffer(a))}function i(a){return a instanceof ArrayBuffer}function j(a){return!g()?!1:Buffer.isBuffer(a)}var k="Argument compressed must be type of ArrayBuffer, Buffer, or Uint8Array";function a(a){if(!h(a)&&!i(a)&&!j(a))throw new TypeError(k);var b=!1,c=!1;h(a)?b=!0:i(a)&&(c=!0,a=new Uint8Array(a));a=new A(a);var d=a.readUncompressedLength();if(d===-1)throw new Error("Invalid Snappy bitstream");if(b){b=new Uint8Array(d);if(!a.uncompressToBuffer(b))throw new Error("Invalid Snappy bitstream")}else if(c){b=new ArrayBuffer(d);c=new Uint8Array(b);if(!a.uncompressToBuffer(c))throw new Error("Invalid Snappy bitstream")}else{b=Buffer.alloc(d);if(!a.uncompressToBuffer(b))throw new Error("Invalid Snappy bitstream")}return b}function b(a){if(!h(a)&&!i(a)&&!j(a))throw new TypeError(k);var b=!1,c=!1;h(a)?b=!0:i(a)&&(c=!0,a=new Uint8Array(a));a=new x(a);var d=a.maxCompressedLength(),e,f,g;b?(e=new Uint8Array(d),g=a.compressToBuffer(e)):c?(e=new ArrayBuffer(d),f=new Uint8Array(e),g=a.compressToBuffer(f)):(e=Buffer.alloc(d),g=a.compressToBuffer(e));if(!e.slice){f=new Uint8Array(Array.prototype.slice.call(e,0,g));if(b)return f;else if(c)return f.buffer;else throw new Error("not implemented")}return e.slice(0,g)}c=16;var l=1<>>b}function p(a,b){return a[b]+(a[b+1]<<8)+(a[b+2]<<16)+(a[b+3]<<24)}function q(a,b,c){return a[b]===a[c]&&a[b+1]===a[c+1]&&a[b+2]===a[c+2]&&a[b+3]===a[c+3]}function r(a,b,c,d,e){var f;for(f=0;f>>8,e+=3);r(a,b,d,e,c);return e+c}function t(a,b,c,d){if(d<12&&c<2048){a[b]=1+(d-4<<2)+(c>>>8<<5);a[b+1]=c&255;return b+2}else{a[b]=2+(d-1<<2);a[b+1]=c&255;a[b+2]=c>>>8;return b+3}}function u(a,b,c,d){while(d>=68)b=t(a,b,c,64),d-=64;d>64&&(b=t(a,b,c,60),d-=60);return t(a,b,c,d)}function v(a,b,c,d,e){var f=1;while(1<=x){c=h-x;b+=1;x=o(p(a,b),g);while(w){t=32;l=b;do{b=l;k=x;v=t>>>5;t+=1;l=b+v;if(b>c){w=!1;break}x=o(p(a,l),g);r=i+f[k];f[k]=b-i}while(!q(a,b,r));if(!w)break;e=s(a,j,b-j,d,e);do{v=b;k=4;while(b+k=c){w=!1;break}t=o(p(a,b-1),g);f[t]=b-1-i;v=o(p(a,b),g);r=i+f[v];f[v]=b-i}while(q(a,b,r));if(!w)break;b+=1;x=o(p(a,b),g)}}j>>7,a>0&&(b[c]+=128),c+=1;while(a>0);return c}function x(a){this.array=a}x.prototype.maxCompressedLength=function(){var a=this.array.length;return 32+a+Math.floor(a/6)};x.prototype.compressToBuffer=function(a){var b=this.array,c=b.length,d=0,e=0,f;e=w(c,a,e);while(d>>b!==d)return-1;a|=d<>>2)+1;if(g>60){if(d+3>=c)return!1;h=g-60;g=b[d]+(b[d+1]<<8)+(b[d+2]<<16)+(b[d+3]<<24);g=(g&y[h])+1;d+=h}if(d+g>c)return!1;r(b,d,a,e,g);d+=g;e+=g}else{switch(f&3){case 1:g=(f>>>2&7)+4;i=b[d]+(f>>>5<<8);d+=1;break;case 2:if(d+1>=c)return!1;g=(f>>>2)+1;i=b[d]+(b[d+1]<<8);d+=2;break;case 3:if(d+3>=c)return!1;g=(f>>>2)+1;i=b[d]+(b[d+1]<<8)+(b[d+2]<<16)+(b[d+3]<<24);d+=4;break;default:break}if(i===0||i>e)return!1;z(a,e,i,g);e+=g}}return!0};e.exports.uncompress=a;e.exports.compress=b}),null); __d("SnappyCompressUtil",["SnappyCompress"],(function(a,b,c,d,e,f){"use strict";var g={compressUint8ArrayToSnappy:function(c){if(c==null)return null;var d=null;try{d=b("SnappyCompress").compress(c)}catch(a){return null}c="";for(var e=0;e127)return null;c[d]=e}return g.compressUint8ArrayToSnappy(c)},compressStringToSnappyBinary:function(c){if(a.Uint8Array===void 0)return null;var d=null;if(a.TextEncoder!==void 0)d=new TextEncoder().encode(c);else{d=new a.Uint8Array(c.length);for(var e=0;e127)return null;d[e]=f}}f=null;try{f=b("SnappyCompress").compress(d)}catch(a){return null}return f}};e.exports=g}),null); __d("BanzaiCompressionUtils",["Promise","FBLogger","SnappyCompressUtil","once","performanceNow"],(function(a,b,c,d,e,f){"use strict";var g,h=b("once")(function(){if(a.CompressionStream==null)return!1;if(a.Response==null)return!1;try{new a.CompressionStream("deflate")}catch(a){return!1}return!0}),i={compressWad:function(a,c){if(a.needs_compression!==!0){delete a.needs_compression;return}if(c==="deflate"){i.compressWad(a,"snappy");return}var d=(g||(g=b("performanceNow")))(),e=JSON.stringify(a.posts),f;switch(c){case"snappy":f=b("SnappyCompressUtil").compressStringToSnappyBinary(e);break;case"snappy_base64":f=b("SnappyCompressUtil").compressStringToSnappy(e);break;default:break}f!=null&&f.length0&&(w._tryToSendViaBeacon()||w._store(!1))}),w.isEnabled("enable_client_logging_clear_on_visible")&&b("Visibility").addListener(b("Visibility").VISIBLE,function(){w._tryToSendViaBeacon()||w._restore(!1)})):w.adapter.setHooks(w),w.adapter.setUnloadHook(w),b("NavigationMetrics").addListener(b("NavigationMetrics").Events.NAVIGATION_DONE,function(a,c){if(c.pageType!=="normal")return;w._restore(!1);b("NavigationMetrics").removeCurrentListener()}))},_sendBeacon:function(b,c){return a.navigator.sendBeacon(b,c)},_prepForTransit:function(a){var c=new FormData();c.append("ts",String(Date.now()));var d={};Object.keys(d).sort().forEach(function(a){var b=d[a];if(b===void 0)return;if(b===null){c.append(a,"");return}c.append(a,String(b))});var e=b("BanzaiCompressionUtils").outOfBandsPosts(a);Object.keys(e).forEach(function(a){c.append(a,e[a])});c.append("q",JSON.stringify(a));return c},_prepWadForTransit:function(a){b("BanzaiCompressionUtils").compressWad(a,b("BanzaiAdapter").preferredCompressionMethod())},_processCallbacksAndSendViaBeacon:function(){var a=[],c=[],d=[];w._gatherWadsAndPostsFromBuffer(c,d,!0,a,!1);if(c.length>0){c[0].send_method="beacon";c.map(w._prepWadForTransit);d=w._prepForTransit(c);a=b("BanzaiAdapter").getEndPointUrl(!0);c=w._sendBeacon(a,d);c||b("FBLogger")("banzai").warn("Error sending beacon")}},_restore:function(a){a=b("BanzaiAdapter").getStorage();var c=function(a){q.push(a)};(h||(h=b("ErrorGuard"))).applyWithGuard(a.restore,a,[c]);w._schedule(b("BanzaiAdapter").config.RESTORE_WAIT||(i||(i=b("BanzaiConsts"))).VITAL_WAIT)},_schedule:function(a){var c=w._getEventTime()+a;if(!p||c0&&((!w.adapter.useBeacon||!w._tryToSendViaBeacon())&&w._store(!1))},BASIC:{delay:b("BanzaiAdapter").config.MAX_WAIT||(i||(i=b("BanzaiConsts"))).BASIC_WAIT},BASIC_WAIT:(i||(i=b("BanzaiConsts"))).BASIC_WAIT,ERROR:i.ERROR,OK:i.OK,SEND:i.SEND,SHUTDOWN:i.SHUTDOWN,VITAL:{delay:b("BanzaiAdapter").config.MIN_WAIT||(i||(i=b("BanzaiConsts"))).VITAL_WAIT},VITAL_WAIT:i.VITAL_WAIT,adapter:b("BanzaiAdapter"),canUseNavigatorBeacon:function(){return Boolean(navigator&&navigator.sendBeacon&&b("BanzaiAdapter").isOkToSendViaBeacon())},counterTracker:function(a,c,d,e){var f;c=c;a=b("BanzaiUtils").wrapData(j,{2979:{banzai:(f={},f[n[a]]=[c],f)}},w._getEventTime(),!0);e.push(a);d.push({webSessionId:w._getWebSessionId(),posts:[a],needs_compression:!0,user:w._getUserId(),app_id:w._getAppId()})},flush:function(a,c){b("SetIdleTimeoutAcrossTransitions").clear(o),w._sendWithCallbacks(a,c)},isEnabled:function(a){return Boolean(b("BanzaiAdapter").config.gks&&b("BanzaiAdapter").config.gks[a])},post:function(a,c,d){var e;a||b("FBLogger")("banzai").mustfix("Banzai.post called without specifying a route");var f=(e=JSON.stringify(c))!=null?e:"",g=d==null?void 0:d.retry;if(b("BanzaiAdapter").config.disabled)return;if(!b("ExecutionEnvironment").canUseDOM&&!b("ExecutionEnvironment").isInWorker)return;var h=w.adapter.getTopLevel();if(h){var j;try{j=h.require("Banzai")}catch(a){j=null}if(j){j.post.apply(j,arguments);return}}var k=b("BanzaiAdapter").config.blacklist;if(k&&(k.indexOf&&(typeof k.indexOf=="function"&&k.indexOf(a)!=-1)))return;var l=f.length;s++;u++;var m=b("BanzaiUtils").wrapData(a,c,w._getEventTime(),g,l),n=m;(d==null?void 0:d.callback)&&(n.__meta.callback=d==null?void 0:d.callback);(d==null?void 0:d.compress)!=null&&(n.__meta.compress=d==null?void 0:d.compress);var o=d==null?void 0:d.delay;o==null&&(o=(i||(i=b("BanzaiConsts"))).BASIC_WAIT);if(d==null?void 0:d.signal){n.__meta.status=(i||(i=b("BanzaiConsts"))).POST_INFLIGHT;var p=[{user:w._getUserId(),webSessionId:w._getWebSessionId(),app_id:w._getAppId(),posts:[m],trigger:a}];b("BanzaiAdapter").send(w._prepForTransit(p),function(){v++,t++,n.__meta.status=(i||(i=b("BanzaiConsts"))).POST_SENT,n.__meta.callback&&n.__meta.callback()},function(a){b("BanzaiUtils").retryPost(m,a,q)},!0);if(!g)return}q.push(m);(w._schedule(o)||!r)&&(r=a);var x=b("BanzaiLazyQueue").flushQueue();x.forEach(function(a){return w.post.apply(w,a)})},subscribe:b("BanzaiAdapter").subscribe};w._initialize();e.exports=w}),null);