text: if (self.CavalryLogger) { CavalryLogger.start_js(["O16b2"]); }
  
  __d("videoPageContextualColorFetchUpdatedThemeColorQuery.graphql",[],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{kind:"LocalArgument",name:"pageID",type:"ID!",defaultValue:null}],b=[{kind:"Variable",name:"id",variableName:"pageID"}],c={kind:"ScalarField",alias:null,name:"video_page_theme_color",args:null,storageKey:null};return{kind:"Request",fragment:{kind:"Fragment",name:"videoPageContextualColorFetchUpdatedThemeColorQuery",type:"Query",metadata:null,argumentDefinitions:a,selections:[{kind:"LinkedField",alias:null,name:"page",storageKey:null,args:b,concreteType:"Page",plural:!1,selections:[c]}]},operation:{kind:"Operation",name:"videoPageContextualColorFetchUpdatedThemeColorQuery",argumentDefinitions:a,selections:[{kind:"LinkedField",alias:null,name:"page",storageKey:null,args:b,concreteType:"Page",plural:!1,selections:[c,{kind:"ScalarField",alias:null,name:"id",args:null,storageKey:null}]}]},params:{operationKind:"query",name:"videoPageContextualColorFetchUpdatedThemeColorQuery",id:"1960926613938874",text:null,metadata:{}}}}();e.exports=a}),null);
  __d("FBDraggableBar.react",["cx","invariant","DOMDimensions","React","ReactDOM","Rect","joinClasses"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.$6=function(a){a&&a.init(babelHelpers.assertThisInitialized(d))};d.onGrab=function(a,c){d.$1=a;d.$2=c;a=b("DOMDimensions").getElementDimensions(d.$2);c=a.width;a=a.height;d.setState({elementWidth:c,elementHeight:a});d.onDrag()};d.onDrag=function(){var a=new(b("Rect"))(d.$2);a=(a.l+a.r)/2;a=d.$7(a);d.setState({toIndex:a})};d.onDrop=function(){var a=d.$1;a!==void 0&&a!==null||h(0,3153);var b=d.state.toIndex;b!==void 0&&b!==null||h(0,3154);d.$8();d.props.onReorder&&d.props.onReorder(a,b);d.$4()};d.onCancelDrag=function(){d.$8()};d.state={toIndex:null,elementWidth:null,elementHeight:null};return d}var d=c.prototype;d.$4=function(){__p&&__p();var a=b("ReactDOM").findDOMNode(this);!a&&h(0,3155);a=a.childNodes;var c=[];for(var d=0;d<a.length;d++){var e=a[d];e instanceof Element||h(0,3156);c.push(new(b("Rect"))(e))}this.$3=c};d.$5=function(){__p&&__p();var a=b("ReactDOM").findDOMNode(this);a instanceof Element||h(0,3157);var c=a.childNodes,d=0;for(var e=0;e<c.length;e++){var f=c[e];f instanceof Element||h(0,3156);f=new(b("Rect"))(f);d+=f.r-f.l}a.clientWidth>=d||h(0,3158)};d.componentDidMount=function(){this.$5(),this.$4()};d.render=function(){var a=this,c=b("React").Children.map(this.props.children,function(c,d){d={ref:a.$6,index:d};return b("React").cloneElement(c,d)}),d=this.state.toIndex;if(d!==null&&d!==void 0){var e=b("React").jsx("div",{className:"_63ax",style:{width:this.state.elementWidth,height:this.state.elementHeight}},"placeholder");d=d<=this.$1?d:d+1;c.splice(d,0,e)}return b("React").jsx("span",{className:b("joinClasses")(this.props.className,"_42l3"),children:c})};d.$7=function(a){for(var b=0;b<this.$3.length;b++){var c=this.$3[b];if(c.l<=a&&a<c.r)return b}return this.$3.length};d.$8=function(){delete this.$1,delete this.$2,this.setState({elementWidth:null,elementHeight:null,toIndex:null})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("FBDraggableItem.react",["cx","invariant","Draggable","Event","FBOverlayBase.react","FBOverlayContainer.react","FBOverlayElement.react","Keys","React","ReactDOM","Rect","getScrollPosition","getViewportDimensions","nullthrows"],(function(a,b,c,d,e,f,g,h){__p&&__p();var i=10,j=250;a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={dragging:!1},d.$6=function(a){if(!a)return;a=b("ReactDOM").findDOMNode(a);a instanceof Element||h(0,2430);var c=b("ReactDOM").findDOMNode(babelHelpers.assertThisInitialized(d));c instanceof Element||h(0,2431);d.$3=a;d.$4=c},d.init=function(a){d.$1=a},d.$9=function(){if(d.state.dragging)return;var a=d.props,c=a.onGrab;a=a.index;c&&(a||a===0?c(a):c());d.$5=b("Event").listen(document,"keydown",function(a){a.keyCode===b("Keys").ESC&&(d.$12(),a.preventDefault())});d.setState({dragging:!0});d.$1.onGrab(b("nullthrows")(d.props.index),d.$4)},d.$10=function(){var a=d.$4.parentNode;if(!(a instanceof Element))return;a=new(b("Rect"))(a);var c=b("getViewportDimensions")(),e=b("getScrollPosition")(window),f=Math.max(c.width,i);f=new(b("Rect"))(e.y,Math.min(f,a.r+j),c.height+e.y,Math.max(0,a.l-j));d.$2&&d.$2.setBoundingBox(f);d.$1.onDrag()},d.$11=function(){d.$13(),d.$1.onDrop()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.$7=function(){var a=b("React").Children.map(this.props.children,function(a){return a});a.length>0&&a.length<=2||h(0,2432);return a};d.componentDidMount=function(){this.$7(),this.$8(!0)};d.componentWillUnmount=function(){this.$8(!1)};d.render=function(){var a=this.$7(),c=a.length!=2?null:b("React").jsx(b("FBOverlayElement.react"),{className:"_13uq",horizontal:"right",vertical:"top",children:b("React").jsx("div",{children:a[1]})});return b("React").jsxs(b("FBOverlayContainer.react"),{className:"_2rh6"+(this.state.dragging?" _2rjy":""),children:[b("React").jsx(b("FBOverlayBase.react"),{children:a[0]}),b("React").jsx(b("FBOverlayElement.react"),{horizontal:"left",ref:this.$6,vertical:"fit",children:b("React").jsx("div",{className:"_2rjz"})}),c]})};d.$8=function(a){var c=this.$2;a&&!c?this.$2=new(b("Draggable"))(this.$4).setNamespace("FBDraggableItem").setUseAbsolute(!0).setGrabHandler(this.$9).setDragHandler(this.$10).setDropHandler(this.$11).addHandle(this.$3):!a&&c&&(c.active&&this.$12(),c.destroy(),this.$2=null)};d.$12=function(){this.$2&&this.$2.killDrag(),this.$13(),this.$1.onCancelDrag()};d.$13=function(){this.$2&&this.$2.resetPosition(),this.setState({dragging:!1}),this.$5&&this.$5.remove(),delete this.$5};return c}(b("React").Component);e.exports=a}),null);
  __d("FBStoriesViewerHelper",["FBStoriesActionsHelper","FBStoriesActionTypes","FBStoriesDispatcher","JSResource"],(function(a,b,c,d,e,f){"use strict";var g=b("FBStoriesDispatcher").dispatch;a={toggleViewer:function(a,c){g({type:b("FBStoriesActionTypes").SET_VIEWER_OPEN,value:a,entrypoint:c});b("FBStoriesActionsHelper").resetNavMap();return b("JSResource")("FBStoriesViewer").__setRef("FBStoriesViewerHelper").load().then(function(b){b.getInstance().toggle(a)})}};e.exports=a}),null);
  __d("PagesCoverVideoTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:PagesCoverVideoLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:PagesCoverVideoLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:PagesCoverVideoLoggerConfig",this.$1,{signal:!0})};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.setIsFinished=function(a){this.$1.is_finished=a;return this};c.setPageID=function(a){this.$1.page_id=a;return this};c.setProgress=function(a){this.$1.progress=a;return this};c.setStage=function(a){this.$1.stage=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setTimeUs=function(a){this.$1.time_us=a;return this};c.setType=function(a){this.$1.type=a;return this};c.setVideoContainerType=function(a){this.$1.video_container_type=a;return this};c.setVideoID=function(a){this.$1.video_id=a;return this};c.setVideoStatus=function(a){this.$1.video_status=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};return a}();c={is_finished:!0,page_id:!0,progress:!0,stage:!0,time:!0,time_us:!0,type:!0,video_container_type:!0,video_id:!0,video_status:!0,weight:!0};e.exports=a}),null);
  __d("PageActionBarActionSelector.react",["ix","fbt","ContextualDialogArrow","Image.react","PageActionURLHandlerType","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","PopoverMenu.react","React","ReactXUIMenu","URI","VideoPageThemedActionBarButton.react","XUIButton.react","asset","cxMargin","fbglyph"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j=b("ReactXUIMenu").Item,k=function(a){__p&&__p();var c=function(c){b("PagesLogger").log(a.pageID,b("PagesLoggerEventEnum").CLICK,b("PagesLoggerEventTargetEnum").PAGE_ACTIONS,"pages__header__action_bar",["page_consumer_experience"],{action:c})};return b("React").jsx(b("ReactXUIMenu"),{children:a.actions.map(function(d){if(!d.url||!d.label||!d.label.text)return null;b("PagesLogger").log(a.pageID,b("PagesLoggerEventEnum").IMPRESSION,b("PagesLoggerEventTargetEnum").PAGE_ACTIONS,"pages__header__action_bar",["page_consumer_experience"],{action:d.__typename});var e=b("PageActionURLHandlerType")[d.url_handler_type]||null,f=d.url;(e==="async-dialog"||e==="async-post"||e==="dialog")&&(f=new(i||(i=b("URI")))(d.url).getUnqualifiedURI().toString());var g=function(){return c(d.__typename)};return b("React").jsx(j,{href:f,onClick:g,rel:e,target:e==="link-out-new-tab"?"_blank":"_self",children:d.label.text},d.label.text)})})};a=function(a){if(a.actions.length===0)return null;var c=a.videoPageThemeColor;return b("React").jsx(b("PopoverMenu.react"),{alignh:"right",layerBehaviors:[b("ContextualDialogArrow")],menu:k(a),children:c==null?b("React").jsx(b("XUIButton.react"),{haschevron:!1,image:b("React").jsx(b("Image.react"),{src:g("127000")}),label:h._("More"),labelIsHidden:!0,size:a.size||"large"}):b("React").jsx(b("VideoPageThemedActionBarButton.react"),{className:"_3-99",image:b("React").jsx(b("Image.react"),{src:g("484386")}),isBgFilled:!1,label:h._("More"),labelIsHidden:!0,videoPageThemeColor:c})})};e.exports=a}),null);
  __d("PageActionContainer.react",["React"],(function(a,b,c,d,e,f){"use strict";a=function(a){var c=a.action.ReactComponent;return!c?null:b("React").jsx(c,babelHelpers["extends"]({},a))};e.exports=a}),null);
  __d("PageCTAAction.react",["React"],(function(a,b,c,d,e,f){"use strict";a=function(a){var c=a.ReactComponent,d=a.call_to_action,e=a.cta_config,f=a.foodAndDrinkLoggingParams,g=a.servicesLoggingParams,h=a.should_auto_open,i=a.surface;return b("React").jsx(c,babelHelpers["extends"]({},a,{cta:{id:d?d.id:null,label:e&&e.label||d&&d.label||null,type:e&&e.cta_type||d&&d.cta_type||null},extraProps:{foodAndDrinkLoggingParams:f,servicesLoggingParams:g,shouldAutoOpen:Boolean(h)},page:{id:a.page.id},surface:i}))};e.exports=a}),null);
  __d("PageReportAction.react",["ix","Image.react","PageActionOpenURLAsyncDialog.react","React","fbglyph"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){return b("React").jsx(b("PageActionOpenURLAsyncDialog.react"),babelHelpers["extends"]({},a,{image:b("React").jsx(b("Image.react"),{src:g("128308")})}))};e.exports=a}),null);
  __d("PageSaveAction.react",["ix","fbt","ContextualDialogArrow","Image.react","PageActionOpenURLAsyncPost.react","PageActionURLHandlerType","PopoverMenu.react","PopoverMenuShowOnHover","React","ReactXUIMenu","URI","XSavedForLaterDashboardController","XUIPopoverButton.react","fbglyph"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i,j=b("ReactXUIMenu").Item;a=function(a){var c=a.action,d=c.url,e=c.url_handler_type;c=c.page;if(!c.has_viewer_saved)return b("React").jsx(b("PageActionOpenURLAsyncPost.react"),babelHelpers["extends"]({},a,{image:b("React").jsx(b("Image.react"),{src:g("127260")})}));c=b("React").jsxs(b("ReactXUIMenu"),{children:[b("React").jsx(j,{href:new(i||(i=b("URI")))(d).getUnqualifiedURI(),rel:b("PageActionURLHandlerType")[e]||null,children:h._("Unsave")},"unsave"),b("React").jsx(j,{href:b("XSavedForLaterDashboardController").getURIBuilder().getURI(),children:h._("View Saved Items")},"view_saved")]});return b("React").jsx(b("PopoverMenu.react"),{behaviors:[b("PopoverMenuShowOnHover")],layerBehaviors:[b("ContextualDialogArrow")],menu:c,children:b("React").jsx(b("XUIPopoverButton.react"),{image:b("React").jsx(b("Image.react"),{src:g("116046")}),label:h._("Saved"),size:"large"})})};e.exports=a}),null);
  __d("PageSuggestEditsAction.react",["ix","Image.react","PageActionOpenURLAsyncDialog.react","React","fbglyph"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){return b("React").jsx(b("PageActionOpenURLAsyncDialog.react"),babelHelpers["extends"]({},a,{image:b("React").jsx(b("Image.react"),{src:g("128156")})}))};e.exports=a}),null);
  __d("PagesHeaderFollowButton.react",["ix","cx","fbt","Arbiter","BasicFBNux","ContextualDialogArrow","Image.react","Link.react","PageGetNotificationUtil","PagesButton.react","PagesLikeFollowHelper","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","PopoverMenu.react","PopoverMenuOverlappingBorder","PopoverMenuShowOnHover","ProfileSubFollowStatus","React","ReactXUIMenu","SnoozedProfileTypedLogger","SubscribeButton","VideoPageThemedActionBarButton.react","XUIAmbientNUX.react","XUIButton.react","XUIMenuSeparator.react","XUIPopoverButton.react","XUIText.react","asset","fbglyph","uuid"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("ReactXUIMenu").SelectableMenu,k=b("ReactXUIMenu").Item,l=4225,m=5571;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$8=function(){d.props.snoozeStatus&&new(b("SnoozedProfileTypedLogger"))().setEvent("cancel_end_snooze").setItemObjID(d.props.pageID).setSessionID(d.$1).log()},d.$9=function(a){d.$11();b("PagesLikeFollowHelper").onFollowChangeWithTrackingData(a.target,d.props.pageID,!0,d.props.followLocation,null,d.props.qocDialogButton);d.props.shouldShowFollowPrivacyNux&&(d.setState({privacyNuxShown:!0}),b("BasicFBNux").onView(l));if(d.props.qocDialogButton){a=d.props.pageID;b("Arbiter").inform(b("SubscribeButton").SUBSCRIBED,{profile_id:a,suppress:!0})}},d.$12=function(a){d.$11();b("PagesLikeFollowHelper").onFollowChangeWithTrackingData(a.target,d.props.pageID,!1,d.props.followLocation,null,d.props.qocDialogButton);b("PagesLikeFollowHelper").onUnfollowWithConfirmation(d.props.pageID);if(d.props.qocDialogButton){a=d.props.pageID;b("Arbiter").inform(b("SubscribeButton").UNSUBSCRIBED,{profile_id:a,suppress:!0})}},c)||babelHelpers.assertThisInitialized(d)}c.getButtonSize=function(a){return b("XUIButton.react").getButtonSize(a)};var d=c.prototype;d.UNSAFE_componentWillMount=function(){this.$1=b("uuid")(),this.props.shouldShowFollowButtonNux===!0&&b("BasicFBNux").onView(m),this.setState({privacyNuxShown:!1,followButtonNuxShown:this.props.shouldShowFollowButtonNux})};d.componentWillUnmount=function(){this.$1=null};d.render=function(){__p&&__p();if(!this.props.followAllowed)return null;var a,c;if(this.props.snoozeStatus)a=this.$2(),c=this.$3(),new(b("SnoozedProfileTypedLogger"))().setEvent("profile_visit").setItemObjID(this.props.pageID).setSessionID(this.$1).log();else{if(!this.props.followStatus)return this.$4();else if(this.props.disableDropdown)return this.$5();a=this.$6();c=this.$7()}c=b("React").jsx(b("PopoverMenu.react"),{alignh:"right",behaviors:[b("PopoverMenuOverlappingBorder"),b("PopoverMenuShowOnHover")],layerBehaviors:[b("ContextualDialogArrow")],menu:b("React").jsx(j,{className:"_4bje"+(this.props.snoozeStatus?" _3qn5":""),multiple:!0,children:c}),onHide:this.$8,children:a});return this.props.asPrimaryButton==="true"?b("React").jsx("div",{className:"_6534",children:c}):c};d.$4=function(){var a=this.props.videoPageThemeColor;if(a)return b("React").jsx(b("VideoPageThemedActionBarButton.react"),{"data-testid":this.props.origin+"_follow_button_test_id",image:b("React").jsx(b("Image.react"),{src:g("488981")}),isBgFilled:!0,label:i._("Follow"),onClick:this.$9,ref:"followButton",videoPageThemeColor:a});if(this.props.blueFollowButton)return b("React").jsx(b("PagesButton.react"),{color:"fbblue",image:b("React").jsx(b("Image.react"),{className:"ctaButtonIcon",src:g("114929")}),label:b("React").jsx("span",{className:"blueButtonLabel",children:i._("Follow")}),onClick:this.$9});return this.props.asPrimaryButton==="true"?b("React").jsxs("span",{className:"_6534 uiContextualLayerParent",children:[b("React").jsx(b("XUIButton.react"),{"data-testid":this.props.origin+"_follow_button_test_id",image:b("React").jsx(b("Image.react"),{src:g("114929")}),label:i._("Follow"),onClick:this.$9,ref:"followButton",size:this.props.size||"large",use:"confirm"}),this.$10()]}):b("React").jsx(b("XUIButton.react"),{"data-testid":this.props.origin+"_follow_button_test_id",image:b("React").jsx(b("Image.react"),{src:g("127712")}),label:i._("Follow"),onClick:this.$9,size:this.props.size})};d.$11=function(){b("PagesLogger").log(this.props.pageID,b("PagesLoggerEventEnum").CLICK,b("PagesLoggerEventTargetEnum").PAGE_ACTIONS,"pages__header__action_bar",["page_consumer_experience"],{action:this.props.logAction})};d.$5=function(){return this.props.blueFollowButton?b("React").jsx(b("PagesButton.react"),{color:"fbblue",image:b("React").jsx(b("Image.react"),{className:"ctaButtonIcon",src:g("114932")}),label:b("React").jsx("span",{className:"blueButtonLabel",children:i._("Following")}),onClick:this.$12}):b("React").jsx(b("XUIButton.react"),{image:this.props.qocDialogButton?b("React").jsx(b("Image.react"),{src:g("116170")}):b("React").jsx(b("Image.react"),{src:g("116498")}),label:i._("Following"),onClick:this.$12,size:this.props.size})};d.$6=function(){var a=this.props.videoPageThemeColor;if(a)return b("React").jsx(b("VideoPageThemedActionBarButton.react"),{"data-testid":this.props.origin+"_followed_button_test_id",image:b("React").jsx(b("Image.react"),{src:g("602176")}),isBgFilled:!1,label:i._("Following"),ref:"followedButton",videoPageThemeColor:a});return this.props.asPrimaryButton==="true"?b("React").jsxs("div",{children:[b("React").jsx(b("XUIPopoverButton.react"),{"data-testid":this.props.origin+"_followed_button_test_id",image:b("React").jsx(b("Image.react"),{src:g("116533")}),label:i._("Following"),ref:"followedButton",size:this.props.size||"large"}),this.renderLayers()]}):b("React").jsxs("div",{children:[b("React").jsx(b("XUIPopoverButton.react"),{"data-testid":this.props.origin+"_followed_button_test_id",image:b("React").jsx(b("Image.react"),{src:g("116498")}),label:i._("Following"),ref:"followedButton",size:this.props.size}),this.renderLayers()]})};d.$2=function(){return b("React").jsx("div",{children:b("React").jsx(b("XUIPopoverButton.react"),{className:this.props.origin==="hovercard"?"_29kr":"",image:b("React").jsx(b("Image.react"),{src:g("396312")}),label:(this.props.snoozeData||{}).stateText,ref:"snoozedButton",size:this.props.size})})};d.renderLayers=function(){var a=this;return b("React").jsx(b("XUIAmbientNUX.react"),{contextRef:function(){return a.refs.followedButton},shown:this.state.privacyNuxShown,position:"right",onCloseButtonClick:function(){return a.$13()},children:i._("You can control who can see the people, Pages, and lists you follow {hyperlink for help center}.",[i._param("hyperlink for help center",b("React").jsx(b("Link.react"),{href:"/ajax/timeline/friends/edit_dialog.php",rel:"dialog",children:i._("here")}))])},"ambientNUX")};d.$13=function(){this.setState({privacyNuxShown:!1}),b("BasicFBNux").onDismiss(l)};d.$10=function(){var a=this;return b("React").jsxs(b("XUIAmbientNUX.react"),{contextRef:function(){return a.refs.followButton},onCloseButtonClick:function(){return a.$14()},position:"below",shown:this.state.followButtonNuxShown,children:[b("React").jsx(b("Image.react"),{className:"_2tv4",src:g("418478")}),b("React").jsx("div",{className:"_2tv5",children:i._("Follow this show to get new episodes in your watchlist on Facebook Watch.")})]},"ambientNUX")};d.$14=function(){this.setState({followButtonNuxShown:!1}),b("BasicFBNux").onDismiss(m)};d.$3=function(){var a=this;return[b("React").jsxs(k,{className:"_10it",onclick:function(){b("PagesLikeFollowHelper").onSnoozeChange(a.props.pageID,!1),new(b("SnoozedProfileTypedLogger"))().setEvent("end_snooze").setItemObjID(a.props.pageID).setSessionID(a.$1).log()},children:[b("React").jsx(b("XUIText.react"),{size:"meta1",display:"block",children:(this.props.snoozeData||{}).actionText}),b("React").jsx(b("XUIText.react"),{size:"meta1",className:"_34kz",children:(this.props.snoozeData||{}).timeLeftText})]},"Unsnooze."+this.props.pageID)]};d.$7=function(){var a,c=b("PageGetNotificationUtil").isNotifStatusOn(this.props.notifStatus);return[b("React").jsx(k,{"data-testid":"page_unfollow_item_test_id",onclick:this.$12,children:i._("Unfollow this Page")},"Unfollow."+this.props.pageID),b("React").jsx(b("XUIMenuSeparator.react"),{},"follow_seperator"),(a=b("PagesLikeFollowHelper")).newsfeedTitleMenuItem(this.props.pageID),a.newsfeedMenuItem(this.props.pageID,b("ProfileSubFollowStatus").SEE_FIRST,this.props.newsFeedStatus),a.newsfeedMenuItem(this.props.pageID,b("ProfileSubFollowStatus").REGULAR_FOLLOW,this.props.newsFeedStatus),a.newsfeedMenuItem(this.props.pageID,b("ProfileSubFollowStatus").UNFOLLOW,this.props.newsFeedStatus),a.notificationTitleMenuItem(this.props.pageID),a.notificationMenuItem(this.props.pageID,!0,c,this.props.notifStatus),a.notificationMenuItem(this.props.pageID,!1,!c,this.props.notifStatus)]};return c}(b("React").Component);e.exports=a}),null);
  __d("PagesHeaderFollowButtonContainer.react",["FluxContainer","PageNewsFeedStore","PagesFollowStore","PagesGetNotificationStore","PagesHeaderFollowButton.react","PagesLikeFollowNotifDispatcher","PagesLikeStore","PagesSnoozeStore","React","XUIButton.react"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}c.getButtonSize=function(a){return b("XUIButton.react").getButtonSize(a)};c.getStores=function(){return[b("PagesLikeStore"),b("PagesFollowStore"),b("PagesSnoozeStore"),b("PageNewsFeedStore"),b("PagesGetNotificationStore")]};c.calculateState=function(a,c){a=b("PagesLikeStore").getState();var d=b("PagesFollowStore").getState(),e=b("PagesSnoozeStore").getState()[c.pageID]||{},f=b("PagesGetNotificationStore").getState(),g=b("PageNewsFeedStore").getState();g={pageID:c.pageID,pageName:c.pageName,actorID:c.actorID,followAllowed:c.followAllowed,followLocation:c.followLocation,newsFeedStatus:g[c.pageID],disableDropdown:c.disableDropdown,shouldShowFollowPrivacyNux:c.shouldShowFollowPrivacyNux,likeStatus:a[c.pageID],followStatus:d[c.pageID],snoozeStatus:e.status,snoozeData:e.data,notifStatus:babelHelpers["extends"]({},f[c.pageID]),origin:c.origin,size:c.size,showUnpublishPageDialog:c.showUnpublishPageDialog,blueFollowButton:c.blueFollowButton,asPrimaryButton:c.asPrimaryButton,shouldShowFollowButtonNux:c.shouldShowFollowButtonNux,videoPageThemeColor:c.videoPageThemeColor,qocDialogButton:c.qocDialogButton,logAction:c.logAction};return g};var d=c.prototype;d.UNSAFE_componentWillMount=function(){b("PagesLikeFollowNotifDispatcher").explicitlyRegisterStores([b("PagesLikeStore"),b("PagesFollowStore"),b("PagesSnoozeStore"),b("PageNewsFeedStore"),b("PagesGetNotificationStore")]),b("PagesLikeFollowNotifDispatcher").dispatch({data:this.props,type:"init_data"})};d.render=function(){return b("React").jsx(b("PagesHeaderFollowButton.react"),babelHelpers["extends"]({},this.state))};return c}(b("React").Component);e.exports=b("FluxContainer").create(a,{withProps:!0})}),null);
  __d("PagesHeaderGamesNotificationButton.react",["ix","cx","fbt","ContextualDialogArrow","FDSButton.react","Image.react","PageGetNotificationUtil","PageLikeButton","PagesLikeFollowHelper","PagesLikeFollowNotifDispatcher","PopoverMenu.react","PopoverMenuOverlappingBorder","PopoverMenuShowOnHover","React","ReactXUIMenu","XUIMenuSeparator.react","XUIPopoverButton.react","asset","fbglyph"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("ReactXUIMenu").SelectableMenu,k=b("ReactXUIMenu").Item;function l(a){return b("React").jsx(b("FDSButton.react"),{icon:b("React").jsx(b("Image.react"),{src:g("493831")}),label:i._("Favorite"),onClick:a.onFollowClick})}function m(){return b("React").jsx(b("XUIPopoverButton.react"),{image:b("React").jsx(b("Image.react"),{src:g("116170")}),label:i._("Favorited"),size:"large"})}a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(a){b("PageLikeButton").doLikeAction(a.target,d.props.pageID,d.props.origin,d.props.actorID),b("PagesLikeFollowNotifDispatcher").dispatch({data:{pageID:d.props.pageID,state:"on",type:"live_video"},type:"notif_change"})},d.$2=function(a){b("PageLikeButton").doUnlikeAction(a,d.props.pageID,d.props.origin,d.props.actorID)},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.$3=function(){var a,c=b("PageGetNotificationUtil").isNotifStatusOn(this.props.notifStatus);return[b("React").jsx(k,{onclick:this.$2,children:i._("Unfavorite")},"Unfollow."+this.props.pageID),b("React").jsx(b("XUIMenuSeparator.react"),{},"follow_seperator"),(a=b("PagesLikeFollowHelper")).newsfeedTitleMenuItem(this.props.pageID),a.newsfeedMenuItem(this.props.pageID,"see_first",this.props.newsFeedStatus),a.newsfeedMenuItem(this.props.pageID,"follow",this.props.newsFeedStatus),a.newsfeedMenuItem(this.props.pageID,"unfollow",this.props.newsFeedStatus),a.notificationTitleMenuItem(this.props.pageID),a.notificationMenuItem(this.props.pageID,!0,c,this.props.notifStatus),a.notificationMenuItem(this.props.pageID,!1,!c,this.props.notifStatus)]};d.render=function(){return this.props.isSubscribed?b("React").jsx(b("PopoverMenu.react"),{alignh:"right",behaviors:[b("PopoverMenuOverlappingBorder"),b("PopoverMenuShowOnHover")],layerBehaviors:[b("ContextualDialogArrow")],menu:b("React").jsx(j,{className:"_4bje",multiple:!0,children:this.$3()}),children:b("React").jsx(m,{})}):b("React").jsx(l,{onFollowClick:this.$1})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesHeaderGamesNotificationContainer.react",["FluxContainer","PageNewsFeedStore","PagesFollowStore","PagesGetNotificationStore","PagesHeaderGamesNotificationButton.react","PagesLikeFollowNotifDispatcher","PagesLikeStore","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}c.getStores=function(){return[b("PagesFollowStore"),b("PagesGetNotificationStore"),b("PagesLikeStore"),b("PageNewsFeedStore")]};c.calculateState=function(a,c){a=b("PagesLikeStore").getState();var d=b("PagesFollowStore").getState();return{actorID:c.actorID,followLocation:c.followLocation,isSubscribed:a[c.pageID]||d[c.pageID],newsFeedStatus:b("PageNewsFeedStore").getState()[c.pageID],notifStatus:babelHelpers["extends"]({},b("PagesGetNotificationStore").getState()[c.pageID]),origin:c.origin,pageID:c.pageID}};var d=c.prototype;d.UNSAFE_componentWillMount=function(){b("PagesLikeFollowNotifDispatcher").explicitlyRegisterStores([b("PagesFollowStore"),b("PagesGetNotificationStore"),b("PagesLikeStore"),b("PageNewsFeedStore")]),b("PagesLikeFollowNotifDispatcher").dispatch({data:this.props,type:"init_data"})};d.render=function(){return b("React").jsx(b("PagesHeaderGamesNotificationButton.react"),babelHelpers["extends"]({},this.state))};return c}(b("React").PureComponent);e.exports=b("FluxContainer").create(a,{withProps:!0})}),null);
  __d("PagesHeaderRecommendPageButton.react",["ix","cx","fbt","AsyncDialog","AsyncRequest","ContextualDialogArrow","Image.react","PopoverMenu.react","PopoverMenuOverlappingBorder","PopoverMenuShowOnHover","React","ReactXUIMenu","URI","XRecommendPageComposerDialogAsyncController","XRecommendPageDeleteRecommendationDialogAsyncController","XUIButton.react","XUIPopoverButton.react","XPagesProfileReviewsController","asset","goURI","gkx"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k=b("ReactXUIMenu").SelectableMenu,l=b("ReactXUIMenu").Item;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(a){a=b("XRecommendPageComposerDialogAsyncController").getURIBuilder().setFBID("page_id",String(d.props.pageID)).setEnum("surface","page_recommendation_action_bar").setEnum("ref_type","page_recommendation_action_bar");d.props.canRecommendWithType&&a.setEnum("recommendation_type","positive");b("AsyncDialog").send(new(b("AsyncRequest"))(new(j||(j=b("URI")))(a.getURI()).getUnqualifiedURI()))},d.$2=function(a){b("AsyncDialog").send(new(b("AsyncRequest"))(b("XRecommendPageDeleteRecommendationDialogAsyncController").getURIBuilder().setFBID("page_id",String(d.props.pageID)).getURI().getUnqualifiedURI()))},d.$3=function(a){b("goURI")(b("XPagesProfileReviewsController").getURIBuilder().setString("page_token",d.props.pageURIToken).getURI())},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){if(this.props.isRecommended&&this.props.canRecommendWithType){var a=b("gkx")("678726")?b("React").jsx(l,{children:i._("Edit recommendation")},"editRecommendation."+this.props.pageID):null;return b("React").jsx(b("PopoverMenu.react"),{alignh:"right",behaviors:[b("PopoverMenuOverlappingBorder"),b("PopoverMenuShowOnHover")],layerBehaviors:[b("ContextualDialogArrow")],menu:b("React").jsxs(k,{multiple:!0,children:[a,b("React").jsx(l,{onClick:this.$3,children:i._("View Recommendation")},"viewRecommendation."+this.props.pageID),b("React").jsx(l,{onClick:this.$2,children:i._("Delete recommendation")},"deleteRecommendation."+this.props.pageID)]}),children:b("React").jsx(b("XUIPopoverButton.react"),{image:b("React").jsx(b("Image.react"),{src:g("548195")}),label:i._("Recommended"),size:"large"})})}else return b("React").jsx(b("XUIButton.react"),{className:"_rfh",image:b("React").jsx(b("Image.react"),{src:g("548196")}),label:i._("Recommend"),onClick:this.$1,size:"large"})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesRecommendPageDispatcher",["Arbiter","ExplicitRegistrationReactDispatcher","SubscriptionsHandler"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){var d;d=a.call(this,c)||this;c=new(b("SubscriptionsHandler"))();c.addSubscriptions(b("Arbiter").subscribe("pageRecommendation/recommendChange",function(a,b){d.dispatchRecommendChange(b.pageID,b.recommendStatus)}));return d}var d=c.prototype;d.dispatchRecommendChange=function(a,b){this.dispatch({type:"recommend_changed",data:{pageID:a,recommendStatus:b}})};return c}(b("ExplicitRegistrationReactDispatcher"));e.exports=new a({strict:!0})}),null);
  __d("PagesRecommendPageStore",["FluxReduceStore","PagesRecommendPageDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return{}};c.reduce=function(a,b){a=babelHelpers["extends"]({},a);switch(b.type){case"init_data":case"recommend_changed":a[b.data.pageID]=b.data.recommendStatus;break}return a};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("PagesRecommendPageDispatcher"))}),null);
  __d("PagesHeaderRecommendPageButtonContainer.react",["FluxContainer","PagesHeaderRecommendPageButton.react","PagesRecommendPageDispatcher","PagesRecommendPageStore","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);c.getStores=function(){return[b("PagesRecommendPageStore")]};c.calculateState=function(a,c){a=b("PagesRecommendPageStore").getState();return{isRecommended:a[c.pageID]}};function c(c){var d;d=a.call(this,c)||this;b("PagesRecommendPageDispatcher").explicitlyRegisterStores([b("PagesRecommendPageStore")]);b("PagesRecommendPageDispatcher").dispatch({data:c,type:"init_data"});return d}var d=c.prototype;d.render=function(){return b("React").jsx(b("PagesHeaderRecommendPageButton.react"),{canRecommendWithType:this.props.canRecommendWithType,isRecommended:this.state.isRecommended,pageID:this.props.pageID,pageURIToken:this.props.pageURIToken})};return c}(b("React").PureComponent);e.exports=b("FluxContainer").create(a,{withProps:!0})}),null);
  __d("PagesActionBarChannel.react",["cx","InlineLoginDialogWrapper.react","PageActionBarActionSelector.react","PageActionContainer.react","PageCallToActionRef","PageCTAAction.react","PagesHeaderFollowButtonContainer.react","PagesHeaderGamesNotificationContainer.react","PagesHeaderLikeButtonContainer.react","PagesHeaderRecommendPageButtonContainer.react","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","React","SEOInlineLoginDialogGating.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();return b("React").jsxs("div",{className:"_5hgz"+(a.videoPageThemeColor==null?" _51xa":""),children:[a.primaryFollowButtonInBar!=null&&a.videoPageThemeColor!=null&&b("React").jsx(b("PagesHeaderFollowButtonContainer.react"),babelHelpers["extends"]({},a.likeFollowData,{asPrimaryButton:"false",videoPageThemeColor:a.videoPageThemeColor})),a.customActionsData.slice(0,a.numberOfActionBarButtons).map(function(c,d){b("PagesLogger").log(a.pageID,b("PagesLoggerEventEnum").IMPRESSION,b("PagesLoggerEventTargetEnum").PAGE_ACTIONS,"pages__header__action_bar",["page_consumer_experience"],{action:c.__typename});switch(c.__typename){case"PageLikeAction":return{element:b("React").createElement(b("PagesHeaderLikeButtonContainer.react"),babelHelpers["extends"]({},a.likeFollowData,{hideButtonText:a.hideButtonText,key:c.__typename+d,logAction:c.__typename,size:"large",videoPageThemeColor:a.videoPageThemeColor})),isCTAAction:!1};case"PageFollowAction":return{element:b("React").createElement(b("PagesHeaderFollowButtonContainer.react"),babelHelpers["extends"]({},a.likeFollowData,{asPrimaryButton:"false",key:c.__typename+d,logAction:c.__typename,size:"large",videoPageThemeColor:a.videoPageThemeColor})),isCTAAction:!1};case"PageGetGamesNotificationAction":return{element:b("React").createElement(b("PagesHeaderGamesNotificationContainer.react"),babelHelpers["extends"]({},a.likeFollowData,{key:c.__typename+d})),isCTAAction:!1};case"PageCTAAction":return{element:b("React").createElement(b("PageCTAAction.react"),babelHelpers["extends"]({},c,{className:"_rfh",key:c.__typename+d,surface:b("PageCallToActionRef").PAGES_ACTION_BAR_CHANNEL})),isCTAAction:!0};case"PageRecommendPageAction":return{element:b("React").createElement(b("PagesHeaderRecommendPageButtonContainer.react"),babelHelpers["extends"]({},a.recommendData,{key:c.__typename+d})),isCTAAction:!1};default:c.hideButtonText=a.hideButtonText;return{element:b("React").jsx(b("PageActionContainer.react"),{action:c,className:"_rfh _17q_",pageID:a.pageID,size:"large",videoPageThemeColor:a.videoPageThemeColor},c.__typename+d),isCTAAction:!1}}}).map(function(c,d){return a.next!=null&&!c.isCTAAction?b("React").jsx(b("InlineLoginDialogWrapper.react"),{SEOInlineLoginDialogGatingPayload:b("SEOInlineLoginDialogGating.react").seoPagesLoginPrompt,next:a.next,children:c.element},d):c.element}),b("React").jsx(b("PageActionBarActionSelector.react"),{actions:a.customActionsData.slice(a.numberOfActionBarButtons),pageID:a.pageID,videoPageThemeColor:a.videoPageThemeColor})]})};e.exports=a}),null);
  __d("PagesActionsUnitStore",["FluxReduceStore","PagesHeaderDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return{callToAction:null,likeFollowData:null,recommendData:null,messageData:null,moreMenuItemConfigs:[],pageID:"0",customActionsData:[],numberOfActionBarButtons:3,primaryFollowButtonInBar:!1,hideButtonText:!1,videoPageThemeColor:null}};c.reduce=function(a,b){switch(b.type){case"actions_unit_data":return babelHelpers["extends"]({},a,b.data);case"update_video_page_theme_color":return babelHelpers["extends"]({},a,{videoPageThemeColor:b.videoPageThemeColor})}return a};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("PagesHeaderDispatcher"))}),null);
  __d("PagesActionBarChannelContainer.react",["FluxContainer","PagesActionBarChannel.react","PagesActionsUnitStore","PagesHeaderDispatcher","PagesHeaderFollowButtonContainer.react","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}c.getStores=function(){return[b("PagesActionsUnitStore")]};c.calculateState=function(){return b("PagesActionsUnitStore").getState()};var d=c.prototype;d.UNSAFE_componentWillMount=function(){b("PagesHeaderDispatcher").explicitlyRegisterStore(b("PagesActionsUnitStore")),b("PagesHeaderDispatcher").dispatch({data:this.props,type:"actions_unit_data"})};d.render=function(){var a=this.state.primaryFollowButtonInBar,c=this.state.videoPageThemeColor;return b("React").jsxs("div",{children:[a===!0&&(c===null||c===""||c===void 0)?b("React").jsx(b("PagesHeaderFollowButtonContainer.react"),babelHelpers["extends"]({},this.state.likeFollowData,{asPrimaryButton:"true"})):null,b("React").jsx(b("PagesActionBarChannel.react"),babelHelpers["extends"]({},this.state))]})};return c}(b("React").Component);e.exports=b("FluxContainer").create(a)}),null);
  __d("PagesPrimaryButtonsActionChannel.react",["cx","InlineLoginDialogWrapper.react","Layout.react","PageActionContainer.react","PageCallToActionRef","PageCTAAction.react","React","SEOInlineLoginDialogGating.react","cxMargin","qex"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("Layout.react").Column,i=b("Layout.react").FillColumn;a=function(a){var c=a.primaryButtons,d=c[0],e=c[1];if(!d)return null;c=a.isAdmin?!1:b("qex")._("815972");var f=a.isAdmin?!1:b("qex")._("815973");return b("React").jsxs(b("Layout.react"),{className:"_2iar",children:[b("React").jsx(i,{className:c?"_7gir":"",children:d.__typename==="PageCTAAction"?b("React").jsx(b("PageCTAAction.react"),babelHelpers["extends"]({},d,{className:(e?"_147q":"")+" _604m",entrypoint:"fb_page:primary_message_button",surface:b("PageCallToActionRef").PAGES_ACTIONS_UNIT_SURFACE})):b("React").jsx(b("InlineLoginDialogWrapper.react"),{SEOInlineLoginDialogGatingPayload:b("SEOInlineLoginDialogGating.react").seoPagesLoginPrompt,next:a.next,children:b("React").jsx(b("PageActionContainer.react"),{action:d,isSecondaryAction:!1,className:(e?"":"_xah")+(e?"":" _2ias")+(e?"":" _2-sm")+(e?"":" _1olk"),size:"large"})})}),e&&!f?b("React").jsx(h,{className:"_3-9b",children:function(){var c=b("React").jsx(b("PageActionContainer.react"),{action:e,isSecondaryAction:!0,size:"large"});return e.__typename!=="PageCTAAction"?b("React").jsx(b("InlineLoginDialogWrapper.react"),{SEOInlineLoginDialogGatingPayload:b("SEOInlineLoginDialogGating.react").seoPagesLoginPrompt,next:a.next,children:c}):{pageActionContainer:c}}()}):null]})};e.exports=a}),null);
  __d("PageContentTabMessageOwnerDialog",["cx","fbt","AbstractTextArea.react","AsyncRequest","LayerFadeOnHide","PageContentTabSuccessDialog.react","PageContentTabSuccessDialogTimer","React","ReactDOM","XPagesMessagePageOwnerController","XUIDialog.react","XUIDialogBody.react","XUIDialogButton.react","XUIDialogFooter.react","XUIDialogTitle.react","nullthrows"],(function(a,b,c,d,e,f,g,h){__p&&__p();a=b("React").PropTypes;var i=5,j=b("PageContentTabSuccessDialogTimer").TIME_IN_MS,k=function(c){"use strict";__p&&__p();babelHelpers.inheritsLoose(a,c);function a(){__p&&__p();var a,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(a=d=c.call.apply(c,[this].concat(f))||this,d.state={messageText:null,isSendingMessage:!1},d.$1=null,d.$2=function(){d.$1&&d.setState({messageText:d.$1.getValue()})},d.$3=function(){d.setState({isSendingMessage:!0});var a=b("XPagesMessagePageOwnerController").getURIBuilder().setString("message",b("nullthrows")(d.$1).getValue()).setString("page_id",b("nullthrows")(d.props.pageID)).getURI();new(b("AsyncRequest"))().setURI(a).setHandler(function(a){a=a.getPayload().threadID;d.setState({isSendingMessage:!1,messageText:null});d.props.onMessageThreadInitiated&&d.props.onMessageThreadInitiated(a)}).setErrorHandler(function(){d.setState({isSendingMessage:!1})}).setFinallyHandler(function(a){d.props.callbackParent(!0)}).send()},a)||babelHelpers.assertThisInitialized(d)}var d=a.prototype;d.render=function(){var a=this,c;return(c=b("React")).jsxs(b("XUIDialog.react"),{behaviors:{LayerFadeOnHide:b("LayerFadeOnHide")},shown:!0,width:500,children:[c.jsx(b("XUIDialogTitle.react"),{children:c.jsxs("div",{children:[h._("Message to"),"\xa0",this.props.username]})}),c.jsx(b("XUIDialogBody.react"),{children:c.jsx(b("AbstractTextArea.react"),{autoFocus:!0,className:"_3k3a",disabled:this.state.isSendingMessage,ref:function(b){return a.$1=b},onChange:this.$2,placeholder:h._("Send a message to {Account Name}",[h._param("Account Name",this.props.username)]),rows:i})}),c.jsx(b("XUIDialogFooter.react"),{children:c.jsx(b("XUIDialogButton.react"),{action:"confirm",disabled:this.state.isSendingMessage||this.state.messageText==null||this.state.messageText.trim().length===0,label:h._("Send Message"),onClick:this.$3,use:"confirm"})})]})};return a}(b("React").Component);k.propTypes={existingThreadID:a.string,username:a.string,callbackParent:a.func,onChatThreadOpen:a.func,onMessageThreadInitiated:a.func};c={onChildChanged:function(a){a===!0&&this.hideWithSuccessMessage("Message Sent!")},show:function(a,c){var d=this;this._container||(this._container=document.createElement("div"));b("ReactDOM").render(b("React").jsx(k,{username:a,pageID:c,callbackParent:function(a){return d.onChildChanged(a)}}),this._container)},hide:function(){if(!this._container)return;this.destroy()},hideWithSuccessMessage:function(a){if(!this._container)return;b("ReactDOM").render(b("React").jsx(b("PageContentTabSuccessDialog.react"),{successLabel:a}),this._container);setTimeout(this.destroy.bind(this),j)},destroy:function(){b("ReactDOM").unmountComponentAtNode(this._container),this._container=null}};e.exports=c}),null);
  __d("PagesCoverDispatcher",["ExplicitRegistrationReactDispatcher"],(function(a,b,c,d,e,f){"use strict";e.exports=new(b("ExplicitRegistrationReactDispatcher"))({strict:!0})}),null);
  __d("PagesCoverCoreStore",["AsyncRequest","FluxReduceStore","PagesCoverDispatcher","XPagesCoverCancelEditAsyncController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return{canViewerEditProfile:!1,currentCoverType:"cover_photo",hasCoverSet:!1,isEditMode:!1,newUploadPhotoIDs:[],newUploadVideoIDs:[],pageID:"",previousCoverType:"cover_photo",shouldShowEditMenuForAdmins:!0,shouldShowLoadingOverlay:!1,eventTourBadgeInfo:{tourID:null,title:null,subtitle:null,eventTourBadgeStatus:"no_tour",shouldShowNux:!1},disableCoverVideoUploadOption:!1}};d.getEventTourBadgeInfo=function(){return this.getState().eventTourBadgeInfo};d.deleteNewUploadMedia=function(a,c){new(b("AsyncRequest"))().setMethod("POST").setURI(b("XPagesCoverCancelEditAsyncController").getURIBuilder().getURI()).setData({page_id:a,photo_id_vector:c}).send()};d.reduce=function(a,b){__p&&__p();var c=null;switch(b.type){case"new_cover_data":var d=b.data,e=d.coreData;d=d.pageID;e&&(c=babelHelpers["extends"]({},e,{isEditMode:!1,newUploadPhotoIDs:[],newUploadVideoIDs:[],pageID:d,previousCoverType:e.currentCoverType}));break;case"photo_saved":case"photo_removed":c=babelHelpers["extends"]({},a,{shouldShowEditMenuForAdmins:!0});break;case"photo_uploading":c=babelHelpers["extends"]({},a,{shouldShowEditMenuForAdmins:!1,shouldShowLoadingOverlay:a.currentCoverType!=="cover_photo"});break;case"photo_previewing":c=babelHelpers["extends"]({},a,{previousCoverType:a.currentCoverType,currentCoverType:"cover_photo",shouldShowEditMenuForAdmins:!1,shouldShowLoadingOverlay:!1});if(b.data.isNewUpload){d=Array.from(a.newUploadPhotoIDs);d.push(b.data.coverPhotoData.id);c.newUploadPhotoIDs=d}break;case"photo_saving":c=babelHelpers["extends"]({},a,{shouldShowEditMenuForAdmins:!1,currentCoverType:"loading"});break;case"video_invalid_upload":c=babelHelpers["extends"]({},a,{shouldShowEditMenuForAdmins:!a.isEditMode});break;case"video_start_upload":c=babelHelpers["extends"]({},a,{currentCoverType:"cover_video",isEditMode:!0,previousCoverType:a.currentCoverType,shouldShowEditMenuForAdmins:!1});break;case"video_uploading":case"video_encoding":c=babelHelpers["extends"]({},a,{shouldShowEditMenuForAdmins:!1});break;case"video_choosing_thumbnail":c=babelHelpers["extends"]({},a);break;case"video_publishing":c=babelHelpers["extends"]({},a,{isEditMode:!1,shouldShowEditMenuForAdmins:!1,currentCoverType:"loading"});break;case"video_previewing":c=babelHelpers["extends"]({},a,{isEditMode:!0,shouldShowEditMenuForAdmins:!1});e=b.data;d=e.isNewUpload;e=e.videoID;if(d){d=Array.from(a.newUploadVideoIDs);d.push(e);c.newUploadVideoIDs=d}else c.previousCoverType=a.currentCoverType,c.currentCoverType="cover_video";break;case"photo_cancel":case"video_cancelling":c=babelHelpers["extends"]({},a,{currentCoverType:a.previousCoverType,isEditMode:!1,shouldShowEditMenuForAdmins:!1,shouldShowLoadingOverlay:!0});this.deleteNewUploadMedia(a.pageID,a.newUploadPhotoIDs);break;case"video_published":c=babelHelpers["extends"]({},a,{shouldShowEditMenuForAdmins:!0});break;case"slideshow_edit":c=babelHelpers["extends"]({},a,{isEditMode:!0,previousCoverType:a.currentCoverType,shouldShowEditMenuForAdmins:!1,currentCoverType:"cover_slideshow"});break;case"slideshow_saving":c=babelHelpers["extends"]({},a,{isEditMode:!1});break;case"slideshow_photo_previewing":if(b.data.isNewUpload){e=Array.from(a.newUploadPhotoIDs);e.push(b.data.itemData.carouselMediaData.photoData.coverPhotoData.id);c=babelHelpers["extends"]({},a,{newUploadPhotoIDs:e})}break;case"slideshow_video_encode_finished":if(b.data){d=b.data.videoData;e=Array.from(a.newUploadVideoIDs);e.push(d.videoID);c=babelHelpers["extends"]({},a,{newUploadVideoIDs:e})}break;case"slideshow_editing_cancelled":c=babelHelpers["extends"]({},a,{currentCoverType:a.previousCoverType,isEditMode:!1,newUploadPhotoIDs:[],newUploadVideoIDs:[],shouldShowEditMenuForAdmins:!0});this.deleteNewUploadMedia(a.pageID,a.newUploadPhotoIDs);break;case"cover_removing":c=babelHelpers["extends"]({},a,{shouldShowEditMenuForAdmins:!1,shouldShowLoadingOverlay:!0});break;case"on_tour_badge_updated":c=babelHelpers["extends"]({},a,{eventTourBadgeInfo:b.data,shouldShowLoadingOverlay:!1});break;case"loading":c=babelHelpers["extends"]({},a,{shouldShowLoadingOverlay:!0});break}return c||a};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("PagesCoverDispatcher"))}),null);
  __d("PageOnTourOverlay.react",["cx","EventActionContext","EventsActionsLogger","FBJSON","FluxContainer","Link.react","PagesCoverCoreStore","React","XEventsTourPermalinkController","XUIText.react","joinClasses","nullthrows"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$3=function(){d.$2(b("EventsActionsLogger").Type.CLICK)},c)||babelHelpers.assertThisInitialized(d)}c.getStores=function(){return[b("PagesCoverCoreStore")]};c.calculateState=function(){return b("PagesCoverCoreStore").getEventTourBadgeInfo()};var d=c.prototype;d.componentDidMount=function(){this.$1()&&this.$2(b("EventsActionsLogger").Type.VIEW)};d.$2=function(a){var c;(c=b("EventsActionsLogger")).log(null,{acontext:this.$4(),target:c.Target.TOUR,type:a,mechanism:c.Mechanism.PAGE_COVER_AREA,surface:c.Surface.PAGE,target_id:b("nullthrows")(this.state.tourID)})};d.$1=function(){var a=this.state,b=a.tourID,c=a.title;a=a.eventTourBadgeStatus;return a==="tour_badge_shown"&&b!==null&&c!==null};d.$4=function(){return b("EventActionContext").addActionHistoryEntry(b("EventActionContext").getNewActionContext(),{surface:b("EventsActionsLogger").Surface.PAGE,mechanism:b("EventsActionsLogger").Mechanism.PAGE_COVER_AREA,extra_data:b("FBJSON").stringify({tourID:this.state.tourID})})};d.render=function(){if(!this.$1())return null;var a=this.state,c=a.title,d=a.subtitle;a=a.tourID;var e="_ncd";this.props.className&&(e=b("joinClasses")(e,this.props.className));a=b("XEventsTourPermalinkController").getURIBuilder().setFBID("tour_id",a).setString("acontext",b("EventActionContext").toString(this.$4())).getURI();return b("React").jsxs("div",{className:e,children:[b("React").jsx(b("Link.react"),{href:a,onClick:this.$3,children:b("React").jsx(b("XUIText.react"),{className:"_4yv7",color:"white",size:"header1",children:c})}),b("React").jsx("br",{}),b("React").jsx(b("XUIText.react"),{className:"_nce _4yv7",size:"header3",children:d})]})};return c}(b("React").PureComponent);e.exports=b("FluxContainer").create(a)}),null);
  __d("PagesCoverLoadingScreen.react",["cx","CenteredContainer.react","React","XUISpinner.react"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){var c=b("React").jsx(b("CenteredContainer.react"),{fullHeight:!0,horizontal:!0,vertical:!0,children:b("React").jsx(b("XUISpinner.react"),{background:"light",size:"large"})}),d=a.height,e=a.width;a=a.isInSettingsPage;return d&&e?b("React").jsx("div",{style:{height:d,width:e},children:c}):b("React").jsx("div",{className:(a?"":"_2rc-")+(a?" _7tj4":""),children:c})};e.exports=a}),null);
  __d("PagesCoverDimension",[],(function(a,b,c,d,e,f){"use strict";e.exports={COVER_WIDTH:820,COVER_HEIGHT:312,COVER_WIDTH_IN_SETTINGS:514,COVER_HEIGHT_IN_SETTINGS:195,COVER_WIDTH_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE:514,COVER_HEIGHT_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE:289,COVER_WIDTH_FOR_MIGRATED_SHOW_PAGE:820,COVER_HEIGHT_FOR_MIGRATED_SHOW_PAGE:461,THUMBNAIL_HEIGHT_IN_SETTINGS:37,THUMBNAIL_WIDTH_IN_SETTINGS:94}}),null);
  __d("PagesCoverOverlay.react",["ix","cx","fbt","AsyncRequest","Image.react","LayerFadeOnHide","PageCallToActionRef","PageCTAAction.react","PagesEventObserver","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","React","ShimButton.react","SimpleNUXMessage","SimpleNUXMessageTypes","XPagesCoverOverlayEditAsyncController","XPagesCoverOverlayRemoveAsyncController","XUIAmbientNUX.react","XUIText.react","fbglyph"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=100;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.$7=function(a){a=a.target;a instanceof HTMLTextAreaElement&&a.value.length<=j&&d.setState({newDescription:a.value})};d.$11=function(){d.setState({isEditing:!0,shouldShowNUX:!1});return};d.$9=function(){d.setState({isEditing:!1,newDescription:d.state.currentDescription||""})};d.$10=function(){var a=null,c=null;!d.state.newDescription?(a=b("XPagesCoverOverlayRemoveAsyncController").getURIBuilder().getURI(),c=!0):(a=b("XPagesCoverOverlayEditAsyncController").getURIBuilder().getURI(),c=d.state.newDescription);new(b("AsyncRequest"))().setURI(a).setData({page_id:d.props.pageID,description:c}).setHandler(function(a){a.payload.description!==null&&d.setState({isEditing:!1,newDescription:a.payload.description||"",currentDescription:a.payload.description})}).send()};d.$13=function(){b("SimpleNUXMessage").markMessageSeenByUser(b("SimpleNUXMessageTypes").PAGES_COVER_DESCRIPTION_CREATION_NUX),d.setState({shouldShowNUX:!1})};d.state={isEditing:!1,newDescription:d.props.description||"",currentDescription:d.props.description,shouldShowNUX:!1};return d}var d=c.prototype;d.componentDidMount=function(){this.$1()&&this.setState({shouldShowNUX:!0})};d.UNSAFE_componentWillReceiveProps=function(a){if(this.props.description===a.description)return;this.setState({newDescription:a.description||"",currentDescription:a.description})};d.render=function(){var a=this.props.description;a=!!a||this.$2();return!a&&!this.props.isEditable?null:b("React").jsxs("div",{children:[b("React").jsx("div",{className:"_4i3o"}),b("React").jsxs("div",{className:"_4i3n",children:[this.$3(),this.$4(),this.$5(),this.$6()]})]})};d.$3=function(){if(this.state.isEditing||!this.state.currentDescription)return null;b("PagesLogger").log(this.props.pageID,b("PagesLoggerEventEnum").IMPRESSION,b("PagesLoggerEventTargetEnum").PAGE_COVER_DESCRIPTION,b("PageCallToActionRef").PAGES_COVER_AREA_SURFACE);b("PagesEventObserver").notify("cover_area_description_impression",this.props.pageID);var a=this.$2();return b("React").jsx("div",{className:"_4i46"+(a?" _4i47":"")+(a?"":" _4i4d"),children:b("React").jsx(b("XUIText.react"),{children:this.state.currentDescription})})};d.$4=function(){if(this.$2()){b("PagesLogger").log(this.props.pageID,b("PagesLoggerEventEnum").IMPRESSION,b("PagesLoggerEventTargetEnum").PAGE_COVER_CTA_BUTTON,b("PageCallToActionRef").PAGES_COVER_AREA_SURFACE);b("PagesEventObserver").notify("cover_area_cta_impression",this.props.pageID);return b("React").jsx(b("PageCTAAction.react"),babelHelpers["extends"]({},this.props.primaryButton,{className:"_1kp2 _4i44 _291t",surface:b("PageCallToActionRef").PAGES_COVER_AREA_SURFACE}))}return null};d.$5=function(){if(!this.props.isEditable||!this.state.isEditing)return null;var a=this.$2();return b("React").jsx("div",{children:b("React").jsx("textarea",{ref:function(a){a&&a.focus()},className:"_4i4e"+(a?" _4i47":"")+(a?"":" _4i4d"),maxLines:"3",value:this.state.newDescription,onChange:this.$7,onKeyDown:this.$8})})};d.$6=function(){if(!this.props.isEditable||this.props.isPreviewMode||this.props.isLoading)return null;if(this.state.isEditing){var a;return(a=b("React")).jsxs("div",{children:[a.jsx("div",{className:"_4i4f",children:a.jsx("div",{className:"_4i4g",children:a.jsx(b("XUIText.react"),{children:i._("{current_char_num} \/ {max_char_num}",[i._param("current_char_num",this.state.newDescription.length),i._param("max_char_num",j)])})})}),a.jsxs("div",{className:"_4i4p",children:[a.jsx(b("ShimButton.react"),{className:"_4i4r",onClick:this.$9,children:a.jsx(b("Image.react"),{src:g("127524")})}),a.jsx(b("ShimButton.react"),{className:"_4i4r",onClick:this.$10,children:a.jsx(b("Image.react"),{src:g("114570")})})]})]})}return b("React").jsxs(b("ShimButton.react"),{className:"_4i4p",onClick:this.$11,children:[b("React").jsx("div",{className:"_4i4r",children:b("React").jsx(b("Image.react"),{src:g("115342")})}),b("React").jsx("div",{className:"_4i4s",ref:"coverEditButton",children:b("React").jsx(b("XUIText.react"),{children:i._("Edit")})}),this.$12()]})};d.$8=function(a){a.keyCode==13&&a.preventDefault()};d.$2=function(){return!!this.props.primaryButton&&this.props.primaryButton.__typename==="PageCTAAction"};d.$12=function(){var a=this,c=b("React").jsx("div",{className:"_308b",children:i._("Make it easy for people to see what's important and take action on your Page. You can edit or remove this new description anytime, and it won't affect other descriptions on your Page.")});return b("React").jsx(b("XUIAmbientNUX.react"),{behaviors:{LayerFadeOnHide:b("LayerFadeOnHide")},contextRef:function(){return a.refs.coverEditButton},onCloseButtonClick:this.$13,position:"above",alignment:"right",shown:this.state.shouldShowNUX,children:c})};d.$1=function(){return this.props.isEditable?!b("SimpleNUXMessage").hasUserSeenMessage(b("SimpleNUXMessageTypes").PAGES_COVER_DESCRIPTION_CREATION_NUX):!1};return c}(b("React").Component);e.exports=a}),null);
  __d("PagesCoverPhotoLink.react",["cx","Link.react","React","XPhotoPermalinkController"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){return a.coverPhotoData.uri===null||a.isLoading||a.isPreviewMode?b("React").Children.only(a.children):b("React").jsx(b("Link.react"),{className:"_5q-4",href:b("XPhotoPermalinkController").getURIBuilder().setInt("photo_id",a.coverPhotoData.id).setString("vanity",a.pageID).getURI(),rel:"theater",children:a.children})};e.exports=a}),null);
  __d("PagesCoverPhoto.react",["cx","ActorURI","AsyncRequest","PagesCoverDimension","PagesCoverDispatcher","PagesCoverOverlay.react","PagesCoverPhotoLink.react","ProfileHeaderCoverPhoto.react","React","XPagesCoverPhotoSaveAsyncController","XPagesCoverReloadController","gkx","videoPageContextualColorFetchUpdatedThemeColor"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("PagesCoverDimension").COVER_HEIGHT_IN_SETTINGS,i=b("PagesCoverDimension").COVER_WIDTH_IN_SETTINGS;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$2=function(a){d.$1=a},d.$5=function(){b("PagesCoverDispatcher").dispatch({type:"photo_cancel"}),new(b("AsyncRequest"))().setURI(b("XPagesCoverReloadController").getURIBuilder().setFBID("page_id",d.props.pageID).getURI()).send()},d.$6=function(){if(!d.$1)return;var a=d.$1.getDimensions().getRect().center;b("PagesCoverDispatcher").dispatch({data:{coverPhotoData:babelHelpers["extends"]({},d.props.coverPhotoData,{focus:{height:a.y,width:a.x}})},type:"photo_saving"});new(b("AsyncRequest"))().setURI(b("ActorURI").create(b("XPagesCoverPhotoSaveAsyncController").getURIBuilder().setFloat("focus_x",a.x).setFloat("focus_y",a.y).setFBID("page_id",d.props.pageID).setFBID("photo_id",d.props.coverPhotoData.id).getURI(),d.props.pageID)).setHandler(function(){b("gkx")("678704")&&b("videoPageContextualColorFetchUpdatedThemeColor")(d.props.pageID)}).send()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.$3=function(){return this.props.coverPhotoData.uri!==null};d.$4=function(){return b("React").jsx("div",{className:"_5_yy _44oa"})};d.render=function(){return!this.$3()&&!this.props.isEditable?null:b("React").jsxs("div",{className:"_2g7o",children:[b("React").jsx(b("PagesCoverPhotoLink.react"),babelHelpers["extends"]({},this.props,{children:b("React").jsx("div",{children:b("React").jsx(b("ProfileHeaderCoverPhoto.react"),{coverPhotoData:this.props.coverPhotoData,emptyCover:this.$4(),height:this.props.isInSettingsPage?h:this.props.renderedHeight,isLoading:this.props.isLoading,previewCancelHandler:this.$5,previewMode:this.props.isPreviewMode,previewSaveHandler:this.$6,ref:this.$2,width:this.props.isInSettingsPage?i:this.props.renderedWidth})})})),this.props.isOverlayEnabled?b("React").jsx(b("PagesCoverOverlay.react"),{description:this.props.pageDescription,isEditable:this.props.isEditable,isLoading:this.props.isLoading,isPreviewMode:this.props.isPreviewMode,pageID:this.props.pageID,primaryButton:this.props.pagePrimaryButton}):null]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverSlideshowActionCreator",["fbt","PagesCoverAction","PagesCoverDispatcher","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","React","SimpleXUIDialog","XUIDialogButton.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=-1,i={enterEditMode:function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_edit"}),b("PagesLogger").log(a,b("PagesLoggerEventEnum").CLICK,b("PagesLoggerEventTargetEnum").PAGE_COVER_SLIDESHOW,null,[],{event_name:"click_edit"})},changeCurrentIndex:function(a,c){if(h===c)return;b("PagesCoverDispatcher").dispatch({type:"slideshow_change_carousel_index",data:{currentIndex:c}});b("PagesLogger").log(a,b("PagesLoggerEventEnum").SCROLL,b("PagesLoggerEventTargetEnum").PAGE_COVER_SLIDESHOW);h=c},reorderSlideshowItems:function(a,c,d){a!==c&&b("PagesLogger").log(d,b("PagesLoggerEventEnum").DRAG,b("PagesLoggerEventTargetEnum").PAGE_COVER_SLIDESHOW,null,[],{event_name:"reorder_slideshow_items"}),b("PagesCoverDispatcher").dispatch({type:"slideshow_change_order",data:{fromIndex:a,toIndex:c}})},onPhotoUploading:function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_photo_uploading",data:{uploadingIndex:a}})},onVideoRepositioned:function(a,c,d){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_repositioned",data:{itemRepositionedIndex:a,offsetType:c,offsetValue:d}})},onItemRepositioned:function(a,c,d){b("PagesCoverDispatcher").dispatch({type:"slideshow_item_repositioned",data:{itemRepositionedIndex:d}})},onPhotoRemoved:function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_photo_removed",data:{removedIndex:a}})},confirmCancel:function(a){if(!a)return;b("SimpleXUIDialog").showEx(g._("If you go back, your changes won't be saved."),g._("Leave Slideshow?"),b("React").jsxs("div",{children:[b("React").jsx(b("XUIDialogButton.react"),{action:"cancel",label:g._("Leave Slideshow"),onClick:i.onEditingCancelled,use:"default"}),b("React").jsx(b("XUIDialogButton.react"),{action:"cancel",label:g._("Cancel"),use:"confirm"})]}))},onEditingCancelled:function(){b("PagesCoverDispatcher").dispatch({type:"slideshow_editing_cancelled"})},onSlideshowSaving:function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_saving"}),b("PagesLogger").log(a,b("PagesLoggerEventEnum").CLICK,b("PagesLoggerEventTargetEnum").PAGE_COVER_SLIDESHOW,null,[],{event_name:"click_save"})},onVideoItemSettingConfirmed:function(a,c,d,e,f){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_setting_confirmed",data:{videoData:a,preferredThumbnailID:c,preferredThumbnailURL:d,previousKey:e,shouldFocusOnItem:f}})},onNUXTourElementLoaded:function(a,c,d,e){b("PagesCoverDispatcher").dispatch({type:"slideshow_nux_tour_element_loaded",data:{context:a,step:c,description:d,position:e}})},onNUXTourFinished:function(){b("PagesCoverDispatcher").dispatch({type:"slideshow_nux_tour_finished"})},toggleContentOptimizer:function(a,c){b("PagesCoverDispatcher").dispatch({type:"slideshow_toggle_content_switcher",data:c}),b("PagesLogger").log(a,b("PagesLoggerEventEnum").CLICK,b("PagesLoggerEventTargetEnum").PAGE_COVER_SLIDESHOW,null,[],{event_name:"click_content_optimizer"})},loadPrefilledItems:function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_prefilled_photo_loaded",data:{prefilledItems:a}})},loadEditableItems:function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_editable_item_loaded",data:{editableItems:a}})}};e.exports=i}),null);
  __d("PagesCoverSlideshowButtonGroup.react",["cx","fbt","PagesCoverSlideshowActionCreator","React","SimpleXUIDialog","XUIButton.react"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){d.props.items.length===0?b("SimpleXUIDialog").show(h._("To save your slideshow, first add photos. To delete your cover photo, return to your Page and select Remove in the cover area."),h._("Slideshow Not Saved")):(d.props.onSave(),b("PagesCoverSlideshowActionCreator").onSlideshowSaving(d.props.pageID))},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){if(!this.props.isEditMode)return null;var a=!this.props.hasPendingChanges||!this.props.shouldAllowUploadingVideo;return b("React").jsxs("span",{className:"_34p_",children:[b("React").jsx(b("XUIButton.react"),{disabled:a,label:h._("Cancel"),onClick:b("PagesCoverSlideshowActionCreator").confirmCancel,use:"default"}),b("React").jsx(b("XUIButton.react"),{disabled:a,label:h._("Save"),onClick:this.$1,use:"confirm"})]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverSlideshowItemLoadingScreen.react",["cx","CenteredContainer.react","React","XUISpinner.react"],(function(a,b,c,d,e,f,g){"use strict";function a(a){return!a.shown?null:b("React").jsx(b("CenteredContainer.react"),{className:"_4g6t",fullHeight:!0,horizontal:!0,vertical:!0,children:b("React").jsx(b("XUISpinner.react"),{background:"light",size:"large"})})}e.exports=a}),null);
  __d("PagesCoverSlideshowPhotoCarouselItem.react",["cx","Link.react","PagesCoverSlideshowActionCreator","PagesCoverSlideshowItemLoadingScreen.react","ProfileHeaderCoverPhoto.react","React","XPhotoPermalinkController","XUICarouselItem.react","emptyFunction"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.componentDidMount=function(){this.props.shouldFocusOnItem===!0&&b("PagesCoverSlideshowActionCreator").changeCurrentIndex(this.props.pageID,this.props.index)};d.render=function(){__p&&__p();var a=this,c=this.props,d=c.carouselData,e=c.isEditMode,f=c.pageID;c=c.shouldShowLoadingIndicator;var g=b("React").jsx(b("ProfileHeaderCoverPhoto.react"),{coverPhotoData:d.coverPhotoData,height:this.props.isInSettingsPage?195:d.renderedHeight,hideDefaultButtons:!0,isLoading:d.isLoading,onMove:b("PagesCoverSlideshowActionCreator").onItemRepositioned,previewCancelHandler:b("emptyFunction"),previewMode:e,previewSaveHandler:b("emptyFunction"),ref:function(a){function b(b){return a.apply(this,arguments)}b.toString=function(){return a.toString()};return b}(function(b){return a.props.onCarouselPhotoItemRefLoaded(d.coverPhotoData.id,b)}),width:this.props.isInSettingsPage?514:d.renderedWidth});e||(g=b("React").jsx(b("Link.react"),{className:"_5q-4",href:b("XPhotoPermalinkController").getURIBuilder().setInt("photo_id",d.coverPhotoData.id).setString("vanity",f).setString("set_token","p."+d.coverPhotoData.id).getURI(),rel:"theater",children:g}));return b("React").jsxs(b("XUICarouselItem.react"),{className:(this.props.isInSettingsPage?"":"_626d")+(this.props.isInSettingsPage?" _7tj0":""),children:[g,b("React").jsx(b("PagesCoverSlideshowItemLoadingScreen.react"),{shown:!!c})]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("CoverVideoUtil",["Promise","AsyncRequest","VideoData","XPagesCoverVideoDataController","isHTML5VideoImplementationUnavailable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={fetchCoverVideoData:function(a,c){c===void 0&&(c=!1);return new(b("Promise"))(function(d,e){var f=b("XPagesCoverVideoDataController").getURIBuilder().setFBID("video_id",a).setBool("supports_html5_video",!b("isHTML5VideoImplementationUnavailable")(!0)).setBool("include_thumbnails",c).getURI();new(b("AsyncRequest"))(f).setReadOnly(!0).setAllowCrossPageTransition(!0).setHandler(function(a){a=a.payload;var c=a.offset_type,f=a.offset_value,g=a.playable_duration_in_sec,h=a.video_data,i=a.thumbnails,j=a.preferredThumbnailData,k=a.hasVisibleStatus;a=a.isStatusOK;c===0||c===1?d({offsetType:c,offsetValue:f,playableDurationInSec:g,videoData:new(b("VideoData"))(h),thumbnails:i,preferredThumbnailData:j,hasVisibleStatus:k,isStatusOK:a}):e(new Error("Cover video data are unavailable."))}).setErrorHandler(e).send()})}};e.exports=a}),null);
  __d("PagesCoverVideoConstant",["fbt","React"],(function(a,b,c,d,e,f,g){"use strict";c={PREVIEW_TIP_FOR_CREATION:(a=b("React")).jsxs("div",{children:[a.jsx("div",{children:g._("Your video was added but won't be public until you publish it.")}),a.jsx("div",{children:g._("You can drag the video currently displaying to reposition it.")})]}),PREVIEW_TIP_FOR_EDITING:a.jsxs("div",{children:[a.jsx("div",{children:g._("Your video won't be public until you publish it.")}),a.jsx("div",{children:g._("You can drag the video currently displaying to reposition it.")})]}),TRY_UPLOAD_AGAIN_TITLE:g._("Try Uploading Again"),TRY_UPLOAD_AGAIN_BODY:g._("The video couldn't be uploaded. Please try again."),CANCEL_DIALOG_TITLE:g._("Cancel Video Upload?"),CANCEL_DIALOG_BODY:g._("If you cancel, this video will be deleted and your Page will revert to the previous cover photo or video."),CANCEL_DIALOG_CANCEL_UPLOAD_BUTTON_LABEL:g._("Cancel Upload"),CANCEL_DIALOG_NOT_NOW_BUTTON_LABEL:g._("Not Now"),EDUCATIONAL_ERROR_DIALOG_TITLE:g._("Video Not Uploaded")};e.exports=c}),null);
  __d("PagesCoverVideoActionCreator",["ix","cx","fbt","AsyncRequest","CanvasVideoThumbnail","CoverVideoUtil","ErrorDialog","Image.react","PagesCoverDispatcher","PagesCoverVideoConstant","React","ReactDOM","SimpleXUIDialog","XPagesCoverReloadController","XPagesCoverVideoPublishController","XPagesCoverVideoRollbackAndDeleteController","XUIDialogButton.react","fbglyph","gkx","promiseDone","videoPageContextualColorFetchUpdatedThemeColor"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=Object.freeze({INVALID_DURATION:"invalid_duration",INVALID_DIMENSION:"invalid_dimension"}),k={validateCoverVideoMetadata:function(a,c,d,e,f){__p&&__p();if(!c){d();k.showGeneralErrorDialog();return!1}c=b("ReactDOM").findDOMNode(c);if(!c||!(c instanceof HTMLVideoElement)){d();k.showGeneralErrorDialog();return!1}var g=c.videoWidth,h=c.videoHeight;if(g===0&&h===0)return!0;g=k.validateCoverVideoWithErrorDialog(a,c.duration,c.videoWidth,c.videoHeight,e,f);g||d();return g},onVideoRepositioned:function(a,c){b("PagesCoverDispatcher").dispatch({type:"video_repositioned",data:{offsetType:a,offsetValue:c}})},showCoverVideoUploadUI:function(a){b("PagesCoverDispatcher").dispatch({type:"video_start_upload",data:{thumbnails:a}})},uploadStarted:function(){b("PagesCoverDispatcher").dispatch({type:"video_uploading",data:{progress:0}})},uploadProgressed:function(a,c){b("PagesCoverDispatcher").dispatch({type:"video_uploading",data:{progress:Math.round(a)}})},encodeStarted:function(){b("PagesCoverDispatcher").dispatch({type:"video_encoding",data:{progress:0}})},encodeProgressed:function(a){b("PagesCoverDispatcher").dispatch({type:"video_encoding",data:{progress:Math.round(a)}})},encodeFinished:function(a,c,d,e){__p&&__p();b("promiseDone")(b("CoverVideoUtil").fetchCoverVideoData(c).then(function(f){__p&&__p();var g=f.playableDurationInSec;f=f.videoData;if(!g||!f){k.rollbackAndDeleteVideoWithGeneralErrorDialog(a,c);return}var h=f.getOriginalWidth();f=f.getOriginalHeight();g=k.validateCoverVideoWithErrorDialog(a,g,h,f,d,e);if(!g){k.rollbackAndDeleteVideo(a,c);return}b("PagesCoverDispatcher").dispatch({type:"video_previewing",data:{videoID:c,pageID:a,isFromRepositon:!1,isNewUpload:!0}})}))},validateCoverVideoWithErrorDialog:function(a,b,c,d,e,f){__p&&__p();var g=new Set(),h=1;(c<e-h||d<f-h)&&g.add(j.INVALID_DIMENSION);c=20;d=120;(b<c-h||b>d+h)&&g.add(j.INVALID_DURATION);if(g.size>0){k.showValidationErrorDialog(a,g,c,d,e,f);return!1}return!0},chooseThumbnail:function(a,c,d,e,f,g){b("PagesCoverDispatcher").dispatch({type:"video_choosing_thumbnail",data:{futureVideoID:a,pageID:c,offsetType:d,offsetValue:e,containerHeight:f,containerWidth:g}})},editCoverVideo:function(a,c){b("PagesCoverDispatcher").dispatch({type:"video_previewing",data:{videoID:c,pageID:a,isFromReposition:!0}})},showGeneralErrorDialog:function(){b("SimpleXUIDialog").show(b("React").jsx("div",{children:i._("The video couldn't be uploaded. Please try again.")}),b("PagesCoverVideoConstant").EDUCATIONAL_ERROR_DIALOG_TITLE)},showValidationErrorDialog:function(a,c,d,e,f,h){a=i._("Please edit the video and try again.");var k=c.has(j.INVALID_DURATION)?b("React").jsx(b("Image.react"),{src:g("117758")}):b("React").jsx(b("Image.react"),{src:g("119371")});d=i._("Cover videos should to be {minimal duration of cover video required} - {duration of current video} seconds.",[i._param("minimal duration of cover video required",d),i._param("duration of current video",e)]);e=c.has(j.INVALID_DIMENSION)?b("React").jsx(b("Image.react"),{src:g("117758")}):b("React").jsx(b("Image.react"),{src:g("119371")});f=i._("Cover videos should be at least {minimal requirement of width} x {minimal requirement of height} pixels. The recommended size is 820 x 462 pixels.",[i._param("minimal requirement of width",f),i._param("minimal requirement of height",h)]);h=b("React").jsxs("div",{children:[b("React").jsx("div",{children:a}),b("React").jsxs("div",{className:"_31ms",children:[b("React").jsx("div",{className:"_wsz",children:k}),b("React").jsx("div",{className:"_wsz"+(c.has(j.INVALID_DURATION)?" _wt3":""),children:d})]}),b("React").jsxs("div",{className:"_31ms",children:[b("React").jsx("div",{className:"_wsz",children:e}),b("React").jsx("div",{className:"_wsz"+(c.has(j.INVALID_DIMENSION)?" _wt3":""),children:f})]})]});b("SimpleXUIDialog").show(h,b("PagesCoverVideoConstant").EDUCATIONAL_ERROR_DIALOG_TITLE,b("PagesCoverDispatcher").dispatch({type:"video_invalid_upload"}))},confirmPublishingVideo:function(a,c,d,e,f,g){b("PagesCoverDispatcher").dispatch({type:"video_publishing"});var h=b("XPagesCoverVideoPublishController").getURIBuilder().getURI();g={page_id:a,video_id:c,preferred_thumbnail_id:g,offset_type:d,offset_value:e,should_cover_video_loop:f};new(b("AsyncRequest"))().setURI(h).setMethod("POST").setData(g).setHandler(function(){b("gkx")("678704")&&b("videoPageContextualColorFetchUpdatedThemeColor")(a)}).setErrorHandler(function(){k.rollbackAndDeleteVideoWithGeneralErrorDialog(a,c)}).send()},cancelNewUploadingWithConfirmationDialog:function(a,c){var d;b("SimpleXUIDialog").showEx((d=b("PagesCoverVideoConstant")).CANCEL_DIALOG_BODY,d.CANCEL_DIALOG_TITLE,b("React").jsxs("div",{children:[b("React").jsx(b("XUIDialogButton.react"),{action:"cancel",label:d.CANCEL_DIALOG_CANCEL_UPLOAD_BUTTON_LABEL,onClick:function(){return k.rollbackAndDeleteVideo(a,c)}}),b("React").jsx(b("XUIDialogButton.react"),{action:"cancel",label:d.CANCEL_DIALOG_NOT_NOW_BUTTON_LABEL,use:"confirm"})]}))},rollbackAndDeleteVideoWithGeneralErrorDialog:function(a,c){b("SimpleXUIDialog").show(b("PagesCoverVideoConstant").TRY_UPLOAD_AGAIN_BODY,b("PagesCoverVideoConstant").TRY_UPLOAD_AGAIN_TITLE,function(){k.rollbackAndDeleteVideo(a,c)})},reloadCoverWithErrorDialog:function(a,c){var d=c.error_description;c=c.error_summary;c=c?c:b("PagesCoverVideoConstant").TRY_UPLOAD_AGAIN_TITLE;d=d?d:b("PagesCoverVideoConstant").TRY_UPLOAD_AGAIN_BODY;b("ErrorDialog").show(c,d,function(){k.reloadCover(a)})},reloadCover:function(a){b("PagesCoverDispatcher").dispatch({type:"video_cancelling"});a=b("XPagesCoverReloadController").getURIBuilder().setFBID("page_id",a).getURI();new(b("AsyncRequest"))(a).send()},rollbackAndDeleteVideo:function(a,c){b("PagesCoverDispatcher").dispatch({type:"video_cancelling"});a=b("XPagesCoverVideoRollbackAndDeleteController").getURIBuilder().setFBID("page_id",a).setFBID("video_id",c).getURI();new(b("AsyncRequest"))(a).send()}};e.exports=k}),null);
  __d("PagesCoverVideoLoadingSpinner.react",["cx","CenteredContainer.react","React","XUISpinner.react","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){return b("React").jsx(b("CenteredContainer.react"),{className:b("joinClasses")("_6h2m",a.className),horizontal:!0,vertical:!0,children:b("React").jsx(b("XUISpinner.react"),{background:"light",size:"large"})})};e.exports=a}),null);
  __d("PagesCoverVideoPreviewActionBar.react",["cx","React","XUIButton.react","cxMargin"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){return b("React").jsxs("div",{className:"_2roy",children:[a.leftElement?b("React").jsx("div",{className:"_1iaz",children:a.leftElement}):null,b("React").jsx("div",{className:"_1ia-",children:b("React").jsxs("span",{className:"_1ia_",children:[b("React").jsx(b("XUIButton.react"),{className:"_3-90",label:a.cancelButtonLabel,onClick:a.onCancelClick}),b("React").jsx(b("XUIButton.react"),{label:a.confirmButtonLabel,onClick:a.onConfirmClick,use:"confirm"})]})})]})};e.exports=a}),null);
  __d("PagesCoverVideoRepositionIndicator.react",["ix","cx","fbt","Image.react","React","fbglyph"],(function(a,b,c,d,e,f,g,h,i){"use strict";a=function(a){return!a.shown?null:b("React").jsx("div",{className:"_1ge3",children:b("React").jsxs("div",{className:"_1geb",children:[b("React").jsx(b("Image.react"),{className:"_4l6j",src:g("114322")}),b("React").jsx("span",{className:"_4l6j",children:i._("Drag to Reposition")})]})})};e.exports=a}),null);
  __d("PagesCoverVideoPreview.react",["ix","cx","fbt","invariant","CoverVideoUtil","Image.react","PagesCoverDimension","PagesCoverSlideshowActionCreator","PagesCoverVideoActionCreator","PagesCoverVideoConstant","PagesCoverVideoLoadingSpinner.react","PagesCoverVideoPreviewActionBar.react","PagesCoverVideoRepositionIndicator.react","React","fbglyph","promiseDone"],(function(a,b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=(a=b("PagesCoverDimension")).COVER_HEIGHT_FOR_MIGRATED_SHOW_PAGE,l=a.COVER_HEIGHT_IN_SETTINGS,m=a.COVER_HEIGHT_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE,n=a.COVER_WIDTH_FOR_MIGRATED_SHOW_PAGE,o=a.COVER_WIDTH_IN_SETTINGS,p=a.COVER_WIDTH_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE,q=-1;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.state={minOffsetValue:0,videoData:null,videoNewSize:0};d.$10=function(a){d.props.offsetType===1?d.$4=a.screenX:d.props.offsetType===0?d.$4=a.screenY:j(0,3395),d.$2=!0};d.$11=function(a){__p&&__p();if(!d.$2)return;d.$4!==q||j(0,3396);var c=0;d.props.offsetType===1?c=a.screenX-d.$4:d.props.offsetType===0?c=a.screenY-d.$4:j(0,3395);a=d.$1+c;if(a>0||a<d.state.minOffsetValue)return;d.$5=!0;d.props.index===null||d.props.index===void 0?b("PagesCoverVideoActionCreator").onVideoRepositioned(d.props.offsetType,a):b("PagesCoverSlideshowActionCreator").onVideoRepositioned(d.props.index,d.props.offsetType,a)};d.$12=function(a){d.$2=!1,d.$4=q,d.$1=d.props.offsetValue};d.$13=function(a){d.$2=!1,d.$4=-1,d.$1=d.props.offsetValue};d.$14=function(){var a=d.props,c=a.videoID,e=a.pageID;a=a.isFromReposition;a&&e?b("PagesCoverVideoActionCreator").reloadCover(e):c&&e&&b("PagesCoverVideoActionCreator").cancelNewUploadingWithConfirmationDialog(e,c)};d.$15=function(){var a=d.props,c=a.videoID;a=a.pageID;if(c&&a){var e=d.props,f=e.containerWidth;e=e.containerHeight;f&&e||j(0,3397);b("PagesCoverVideoActionCreator").chooseThumbnail(c,a,d.props.offsetType,d.props.offsetValue,e,f)}};d.$17=function(a){if(!a)return;d.$6=a};d.$1=0;d.$2=!1;d.$4=q;d.$5=!1;return d}var d=c.prototype;d.componentDidMount=function(){__p&&__p();var a=this;this.$3=!0;b("promiseDone")(b("CoverVideoUtil").fetchCoverVideoData(this.props.videoID).then(function(c){__p&&__p();if(!a.$3)return;var d=c.offsetValue;c=c.videoData;c||j(0,3398);var e=a.$7(c),f=e.minOffsetValue,g=e.offsetType;e=e.videoNewSize;a.setState({minOffsetValue:f,videoData:c,videoNewSize:e});f=a.props.index;f===null||f===void 0?b("PagesCoverVideoActionCreator").onVideoRepositioned(g,d||0):b("PagesCoverSlideshowActionCreator").onVideoRepositioned(f,g,d||0)}))};d.componentDidUpdate=function(){var a=this.props,b=a.isForSlideshow;a=a.shouldFocusOnItem;if(!b)return;a?this.$8():this.$9()};d.componentWillUnmount=function(){this.$3=!1};d.$8=function(){var a=this.$6;if(!a)return;a.play()};d.$9=function(){var a=this.$6;if(!a)return;a.pause()};d.getOffsetData=function(){return{offsetType:this.props.offsetType,offsetValue:this.props.offsetValue}};d.$7=function(a){var b=this.props,c=b.containerWidth;b=b.containerHeight;this.props.isMigratedShowPage&&(b=k,c=n);this.props.isInSettingsPage&&(c=this.props.isMigratedShowPage?p:o,b=this.props.isMigratedShowPage?m:l);c&&b||j(0,3397);var d=c/b,e=a.getAspectRatio(),f=null,g=null;e>d?(f=1,g=b,e=c-Math.floor(a.getOriginalWidth()*(b/a.getOriginalHeight()))):(f=0,g=c,e=b-Math.floor(a.getOriginalHeight()*(c/a.getOriginalWidth())));return{minOffsetValue:e,offsetType:f,videoNewSize:g}};d.$16=function(){if(this.props.status!=="previewing"||this.props.isForSlideshow)return null;var a=i._("Cancel"),c=i._("Next"),d=this.props.isParentLocationPage?i._("Your video will appear as the cover on this Page and on any other locations associated with this Page."):null;d=this.props.isFromReposition?b("React").jsxs("div",{children:[b("React").jsx("span",{className:"_2roz",children:b("React").jsx(b("Image.react"),{src:g("115129")})}),b("React").jsxs("span",{className:"_2ro-"+(this.props.isInSettingsPage?" _7tjc":""),children:[b("PagesCoverVideoConstant").PREVIEW_TIP_FOR_EDITING,d]})]}):b("React").jsxs("div",{children:[b("React").jsx("span",{className:"_2roz",children:b("React").jsx(b("Image.react"),{src:g("115129")})}),b("React").jsxs("span",{className:"_2ro-"+(this.props.isInSettingsPage?" _7tjc":""),children:[b("PagesCoverVideoConstant").PREVIEW_TIP_FOR_CREATION,d]})]});return b("React").jsx(b("PagesCoverVideoPreviewActionBar.react"),{cancelButtonLabel:a,confirmButtonLabel:c,leftElement:d,onCancelClick:this.$14,onConfirmClick:this.$15})};d.render=function(){__p&&__p();var a;if(!this.state.videoData)return b("React").jsx(b("PagesCoverVideoLoadingSpinner.react"),{className:(this.props.isInSettingsPage?"":"_yd2")+(this.props.isInSettingsPage?" _7tj9":"")});var c=this.props,d=c.containerWidth;c=c.containerHeight;this.props.isMigratedShowPage&&(c=k,d=n);this.props.isInSettingsPage&&(d=this.props.isMigratedShowPage?p:o,c=this.props.isMigratedShowPage?m:l);d&&c||j(0,3397);this.props.status==="previewing"||this.props.status==="publishing"||j(0,3399);var e=this.state.videoData.getRawData();a=(a=e.hd_src)!=null?a:e.sd_src;if(!a)return null;e=this.props.offsetType===1?this.state.videoNewSize:null;var f=this.props.offsetType===0?this.state.videoNewSize:null,g=this.props.offsetType===0?this.props.offsetValue:0,h=this.props.offsetType===1?this.props.offsetValue:0;return b("React").jsxs("div",{style:{cursor:"move",height:c,overflow:"hidden",position:"relative",width:d},children:[b("React").jsx("video",{autoPlay:!0,height:e,loop:!0,onMouseDown:this.$10,onMouseLeave:this.$13,onMouseMove:this.$11,onMouseUp:this.$12,ref:this.$17,src:a,style:{position:"absolute",top:g,left:h},width:f}),b("React").jsx(b("PagesCoverVideoRepositionIndicator.react"),{shown:!this.$5}),this.$16()]})};return c}(b("React").PureComponent);e.exports=c}),null);
  __d("PagesCoverVideoProgressOverlay.react",["cx","fbt","invariant","Image.react","ProgressBar.react","React"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();a=function(a){__p&&__p();if(a.status!=="uploading"&&a.status!=="encoding")return null;a.progress===0||a.progress||i(0,4230);var c=null,d=null;if(a.thumbnails&&a.thumbnails.length>0){var e=a.thumbnails[0];d=b("React").jsx("div",{className:(a.isInSettingsPage?"":"_3ywa")+(a.isInSettingsPage?" _7tj1":""),children:b("React").jsx(b("Image.react"),{className:"_7wgy",src:e.getURL()})})}a.status==="uploading"?c=h._("VIDEO UPLOADING {percentage (0-100) of uploading progress}\u0025",[h._param("percentage (0-100) of uploading progress",a.progress)]):a.status==="encoding"&&(c=h._("VIDEO ENCODING {percentage (0-100) of encoding progress}\u0025",[h._param("percentage (0-100) of encoding progress",a.progress)]));return b("React").jsxs("div",{className:"_2grf",children:[d,b("React").jsxs("div",{className:"_2grg",children:[b("React").jsx(b("ProgressBar.react"),{isRounded:!0,size:"small",value:a.progress}),b("React").jsx("div",{className:"_2grh",children:c})]})]})};e.exports=a}),null);
  __d("CoverSlideshowUtil",[],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={getMediaId:function(a){if((a==null?void 0:a.itemType)==="video"){var b;return a==null?void 0:(b=a.carouselMediaData.videoData)==null?void 0:b.videoID}else if((a==null?void 0:a.itemType)==="photo"){return a==null?void 0:(b=a.carouselMediaData.photoData)==null?void 0:b.coverPhotoData.id}else return null},randomFixedInteger:function(a){a=Math.floor(Math.pow(10,a-1)+Math.random()*(Math.pow(10,a)-Math.pow(10,a-1)-1));return String(a)},getThumbnailIndexByID:function(a,b){if(!a)return 0;for(var c=0;c<a.length;c++)if(a[c].id===String(b))return c;return 0},getMediaIds:function(a){var b=new Set();a.map(function(a){a=g.getMediaId(a);a!==null&&a!==void 0&&b.add(a)});return b}};e.exports=g}),null);
  __d("PagesCoverSlideshowThumbnailPickerCarousel.react",["ix","cx","fbt","CoverSlideshowUtil","CssBackgroundImage.react","Image.react","React","XUICarousel.react","XUICarouselArrow.react","XUICarouselItem.react","asset"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=328,k=125;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(b){var c;c=a.call(this,b)||this;c.$2=0;c.$1=0;b.offsetType===0?c.$1=Math.floor(c.props.offsetValue*j/b.containerWidth):c.$2=Math.floor(b.offsetValue*k/b.containerHeight);return c}var d=c.prototype;d.$3=function(){var a=this;return this.props.thumbnails.length===0?null:this.props.thumbnails.map(function(c,d){d=a.props.currentThumbnailIndex===d;var e=a.$2+"px "+a.$1+"px";return b("React").jsx(b("XUICarouselItem.react"),{children:b("React").jsx("div",{className:"_6ml8"+(d?" _6ml9":""),children:b("React").jsx(b("CssBackgroundImage.react"),{backgroundPosition:e,className:"_6mla",imageURI:c.url})})},c.id)})};d.render=function(){__p&&__p();var a=this,c,d=this.props,e=d.onLeftArrowClicked,f=d.onRightArrowClicked,h=d.thumbnails;d=d.initThumbnailID;e=(c=b("React")).jsx(b("XUICarouselArrow.react"),{onClick:e,children:c.jsx(b("Image.react"),{alt:i._("Prev"),src:g("499011")})});f=c.jsx(b("XUICarouselArrow.react"),{onClick:f,children:c.jsx(b("Image.react"),{alt:i._("Next"),src:g("495717")})});c=b("CoverSlideshowUtil").getThumbnailIndexByID(h,d);h=this.$3();return h!=null?b("React").jsx(b("XUICarousel.react"),{animator:this.props.animator,arrows:[e,f],initialAutoplay:!1,initialIndex:c,onItemClick:this.props.onItemClick,ref:function(a){function b(b){return a.apply(this,arguments)}b.toString=function(){return a.toString()};return b}(function(b){return a.props.onCarouselRefLoad(b)}),resizeViewport:"disabled",viewportHeight:141,viewportWidth:820,wrapAround:!1,children:h}):null};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverThumbnailPickerActionBar.react",["cx","fbt","FBToggleSwitch.react","PagesCoverVideoPreviewActionBar.react","React"],(function(a,b,c,d,e,f,g,h){"use strict";a=function(a){if(a.isForSlideshow)return null;var c=h._("Back"),d=h._("Publish"),e=b("React").jsxs("div",{className:"_d-g",children:[b("React").jsx("span",{className:"_d-h",children:b("React").jsx(b("FBToggleSwitch.react"),{checked:a.shouldCoverVideoLoop,onToggle:a._onToggle})}),b("React").jsx("span",{className:"_d-i",children:h._("Automatically replay video in a loop")})]});return b("React").jsx(b("PagesCoverVideoPreviewActionBar.react"),{cancelButtonLabel:c,confirmButtonLabel:d,leftElement:e,onCancelClick:a._onCancelClick,onConfirmClick:a._onPublishClick})};e.exports=a}),null);
  __d("PagesCoverThumbnailPickerCarousel.react",["ix","fbt","Image.react","React","XUICarousel.react","XUICarouselArrow.react","XUICarouselItem.react","asset","cxMargin","emptyFunction"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){if(a.thumbnails.length===0)return null;var c=null,d=null,e=0,f=0;a.offsetType===0?(d=a.containerWidth,e=a.offsetValue):(c=a.containerHeight,f=a.offsetValue);var i=a.thumbnails.map(function(g){return b("React").jsx(b("XUICarouselItem.react"),{children:b("React").jsx("div",{style:{height:a.containerHeight,position:"relative",textAlign:"center",width:a.containerWidth},children:b("React").jsx(b("Image.react"),{height:c,src:g.url,style:{left:f,position:"absolute",top:e},width:d})})},g.id)}),j=b("React").jsx(b("XUICarouselArrow.react"),{className:"_3-9a",onClick:a._onLeftArrowClicked,children:b("React").jsx(b("Image.react"),{alt:h._("Prev"),src:g("480582")})}),k=b("React").jsx(b("XUICarouselArrow.react"),{className:"_3-90",onClick:a._onRightArrowClicked,children:b("React").jsx(b("Image.react"),{alt:h._("Next"),src:g("480590")})});return b("React").jsx(b("XUICarousel.react"),{animator:a.animator,arrows:[j,k],initialAutoplay:!1,initialIndex:0,onItemClick:b("emptyFunction"),ref:a.onCarouselRefLoad,resizeViewport:"fixed",style:{height:a.containerHeight,width:a.containerWidth,position:"absolute"},wrapAround:!0,children:i})};e.exports=a}),null);
  __d("PagesCoverThumbnailPickerThumbnailIndicator.react",["cx","fbt","React"],(function(a,b,c,d,e,f,g,h){"use strict";a=function(a){return a.thumbnails.length===0||a.isForSlideshow?null:b("React").jsx("div",{className:"_4hmf",children:h._({"*":"{the index of the current thumbnail} \/ {the total number of thumbnails} Thumbnails","_1":"{the index of the current thumbnail} \/ {the total number of thumbnails} Thumbnail"},[h._param("the index of the current thumbnail",a.currentThumbnailIndex+1),h._param("the total number of thumbnails",a.thumbnails.length),h._plural(a.thumbnails.length)])})};e.exports=a}),null);
  __d("PagesCoverVideoThumbnailPicker.react",["cx","fbt","CoverSlideshowUtil","CoverVideoUtil","PagesCoverDimension","PagesCoverSlideshowThumbnailPickerCarousel.react","PagesCoverThumbnailPickerActionBar.react","PagesCoverThumbnailPickerCarousel.react","PagesCoverThumbnailPickerThumbnailIndicator.react","PagesCoverVideoActionCreator","PagesCoverVideoLoadingSpinner.react","React","SimpleXUIDialog","XUICarouselAnimator","promiseDone"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=(a=b("PagesCoverDimension")).COVER_HEIGHT_FOR_MIGRATED_SHOW_PAGE,j=a.COVER_HEIGHT_IN_SETTINGS,k=a.COVER_HEIGHT_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE,l=a.COVER_WIDTH_FOR_MIGRATED_SHOW_PAGE,m=a.COVER_WIDTH_IN_SETTINGS,n=a.COVER_WIDTH_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE,o=2;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={thumbnails:[],currentThumbnailIndex:0,firstItemIndex:0,animator:new(b("XUICarouselAnimator"))({type:"horizontal"}),shouldCoverVideoLoop:d.props.shouldCoverVideoLoop,isStatusOK:!1},d.$2=function(){var a=d.state.thumbnails.length;if(a===0)return;d.setState(function(b,c){b=(b.firstItemIndex-1+a)%a;return c.isForSlideshow?{firstItemIndex:b}:{currentThumbnailIndex:b,firstItemIndex:b}});d.$1&&d.$1.prev()},d.$3=function(){var a=d.state.thumbnails.length;if(a===0)return;d.setState(function(b,c){b=(b.firstItemIndex+1+a)%a;return c.isForSlideshow?{firstItemIndex:b}:{currentThumbnailIndex:b,firstItemIndex:b}});d.$1&&d.$1.next()},d.$4=function(a){if(!d.$1)return;a-d.state.firstItemIndex>=o&&(d.$1.setIndex(a),d.setState({firstItemIndex:a}));d.setState({currentThumbnailIndex:a})},d.$5=function(){var a=d.props,c=a.videoID;a=a.pageID;b("PagesCoverVideoActionCreator").editCoverVideo(a,c)},d.$6=function(){if(d.state.isStatusOK){d.$7();return}b("SimpleXUIDialog").showConfirm(h._("This video is not published yet. If you choose it as your cover video, it will be published for people to watch."),h._("Publish Cover Video?"),d.$8,{confirmBtnTxt:h._("Publish")})},d.$8=function(a){a&&d.$7()},d.$9=function(){var a=d.state.shouldCoverVideoLoop;d.setState({shouldCoverVideoLoop:!a})},d.$10=function(a){if(!a)return;d.$1=a},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.UNSAFE_componentWillMount=function(){var a=this;b("promiseDone")(b("CoverVideoUtil").fetchCoverVideoData(this.props.videoID,!0).then(function(c){var d=c.thumbnails;c=c.isStatusOK;var e=b("CoverSlideshowUtil").getThumbnailIndexByID(d,a.props.initThumbnailID);a.setState({currentThumbnailIndex:e,firstItemIndex:e,thumbnails:d,isStatusOK:c})}))};d.$7=function(){var a=this.props,c=a.videoID,d=a.pageID,e=a.offsetType;a=a.offsetValue;var f=this.state,g=f.thumbnails,h=f.currentThumbnailIndex;f=f.shouldCoverVideoLoop;g=g[h].id;b("PagesCoverVideoActionCreator").confirmPublishingVideo(d,c,e,a,f,g)};d.getCurrentThumbnailData=function(){return this.state.thumbnails[this.state.currentThumbnailIndex]};d.$11=function(){var a=this.props.isMigratedShowPage?k:j,c=this.props.isMigratedShowPage?n:m,d=this.props.isMigratedShowPage?i:this.props.containerHeight,e=this.props.isMigratedShowPage?l:this.props.containerWidth;return this.props.isForSlideshow?b("React").jsx(b("PagesCoverSlideshowThumbnailPickerCarousel.react"),{animator:this.state.animator,containerHeight:this.props.isInSettingsPage?j:this.props.containerHeight,containerWidth:this.props.isInSettingsPage?m:this.props.containerWidth,currentThumbnailIndex:this.state.currentThumbnailIndex,initThumbnailID:this.props.initThumbnailID,offsetType:this.props.offsetType,offsetValue:this.props.offsetValue,onCarouselRefLoad:this.$10,onItemClick:this.$4,onLeftArrowClicked:this.$2,onRightArrowClicked:this.$3,thumbnails:this.state.thumbnails}):b("React").jsx(b("PagesCoverThumbnailPickerCarousel.react"),{_onLeftArrowClicked:this.$2,_onRightArrowClicked:this.$3,animator:this.state.animator,containerHeight:this.props.isInSettingsPage?a:d,containerWidth:this.props.isInSettingsPage?c:e,offsetType:this.props.offsetType,offsetValue:this.props.offsetValue,onCarouselRefLoad:this.$10,thumbnails:this.state.thumbnails})};d.render=function(){return this.state.thumbnails.length===0?b("React").jsx(b("PagesCoverVideoLoadingSpinner.react"),{className:(!this.props.isInSettingsPage&&!this.props.isMigratedShowPage?"_yd2":"")+(!this.props.isInSettingsPage&&this.props.isMigratedShowPage?" _7ww2":"")+(this.props.isInSettingsPage&&!this.props.isMigratedShowPage?" _7tj9":"")+(this.props.isInSettingsPage&&this.props.isMigratedShowPage?" _7ww3":"")}):b("React").jsxs("div",{className:(!this.props.isInSettingsPage&&!this.props.isMigratedShowPage?"_5_lp":"")+(!this.props.isInSettingsPage&&this.props.isMigratedShowPage?" _7ww4":"")+(this.props.isInSettingsPage&&!this.props.isMigratedShowPage?" _7tja":"")+(this.props.isInSettingsPage&&this.props.isMigratedShowPage?" _7ww5":""),children:[b("React").jsx(b("PagesCoverThumbnailPickerThumbnailIndicator.react"),{currentThumbnailIndex:this.state.currentThumbnailIndex,isForSlideshow:this.props.isForSlideshow,thumbnails:this.state.thumbnails}),this.$11(),b("React").jsx(b("PagesCoverThumbnailPickerActionBar.react"),{_onCancelClick:this.$5,_onPublishClick:this.$6,_onToggle:this.$9,isForSlideshow:this.props.isForSlideshow,shouldCoverVideoLoop:this.state.shouldCoverVideoLoop})]})};return c}(b("React").PureComponent);e.exports=c}),null);
  __d("PagesCoverVideoCreator.react",["cx","PagesCoverDimension","PagesCoverVideoPreview.react","PagesCoverVideoProgressOverlay.react","PagesCoverVideoThumbnailPicker.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=(a=b("PagesCoverDimension")).COVER_HEIGHT_FOR_MIGRATED_SHOW_PAGE,i=a.COVER_HEIGHT_IN_SETTINGS,j=a.COVER_HEIGHT_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE,k=a.COVER_WIDTH_FOR_MIGRATED_SHOW_PAGE,l=a.COVER_WIDTH_IN_SETTINGS,m=a.COVER_WIDTH_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){__p&&__p();var a=null;switch(this.props.status){case"uploading":case"encoding":a=b("React").jsx(b("PagesCoverVideoProgressOverlay.react"),babelHelpers["extends"]({},this.props));break;case"previewing":a=b("React").jsx(b("PagesCoverVideoPreview.react"),babelHelpers["extends"]({},this.props));break;case"choosing_thumbnail":a=b("React").jsx(b("PagesCoverVideoThumbnailPicker.react"),babelHelpers["extends"]({},this.props,{isForSlideshow:this.props.isForSlideshow}));break;default:return null}var c=this.props,d=c.containerWidth;c=c.containerHeight;this.props.isMigratedShowPage===!0&&(c=h,d=k);this.props.isInSettingsPage&&(d=this.props.isMigratedShowPage===!0?m:l,c=this.props.isMigratedShowPage===!0?j:i);return d!==null&&c!==null?b("React").jsx("div",{style:{height:c,position:"relative",width:d},children:a}):b("React").jsx("div",{className:(this.props.isInSettingsPage?"":"_5-qd")+(this.props.isInSettingsPage?" _7tj2":""),children:a})};return c}(b("React").PureComponent);e.exports=c}),null);
  __d("PagesCoverVideoPlayer.react",["Bootloader","CoverVideoUtil","OnVisible.react","PagesCoverDimension","PagesEventObserver","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","React","ReactDOM","SubscriptionsHandler","URI","VideoComponentEmbeddedControls.react","VideoComponentPlayButton.react","VideoComponentWithLoopingPlayback.react","VideoPlayer.react","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g,h=(a=b("PagesCoverDimension")).COVER_HEIGHT_FOR_MIGRATED_SHOW_PAGE,i=a.COVER_HEIGHT_IN_SETTINGS,j=a.COVER_HEIGHT_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE,k=a.COVER_WIDTH_FOR_MIGRATED_SHOW_PAGE,l=a.COVER_WIDTH_IN_SETTINGS,m=a.COVER_WIDTH_IN_SETTINGS_FOR_MIGRATED_SHOW_PAGE,n=-100;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.state={videoData:null};d.$7=function(){var a=d.props,b=a.isForSlideshow;a=a.shouldFocusOnItem;if(!b){d.$4();return}a&&d.$4()};d.$5=function(){var a=d.$3;if(!a)return;a.vpc.isState("playing")&&a.vpc.pause("page_visibility_initiated")};d.$8=function(){var a=d.props,c=a.videoLinkData,e=a.playerOrigin;if(!c)return;if(d.$3&&d.$3.vpc&&!d.$3.vpc.isState("playing"))return;var f=c.channelCaller;b("Bootloader").loadModules(["TahoeController"],function(a){a.openFromVideoLink(new(g||(g=b("URI")))(c.href),{channelID:c.channelID,caller:f,origin:e})},"PagesCoverVideoPlayer.react")};d.$9=function(a){var c=b("ReactDOM").findDOMNode(a);if(!(c&&c instanceof Element))return;d.$3=a;c=a==null?void 0:a.vpc;c&&c.setAllowCrossPageTransition(!0)};d.$2=new(b("SubscriptionsHandler"))();return d}var d=c.prototype;d.componentDidMount=function(){var a=this;this.$1=!0;this.props.videoID&&b("promiseDone")(b("CoverVideoUtil").fetchCoverVideoData(this.props.videoID).then(function(b){a.$1&&a.setState({videoData:b.videoData})}))};d.shouldComponentUpdate=function(a,b){b=b.videoData;return!!b&&b.getVideoID()===a.videoID};d.UNSAFE_componentWillReceiveProps=function(a){var c=this;b("promiseDone")(b("CoverVideoUtil").fetchCoverVideoData(this.props.videoID).then(function(a){c.$1&&c.setState({videoData:a.videoData})}));a=this.props;var d=a.isForSlideshow;a=a.shouldFocusOnItem;var e=this.$3;d&&e&&(a?this.$4():this.$5())};d.componentWillUnmount=function(){this.$1=!1,this.$2.release()};d.$6=function(){b("PagesEventObserver").notify("cover_video_impression",this.props.pageID,{video_id:this.props.videoID}),b("PagesLogger").log(this.props.pageID,b("PagesLoggerEventEnum").IMPRESSION,b("PagesLoggerEventTargetEnum").PAGES_COVER_VIDEO,"page_header",["Pages","Pages: Engagement","pages web + m-site","pages surface"],{video_id:this.props.videoID})};d.$4=function(){var a=this.$3;if(!a)return;!a.vpc.isState("playing")&&!a.vpc.isState("finished")&&a.vpc.play("page_visibility_initiated")};d.render=function(){__p&&__p();var a=this.props,c=a.offsetType;a=a.offsetValue;var d=this.state.videoData;if(c===null||a===null||!d)return null;var e=this.props,f=e.isForSlideshow,g=e.shouldHideSoundControl;e=e.shouldCoverVideoLoop;g=g?null:b("React").jsx(b("VideoComponentEmbeddedControls.react"),{hidePlaybackControl:!1,hidePlaybackScrubber:!0,hideRemainingTime:!0,showFullscreenButton:!1,showSettingsButton:!1});e=e?b("React").jsx(b("VideoComponentWithLoopingPlayback.react"),{infiniteLooping:!0}):null;f=f?null:b("React").jsx(b("VideoComponentPlayButton.react"),{alsoVisibleWhen:"finished"});this.$6();c=c===0?"vertical":"horizontal";var o=this.props.isMigratedShowPage?j:i,p=this.props.isMigratedShowPage?m:l,q=this.props.isMigratedShowPage?k:this.props.containerWidth,r=this.props.isMigratedShowPage?h:this.props.containerHeight;return b("React").jsx(b("OnVisible.react"),{buffer:n,onHidden:this.$5,onVisible:this.$7,children:b("React").jsxs(b("VideoPlayer.react"),{allowCrossPageTransition:!0,autoplay:!0,forceHD:!0,height:this.props.isInSettingsPage?o:r,offsetType:c,offsetValue:a,onVideoClick:this.$8,playerOrigin:this.props.playerOrigin,ref:this.$9,startMuted:!0,subOrigin:"pages_cover",videoData:d,width:this.props.isInSettingsPage?p:q,children:[g,e,f]})})};return c}(b("React").Component);e.exports=c}),null);
  __d("PagesCoverVideo.react",["PagesCoverVideoCreator.react","PagesCoverVideoPlayer.react","React"],(function(a,b,c,d,e,f){"use strict";function a(a){var c=a.isEditMode,d=a.videoData,e=a.shouldFocusOnItem,f=a.isMigratedShowPage;a=a.isInSettingsPage===!0;return c?b("React").jsx(b("PagesCoverVideoCreator.react"),babelHelpers["extends"]({},d,{isInSettingsPage:a,isMigratedShowPage:f,shouldFocusOnItem:e})):b("React").jsx(b("PagesCoverVideoPlayer.react"),babelHelpers["extends"]({},d,{isInSettingsPage:a,isMigratedShowPage:f,shouldFocusOnItem:e}))}e.exports=a}),null);
  __d("PagesCoverSlideshowVideoCarouselItem.react",["cx","PagesCoverSlideshowActionCreator","PagesCoverSlideshowItemLoadingScreen.react","PagesCoverVideo.react","React","XUICarouselItem.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.componentDidMount=function(){this.props.shouldFocusOnItem===!0&&b("PagesCoverSlideshowActionCreator").changeCurrentIndex(this.props.pageID,this.props.index)};d.render=function(){var a=this.props,c=a.pageID,d=a.isEditMode,e=a.shouldShowLoadingIndicator,f=a.index;a=a.shouldFocusOnItem;var g=this.props.videoData;g=babelHelpers["extends"]({},g,{index:f,isFromParentPage:!1,isParentLocationPage:!1,isViewerAdmin:!0,pageID:c,shouldShowChooseFromCoverVideoMenu:!1});f=b("React").jsx(b("PagesCoverVideo.react"),{isEditMode:d,shouldFocusOnItem:a,videoData:g});return b("React").jsxs(b("XUICarouselItem.react"),{className:"_626d",children:[f,b("React").jsx(b("PagesCoverSlideshowItemLoadingScreen.react"),{shown:!!e})]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverSlideshowCarousel.react",["ix","cx","invariant","AsyncRequest","Image.react","PagesCoverDimension","PagesCoverSlideshowActionCreator","PagesCoverSlideshowButtonGroup.react","PagesCoverSlideshowPhotoCarouselItem.react","PagesCoverSlideshowVideoCarouselItem.react","PagesPageCoverClickFalcoEvent","ProfileHeaderCoverPhoto.react","React","XPagesCoverSlideshowSaveAsyncController","XUICarousel.react","XUICarouselArrow.react","XUICarouselItem.react","XUICarouselLinks.react","asset","cxMargin","emptyFunction","gkx","videoPageContextualColorFetchUpdatedThemeColor"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=(a=b("PagesCoverDimension")).COVER_HEIGHT,k=a.COVER_HEIGHT_IN_SETTINGS,l=a.COVER_WIDTH,m=a.COVER_WIDTH_IN_SETTINGS,n={focus:{height:0,width:0},id:"0",original:{height:0,width:0},uri:null};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.state={showCarouselDotsIndicator:!1};d.$4=function(a){d.$1=a,d.$1&&(d.$2=d.$1.subscribe(["animation_start"],function(a,c){a==="animation_start"&&b("PagesCoverSlideshowActionCreator").changeCurrentIndex(d.props.pageID,c)}),d.setState({showCarouselDotsIndicator:d.props.items.length>1}))};d.$6=function(a,b){if(!b)return;d.$3.set(a,b)};d.$7=function(){__p&&__p();var a=[],c=[],e=[],f=[],g=[],h=[],j=[],k=[],l=[],m=Math.min(5,d.props.items.length);for(var n=0;n<m;n++){var o=d.props.items[n];c.push(o.itemType);if(o.itemType==="video"){var p=o.carouselMediaData.videoData;if(!p)continue;var q=p.videoID,r=p.shouldCoverVideoLoop,s=p.offsetType;p=p.offsetValue;k.push(q);h.push(s);j.push(p);r?g.push(1):g.push(0);q=o.thumbnailData.thumbnailID;q||i(0,5037);l.push(q)}else if(o.itemType==="photo"){p=(s=o.carouselMediaData.photoData)==null?void 0:s.coverPhotoData.id;if(!p)continue;r=d.$3.get(p);!r&&i(0,5038);q=r.getDimensions().getRect().center;a.push(p);e.push(q.x);f.push(q.y)}else i(0,5039)}o=b("XPagesCoverSlideshowSaveAsyncController").getURIBuilder().getURI();new(b("AsyncRequest"))().setMethod("POST").setURI(o).setData({page_id:d.props.pageID,media_type_vector:c,photo_id_vector:a,focus_x_vector:e,focus_y_vector:f,should_loop_vector:g,video_id_vector:k,offset_value_vector:j,offset_type_vector:h,thumbnail_id_vector:l,is_content_optimizer_on:d.props.isContentOptimizerOn}).setHandler(function(){b("gkx")("678704")&&b("videoPageContextualColorFetchUpdatedThemeColor")(d.props.pageID)}).send()};d.$3=new Map();return d}var d=c.prototype;d.UNSAFE_componentWillReceiveProps=function(a){this.$1&&a.currentIndex!==this.props.currentIndex&&this.$1.setIndex(a.currentIndex),this.setState({showCarouselDotsIndicator:a.items.length>1})};d.componentWillUnmount=function(){this.$1&&this.$2&&this.$1.unsubscribe(this.$2)};d.$5=function(){return!this.$1||!this.state.showCarouselDotsIndicator?null:b("React").jsx(b("XUICarouselLinks.react"),{carousel:this.$1,className:"_2yih"})};d.$8=function(a,c){var d=a.carouselMediaData.photoData;return!d?null:b("React").jsx(b("PagesCoverSlideshowPhotoCarouselItem.react"),{carouselData:d,index:c,isEditMode:this.props.isEditMode,isInSettingsPage:this.props.isInSettingsPage,onCarouselPhotoItemRefLoaded:this.$6,pageID:this.props.pageID,shouldFocusOnItem:a.shouldFocusOnItem,shouldShowLoadingIndicator:a.shouldShowLoadingIndicator},d.coverPhotoData.id)};d.$9=function(a,c){var d=a.carouselMediaData.videoData;return!d?null:b("React").jsx(b("PagesCoverSlideshowVideoCarouselItem.react"),{index:c,isEditMode:this.props.isEditMode,pageID:this.props.pageID,shouldFocusOnItem:a.shouldFocusOnItem||this.props.currentIndex===c,shouldShowLoadingIndicator:a.shouldShowLoadingIndicator,videoData:d},d.videoID)};d.render=function(){var a=this,c,d=(c=b("React")).jsx(b("XUICarouselArrow.react"),{className:"_3-9a",children:c.jsx(b("Image.react"),{src:g("480582")})});c=c.jsx(b("XUICarouselArrow.react"),{className:"_3-90",children:c.jsx(b("Image.react"),{src:g("480590")})});var e=this.props.items.slice(0,5).map(function(b,c){return b.itemType==="video"?a.$9(b,c):a.$8(b,c)}).filter(function(a){return!!a});e.length===0&&e.push(b("React").jsx(b("XUICarouselItem.react"),{className:"_626d",children:b("React").jsx(b("ProfileHeaderCoverPhoto.react"),{coverPhotoData:n,emptyCover:b("React").jsx("div",{className:"_5_yy _44oa"}),height:this.props.isInSettingsPage?k:j,hideDefaultButtons:!0,isLoading:!1,previewCancelHandler:b("emptyFunction"),previewMode:!1,previewSaveHandler:b("emptyFunction"),width:this.props.isInSettingsPage?m:l})},"empty_cover_photo_placeholder"));return b("React").jsxs("div",{children:[b("React").jsx(b("XUICarousel.react"),{arrows:this.state.showCarouselDotsIndicator?[d,c]:null,initialAutoplay:!1,initialIndex:this.props.currentIndex,onItemClick:b("PagesPageCoverClickFalcoEvent").log(function(){return{event_data:{cover_type:"cover_slideshow"},event_location:"page__header",page_id:a.props.pageID,referrer:null}}),ref:this.$4,resizeViewport:"fixed",viewportHeight:this.props.isInSettingsPage?k:j,viewportWidth:this.props.isInSettingsPage?m:l,wrapAround:!0,children:e}),this.$5(),b("React").jsx(b("PagesCoverSlideshowButtonGroup.react"),babelHelpers["extends"]({},this.props,{onSave:this.$7}))]})};return c}(b("React").PureComponent);e.exports=c}),null);
  __d("PagesCoverSlideshowVideoThumbnailPicker.react",["cx","CoverSlideshowUtil","PagesCoverSlideshowThumbnailPickerCarousel.react","React","XUICarouselAnimator"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=2;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={currentThumbnailIndex:b("CoverSlideshowUtil").getThumbnailIndexByID(d.props.thumbnails,d.props.initThumbnailID),firstItemIndex:b("CoverSlideshowUtil").getThumbnailIndexByID(d.props.thumbnails,d.props.initThumbnailID),animator:new(b("XUICarouselAnimator"))({type:"horizontal"})},d.$2=function(){var a=d.props.thumbnails.length;if(a===0)return;d.setState(function(b,c){c=(b.firstItemIndex-1+a)%a;return{firstItemIndex:c}});d.$1&&d.$1.prev()},d.$3=function(){var a=d.props.thumbnails.length;if(a===0)return;d.setState(function(b,c){c=(b.firstItemIndex+1+a)%a;return{firstItemIndex:c}});d.$1&&d.$1.next()},d.$4=function(a){if(!d.$1)return;a-d.state.firstItemIndex>=h&&(d.$1.setIndex(a),d.setState({firstItemIndex:a}));d.setState({currentThumbnailIndex:a})},d.$5=function(a){if(!a)return;d.$1=a},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.getCurrentThumbnailData=function(){return this.props.thumbnails[this.state.currentThumbnailIndex]};d.render=function(){return b("React").jsx("div",{className:"_6ml7",children:b("React").jsx(b("PagesCoverSlideshowThumbnailPickerCarousel.react"),{animator:this.state.animator,containerHeight:this.props.containerHeight,containerWidth:this.props.containerWidth,currentThumbnailIndex:this.state.currentThumbnailIndex,initThumbnailID:this.props.initThumbnailID,offsetType:this.props.offsetType,offsetValue:this.props.offsetValue,onCarouselRefLoad:this.$5,onItemClick:this.$4,onLeftArrowClicked:this.$2,onRightArrowClicked:this.$3,thumbnails:this.props.thumbnails})})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverSlideshowVideoSettingDialog.react",["ix","cx","fbt","BUISwitch.react","FDSText.react","Image.react","LayerFadeOnHide","Layout.react","LayoutColumn.react","PagesCoverSlideshowVideoThumbnailPicker.react","React","XUIButton.react","XUIDialog.react","XUIDialogBody.react","XUIDialogConfirmButton.react","XUIDialogFooter.react","XUIDialogTitle.react","asset"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=26,k=b("Layout.react").FillColumn;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.state={shouldCoverVideoLoop:c.props.videoData.shouldCoverVideoLoop},c.$2=function(a){if(!a)return;c.$1=a},c.$3=function(){c.setState(function(a){return{shouldCoverVideoLoop:!a.shouldCoverVideoLoop}})},c.$4=function(){c.props.isNewUpload?c.$5():c.props.onCancel()},c.$6=function(){c.props.isNewUpload?c.$5():c.props.onToggle()},c.$5=function(){if(!c.$1)return;var a=c.$1.getCurrentThumbnailData(),b=c.props.videoData;b=babelHelpers["extends"]({},b,{shouldCoverVideoLoop:c.state.shouldCoverVideoLoop});c.props.onConfirm(b,a.id,a.url)},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.$7=function(){var a=this.props.isNewUpload?b("React").jsxs("div",{className:"_6n9w",children:[b("React").jsx(b("Image.react"),{className:"_6n9x",src:g("506114")}),b("React").jsx(b("FDSText.react"),{size:"body3",weight:"bold",children:i._("Your video was uploaded successfully.")})]}):null;return b("React").jsxs(b("XUIDialogBody.react"),{children:[a,b("React").jsx("div",{className:"_6h72 _5n6n",children:b("React").jsx(b("FDSText.react"),{size:"header3",weight:"bold",children:i._("Video Thumbnail")})}),b("React").jsx("div",{className:"_6h73",children:b("React").jsx(b("FDSText.react"),{color:"secondary",size:"body2",children:i._("Choose a thumbnail to represent this video in your cover area.")})}),b("React").jsx("div",{children:b("React").jsx(b("PagesCoverSlideshowVideoThumbnailPicker.react"),babelHelpers["extends"]({},this.props.videoData,{initThumbnailID:this.props.preferredThumbnailID,pageID:this.props.pageID,ref:this.$2,thumbnails:this.props.thumbnails}))})]})};d.$8=function(){var a;return(a=b("React")).jsx(b("XUIDialogBody.react"),{children:a.jsxs(b("Layout.react"),{children:[a.jsxs(k,{children:[a.jsx("div",{className:"_6h72",children:a.jsx(b("FDSText.react"),{size:"header3",weight:"bold",children:i._("Video Looping")})}),a.jsx("div",{className:"_6h73",children:a.jsx(b("FDSText.react"),{color:"secondary",size:"body2",children:i._("When looping is turned on your video will repeatedly play. When looping is off your video will play through once and stop.")})})]}),a.jsx(b("LayoutColumn.react"),{className:"_6h74",children:a.jsx("span",{className:"_2pi8",children:a.jsx(b("BUISwitch.react"),{onToggle:this.$3,showLabel:!0,value:this.state.shouldCoverVideoLoop})})})]})})};d.render=function(){var a=this.props,c=a.dialogShown;a=a.thumbnails;var d=this.props.videoData.containerWidth;return!c||a.length===0?null:b("React").jsxs(b("XUIDialog.react"),{behaviors:{LayerFadeOnHide:b("LayerFadeOnHide")},onToggle:this.$6,shown:this.props.dialogShown,titleID:"pages-cover-video-setting-dialog",width:d+j,children:[b("React").jsx(b("XUIDialogTitle.react"),{children:b("React").jsx(b("FDSText.react"),{size:"header3",weight:"bold",children:i._("Video Settings")})}),this.$7(),this.$8(),b("React").jsxs(b("XUIDialogFooter.react"),{children:[b("React").jsx(b("XUIButton.react"),{label:this.props.shouldShowBackButton?i._("Back"):i._("Cancel"),onClick:this.$4}),b("React").jsx(b("XUIDialogConfirmButton.react"),{action:"confirm",onClick:this.$5,use:"confirm"})]})]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverVideoHoverableVideoComponent.react",["cx","React","VideoComponentPlayButton.react","VideoDataContainer.react","VideoPlayer.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){d.props.onMouseEnter&&d.props.onMouseEnter(d.props.videoID)},d.$2=function(){d.props.onMouseLeave&&d.props.onMouseLeave(d.props.videoID)},d.$3=function(){d.props.onVideoClick&&d.props.onVideoClick(d.props.videoID)},d.$4=function(a){a.stopPropagation(),a.key==="Enter"&&d.$3()},d.$5=function(){return b("VideoDataContainer.react").renderSpinner(d.props.width,d.props.height)},d.$6=function(a){if(!a)return;d.props.onRefLoaded(d.props.videoID,a)},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return b("React").jsx("span",{className:"_bt-"+(this.props.isSelected?" _bu0":""),onKeyPress:this.$4,onMouseEnter:this.$1,onMouseLeave:this.$2,role:"link",tabIndex:0,children:b("React").jsx(b("VideoDataContainer.react"),{renderLoading:this.$5,videoID:this.props.videoID,children:b("React").jsx(b("VideoPlayer.react"),{disableClickPlayPause:!0,height:this.props.height,onVideoClick:this.$3,playerOrigin:"page_timeline",ref:this.$6,subOrigin:"pages_cover_hover",videoData:b("VideoDataContainer.react").VIDEO_DATA_PLACEHOLDER,width:this.props.width,children:b("React").jsx(b("VideoComponentPlayButton.react"),{})})})},this.props.videoID)};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverVideoSelectionComponent.react",["cx","PagesCoverVideoHoverableVideoComponent.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=176,i=Math.round(h*9/16);a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(b){__p&&__p();var c;c=a.call(this,b)||this;c.state={selectedVideoID:null};c.$2=function(a){if(a===c.state.selectedVideoID)return;var b=c.state.selectedVideoID;if(b){b=c.$1.get(b);b&&b.pause("user_initiated")}c.setState({selectedVideoID:a});c.props&&c.props.onVideoSelected(a)};c.$3=function(a){a=c.$1.get(a);a&&a.play("hover")};c.$4=function(a){a=c.$1.get(a);a&&a.pause("hover")};c.$5=function(a,b){b&&b.vpc&&c.$1.set(a,b.vpc)};c.$1=new Map();return c}var d=c.prototype;d.render=function(){var a=this,c=this.props.videoIDs;if(!c||c.length===0)return null;c=c.map(function(c){return b("React").jsx(b("PagesCoverVideoHoverableVideoComponent.react"),{height:i,isSelected:c===a.state.selectedVideoID,onMouseEnter:a.$3,onMouseLeave:a.$4,onRefLoaded:a.$5,onVideoClick:a.$2,videoID:c,width:h},c)});return b("React").jsx("div",{className:"_4yfa",children:c})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverVideoBrowserDialog.react",["cx","fbt","AsyncRequest","LayerFadeOnHide","LoadingDialog.react","PagesCoverVideoSelectionComponent.react","React","ScrollableArea.react","XPagesCoverVideoFetchController","XUIButton.react","XUIDialog.react","XUIDialogBody.react","XUIDialogCancelButton.react","XUIDialogConfirmButton.react","XUIDialogFooter.react","XUIDialogOkayButton.react","XUIDialogTitle.react","XUISpinner.react","nullthrows"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=3;c=176;d=8;f=Math.round(c*9/16);var i=(c+2*d)*a+3*d,j=9,k=f*3;g=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={videoIDs:[],selectedVideoID:null,cursor:"",hasMore:!0,hasEligibleVideos:!0,isLoading:!1},d.$2=function(){if(!d.state.hasMore||!d.state.hasEligibleVideos||d.state.isLoading)return;var a=b("XPagesCoverVideoFetchController").getURIBuilder().setFBID("page_id",d.props.pageID).setInt("count",j).setString("cursor",d.state.cursor).getURI();d.$1=new(b("AsyncRequest"))(a).setHandler(d.$3);d.$1.send();d.setState({isLoading:!0})},d.$3=function(a){var b=a.payload;if(!b)return;d.setState(function(a,c){return{videoIDs:a.videoIDs.concat(b.videoIDs),cursor:b.cursor,hasMore:b.hasMore,hasEligibleVideos:b.hasEligibleVideos,isLoading:!1}})},d.$4=function(a){d.setState({selectedVideoID:a})},d.$5=function(){var a=d.props.onConfirm;a&&a(b("nullthrows")(d.state.selectedVideoID))},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.componentDidMount=function(){this.$2()};d.componentWillUnmount=function(){this.$1&&(this.$1.abort(),delete this.$1)};d.render=function(){__p&&__p();if(!this.props.dialogShown)return null;if(this.state.videoIDs.length===0&&this.state.hasMore&&this.state.hasEligibleVideos)return b("React").jsx(b("LoadingDialog.react"),{behaviors:{LayerFadeOnHide:b("LayerFadeOnHide")},onToggle:this.props.onToggle});if(!this.state.hasEligibleVideos){var a;return(a=b("React")).jsxs(b("XUIDialog.react"),{behaviors:{LayerFadeOnHide:b("LayerFadeOnHide")},onToggle:this.props.onToggle,shown:this.props.dialogShown,titleID:"pages-cover-video-browser-dialog",width:i,children:[a.jsx(b("XUIDialogTitle.react"),{children:h._("Choose From My Videos")}),a.jsx(b("XUIDialogBody.react"),{children:a.jsx("div",{children:h._("None of the videos in your library qualify as a cover video. Videos must be between 20 - 90 seconds and at least 820 x 312 pixels. The recommended size is 820 x 462 pixels. Please upload a different video and try again.")})}),a.jsx(b("XUIDialogFooter.react"),{children:a.jsx(b("XUIDialogOkayButton.react"),{action:"cancel",use:"confirm"})})]})}a=this.state.hasMore?b("React").jsx("div",{className:"_4yfc",children:b("React").jsx(b("XUISpinner.react"),{size:"large"})}):null;var c=this.state.videoIDs,d=this.props.existingMediaIDs;d&&(c=c.filter(function(a){return!d.has(a)}));var e=this.props.isForSlideshow?b("React").jsx(b("XUIButton.react"),{disabled:!this.state.selectedVideoID,label:h._("Next"),onClick:this.$5}):b("React").jsx(b("XUIDialogConfirmButton.react"),{action:"confirm",disabled:!this.state.selectedVideoID,onClick:this.$5,use:"confirm"});return b("React").jsxs(b("XUIDialog.react"),{behaviors:{LayerFadeOnHide:b("LayerFadeOnHide")},onToggle:this.props.onToggle,shown:this.props.dialogShown,titleID:"pages-cover-video-browser-dialog",width:i,children:[b("React").jsx(b("XUIDialogTitle.react"),{children:h._("Choose From My Videos")}),b("React").jsx(b("XUIDialogBody.react"),{children:b("React").jsxs(b("ScrollableArea.react"),{fade:!1,height:k,onEndReached:this.$2,width:i,children:[b("React").jsx(b("PagesCoverVideoSelectionComponent.react"),{onVideoSelected:this.$4,videoIDs:c}),a]})}),b("React").jsxs(b("XUIDialogFooter.react"),{children:[b("React").jsx(b("XUIDialogCancelButton.react"),{onClick:this.props.onToggle}),e]})]})};return c}(b("React").PureComponent);e.exports=g}),null);
  __d("PagesVideoUploader.react",["cx","invariant","Arbiter","AsyncRequest","ChannelConstants","EventListener","FileInput.react","PagesCoverVideoTypedLogger","React","SubscriptionsHandler","VideoUploadConfig","VideoUploader","VideoUploadFile","VideoUploadProgressBar","generateVideoThumbnails","promiseDone","nullthrows"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=a.URL||a.webkitURL||{};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.state={selectedFileURL:null};d.reset=function(){d.$1.reset(),d.$3=0,d.$4.release(),d.$4=new(b("SubscriptionsHandler"))(),d.$5=!1,d.props.videoUploaderRef&&d.props.videoUploaderRef(null),clearInterval(d.$6),clearTimeout(d.$7)};d.$8=function(a){__p&&__p();var c=a.target,e=b("VideoUploadFile").getExtensionFromFileInput(c);if(!b("VideoUploadConfig").videoExtensions[e]||e==="gif"||!(c instanceof HTMLInputElement)){d.props.onChange&&d.props.onChange(a,!1);return}e=c.files[0];e||h(0,1113);d.reset();var f=d.$1,g=d.$2;d.$4.addSubscriptions(f.subscribe("upload-started",d.$9),f.subscribe("upload-progressed",d.$10),f.subscribe("upload-finished",d.$11),f.subscribe("post-finished",d.$12),f.subscribe("upload-failed",d.$13),f.subscribe("post-failed",d.$14),b("EventListener").listen(g,"loadedmetadata",d.$15),b("Arbiter").subscribe(b("ChannelConstants").getArbiterType("video_encode"),d.$16));f=i.createObjectURL(e);d.setState({selectedFileURL:f});d.$1.upload(b("VideoUploadFile").fromFileInput(c));d.props.onChange&&d.props.onChange(a,!0)};d.$9=function(){d.props.onUploadStarted&&d.props.onUploadStarted()};d.$15=function(a){var c=a.target;if(!(c instanceof HTMLVideoElement))return;b("promiseDone")(b("generateVideoThumbnails")(b("nullthrows")(c),d.props.thumbnailWidth,d.props.thumbnailHeight,1,"cover"),function(a){var b=d.props.onVideoMetadataLoaded;b&&b(c,d.reset,a.thumbnails)})};d.$10=function(a,c){a=b("VideoUploadProgressBar").computeProgress(c.start_offset,c.sent_bytes,c.file_size,0,0);var e=d.props.onUploadProgressed;e&&e(Math.round(a),c)};d.$11=function(a,b){__p&&__p();a=d.props.onUploadFinished;a&&a(b);a=d.$1;if(!a)return;if(d.props.autoEncode){b=d.props.getCustomPostData;if(b){b=b();a.post(b)}else a.post({})}else{b=d.props.onManualPost;b||h(0,3288);b(a)}};d.$12=function(a,b){d.props.onPostFinished&&d.props.onPostFinished(b),d.$17(b.video_id,b),d.$1.reset()};d.$13=function(a,b){d.props.onUploadFailed&&d.props.onUploadFailed(b),d.reset()};d.$14=function(a,b){d.props.onPostFailed&&d.props.onPostFailed(b),d.reset()};d.$16=function(a,b){__p&&__p();a=d.$18(b);if(!a)return;var c=b.obj.videoID.toString();if(b.obj.stage==="update_video"||b.obj.stage==="finish")a.setIsFinished(!0).log(),d.props.onEncodeFinished&&d.props.onEncodeFinished(c),d.reset();else{a.setIsFinished(!1).log();d.$3=Math.max(d.$3,b.obj.progress);if(!d.$5){a=d.props.onEncodeStarted;a&&a(d.$3);d.$5=!0}else d.props.onEncodeProgressed&&d.props.onEncodeProgressed(d.$3);d.$17(c,b)}};d.$1=new(b("VideoUploader"))(c.videoUploaderInitParams);d.$3=0;d.$4=new(b("SubscriptionsHandler"))();d.$5=!1;return d}var d=c.prototype;d.$18=function(a){__p&&__p();var c,d,e,f,g=new(b("PagesCoverVideoTypedLogger"))().setTimeUs(Date.now()*1e3);f=(f=this.props)!=null?(f=f.videoUploaderInitParams)!=null?f.actor_id:f:f;e=(e=a)!=null?(e=e.obj)!=null?e.progress:e:e;d=(d=a)!=null?(d=d.obj)!=null?d.stage:d:d;c=(c=a)!=null?(c=c.obj)!=null?c.type:c:c;a=(a=a)!=null?(a=a.obj)!=null?a.videoID:a:a;f&&g.setPageID(f);e&&g.setProgress(e);d&&g.setStage(f);c&&g.setType(c);if(a)g.setVideoID(a);else{g.setIsFinished(!1).log();return null}return g};d.$17=function(a,c){__p&&__p();var d=this;clearInterval(this.$6);clearTimeout(this.$7);this.$7=setTimeout(function(){__p&&__p();d.$6=setInterval(function(){__p&&__p();new(b("AsyncRequest"))().setURI("/ajax/video/encode/feedback/ping/").setData({video_id:a}).setHandler(function(b){__p&&__p();var e=d.$18(c);if(!e)return;b=b.getPayload();var f=b.is_ready,g=b.video_status_type,h=b.video_container_type;f!==void 0&&e.setIsFinished(f);g&&e.setVideoStatus(g);h&&e.setVideoContainerType(h);e.log();b.is_ready&&(d.props.onEncodeFinished&&d.props.onEncodeFinished(a),d.reset())}).send()},2e3)},2e3)};d.render=function(){var a=this,c=["video/*","video/mp4"],d=this.props.extraAccept;Array.isArray(d)?c.concat(d):d&&d!==""&&c.push(d);return b("React").jsxs("div",{children:[b("React").jsx(b("FileInput.react"),{accept:c,className:"_6hs0",name:"simple_video_uploader",onChange:this.$8,ref:function(b){a.props.fileInputRef&&a.props.fileInputRef(b)},children:b("React").jsx("a",{className:this.props.labelClassName,href:"#",children:this.props.label})}),b("React").jsx("video",{className:"hidden_elem",ref:function(b){a.$2=b,a.props.videoPlayerRef&&a.props.videoPlayerRef(b)},src:this.state.selectedFileURL})]})};return c}(b("React").PureComponent);c.defaultProps={autoEncode:!0,thumbnailHeight:312,thumbnailWidth:820};e.exports=c}),null);
  __d("PagesCoverSlideshowItemEditMenu.react",["cx","fbt","ActorURI","AsyncRequest","ContextualDialogArrow","CoverSlideshowUtil","CoverVideoUtil","FileInput.react","FileInputUploader","PagesCoverDispatcher","PagesCoverSlideshowActionCreator","PagesCoverSlideshowVideoSettingDialog.react","PagesCoverVideoActionCreator","PagesCoverVideoBrowserDialog.react","PagesVideoUploader.react","ReactXUIMenu","PopoverMenu.react","React","XPagesCoverVideoUploaderController","XPhotoBrowserDialogController","ReactDOM","XPagesCoverPhotoUploadAsyncController","promiseDone"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("ReactXUIMenu").Item;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d,e,f,g,h;for(var i=arguments.length,j=new Array(i),k=0;k<i;k++)j[k]=arguments[k];return(g=h=a.call.apply(a,[this].concat(j))||this,h.state={isChooseFromExistingVideo:!1,videoData:(c=h.props.item)==null?void 0:c.carouselMediaData.videoData,videoID:(d=h.props.item)==null?void 0:(e=d.carouselMediaData.videoData)==null?void 0:e.videoID,preferredThumbnailID:(f=h.props.item)==null?void 0:f.thumbnailData.thumbnailID,showCoverVideoBrowserDialog:!1,showCoverVideoSettingDialog:!1,thumbnails:[],videoUploaderInitParams:null},h.$6=function(a){h.$1=a},h.$7=function(){var a=b("ActorURI").create(b("XPagesCoverPhotoUploadAsyncController").getURIBuilder().setFBID("page_id",h.props.pageID).setString("ref","pages_cover_slideshow_ref").setInt("index",h.props.index).setString("previous_key",h.props.mediaID).getURI(),h.props.pageID),c=b("ReactDOM").findDOMNode(h.$1);new(b("FileInputUploader"))(c).setURI(a).setAllowCrossOrigin(!0).send();b("PagesCoverSlideshowActionCreator").onPhotoUploading(h.props.index)},h.$8=function(){b("PagesCoverSlideshowActionCreator").onPhotoRemoved(h.props.index)},h.$11=function(){h.setState({showCoverVideoBrowserDialog:!0})},h.$12=function(){h.setState({showCoverVideoBrowserDialog:!1,showCoverVideoSettingDialog:!1,isChooseFromExistingVideo:!1}),h.$5()},h.$13=function(a){__p&&__p();h.setState({videoID:a}),b("promiseDone")(b("CoverVideoUtil").fetchCoverVideoData(a,!0).then(function(b){if(a!==h.state.videoID)return;var c=h.props,d=c.containerHeight;c=c.containerWidth;var e=b.thumbnails,f=b.offsetType,g=b.offsetValue;b=b.preferredThumbnailData;b=b==null?void 0:b.id;d={videoID:a,containerHeight:d,containerWidth:c,isForSlideshow:!0,offsetType:f,offsetValue:g,shouldCoverVideoLoop:!0,status:"previewing"};h.setState({thumbnails:e,videoData:d,preferredThumbnailID:b,isChooseFromExistingVideo:!0,showCoverVideoBrowserDialog:!1,showCoverVideoSettingDialog:!0})}))},h.$15=function(){h.setState({showCoverVideoSettingDialog:!0})},h.$16=function(){h.setState({showCoverVideoSettingDialog:!1}),h.$5()},h.$17=function(){h.setState(function(a){return a.isChooseFromExistingVideo?{showCoverVideoSettingDialog:!1,showCoverVideoBrowserDialog:!0}:{showCoverVideoSettingDialog:!1}})},h.$18=function(a,c,d){b("PagesCoverSlideshowActionCreator").onVideoItemSettingConfirmed(a,c,d,h.props.mediaID,h.state.isChooseFromExistingVideo),h.setState({videoID:a.videoID,preferredThumbnailID:c,showCoverVideoSettingDialog:!1})},h.$19=function(a){h.$1=a},h.$20=function(a,b){if(b)return;h.$7()},h.$21=function(a,c,d){a=b("PagesCoverVideoActionCreator").validateCoverVideoMetadata(h.props.pageID,a,c,h.props.containerWidth,h.props.containerHeight);if(a){c=d[0].getURL();a=b("CoverSlideshowUtil").randomFixedInteger(15);h.setState({videoID:a});b("PagesCoverDispatcher").dispatch({type:"slideshow_video_start_upload",data:{url:c,videoUploadTempID:a,uploadingIndex:h.props.index}})}},h.$22=function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_encoding",data:{progress:a,uploadingIndex:h.props.index,previousKey:h.state.videoID}})},h.$23=function(a){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_encoding",data:{progress:a,uploadingIndex:h.props.index,previousKey:h.state.videoID}})},h.$24=function(a,c){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_uploading",data:{progress:a,uploadingIndex:h.props.index,previousKey:h.state.videoID}})},h.$25=function(){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_uploading",data:{progress:0,uploadingIndex:h.props.index,previousKey:h.state.videoID}})},h.$26=function(a){var c=h.props,d=c.containerHeight;c=c.containerWidth;a={videoID:a,containerHeight:d,containerWidth:c,isForSlideshow:!0,offsetType:0,offsetValue:0,shouldCoverVideoLoop:!0,status:"encoding",progress:100};b("PagesCoverDispatcher").dispatch({type:"slideshow_video_encode_finished",data:{previousKey:h.state.videoID,videoData:a}})},g)||babelHelpers.assertThisInitialized(h)}var d=c.prototype;d.componentDidMount=function(){this.$4();this.$5();if(this.props.index!==0)return;var a=b("ReactDOM").findDOMNode(this);if(!(a instanceof Element)||!this.props.hasItem)return;b("PagesCoverSlideshowActionCreator").onNUXTourElementLoaded(a,2,h._("To choose your slideshow manually, add a new photo or choose an existing one. Slideshow images must be at least 820 pixels wide and 312 pixels tall."),"below")};d.componentDidUpdate=function(){this.$2&&this.props.isEditBarDragging&&this.$2.hidePopover()};d.componentWillUnmount=function(){this.$3&&(this.$3.abort(),delete this.$3)};d.$5=function(){__p&&__p();var a=this,c=this.props.item;if((c==null?void 0:c.itemType)!=="video")return;var d=b("CoverSlideshowUtil").getMediaId(c);this.setState({videoID:d});if(!d)return;b("promiseDone")(b("CoverVideoUtil").fetchCoverVideoData(d,!0).then(function(b){var e;if(d!==a.state.videoID)return;e=(e=a.props.item)==null?void 0:e.carouselMediaData.videoData;b=b.thumbnails;a.setState({videoData:e,thumbnails:b});(c==null?void 0:c.isNewUpload)&&a.setState({showCoverVideoSettingDialog:!0})}))};d.$9=function(){var a=this.props,c=a.pageID,d=a.mediaID;a=a.existingMediaIDs;c=b("XPhotoBrowserDialogController").getURIBuilder().setEnum("endpoint",23).setEnum("generator",1).setInt("id",c).setString("data",String(d)).setFBIDSet("existing_media_ids",Array.from(a)).getURI();return b("React").jsx(i,{href:c,rel:"dialog",children:h._("Choose From Photos")})};d.$4=function(){var a=this,c=b("ActorURI").create(b("XPagesCoverVideoUploaderController").getURIBuilder().setFBID("page_id",this.props.pageID).getURI(),this.props.pageID);this.$3=new(b("AsyncRequest"))(c).setHandler(function(b){a.setState({videoUploaderInitParams:b.payload.video_uploader_params})});this.$3.send()};d.$10=function(){return!this.props.isCoverSlideshowVideoEnabled?null:b("React").jsx(i,{onclick:this.$11,children:h._("Choose From Videos")})};d.$14=function(){var a,c=this.props.isCoverSlideshowVideoEnabled;a=(a=this.props.item)==null?void 0:a.itemType;return!c||a!=="video"||this.state.thumbnails.length===0?null:b("React").jsx(i,{onclick:this.$15,children:h._("Video Settings")})};d.$27=function(){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_uploading_failed",data:{}})};d.$28=function(){b("PagesCoverDispatcher").dispatch({type:"slideshow_video_encoding_failed",data:{}})};d.$29=function(){var a=this.state.videoUploaderInitParams;if(!a)return null;var c=h._("Upload Photo\/Video");return b("React").jsx(i,{renderas:"label",children:b("React").jsx(b("PagesVideoUploader.react"),{"data-testid":"cover_photo_upload_menu_item",extraAccept:"image/*",fileInputRef:this.$19,label:c,labelClassName:"_2ojv",onChange:this.$20,onEncodeFinished:this.$26,onEncodeProgressed:this.$22,onEncodeStarted:this.$23,onPostFailed:this.$28,onUploadFailed:this.$27,onUploadProgressed:this.$24,onUploadStarted:this.$25,onVideoMetadataLoaded:this.$21,videoUploaderInitParams:a})})};d.$30=function(){return!this.props.isCoverSlideshowVideoEnabled?b("React").jsx(i,{renderas:"label",children:b("React").jsx(b("FileInput.react"),{accept:"image/*",display:"inline-block",name:"pages_cover_slideshow_photo_uploader",onChange:this.$7,ref:this.$6,children:b("React").jsx("a",{className:"_2ojv",href:"#",children:h._("Upload Photo")})})}):this.$29()};d.$31=function(){return!this.props.hasItem?null:b("React").jsx(i,{onClick:this.$8,children:h._("Remove")})};d.$32=function(){return b("React").jsxs(b("ReactXUIMenu"),{children:[this.$9(),this.$10(),this.$14(),this.$30(),this.$31()]})};d.$33=function(){var a,c=this.state,d=c.videoData,e=c.preferredThumbnailID;c=c.isChooseFromExistingVideo;return!d?null:b("React").jsx(b("PagesCoverSlideshowVideoSettingDialog.react"),{dialogShown:this.state.showCoverVideoSettingDialog&&this.props.isCoverSlideshowVideoEnabled,isNewUpload:(a=this.props.item)==null?void 0:a.isNewUpload,onCancel:this.$17,onConfirm:this.$18,onToggle:this.$16,pageID:this.props.pageID,preferredThumbnailID:e,shouldShowBackButton:c,shouldShowNewUploadIndicator:(a=this.props.item)==null?void 0:a.isNewUpload,thumbnails:this.state.thumbnails,videoData:d})};d.render=function(){var a=this;return b("React").jsxs(b("PopoverMenu.react"),{disabled:!this.props.shouldAllowUploadingVideo,layerBehaviors:[b("ContextualDialogArrow")],menu:this.$32(),position:"below",ref:function(b){return a.$2=b},children:[this.props.icon,b("React").jsx(b("PagesCoverVideoBrowserDialog.react"),{dialogShown:this.state.showCoverVideoBrowserDialog&&this.props.isCoverSlideshowVideoEnabled,existingMediaIDs:this.props.existingMediaIDs,isForSlideshow:!0,onConfirm:this.$13,onToggle:this.$12,pageID:this.props.pageID}),this.$33()]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverSlideshowPlaceholder.react",["cx","React"],(function(a,b,c,d,e,f,g){"use strict";function a(a){return b("React").jsx("div",{className:"_2aou",children:b("React").jsx("div",{className:"_2ap1",style:{height:a.thumbnailHeight,width:a.thumbnailWidth}})},"placeholder")}e.exports=a}),null);
  __d("PagesCoverSlideshowPlaceholderWithPicker.react",["ix","cx","CenteredContainer.react","Image.react","Link.react","PagesCoverSlideshowItemEditMenu.react","React","XUISpinner.react","asset"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.$1=function(){if(this.props.shouldShowLoadingScreenOnPickerPlaceholder)return null;var a=this.props.shouldAllowUploadingVideo?g("520746"):g("483131");a=b("React").jsx(b("CenteredContainer.react"),{className:"_30i-"+(this.props.shouldAllowUploadingVideo?"":" _6hs1"),style:{height:this.props.thumbnailHeight,width:this.props.thumbnailWidth},vertical:!0,children:b("React").jsx(b("Image.react"),{src:a})});return b("React").jsx(b("PagesCoverSlideshowItemEditMenu.react"),babelHelpers["extends"]({},this.props,{existingMediaIDs:this.props.existingMediaIDs,hasItem:!1,icon:a,index:this.props.index,isCoverSlideshowVideoEnabled:this.props.isCoverSlideshowVideoEnabled,isEditBarDragging:this.props.isEditBarDragging,pageID:this.props.pageID,shouldAllowUploadingVideo:this.props.shouldAllowUploadingVideo}))};d.$2=function(){return!this.props.shouldShowLoadingScreenOnPickerPlaceholder?null:b("React").jsx(b("CenteredContainer.react"),{className:"_30i-",style:{height:this.props.thumbnailHeight,width:this.props.thumbnailWidth},vertical:!0,children:b("React").jsx(b("XUISpinner.react"),{background:"light",size:"large"})})};d.render=function(){return b("React").jsx("div",{className:"_2aou",children:b("React").jsxs(b("Link.react"),{children:[this.$1(),this.$2()]})},"picker")};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverSlideshowThumbnailItem.react",["cx","BackgroundImage.react","Link.react","PagesCoverDimension","PagesCoverSlideshowActionCreator","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("PagesCoverDimension").THUMBNAIL_HEIGHT_IN_SETTINGS,i=b("PagesCoverDimension").THUMBNAIL_WIDTH_IN_SETTINGS;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){b("PagesCoverSlideshowActionCreator").changeCurrentIndex(d.props.pageID,d.props.index)},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return b("React").jsx("div",{className:"_2aou",children:b("React").jsx(b("Link.react"),{onClick:this.$1,children:b("React").jsx(b("BackgroundImage.react"),{alt:"pages_cover_photo_thumbnail",backgroundSize:"cover",className:this.props.isCurrent?"_4bou":"",height:this.props.isInSettingsPage?h:this.props.thumbnailHeight,src:this.props.thumbnailURI,width:this.props.isInSettingsPage?i:this.props.thumbnailWidth})})},this.props.thumbnailURI)};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverSlideshowEditBar.react",["ix","cx","fbt","invariant","CoverSlideshowUtil","FBDraggableBar.react","FBDraggableItem.react","FBToggleSwitch.react","Focus","Image.react","PagesCoverDimension","PagesCoverSlideshowActionCreator","PagesCoverSlideshowItemEditMenu.react","PagesCoverSlideshowPlaceholder.react","PagesCoverSlideshowPlaceholderWithPicker.react","PagesCoverSlideshowThumbnailItem.react","React","Tooltip.react","asset","cxMargin"],(function(a,b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=(a=b("PagesCoverDimension")).COVER_HEIGHT_IN_SETTINGS,l=a.COVER_WIDTH_IN_SETTINGS,m=a.THUMBNAIL_HEIGHT_IN_SETTINGS,n=a.THUMBNAIL_WIDTH_IN_SETTINGS;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.state={isEditBarDragged:!1},d.$3=function(a){a||a===0||j(0,3804),b("PagesCoverSlideshowActionCreator").changeCurrentIndex(d.props.pageID,a),d.setState({isEditBarDragged:!0})},d.$4=function(a){b("PagesCoverSlideshowActionCreator").toggleContentOptimizer(d.props.pageID,a)},d.$5=function(a,c){b("PagesCoverSlideshowActionCreator").reorderSlideshowItems(a,c,d.props.pageID),d.setState({isEditBarDragged:!1})},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.$1=function(a){if(!a)return;b("PagesCoverSlideshowActionCreator").onNUXTourElementLoaded(a,1,i._("You can rearrange the order of your slideshow by dragging the photos to the position where you want them."),"below");b("Focus").set(a)};d.$2=function(a){if(!a)return;b("PagesCoverSlideshowActionCreator").onNUXTourElementLoaded(a,4,i._("To help get you started, we've chosen photos based on what performs well. If you let Facebook choose your slideshow, the photos may update based on your Page activity."),"left")};d.$6=function(){var a=this.props.shouldAllowUploadingVideo?g("477824"):g("495298");return b("React").jsx("div",{className:(this.props.shouldAllowUploadingVideo?"_6h3_":"")+(this.props.shouldAllowUploadingVideo?"":" _6h2n"),children:b("React").jsx(b("Image.react"),{src:a})})};d.$7=function(a,c,d){var e=b("CoverSlideshowUtil").getMediaId(a);if(!e)return null;var f=a.thumbnailData,g=this.$6();return b("React").jsxs(b("FBDraggableItem.react"),{index:c,onGrab:this.$3,children:[b("React").jsx(b("PagesCoverSlideshowThumbnailItem.react"),babelHelpers["extends"]({index:c,isCurrent:c===this.props.currentIndex,isInSettingsPage:this.props.isInSettingsPage,pageID:this.props.pageID},f)),b("React").jsx("div",{className:"_37bb",children:b("React").jsx(b("PagesCoverSlideshowItemEditMenu.react"),babelHelpers["extends"]({},f,{containerHeight:this.props.isInSettingsPage?k:this.props.containerHeight,containerWidth:this.props.isInSettingsPage?l:this.props.containerWidth,existingMediaIDs:d,hasItem:!0,icon:g,index:c,isCoverSlideshowVideoEnabled:this.props.isCoverSlideshowVideoEnabled,isEditBarDragging:this.state.isEditBarDragged,item:a,mediaID:e,pageID:this.props.pageID,shouldAllowUploadingVideo:this.props.shouldAllowUploadingVideo}))})]},e)};d.render=function(){__p&&__p();var a=this;if(!this.props.isEditMode)return null;var c=b("CoverSlideshowUtil").getMediaIds(this.props.items),d=this.props.items.slice(0,5).map(function(d,b){return a.$7(d,b,c)}).filter(function(a){return!!a}),e=[],f=5-d.length;f>0&&e.push(b("React").jsx(b("PagesCoverSlideshowPlaceholderWithPicker.react"),{containerHeight:this.props.isInSettingsPage?k:this.props.containerHeight,containerWidth:this.props.isInSettingsPage?l:this.props.containerWidth,existingMediaIDs:c,index:d.length,isCoverSlideshowVideoEnabled:this.props.isCoverSlideshowVideoEnabled,isEditBarDragging:this.state.isEditBarDragged,pageID:this.props.pageID,shouldAllowUploadingVideo:this.props.shouldAllowUploadingVideo,shouldShowLoadingScreenOnPickerPlaceholder:this.props.shouldShowLoadingScreenOnPickerPlaceholder,thumbnailHeight:this.props.isInSettingsPage?m:this.props.thumbnailHeight,thumbnailWidth:this.props.isInSettingsPage?n:this.props.thumbnailWidth},"pages_cover_slideshow_picker"));var h=d.length+e.length;while(e.length<f)e.push(b("React").jsx(b("PagesCoverSlideshowPlaceholder.react"),{thumbnailHeight:this.props.isInSettingsPage?m:this.props.thumbnailHeight,thumbnailWidth:this.props.isInSettingsPage?n:this.props.thumbnailWidth},"pages_cover_slideshow_placeholder"+h)),h++;h=null;this.props.shouldShowEditSlideshowTooltip&&(h=b("React").jsx(b("Tooltip.react"),{className:"_69v-",tooltip:i._("Your cover is from the parent page. You can also create your own."),children:b("React").jsx("div",{className:"_69w3",children:b("React").jsx(b("Image.react"),{source:g("360715")})})}));return b("React").jsxs("div",{ref:this.$1,children:[b("React").jsxs("div",{className:"_3rgb",children:[i._("Choose photos you'd like to feature in your cover slideshow"),h,b("React").jsxs("span",{className:"_3rgc",ref:this.$2,children:[b("React").jsx("span",{className:"_3-8s",children:i._("Let Facebook Choose Photos")}),b("React").jsx(b("FBToggleSwitch.react"),{animate:!0,checked:this.props.isContentOptimizerOn,onToggle:this.$4,tooltip:i._("Facebook can select photos for you based on what performs well. These photos may update based on your Page activity. To create your own slideshow, add or edit photos.")})]})]}),b("React").jsxs("div",{className:"_3rgd",children:[b("React").jsx(b("FBDraggableBar.react"),{onReorder:this.$5,children:d}),e]})]})};return c}(b("React").PureComponent);e.exports=c}),null);
  __d("PagesCoverSlideshowNUXTour.react",["AdsBlueTipTour.react","BasicFBNux","LayerFadeOnShow","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.$1=function(){b("BasicFBNux").onDismiss(5385)};d.$2=function(a){if(!a)return;b("BasicFBNux").onView(5385)};d.render=function(){if(this.props.steps.length===0||!this.props.shown)return null;var a=this.props.steps.map(function(a){return{content:a.description,context:a.context,position:a.position}});return b("React").jsx(b("AdsBlueTipTour.react"),{behaviors:{LayerFadeOnShow:b("LayerFadeOnShow")},highlightContext:!1,onComplete:this.$1,onXOut:this.$1,ref:this.$2,steps:a})};return c}(b("React").PureComponent);c.propTypes={shown:a.bool.isRequired,steps:a.array.isRequired};e.exports=c}),null);
  __d("PagesCoverSlideshow.react",["cx","PagesCoverSlideshowActionCreator","PagesCoverSlideshowCarousel.react","PagesCoverSlideshowEditBar.react","PagesCoverSlideshowItemLoadingScreen.react","PagesCoverSlideshowNUXTour.react","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){d.props.hasPendingChanges?b("PagesCoverSlideshowActionCreator").confirmCancel(d.props.shouldAllowUploadingVideo):b("PagesCoverSlideshowActionCreator").onEditingCancelled()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.componentDidMount=function(){this.props.isEditMode||b("PagesLogger").log(this.props.pageID,b("PagesLoggerEventEnum").IMPRESSION,b("PagesLoggerEventTargetEnum").PAGE_COVER_SLIDESHOW)};d.render=function(){return!this.props.isCoverSlideshowEnabled?null:b("React").jsxs("div",{children:[b("React").jsxs("div",{className:"_626c",children:[b("React").jsx(b("PagesCoverSlideshowEditBar.react"),babelHelpers["extends"]({},this.props)),b("React").jsx(b("PagesCoverSlideshowCarousel.react"),babelHelpers["extends"]({},this.props)),b("React").jsx(b("PagesCoverSlideshowNUXTour.react"),{shown:this.props.shouldShowNUXTour&&this.props.isEditMode,steps:this.props.nuxTourSteps}),b("React").jsx(b("PagesCoverSlideshowItemLoadingScreen.react"),{shown:this.props.showLoadingScreen})]}),b("React").jsx("div",{className:this.props.isEditMode?"_i5t":"",onClick:this.$1,role:"link",tabIndex:0})]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesLiveCoverVideo.react",["React","VideoComponentContextMenu.react","VideoComponentCover.react","VideoComponentDebugOverlay.react","VideoComponentEmbeddedControls.react","VideoComponentErrorOverlay.react","VideoComponentLiveEndScreen.react","VideoComponentLiveInterruptedScreen.react","VideoComponentLiveVideoIndicator.react","VideoComponentPlayButton.react","VideoComponentStreamingReactionTray.react","VideoComponentVolumeStorage.react","VideoComponentWithFallbackMode.react","VideoComponentWithLiveBroadcast.react","VideoDataContainer.react","VideoPlayer.react"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a;return(a=b("React")).jsx(b("VideoDataContainer.react"),{videoID:this.props.videoID,children:a.jsxs(b("VideoPlayer.react"),{autoplay:!0,height:this.props.renderedHeight,playerOrigin:"intern",subOrigin:"not_specified_please_fix",startMuted:!0,videoData:b("VideoDataContainer.react").VIDEO_DATA_PLACEHOLDER,children:[a.jsx(b("VideoComponentEmbeddedControls.react"),{showSettingsButton:!0}),a.jsx(b("VideoComponentWithLiveBroadcast.react"),{}),a.jsx(b("VideoComponentPlayButton.react"),{}),a.jsx(b("VideoComponentCover.react"),{}),a.jsx(b("VideoComponentLiveVideoIndicator.react"),{}),a.jsx(b("VideoComponentDebugOverlay.react"),{}),a.jsx(b("VideoComponentContextMenu.react"),{}),a.jsx(b("VideoComponentLiveInterruptedScreen.react"),{}),a.jsx(b("VideoComponentLiveEndScreen.react"),{}),a.jsx(b("VideoComponentStreamingReactionTray.react"),{}),a.jsx(b("VideoComponentVolumeStorage.react"),{}),a.jsx(b("VideoComponentWithFallbackMode.react"),{}),a.jsx(b("VideoComponentErrorOverlay.react"),{})]})})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("VideoShowsAdminAddTrailer.react",["ix","cx","fbt","AbstractButton.react","ComposerXVideoUploadDialogController_DEPRECATED","FileInput.react","Image.react","OptimisticVideoProgressBar.react","React","Text.react","fbglyph"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){var a=d.refs.fileInput;if(!a)return;a=a.getFileInput();b("ComposerXVideoUploadDialogController_DEPRECATED").showDialog({targetID:d.props.pageID,fileInput:a,composerEntryPointRef:"page_trailer"});d.props.onOpenDialog&&d.props.onOpenDialog()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return!this.props.isAdmin?null:b("React").jsx("div",{style:{width:this.props.width,height:this.props.height},className:"_1ew_ _5-9f",children:b("React").jsxs("div",{className:"_5-9g",children:[b("React").jsx("div",{className:"_4xv5",children:b("React").jsx(b("Image.react"),{className:"_4xv6",src:g("122642")})}),b("React").jsx(b("Text.react"),{className:"_5-9h",style:{fontSize:16,fontWeight:"600",color:"white"},children:i._("Introduce Your Show With a Trailer")}),b("React").jsx(b("Text.react"),{className:"_40em",children:i._("Your trailer is a 16:9 video used to promote your show across Facebook. It should be less than 2 minutes and 30 seconds long.")}),b("React").jsx(b("Text.react"),{className:"_40em _3-8w",children:i._("Your trailer and most recent episodes will play in this space.")}),this.props.uploadedVideoData?null:b("React").jsx(b("FileInput.react"),{accept:"video/mp4, video/quicktime, video/*",ref:"fileInput",onChange:this.$1,children:b("React").jsx(b("AbstractButton.react"),{className:"_5-9j",label:i._("Add Trailer"),href:"#"})}),this.props.uploadedVideoData?b("React").jsx(b("OptimisticVideoProgressBar.react"),{videoID:this.props.uploadedVideoData.videoID,videoAssetID:this.props.uploadedVideoData.videoAssetID,width:this.props.width,onReadyEvent:"pageTrailerVideoEncode/complete"}):null]})})};return c}(b("React").Component);e.exports=a}),null);
  __d("PagesCoverComponent.react",["cx","PageOnTourOverlay.react","PagesCoverLoadingScreen.react","PagesCoverPhoto.react","PagesCoverSlideshow.react","PagesCoverVideo.react","PagesLiveCoverVideo.react","React","VideoShowsMetadataBlock.react","VideoShowsTrailer.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();function a(a){__p&&__p();var c=null,d=null;switch(a.currentCoverType){case"loading":c=b("React").jsx(b("PagesCoverLoadingScreen.react"),{isInSettingsPage:a.isInSettingsPage});break;case"cover_live_video":var e=a.coverData.cover_live_video,f=e.videoID;e=e.renderedHeight;f&&(c=b("React").jsx(b("PagesLiveCoverVideo.react"),{renderedHeight:e,videoID:f}),d="_3wu6");break;case"cover_trailer":if(a.coverData.cover_trailer.isShowPageNewCover&&!a.coverData.cover_trailer.isImmersiveShowPage){c=(e=b("React")).jsxs("div",{className:"_2k2l",children:[e.jsx("div",{className:"_66et",children:e.jsx(b("VideoShowsMetadataBlock.react"),{data:a.coverData.cover_trailer,pageID:a.pageID,showCreationFlowSource:"show_permalink"})}),e.jsxs("div",{className:"_66-8","data-testid":"SHOW_PAGE_FEATURED_VIDEO_CONTAINER",children:[e.jsx("div",{className:"_66eu"}),e.jsx(b("VideoShowsTrailer.react"),{data:a.coverData.cover_trailer,pageID:a.pageID,referrer:a.referrer,renderedHeight:336,renderedWidth:598,showCreationFlowSource:"show_permalink"})]})]})}else c=b("React").jsx("span",{"data-testid":"SHOW_PAGE_FEATURED_VIDEO_CONTAINER",children:b("React").jsx(b("VideoShowsTrailer.react"),{data:a.coverData.cover_trailer,pageID:a.pageID,showCreationFlowSource:"show_permalink"})});d="_3wu6";break;case"cover_video":c=b("React").jsx(b("PagesCoverVideo.react"),{isEditMode:a.isEditMode,isInSettingsPage:a.isInSettingsPage,isMigratedShowPage:a.isMigratedShowPage,videoData:a.coverData.cover_video});d="_3wu6";break;case"cover_slideshow":c=b("React").jsx(b("PagesCoverSlideshow.react"),babelHelpers["extends"]({isEditMode:a.isEditMode,isInSettingsPage:a.isInSettingsPage,pageID:a.pageID},a.coverData.cover_slideshow));d="_668x";break;case"cover_photo":default:c=b("React").jsx(b("PagesCoverPhoto.react"),babelHelpers["extends"]({isInSettingsPage:a.isInSettingsPage},a.coverData.cover_photo))}return b("React").jsxs("div",{children:[c,b("React").jsx(b("PageOnTourOverlay.react"),{className:d})]})}e.exports=a}),null);
  __d("PagesCoverRemoveCoverConfirmationDialog.react",["fbt","AsyncRequest","PagesCoverDispatcher","React","XPagesCoverRemoveAsyncController","XUIDialog.react","XUIDialogBody.react","XUIDialogCancelButton.react","XUIDialogConfirmButton.react","XUIDialogFooter.react","XUIDialogTitle.react","gkx","videoPageContextualColorFetchUpdatedThemeColor"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;var h=445;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){var a=b("XPagesCoverRemoveAsyncController").getURIBuilder().getURI();new(b("AsyncRequest"))().setMethod("POST").setURI(a).setData({page_id:d.props.pageID}).setHandler(function(){b("gkx")("678704")&&b("videoPageContextualColorFetchUpdatedThemeColor")(d.props.pageID)}).send();d.props.onToggle(!1);b("PagesCoverDispatcher").dispatch({type:"cover_removing"})},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return!this.props.shown?null:b("React").jsxs(b("XUIDialog.react"),{onToggle:this.props.onToggle,shown:!0,width:h,children:[b("React").jsx(b("XUIDialogTitle.react"),{children:g._("Remove Cover?")}),b("React").jsx(b("XUIDialogBody.react"),{children:g._("Are you sure you want to remove this cover?")}),b("React").jsxs(b("XUIDialogFooter.react"),{children:[b("React").jsx(b("XUIDialogCancelButton.react"),{}),b("React").jsx(b("XUIDialogConfirmButton.react"),{"data-testid":"cover_photo_remove_confirm_button",onClick:this.$1,use:"confirm"})]})]})};return c}(b("React").PureComponent);c.propTypes={coreData:a.object.isRequired,onToggle:a.func.isRequired,pageID:a.string.isRequired,shown:a.bool.isRequired};e.exports=c}),null);
  __d("PagesLiveCoverVideoActionCreator",["PagesCoverDispatcher"],(function(a,b,c,d,e,f){"use strict";a={onLiveCoverVideoEnabled:function(){b("PagesCoverDispatcher").dispatch({type:"live_video_enable"})},onLiveCoverVideoDisable:function(){b("PagesCoverDispatcher").dispatch({type:"live_video_disable"})}};e.exports=a}),null);
  __d("PagesCoverEditMenu.react",["ix","cx","fbt","invariant","ActorURI","AsyncRequest","ContextualDialogArrow","FileInput.react","FileInputUploader","Image.react","PagesCoverCameraButton.react","PagesCoverDispatcher","PagesCoverSlideshowActionCreator","PagesCoverVideoActionCreator","PagesCoverVideoBrowserDialog.react","PagesLiveCoverVideoActionCreator","PopoverMenu.react","React","ReactDOM","ReactXUIMenu","PagesVideoUploader.react","SimpleXUIDialog","XEventTourBadgeOnPagesCoverController","XPagesCoverPhotoUploadAsyncController","XPhotoBrowserDialogController","XPagesCoverLiveVideoToggleAsyncController","XPagesCoverVideoUploaderController","PagesCoverRemoveCoverConfirmationDialog.react","fbglyph"],(function(a,b,c,d,e,f,g,h,i,j){"use strict";__p&&__p();var k=b("ReactXUIMenu").Item;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d;d=a.call(this,c)||this;d.state={showRemoveCoverConfirmationDialog:!1,showCoverVideoBrowserDialog:!1,videoUploaderInitParams:null,shouldExpandMenu:!1};d.$8=function(){d.setState({showCoverVideoBrowserDialog:!0})};d.$9=function(){d.setState({showCoverVideoBrowserDialog:!1})};d.$10=function(a){d.setState({showRemoveCoverConfirmationDialog:a})};d.$11=function(a){b("PagesCoverVideoActionCreator").editCoverVideo(d.props.pageID,a),d.setState({showCoverVideoBrowserDialog:!1})};d.$12=function(a){d.$2=a};d.$13=function(a,c,e){var f=d.props.coverData.cover_video,g=f.containerWidth;f=f.containerHeight;a=b("PagesCoverVideoActionCreator").validateCoverVideoMetadata(d.props.pageID,a,c,g,f);a&&b("PagesCoverVideoActionCreator").showCoverVideoUploadUI(e)};d.$14=function(a){var c=d.props.coverData.cover_video,e=c.containerWidth;c=c.containerHeight;b("PagesCoverVideoActionCreator").encodeFinished(d.props.pageID,a,e,c)};d.$17=function(a){b("PagesCoverVideoActionCreator").reloadCoverWithErrorDialog(d.props.pageID,a)};d.$18=function(){__p&&__p();var a=d.props.coverData.cover_live_video;!a&&j(0,1474);var c=a.isEnabled?i._("Don't Show Your Live Video as Your Cover Photo"):i._("Show Your Live Video as Your Cover Photo"),e=a.isEnabled?i._("The next time you go live, your broadcast will no longer appear at the top of your Page."):i._("The next time you go live, your broadcast will appear at the top of your Page. It will automatically be replaced by your most recent live video.");b("SimpleXUIDialog").showConfirm(e,c,function(c){if(!c)return;c=b("XPagesCoverLiveVideoToggleAsyncController").getURIBuilder().getURI();new(b("AsyncRequest"))(c).setMethod("POST").setData({page_id:d.props.pageID,is_enabled:!a.isEnabled}).setHandler(function(a){a=a.payload;a?b("PagesLiveCoverVideoActionCreator").onLiveCoverVideoEnabled():b("PagesLiveCoverVideoActionCreator").onLiveCoverVideoDisable()}).send()})};d.$20=function(){b("PagesCoverSlideshowActionCreator").enterEditMode(d.props.pageID)};d.$26=function(){d.setState({showRemoveCoverConfirmationDialog:!0})};d.$23=function(){var a=d.props.coreData.currentCoverType;if(a==="cover_photo")b("PagesCoverDispatcher").dispatch({data:{isPreviewMode:!0},type:"photo_previewing"});else if(a==="cover_video"){a=d.props.coverData.cover_video.videoID;b("PagesCoverVideoActionCreator").editCoverVideo(d.props.pageID,a)}};d.$16=function(a,c){if(c)return;a=b("ActorURI").create(b("XPagesCoverPhotoUploadAsyncController").getURIBuilder().setFBID("page_id",d.props.pageID).getURI(),d.props.pageID);new(b("FileInputUploader"))(b("ReactDOM").findDOMNode(d.$2)).setURI(a).setAllowCrossOrigin(!0).send();b("PagesCoverDispatcher").dispatch({type:"photo_uploading"})};d.$25=function(){var a=d.props.coreData.eventTourBadgeInfo.eventTourBadgeStatus;if(a==="no_tour")return;a=b("XEventTourBadgeOnPagesCoverController").getURIBuilder().setFBID("page_id",d.props.pageID).setBool("enable",a==="tour_badge_hidden").getURI();new(b("AsyncRequest"))(a).setHandler(function(a){a.payload&&b("PagesCoverDispatcher").dispatch({type:"on_tour_badge_updated",data:a.payload})}).send();b("PagesCoverDispatcher").dispatch({type:"loading"})};d.$28=function(){d.setState({shouldExpandMenu:!0})};d.$29=function(){d.setState({shouldExpandMenu:!1})};d.$1=null;d.$2=null;return d}var d=c.prototype;d.componentDidMount=function(){this.props.coreData.canViewerEditProfile&&this.$3()};d.UNSAFE_componentWillReceiveProps=function(a){a.coreData.hasCoverSet!==this.props.coreData.hasCoverSet&&(this.$1=null),a.coreData.canViewerEditProfile!==this.props.coreData.canViewerEditProfile&&this.$3()};d.$3=function(){var a=this,c=b("ActorURI").create(b("XPagesCoverVideoUploaderController").getURIBuilder().setFBID("page_id",this.props.pageID).getURI(),this.props.pageID);new(b("AsyncRequest"))(c).setHandler(function(b){a.setState({videoUploaderInitParams:b.payload.video_uploader_params})}).send()};d.$4=function(){return!!this.props.coreData.hasCoverSet};d.$5=function(){return!this.$4()?i._("Add a Cover"):i._("Change Cover")};d.$6=function(){if(!this.props.coverData.cover_photo.pageHasPhotos)return null;var a=b("XPhotoBrowserDialogController").getURIBuilder().setEnum("endpoint",20).setEnum("generator",1).setString("data","pages_cover_photo").setInt("id",this.props.pageID).getURI();return b("React").jsx(k,{href:a,rel:"dialog",children:i._("Choose From Photos")})};d.$7=function(){var a;a=!!((a=this.props)!=null?(a=a.coverData)!=null?(a=a.cover_video)!=null?a.shouldShowChooseFromCoverVideoMenu:a:a:a);return!a?null:b("React").jsx(k,{onclick:this.$8,children:i._("Choose From Videos")})};d.$15=function(){if(this.props.coreData.disableCoverVideoUploadOption)return b("React").jsx(k,{renderas:"label",children:b("React").jsx(b("FileInput.react"),{accept:"image/*","data-testid":"cover_photo_upload_menu_item",display:"inline-block",name:"cover_pic",onChange:this.$16,ref:this.$12,children:b("React").jsx("a",{className:"_3ihw",href:"#",children:i._("Upload Photo")})})});var a=this.state.videoUploaderInitParams;if(!a)return null;var c=i._("Upload Photo\/Video");return b("React").jsx(k,{renderas:"label",children:b("React").jsx(b("PagesVideoUploader.react"),{"data-testid":"cover_photo_upload_menu_item",extraAccept:"image/*",fileInputRef:this.$12,label:c,labelClassName:"_3ihw",onChange:this.$16,onEncodeFinished:this.$14,onEncodeProgressed:b("PagesCoverVideoActionCreator").encodeProgressed,onEncodeStarted:b("PagesCoverVideoActionCreator").encodeStarted,onPostFailed:this.$17,onUploadFailed:this.$17,onUploadProgressed:b("PagesCoverVideoActionCreator").uploadProgressed,onUploadStarted:b("PagesCoverVideoActionCreator").uploadStarted,onVideoMetadataLoaded:this.$13,videoUploaderInitParams:a})})};d.$19=function(){var a=this.props.coverData.cover_live_video;if(!a.canEnable)return null;a=a.isEnabled?i._("Don't Show Live Video"):i._("Show Live Video");return b("React").jsx(k,{onClick:this.$18,children:a})};d.$21=function(){var a;a=(a=this.props)!=null?(a=a.coverData)!=null?a.cover_slideshow:a:a;if(!a||!a.isCoverSlideshowEnabled)return null;a=a.shouldShowMenuNux?b("React").jsx(b("Image.react"),{src:g("115777"),style:{verticalAlign:"middle"}}):null;var c=this.props.coreData.currentCoverType==="cover_slideshow"?i._("Edit Slideshow"):i._("Create Slideshow");return b("React").jsxs(k,{onclick:this.$20,children:[c,a]})};d.$22=function(){var a;a=(a=this.props.coverData)!=null?(a=a.cover_video)!=null?a.isFromParentPage:a:a;return!this.$4()||this.props.coreData.currentCoverType==="cover_video"&&a||this.props.coreData.currentCoverType==="cover_slideshow"?null:b("React").jsx(k,{onclick:this.$23,children:i._("Reposition")})};d.$24=function(){switch(this.props.coreData.eventTourBadgeInfo.eventTourBadgeStatus){case"tour_badge_hidden":return b("React").jsx(k,{onclick:this.$25,children:i._("Show Tour Info")});case"tour_badge_shown":return b("React").jsx(k,{onclick:this.$25,children:i._("Hide Tour Info")});default:return null}};d.$27=function(){var a;a=(a=this.props.coverData)!=null?(a=a.cover_video)!=null?a.isFromParentPage:a:a;return!this.$4()||this.props.coreData.currentCoverType==="cover_video"&&a?null:b("React").jsx(k,{"data-testid":"cover_photo_remove_menu_item",onclick:this.$26,children:i._("Remove")})};d.render=function(){if(!this.props.coreData.canViewerEditProfile||!this.state.videoUploaderInitParams)return null;var a=b("React").jsxs(b("ReactXUIMenu"),{children:[this.$6(),this.$7(),this.$15(),this.$19(),this.$21(),this.$22(),this.$24(),this.$27()]});return b("React").jsxs(b("PopoverMenu.react"),{className:"_3ihv"+(this.props.coreData.shouldShowEditMenuForAdmins?"":" hidden_elem"),layerBehaviors:[b("ContextualDialogArrow")],menu:a,onBlur:this.$29,onFocus:this.$28,position:"below",children:[b("React").jsx(b("PagesCoverCameraButton.react"),{expanded:!this.$4()||this.state.shouldExpandMenu,label:this.$5(),shouldShowCoverSlideshowMenuOptionNux:this.props.coverData.cover_slideshow.isCoverSlideshowEnabled&&this.props.coverData.cover_slideshow.shouldShowMenuNux&&this.props.coreData.currentCoverType!=="cover_slideshow",shouldshowOnTourBadgeMenuOptionNux:this.props.coreData.eventTourBadgeInfo.shouldShowNux}),b("React").jsx(b("PagesCoverRemoveCoverConfirmationDialog.react"),{coreData:this.props.coreData,onToggle:this.$10,pageID:this.props.pageID,shown:this.state.showRemoveCoverConfirmationDialog}),b("React").jsx(b("PagesCoverVideoBrowserDialog.react"),{dialogShown:this.state.showCoverVideoBrowserDialog,isForSlideshow:!1,onConfirm:this.$11,onToggle:this.$9,pageID:this.props.pageID})]})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCoverPhotoStore",["FluxReduceStore","PagesCoverDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return{coverPhotoData:{focus:{height:0,width:0},id:"0",original:{height:0,width:0},uri:null},isEditable:!1,isLoading:!0,isPreviewMode:!1,isOverlayEnabled:!1,pageDescription:null,pageHasPhotos:!1,pageID:"0",pagePrimaryButton:null,renderedHeight:0,renderedWidth:0}};c.reduce=function(a,b){__p&&__p();var c,d=null;switch(b.type){case"new_cover_data":c=(c=b.data)!=null?(c=c.coverData)!=null?c.cover_photo:c:c;c!==null&&(d=babelHelpers["extends"]({},c,{isLoading:!1,isPreviewMode:!1}));break;case"photo_saved":case"photo_removed":d=babelHelpers["extends"]({},a,b.data,{isLoading:!1,isPreviewMode:!1});break;case"photo_uploading":case"cover_removing":d=babelHelpers["extends"]({},a,{isPreviewMode:!1});break;case"photo_previewing":d=babelHelpers["extends"]({},a,b.data,{isLoading:!1,isPreviewMode:!0});break;case"photo_saving":d=babelHelpers["extends"]({},a,b.data,{isLoading:!0,isPreviewMode:!1});break}return d||a};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("PagesCoverDispatcher"))}),null);
  __d("PagesCoverSlideshowStore",["AsyncRequest","CoverSlideshowUtil","FluxReduceStore","PagesCoverDispatcher","PagesCoverSlideshowActionCreator","PagesLogger","PagesLoggerEventEnum","PagesLoggerEventTargetEnum","XPagesCoverSlideshowEditableItemsAsyncController","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={pageID:0,isCoverSlideshowEnabled:!1,isCoverSlideshowVideoEnabled:!1,items:[],currentIndex:0,thumbnailHeight:0,thumbnailWidth:0,containerHeight:0,containerWidth:0,showLoadingScreen:!1,hasPendingChanges:!1,nuxTourSteps:[],shouldShowNUXTour:!1,isContentOptimizerOn:!1,shouldShowLoadingScreenOnPickerPlaceholder:!1,shouldShowMenuNux:!1,shouldShowEditSlideshowTooltip:!1,shouldAllowUploadingVideo:!0};var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record(a));c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$PagesCoverSlideshowStore6=new Set(),b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.getInitialState=function(){return new g()};d.getCurrentState=function(){return{pageID:this.getState().get("pageID"),isCoverSlideshowEnabled:this.getState().get("isCoverSlideshowEnabled"),isCoverSlideshowVideoEnabled:this.getState().get("isCoverSlideshowVideoEnabled"),items:this.getState().get("items"),currentIndex:this.getState().get("currentIndex"),thumbnailHeight:this.getState().get("thumbnailHeight"),thumbnailWidth:this.getState().get("thumbnailWidth"),containerHeight:this.getState().get("containerHeight"),containerWidth:this.getState().get("containerWidth"),showLoadingScreen:this.getState().get("showLoadingScreen"),hasPendingChanges:this.getState().get("hasPendingChanges"),nuxTourSteps:this.getState().get("nuxTourSteps"),shouldShowNUXTour:this.getState().get("shouldShowNUXTour"),isContentOptimizerOn:this.getState().get("isContentOptimizerOn"),shouldShowLoadingScreenOnPickerPlaceholder:this.getState().get("shouldShowLoadingScreenOnPickerPlaceholder"),shouldShowMenuNux:this.getState().get("shouldShowMenuNux"),shouldShowEditSlideshowTooltip:this.getState().get("shouldShowEditSlideshowTooltip"),shouldAllowUploadingVideo:this.getState().get("shouldAllowUploadingVideo")}};d.$PagesCoverSlideshowStore7=function(){if(this.$PagesCoverSlideshowStore3===void 0||this.$PagesCoverSlideshowStore3===null){var a=b("XPagesCoverSlideshowEditableItemsAsyncController").getURIBuilder().setFBID("page_id",this.getState().get("pageID")).setString("optimizer_status","on").getURI();new(b("AsyncRequest"))().setURI(a).setHandler(function(a){b("PagesCoverSlideshowActionCreator").loadPrefilledItems(a.payload)}).send();return null}else return this.$PagesCoverSlideshowStore3};d.$PagesCoverSlideshowStore8=function(a,c){for(var d=0;d<c.length;d++)if(b("CoverSlideshowUtil").getMediaId(c[d])===a)return c[d];return null};d.$PagesCoverSlideshowStore9=function(a,c,d){__p&&__p();if(!c)return a;var e=!1,f=a.map(function(a,f){if(b("CoverSlideshowUtil").getMediaId(a)===d){e=!0;return c}else return a});e||(f=Array.from(a),f.push(c));return f};d.$PagesCoverSlideshowStore10=function(a,b,c){var d=null;c<a.length?d=a.map(function(a,d){return c===d?b:a}):(d=Array.from(a),d.push(b),d);return d};d.$PagesCoverSlideshowStore11=function(a,b,c){var d=Array.from(a);if(b===c)return a;a=d.splice(b,1);d.splice(c,0,a[0]);return d};d.$PagesCoverSlideshowStore12=function(a,b){if(a<0)return 0;return a>=b?Math.max(b-1,0):a};d.$PagesCoverSlideshowStore13=function(){var a=b("XPagesCoverSlideshowEditableItemsAsyncController").getURIBuilder().setFBID("page_id",this.getState().get("pageID")).getURI();new(b("AsyncRequest"))().setURI(a).setHandler(function(a){b("PagesCoverSlideshowActionCreator").loadEditableItems(a.payload)}).send();return null};d.$PagesCoverSlideshowStore14=function(a){return Array.from(a).map(function(a){a.shouldFocusOnItem=!1;return a})};d.reduce=function(a,c){__p&&__p();var d,e=null,f=null,g=a.get("items"),h=a.get("currentIndex");switch(c.type){case"new_cover_data":d=(d=c.data)!=null?(d=d.coverData)!=null?d.cover_slideshow:d:d;d&&(a=a.set("items",d.items),a=a.set("isCoverSlideshowEnabled",d.isCoverSlideshowEnabled),a=a.set("isCoverSlideshowVideoEnabled",d.isCoverSlideshowVideoEnabled),a=a.set("thumbnailHeight",d.thumbnailHeight),a=a.set("thumbnailWidth",d.thumbnailWidth),a=a.set("containerHeight",d.containerHeight),a=a.set("containerWidth",d.containerWidth),this.$PagesCoverSlideshowStore1=Array.from(d.items),this.$PagesCoverSlideshowStore6.clear(),a=a.set("showLoadingScreen",!1),a=a.set("hasPendingChanges",!1),a=a.set("shouldShowNUXTour",d.shouldShowNUXTour),a=a.set("isContentOptimizerOn",d.isContentOptimizerOn),a=a.set("shouldShowMenuNux",d.shouldShowMenuNux),a=a.set("shouldShowEditSlideshowTooltip",d.shouldShowEditSlideshowTooltip),a=a.set("currentIndex",this.$PagesCoverSlideshowStore12(a.currentIndex,d.items.length)));a=a.set("shouldAllowUploadingVideo",!0);d=c.data.pageID;d&&(a=a.set("pageID",d));break;case"slideshow_edit":this.$PagesCoverSlideshowStore13();break;case"slideshow_photo_previewing":if(c.data){d=c.data;var i=d.itemData;d=d.previousKey;e=this.$PagesCoverSlideshowStore9(g,i,d);a=a.set("items",e);a=a.set("hasPendingChanges",!0);a=a.set("isContentOptimizerOn",!1)}a=a.set("shouldShowLoadingScreenOnPickerPlaceholder",!1);break;case"slideshow_photo_uploading":i=c.data.uploadingIndex;i<g.length?(f=babelHelpers["extends"]({},g[i],{shouldShowLoadingIndicator:!0}),e=this.$PagesCoverSlideshowStore10(g,f,i),a=a.set("items",e),a=a.set("currentIndex",i)):a=a.set("shouldShowLoadingScreenOnPickerPlaceholder",!0);a=a.set("hasPendingChanges",!0);break;case"slideshow_video_start_upload":if(c.data){d=c.data;i=d.url;var j=d.uploadingIndex;d=d.videoUploadTempID;d={itemType:"video",carouselMediaData:{photoData:null,videoData:{videoID:d,containerHeight:this.getState().get("containerHeight"),containerWidth:this.getState().get("containerWidth"),isForSlideshow:!0,offsetType:0,offsetValue:0,shouldCoverVideoLoop:!0,status:"uploading",progress:0}},thumbnailData:{thumbnailID:null,thumbnailURI:i,thumbnailHeight:this.getState().get("thumbnailHeight"),thumbnailWidth:this.getState().get("thumbnailWidth")},shouldFocusOnItem:!0};e=this.$PagesCoverSlideshowStore10(g,d,j);a=a.set("items",e)}a=a.set("shouldAllowUploadingVideo",!1);a=a.set("hasPendingChanges",!0);break;case"slideshow_video_uploading":if(c.data){i=c.data;d=i.previousKey;j=i.progress;i=this.$PagesCoverSlideshowStore8(d,g);!!i&&!!i.carouselMediaData.videoData&&(i.carouselMediaData.videoData.progress=j,i.carouselMediaData.videoData.status="uploading",e=this.$PagesCoverSlideshowStore9(g,i,d),a=a.set("items",e))}break;case"slideshow_video_encoding":if(c.data){j=c.data;i=j.previousKey;d=j.progress;j=this.$PagesCoverSlideshowStore8(i,g);!!j&&!!j.carouselMediaData.videoData&&(j.carouselMediaData.videoData.progress=d,j.carouselMediaData.videoData.status="encoding",e=this.$PagesCoverSlideshowStore9(g,j,i),a=a.set("items",e))}break;case"slideshow_video_encode_finished":if(c.data){d=c.data;j=d.videoData;i=d.previousKey;d=this.$PagesCoverSlideshowStore8(i,g);if(!d)break;d=babelHelpers["extends"]({},d.thumbnailData);j={itemType:"video",carouselMediaData:{photoData:null,videoData:j},thumbnailData:d,isNewUpload:!0,shouldFocusOnItem:!0};e=this.$PagesCoverSlideshowStore9(g,j,i);a=a.set("items",e)}break;case"slideshow_video_setting_confirmed":if(c.data){d=c.data;j=d.videoData;i=d.preferredThumbnailID;var k=d.preferredThumbnailURL,l=d.previousKey;d=d.shouldFocusOnItem;j.status="previewing";j={itemType:"video",carouselMediaData:{photoData:null,videoData:j},thumbnailData:{thumbnailID:i,thumbnailURI:k,thumbnailHeight:this.getState().get("thumbnailHeight"),thumbnailWidth:this.getState().get("thumbnailWidth")},shouldFocusOnItem:d};e=this.$PagesCoverSlideshowStore9(g,j,l);a=a.set("shouldAllowUploadingVideo",!0);a=a.set("items",e);a=a.set("hasPendingChanges",!0);a=a.set("isContentOptimizerOn",!1)}break;case"slideshow_video_repositioned":if(c.data){i=c.data;k=i.itemRepositionedIndex;d=i.offsetType;j=i.offsetValue;f=babelHelpers["extends"]({},g[k]);(f.carouselMediaData.videoData.offsetType!==d||f.carouselMediaData.videoData.offsetValue!==j)&&(a=a.set("hasPendingChanges",!0));f.carouselMediaData.videoData.offsetType=d;f.carouselMediaData.videoData.offsetValue=j;e=this.$PagesCoverSlideshowStore10(g,f,k);a=a.set("items",e)}break;case"slideshow_video_uploading_failed":case"slideshow_video_encoding_failed":a=a.set("shouldAllowUploadingVideo",!0);break;case"slideshow_change_carousel_index":a=a.set("currentIndex",this.$PagesCoverSlideshowStore12(c.data.currentIndex,a.get("items").length));e=this.$PagesCoverSlideshowStore14(g);a=a.set("items",e);break;case"slideshow_item_repositioned":l=c.data.itemRepositionedIndex;this.$PagesCoverSlideshowStore6.has(l)||(this.$PagesCoverSlideshowStore6.add(l),b("PagesLogger").log(a.get("pageID"),b("PagesLoggerEventEnum").DRAG,b("PagesLoggerEventTargetEnum").PAGE_COVER_SLIDESHOW,null,[],{event_name:"reposition_slideshow_item"}),a=a.set("hasPendingChanges",!0));break;case"slideshow_photo_removed":i=c.data.removedIndex;e=Array.from(g);e.splice(i,1);a=a.set("items",e);a=a.set("hasPendingChanges",!0);a=a.set("isContentOptimizerOn",!1);(h>i||h>=e.length)&&(a=a.set("currentIndex",this.$PagesCoverSlideshowStore12(h-1,e.length)));break;case"slideshow_editing_cancelled":e=Array.from(this.$PagesCoverSlideshowStore1);a=a.set("items",e);a=a.set("hasPendingChanges",!1);a=a.set("shouldAllowUploadingVideo",!0);a=a.set("currentIndex",this.$PagesCoverSlideshowStore12(Math.min(e.length-1,h),e.length));this.$PagesCoverSlideshowStore6.clear();break;case"slideshow_saving":a=a.set("showLoadingScreen",!0);a=a.set("hasPendingChanges",!1);a=a.set("shouldAllowUploadingVideo",!0);break;case"slideshow_change_order":d=c.data;j=d.fromIndex;f=d.toIndex;e=this.$PagesCoverSlideshowStore11(g,j,f);a=a.set("items",e);a=a.set("hasPendingChanges",!0);a=a.set("currentIndex",this.$PagesCoverSlideshowStore12(f,e.length));a=a.set("isContentOptimizerOn",!1);break;case"slideshow_nux_tour_element_loaded":if(a.get("shouldShowNUXTour")){k=c.data;l=k.context;i=k.step;h=k.description;d=k.position;(this.$PagesCoverSlideshowStore4===void 0||this.$PagesCoverSlideshowStore4===null)&&(this.$PagesCoverSlideshowStore4=[]);(this.$PagesCoverSlideshowStore5===void 0||this.$PagesCoverSlideshowStore5===null)&&(this.$PagesCoverSlideshowStore5=new Set());this.$PagesCoverSlideshowStore5.has(i)||(this.$PagesCoverSlideshowStore4.splice(i,0,{context:l,description:h,position:d}),this.$PagesCoverSlideshowStore5.add(i),a=a.set("nuxTourSteps",this.$PagesCoverSlideshowStore4))}break;case"slideshow_nux_tour_finished":a=a.set("shouldShowNUXTour",!1);break;case"slideshow_toggle_content_switcher":g=!!c.data;g?(this.$PagesCoverSlideshowStore2=a.get("items"),e=this.$PagesCoverSlideshowStore7(),e!==null&&(a=a.set("items",e))):this.$PagesCoverSlideshowStore2===void 0||this.$PagesCoverSlideshowStore2===null?this.$PagesCoverSlideshowStore2=a.get("items"):a=a.set("items",this.$PagesCoverSlideshowStore2);a=a.set("isContentOptimizerOn",g);a=a.set("hasPendingChanges",!0);break;case"slideshow_prefilled_photo_loaded":j=c.data.prefilledItems;this.$PagesCoverSlideshowStore3=j;a=a.set("items",j);break;case"slideshow_editable_item_loaded":f=c.data.editableItems;a=a.set("items",f);break;default:return a}return a};return c}(b("FluxReduceStore"));c.__moduleID=e.id;e.exports=new c(b("PagesCoverDispatcher"))}),null);
  __d("PagesCoverTrailerStore",["FluxReduceStore","PagesCoverDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return{showsData:{title:""},viewerCoverTrailerState:"watch_trailer",isAdmin:!1,isAutoplayGated:!1,isImmersiveShowPage:!1,isShowPageNewCover:!1}};c.reduce=function(a,b){var c=null;switch(b.type){case"new_cover_data":b=(b=b.data)!=null?(b=b.coverData)!=null?b.cover_trailer:b:b;b!==null&&(c=babelHelpers["extends"]({},b),this.$PagesCoverTrailerStore1=c);break}return c||a};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("PagesCoverDispatcher"))}),null);
  __d("PagesCoverVideoStore",["FluxReduceStore","PagesCoverDispatcher"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return{videoID:"",status:"published",isViewerAdmin:!1,shouldShowChooseFromCoverVideoMenu:!1,isForSlideshow:!1,isFromParentPage:!1,isParentLocationPage:!1,shouldCoverVideoLoop:!1,minPlayableDurationInSec:20,maxPlayableDurationInSec:120,containerHeight:312,containerWidth:820,thumbnails:[],offsetType:0,offsetValue:0}};c.reduce=function(a,b){__p&&__p();var c,d=null;switch(b.type){case"new_cover_data":this.$PagesCoverVideoStore1=b.data.pageID;c=(c=b.data)!=null?(c=c.coverData)!=null?c.cover_video:c:c;c&&(d=babelHelpers["extends"]({},a,c,{isForSlideshow:!1,playerOrigin:"page_timeline"}));break;case"video_repositioned":c=b.data;var e=c.offsetType;c=c.offsetValue;d=babelHelpers["extends"]({},a,{offsetType:e,offsetValue:c});break;case"video_start_upload":d=babelHelpers["extends"]({},a,{status:"uploading",progress:0,thumbnails:b.data.thumbnails});break;case"video_uploading":d=babelHelpers["extends"]({},a,{status:"uploading",progress:b.data.progress});break;case"video_encoding":d=babelHelpers["extends"]({},a,{status:"encoding",progress:b.data.progress});break;case"video_previewing":d=babelHelpers["extends"]({},a,b.data,{status:"previewing"});break;case"video_choosing_thumbnail":d=babelHelpers["extends"]({},a,b.data,{status:"choosing_thumbnail"});break;case"video_publishing":d=babelHelpers["extends"]({},a,{status:"publishing"});break;case"video_published":d=babelHelpers["extends"]({},a,{status:"published"},b.data);break;case"video_cancelling":default:d=a}return d||a};return b}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("PagesCoverDispatcher"))}),null);
  __d("PagesLiveCoverVideoStore",["FluxReduceStore","PagesCoverDispatcher","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={videoID:null,canEnable:!1,isEnabled:!1,renderedWidth:812};var g=function(b){babelHelpers.inheritsLoose(a,b);function a(){return b.apply(this,arguments)||this}return a}(b("immutable").Record(a));c=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getInitialState=function(){return new g()};c.reduce=function(a,b){switch(b.type){case"new_cover_data":b=b.data.coverData.cover_live_video;a=new g(b);return a;case"live_video_enable":a=a.set("isEnabled",!0);return a;case"live_video_disable":a=a.set("isEnabled",!1);return a;default:return a}};return b}(b("FluxReduceStore"));c.__moduleID=e.id;e.exports=new c(b("PagesCoverDispatcher"))}),null);
  __d("PagesCoverContainer.react",["cx","CenteredContainer.react","FluxContainer","ModernWatchQueueFollowedShowTapMutation","PagesCoverComponent.react","PagesCoverCoreStore","PagesCoverDispatcher","PagesCoverEditMenu.react","PagesCoverPhotoStore","PagesCoverSlideshowStore","PagesCoverTrailerStore","PagesCoverVideoStore","PagesLiveCoverVideoStore","React","RelayFBEnvironment","XUISpinner.react"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);c.getStores=function(){return[b("PagesCoverCoreStore"),b("PagesLiveCoverVideoStore"),b("PagesCoverPhotoStore"),b("PagesCoverSlideshowStore"),b("PagesCoverTrailerStore"),b("PagesCoverVideoStore")]};c.calculateState=function(){return{coreData:b("PagesCoverCoreStore").getState(),coverData:{cover_live_video:b("PagesLiveCoverVideoStore").getState(),cover_photo:b("PagesCoverPhotoStore").getState(),cover_slideshow:b("PagesCoverSlideshowStore").getCurrentState(),cover_trailer:b("PagesCoverTrailerStore").getState(),cover_video:b("PagesCoverVideoStore").getState()}}};function c(c){__p&&__p();var d;d=a.call(this,c)||this;b("PagesCoverDispatcher").explicitlyRegisterStores([b("PagesCoverCoreStore"),b("PagesLiveCoverVideoStore"),b("PagesCoverPhotoStore"),b("PagesCoverVideoStore"),b("PagesCoverTrailerStore"),b("PagesCoverSlideshowStore")]);b("PagesCoverDispatcher").dispatch({type:"new_cover_data",data:c});var e=b("PagesCoverTrailerStore").getState();if(!e||!e.isShowPageNewCover)return babelHelpers.assertThisInitialized(d);e=e.showsFeedbackData;if(e&&e.actorId){c=c.pageID;b("ModernWatchQueueFollowedShowTapMutation").commit(b("RelayFBEnvironment"),{pageID:c,actorID:e.actorId})}return d}var d=c.prototype;d.render=function(){if(!this.state.coreData.hasCoverSet&&!this.state.coreData.canViewerEditProfile)return null;var a=this.state.coreData.shouldShowLoadingOverlay?b("React").jsx("div",{className:"_b1w",children:b("React").jsx(b("CenteredContainer.react"),{fullHeight:!0,horizontal:!0,vertical:!0,children:b("React").jsx(b("XUISpinner.react"),{background:"light",size:"large"})})}):null,c=this.props.isInSettingsPage===!0;return b("React").jsxs("div",{className:"_5_yy",children:[b("React").jsx(b("PagesCoverComponent.react"),{coverData:this.state.coverData,currentCoverType:this.state.coreData.currentCoverType,isEditMode:this.state.coreData.isEditMode,isInSettingsPage:c,isMigratedShowPage:this.props.isMigratedShowPage,pageID:this.props.pageID,referrer:this.props.referrer}),b("React").jsx(b("PagesCoverEditMenu.react"),babelHelpers["extends"]({pageID:this.props.pageID},this.state)),a]})};return c}(b("React").PureComponent);e.exports=b("FluxContainer").create(a)}),null);
  __d("PagesBlueCrossAddStoryButton.react",["ix","cx","ActorURI","AsyncRequest","Image.react","PageContentTabLoadingDialog","React","ShimButton.react","XPagesComposerDialogController","asset"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=g("489388"),j=g("624751");function k(a){switch(a){case"small":return i;default:return j}}a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.$2=function(){c.$1()},b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.$1=function(){var a=this.props.pageID;if(a===null||a===void 0)return;b("PageContentTabLoadingDialog").show();var c=b("XPagesComposerDialogController").getURIBuilder().setString("entry_point","pages_profile_pic_add_story").getURI();new(b("AsyncRequest"))().setURI(b("ActorURI").create(c,a)).setHandler(function(){b("PageContentTabLoadingDialog").hide()}).send()};d.render=function(){var a=this.props,c=a.borderWidth,d=a.bottomRightMargin;a=a.size;d="_6usj"+(d==="margin-4"?" margin-4":"")+(d==="margin-8"?" margin-8":"")+(c==="thin"?" border-thin":"")+(c==="thick"?" border-thick":"")+(a==="small"?" size-small":"")+(a==="normal"?" size-normal":"");return b("React").jsx(b("ShimButton.react"),{className:"_6uxp",onClick:this.$2,children:b("React").jsx("div",{className:d,children:b("React").jsx(b("Image.react"),{src:k(a)})})})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCircularProfilePictureOverlay.react",["ix","cx","fbt","FDSText.react","Image.react","Link.react","React","XPhotoPermalinkController","asset"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=i._("View Photo"),k=i._("Update"),l=i._("Add a Picture"),m=i._("Options");function n(a){if(!a.canViewerEdit){var c;return(c=b("React")).jsxs(c.Fragment,{children:[c.jsx("div",{children:c.jsx(b("Image.react"),{src:g("504208")})}),c.jsx(b("FDSText.react"),{color:"white",size:"body3",weight:"bold",children:j})]})}return a.showStoryRing?b("React").jsxs(b("React").Fragment,{children:[b("React").jsx("div",{children:b("React").jsx(b("Image.react"),{src:g("492300")})}),b("React").jsx("div",{className:"_6y7_",children:b("React").jsx(b("FDSText.react"),{color:"white",size:"body3",weight:"bold",children:m})}),b("React").jsx("div",{className:"_6y1q",children:b("React").jsx(b("Image.react"),{src:g("483253")})})]}):b("React").jsxs(b("React").Fragment,{children:[b("React").jsx("div",{children:b("React").jsx(b("Image.react"),{src:g("681203")})}),b("React").jsx(b("FDSText.react"),{color:"white",size:"body3",weight:"bold",children:a.hasProfilePhoto?k:l})]})}function a(a){__p&&__p();var c=a.canViewerEdit,d=a.profilePictureData,e=a.showStoryRing;a=a.onOverlayClick;if(!e&&!c)return null;var f=d.photoID;d=d.photoSourcePageID;e=b("React").jsx("div",{className:"_6v9b",children:b("React").jsx("div",{className:"_6v8o"+(e?" size-small":"")+(e?"":" size-large"),children:b("React").jsx("div",{className:"_6w7n",children:b("React").jsx(n,{canViewerEdit:c,hasProfilePhoto:f!==null,showStoryRing:e})})})});if(!c){c=b("XPhotoPermalinkController").getURIBuilder().setInt("photo_id",f).setString("vanity",d).getURI();return b("React").jsx(b("Link.react"),{"aria-label":i._("Profile picture"),className:"_2dgj",href:c,rel:"theater",children:e})}return b("React").jsx(b("Link.react"),{"aria-label":i._("Update menu"),className:"_2dgj",onClick:a,children:e})}e.exports=a}),null);
  __d("PagesProfilePictureLink.react",["cx","fbt","Link.react","React","VideoData","XPhotoPermalinkController","XVideoPermalinkController"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){var c=a.children,d=a.loading,e=a.photoSourcePageID,f=a.photoID,g=a.videoData;g=g!==null?new(b("VideoData"))(g).getVideoID():null;if(f===null&&g===null||d)return b("React").Children.only(c);d=null;g!==null?d=b("XVideoPermalinkController").getURIBuilder().setString("vanity",e).setInt("video_id",g).getURI():d=b("XPhotoPermalinkController").getURIBuilder().setInt("photo_id",f).setString("vanity",e).getURI();return b("React").jsx(b("Link.react"),{"aria-label":h._("Profile picture"),className:"_2dgj",href:d,rel:"theater",children:a.children})};e.exports=a}),null);
  __d("PagesProfilePictureStoryEditMenu.react",["cx","fbt","ActorURI","FBStoriesActions","FBStoriesStore","FBStoriesViewerHelper","FDSText.react","FileInput.react","FileInputUploader","Link.react","PagesProfilePictureActions","React","ReactDOM","SUIActionMenu.react","SUIBusinessTheme","XPagesProfilePictureUploadAsyncController","XPhotoBrowserDialogController","XPhotoPermalinkController","XProfilePicCameraPhotoController","XProfilePicMenuDialogEditThumbnailController","XProfilePicRemoveDialogController"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("PagesProfilePictureActions").updateProfilePicture,j=h._("Choose From Photos"),k=h._("Take Photo"),l=h._("Upload Photo"),m=h._("Edit Thumbnail"),n=h._("Remove"),o=h._("Update Profile Photo"),p=h._("Add Profile Photo"),q=h._("View Profile Photo"),r=h._("View Story"),s=h._("Profile picture"),t=h._("Page stories");function u(a,b){return b!==a}function v(a){return b("React").jsx(b("FileInput.react"),{accept:"image/*",containerClassName:"_6xfx","data-testid":"profile_picture_upload_menu_item",display:"inline-block",name:"profile_pic",onChange:a.onUploadPhoto,ref:a.fileInputRef,children:b("React").jsx(b("Link.react"),{className:"_6xfx",href:"#",children:b("React").jsx(b("FDSText.react"),{color:"secondary",size:"body3",children:l})})})}function w(a){return b("React").jsx(b("Link.react"),{ajaxify:a.uri,className:"_6xfx",href:"#",rel:"dialog",children:b("React").jsx(b("FDSText.react"),{color:"secondary",size:"body3",children:a.labelText})})}function x(a){a=a.profilePictureData;var c=a.pageID,d=a.photoID;a=a.photoSourcePageID;d=b("XPhotoPermalinkController").getURIBuilder().setInt("photo_id",d).setString("vanity",a).getURI();return b("React").jsx(b("Link.react"),{"aria-label":s,className:"_6xfx",href:b("ActorURI").create(d,c),rel:"theater",children:b("React").jsx(b("FDSText.react"),{color:"secondary",size:"body3",weight:"bold",children:q})})}function y(a){return b("React").jsx(b("Link.react"),{"aria-label":t,className:"_6xfx",onClick:a.onViewStoryClick,children:b("React").jsx(b("FDSText.react"),{color:"secondary",size:"body3",weight:"bold",children:r})})}function z(a,c){return!a?null:b("XPhotoBrowserDialogController").getURIBuilder().setEnum("endpoint",4).setEnum("generator",1).setString("data","pages_profile_picture").setInt("id",c).getURI()}function A(a){var c=b("XProfilePicCameraPhotoController").getURIBuilder().setInt("profile_id",a).setString("source","timeline").getURI();return b("ActorURI").create(c,a)}function B(a){var c=a.pageID,d=a.photoID,e=a.photoIsSquare;a=a.photoSourcePageID;if(d===null||e||u(c,a))return null;d=b("XProfilePicMenuDialogEditThumbnailController").getURIBuilder().setFBID("profile_id",c).getURI();return b("ActorURI").create(d,c)}function C(a){var c=a.pageID,d=a.photoID;a=a.photoSourcePageID;if(d===null||u(c,a))return null;d=b("XProfilePicRemoveDialogController").getURIBuilder().setInt("profile_id",c).getURI();return b("ActorURI").create(d,c)}function D(a,c,d,e){__p&&__p();var f=c.pageID,g=c.pageHasPhotos,h=[];g=z(g,f);g!==null&&h.push({type:"item",label:b("React").jsx(w,{labelText:j,uri:g}),onClick:d});h.push({type:"item",label:b("React").jsx(w,{labelText:k,uri:A(f)}),onClick:d});h.push({type:"item",label:b("React").jsx(v,{fileInputRef:a,onUploadPhoto:e}),onClick:function(){}});g=B(c);g!==null&&h.push({type:"item",label:b("React").jsx(w,{labelText:m,uri:g}),onClick:d});f=C(c);f!==null&&h.push({type:"item",label:b("React").jsx(w,{labelText:n,uri:f}),onClick:d});return h}a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){__p&&__p();var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$2=b("React").createRef(),d.$3=function(){var a=d.props,c=a.profilePictureData;a=a.onMenuClick;c=c.pageID;i();c=b("ActorURI").create(b("XPagesProfilePictureUploadAsyncController").getURIBuilder().setFBID("page_id",c).getURI(),c);new(b("FileInputUploader"))(b("ReactDOM").findDOMNode(d.$2.current)).setURI(c).setAllowCrossOrigin(!0).send();a()},d.$4=function(){var a=d.props.bucketID;if(a!==null&&a!==void 0){a=b("FBStoriesActions").userSelectedBucket(a)&&b("FBStoriesStore").getThreadCountForSelectedBucket()>0;a&&b("FBStoriesViewerHelper").toggleViewer(!0,"PAGES_PROFILE_PICTURE")}},d.$5=function(a){d.$1=a},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.componentDidMount=function(){this.$1&&this.$1.focus()};d.render=function(){var a=this.props,c=a.profilePictureData,d=a.showCircularLoader,e=a.showStoryRing,f=a.onMenuClick,g=a.onMouseEnterMenu,h=a.onMouseLeaveMenu;a=a.onOverlayBlur;var i=c.photoID,j=[],k=D(this.$2,c,f,this.$3),l=b("React").jsx(b("SUIActionMenu.react"),{items:k,theme:b("SUIBusinessTheme")});e&&(j.push({type:"item",label:b("React").jsx(y,{onViewStoryClick:this.$4}),onClick:f}),i!==null&&j.push({type:"item",label:b("React").jsx(x,{profilePictureData:c}),onClick:f}),j.push({type:"group",label:i!==null?o:p,items:k}),l=b("React").jsx(b("SUIActionMenu.react"),{items:j,theme:b("SUIBusinessTheme")}));return b("React").jsx("div",{className:"_6xgp"+(!e&&!d?" small-padding":"")+(e||d?" large-padding":""),onBlur:a,onMouseEnter:g,onMouseLeave:h,ref:this.$5,tabIndex:"0",children:l})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesProfilePictureStoryLink.react",["cx","fbt","FBStoriesActions","FBStoriesStore","FBStoriesViewerHelper","Link.react","React"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=h._("Page stories");a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){b("FBStoriesActions").userSelectedBucket(d.props.bucketID)&&b("FBStoriesStore").getThreadCountForSelectedBucket()>0&&b("FBStoriesViewerHelper").toggleViewer(!0,"PAGES_PROFILE_PICTURE")},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){return b("React").jsx(b("Link.react"),{"aria-label":i,className:"_2dgj",onClick:this.$1,children:this.props.children})};return c}(b("React").PureComponent);e.exports=a}),null);
  __d("PagesCircularProfilePicture.react",["cx","Image.react","PagesBlueCrossAddStoryButton.react","PagesCircularProfilePictureOverlay.react","PagesProfilePictureActions","PagesProfilePictureLink.react","PagesProfilePictureStoryEditMenu.react","PagesProfilePictureStoryLink.react","PagesStoryCreationStatusTypes","ProfileHeaderSpinner.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("PagesProfilePictureActions").updateProfilePictureStory,i=172,j=156;function k(a){var c=a.canViewerEdit,d=a.overlayShown,e=a.profilePictureData,f=a.showCircularLoader,g=a.showStoryRing,h=a.storyBucket,k=a.onMouseEnterProfilePicture,l=a.onMouseLeaveProfilePicture;a=a.onOverlayClick;var m=e.loading,n=e.uri,o=f||g?j:i;n=b("React").jsx("div",{className:"_6tay",style:{width:o,height:o},children:b("React").jsx(b("Image.react"),{className:"_6tb5"+(m?" _179t":""),height:o,src:n,width:o})});return b("React").jsxs("div",{className:"_6taw",children:[b("React").jsxs("div",{className:"_6tax",onMouseEnter:k,onMouseLeave:l,children:[g?b("React").jsx(b("PagesProfilePictureStoryLink.react"),{bucketID:h.bucketID,children:n}):b("React").jsx(b("PagesProfilePictureLink.react"),babelHelpers["extends"]({},e,{children:n})),!m&&d&&b("React").jsx(b("PagesCircularProfilePictureOverlay.react"),{canViewerEdit:c,onOverlayClick:a,profilePictureData:e,showStoryRing:g||f})]}),b("React").jsx(b("ProfileHeaderSpinner.react"),{shown:m})]})}c=function(c){__p&&__p();babelHelpers.inheritsLoose(d,c);function d(){__p&&__p();var b,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(b=d=c.call.apply(c,[this].concat(f))||this,d.state={menuShown:!1,mouseOnMenu:!1,overlayShown:((a=d.props)!=null?(a=a.profilePictureData)!=null?a.photoID:a:a)===null},d.$1=function(){d.setState({overlayShown:!0})},d.$2=function(){var a;((a=d.props)!=null?(a=a.profilePictureData)!=null?a.photoID:a:a)!==null&&d.setState({overlayShown:!1})},d.$3=function(){d.setState({mouseOnMenu:!0})},d.$4=function(){d.setState({mouseOnMenu:!1})},d.$5=function(){var a=d.state.menuShown;a&&d.$4();d.setState({menuShown:!a})},d.$6=function(a){__p&&__p();var b;b=(b=a)!=null?b.relatedTarget:b;a=(a=a)!=null?a.currentTarget:a;if(b instanceof HTMLElement&&a instanceof HTMLElement){b=b&&b.parentElement;var c=b&&b.parentElement;if(b===a||c===a)return}((b=d.props)!=null?(b=b.profilePictureData)!=null?b.photoID:b:b)!==null&&!d.state.mouseOnMenu&&!d.state.overlayShown&&d.setState({menuShown:!1,mouseOnMenu:!1,overlayShown:!1})},b)||babelHelpers.assertThisInitialized(d)}var e=d.prototype;e.shouldComponentUpdate=function(a){__p&&__p();var c,d;d=(d=this.props)!=null?(d=d.profilePictureData)!=null?d.profilePicStoryData:d:d;c=(c=a)!=null?(c=c.profilePictureData)!=null?c.profilePicStoryData:c:c;if(!c)return!0;c=c.get("storyCreationStatus");if(c===b("PagesStoryCreationStatusTypes").STORY_CREATION_SUCCESS){d=!!d&&d.get("storyCreationStatus");d=d===b("PagesStoryCreationStatusTypes").STORY_CREATION_STARTED&&c!==b("PagesStoryCreationStatusTypes").STORY_CREATION_STARTED;if(d){return((c=a)!=null?(c=c.storyBucket)!=null?c.latestThreadCreationTime:c:c)!==((d=this.props)!=null?(d=d.storyBucket)!=null?d.latestThreadCreationTime:d:d)}else return!!a.storyBucket}return!0};e.componentDidUpdate=function(a){!a.storyBucket&&!!this.props.storyBucket&&h(null)};e.render=function(){var a,c,d=this.props,e=d.profilePictureData;d=d.storyBucket;c=(c=e)!=null?c.profilePicStoryData:c;a=!!((a=e)!=null?a.editable:a);c=!!c&&c.get("storyCreationStatus")===b("PagesStoryCreationStatusTypes").STORY_CREATION_STARTED;var f=this.state,g=f.overlayShown;f=f.menuShown;return b("React").jsxs(b("React").Fragment,{children:[b("React").jsxs("div",{className:"_6taw"+(!!d||c?" _6tv-":"")+(c?" _6zia":"")+(!!d&&d.hasUnseenThreads?" _6two":""),children:[b("React").jsx(k,{canViewerEdit:a,onMouseEnterProfilePicture:this.$1,onMouseLeaveProfilePicture:this.$2,onOverlayClick:this.$5,overlayShown:g||f,profilePictureData:e,showCircularLoader:c,showStoryRing:!!d,storyBucket:d}),c&&b("React").jsx("div",{className:"_6zg7"}),a?b("React").jsx(b("PagesBlueCrossAddStoryButton.react"),{bottomRightMargin:!!d||c?"margin-4":"margin-8",pageID:e.pageID,size:"normal"}):null]}),f&&b("React").jsx(b("PagesProfilePictureStoryEditMenu.react"),{bucketID:d?d.bucketID:null,onMenuClick:this.$5,onMouseEnterMenu:this.$3,onMouseLeaveMenu:this.$4,onOverlayBlur:this.$6,profilePictureData:e,showCircularLoader:c,showStoryRing:!!d})]})};return d}(b("React").Component);e.exports=c}),null);
  __d("PagesCircularProfilePictureContainer.react",["CurrentUser","FBStoriesActions","FBStoriesDispatcher","FBStoriesStore","FBStoriesViewerBucketQueryWebGraphQLQuery","FluxContainer","PagesCircularProfilePicture.react","PagesStoryCreationStatusTypes","React","WebGraphQL","fbStoriesRootSelectors","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}c.getStores=function(){return[b("FBStoriesStore")]};c.calculateState=function(){var a=b("FBStoriesStore").getState();return{storyBucketDescriptors:b("fbStoriesRootSelectors").bucketDescriptors(a)}};var d=c.prototype;d.componentDidMount=function(){b("FBStoriesDispatcher").explicitlyRegisterStores([b("FBStoriesStore")]);var a=this.state.storyBucketDescriptors;a=a&&a[0];a||this.$1()};d.componentDidUpdate=function(a,c){a=this.state.storyBucketDescriptors;a=a&&a[0];c=c.storyBucketDescriptors&&c.storyBucketDescriptors[0];!!c&&!a&&this.$1();c=(c=this.props)!=null?(c=c.profilePictureData)!=null?c.profilePicStoryData:c:c;c=!!c&&c.get("storyCreationStatus");c===b("PagesStoryCreationStatusTypes").STORY_CREATION_SUCCESS&&!a&&this.$1()};d.componentWillUnmount=function(){b("FBStoriesActions").resetStore()};d.$1=function(){var a=this,c;c=(c=this.props)!=null?(c=c.profilePictureData)!=null?c.profilePicStoryData:c:c;c=c&&c.get("bucketID");if(c===null||c===void 0)return;c=new(b("FBStoriesViewerBucketQueryWebGraphQLQuery"))({bucketID:c,threadCount:100});b("promiseDone")(b("WebGraphQL").exec(c),function(b){return a.$2(b)},function(b){return a.$3(b)})};d.$2=function(a){a=(a=a)!=null?a.node:a;if(a===null||a===void 0)return;b("FBStoriesActions").loadData(b("CurrentUser").getName(),b("CurrentUser").getID(),null,null,[a])};d.$3=function(a){};d.render=function(){var a=this.state.storyBucketDescriptors;return b("React").jsx(b("PagesCircularProfilePicture.react"),{profilePictureData:this.props.profilePictureData,storyBucket:a&&a[0]})};return c}(b("React").PureComponent);e.exports=b("FluxContainer").create(a)}),null);
  __d("PagesProfilePictureStore",["FluxReduceStore","PagesHeaderDispatcher","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return{currentCoverType:"cover_photo",editable:!1,loading:!1,modules:{PagesProfilePictureEditMenu:null},pageHasPhotos:!1,pageID:"0",photoID:null,photoIsSquare:!0,photoSourcePageID:"0",size:0,uri:null,videoData:null,isShowPageProfileInHeader:!1,profilePicStoryData:null}};d.reduce=function(a,c){__p&&__p();var d;switch(c.type){case"profile_picture_data":return babelHelpers["extends"]({},a,c.data,{profilePicStoryData:b("immutable").fromJS((d=c)!=null?(d=d.data)!=null?d.profilePicStoryData:d:d)});case"profile_picture_update":return babelHelpers["extends"]({},a,c.data);case"profile_picture_story_uploading":var e;d=a.profilePicStoryData;if(!d)return babelHelpers["extends"]({},a);e=(e=c)!=null?(e=e.data)!=null?e.profilePicStoryData:e:e;d=d.set("storyCreationStatus",!!e&&e.get("storyCreationStatus"));return babelHelpers["extends"]({},a,c.data,{profilePicStoryData:d})}return a};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("PagesHeaderDispatcher"))}),null);
  __d("PagesProfilePictureContainer.react",["FluxContainer","PagesCircularProfilePictureContainer.react","PagesHeaderDispatcher","PagesProfilePictureStore","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);c.getStores=function(){return[b("PagesProfilePictureStore")]};c.calculateState=function(){return b("PagesProfilePictureStore").getState()};function c(c){c=a.call(this,c)||this;b("PagesHeaderDispatcher").explicitlyRegisterStore(b("PagesProfilePictureStore"));b("PagesHeaderDispatcher").dispatch({data:c.props,type:"profile_picture_data"});return c}var d=c.prototype;d.render=function(){return b("React").jsx(b("PagesCircularProfilePictureContainer.react"),{profilePictureData:this.state})};return c}(b("React").PureComponent);e.exports=b("FluxContainer").create(a)}),null);
  __d("PagesUsername.react",["ix","cx","fbt","BootloadedComponent.react","ChatOpenTabEventLogger","FantaTabActions","Image.react","JSResource","Link.react","LoadingDialog.react","MercuryIDs","PageContentTabMessageOwnerDialog","React","TooltipLink.react","fbglyph"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(b){b=a.call(this,b)||this;b.state={showDialog:!1};return b}var d=c.prototype;d.render=function(){__p&&__p();var a=this,c=this.props.username;if(c!=null)return this.props.isMessagingEnabled?b("React").jsx(b("TooltipLink.react"),{className:"_2wmb",href:"#",onClick:this.$1(),position:"below",tooltip:this.$2(c),children:b("React").jsxs("span",{children:[b("React").jsx(b("Image.react"),{className:"_3mj1",src:g("123858")}),"@"+c]})}):b("React").jsx(b("TooltipLink.react"),{className:"_2wmb",href:"#",position:"below",tooltip:this.$2(c),children:"@"+c});if(!this.props.editable)return null;var d=null;this.state.showDialog&&(d=b("React").jsx(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("PageUsernameEditDialog.react").__setRef("PagesUsername.react"),bootloadPlaceholder:b("React").jsx(b("LoadingDialog.react"),{}),existingUsername:c,pageID:this.props.pageID,pageName:this.props.name,profilePictureSrc:this.props.usernameEditDialogProfilePictureURI,onDialogToggle:function(b){a.setState({showDialog:b})}}));return b("React").jsxs("div",{children:[b("React").jsx(b("Link.react"),{className:"_2wmb",onClick:function(){a.setState({showDialog:!0})},children:i._("Create Page \u0040Username")}),d]})};d.$2=function(a){return this.props.editable&&!this.props.isMessagingEnabled?i._("People can search for {username of a Page} to find your Page easily. You can change your \u0040username in the Page Info section.",[i._param("username of a Page","@"+a)]):this.props.isMessagingEnabled&&this.props.editable?i._("Send {username of a Page} a message.",[i._param("username of a Page","@"+a)]):i._("Search for {username of a Page} on Facebook or in Messenger to find this Page easily.",[i._param("username of a Page","@"+a)])};d.$1=function(){__p&&__p();var a=this,c=this.props.isMessagingEnabled&&!this.props.showModal,d=this.props.isMessagingEnabled&&this.props.showModal;if(d)return function(c){b("PageContentTabMessageOwnerDialog").show(a.props.name,a.props.pageID)};else if(c)return function(c){c=b("MercuryIDs").getThreadIDFromUserID(a.props.pageID);b("FantaTabActions").openTab(c);b("ChatOpenTabEventLogger").logUserClickOpen("page_username",a.props.pageID)};return null};return c}(b("React").Component);e.exports=a}),null);