if (self.CavalryLogger) { CavalryLogger.start_js(["AuOuY"]); } __d("XInstagramLoginSyncUpdateController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/instagram/login_sync/update/",{})}),null); __d("InstagramLoginSync",["Event","XAsyncRequest","XInstagramLoginSyncUpdateController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="https://www.instagram.com",h={ready:"ig_iframe_ready",success:"ig_iframe_success",error:"ig_iframe_error"};a={init:function(){__p&&__p();window.parent.postMessage({eventName:h.ready},g+"/'"),b("Event").listen(window,"message",function(a){__p&&__p();if(a.origin!==g)return;var c=b("XInstagramLoginSyncUpdateController").getURIBuilder().getURI(),d=a.data.data;if(d!=null){var e=function(a,b,c){b=b.errorDescription;c={eventName:h[c],errorDescription:b};a.source.postMessage(c,a.origin)};new(b("XAsyncRequest"))().setURI(c).setMethod("POST").setData({encrypted_data:d}).setHandler(function(b){return e(a,b,"success")}).setErrorHandler(function(b){return e(a,b,"error")}).send()}})}};e.exports=a}),null); __d("BanzaiConsts",[],(function(a,b,c,d,e,f){a={SEND:"Banzai:SEND",OK:"Banzai:OK",ERROR:"Banzai:ERROR",SHUTDOWN:"Banzai:SHUTDOWN",VITAL_WAIT:1e3,BASIC_WAIT:6e4,EXPIRY:30*6e4,LAST_STORAGE_FLUSH:"banzai:last_storage_flush",STORAGE_FLUSH_INTERVAL:12*60*6e4};e.exports=a}),null); __d("BanzaiAdapter",["Arbiter","BanzaiConsts","CurrentUser","QueryString","Run","SiteData","URI","UserAgent","ZeroRewrites","getAsyncParams","BanzaiConfig","requireCond","cr:695720"],(function(a,b,c,d,e,f){__p&&__p();var g=[],h=new(b("Arbiter"))(),i="/ajax/bz",j="POST",k={config:b("BanzaiConfig"),endpoint:i,useBeacon:!0,getUserID:function(){return b("CurrentUser").getID()},inform:function(a){h.inform(a)},subscribe:function(a,b){return h.subscribe(a,b)},cleanup:function(){var a=g;g=[];a.forEach(function(a){a.readyState<4&&a.abort()})},readyToSend:function(){return b("UserAgent").isBrowser("IE <= 8")||navigator.onLine},send:function(a,c,d,e){__p&&__p();var f=b("ZeroRewrites").rewriteURI(new(b("URI"))(i)),h=b("ZeroRewrites").getTransportBuilderForURI(f)();h.open(j,f.toString(),!0);h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");h.onreadystatechange=function(){if(h.readyState>=4){var a=g.indexOf(h);a>=0&&g.splice(a,1);try{a=h.status}catch(b){a=0}a==200?(c&&c(),e||k.inform(b("BanzaiConsts").OK)):(d&&d(a),e||k.inform(b("BanzaiConsts").ERROR))}};g.push(h);h.send(k.prepForTransit(a))},addRequestAuthData:function(a){return a},prepForTransit:function(a){var c=b("getAsyncParams")(j);c.q=JSON.stringify(a);c.ts=Date.now();c.ph=b("SiteData").push_phase;return b("QueryString").encode(c)},prepWadForTransit:function(a){if(a.snappy==null||a.snappy===!0){var c=Date.now(),d=JSON.stringify(a.posts),e=b("cr:695720").compressStringToSnappy(d);e!=null&&e.length=Date.now()?a[0]:null};c.$2=function(a){if(!j())return;a=Date.now()+(a||1e4);b("WebStorage").setItemGuarded(j(),"mutex_"+this.name,i+":"+a)};c.hasLock=function(){return this.$1()==i};c.lock=function(a,c,d){var e=this;this.$3&&b("clearTimeout")(this.$3);i==(this.$1()||i)&&this.$2(d);this.$3=b("setTimeoutAcrossTransitions")(function(){e.$3=null;var b=e.hasLock()?a:c;b&&b(e)},0)};c.unlock=function(){this.$3&&b("clearTimeout")(this.$3),j()&&this.hasLock()&&j().removeItem("mutex_"+this.name)};return a}();e.exports=a}),null); __d("BanzaiOld",["BanzaiAdapter","NavigationMetrics","BanzaiConsts","BanzaiLazyQueue","BanzaiStreamPayloads","CurrentUser","ErrorUtils","ExecutionEnvironment","FBJSON","FBLogger","SetIdleTimeoutAcrossTransitions","TimeSlice","Visibility","WebStorage","emptyFunction","isInIframe","lowerFacebookDomain","pageID","performanceAbsoluteNow","WebStorageMutex"],(function(a,b,c,d,e,f){__p&&__p();var g=6e4,h=1e3,i=b("BanzaiAdapter"),j=b("isInIframe")(),k="bz:",l="ods:banzai",m="send_via_beacon_failure",n=0,o=1,p=2,q=null,r,s,t=[],u=null,v=[];function w(a){return a[2]>=b("performanceAbsoluteNow")()-((a=i.config.EXPIRY)!=null?a:K.EXPIRY)}function x(a,b){var c=a.__meta;c.status=n;a[3]=(a[3]||0)+1;c.retry===!1&&b>=400&&b<600&&t.push(a)}function y(a,c,d,e){a=[a,c,d,0];a.__meta={retry:e===!0,pageID:b("pageID"),userID:b("CurrentUser").getID(),status:n};return a}function z(){__p&&__p();var a=[];v.forEach(function(c){var d=c.cb();d.forEach(function(d){var e=c.route;if(e!=null||e!=""){e=y(e,d,b("performanceAbsoluteNow")());e.__meta.onSuccess=c.onSuccess;e.__meta.onFailure=c.onFailure;a.push(e)}})});v=[];var c=[],d=[];E(c,d,!0,a);if(c.length>0){c[0].send_method="beacon";c.map(i.prepWadForTransit);c=new Blob([i.addRequestAuthData(i.prepForTransit(c))],{type:"application/x-www-form-urlencoded"});c=navigator.sendBeacon(K.adapter.endpoint,c);c?d.forEach(function(a){a=a.__meta;a!=null&&a.onSuccess!=null&&a.onSuccess()}):d.forEach(function(a){a=a.__meta;a!=null&&a.onFailure!=null&&a.onFailure()})}}function A(a){__p&&__p();var c=b("performanceAbsoluteNow")()+a;if(s==null||c=p||!w(d))return!1;if(f.status>=o)return!0;var g=f.compress!=null?f.compress:!0,h=f.pageID+f.userID+(g?"compress":""),i=e[h];i||(i={user:f.userID,page_id:f.pageID,posts:[],snappy:g},e[h]=i,a.push(i));f.status=o;i.posts.push(d);b.push(d);return c&&!!f.retry})}var F,G,H=!1;function I(){H||(H=!0,G=b("WebStorage").getLocalStorage());return G}function J(){__p&&__p();F||(!j?F={store:function(){var a=I();if(a==null||t.length<=0)return;var c=t.map(function(a){return[a[0],a[1],a[2],a[3]||0,a.__meta]});t=[];b("WebStorage").setItemGuarded(a,k+b("pageID")+"."+b("performanceAbsoluteNow")(),b("FBJSON").stringify(c))},restore:function(){__p&&__p();var a=I();if(!a)return;var c=b("WebStorageMutex");new c("banzai").lock(function(c){__p&&__p();var d=[];for(var e=0;e=b("BanzaiConsts").STORAGE_FLUSH_INTERVAL;c&&K._restore(!1);(c||!q)&&(q=b("performanceAbsoluteNow")(),b("WebStorage").setItemGuarded(a,b("BanzaiConsts").LAST_STORAGE_FLUSH,q.toString()))}}}:F={store:b("emptyFunction"),restore:b("emptyFunction"),flush:b("emptyFunction")})}var K={adapter:i,SEND:"Banzai:SEND",OK:"Banzai:OK",ERROR:"Banzai:ERROR",SHUTDOWN:"Banzai:SHUTDOWN",VITAL_WAIT:h,BASIC_WAIT:g,EXPIRY:30*6e4,VITAL:{delay:(c=b("BanzaiAdapter").config.MIN_WAIT)!=null?c:h},BASIC:{delay:(d=b("BanzaiAdapter").config.MAX_WAIT)!=null?d:g},isEnabled:function(a){return!!(i.config.gks&&i.config.gks[a])},post:function(c,d,e){__p&&__p();var f;(c==null||c==="")&&b("FBLogger")("banzai").mustfix("Banzai.post called without specifying a route");var h=e==null?void 0:e.retry;if(i.config.disabled===!0)return;if(!b("ExecutionEnvironment").canUseDOM)return;var k=i.config.blacklist;if(k&&(k.indexOf&&(typeof k.indexOf==="function"&&k.indexOf(c)!=-1)))return;if(j&&b("lowerFacebookDomain").isValidDocumentDomain()){var l;try{l=a.top.require("Banzai")}catch(a){l=null}if(l){l.post.apply(l,arguments);return}}var m=y(c,d,b("performanceAbsoluteNow")(),h),n=m.__meta;e!=null&&e.callback!=null&&(n.callback=e.callback);e!=null&&e.compress!=null&&(n.compress=e.compress);if(e!=null&&e.signal!=null){n.status=o;var q=[{user:b("CurrentUser").getID(),page_id:b("pageID"),posts:[m],trigger:c}];i.send(q,function(){n.status=p,n.callback&&n.callback()},function(a){x(m,a)},!0);if(h==null)return}t.push(m);var r=(f=e==null?void 0:e.delay)!=null?f:g;(A(r)||u==null||u==="")&&(u=c);var s=b("BanzaiLazyQueue").flushQueue();s.forEach(function(a){return K.post.apply(K,a)})},registerToSendWithBeacon:function(a,c,d,e){if(!(navigator&&navigator.sendBeacon&&i.isOkToSendViaBeacon()))return!1;if(!a){b("FBLogger")("banzai").mustfix("Banzai.registerToSendWithBeacon called without specifying a route");return!1}v.push({cb:c,route:a,onSuccess:d,onFailure:e});return!0},flush:function(a,c){b("SetIdleTimeoutAcrossTransitions").clear(r),C(a,c)},subscribe:i.subscribe,canUseNavigatorBeacon:function(){return navigator&&navigator.sendBeacon?i.isOkToSendViaBeacon():!1},_schedule:A,_store:function(a){J(),b("ErrorUtils").applyWithGuard(F.store,F)},_restore:function(a){J();b("ErrorUtils").applyWithGuard(F.restore,F);A((a=i.config.RESTORE_WAIT)!=null?a:h)},_testState:function(){return{postBuffer:t,triggerRoute:u}},_unload:function(){b("BanzaiStreamPayloads").unload(K.post),navigator&&navigator.sendBeacon&&i.isOkToSendViaBeacon()&&z(),i.cleanup(),i.inform(K.SHUTDOWN),t.length>0&&((!i.useBeacon||!D())&&(J(),b("ErrorUtils").applyWithGuard(F.store,F)))},_initialize:function(){b("ExecutionEnvironment").canUseDOM&&(i.useBeacon&&b("Visibility").isSupported()?(b("Visibility").addListener(b("Visibility").HIDDEN,function(){t.length>0&&(D()||(J(),b("ErrorUtils").applyWithGuard(F.store,F)))}),(K.isEnabled("enable_client_logging_clear_on_visible")||K.isEnabled("error_impact_test"))&&b("Visibility").addListener(b("Visibility").VISIBLE,function(){D()||b("ErrorUtils").applyWithGuard(F.restore,F)})):i.setHooks(K),i.setUnloadHook(K),b("NavigationMetrics").addListener(b("NavigationMetrics").Events.NAVIGATION_DONE,function(a,c){if(c.pageType!=="normal")return;K._restore();b("NavigationMetrics").removeCurrentListener()}))}};K._initialize();e.exports=K}),null); __d("BanzaiOriginal",["requireCond","cr:682174"],(function(a,b,c,d,e,f){e.exports=b("cr:682174")}),null); __d("RecaptchaV2IFrameContainer",["RecaptchaV2Constants"],(function(a,b,c,d,e,f){__p&&__p();var g=b("RecaptchaV2Constants").RecaptchaV2IFrameMessageTypes,h=["facebook.com","messenger.com","workplace.com"],i=16;e.exports={init:function(){__p&&__p();var a=0,b=null;window.successCallback=c;window.parent.postMessage({type:g.GET_ORIGIN},"*");window.setInterval(d,250);function c(a){j({type:g.CAPTCHA_SOLVED,token:a})}function d(){__p&&__p();var b=document.getElementsByTagName("iframe"),c=0,d=0;for(var e=0;e>>b}function g(a,b){return a[b]+(a[b+1]<<8)+(a[b+2]<<16)+(a[b+3]<<24)}function h(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 i(a,b,c,d,e){var f;for(f=0;e>f;f++)c[d+f]=a[b+f]}function j(a,b,c,d,e){return 60>=c?(d[e]=c-1<<2,e+=1):256>c?(d[e]=240,d[e+1]=c-1,e+=2):(d[e]=244,d[e+1]=c-1&255,d[e+2]=c-1>>>8,e+=3),i(a,b,d,e,c),e+c}function k(a,b,c,d){return 12>d&&2048>c?(a[b]=1+(d-4<<2)+(c>>>8<<5),a[b+1]=255&c,b+2):(a[b]=2+(d-1<<2),a[b+1]=255&c,a[b+2]=c>>>8,b+3)}function l(a,b,c,d){for(;d>=68;)b=k(a,b,c,64),d-=64;return d>64&&(b=k(a,b,c,60),d-=60),k(a,b,c,d)}function m(a,b,c,e,f){__p&&__p();for(var i=1;c>=1<=i;)i+=1;i-=1;var k=32-i;"undefined"==typeof q[i]&&(q[i]=new Uint16Array(1<=x)for(c=m-x,b+=1,x=d(g(a,b),k);w;){s=32,o=b;do{if(b=o,n=x,t=s>>>5,s+=1,o=b+t,b>c){w=!1;break}x=d(g(a,o),k),r=u+i[n],i[n]=b-u}while(!h(a,b,r));if(!w)break;f=j(a,v,b-v,e,f);do{for(t=b,n=4;m>b+n&&a[b+n]===a[r+n];)n+=1;if(b+=n,o=t-r,f=l(e,f,o,n),v=b,b>=c){w=!1;break}s=d(g(a,b-1),k),i[s]=b-1-u,t=d(g(a,b),k),r=u+i[t],i[t]=b-u}while(h(a,b,r));if(!w)break;b+=1,x=d(g(a,b),k)}return m>v&&(f=j(a,v,m-v,e,f)),f}function n(a,b,c){do b[c]=127&a,a>>>=7,a>0&&(b[c]+=128),c+=1;while(a>0);return c}function c(a){this.array=a}a=16;var o=1<e;)b=Math.min(d-e,o),f=m(c,e,b,a,f),e+=b;return f},b.SnappyCompressor=c},{}],4:[function(c,a,b){"use strict";__p&&__p();function d(a,b,c,d,e){var f;for(f=0;e>f;f++)c[d+f]=a[b+f]}function g(a,b,c,d){var e;for(e=0;d>e;e++)a[b+e]=a[b-c+e]}function c(a){this.array=a,this.pos=0}var h=[0,255,65535,16777215,4294967295];c.prototype.readUncompressedLength=function(){for(var a,b,c=0,d=0;32>d&&this.pos>>d!==b)return-1;if(c|=b<a)return c;d+=7}return-1},c.prototype.uncompressToBuffer=function(a){__p&&__p();for(var b,c,e,f,i=this.array,j=i.length,k=this.pos,l=0;k>>2)+1,c>60){if(k+3>=j)return!1;e=c-60,c=i[k]+(i[k+1]<<8)+(i[k+2]<<16)+(i[k+3]<<24),c=(c&h[e])+1,k+=e}if(k+c>j)return!1;d(i,k,a,l,c),k+=c,l+=c}else{switch(3&b){case 1:c=(b>>>2&7)+4,f=i[k]+(b>>>5<<8),k+=1;break;case 2:if(k+1>=j)return!1;c=(b>>>2)+1,f=i[k]+(i[k+1]<<8),k+=2;break;case 3:if(k+3>=j)return!1;c=(b>>>2)+1,f=i[k]+(i[k+1]<<8)+(i[k+2]<<16)+(i[k+3]<<24),k+=4}if(0===f||f>l)return!1;g(a,l,f,c),l+=c}return!0},b.SnappyDecompressor=c},{}]},{},[1]),e.exports=SnappyJS}),null); __d("SnappyCompressUtil",["SnappyCompress"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={compressUint8ArrayToSnappy:function(a){__p&&__p();if(a==null)return null;var c=null;try{c=b("SnappyCompress").compress(a)}catch(a){return null}a="";for(var d=0;d127)return null;b[c]=d}return g.compressUint8ArrayToSnappy(b)}};e.exports=g}),null);