;/*FB_PKG_DELIM*/ __d("PluginLoggedOutUserTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";a=function(){function a(){this.$1={}}var c=a.prototype;c.log=function(a){b("GeneratedLoggerUtils").log("logger:PluginLoggedOutUserLoggerConfig",this.$1,b("Banzai").BASIC,a)};c.logVital=function(a){b("GeneratedLoggerUtils").log("logger:PluginLoggedOutUserLoggerConfig",this.$1,b("Banzai").VITAL,a)};c.logImmediately=function(a){b("GeneratedLoggerUtils").log("logger:PluginLoggedOutUserLoggerConfig",this.$1,{signal:!0},a)};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setHref=function(a){this.$1.href=a;return this};c.setIsSDK=function(a){this.$1.is_sdk=a;return this};c.setPluginAppID=function(a){this.$1.plugin_app_id=a;return this};c.setPluginName=function(a){this.$1.plugin_name=a;return this};c.setRefererURL=function(a){this.$1.referer_url=a;return this};c.updateExtraData=function(a){a=b("nullthrows")(b("GeneratedLoggerUtils").serializeMap(a));b("GeneratedLoggerUtils").checkExtraDataFieldNames(a,g);this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.addToExtraData=function(a,b){var c={};c[a]=b;return this.updateExtraData(c)};return a}();var g={href:!0,is_sdk:!0,plugin_app_id:!0,plugin_name:!0,referer_url:!0};f["default"]=a}),66); __d("AvailableListConstants",[],(function(a,b,c,d,e,f){a=Object.freeze({ON_AVAILABILITY_CHANGED:"buddylist/availability-changed",ON_UPDATE_ERROR:"buddylist/update-error",ON_UPDATED:"buddylist/updated",ON_CHAT_NOTIFICATION_CHANGED:"chat-notification-changed",OFFLINE:0,IDLE:1,ACTIVE:2,MOBILE:3,WEB_STATUS:"webStatus",FB_APP_STATUS:"fbAppStatus",MESSENGER_STATUS:"messengerStatus",OTHER_STATUS:"otherStatus",STATUS_ACTIVE:"active",STATUS_IDLE:"idle",STATUS_OFFLINE:"offline"});f["default"]=a}),66); __d("PresenceUtil",["CurrentUser","randomInt"],(function(a,b,c,d,e,f,g){var h=c("randomInt")(0,4294967295)+1;function a(){return h}function b(){return c("CurrentUser").isLoggedInNow()}g.getSessionID=a;g.hasUserCookie=b}),98); __d("PresencePrivacy",["Arbiter","ArbiterMixin","AsyncRequest","Bootloader","ChannelConstants","CurrentUser","PresencePrivacyInitialData","PresenceUtil","mixin"],(function(a,b,c,d,e,f,g){var h="/ajax/chat/privacy/settings.php",i="/ajax/chat/privacy/online_policy.php",j="/ajax/chat/privacy/visibility.php",k="friend_visibility",l="visibility",m="online_policy",n=babelHelpers["extends"]({},(b=d("PresencePrivacyInitialData")).privacyData),o=b.visibility,p=babelHelpers["extends"]({},b.privacyData),q=o,r=b.onlinePolicy,s=r,t=[],u=!1;e=function(a){babelHelpers.inheritsLoose(b,a);function b(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f0){var c={};for(var d=0;d0){a=t.shift();B(a.request,a.data)}}function G(a,b){if(d("PresenceUtil")!=null){var c=a.getData();c.window_id=d("PresenceUtil").getSessionID();a.setData(c)}a.setHandler(function(a){return D(b,a)}).setErrorHandler(function(a){return E(b,a)}).setTransportErrorHandler(function(a){return E(b,a)}).setFinallyHandler(function(a){return F(a)}).setAllowCrossPageTransition(!0);return a}function H(a,b,d){return G(new(c("AsyncRequest"))(a).setData(b),d)}function a(a,b){a=b.obj;if(a.viewer_id!=c("CurrentUser").getID())throw new Error("Viewer got from the channel is not the real viewer");if(a.window_id===d("PresenceUtil").getSessionID())return;var e=a.data;if(a.event=="access_control_entry")e.target_ids.forEach(function(a){x(a,e.setting),p[a]=e.setting});else{if(a.event=="visibility_update"){b=e.visibility?v.ONLINE:v.OFFLINE;z(b);q=b}else a.event=="online_policy_update"&&(A(e.online_policy),s=e.online_policy);v.inform("privacy-user-presence-response")}}v.inform("privacy-changed");v.inform("privacy-user-presence-changed","state");c("Arbiter").subscribe(d("ChannelConstants").getArbiterType("privacy_changed"),a);c("Arbiter").subscribe(d("ChannelConstants").ON_CONFIG,function(a,b){a=b.getConfig("visibility",null);if(a!==null&&typeof a!=="undefined"){b=a?v.ONLINE:v.OFFLINE;z(b)}});f=v;g["default"]=f}),98); __d("ChatVisibility",["Arbiter","PresencePrivacy"],(function(a,b,c,d,e,f){var g={isOnline:function(){return b("PresencePrivacy").getVisibility()===b("PresencePrivacy").ONLINE},hasBlackbirdEnabled:function(){return this.isVisibleToMostFriends()||this.isVisibleToSomeFriends()},isVisibleToMostFriends:function(){return b("PresencePrivacy").getOnlinePolicy()===b("PresencePrivacy").ONLINE_TO_BLACKLIST&&b("PresencePrivacy").getBlacklist().length>0},isVisibleToSomeFriends:function(){return b("PresencePrivacy").getOnlinePolicy()===b("PresencePrivacy").ONLINE_TO_WHITELIST&&b("PresencePrivacy").getWhitelist().length>0},goOnline:function(a){b("PresencePrivacy").getVisibility()===b("PresencePrivacy").OFFLINE&&(b("PresencePrivacy").setVisibility(b("PresencePrivacy").ONLINE),b("Arbiter").inform("chat-visibility/go-online")),a&&a()},goOffline:function(a){b("PresencePrivacy").getVisibility()===b("PresencePrivacy").ONLINE&&(b("PresencePrivacy").setVisibility(b("PresencePrivacy").OFFLINE),b("Arbiter").inform("chat-visibility/go-offline")),a&&a()},toggleVisibility:function(){g.isOnline()?g.goOffline():g.goOnline()}};e.exports=g}),null); __d("LastActiveTimes",["fbt","ServerTime"],(function(a,b,c,d,e,f,g,h){var i={};function j(a){if(!a||a<0)return null;a=d("ServerTime").get()/1e3-a;a=Math.floor(a/60);var b=Math.floor(a/60),c=Math.floor(b/24);if(a<=1)return h._({"*":"{count} ph\u00fat"},[h._param("count",1,[0])]);else if(a<60)return h._({"*":"{count} ph\u00fat"},[h._param("count",a,[0])]);else if(b<24)return h._({"*":"{count} gi\u1edd"},[h._param("count",b,[0])]);else if(c<3)return h._({"*":"{count}ng\u00e0y"},[h._param("count",c,[0])]);else return null}function k(a,b){(!(a in i)||i[a]0&&m.setMultiActive(c("AvailableListInitialData").activeList,"available_list_active");c("AvailableListInitialData").playingNow&&c("AvailableListInitialData").playingNow.length>0&&m.setPlayingCanvasGameFriends(c("AvailableListInitialData").playingNow);c("AvailableListInitialData").lastActiveTimes&&Object.keys(c("AvailableListInitialData").lastActiveTimes).length>0&&d("LastActiveTimes").update(c("AvailableListInitialData").lastActiveTimes);a=m;g["default"]=a}),98); __d("FBStoriesLoggingConstants",[],(function(a,b,c,d,e,f){"use strict";a="event";b="followee";c="friend";d="group";e="missingStoryData";var g="page",h="self",i="promotion",j="open_media",k="delete_media_attempted",l="attempt_to_send_reply",m="reaction_sticker_interacted",n="open_seen_summary",o="open_story",p="close_story",q="story_tray_load",r="send_story_failed",s="send_story_succeed",t="reply_attempt_completed",u="story_navigation",v="reshared_story_tap",w="reshared_story_view_story_tap",x={CLOSE_STORY:{CLICK_RIGHT:"click_right",CLICK_LEFT:"click_left",AUTO_JUMP:"auto_jump",AUTO_EXIT:"auto_exit",CLICK_EXIT:"click_exit",SWIPE_RIGHT:"swipe_right",SWIPE_LEFT:"swipe_left",SWIPE_EXIT:"swipe_exit",SWIPE_DOWN_EXIT:"swipe_down_exit",CLOSE_BUTTON_EXIT:"close_button_exit",BACK_BUTTON_EXIT:"back_button_exit"}},y="closeFromClickingOnModal",z="closeFromClickingOnModalCloseButton",A="closeFromLastStoryFinishing",B={ARCHIVE:"archive",POST_HEADER:"post_header_actor_photo",STORY_TRAY:"story_tray",IN_FEED:"in_feed",UNKNOWN:"unknown"};f.EVENT_STORY=a;f.FOLLOWEE_STORY=b;f.FRIEND_STORY=c;f.GROUP_STORY=d;f.MISSING_STORY_DATA=e;f.PAGE_STORY=g;f.SELF_STORY=h;f.STORY_PROMOTION=i;f.ACTION_OPEN_MEDIA=j;f.ACTION_DELETE_MEDIA=k;f.ACTION_SEND_REPLY_ATTEMPT=l;f.ACTION_SEND_REACTION_STICKER_INTERACTED=m;f.ACTION_OPEN_SEEN_SUMMARY=n;f.ACTION_OPEN_STORY=o;f.ACTION_CLOSE_STORY=p;f.ACTION_TRAY_LOAD=q;f.ACTION_SEND_STORY_FAILED=r;f.ACTION_SEND_STORY_SUCCEEDED=s;f.ACTION_REPLY_ATTEMPT_COMPLETED=t;f.ACTION_STORY_NAVIGATION=u;f.INTERACTION_TAP_RESHARED_STORY=v;f.INTERACTION_TAP_RESHARED_TOOLTIP=w;f.GESTURES=x;f.SOURCE_CLOSE_FROM_MODAL=y;f.SOURCE_CLOSE_FROM_MODAL_CLOSE_BUTTON=z;f.SOURCE_CLOSE_FROM_LAST_STORY_FINISHING=A;f.SOURCES=B}),66); __d("XFBStoriesSingleStoryAsyncController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/stories/view/async/",{card_id:{type:"FBID"},story_id:{type:"FBID"},auto_open_viewersheet:{type:"Bool",defaultValue:!1},story_action_source:{type:"String"}})}),null); __d("FBStoriesRing",["csx","cx","Arbiter","CSS","DOM","FBStoriesLoggingConstants","XFBStoriesSingleStoryAsyncController"],(function(a,b,c,d,e,f,g,h,i){"use strict";a=function(){function a(a){this.$1=a.element;this.$2=a.profileId;this.$3=a.storyId;this.$4=!1;a=c("DOM").scry(this.$1,"._6_ut");a.length>0&&(this.$4=!0);this.$5()}var b=a.prototype;b.$5=function(){var a=this;c("Arbiter").subscribe("has_story_bucket_been_seen",function(b,e){if(a.$2===e){b=c("DOM").scry(a.$1,"._6_ut");b.length>0&&(d("CSS").removeClass(b[0],"_6_ut"),a.$4=!1)}});c("Arbiter").subscribe("update_next_thread_to_view",function(b,e){b=e.bucketOwnerId;e=e.threadId;if(a.$2===b&&a.$4){b=c("XFBStoriesSingleStoryAsyncController").getURIBuilder().setFBID("story_id",a.$3).setFBID("card_id",e).setBool("auto_open_viewersheet",!1).setString("story_action_source",d("FBStoriesLoggingConstants").SOURCES.POST_HEADER).getURI();a.$1.setAttribute("ajaxify",b)}})};return a}();g["default"]=a}),98); __d("FormSubmit",["AsyncRequest","AsyncResponse","CSS","DOMQuery","Event","Form","Parent","trackReferrer"],(function(a,b,c,d,e,f,g){var h={buildRequest:function(a,b){var e=(d("Form").getAttribute(a,"method")||"GET").toUpperCase();b=b&&d("Parent").byTag(b,"button")||b;var f=b&&d("Parent").byClass(b,"stat_elem")||a;if(d("CSS").hasClass(f,"async_saving"))return null;if(b&&(b.form!==a||b.nodeName!="INPUT"&&b.nodeName!="BUTTON"||b.type!="submit")){var g=d("DOMQuery").scry(a,".enter_submit_target")[0];g&&(b=g)}g=d("Form").serialize(a,b);d("Form").setDisabled(a,!0);b=d("Form").getAttribute(a,"ajaxify")||d("Form").getAttribute(a,"action");var h=!!d("Form").getAttribute(a,"data-cors");c("trackReferrer")(a,b);return new(c("AsyncRequest"))().setAllowCrossOrigin(h).setURI(b).setData(g).setNectarModuleDataSafe(a).setReadOnly(e=="GET").setMethod(e).setRelativeTo(a).setStatusElement(f).setInitialHandler(d("Form").setDisabled.bind(null,a,!1)).setHandler(function(b){c("Event").fire(a,"success",{response:b})}).setErrorHandler(function(b){c("Event").fire(a,"error",{response:b})!==!1&&c("AsyncResponse").defaultErrorHandler(b)}).setFinallyHandler(d("Form").setDisabled.bind(null,a,!1))},send:function(a,b){a=h.buildRequest(a,b);a&&a.send();return a}};a=h;g["default"]=a}),98); __d("MessengerWebPluginAnonymousTypedLogger",["Banzai","GeneratedLoggerUtils"],(function(a,b,c,d,e,f){"use strict";a=function(){function a(){this.$1={}}var c=a.prototype;c.log=function(a){b("GeneratedLoggerUtils").log("logger:MessengerWebPluginAnonymousLoggerConfig",this.$1,b("Banzai").BASIC,a)};c.logVital=function(a){b("GeneratedLoggerUtils").log("logger:MessengerWebPluginAnonymousLoggerConfig",this.$1,b("Banzai").VITAL,a)};c.logImmediately=function(a){b("GeneratedLoggerUtils").log("logger:MessengerWebPluginAnonymousLoggerConfig",this.$1,{signal:!0},a)};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setAppID=function(a){this.$1.app_id=a;return this};c.setCallsite=function(a){this.$1.callsite=a;return this};c.setClientFbid=function(a){this.$1.client_fbid=a;return this};c.setDebugData=function(a){this.$1.debug_data=a;return this};c.setDeltaType=function(a){this.$1.delta_type=a;return this};c.setDeviceParam=function(a){this.$1.device_param=a;return this};c.setDomainSource=function(a){this.$1.domain_source=a;return this};c.setDuration=function(a){this.$1.duration=a;return this};c.setEvent=function(a){this.$1.event=a;return this};c.setEventTimestamp=function(a){this.$1.event_timestamp=a;return this};c.setExceptionMessage=function(a){this.$1.exception_message=a;return this};c.setExceptionStacktrace=function(a){this.$1.exception_stacktrace=a;return this};c.setExceptionType=function(a){this.$1.exception_type=a;return this};c.setGateway=function(a){this.$1.gateway=a;return this};c.setIsUserLoggedIn=function(a){this.$1.is_user_logged_in=a;return this};c.setNewEventName=function(a){this.$1.new_event_name=a;return this};c.setOtherFields=function(a){this.$1.other_fields=b("GeneratedLoggerUtils").serializeMap(a);return this};c.setPageID=function(a){this.$1.page_id=a;return this};c.setPluginExtra=function(a){this.$1.plugin_extra=b("GeneratedLoggerUtils").serializeMap(a);return this};c.setPluginInterface=function(a){this.$1.plugin_interface=a;return this};c.setPluginName=function(a){this.$1.plugin_name=a;return this};c.setRefererURI=function(a){this.$1.referer_uri=a;return this};c.setRequestHeaders=function(a){this.$1.request_headers=a;return this};c.setRequestID=function(a){this.$1.request_id=a;return this};c.setRequestParam=function(a){this.$1.request_param=a;return this};c.setTabName=function(a){this.$1.tab_name=a;return this};c.setUpgradeLoggedInUserID=function(a){this.$1.upgrade_logged_in_user_id=a;return this};c.setUpstreamEvent=function(a){this.$1.upstream_event=a;return this};c.setWhitelistedDomains=function(a){this.$1.whitelisted_domains=a;return this};return a}();c={app_id:!0,callsite:!0,client_fbid:!0,debug_data:!0,delta_type:!0,device_param:!0,domain_source:!0,duration:!0,event:!0,event_timestamp:!0,exception_message:!0,exception_stacktrace:!0,exception_type:!0,gateway:!0,is_user_logged_in:!0,new_event_name:!0,other_fields:!0,page_id:!0,plugin_extra:!0,plugin_interface:!0,plugin_name:!0,referer_uri:!0,request_headers:!0,request_id:!0,request_param:!0,tab_name:!0,upgrade_logged_in_user_id:!0,upstream_event:!0,whitelisted_domains:!0};f["default"]=a}),66); __d("PluginOptin",["DOMEvent","DOMEventListener","MessengerWebPluginAnonymousTypedLogger","PlatformWidgetEndpoint","PluginLoggedOutUserTypedLogger","PluginMessage","PopupWindow","URI","UserAgent_DEPRECATED"],(function(a,b,c,d,e,f,g){var h,i={"default":{width:450,height:410},large:{width:475,height:605}},j=function(){function a(a,b){this.return_params=(h||(h=c("URI"))).getRequestURI().getQueryData(),this.login_params={},this.optin_params={},this.plugin=a,this.api_key=b,this.size="default",this.addReturnParams({ret:"optin"}),delete this.return_params.hash}var b=a.prototype;b.addReturnParams=function(a){Object.assign(this.return_params,a);return this};b.addLoginParams=function(a){Object.assign(this.login_params,a);return this};b.addOptinParams=function(a){Object.assign(this.optin_params,a);return this};b.setSize=function(a){this.size=a?a:"default";return this};b.start=function(){var a=this.api_key||127760087237610;(h||(h=c("URI"))).getRequestURI().getQueryData().kid_directed_site&&(this.login_params.kid_directed_site=!0);this.login_params.referrer=document.referrer;var b=new(h||(h=c("URI")))(c("PlatformWidgetEndpoint").dialog("plugin.optin")).addQueryData(this.optin_params).addQueryData({app_id:a,secure:h.getRequestURI().isSecure(),social_plugin:this.plugin,return_params:JSON.stringify(this.return_params),login_params:JSON.stringify(this.login_params)}),e=d("UserAgent_DEPRECATED").mobile()!==null;e?b.setSubdomain("m"):b.addQueryData({display:"popup"});this.return_params.act!==null&&this.return_params.act==="send"&&new(c("PluginLoggedOutUserTypedLogger"))().setPluginAppID(a).setPluginName(this.return_params.act).setHref(this.return_params.href).logVital();a=i[this.size];b=this.transformSocialPluginToFacebookDomainPopupURI(b,h.getRequestURI().getDomain(),e);this.popup=d("PopupWindow").open(b.toString(),a.height,a.width,"fbPluginAuthenticationPopupWindow");this.plugin==="customer_chat"&&this.login_params.chat_plugin_upgrade!=null&&this.login_params.chat_plugin_upgrade===!0&&new(c("MessengerWebPluginAnonymousTypedLogger"))().setPageID(this.login_params.page_id).setClientFbid(this.login_params.guest_id).setRequestID(this.login_params.request_id).setNewEventName("upgrade_plugin_optin_popup_opened").log();d("PluginMessage").listen();return this};b.transformSocialPluginToFacebookDomainPopupURI=function(a,b,c){b=b.split(".");if(b[0]!=="socialplugin")return a;b[b.length-1]="com";b[0]=c?"m":"www";return a.setDomain(b.join(".")).setProtocol("https")};return a}();j.starter=function(a,b,c,d){a=new j(a);a.addReturnParams(b||{});a.addLoginParams(c||{});a.addOptinParams(d||{});return a.start.bind(a)};j.listen=function(a,b,d,e,f){c("DOMEventListener").add(a,"click",function(a){new(c("DOMEvent"))(a).kill(),j.starter(b,d,e,f)()})};g["default"]=j}),98);