You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
164 KiB
62 lines
164 KiB
/*!CK:1310986955!*//*1427086765,*/
|
|
|
|
if (self.CavalryLogger) { CavalryLogger.start_js(["siyRJ"]); }
|
|
|
|
__d("TimelineAppSectionConstants",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports={collectionTabKeyToAppTabKey:{friends_recent:"friends",friends_all:"friends",friends_mutual:"friends",photos_of:"photos",photos_all:"photos",photos_albums:"photos",likes_recent:null,info_all:"about",music_my_music:"music",music_favs:"music",music_playlists:"music",books_read:"books",books_favorite:"books",books_want:"books",recent_places:null,fitness_overview:"fitness",friends_featured:null,places_want:null,info_contact:null,fitness_running:"fitness",fitness_cycling:"fitness",friends_followers:"friends",friends_following:"friends",music_radio:"music",info_history:null,recent_games:"games",products_want:null,photos_archive:"photos",notes_my_notes:"notes",notes_drafts:"notes",notes_about_me:"notes",likes_other:"likes",video_movies_watch:"movies",video_tv_shows_watch:"tv",music_saved:"music",video_movies_want:"movies",video_tv_shows_want:"tv",video_movies_favorite:"movies",video_tv_shows_favorite:"tv",friends_high_school:"friends",friends_college:"friends",friends_work:"friends",friends_suggested:"friends",apps_like:"games",upcoming_events:"events",past_events:"events",likes_people:"likes",likes_sports:null,fitness_report:null,groups_member:"groups",music_heavy_rotation:"music",photos_album:"photos",photos_untagged:"photos",music_mutual:"music",likes_restaurants:"likes",likes_clothing:null,info_insights:null,apps_used:"games",games_play:"games",games_apps_saved:"games",video_movies_suggestions:null,video_tv_shows_suggestions:null,books_suggestions:null,saved_books:"saved",saved_movies:"saved",saved_tv_shows:"saved",saved_music:"saved",places_saved:"map",saved_links:"saved",sports_teams:"sports",likes_all:"likes",saved_places:"saved",saved_all:"saved",sports_athletes:"sports",sports_activities:null,saved_events:"saved",saved_archived:"saved",places_recent:"map",places_visited:"map",reviews_written:"reviews",likes_section_movies:"likes",likes_section_tv_shows:"likes",likes_section_books:"likes",likes_section_music:"likes",likes_section_sports_teams:"likes",place_visits_by_place_tag:null,places_cities:"map",place_visits_by_city:null,topic_visit_counts:"map",place_visits_by_topic:null,place_visit_stories:null,places_map:"map",likes_section_apps_and_games:"likes",likes_section_sports_athletes:"likes",places_cities_desktop:"map",saved_videos:"saved",saved_pages:"saved",friends_with_upcoming_birthdays:"friends",friends_current_city:"friends",friends_hometown:"friends",at_work_contact:null,place_reviews_written:"reviews",movie_reviews_written:"reviews",tv_show_reviews_written:"reviews",book_reviews_written:"reviews",photos_all_expanded:"photos",videos_by_user:"videos",videos_user_tagged:"videos",external_videos_for_user:"videos",friends_map:"friends",info_about:null,info_all_relationships:null,info_contact_basic:null,info_edu_work:null,info_overview:null,info_places:null,info_at_work:null,info_year_overviews:null,followers:"friends",following:"friends",media_set:"photos",photos_stream:"photos",photos_synced:"photos",apps:"games"}};},null);
|
|
__d("ImageUtils",["UserAgent_DEPRECATED"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h={hasLoaded:function(i){if(i.naturalWidth!==(void 0)){return i.complete&&i.width!==0;}else if(i.height==20&&i.width==20&&i.complete){return false;}else if(i.complete===(void 0)&&g.webkit()<500){var j=new Image();j.src=i.src;return j.complete;}return i.complete;}};e.exports=h;},null);
|
|
__d("PhotoEverstoreLogger",["Event","AsyncRequest","copyProperties","ImageUtils"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();var k={BATCH_WINDOW_MS:500,storedLog:[]};function l(){}i(l,{_log:function(n){k.storedLog.push(n);if(k.storedLog.length==1)setTimeout(m,k.BATCH_WINDOW_MS);},logImmediately:function(n){l._log(n);},registerForLogging:function(n){var o=document.getElementById(n);if(o!=null)if(j.hasLoaded(o)){l._log(o.src);}else g.listen(o,'load',function(event){l._log(o.src);});}});function m(){var n=k.storedLog;k.storedLog=[];var o=JSON.stringify(n);new h().setURI('/ajax/photos/logging/everstore_logging.php').setData({loggedUrls:o}).setMethod('POST').setOption('suppressErrorHandlerWarning',true).setOption('suppressErrorAlerts',true).send();}e.exports=l;},null);
|
|
__d("PhotosConst",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();var g={VIEWER_PERMALINK:0,VIEWER_SNOWLIFT:6,VIEWER_VAULTBOX:8,VIEWER_SNOWFLAKE:14,VIEWER_COMPOSER:16,VIEWER_PERMALINK_STRING:'permalink',VIEWER_SNOWLIFT_STRING:'snowlift',VIEWER_VAULTBOX_STRING:'vaultbox',BULK_EDITOR:3,BULK_EDITOR_REACT:15,FLASH_UPLOADER:4,HTML5_UPLOADER:10,SIZE_NORMAL:'n',PIC_NORMAL_FBX_SIZE:180};e.exports=g;},null);
|
|
__d("PhotoViewerImage",["PhotoEverstoreLogger","URI","Vector"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();function j(k){"use strict";this._hiResDimensions=k.hiResDimensions&&i.deserialize(k.hiResDimensions);this._normalDimensions=k.normalDimensions&&i.deserialize(k.normalDimensions);this._info=k.info;this._video=k.video;this._shouldLog=k.everstoreLogThis;this._hiResSrc=k.hiResSrc;this._normalSrc=k.normalSrc;this._thumbSrc=k.thumbSrc;this._isInverted=false;this._data=k;}j.prototype.getURIString=function(){"use strict";return h(this._info.permalink).getUnqualifiedURI().toString();};j.prototype.hasHiResDimensions=function(){"use strict";return !!this._hiResDimensions;};j.prototype.getHiResDimensions=function(){"use strict";return this._hiResDimensions;};j.prototype.getNormalDimensions=function(){"use strict";return this._normalDimensions;};j.prototype.getHiResSrc=function(){"use strict";return this._hiResSrc;};j.prototype.getNormalSrc=function(){"use strict";return this._normalSrc;};j.prototype.getThumbSrc=function(){"use strict";return this._thumbSrc;};j.prototype.getInfo=function(){"use strict";return this._info;};j.prototype.getPermalink=function(){"use strict";return this._info.permalink;};j.prototype.getHighestResSrc=function(){"use strict";return this._hiResSrc||this._normalSrc;};j.prototype.preload=function(k){"use strict";var l;if(this.getHighestResSrc())if(k&&!this._resource){this._resource=new Image();this._resource.src=this.getHighestResSrc();l=this._resource.src;if(this._shouldLog)g.logImmediately(this._resource.src);}else if(!k&&!this._small){this._small=new Image();this._small.src=this._normalSrc||this._hiResSrc;l=this._small.src;if(this._shouldLog)g.logImmediately(this._small.src);}return l;};j.prototype.setNormalDimensions=function(k,l){"use strict";this._normalDimensions=new i(k,l);};j.prototype.setHiResDimensions=function(k,l){"use strict";this._hiResDimensions=new i(k,l);};j.prototype.invertDimensions=function(){"use strict";if(this.hasHiResDimensions())this._hiResDimensions=new i(this._hiResDimensions.y,this._hiResDimensions.x);this._normalDimensions=new i(this._normalDimensions.y,this._normalDimensions.x);this._isInverted=!this._isInverted;};j.prototype.copy=function(){"use strict";return new j(this._data);};e.exports=j;},null);
|
|
__d("PhotoStreamCache",["DOM","HTML","PhotoEverstoreLogger","PhotosConst","PhotoViewerImage","Rect","UIPagelet","URI","Vector","copyProperties","createArrayFromMixed","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){b.__markCompiled&&b.__markCompiled();function s(){"use strict";}s.prototype.init=function(t,u,v,w,x){"use strict";this.version=t;this.pageletName=u;this.pageletRootID=v;this.tagSuggestionMode=x;this.bufferSize=s.BUFFER_SIZE;this.fullBucketSize=s.FULL_BUCKET_SIZE;this.initError=false;this.isActive=true;this.usesOpaqueCursor=false;this.usesNonCircularPhotoSet=false;this.reachedLeftEnd=false;this.reachedRightEnd=false;this.leftLock=false;this.rightLock=false;this.useAjaxPipe=true;this.logger=w;this.viewAsUser=null;this.reset();};s.prototype.setViewAs=function(t){"use strict";this.viewAsUser=t;};s.prototype.isInViewAsMode=function(){"use strict";return !!this.viewAsUser;};s.prototype.getViewAsUserId=function(){"use strict";return this.viewAsUser;};s.prototype.getUsesOpaqueCursor=function(){"use strict";return this.usesOpaqueCursor;};s.prototype.isNonCircularPhotoSet=function(){"use strict";return this.usesNonCircularPhotoSet;};s.prototype.setReachedLeftEnd=function(){"use strict";this.reachedLeftEnd=true;};s.prototype.setReachedRightEnd=function(){"use strict";this.reachedRightEnd=true;};s.prototype.hasReachedLeftEnd=function(){"use strict";return this.reachedLeftEnd;};s.prototype.hasReachedRightEnd=function(){"use strict";return this.reachedRightEnd;};s.prototype.nonCircularPhotoSetCanPage=function(t){"use strict";if(!this.isNonCircularPhotoSet())return true;if(t<0)return this.getCursorPos()||!this.hasReachedLeftEnd();if(t>0)return (this.getLength()-1!=this.getCursorPos())||!this.hasReachedRightEnd();return true;};s.prototype.setUseAjaxPipe=function(t){"use strict";this.useAjaxPipe=t;};s.prototype.reset=function(){"use strict";this.cache={image:{},extra:{},html:{}};this.fbidList=[];this.loaded=false;this.allLoaded=false;this.permalinkMap={};this.position=0;this.totalCount=null;this.firstCursor=null;this.firstCursorIndex=null;this.firstOpaqueCursor=null;};s.prototype.waitForInitData=function(){"use strict";this.fbidList.push(s.INIT_PLACEHOLDER);};s.prototype.destroy=function(){"use strict";this.reset();this.isActive=false;};s.prototype.isLoaded=function(){"use strict";return this.loaded;};s.prototype.canPage=function(){"use strict";if(!this.isLoaded())return false;if(this.totalCount!==null)return this.totalCount>1;if(this.usesNonCircularPhotoSet)return true;return this.getLength()>1;};s.prototype.errorInCurrent=function(){"use strict";if(this.initError){return true;}else if(!this.isLoaded())return false;return this.checkErrorAt(this.getCursor());};s.prototype.getLength=function(){"use strict";return this.fbidList.length;};s.prototype.getPhotoSet=function(){"use strict";return this.photoSetQuery.set;};s.prototype.getPhotoSetQuery=function(){"use strict";return this.photoSetQuery;};s.prototype.getCurrentImageData=function(){"use strict";return this.getImageData(this.getCursor());};s.prototype.addViewAsToURI=function(t){"use strict";var u=n(t);if(this.isInViewAsMode())u.addQueryData({viewas:this.getViewAsUserId()});return u;};s.prototype.getOpaqueCursor=function(t){"use strict";if(this.getImageData(t)){if(this.version===j.VIEWER_VAULTBOX)return this.getImageData(t).getInfo().opaquecursor;return this.getImageData(t).info.opaquecursor;}if(t==this.firstCursor)return this.firstOpaqueCursor;return null;};s.prototype.getImageData=function(t){"use strict";var u=this.getCacheContent(t,s.IMAGE_DATA);if(u)u.info.permalink=this.addViewAsToURI(u.info.permalink);return u;};s.prototype.getCurrentHtml=function(){"use strict";return this.getCacheContent(this.getCursor(),s.HTML);};s.prototype.getCurrentExtraData=function(){"use strict";return this.getCacheContent(this.getCursor(),s.EXTRA);};s.prototype.getCacheContent=function(t,u){"use strict";if(!t||t===s.ERROR_ID||t===s.INIT_PLACEHOLDER)return null;return this.cache[u][t];};s.prototype.getCursorPos=function(){"use strict";return this.position;};s.prototype.getCursor=function(){"use strict";if(this.position>=0&&this.position<this.getLength())return this.fbidList[this.position];return null;};s.prototype.getCursorAt=function(t){"use strict";return this.fbidList[t];};s.prototype.getCursorForURI=function(t){"use strict";return this.permalinkMap[t];};s.prototype.calculatePositionForMovement=function(t){"use strict";var u=this.position+t;if(this.allLoaded){var v=this.getLength();u=(v+u%v)%v;}return u;};s.prototype.isValidMovement=function(t){"use strict";if(!this.isLoaded()||!this.canPage())return false;var u=this.calculatePositionForMovement(t);return this.getCursor()>0||(u>=0&&u<this.getLength());};s.prototype.moveCursor=function(t){"use strict";if(!this.isValidMovement(t))return;this.position=this.calculatePositionForMovement(t);if(t!==0)this.loadMoreIfNeccessary(t>0);};s.prototype.checkErrorAt=function(t){"use strict";if(!this.isLoaded())return false;if(t===s.ERROR_ID)return true;return false;};s.prototype.getRelativeMovement=function(t){"use strict";for(var u=0;u<this.getLength();u++)if(this.fbidList[u]==t)return u-this.position;return null;};s.prototype.preloadImages=function(t){"use strict";var u,v,w=this.getLength(),x=this.cache.image,y=s.BUFFER_SIZE;if(w>y*2){u=(this.position+w-y%w)%w;v=(this.position+y)%w;}else{u=0;v=w-1;}while(u!=v){var z,aa=this.fbidList[u],ba=t&&t(x[aa]);if(this.version===j.VIEWER_VAULTBOX){z=x[aa]&&x[aa].preload(ba);}else if(x[aa]&&x[aa].url)if(ba&&!x[aa].resource){x[aa].resource=new Image();x[aa].resource.src=x[aa].url;z=x[aa].url;if(x[aa].everstoreLogThis===true)i.logImmediately(x[aa].resource.src);}else if(!ba&&!x[aa].small){x[aa].small=new Image();x[aa].small.src=x[aa].smallurl||x[aa].url;z=x[aa].small.src;if(x[aa].everstoreLogThis===true)i.logImmediately(x[aa].small.src);}if(this.logger&&z)this.logger.log(z);u=(u+1)%w;}};s.prototype.loadMoreIfNeccessary=function(t){"use strict";if(this.allLoaded||(t&&this.rightLock)||(!t&&this.leftLock))return;var u=t?1:-1,v=this.position+this.bufferSize*u;if(v<0&&!this.checkErrorAt(this.getEndCursor(false))){this.leftLock=true;this.fetch(this.fullBucketSize,false);}else if(v>this.getLength()&&!this.checkErrorAt(this.getEndCursor(true))){this.rightLock=true;this.fetch(this.fullBucketSize,true);}};s.prototype.getEndCursor=function(t){"use strict";return t?this.fbidList[this.getLength()-1]:this.fbidList[0];};s.prototype.calculateRelativeIndex=function(t,u,v){"use strict";if(!this.totalCount)return null;var w=this.fbidList.indexOf(u),x=this.fbidList.indexOf(v);if(w===-1||x===-1)return null;var y=x-w;return (t+y+this.totalCount)%this.totalCount;};s.prototype.calculateDistance=function(t,u){"use strict";var v=this.fbidList.indexOf(t),w=this.fbidList.indexOf(u);if(v===-1||w===-1)return null;return (w-v+this.getLength())%this.getLength();};s.prototype.fetch=function(t,u){"use strict";var v=this.getEndCursor(u),w=p({cursor:v,version:this.version,end:this.getEndCursor(!u),fetchSize:u?t:-1*t,relevant_count:this.relevantCount,opaqueCursor:this.getOpaqueCursor(v),tagSuggestionMode:this.tagSuggestionMode},this.photoSetQuery);if(this.isInViewAsMode())w.viewas=this.getViewAsUserId();if(this.totalCount&&this.firstCursorIndex!==null){w.total=this.totalCount;w.cursorIndex=this.calculateRelativeIndex(this.firstCursorIndex,this.firstCursor,v);}var x=r(this.pageletRootID);if(!x){x=g.create('div',{id:this.pageletRootID});g.appendContent(document.body,x);}m.loadFromEndpoint(this.pageletName,x,w,{usePipe:this.useAjaxPipe,automatic:true,jsNonblock:true,crossPage:true});if(!this.useAjaxPipe)this.setUseAjaxPipe(true);};s.prototype.storeToCache=function(t){"use strict";var u={};if(!this.isActive)return u;if('error' in t){this.processErrorResult(t.error);u.error=true;return u;}if('init' in t){this.processInitResult(t.init);u.init={logids:t.init.logids,fbid:t.init.fbid,loggedin:t.init.loggedin,fromad:t.init.fromad};}if('image' in t){this.processImageResult(t.image);u.image=true;}if('data' in t){this.processDataResult(t.data);u.data=true;}return u;};s.prototype.processInitResult=function(t){"use strict";if(this.loaded)return;this.usesOpaqueCursor=t.usesopaquecursor;this.usesNonCircularPhotoSet=t.isnoncircularphotoset;this.loaded=true;this.photoSetQuery=t.query;if(t.bufferSize)this.bufferSize=t.bufferSize;if(t.fullBucketSize)this.fullBucketSize=t.fullBucketSize;if(this.fbidList.length===0){this.fbidList.push(t.fbid);this.rightLock=true;}else{var u=this.fbidList.indexOf(s.INIT_PLACEHOLDER);if(u!=-1)this.fbidList[u]=t.fbid;}this.firstCursor=t.fbid;this.firstOpaqueCursor=t.opaquecursor;if('initIndex' in t&&'totalCount' in t){this.firstCursorIndex=t.initIndex;this.totalCount=t.totalCount;}if(this.version==j.VIEWER_PERMALINK)this.fetch(s.INIT_BUCKET_SIZE,true);};s.prototype.processImageResult=function(t){"use strict";for(var u in t){if(u===this.firstCursor&&t[u].everstoreLogThis)i.logImmediately(t[u].url);if(this.version===j.VIEWER_VAULTBOX){var v=t[u];this.cache.image[u]=new k(v);this.permalinkMap[this.cache.image[u].getURIString()]=u;}else{this.cache.image[u]=t[u];if(t[u].dimensions)this.cache.image[u].dimensions=o.deserialize(t[u].dimensions);if(t[u].originalDimensions)this.cache.image[u].originalDimensions=o.deserialize(t[u].originalDimensions);if(t[u].smalldims)this.cache.image[u].smalldims=o.deserialize(t[u].smalldims);this.permalinkMap[n(t[u].info.permalink).getUnqualifiedURI().toString()]=u;}}};s.prototype.attachToFbidsList=function(t,u,v){"use strict";if(this.allLoaded)return;if(u===-1){for(var w=t.length-1;w>=0;w--){this.fbidList.unshift(t[w]);this.position++;}this.leftLock=false;}else{for(var x=0;x<t.length;x++)this.fbidList.push(t[x]);this.rightLock=false;}if(v)this.setAllLoaded();};s.prototype.setAllLoaded=function(){"use strict";this.allLoaded=true;if(this.getCursor()===null)this.position=this.calculatePositionForMovement(0);};s.prototype.processDataResult=function(t){"use strict";for(var u in t){if(!this.cache.html[u])this.cache.html[u]={};for(var v in t[u].html){var w=t[u].html[v];if(typeof w==='string')w=h(w).getRootNode();this.cache.html[u][v]=q(w.childNodes);}if(!('extra' in t[u])){this.cache.extra[u]=null;continue;}this.cache.extra[u]={tagRects:{}};if(!Array.isArray(t[u].extra.tagRects))for(var x in t[u].extra.tagRects)if(t[u].extra.tagRects[x])this.cache.extra[u].tagRects[x]=l.deserialize(t[u].extra.tagRects[x]);Object.keys(t[u].extra).forEach(function(y){if(y=='tagRects')return;this.cache.extra[u][y]=t[u].extra[y];}.bind(this));}};s.prototype.processErrorResult=function(t){"use strict";if(!this.isLoaded()){this.initError=true;return;}var u=t.side,v=[s.ERROR_ID];this.attachToFbidsList(v,u);};s.prototype.setTotalCount=function(t){"use strict";this.totalCount=t;};s.prototype.setFirstCursorIndex=function(t){"use strict";this.firstCursorIndex=t;};p(s,{ERROR:'error',HTML:'html',IMAGE_DATA:'image',EXTRA:'extra',BUFFER_SIZE:3,INIT_BUCKET_SIZE:4,FULL_BUCKET_SIZE:12,ERROR_ID:-1,INIT_PLACEHOLDER:1});e.exports=s;},null);
|
|
__d("XPhotosetSearchPivotController",["XController"],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports=b("XController").create("\/search-pivot\/photoset\/",{fbid:{type:"Int",required:true},tags:{type:"IntToIntMap"}});},null);
|
|
__d("PhotosetSearchPivotData",["AsyncRequest","PhotoStreamCache","Promise","XPhotosetSearchPivotController"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();var k=/^(perm:)?tag:(\d+)/,l={},m={fetch:function(n,o){if(!(n in l)){var p=(j.getURIBuilder()).setInt('fbid',n);if(o){var q={};o.fbidList.forEach(function(r){var s=o.getCacheContent(r,h.EXTRA);if(s)Object.keys(s.tagRects).forEach(function(t){if(k.test(t)){var u=RegExp.$2;if(u in q){q[u]++;}else q[u]=1;}});});p.setIntToIntMap('tags',q);}l[n]=new i(function(r,s){(new g()).setURI(p.getURI()).setHandler(function(t){r(t.getPayload());}).setErrorHandler(s).setAllowCrossPageTransition(true).send();});}return l[n]["catch"](function(r){delete l[n];throw r;});}};e.exports=m;},null);
|
|
__d("SubscriptionLevels",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();var g={ALL:'162318810514679',DEFAULT:'271670892858696',TOP:'266156873403755'};e.exports=g;},null);
|
|
__d("EditSubscriptions",["Arbiter","AsyncRequest","CSS","DOM","Event","FeedBlacklistButton","MenuDeprecated","Parent","SubscriptionLevels","arrayContains","cx","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){b.__markCompiled&&b.__markCompiled();var s=45,t=[o.ALL,o.DEFAULT,o.TOP],u={},v={},w={},x={},y={},z={},aa={},ba={},ca={},da={},ea={},fa="/ajax/follow/follow_profile.php",ga="/ajax/follow/unfollow_profile.php",ha="/ajax/settings/notifications/notify_me.php",ia={},ja={},ka={},la=null,ma=false,na={};function oa(mb){return p(t,mb);}function pa(mb,nb,ob,pb){var qb=n.byClass(pb,'uiMenuItem')||n.byClass(pb,"_54ni"),rb=j.getID(mb);if(!qb||!j.contains(mb,qb)){return;}else if(i.hasClass(qb,'SubscribeMenuSubscribeCheckbox')){if(w[nb]){ua(rb,nb);}else ta(rb,nb);return false;}else if(i.hasClass(qb,'SubscribeMenuUnsubscribe')){ua(rb,nb);return false;}else if(i.hasClass(qb,'SubscribeMenuSettingsItem')){gb(mb,true);return false;}else if(i.hasClass(qb,'SubscriptionMenuGoBack')){gb(mb,false);return false;}else if(i.hasClass(qb,'SubscriptionMenuItem')){ra(mb,nb,ob,qb);return false;}else if(i.hasClass(qb,'SubscribeMenuNotifyMeCheckbox')){qa(mb,nb);return false;}}function qa(mb,nb){if(x[nb]){kb(mb,nb);}else jb(mb,nb);}function ra(mb,nb,ob,pb){if(i.hasClass(pb,'SubscriptionMenuLevel')){if(m.isItemChecked(pb))return;eb(mb,nb,xa(pb),true,ob);}else if(i.hasClass(pb,'SubscriptionMenuCategory')){bb(nb,pb,!m.isItemChecked(pb),true,ob);}else if(i.hasClass(pb,'SubscriptionAppStory'))db(nb,pb,!m.isItemChecked(pb),ob);}function sa(mb){return na[mb]?na[mb]:0;}function ta(mb,nb){var ob={profile_id:nb};g.inform('FollowingUser',ob);g.inform(l.UNBLACKLIST,ob);new h().setURI(fa).setMethod('POST').setData({profile_id:nb,location:sa(mb)}).setErrorHandler(g.inform.bind(null,'FollowUserFail',ob)).send();}function ua(mb,nb){var ob={profile_id:nb};g.inform('UnfollowingUser',ob);g.inform(l.BLACKLIST,ob);new h().setURI(ga).setMethod('POST').setData({profile_id:nb,location:sa(mb)}).setErrorHandler(g.inform.bind(null,'UnfollowUserFail',ob)).send();}function va(mb,nb,ob){var pb={profile_id:mb,level:ba[mb],custom_categories:ca[mb],location:ob};new h().setURI('/ajax/follow/manage_subscriptions.php').setData(pb).send();}function wa(mb,nb){var ob=ca[nb]||[],pb=m.getItems(mb);pb.forEach(function(qb){if(i.hasClass(qb,'SubscriptionMenuCategory')){var rb=xa(qb);if(p(ob,rb)){za(qb);}else ab(qb);}else if(i.hasClass(qb,'SubscriptionAppStory')){var sb=xa(qb);if(ka[nb]&&ka[nb][sb]){za(qb);}else ab(qb);}});eb(mb,nb,ba[nb],false);}function xa(mb){var nb=j.scry(mb,'input')[0];return nb&&nb.value;}function ya(mb){return j.find(mb,'a.itemAnchor');}function za(mb){i.addClass(mb,'checked');ya(mb).setAttribute('aria-checked',true);}function ab(mb){i.removeClass(mb,'checked');ya(mb).setAttribute('aria-checked',false);}function bb(mb,nb,ob,pb,qb){if(ob){za(nb);}else ab(nb);var rb=xa(nb);if(oa(rb)){ob&&cb(mb,rb);}else if(ob){if(!p(ca[mb],rb))ca[mb].push(rb);}else{var sb=ca[mb].indexOf(rb);if(sb!==-1)ca[mb].splice(sb,1);}if(pb)va(mb,rb,qb);}function cb(mb,nb){ba[mb]=nb;g.inform('SubscriptionLevelUpdated',{profile_id:mb,level:nb});}function db(mb,nb,ob,pb){var qb='/ajax/feed/filter_action/',rb=xa(nb),sb={actor_id:mb,app_id:rb};if(ob){za(nb);qb+='resubscribe_user_app/';sb.action='resubscribe_user_app';if(!ka[mb])ka[mb]={};ka[mb][rb]=true;}else{ab(nb);qb+='unsubscribe_user_app_checkbox/';sb.action='unsubscribe_user_app_checkbox';if(ka[mb])ka[mb][rb]=false;}new h().setURI(qb).setData(sb).send();}function eb(mb,nb,ob,pb,qb){var rb=j.scry(mb,'.SubscriptionMenuLevel'),sb=null;rb.forEach(function(tb){if(xa(tb)==ob){sb=tb;}else if(m.isItemChecked(tb))bb(nb,tb,false,false);});sb&&bb(nb,sb,true,pb,qb);}function fb(mb,nb,ob){w[nb]=ob;i.conditionClass(mb,'isUnsubscribed',!ob);var pb=j.scry(mb,'li.SubscribeMenuSubscribeCheckbox');if(pb.length!==0){var qb=pb[0];if(ob){za(qb);}else ab(qb);}}function gb(mb,nb){i.conditionClass(mb,'subscriptionMenuOpen',nb);}function hb(mb,nb,ob){var pb=j.find(mb,".FriendListSubscriptionsMenu"),qb=j.find(pb,".uiMenuInner");if(la!=null)la.forEach(function(rb){qb.removeChild(rb);});ob.forEach(function(rb){qb.appendChild(rb);});la=ob;}g.subscribe('UnfollowUser',function(mb,nb){if(da[nb.profile_id]){cb(nb.profile_id,da[nb.profile_id]);ca[nb.profile_id]=ea[nb.profile_id].slice();}});g.subscribe('UpdateSubscriptionLevel',function(mb,nb){var ob=nb.profile_id+'',pb=nb.level+'';cb(ob,pb);var qb;for(qb in u)if(u[qb]===ob){var rb=r(qb);rb&&eb(rb,ob,pb,false);}});g.subscribe('listeditor/close_editor',function(){var mb;for(mb in u){var nb=r(mb);nb&&gb(nb,false);}});function ib(mb,nb,ob){x[nb]=ob;var pb=ja[nb];if(pb){if(ob){pb.select();}else pb.deselect();return;}var qb=z[nb]&&!ma,rb=j.scry(mb,'li.SubscribeMenuNotifyMeCheckbox');if(rb.length!==0){var sb=rb[0];i.conditionShow(sb,!qb);var tb=j.scry(mb,'li.SubscribeMenuNotifyMeCheckboxSeparator');if(tb.length>0)i.conditionShow(tb[0],!qb);if(ob){za(sb);}else ab(sb);}}function jb(mb,nb){var ob={profile_id:nb};g.inform('EnableNotifsForUser',ob);new h().setURI(ha).setMethod('POST').setData({notifier_id:nb,enable:true}).setErrorHandler(g.inform.bind(null,'EnableNotifsForUserFail',ob)).send();}function kb(mb,nb){var ob={profile_id:nb};g.inform('DisableNotifsForUser',ob);new h().setURI(ha).setMethod('POST').setData({notifier_id:nb,enable:false}).setErrorHandler(g.inform.bind(null,'DisableNotifsForUserFail',ob)).send();}var lb={init:function(mb,nb,ob){var pb=j.getID(mb);na[pb]=ob;if(!u[pb])k.listen(mb,'click',function(qb){return pa(mb,u[pb],ob,qb.getTarget());});if(ob===s&&ia[nb].length)hb(mb,nb,ia[nb]);if(ba[nb])wa(mb,nb);u[pb]=nb;i.conditionClass(mb,'NonFriendSubscriptionMenu',!v[nb]);i.conditionClass(mb,'cannotSubscribe',!y[nb]);i.conditionClass(mb,'noSubscriptionLevels',z[nb]&&!aa[nb]);i.conditionClass(mb,'noSubscribeCheckbox',!v[nb]&&!z[nb]);fb(mb,nb,w[nb]);ib(mb,nb,x[nb]);g.subscribe(['FollowUser','FollowingUser','UnfollowUserFail'],function(qb,rb){if(rb.profile_id==nb)fb(mb,nb,true);}.bind(this));g.subscribe(['UnfollowUser','UnfollowingUser','FollowUserFail'],function(qb,rb){if(rb.profile_id==nb){g.inform('SubMenu/Reset');fb(mb,nb,false);}}.bind(this));g.subscribe(['EnableNotifsForUser','DisableNotifsForUserFail'],function(qb,rb){if(rb.profile_id==nb)ib(mb,nb,true);}.bind(this));g.subscribe(['DisableNotifsForUser','EnableNotifsForUserFail'],function(qb,rb){if(rb.profile_id==nb)ib(mb,nb,false);}.bind(this));g.subscribe('listeditor/friend_lists_changed',function(qb,rb){if(rb.notify_state){var sb=rb.added_uid?rb.added_uid:rb.removed_uid;ib(mb,sb,rb.notify_state.is_notified);}}.bind(this));},getSubscriptions:function(mb){return {level:ba[mb],custom_categories:ca[mb]};},registerTimelineNotifySelector:function(mb,nb){var ob=mb.getInitialMenu(),pb=mb.getContentRoot();ob.forEachItem(function(qb){var rb=qb.getRoot();if(i.hasClass(rb,'SubscribeMenuNotifyMeCheckbox')){ja[nb]=qb;ib(pb,nb,x[nb]);}});ob.subscribe('itemclick',function(qb,rb){if(rb.item===ja[nb])qa(pb,nb);return true;});},setSubscriptions:function(mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb){cb(mb,sb+'');v[mb]=nb;w[mb]=ob;y[mb]=pb;z[mb]=qb;aa[mb]=rb;da[mb]=ub+'';ca[mb]=tb.map(String);ea[mb]=vb.map(String);ia[mb]=yb;x[mb]=wb;ma=xb;}};e.exports=a.EditSubscriptions||lb;},null);
|
|
__d("legacy:EditSubscriptions",["SubscriptionLevels","EditSubscriptions"],function(a,b,c,d){b.__markCompiled&&b.__markCompiled();a.SubscriptionLevels=b('SubscriptionLevels');a.EditSubscriptions=b('EditSubscriptions');},3);
|
|
__d("FollowLink",["Arbiter","CSS","ge"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();var j={subscribeEvents:function(k,l,m){g.subscribe(['FollowUser','UnfollowUser'],function(event,n){if(n.profile_id!=k)return;var o=i(l),p=i(m),q=event=='FollowUser';o&&h.conditionShow(o,!q);p&&h.conditionShow(p,q);});}};e.exports=j;},null);
|
|
__d("DynamicFriendListEducation",["Event","Arbiter","AsyncRequest","Dialog","PageTransitions","arrayContains","createArrayFromMixed","removeFromArray"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){b.__markCompiled&&b.__markCompiled();var o,p,q,r,s,t;function u(){q&&q.hide();r&&r.hide();}function v(y){n(p,y);u();s({accept_tag_education:true});}function w(){u();s({nux_cancel:true});}var x={init:function(y,z){o=y;p=m(z).map(String);k.registerHandler(function(){u();o=false;s=(void 0);p=[];});},showDialog:function(y,z,aa){if(o&&l(p,y)){u();h.inform('DynamicFriendListEducation/dialogOpen',{uid:z,flid:y});s=aa;q=new j().setAsync(new i('/ajax/friends/lists/smart_list_education.php').setMethod('GET').setData({flid:y,uid:z}).setReadOnly(true)).setHandler(v.bind(this,y)).setCloseHandler(function(){h.inform('DynamicFriendListEducation/dialogClosed',{uid:z,flid:y});}).setCancelHandler(function(){h.inform('DynamicFriendListEducation/dialogCancel',{uid:z,flid:y});}).show();}else aa();},showContextualDialog:function(y,z,aa,ba){if(o&&l(p,y)){u();t=aa;s=ba;new i('/ajax/friends/lists/smart_list_contextual_education.php').setMethod('GET').setData({flid:y,uid:z}).setReadOnly(true).send();}else ba();},setContextualDialog:function(y,z,aa,ba){r=y;r.setContext(t);r.show();g.listen(z,'click',v.bind(this,ba));g.listen(aa,'click',w);}};e.exports=x;},null);
|
|
__d("FriendStatus",["Arbiter","AsyncRequest","SubscribeButton","arrayContains","copyProperties","createArrayFromMixed","forEachObject"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){b.__markCompiled&&b.__markCompiled();function n(r,s,t){this.id=r;this.update(s,t);}k(n.prototype,{update:function(r,s){r&&(this.status=r);if(s){this.lists=l(s).map(String);this._informListChange();}},isComplete:function(){return !!this.lists;},addToList:function(r){if(this.lists&&!j(this.lists,r))this.lists.push(r);this._informListChange();},removeFromList:function(r){if(this.lists){var s=this.lists.indexOf(r);s!==-1&&this.lists.splice(s,1);}this._informListChange();},updateList:function(r,s){s?this.addToList(r):this.removeFromList(r);},_informListChange:function(){g.inform('FriendListMembershipChange',{uid:this.id,lists:this.lists});}});k(n,{ARE_FRIENDS:1,INCOMING_REQUEST:2,OUTGOING_REQUEST:3,CAN_REQUEST:4});var o={},p={};function q(r,s,t){if(!o[t.uid]){o[t.uid]=new n(t.uid,r);}else o[t.uid].update(r);g.inform('FriendRequest/change',{uid:t.uid,status:r});}g.subscribe(['FriendRequest/cancel','FriendRequest/unfriend'],function(r,s){s.profile_id=s.uid;s.connected=false;g.inform(i.UNSUBSCRIBED,s);});g.subscribe(['FriendRequest/cancel','FriendRequest/unfriend','FriendRequest/sendFail'],q.bind(null,n.CAN_REQUEST));g.subscribe(['FriendRequest/confirmFail'],q.bind(null,n.INCOMING_REQUEST));g.subscribe(['FriendRequest/cancelFail','FriendRequest/sent','FriendRequest/sending'],q.bind(null,n.OUTGOING_REQUEST));g.subscribe(['FriendRequest/confirm','FriendRequest/confirming'],q.bind(null,n.ARE_FRIENDS));k(n,{CLOSE_FRIENDS:null,ACQUAINTANCES:null,getFriend:function(r,s){if(o[r]&&o[r].isComplete()){s(o[r]);}else if(p[r]){p[r].push(s);}else{p[r]=[s];new h().setURI("/ajax/friends/status.php").setData({friend:r}).setHandler(function(t){var u=t.getPayload();setTimeout(n.initFriend.bind(n,r,u.status,u.lists),0);}).send();}},initFriend:function(r,s,t){var u=o[r]||new n(r);u.update(u.status||s,u.lists||t);o[r]=u;p[r]&&p[r].forEach(function(v){v(u);});p[r]=null;},setSpecialLists:function(r){var s=n.CLOSE_FRIENDS===null;n.CLOSE_FRIENDS=r.close+'';n.ACQUAINTANCES=r.acq+'';if(s)m(o,function(t,u){t._informListChange();});}});e.exports=n;},null);
|
|
__d("FriendEditLists",["Arbiter","AsyncRequest","CSS","DOMQuery","DynamicFriendListEducation","EditSubscriptions","Event","FriendStatus","MenuDeprecated","Parent","ScrollableArea","URI","$","arrayContains","copyProperties","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){b.__markCompiled&&b.__markCompiled();var w=5,x={},y='/ajax/profile/removefriendconfirm.php',z='/ajax/friends/requests/cancel.php',aa='/ajax/choose/',ba='/profile.php',ca,da,ea,fa,ga=null,ha={profile_browser:43,fbx_top_bar:1,hovercard:5};function ia(ta,ua,va){var wa=x[ta.id],xa=function(ya){var za={action:va?'add_list':'del_list',to_friend:wa.id,friendlists:[ua],source:ca};if(ya)u(za,ya);wa.updateList(ua,va);var ab;if(va&&ua==n.CLOSE_FRIENDS){ab=la(ta,n.ACQUAINTANCES);if(o.isItemChecked(ab)){o.toggleItem(ab);ia(ta,n.ACQUAINTANCES,false);}}else if(va&&ua==n.ACQUAINTANCES){ab=la(ta,n.CLOSE_FRIENDS);if(o.isItemChecked(ab)){o.toggleItem(ab);ia(ta,n.CLOSE_FRIENDS,false);}}var bb={flid:ua,uid:wa.id},cb=va?'FriendListHovercard/add':'FriendListHovercard/remove';g.inform(cb,bb);new h().setURI('/ajax/add_friend/action.php').setData(za).send();};if(va){k.showDialog(ua,wa.id,xa);}else xa();}function ja(ta){var ua=j.scry(ta,'input')[0];return ua&&ua.value;}function ka(ta,ua,va){if(i.hasClass(va,'async_saving'))return;var wa={uid:ua.id};new h().setURI(z).setMethod('POST').setData({friend:ua.id,cancel_ref:ea,floc:fa}).setHandler(g.inform.bind(g,'FriendRequest/cancel',wa)).setErrorHandler(g.inform.bind(g,'FriendRequest/cancelFail',wa)).setStatusElement(va).send();}function la(ta,ua){var va=o.getItems(ta);for(var wa=0;wa<va.length;wa++)if(ja(va[wa])==ua)return va[wa];return null;}function ma(ta,ua){var va=o.getItems(ta);va.forEach(function(wa){var xa=ja(wa),ya=t(ua.lists,xa);if(o.isItemChecked(wa)!==ya)o.toggleItem(wa);});}function na(ta){var ua=o.getItems(ta),va=!i.hasClass(ta,'followButtonFlyout')&&!i.hasClass(ta,'likeButtonFlyout'),wa=[],xa=[],ya=0,za=0;ua.forEach(function(eb){if(i.hasClass(eb,'neverHide')){i.removeClass(eb,'underShowMore');ya++;}else if(o.isItemChecked(eb)){wa.push(eb);}else if(i.hasClass(eb,'neverShow')||i.hasClass(eb,'FriendListCreateTrigger')||(!va&&i.hasClass(eb,'friendOptionsOnly'))){i.addClass(eb,'underShowMore');za++;}else xa.push(eb);});var ab=w-ya,bb=wa.concat(xa),cb=za;bb.forEach(function(eb){if(i.hasClass(eb,'ShowMoreItem')){ab--;return;}if(ab){i.removeClass(eb,'underShowMore');ab--;}else{i.addClass(eb,'underShowMore');cb=true;}});i.conditionClass(ta,'hasMoreFriendListItems',cb);var db=j.scry(ta,'.FriendListMenuShowMore');db.forEach(function(eb){i.removeClass(eb,'FriendListMenuShowMore');});}function oa(ta,ua){i.conditionClass(ta,'FriendListMemorializedUser',ua);}function pa(ta,ua){i.conditionClass(ta,'FriendListCannotSuggestFriends',!ua);}function qa(ta,ua){var va=j.scry(ta,'.FriendListUnfriend')[0],wa=j.scry(ta,'.FriendListCancel')[0],xa=j.scry(ta,'.FriendListSuggestFriends')[0],ya=j.scry(ta,'.FriendListFriendship')[0];if(wa)i.conditionShow(wa,ua.status==n.OUTGOING_REQUEST);if(va){i.conditionShow(va,ua.status==n.ARE_FRIENDS);var za=j.find(va,'a');za.setAttribute('ajaxify',r(y).addQueryData({uid:ua.id,unref:da,floc:fa}).toString());if(!ga)ga=m.listen(za,'click',function(ab){var bb=p.byClass(ab.getTarget(),'FriendListUnfriend');if(!bb)return;var cb=r(j.find(bb,'a').getAttribute('ajaxify')).getQueryData();});}else i.conditionClass(ta,'NoFriendListActionSeparator',!wa||ua.status!=n.OUTGOING_REQUEST);if(xa)j.find(xa,'a').setAttribute('href',r(aa).addQueryData({type:'suggest_friends',newcomer:ua.id,ref:'profile_others_dropdown'}).toString());if(ya){i.conditionShow(ya,ua.status==n.ARE_FRIENDS);j.find(ya,'a').setAttribute('href',r(ba).addQueryData({and:ua.id}).toString());}}function ra(ta,ua,va){var wa=j.scry(ta,'div.FriendListSubscriptionsMenu');if(wa.length!==0)l.init(ta,ua,va);}g.subscribe('FriendRequest/change',function(ta,ua){for(var va in x){var wa=v(va),xa=x[va];if(wa&&xa&&xa.id==ua.uid){ma(wa,xa);qa(wa,xa);na(wa);}}});o.subscribe('select',function(ta,ua){if(i.hasClass(ua.item,'ShowMoreItem')&&i.hasClass(ua.menu,'FriendListMenu')){i.addClass(ua.menu,'FriendListMenuShowMore');q.poke(ua.item);}});var sa={init:function(ta,ua,va,wa,xa,ya,za,ab){ta=s(ta);ca=va;da=ya;ea=za;fa=ab;var bb=ha[va]||45;if(!x[ta.id])o.subscribe('select',function(cb,db){if(j.contains(ta,db.item))if(p.byClass(db.item,'FriendListItem')){o.toggleItem(db.item);var eb=ja(db.item);ia(ta,eb,o.isItemChecked(db.item));}else if(p.byClass(db.item,'FriendListCancel')){ka(ta,x[ta.id],db.item);}else if(p.byClass(db.item,'FriendListUnfriend'))g.inform('FriendEditLists/unfriend');});i.addClass(ta,'async_saving');n.getFriend(ua,function(cb){oa(ta,wa);pa(ta,xa);ma(ta,cb);qa(ta,cb);x[ta.id]=cb;na(ta);ra(ta,ua,bb);i.removeClass(ta,'async_saving');}.bind(this));}};e.exports=a.FriendEditLists||sa;},null);
|
|
__d("FriendListFlyoutController",["Event","Arbiter","AsyncRequest","Button","ContextualLayer","CSS","DataStore","Dialog","DOM","DOMQuery","FriendEditLists","FriendStatus","Keys","Layer","LayerHideOnEscape","LayerTabIsolation","MenuDeprecated","Parent","ScrollableArea","Style","TabbableElements","UserAgent_DEPRECATED","cx","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ba,ca,da){b.__markCompiled&&b.__markCompiled();var ea,fa,ga,ha=null,ia=null,ja,ka,la,ma,na,oa,pa=1500,qa,ra=false,sa=['uiButtonConfirm','uiButtonSpecial',"_42gz","_42g-","_4jy2","_51tl","_4jy1"],ta={init:function(xb,yb){ta.init=da;ea=xb;ea.subscribe('mouseenter',cb);ea.subscribe('mouseleave',function(){if(!ra)sb();});ea.subscribe('hide',eb);ea.enableBehavior(v);ea.enableBehavior(u);qa=yb;if(ha)o.setContent(ea.getContent(),[ha,ia]);var zb=function(bc){var cc=x.byClass(bc.getTarget(),'enableFriendListFlyout');if(cc){ra=true;if(ja!==cc){ga&&ub();rb(cc);}}else if(ra)ub();},ac=function(bc){var cc=x.byClass(bc.getTarget(),'enableFriendListFlyout');if(cc)if(ja===cc){clearTimeout(ma);}else{ga&&ub();rb(cc);}};g.listen(document.documentElement,{click:zb,mouseover:ac,keydown:function(event){var bc=event.getTarget();if(event.getModifiers().any)return;if(!ga||p.isNodeOfType(bc,['input','textarea']))return;var cc=g.getKeyCode(event),dc;switch(cc){case s.UP:case s.DOWN:var ec=bb();dc=za(ec);xa(ec[dc+(cc===s.UP?-1:1)]);return false;case s.SPACE:var fc=ya(bc);if(fc){ua(fc);event.prevent();}break;default:var gc=String.fromCharCode(cc).toLowerCase(),hc=bb();dc=za(hc);var ic=dc,jc=hc.length;while((~dc&&(ic=++ic%jc)!==dc)||(!~dc&&++ic<jc)){var kc=w.getItemLabel(hc[ic]);if(kc&&kc.charAt(0).toLowerCase()===gc){xa(hc[ic]);return false;}}}}});h.subscribe('FriendEditLists/unfriend',ub);h.subscribe('FriendRequest/cancel',ub);h.subscribe('DynamicFriendListEducation/dialogOpen',function(){oa=true;});h.subscribe('DynamicFriendListEducation/dialogClosed',function(){oa=false;sb();});},initContent:function(xb){o.appendContent(document.body,xb);fb(xb);setTimeout(function(){if(!ha){ha=xb;ea&&o.setContent(ea.getContent(),[ha,ia]);l.show(ha);g.listen(ha,'click',vb);ga&&ob(ja);}else{o.remove(xb);xb=null;}},0);},initNux:function(xb){if(ia)return;ia=xb;ea&&o.setContent(ea.getContent(),[ha,ia]);},show:function(xb){pb(xb);},hide:function(xb){xb===false?ub():sb();},setActiveNode:function(xb){ga&&ub();ja=xb;ka=g.listen(xb,'mouseleave',function(){ja=null;ka&&ka.remove();});},setCloseListener:function(xb,yb){m.set(xb,'flfcloselistener',yb);if(ja!=xb)m.set(xb,'flfcloselistenertimeout',setTimeout(wb.bind(null,xb),pa));},setCloseListenerTimeout:function(xb){pa=xb;}};function ua(xb){ba.firefox()&&wa(xb).blur();w.inform('select',{menu:va(xb),item:xb});}function va(xb){if(l.hasClass(xb,'uiMenuContainer'))return xb;return x.byClass(xb,'uiMenu');}function wa(xb){return p.find(xb,'a.itemAnchor');}function xa(xb){if(xb&&ab(xb)){w._removeSelected(ea.getContent());l.addClass(xb,'selected');wa(xb).focus();}}function ya(xb){return x.byClass(xb,'uiMenuItem');}function za(xb){if(document.activeElement){var yb=ya(document.activeElement);return xb.indexOf(yb);}return -1;}function ab(xb){return !l.hasClass(xb,'disabled')&&z.get(xb,'display')!=='none'&&z.get(x.byClass(xb,'uiMenu'),'display')!=='none';}function bb(){return w.getItems(ea.getContent()).filter(ab);}function cb(){clearTimeout(ma);}function db(xb){for(var yb=0;yb<sa.length;yb++)if(l.hasClass(xb,sa[yb]))return false;return true;}function eb(){if(ja){if(db(ja)){l.removeClass(ja,"_52nd");if(l.hasClass(ja,'uiButton')||l.hasClass(ja,"_42fu"))l.removeClass(ja,'selected');}if(m.get(ja,'flfcloselistener')){var xb=ja;m.set(ja,'flfcloselistenertimeout',setTimeout(wb.bind(null,xb),pa));}}ga=false;nb();ja=null;}function fb(xb){var yb=p.scry(xb,'[tabindex="0"]');yb.forEach(function(zb){zb.tabIndex='-1';});yb[0]&&(yb[0].tabIndex='0');}function gb(xb){if(p.isNodeOfType(xb,'label')&&l.hasClass(xb,'uiButton'))xb=j.getInputElement(xb);return xb;}function hb(xb){return m.get(gb(xb),'profileid');}function ib(xb){return m.get(gb(xb),'memorialized')==='true';}function jb(xb){return m.get(gb(xb),'cansuggestfriends')==='true';}function kb(xb){return m.get(gb(xb),'unref');}function lb(xb){return m.get(gb(xb),'cancelref');}function mb(xb){return m.get(gb(xb),'floc');}function nb(){ka&&ka.remove();ka=null;na&&t.unsubscribe(na);na=null;ma&&clearTimeout(ma);ma=null;}function ob(xb){var yb=hb(xb),zb=ib(xb),ac=jb(xb),bc=m.get(xb,'flloc'),cc=kb(xb),dc=lb(xb),ec=mb(xb);q.init(ha,yb,bc,zb,ac,cc,dc,ec);l.conditionClass(ha,'followButtonFlyout',l.hasClass(xb,'profileFollowButton'));l.conditionClass(ha,'friendButtonFlyout',l.hasClass(xb,'FriendRequestFriends')||l.hasClass(xb,'FriendRequestIncoming')||l.hasClass(xb,'FriendRequestOutgoing'));l.conditionClass(ha,'likeButtonFlyout',l.hasClass(xb,'profileLikeButton'));var fc=p.scry(ha,'div.uiScrollableArea')[0];fc&&y.poke(fc);var gc=aa.find(ha)[0];gc&&gc.focus();}function pb(xb){if(!ea||ga)return;ea.setContext(xb);ea.setCausalElement(xb);xb.setAttribute('aria-expanded','true');if(db(xb)){l.addClass(xb,"_52nd");if(l.hasClass(xb,'uiButton')||l.hasClass(xb,"_42fu"))l.addClass(xb,'selected');}ea.show();ja=xb;ga=true;var yb=null;if(ha){yb='show';ob(xb);}else{yb='init_show';new i().setURI('/ajax/friends/lists/flyout_content.php').setStatusElement(ea.getContent()).send();}nb();ka=g.listen(xb,'mouseleave',sb);na=t.subscribe('show',qb);if(m.get(xb,'flfcloselistener'))clearTimeout(m.remove(xb,'flfcloselistenertimeout'));var zb=hb(xb);r.getFriend(zb,function(ac){if(ac.status==r.ARE_FRIENDS)new i().setURI('/ajax/friends/lists/flyout_log.php').setData({target_id:hb(xb),unref:kb(xb),action:yb}).send();if(!ia)return;if(ac.status==r.OUTGOING_REQUEST){l.show(ia);i.bootstrap('/ajax/friends/lists/nux_flyout.php',null,true);}else l.hide(ia);});if(!fa||xb.id!==fa.id){h.inform('listeditor/close_editor');h.inform('friend-list/close_editor');}fa=xb;}function qb(xb,yb){if(!(yb instanceof k)||!p.contains(ja,yb.getContext()))sb();}function rb(xb){ja=xb;la=setTimeout(pb.bind(null,xb),qa);ka=g.listen(xb,'mouseleave',function(){clearTimeout(la);ja=null;ka&&ka.remove();});}function sb(){ma=setTimeout(ub,150);}function tb(){var xb=n.getCurrent(),yb=xb&&xb.getBody();return !!(yb&&p.scry(yb,'.friendListDialogTourCarousel')[0]);}function ub(){if(oa||tb())return;ra=false;if(ea){ea.hide();var xb=ea.getCausalElement();xb&&xb.setAttribute('aria-expanded','false');}}function vb(event){var xb=x.byTag(event.getTarget(),'a');if(xb&&l.hasClass(xb,'FriendListActionItem'))sb();}function wb(xb){var yb=m.remove(xb,'flfcloselistener');yb&&yb();}e.exports=a.FriendListFlyoutController||ta;},null);
|
|
__d("AddFriendButton",["Event","Animation","Arbiter","AsyncRequest","AsyncResponse","collectDataAttributes","CSS","DOMQuery","FriendListFlyoutController","FriendStatus","ge","goURI","Style","SubscribeButton","URI","XPubcontentChainedSuggestionsController"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){b.__markCompiled&&b.__markCompiled();var w={ERROR_ALREADY_ADDED:1431005,init:function(x,y,z,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka){var la=x.id,ma=null,na=n.scry(x,'.addButton')[0],oa=n.scry(x,'.addFriendText')[0],pa=n.scry(x,'.outgoingButton')[0],qa=n.scry(x,'.incomingButton')[0],ra=n.scry(x,'.friendButton')[0],sa=n.scry(x.parentNode,'.suggestFriendsButton')[0];function ta(ab,bb,cb){var db=new u(na.getAttribute('ajaxify')),eb=l(x,['ft','gt']);new j().setURI(ca).setData({to_friend:y,action:ab,how_found:aa,ref_param:ba,link_data:eb,outgoing_id:pa.id,xids:db.getQueryData().xids,logging_location:da,no_flyout_on_click:ea,ego_log_data:fa,http_referer:ha,floc:ja,frefs:ka}).setErrorHandler(bb).setServerDialogCancelHandler(cb).setRelativeTo(pa).send();if(ia&&ab==='add_friend'){var fb=(v.getURIBuilder()).setInt('friendid',y).getURI();new j().setURI(fb).send();}i.inform(t.SUBSCRIBED,{profile_id:y.toString(),conntected:true});}function ua(ab,bb){if(oa){m.hide(oa);}else if(na)m.hide(na);pa&&m.hide(pa);qa&&m.hide(qa);ra&&m.hide(ra);if(ab)m.show(ab);if('Outgoing'==bb&&ma!=bb&&ga)new h(ab).from('backgroundColor','#FFF8CC').to('backgroundColor','transparent').from('borderColor','#FFE222').to('borderColor',s.get(ab,'borderLeftColor')).duration(2000).go();if('Requestable'==bb&&ma!=bb)sa&&m.hide(sa);ma&&m.removeClass(x,'fStatus'+ma);ma=bb;m.addClass(x,'fStatus'+bb);}function va(ab){if(m.hasClass(ab,'enableFriendListFlyout')){o.show(ab);}else o.hide();}var wa=i.subscribe('FriendRequest/change',function(ab,bb){za();if(bb.uid!=y)return;switch(bb.status){case p.ARE_FRIENDS:return ua(ra,'Friends');case p.INCOMING_REQUEST:return ua(qa,'Incoming');case p.OUTGOING_REQUEST:return ua(pa,'Outgoing');case p.CAN_REQUEST:return ua(oa?oa:na,'Requestable');}}),xa=i.subscribe('FriendRequest/unfriend',function(ab,bb){za();if(bb.uid===y&&bb.shouldHideButton===true)m.hide(na);}),ya;if(z)ya=i.subscribe('FriendRequest/confirm',function(ab,bb){za();bb.uid==y&&r(z);});na&&g.listen(na,'click',function(){i.inform('FriendRequest/sending',{uid:y});if(ea){o.setActiveNode(pa);}else va(pa);ta("add_friend",function(ab){var bb=ab.error==w.ERROR_ALREADY_ADDED?'FriendRequest/sent':'FriendRequest/sendFail';i.inform(bb,{uid:y});o.hide();k.defaultErrorHandler(ab);},function(ab){i.inform('FriendRequest/sendFail',{uid:y});o.hide();});});function za(){if(q(la))return;wa&&wa.unsubscribe();ya&&ya.unsubscribe();xa&&xa.unsubscribe();wa=null;ya=null;xa=null;}}};e.exports=w;},null);
|
|
__d("legacy:DynamicFriendListEducation",["DynamicFriendListEducation"],function(a,b,c,d){b.__markCompiled&&b.__markCompiled();a.DynamicFriendListEducation=b('DynamicFriendListEducation');},3);
|
|
__d("FriendButtonIcon",["Arbiter","FriendStatus","Button","arrayContains"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();e.exports={register:function(k,l,m){g.subscribe('FriendListMembershipChange',function(n,o){if(o.uid==m){var p=j(o.lists,h.CLOSE_FRIENDS),q=j(o.lists,h.ACQUAINTANCES);if(p&&!q){i.setIcon(k,l.close);}else if(q&&!p){i.setIcon(k,l.acquaintance);}else i.setIcon(k,l.friend);}});}};},null);
|
|
__d("FriendListMenu",["Event","Arbiter","AsyncRequest","CSS","DOM","HTML","Focus","Input","Keys","MenuDeprecated","Parent"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){b.__markCompiled&&b.__markCompiled();var r={init:function(s){p.register(s,false);var t=k.find(s,'.FriendListCreateTrigger'),u=k.find(s,'.CreateListInputItem'),v=k.find(u,'.createListInput');p.subscribe('select',function(w,x){if(x.item==t){j.addClass(s,'FriendListMenuCreate');m.set(v);}});g.listen(v,'blur',function(w){if(n.isEmpty(v))j.removeClass(s,'FriendListMenuCreate');});g.listen(v,'keydown',function(w){if(g.getKeyCode(w)==o.RETURN&&/[^\s]/.test(v.value))new i().setURI('/ajax/friends/lists/create.php').setData({name:v.value,id:s.id}).setHandler(function(){n.reset(v);j.removeClass(s,'FriendListMenuCreate');}).send();});h.subscribe('friend-list/new',function(w,x){var y=l(x.new_li).getRootNode();k.insertBefore(t,y);if(x.id===s.id){p.focusItem(y);p.inform('select',{menu:q.byClass(y,'uiMenu'),item:y});}else p.toggleItem(y);});h.subscribe('friend-list/close_editor',function(){var w=q.byClass(s,'FlyoutFriendMenu');j.removeClass(w,'addToListsOpen');j.addClass(w,'addToListsClosed');});},addToAnotherList:function(s,t){g.listen(s,'click',function(event){var u=q.byClass(s,'FlyoutFriendMenu');j.removeClass(u,'addToListsClosed');j.addClass(u,'addToListsOpen');});},goBack:function(s,t){g.listen(s,'click',function(event){var u=q.byClass(s,'FlyoutFriendMenu');j.removeClass(u,'addToListsOpen');j.addClass(u,'addToListsClosed');});}};e.exports=r;},null);
|
|
__d("RestrictedFriendListEducation",["Arbiter","AsyncRequest"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();var i,j;function k(m,n){if(n.flid==i)if(m=='FriendListHovercard/add'){if(j)return;j=true;new h().setURI('/ajax/friends/lists/restricted_edu.php').setData({target:n.uid,flid:n.flid}).send();}else if(m=='RestrictedListNUX/okay')new h().setURI('/ajax/friends/lists/nux_log.php').setData(n).send();return true;}var l={init:function(m){i=m;g.subscribe(['FriendListHovercard/add','RestrictedListNUX/okay'],k);}};e.exports=l;},null);
|
|
__d("legacy:FriendListRestrictedEducation",["RestrictedFriendListEducation"],function(a,b,c,d){b.__markCompiled&&b.__markCompiled();a.RestrictedFriendListEducation=b('RestrictedFriendListEducation');},3);
|
|
__d("GroupsMemberCountUpdater",["Arbiter","DOM"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();function i(){}i.subscribeMemberCount=function(j){g.subscribe('GroupsMemberCount/changeText',function(k,l){h.setContent(j,l);});};i.subscribeNewMemberCount=function(j){g.subscribe('GroupsMemberCount/changeNewMembersText',function(k,l){h.setContent(j,l);});};e.exports=i;},null);
|
|
__d("NotificationsSelector",["Parent","submitForm","AsyncRequest","Event"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();function k(m,n,o){n.subscribe('change',function(p,q){o.value=q.value;var r=g.byTag(m,'form');r&&h(r);});}function l(m,n,o,p,q,r){n.subscribe('change',function(s,t){new i().setURI('/ajax/groups/notifications/update.php').setData({setting:t.value,group_id:p}).setMethod('POST').send();});if(q)q.subscribe('hide',function(){if(r)new i().setURI(r).setData({group_id:p}).setMethod('POST').send();});j.listen(m,'click',function(){if(q&&q.isShown())q.hide();});}e.exports.bindForm=k;e.exports.updateNotif=l;},null);
|
|
__d("XGroupsRHCSuggestionXoutController",["XController"],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports=b("XController").create("\/groups\/xout_suggested_group\/",{id:{type:"Int",required:true}});},null);
|
|
__d("GroupSuggestionXoutHandler",["Event","AsyncRequest","DOM","XGroupsRHCSuggestionXoutController","csx"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();var l={onclick:function(m,n,o){g.listen(m,'click',function(){var p=j.getURIBuilder().setInt('id',n).getURI();new h().setURI(p).send();var q=i.find(document,'#'+o);i.remove(q);var r=i.scry(document,"div._1spx");if(r.length===0){var s=i.find(document,'#GroupsRHCSuggestionSection');if(s!==null)i.remove(s);}});}};e.exports=l;},null);
|
|
__d("GroupsAddTypeaheadView",["Arbiter","ContextualTypeaheadView"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();for(var i in h)if(h.hasOwnProperty(i))k[i]=h[i];var j=h===null?null:h.prototype;k.prototype=Object.create(j);k.prototype.constructor=k;k.__superConstructor__=h;function k(){"use strict";if(h!==null)h.apply(this,arguments);}k.prototype.select=function(l){"use strict";var m=this.results[this.index];g.inform('GroupsMemberSuggestion/remove',m.uid);if(m.is_member){this.reset();}else j.select.call(this,l);};e.exports=k;},null);
|
|
__d("GroupsAddMemberTypeahead",["Arbiter","DOM","Typeahead","copyProperties","ge"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();function l(m,n){if(m&&n)this.init(m,n);}j(l.prototype,{init:function(m,n){m.subscribe('select',function(o,p){g.inform('GroupsAddMemberTypeahead/add',{gid:n,uid:p.selected.uid,name:p.selected.text,photo:p.selected.photo});var q=m.getData().getExclusions();q.push(p.selected.uid);m.getData().setExclusions(q);});g.subscribe('GroupsAddMemberTypeahead/updateGroupToken',this.resetTypeaheadCaches.bind(this));},resetTypeaheadCaches:function(m,n){var o=h.scry(k('pagelet_group_'),'.uiTypeahead:not(.uiPlacesTypeahead)');for(var p=0;p<o.length;p++){var q=i.getInstance(o[p]);if(q){var r=q.getData();r.updateToken(n.token);q.getCore().subscribe('focus',r.bootstrap.bind(r));}}}});e.exports=l;},null);
|
|
__d("legacy:GroupsAddMemberTypeahead",["GroupsAddMemberTypeahead"],function(a,b,c,d){b.__markCompiled&&b.__markCompiled();a.GroupsAddMemberTypeahead=b('GroupsAddMemberTypeahead');},3);
|
|
__d("XEgoHideLoggingController",["XController"],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports=b("XController").create("\/ego\/feed\/logging\/xout\/",{ego_id:{type:"Int",required:true},qid:{type:"Int",required:true},mf_story_key:{type:"Int",required:true}});},null);
|
|
__d("PymkXout",["Event","DOM","CSS","Arbiter","XEgoHideLoggingController","AsyncSignal"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();var m={init:function(n,o,p,q){g.listen(o,'click',function(event){this._logForItem(n);if(p==='pymk_jewel'||p==='pymk_jewel_first_page'){i.hide(n);}else h.remove(n);var r=event.getTarget().getAttribute('data-pymk-id');if(r)j.inform('x-out-pymk-suggestions',{id:r});}.bind(this));if(!q){g.listen(n,'mouseover',function(){i.show(o);});g.listen(n,'mouseout',function(){i.hide(o);});}},_logForItem:function(n){var o=JSON.parse(n.getAttribute('data-ft'));if(!o)return;if(!o.ego_id)return;var p=k.getURIBuilder().setInt('ego_id',o.ego_id).setInt('qid',o.qid).setInt('mf_story_key',o.mf_story_key).getURI();new l(p,{}).send();}};e.exports=m;},null);
|
|
__d("LitestandRHCAds",["AdsRefreshHandler","Arbiter","DOM","Event","NavigationMessage","Run","SubscriptionsHandler","csx","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){b.__markCompiled&&b.__markCompiled();var p,q,r,s,t;function u(){q&&q.forceLoadIfEnoughTimePassed(0);}function v(){var aa=i.scry(r,"._5f85 a")[0];if(aa)p.addSubscriptions(j.listen(aa,'click',u));}function w(){var aa=o(s);if(aa&&t){aa.appendChild(t);t=null;}}function x(){if(q){q.cleanup();q=null;}if(p){p.release();p=null;}t=null;}function y(aa,ba){t=ba;u();}var z={init:function(aa,ba,ca){r=o(aa);s=aa;q=new g(r,ba,ca).subscribeDefaultEventsForRefresh();p=new m();p.addSubscriptions(h.subscribe(k.NAVIGATION_BEGIN,x),h.subscribe('AdsRefreshHandler/AdsLoaded',v),h.subscribe('AdsRefreshHandler/AdsLoaded',w),h.subscribe('ProfileQuestionAnswered',y));v();l.onLeave(x);}};e.exports=z;},null);
|
|
__d("Optimus",["Event","Parent"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();"use strict";var i={};function j(l,m){var n=m.getTarget();if(!n)return;var o=i[l];for(var p in o){var q=h.byAttribute(n,p);if(q)do{var r=o[p][q.getAttribute(p)];if(r&&r.handleOptimus(l,q,m)===false)break;}while(q=h.byAttribute(q.parentNode,p));}}function k(l,m,n,o){if(!i[l]){i[l]={};g.listen(document.documentElement,l,j.bind(null,l));}if(!i[l][m])i[l][m]={};if(!i[l][m][n])i[l][m][n]=o;}e.exports={addRelClick:function(l,m){k('click','rel',l,m);},addEventListener:k};},null);
|
|
__d("PopoverMenuDynamicIcon",["Button","CSS","DOM","DOMQuery","copyProperties","csx"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();function m(n){"use strict";this._popoverMenu=n;}m.prototype.enable=function(){"use strict";this._setMenuSubscription=this._popoverMenu.subscribe('setMenu',this._onSetMenu.bind(this));};m.prototype.disable=function(){"use strict";this._popoverMenu.unsubscribe(this._setMenuSubscription);this._setMenuSubscription=null;this._removeChangeSubscription();};m.prototype._onSetMenu=function(){"use strict";this._removeChangeSubscription();this._menu=this._popoverMenu.getMenu();this._changeSubscription=this._menu.subscribe('change',function(n,o){var p=o.item;if(o[0])p=o[0].item;if(!p)return;var q=p.getIcon();q=q?q.cloneNode(true):null;var r=this._popoverMenu.getTriggerElem(),s=j.scry(r,"span._55pe")[0];if(s){var t=s.firstChild;if(h.hasClass(t,'img')){i.replace(t,q);}else i.prependContent(s,q);}else g.setIcon(r,q);}.bind(this));};m.prototype._removeChangeSubscription=function(){"use strict";if(this._changeSubscription){this._menu.unsubscribe(this._changeSubscription);this._changeSubscription=null;}};k(m.prototype,{_setMenuSubscription:null,_changeSubscription:null});e.exports=m;},null);
|
|
__d("PopoverMenuShowOnHover",["Event"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h=250;function i(j){"use strict";this._popoverMenu=j;this._listeners=[];}i.prototype.enable=function(){"use strict";this._attachMouseListeners(this._popoverMenu.getTriggerElem());this._setMenuSubscription=this._popoverMenu.subscribe('setMenu',this._onSetMenu.bind(this));};i.prototype.disable=function(){"use strict";while(this._listeners.length)this._listeners.pop().remove();if(this._setMenuSubscription){this._setMenuSubscription.unsubscribe();this._setMenuSubscription=null;}};i.prototype._onSetMenu=function(){"use strict";this._attachMouseListeners(this._popoverMenu.getPopover().getLayer().getRoot());};i.prototype._attachMouseListeners=function(j){"use strict";var k=this._popoverMenu.getPopover(),l=null;this._listeners.push(g.listen(j,'mouseleave',k.hideLayer.bind(k)),g.listen(j,'mouseenter',function(){l=Date.now();k.showLayer();}),g.listen(j,'click',function(m){if(Date.now()<l+h)m.stop();}));};e.exports=i;},null);
|
|
__d("EgoUnitClickHandler",["CSS","DOM","Event","csx","goURI"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();var l={};l.stealHref=function(m){var n=h.find(m.parentNode,'a.ego_title');m.setAttribute('href',n.href);};l.register=function(m){i.listen(m,'click',function(n){var o=h.find(m,'a.ego_title');if(l.enabled&&o&&o.href)k(o.href);});i.listen(m,'mouseover',function(n){var o=h.find(m,'a.ego_title'),p=h.find(m,"a._8o .img"),q=n.getTarget(),r;if(q.tagName==='A'||q.tagName==='a'){r=q;}else{var s=h.scry(q,"^a");if(s.length===1)r=s[0];}if(r&&r.href!=o.href&&(!p||r.href!=p.href)){g.removeClass(o,'always_underlined');l.enabled=false;}else{g.addClass(o,'always_underlined');l.enabled=true;}});i.listen(m,'mouseout',function(n){var o=h.find(m,'a.ego_title');g.removeClass(o,'always_underlined');l.enabled=false;});};e.exports=l;},null);
|
|
__d("PhotoSessionLog",["AsyncRequest","Run","Vector","copyProperties"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();function k(){}j(k,{UNKNOWN:0,ESC:1,X:2,OUTSIDE:3,UNLOAD:4,NAVIGATE:5,AGGREGATE:6,LEAVE:7,PERMALINK:0,SNOWLIFT:6,SNOWDOWN:13,AGGREGATION_COUNT:20,set:null,time:null,views:0,fbidList:[],details:{},width:0,height:0,first:false,last:false,logIds:false,version:null,source:null,buttonLikes:0,pagingAction:'',cycle:false,endOfRelevant:false,relevantCount:0,initLogging:function(l){this.set=null;this.time=new Date();this.views=0;this.hiResLoads=0;this.fullScreenViews={};this.first=true;this.last=false;this.logIds=false;this.version=l;this.buttonLikes=0;this.pagingAction='';this.cycle=false;this.endOfRelevant=false;this.relevantCount=0;this.panoramaClicks=0;this.panoramaImpressions=0;if(l===k.SNOWLIFT){var m=i.getViewportDimensions();this.width=m.x;this.height=m.y;}},setLogFbids:function(l){this.logIds=l;},setPhotoSet:function(l){this.set=l;},addButtonLike:function(){this.buttonLikes++;},setPagingAction:function(l){this.pagingAction=l;},setCycle:function(l){this.cycle=l;},setEndOfRelevant:function(l){this.endOfRelevant=l;},setRelevantCount:function(l){this.relevantCount=l;},setEndMetrics:function(l){this.endMetrics=l;},setSource:function(l){this.source=l;},addPanoramaClick:function(){this.panoramaClicks++;},addPanoramaImpression:function(){this.panoramaImpressions++;},addPhotoView:function(l,m,n){if(this.logIds&&this.views>=this.AGGREGATION_COUNT)this.logPhotoViews(this.AGGREGATE);this.views++;if(l)this.fbidList.push([l.fbid,l.owner,Date.now()]);if(m)this.hiResLoads++;if(n)this.fullScreenViews[l.fbid]=true;},logEnterFullScreen:function(l){this.fullScreenViews[l]=true;},addDetailData:function(l,m){if(!this.details[l])this.details[l]={t:m.num_tags,l:m.has_location,c:m.has_caption,cm:m.comment_count,lk:m.like_count,w:m.width,h:m.height,ad:'{}',p:this.pagingAction};},updateAdData:function(l,m){if(this.details[l])this.details[l].ad=JSON.stringify(m);},logPhotoViews:function(l){if(!this.views)return;if(l!=this.AGGREGATE)this.last=true;var m={set:this.set,time:new Date()-this.time,fbids:this.logIds?this.fbidList:[],details:this.logIds?this.details:{},first:this.first,last:this.last,close:l?l:this.UNKNOWN,button_likes:this.buttonLikes,version:this.version,endmetric:this.endMetrics,cycle:this.cycle,end_relev:this.endOfRelevant,relev_count:this.relevantCount,source:this.source,panorama_clicks:this.panoramaClicks,panorama_impressions:this.panoramaImpressions};if(this.version===k.SNOWLIFT){var n=i.getViewportDimensions();m.width=n.x||this.width;m.height=n.y||this.height;if(this.hiResLoads>0)m.hires_loads=this.hiResLoads;if(this.last){var o=Object.keys(this.fullScreenViews).length;if(o>0)m.fullscreen=o;}}new g().setURI('/ajax/photos/logging/session_logging.php').setAllowCrossPageTransition(true).setOption('asynchronous',(l!=k.UNLOAD)).setOption('suppressErrorHandlerWarning',true).setData(m).send();this.views=0;this.hiResLoads=0;this.fbidList=[];this.details={};this.first=false;this.buttonLikes=0;if(this.last){this.set=null;this.logIds=false;this.fullScreenViews={};}}});h.onUnload(function(){k.logPhotoViews(k.UNLOAD);});h.onLeave(function(){k.logPhotoViews(k.LEAVE);});e.exports=k;},null);
|
|
__d("PhotosUtils",["copyProperties","Vector"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();function i(){}g(i,{getNearestBox:function(j,k){var l=Infinity,m=null;for(var n in j){var o=j[n];if(o.contains(k)){var p=k.distanceTo(o.getCenter());if(p<l){l=p;m=n;}}}return m;},absoluteToNormalizedPosition:function(j,k){var l=h.getElementPosition(j),m=h.getElementDimensions(j),n=k.sub(l).mul(100/m.x,100/m.y);n.domain='pure';return n;},normalizedToAbsolutePosition:function(j,k){var l=h.getElementPosition(j),m=h.getElementDimensions(j),n=k.mul(m.x/100,m.y/100).add(l);n.domain='document';return n;},isFacebox:function(j){return j.match(/^face:/);},isTag:function(j){return j.match(/^tag:/);}});e.exports=i;},null);
|
|
__d("PhotoPermalinkURI",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();var g={isValid:function(h){return g.parse(h)!==null;},parse:function(h){if(this.isValidLegacy(h)){var i=h.getQueryData();if(i.fbid)return {photo_id:i.fbid,set_token:i.set};if(i.id&&i.pid)return {photo_id:i.id+':'+i.pid,set_token:i.set};return null;}var j=h.getPath();if(j[j.length-1]==='/')j=j.substring(0,j.length-1);var k=j.split('/');if(k.length>=3&&k[2]==='photos')if(k.length===4&&/^\d+$/.exec(k[3])!==null){return {photo_id:k[3],set_token:null};}else if(k.length===5&&/^\d+$/.exec(k[4])!==null)return {photo_id:k[4],set_token:k[3]};return null;},isValidLegacy:function(h){var i=h.getPath();if(i[i.length-1]==='/')i=i.substring(0,i.length-1);if(i==='/photo.php'||i==='/force_photo/photo.php'||i==='/photo'||i==='/force_photo/photo/index.php'||i==='/photo/index.php'||i==='/force_photo/photo')return true;return false;}};e.exports=g;},null);
|
|
__d("PhotoTagSearchPivotLogger",["Banzai"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h={};g.subscribe(g.SHUTDOWN,function(){Object.keys(h).forEach(function(l){var m=h[l];Object.keys(m).forEach(function(n){g.post('photo_tag_search_pivot',{source:l,action:n,count:m[n]});});});});var i=/^(perm:)?tag:/,j,k={logImpression:function(l,m){var n=l in h?h[l]:(h[l]={});n[m]=m in n?n[m]+1:1;},logImageImpression:function(l,m,n){if(j!==m){if(n.some(function(o){return i.test(o);}))this.logImpression(l,'image_impression');j=m;}},logPivotImpression:function(l,m){if(i.test(m))this.logImpression(l,'pivot_impression');},logShowMorePhotos:function(){this.logImpression('photoset','show_more_photos');},logHideMorePhotos:function(){this.logImpression('photoset','hide_more_photos');},logSuggestMorePhotos:function(){this.logImpression('photoset','suggest_more_photos');},logMorePhotosNavigation:function(l){g.post('photo_tag_search_pivot',{source:'photoset',action:'more_photos_search',query:l,count:1});}};e.exports=k;},null);
|
|
__d("PhotosetSearchPivot.react",["LeftRight.react","PhotoTagSearchPivotLogger","PhotosetSearchPivotData","React","XUISpinner.react","XUIText.react","cx","fbt","joinClasses"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){b.__markCompiled&&b.__markCompiled();var p=j,q=p.PropTypes,r=j.createClass({displayName:"PhotosetSearchPivotItem",propTypes:{normalized:q.string,title:q.object,uri:q.string,images:q.array},onClick:function(){h.logMorePhotosNavigation(this.props.normalized);},render:function(){return (j.createElement("div",{className:"_25r"},j.createElement("a",{onClick:this.onClick,href:this.props.uri,className:"_25t _3-8t"},j.createElement("div",{className:"_25u"},j.createElement("div",{className:"_25v _25w",style:{backgroundImage:'url('+this.props.images[0].uri+')'}}),j.createElement("div",{className:"_25x"},j.createElement("div",{className:"_25y"},j.createElement("div",{className:"_25z"}),j.createElement("div",{className:"_26r"},j.createElement("div",{className:"_273 _25w",style:{backgroundImage:'url('+this.props.images[1].uri+')'}}))),j.createElement("div",{className:"_274"},j.createElement("div",{className:"_25z"}),j.createElement("div",{className:"_26r"},j.createElement("div",{className:"_273 _25w",style:{backgroundImage:'url('+this.props.images[2].uri+')'}}))))),j.createElement(l,{display:"block",className:"_27f _2pi4",dangerouslySetInnerHTML:{__html:this.props.title.__html}}))));}}),s=j.createClass({displayName:"PhotosetSearchPivot",propTypes:{fbid:q.string,endofalbum:q.bool,withBackground:q.bool,linesAroundHeader:q.bool,onclose:q.func},fetchPivots:function(t){i.fetch(t).then(function(u){setTimeout(this.onFetchSuccess.bind(this,t,u.pivots),0);}.bind(this),function(u){setTimeout(this.onFetchError.bind(this,t),0);}.bind(this));},onFetchSuccess:function(t,u){if(!this.isMounted()||this.props.fbid!==t)return;u=u||[];var v='show';if(u.length===0)v='hide';this.setState({pivots:u,action:v});},onFetchError:function(t){if(!this.isMounted()||this.props.fbid!==t)return;this.setState({pivots:[],action:'hide'});},getInitialState:function(){this.fetchPivots(this.props.fbid);return {pivots:[],action:'loading'};},componentWillReceiveProps:function(t){if(t.fbid){this.setState({action:'loading'});this.fetchPivots(t.fbid);}else this.setState({action:'hide',pivots:[]});},onExitClicked:function(){this.props.onclose();},render:function(){if(this.state.action==='loading')return (j.createElement("div",{className:o(this.props.className,"_27h _2ph_")},j.createElement(k,{size:"large"})));if(this.state.action==='hide')return j.createElement("span",null);var t=this.state.pivots.map(function(x){return j.createElement(r,{normalized:x.normalized,title:x.title,uri:x.uri,images:x.images});}),u=this.props.endofalbum?j.createElement("span",{className:"_2pij"},n._("End of album")):null,v=(("_27m")+(' '+"_2pi3")+(' '+"_2pib")+(this.props.linesAroundHeader?' '+"_3-te":'')),w=j.createElement("span",null,u,j.createElement("span",{className:"_4ptz"},n._("Other photos you may like")));if(this.props.onclose){w=j.createElement(g,{className:v},w,j.createElement("a",{href:"#",onClick:this.onExitClicked,className:"_27n"}));}else w=j.createElement("div",{className:v},w);return (j.createElement("div",{className:o(this.props.className,((this.state.action==='hide'?"_27j":'')+(this.state.action==='show'?' '+"_27k":'')))},j.createElement("div",{className:(("_27l")+(this.props.withBackground?' '+"_3-tf":''))},w,j.createElement("div",{className:"_27o _2pi8 clearfix"},t))));}});e.exports=s;},null);
|
|
__d("PhotosetPivotSlide.react",["Image.react","Link.react","PhotosetSearchPivot.react","React","XUIText.react","cx","fbt","xuiglyph"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){b.__markCompiled&&b.__markCompiled();var o=j,p=o.PropTypes,q=j.createClass({displayName:"PhotosetPivotSlide",propTypes:{fbid:p.string,isAlbum:p.bool,albumOwnerName:p.string,visible:p.bool,onReturn:p.func},render:function(){return (j.createElement("div",{className:(("_1_ap")+(this.props.visible?' '+"_1_aq":''))},j.createElement("div",{className:"_1_ar"},j.createElement(k,{display:"block"},this._getEndOfAlbumTitle()),j.createElement(h,{className:"_1_as",onClick:this.props.onReturn},j.createElement(g,{className:"_1_at",src:n({name:'arrow-right',shade:'white',size:'small'})}),m._("Return to beginning"))),j.createElement(i,{className:"_1_au",fbid:this.props.visible?this.props.fbid:null,linesAroundHeader:true})));},_getEndOfAlbumTitle:function(){if(this.props.albumOwnerName){if(this.props.isAlbum){return (m._("End of {user_name}'s album",[m.param("user_name",j.createElement(k,{weight:"bold"},this.props.albumOwnerName))]));}else return (m._("End of {user_name}'s photos",[m.param("user_name",j.createElement(k,{weight:"bold"},this.props.albumOwnerName))]));}else if(this.props.isAlbum){return (m._("End of album"));}else return (m._("End of photos"));}});e.exports=q;},null);
|
|
__d("PhotoSnowliftAds",["Arbiter","Event","copyProperties","CSS","csx","DataStore","DOM","PhotoSessionLog","UIPagelet","URI","Vector","extendArray"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){b.__markCompiled&&b.__markCompiled();var s={REFRESH_RATE:30000,UNITS_REGISTER_DELAY:1000,root:null,availableDimensions:null,loadQuery:null,lastLoadTime:0,minAds:100,units:null,isLogAdData:null,displayedCallback:null,position:null,adsStatus:'null',adsEvents:{},resetEvents:function(){this.adsStatus='reset';this.adsEvents={};},addEvent:function(t,u){if(u)this.adsStatus=t;var v=Date.now();this.adsEvents[t+'_'+v]=v;},init:function(t,u,v,w){this.reset();this.root=t;this.snowlift=u;this.minAds=v.min_ads;this.displayedCallback=w;this.addEvent('init',true);},reset:function(){this.lastLoadTime=0;this.position=0;this.units=[];this.resetEvents();this.addEvent('reset',true);},resize:function(t){this.availableDimensions=t;this.loadQuery=this.snowlift.getLoadQuery();this.processResize();},calculateUnitSizes:function(t,u,v){var w={};t.forEach(function(x){var y=x.root.firstChild.offsetHeight;x.units.forEach(function(aa){if(!j.hasClass(aa,'hidden')&&!this.getIsHoldout(aa)&&!this.getIsShadow(aa)){var ba=this.getHeight(aa.firstChild,u);y-=ba;}}.bind(this));var z={height:y,visible:false};x.units.forEach(function(aa){var ba=this.getIsAds(aa),ca=this.getHeight(aa.firstChild,u),da=this.getUnitId(aa),ea=this.getIsHoldout(aa);if(ea&&v)return;w[da]={height:ca,visible:false,priority:0,is_ads:ba,is_holdout:ea,section_ref:z};}.bind(this));}.bind(this));return w;},calculateVisibleUnits:function(t,u,v){var w=0,x=this.getUnitPriority(u);x.forEach(function(y){if(u.hasOwnProperty(y)){var z=u[y],aa=z.height;if(!z.section_ref.visible)aa+=z.section_ref.height;z.height_below=v-aa;z.visible=z.height_below>=0&&aa>0;if(z.visible){z.section_ref.visible=true;v-=aa;w++;}}}.bind(this));return u;},displayUnits:function(t,u){t.forEach(function(v){var w=false,x=true;v.units.forEach(function(y){var z=this.getUnitId(y),aa=u[z];if(!aa)return;var ba=aa.visible,ca=aa.height_below,da=aa.is_ads;j.conditionClass(y,'hidden',!ba);if(da&&ba&&x){var ea=m.find(y,'div.ego_unit');j.addClass(ea,'ego_unit_no_top_border');x=false;}w=w||ba;this.calcUnitStats(this.units[da][z],ba,ca);}.bind(this));j.conditionClass(v.root,'hidden',!w);}.bind(this));g.inform('PhotoSnowliftAds/displayUnits');},getUnitsDisplayed:function(t,u){var v=0;t.forEach(function(w){w.units.forEach(function(x){var y=this.getUnitId(x),z=u[y];if(!z||!z.visible)return;v++;}.bind(this));}.bind(this));return v;},getHeightsRequired:function(t,u){var v=0,w=[];t.forEach(function(x){var y=false;x.units.forEach(function(z){var aa=this.getUnitId(z),ba=u[aa];if(!ba)return;v+=ba.height;if(!y){v+=ba.section_ref.height;y=true;}w.push(v);}.bind(this));}.bind(this));return w;},getUnitPriority:function(t){var u=[],v=0,w=0;for(var x in t){var y=t[x];u.push(x);var z=this.minAds+v+w;if(y.is_ads){if(w<this.minAds)z=w;w++;}else v++;y.priority=z;}u=u.sort(function(aa,ba){var ca=t[aa],da=t[ba];return ca.priority-da.priority;}.bind(this));return u;},updateUnitsStatus:function(){var t=this.availableDimensions.x,u=this.availableDimensions.y,v=this.calculateUnitSizes(this.sections,t);v=this.calculateVisibleUnits(this.sections,v,u);for(var w in v){if(!v.hasOwnProperty(w))continue;var x=v[w];if(!x.is_holdout||!x.visible)continue;var y=this.units[1][w];this.calcUnitStats(y,x.visible,x.height_below);}v=this.calculateUnitSizes(this.sections,t,true);v=this.calculateVisibleUnits(this.sections,v,u);this.displayUnits(this.sections,v);if(this.displayedCallback){var z=this.getUnitsDisplayed(this.sections,v),aa=this.getHeightsRequired(this.sections,v);this.displayedCallback(z,aa);}},calcUnitStats:function(t,u,v){var w=Date.now();if(t.visible)t.totalTime+=w-t.lastShowTime;if(t.trackingCode!==null&&t.totalTime>=this.UNITS_REGISTER_DELAY){var x=t.trackingCode;t.trackingCode=null;this.registerImpression(x,t.registerUrl);}t.visible=u;t.heightBelow=v;t.lastShowTime=w;},prepareResize:function(){var t=function(u){var v=m.create('div',{className:'inner'}),w=m.create('div',{className:'wrapper'},v);m.replace(u,w);m.setContent(v,u);return w;};this.sections=m.scry(this.root,'div.ego_section').map(function(u){return {root:t(u),units:m.scry(u,'div.ego_unit').map(t)};});},processResize:function(){if(this.isLoading||this.lastLoadTime===0||this.availableDimensions===null){this.setLogData();return;}this.updateUnitsStatus();this.setLogData();var t=this.nextRegisterTime();if(t!==Infinity)setTimeout(this.processResize.bind(this),t);},setIsLogAdData:function(t){this.isLogAdData=t;this.addEvent('setIsLogAdData',false);this.setLogData();},setLogData:function(){var t=this.snowlift.getImageId();if(this.isLogAdData&&t){var u=q.getElementDimensions(this.snowlift.getImage()),v=q.getElementDimensions(this.snowlift.getRHCHeader()),w=q.getElementDimensions(this.snowlift.getRHCBody()),x=q.getElementDimensions(this.snowlift.getRHCFooter()),y={query_set:this.snowlift.getLoadQuery().set,window_x:window.innerWidth,window_y:window.innerHeight,image_x:u.x,image_y:u.y,header_x:v.x,header_y:v.y,body_x:w.x,body_y:w.y,footer_x:x.x,footer_y:x.y,ads_below_space:this.getAdsBelowSpace(),time:Date.now(),adsStatus:this.adsStatus,adsEvents:this.adsEvents,refreshRate:this.refreshUnitsRate,position:this.position};n.updateAdData(t,y);}},getAdsBelowSpace:function(){var t=[],u=this.units[1];for(var v in u)if(u.hasOwnProperty(v)&&!this.getIsHoldout(this.getAdUnit(v)))t.push(u[v].heightBelow);return t;},getIsAds:function(t){var u=m.scry(t,"div._4u8");return u.length;},getUnitId:function(t){if(this.getIsAds(t)){return this.getAdId(t);}else return this.getEgoId(t);},getEgoId:function(t){var u=m.find(t,'div.ego_unit');return u.getAttribute('data-ego-fbid');},getAdData:function(t){var u=m.find(t,"div._4u8"),v=u.getAttribute('data-ad');return v&&JSON.parse(v)||{};},getAdId:function(t){return this.getAdData(t).adid;},getIsHoldout:function(t){return t&&this.getIsAds(t)&&this.getAdData(t).holdout;},getIsShadow:function(t){return t&&this.getIsAds(t)&&this.getAdData(t).shadow;},getAdUnit:function(t){if(!this.sections)return null;var u=[];this.sections.forEach(function(w){r(u,w.units);});for(var v=0;v<u.length;v++)if(this.getIsAds(u[v])&&this.getAdId(u[v])==t)return u[v];return null;},nextRegisterTime:function(){var t=Infinity,u=i(i({},this.units[0]),this.units[1]);for(var v in u)if(u.hasOwnProperty(v)){var w=u[v];if(w.trackingCode!==null&&w.visible)t=Math.min(t,this.UNITS_REGISTER_DELAY-w.totalTime);}return t;},getHeight:function(t,u){var v=l.get(t,'height');if(v&&v.x===u)return v.y;return this.cacheHeight(t,u);},cacheHeight:function(t,u){var v={x:u,y:t.offsetHeight};l.set(t,'height',v);return v.y;},loadAdsAndEgo:function(){this.resetEvents();this.addEvent('adsRequested',true);this.position++;var t=this.getCursorFBID(this.loadQuery);o.loadFromEndpoint('WebEgoPane',this.root,{pid:34,data:[this.loadQuery.set,t,false,this.snowlift.getOpaqueCursor(t)]},{crossPage:true,bundle:false});},getCursorFBID:function(t){if(t.v!==(void 0))return t.v;if(t.fbid!==(void 0))return t.fbid;return '0';},unitsLoaded:function(t,u){var v;if(u){v='/ai.php';this.addEvent('adsLoaded',true);}else{v='/ajax/ei.php';this.addEvent('egoLoaded',true);}var w={};for(var x in t)if(t.hasOwnProperty(x))w[x]={trackingCode:t[x],totalTime:0,lastShowTime:0,heightBelow:-10000,visible:false,registerUrl:v};this.units[u]=w;if(u)this.waitForImages(this.imagesLoaded.bind(this));},imagesLoaded:function(){this.prepareResize();this.addEvent('imagesLoaded',true);this.lastLoadTime=Date.now();this.isLoading=false;this.processResize();j.removeClass(this.root,'loading');},loadAdsFromUserActivity:function(){var t=Date.now()-this.lastLoadTime;if(!this.isLoading&&t>s.REFRESH_RATE){j.addClass(this.root,'loading');this.isLoading=true;this.loadAdsAndEgo();}},registerImpression:function(t,u){var v=m.create('iframe',{src:p(u).addQueryData({aed:t}),width:0,height:0,frameborder:0,scrolling:'no',className:'fbEmuTracking'});v.setAttribute('aria-hidden','true');m.appendContent(this.root,v);},waitForImages:function(t){var u=m.scry(this.root,'img.img'),v=u.length,w=v;if(w===0)t();var x=function(){w--;if(w===0)setTimeout(t,0);};for(var y=0;y<v;y++){var z=u[y];if(z.complete){x();}else h.listen(z,{load:x,error:x,abort:x});}}};e.exports=s;},null);
|
|
__d("PhotoViewer",["Bootloader","CSS","DOM","copyProperties","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();function l(){"use strict";this.image=null;this.root=null;this.stream=null;}l.prototype.getEventString=function(m){"use strict";var n=this.getEventPrefix();if(n)return n+'.'+m;return null;};l.prototype.getImage=function(){"use strict";return this.image;};l.prototype.getPosition=function(){"use strict";return this.stream?this.stream.getCursor():null;};l.prototype.getRoot=function(){"use strict";return this.root;};l.prototype.hiliteAllBoxes=function(){"use strict";i.scry(this.stageWrapper,'div.tagsWrapper div.faceBox').forEach(function(m){h.addClass(m,'otherActive');});};l.bootstrap=function(m,n){"use strict";g.loadModules(["PhotoSnowlift"],function(o){o.bootstrap(m,n);});};j(l.prototype,{getEventPrefix:k.thatReturnsNull,getSourceString:k.thatReturnsNull,getVersionConst:k.thatReturnsNull,getViewerSource:k.thatReturnsNull,getViewerSet:k.thatReturnsNull});e.exports=l;},null);
|
|
__d("SnowliftVideoPivotsCarouselController",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();var g={setPivotsCarousel:function(h,i){this._pivotsCarousel=h;this.adjustCarousel(i);},adjustCarousel:function(h){if(this._pivotsCarousel)this._pivotsCarousel.pageTo(h);},adjustCarouselOnAutoPlay:function(){if(this._pivotsCarousel)this._pivotsCarousel.page();}};e.exports=g;},null);
|
|
__d("PhotoSnowlift",["Arbiter","AsyncRequest","Bootloader","CSS","Dialog","DOM","DOMQuery","DOMControl","Event","fbt","FullScreen","ImageUtils","Input","Keys","Layer","LayerHideOnEscape","LikeConfirmer","LinkController","LitestandStoryInsertionStatus","tickerPhoteSnowLiftOpenStatus","Locale","PageTransitions","Parent","PhotoLogger","PhotoPermalinkURI","PhotosConst","PhotoSessionLog","PhotosetPivotSlide.react","PhotosetSearchPivot.react","PhotosetSearchPivotData","PhotoSnowliftAds","PhotoStreamCache","PhotosUtils","PhotoTagSearchPivotLogger","PhotoViewer","React","Rect","ScriptPath","ScrollableArea","SnowliftVideoPivotsCarouselController","Style","Toggler","Tooltip","UFIFeedbackTargets","UIPagelet","URI","UserAgent_DEPRECATED","Vector","VideoPlayerReason","$","computeRelativeURI","copyProperties","createArrayFromMixed","csx","cx","emptyFunction","ge","getActiveElement","goURI","invariant","setTimeoutAcrossTransitions"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob){b.__markCompiled&&b.__markCompiled();var pb=74,qb=75,rb=70,sb=76,tb=315,ub=new RegExp('\\/posts\\/(\\d+)\\/?$');for(var vb in oa)if(oa.hasOwnProperty(vb))xb[vb]=oa[vb];var wb=oa===null?null:oa.prototype;xb.prototype=Object.create(wb);xb.prototype.constructor=xb;xb.__superConstructor__=oa;function xb(){"use strict";oa.call(this);this._seenTags={};this._navCount=0;this._isZoomOn=false;this.clearAlbumBoundaries();}xb.prototype.preload=function(yb,zb){"use strict";i.loadModules(["PhotoTagger","Live","PhotoTagApproval","PhotoTags","TagTokenizer","css:fb-photos-snowlift-fullscreen-css"],function(bc){this.PhotoTagger=bc;}.bind(this));var ac=this.getImageSrc(za(yb).getQueryData());if(ac)if(!this._log(ac))(new Image()).src=ac;};xb.prototype.bootstrap=function(yb,zb){"use strict";this.preload(yb,zb);if(this.closeDirty){setTimeout(this.bootstrap.bind(this,yb,zb),0);return;}ka.reset();this.resetUriStack=true;if(this.isOpen)if(this.openExplicitly){this.closeCleanup();this.resetUriStack=false;}else return;this._dataFt=null;var ac=ca.byAttribute(zb,'data-cursor');if(ac){try{var cc=JSON.parse(ac.getAttribute('data-ft'));this._dataFt={qid:cc.qid,mf_story_key:cc.mf_story_key};}catch(bc){}}else try{ac=ca.byAttribute(zb,'data-ad');var dc=JSON.parse(ac.getAttribute('data-ad'));this._dataFt={ad_id:dc.adid};}catch(bc){}ra.openOverlayView('snowlift');this.returningToStart=false;this.loading&&j.removeClass(this.loading,'loading');if(zb){j.addClass((this.loading=zb),'loading');var ec=ca.byClass(zb,'uiStreamStory')||ca.byClass(zb,"_5jmm");if(ec){this.storyID=ec.id;}else{var fc=ca.byClass(zb,"_5b9c");if(fc)this.storyID=fc.getAttribute('data-ownerid');}this._updateContainerOwnerID();this.getThumbAndSize(zb);}else this.loading=null;g.inform('PhotoSnowlift.GO',yb,g.BEHAVIOR_STATE);this.loadFrameIfUninitialized();};xb.prototype._updateContainerOwnerID=function(){"use strict";if(this.container)if(this.storyID){this.container.setAttribute('data-ownerid',this.storyID);}else this.container.removeAttribute('data-ownerid');};xb.prototype.setupFromSnowflake=function(yb,zb){"use strict";this.extraClasses=yb;this.snowflake=true;this.firstInSet=zb;if(this.root){j.addClass(this.root,"snowflake");this.extraClasses.forEach(function(ac){j.addClass(this.root,ac);},this);}};xb.prototype.getCurrentImageServerSizeDimensions=function(){"use strict";var yb=this.stream.getCurrentImageData();return yb.originalDimensions||yb.dimensions;};xb.prototype.getEventPrefix=function(){"use strict";return 'PhotoSnowlift';};xb.prototype.getRoot=function(){"use strict";return this.root;};xb.prototype.getSourceString=function(){"use strict";return 'snowlift';};xb.prototype.getViewerSource=function(){"use strict";return this.source;};xb.prototype.getViewerSet=function(){"use strict";return this.stream.getPhotoSet();};xb.prototype.getVersionConst=function(){"use strict";return fa.VIEWER_SNOWLIFT;};xb.prototype.getImage=function(){"use strict";return this.image;};xb.prototype.getImageId=function(){"use strict";return this.stream.getCursor();};xb.prototype.getRHCHeader=function(){"use strict";return this.rhcHeader;};xb.prototype.getRHCBody=function(){"use strict";return this.ufiForm;};xb.prototype.getRHCFooter=function(){"use strict";return this.rhcFooter;};xb.prototype.getLoadQuery=function(){"use strict";return this.loadQuery;};xb.prototype.getCurrentPhotoInfo=function(){"use strict";var yb=this.stream.getCurrentImageData();if(yb)return yb.info;return null;};xb.prototype.getOwnerId=function(){"use strict";var yb=this.stream.getCurrentImageData();if(yb)return yb.info.owner;return null;};xb.prototype.getThumbAndSize=function(yb){"use strict";this.currentImageSize=null;this.thumbSrc=null;var zb=za(yb.getAttribute('ajaxify')).getQueryData();if(!zb.size)return;var ac=bb.deserialize(zb.size);if(!ac.x||!ac.y)return;this.currentImageSize=ac;if(yb.getAttribute('data-cropped'))return;var bc=l.scry(yb,'img')[0],cc=l.scry(yb,'i')[0],dc=ca.byAttribute(yb,'data-size');this.shouldStretch=dc&&this.currentImageSize&&bc&&dc.getAttribute('data-size')==="2"&&this.currentImageSize.x>this.currentImageSize.y&&this.currentImageSize.x<=xb.TIMELINE_STRETCH_WIDTH&&bc.offsetWidth===xb.TIMELINE_STRETCH_WIDTH;var ec;if(bc){ec=bc.src;}else if(cc){ec=ua.get(cc,'backgroundImage').replace(/.*url\("?([^"]*)"?\).*/,'$1');}else return;this.thumbSrc=ec;};xb.prototype.loadFrameIfUninitialized=function(){"use strict";if(this.root)return;new h('/ajax/photos/snowlift/init.php').setAllowCrossPageTransition(true).setMethod('GET').setReadOnly(true).send();};xb.prototype.init=function(yb,zb){"use strict";this.init=jb;this._shouldLog=zb.photos_client_loading;this._logger=null;if(this._shouldLog)this._logger=new da(fa.VIEWER_SNOWLIFT_STRING);this._showHover=zb.pivot_hover;this._showMorePhotos=zb.show_more_photos;this._extraSlidePivot=zb.extra_slide_pivot;ga.setEndMetrics(zb.pivot_end_metric);this.startingMousePos=null;this.haveLeftBufferRegion=false;this.showingTypeaheadSuggestions=false;this.fullscreen=q.isSupportedWithKeyboardInput();this.showOGVideos=zb.og_videos;this.resizeCommentsForAds=zb.resize_comments_for_ads;this.spotlight=yb;this.spotlight.subscribe('blur',function(){this.closingAction=ga.OUTSIDE;}.bind(this));this.spotlight.subscribe('hide',this.closeHandler.bind(this));this.spotlight.subscribe('key',this.keyHandler.bind(this));this.initializeNodes(this.spotlight.getRoot());ka.init(this.sideAdUnit,this,zb,this.adsDisplayedCallback.bind(this));this.inAdsDisplayedCallback=false;this.lastAdsHeight=0;if(!this.subscription){x.registerHandler(this.handleNavigateAway.bind(this));this.subscription=g.subscribe('PhotoSnowlift.GO',function(ac,bc){this.openExplicitly=true;this.loading&&j.removeClass(this.loading,'loading');this.open(bc);}.bind(this));}this.transitionHandlerRegistered=false;this.returningToStart=false;ba.registerHandler(this.openHandler.bind(this));this.openHandlerRegistered=true;g.subscribe('PhotoTagApproval.HILITE_TAG',this.onHiliteTag.bind(this));g.subscribe('PhotoTagApproval.UPDATE_TAG_BOX',this.onUpdateTagBox.bind(this));if(this.fullscreen)q.subscribe('changed',this.onFullScreenChange.bind(this));this.slideshowGk=zb.snowlift_slideshow;this.buttonTruncateGk=zb.snowlift_button_truncate;this._hasZoomCapability=this._hasZoomCapability&&zb.www_panorama_viewer;this.allowIrrelevantRequests=!!zb.snowlift_allow_irrelevant_requests;if(this.snowflake){j.addClass(this.root,"snowflake");this.extraClasses.forEach(function(ac){j.addClass(this.root,ac);},this);}};xb.prototype.onFullScreenChange=function(){"use strict";if(!this.isOpen)return;var yb=q.isFullScreen();j.conditionClass(document.body,'fbPhotoSnowliftFullScreenMode',yb);if(yb){if(!j.hasClass(this.root,'fbPhotoSnowliftEditMode'))this.collapseRHC();var zb=this.stream.getCurrentImageData();if(zb&&zb.url&&this.image.src!==zb.url&&this.shouldShowHiRes(zb))this.switchImage(zb.url);this.adjustForResize();if(!this._isZoomOn)this._conditionDisplayZoomInButton();}else{if(!this._isZoomOn)this.uncollapseRHC();if(ab.chrome()&&!j.hasClass(this.root,'fbPhotoSnowliftEditMode'))this.page(0,false);g.inform('reflow');}va.hide();};xb.prototype.initializeNodes=function(yb){"use strict";this.root=yb;this.container=l.find(yb,'div.fbPhotoSnowliftContainer');this._updateContainerOwnerID();this.snowliftPopup=l.find(this.container,'div.fbPhotoSnowliftPopup');this.rhc=l.find(this.snowliftPopup,'div.rhc');this.rhcHeader=l.find(this.rhc,'div.rhcHeader');this.rhcFooter=l.find(this.rhc,'div.rhcFooter');this.taglist=l.find(this.rhc,'span.fbPhotoTagList');this.ufiForm=l.find(this.rhc,'form.fbPhotosSnowliftFeedbackForm');this.ufiInputContainer=l.find(this.rhc,'div.fbPhotosSnowboxFeedbackInput');this.scroller=l.find(this.ufiForm,'div.rhcScroller');this.scrollerBody=l.find(this.scroller,'div.uiScrollableAreaBody');this.stageWrapper=l.find(this.snowliftPopup,'div.stageWrapper');this.overlay=l.find(this.snowliftPopup,'div.snowliftOverlay');this.errorBox=l.find(this.stageWrapper,'div.stageError');this.image=l.find(this.stageWrapper,'img.spotlight');this.stage=l.find(this.stageWrapper,'div.stage');this.showZoomInButton=l.scry(this.stageWrapper,"._5qmg").pop();this.showZoomOutButton=l.scry(this.stageWrapper,"._5qmh").pop();this.zoomedImage=l.scry(this.stage,"._10zw").pop();this.outerImageSlider=l.scry(this.stage,"._10zx").pop();this.innerImageSlider=l.scry(this.stage,"._10zv").pop();this._hasZoomCapability=this.showZoomInButton&&this.showZoomOutButton&&this.zoomedImage&&this.outerImageSlider&&this.innerImageSlider;if(this._hasZoomCapability){j.hide(this.showZoomInButton);j.hide(this.showZoomOutButton);j.hide(this.zoomedImage);j.hide(this.outerImageSlider);}this.videoStage=l.find(this.stageWrapper,'div.videoStage');this.prevPager=l.find(this.snowliftPopup,'a.snowliftPager.prev');this.nextPager=l.find(this.snowliftPopup,'a.snowliftPager.next');this.stageActions=l.find(yb,'div.stageActions');this.buttonActions=l.find(this.stageActions,'div.fbPhotosPhotoButtons');this.placeInfo=l.find(this.rhc,'div.fbPhotosSnowliftPlaceInfo');this.sideAdUnit=l.find(yb,"._5ciw");j.conditionClass(this.root,'fullScreenAvailable',this.fullscreen);};xb.prototype.initializeScroller=function(){"use strict";this.initializeScroller=jb;j.addClass(this.scroller,"_467y");this.scrollableArea=sa.fromNative(this.scroller,{fade:true,persistent:true});var yb=function(event){var zb=o.$E(event).getTarget();if(l.contains(this.ufiInputContainer,zb)){var ac=n.getInstance(zb);if(ac){this.scrollableArea.scrollToBottom();var bc=ac.subscribe('resize',function(){var dc=this.scrollableArea.isScrolledToBottom();this.adjustScroller();dc&&this.scrollableArea.scrollToBottom();}.bind(this)),cc=o.listen(zb,'blur',function(){ac.unsubscribe(bc);cc.remove();});}}if(zb.classList.contains('UFIPagerLink')||zb.classList.contains('UFICommentLink'))if(this.autoplayOptionScreenConfig&&this.autoplayOptionScreenConfig.enabled)this.haltAutoplay=true;}.bind(this);g.subscribe('ufi/inputHeightChanged',function(zb,ac){if(l.contains(this.ufiInputContainer,ac.node))this.adjustScroller();}.bind(this));g.subscribe('ufi/addCommentFacepileRendered',function(){this.adjustScroller();}.bind(this));g.subscribe('ufi/changed',function(zb,ac){if(this.ufiForm===ac.form)this.adjustScrollerIfNecessary();}.bind(this));g.subscribe('ufi/comment',function(zb,ac){if(this.ufiForm===ac.form){this.adjustScrollerIfNecessary();if(ac.isranked){this.scrollableArea.scrollToTop();}else this.scrollableArea.scrollToBottom();}}.bind(this));o.listen(this.rhc,'click',function(event){var zb=event.getTarget();if(ca.byTag(zb,'a')||ca.byTag(zb,'button')||l.isNodeOfType(zb,'input'))this.adjustScrollerIfNecessary();}.bind(this));g.subscribe(['reflow','CommentUFI.Pager'],function(){if(this.isOpen)this.adjustScrollerIfNecessary();}.bind(this));o.listen(this.ufiForm,'focusin',yb);};xb.prototype.openHandler=function(yb){"use strict";if(this.isOpen||!ea.isValid(yb)||this.returningToStart||yb.getQueryData().closeTheater||yb.getQueryData().permPage){this.openHandlerRegistered=false;return false;}this.open(yb);this._uriStack.push(za(yb).getQualifiedURI().toString());ba.transitionComplete(true);return true;};xb.prototype.addHaltAutoplaySubscription=function(){"use strict";g.subscribe(['ufi/focus'],function(){this.haltAutoplay=true;}.bind(this));g.subscribe(['ufi/blur'],function(yb,zb){this.haltAutoplay=zb.hasEnteredText;}.bind(this));};xb.prototype.getImageSrc=function(yb){"use strict";if(yb.smallsrc){if(!yb.size)return yb.smallsrc;var zb=bb.deserialize(yb.size),ac=this.getStageSize(zb);ac=this._adjustStageSizeForPixelRatio(ac);if(ac.x<=xb.STAGE_NORMAL_MAX.x&&ac.y<=xb.STAGE_NORMAL_MAX.y)return yb.smallsrc;}return yb.src;};xb.prototype.open=function(yb){"use strict";var zb=za(yb),ac=zb.getQueryData(),bc=ea.parse(zb);if(bc!==null){ac.fbid=bc.photo_id;ac.set=bc.set_token;}if(!ac.fbid&&!ac.v&&!ac.pid){var cc=ub.exec(zb.getPath());if(cc)ac.v=cc[1];}var dc=this.getImageSrc(ac);if(dc){delete ac.src;delete ac.smallsrc;}if(this.resetUriStack)this._uriStack=[];if(!this.initialLoad){ac.firstLoad=true;this.initialLoad=true;y.registerBlocker(function(){return this.isOpen;}.bind(this));z.registerOpenChecker(function(){return this.isOpen;}.bind(this));}this.sessionID=Date.now();this.loadQuery=fb(ac,{ssid:this.sessionID});if(this._dataFt)this.loadQuery.data_ft=this._dataFt;this.isOpen=true;this.pagersShown=false;this.refreshOnClose=false;this.hilitedTag=null;this.loadingStates={image:false,html:false};this.replaceUrl=false;this.movementDelta=0;this.pivotsCarouselElement=null;this.autoplayOptionScreenConfig=null;this.haltAutoplay=false;this.shouldRenderVideoPivots=false;j.show(this.nextPager);j.show(this.prevPager);this.source=null;this.saveTagSubscription=g.subscribe('PhotoTagger.SAVE_TAG',this.onTagSaved.bind(this));this.taggedPhotoIds=[];this.stream=new la();this.stream.init(fa.VIEWER_SNOWLIFT,'PhotoViewerPagelet','pagelet_photo_viewer',this._shouldLog?this._logger:null,ac.tagSuggestionMode||'everyone');if(!!za.getMostRecentURI().getQueryData().viewas)this.stream.setViewAs(za.getMostRecentURI().getQueryData().viewas+'');this.fetchInitialData();this.setLoadingState(xb.STATE_HTML,true);this.rhcCollapsed=false;this._open(yb,dc);i.loadModules(["PhotosButtonTooltips"],function(ec){ec.init();});};xb.prototype._open=function(yb,zb){"use strict";this.createLoader(zb);this.spotlight.show();g.inform('layer_shown',{type:'PhotoSnowlift'});g.inform('PhotoSnowlift.OPEN');this.stageHandlers=[o.listen(window,'resize',this.adjustForResize.bind(this)),o.listen(this.stageWrapper,'click',this.buttonListener.bind(this)),o.listen(this.stageWrapper,'mouseleave',function(event){var cc=event.getTarget();if(!(ca.byClass(cc,'snowliftOverlay')||ca.byClass(cc,'fbPhotoSnowliftTagApproval')||ca.byClass(cc,'tagPointer')||ca.byClass(cc,'arrow')||ca.byClass(cc,'faceboxSuggestion')||ca.byClass(cc,'typeaheadWrapper')||ca.byClass(cc,'photoTagTypeahead')||ca.byClass(cc,'fbPhotoTagger')))this.unhiliteAllTags();this.hidePagers();}.bind(this)),o.listen(this.stageWrapper,'mousemove',this.hilitePager.bind(this)),o.listen(this.stageWrapper,'mousemove',this.hiliteTagsOnMouseMove.bind(this)),o.listen(this.overlay,'mouseenter',this.unhiliteAllTags.bind(this)),o.listen(this.container,'mousemove',this._enableMouseOver.bind(this)),o.listen(this.container,'mouseover',this._interceptMouseOver.bind(this)),o.listen(this.stageWrapper,'focusin',this.hilitePager.bind(this)),o.listen(this.rhc,'focusin',this.hidePagers.bind(this))];if(this._hasZoomCapability){this.stageHandlers.push(o.listen(this.stage,'mousedown',this._zoomedImageMouseDown.bind(this)));this.stageHandlers.push(o.listen(this.root,'mouseup',this._zoomedImageMouseUp.bind(this)));}this.stageHandlers.push(o.listen(this.container,'click',function(event){var cc=event.getTarget();if(ca.byClass(cc,'rotateRight')){this.rotate('right');}else if(ca.byClass(cc,'rotateLeft')){this.rotate('left');}else if(ca.byClass(cc,'closeTheater')){if(q.isFullScreen()){q.toggleFullScreen();return;}this.closingAction=ga.X;this.spotlight.hide();return false;}else if(ca.byClass(cc,"_32_l")){var dc=ca.byClass(cc,"_32_l"),ec=dc.getAttribute('data-fbid'),fc=this.stream.getCursor(),gc=this.stream.calculateDistance(fc,ec),hc=this.stream.fbidList.indexOf(ec);ta.adjustCarousel(hc);this.page(gc,false);this.haltAutoplay=false;this.removeAutoplayOptionScreen();}else if(this.fullscreen)if(ca.byClass(cc,'fbPhotoSnowliftFullScreen')){this.toggleFullScreen();}else if(ca.byClass(cc,'fbPhotoSnowliftCollapse'))this.toggleCollapse();}.bind(this)));var ac=kb('fbPhotoSnowliftFeedback');if(ac)this.stageHandlers.push(o.listen(ac,'click',function(event){var cc=event.getTarget();if(ca.byClass(cc,'like_link')||(ca.byClass(cc,'UFILikeLink')&&ca.byClass(cc,'UIActionLinks')))this.toggleLikeButton();var dc=ca.byClass(event.getTarget(),'uiUfiCollapsedComment');if(dc)j.addClass(dc,'uiUfiCollapsedCommentToggle');}.bind(this)));var bc=kb('fbPhotoSnowliftOnProfile');if(bc)this.stageHandlers.push(o.listen(bc,'click',function(event){if(ca.byClass(event.getTarget(),'fbPhotoRemoveFromProfileLink'))this.refreshOnClose=true;}.bind(this)));if(this.resetUriStack)this.startingURI=za.getMostRecentURI().addQueryData({closeTheater:1}).getUnqualifiedURI();if(!zb)this.setLoadingState(xb.STATE_IMAGE_DATA,true);if(!this.transitionHandlerRegistered){ba.registerHandler(this.transitionHandler.bind(this));this.transitionHandlerRegistered=true;}ga.initLogging(ga.SNOWLIFT);if(this.pivots)ga.setRelevantCount(this.pivots.relevantCount);};xb.prototype.toggleFullScreen=function(){"use strict";var yb=q.toggleFullScreen(document.documentElement);if(yb){var zb=this.stream.getCurrentImageData();if(zb&&zb.url&&this.image.src!==zb.url&&this.shouldShowHiRes(zb))if(!this._log(zb.url))(new Image()).src=zb.url;ga.logEnterFullScreen(this.stream.getCursor());}};xb.prototype.getStream=function(){"use strict";return this.stream;};xb.prototype.fetchInitialData=function(){"use strict";this.stream.waitForInitData();ya.loadFromEndpoint('PhotoViewerInitPagelet',kb('pagelet_photo_viewer_init',this.root),this.loadQuery,{actorID:xa.getActorIDForFeedbackTargetIfExists(this.loadQuery.fbid),usePipe:true,jsNonblock:true,crossPage:true,allowIrrelevantRequests:this.allowIrrelevantRequests});};xb.prototype.toggleCollapse=function(){"use strict";if(this.rhcCollapsed){this.uncollapseRHC();}else this.collapseRHC();};xb.prototype.collapseRHC=function(){"use strict";this.rhcCollapsed=true;j.addClass(this.root,'collapseRHC');this.adjustForResize();};xb.prototype.uncollapseRHC=function(){"use strict";this.rhcCollapsed=false;j.removeClass(this.root,'collapseRHC');this.adjustForResize();};xb.prototype.closeHandler=function(){"use strict";if(!this.isOpen)return;this.closingAction=this.closingAction||ga.ESC;if(za.getMostRecentURI().addQueryData({closeTheater:1}).getUnqualifiedURI().toString()==this.startingURI.toString()){this.close();return;}this.returnToStartingURI(this.refreshOnClose);this.close();};xb.prototype.returnToStartingURI=function(yb,zb){"use strict";if(!yb)if(zb){this.squashNextTransition(mb.bind(null,zb));}else this.squashNextTransition();this.returningToStart=true;var ac=g.subscribe('page_transition',(function(){this.returningToStart=false;ac.unsubscribe();}).bind(this)),bc=yb||isNaN(ab.opera()),cc=this._uriStack.length;if(bc&&cc<window.history.length){window.history.go(-cc);}else{var dc=this.startingURI,ec=new za(dc).removeQueryData('closeTheater');if(dc.getQueryData().sk=='approve'&&dc.getPath()=='/profile.php'){ec.removeQueryData('highlight');ec.removeQueryData('notif_t');}mb(ec);}};xb.prototype.squashNextTransition=function(yb){"use strict";this.squashNext=true;ba.registerHandler(function zb(){if(this.squashNext){this.squashNext=false;if(yb)setTimeout(yb,0);ba.transitionComplete(true);return true;}return false;}.bind(this),7);};xb.prototype.handleNavigateAway=function(yb){"use strict";var zb=eb(ba._most_recent_uri.getQualifiedURI(),yb.getAttribute('href'));if(this.isOpen&&(zb instanceof za)&&zb.getUnqualifiedURI().toString()!=this.startingURI.toString()&&zb.getPath()!='/photo.php'){if(!this.closingAction)this.closingAction=ga.NAVIGATE;this.returnToStartingURI(false,zb);this.close();return false;}return true;};xb.prototype.postProcessTaggedPhotos=function(){"use strict";if(this.taggedPhotoIds&&this.taggedPhotoIds.length>0){var yb=null;if(this.source===xb.COLLECTIONS_UNTAGGED_PHOTOS){yb='/ajax/photos/photo/edit/skiptag/';}else if(this.source===xb.PHOTOS_OF_YOU_SUGGESTIONS||this.source===xb.FRIENDS_IN_PHOTOS_SUGGESTIONS)yb='/ajax/photos/photo/add_to_star_grid/';if(yb)new h().setURI(yb).setAllowCrossPageTransition(true).setData({media_id:this.taggedPhotoIds,source:this.source}).send();}};xb.prototype.onTagSaved=function(yb,zb){"use strict";if(this.taggedPhotoIds){if(this.source===xb.PHOTOS_OF_YOU_SUGGESTIONS&&!zb.self_tag)return;this.taggedPhotoIds.push(zb.photo_fbid);}};xb.prototype.clearAlbumBoundaries=function(){"use strict";this._albumBoundaries={start:0,end:0,dir:0};};xb.prototype.close=function(){"use strict";if(!this.isOpen)return;this._albumFBID=null;this.hideMorePhotos();this.hidePivotSlide();this._pauseVideoIfNeeded();this.isOpen=false;this._navCount=0;this.clearAlbumBoundaries();if(this.fullscreen)q.disableFullScreen();ra.closeOverlayView('snowlift');this.spotlight.hide();this.openExplicitly=false;this.postProcessTaggedPhotos();g.unsubscribe(this.saveTagSubscription);this.taggedPhotoIds=[];this.closeDirty=true;ob(this.closeCleanup.bind(this),0);if(this.snowflake){j.removeClass(this.root,"snowflake");this.extraClasses.forEach(function(yb){j.removeClass(this.root,yb);},this);}this.extraClasses=[];this.snowflake=false;this.firstInSet=null;this.movementDelta=0;};xb.prototype.closeCleanup=function(){"use strict";this.closeDirty=false;j.removeClass(this.root,'dataLoading');ga.logPhotoViews(this.closingAction);this.destroy();j.hide(this.errorBox);j.hide(this.image);this.currentImageSize=null;this.thumbSrc=null;this.shouldStretch=false;this.resetUriStack=true;var yb=this.stream.getCursor();j.removeClass(this.stageWrapper,'showVideo');l.empty(this.videoStage);this.uncollapseRHC();this.currentMinSize=null;this.setStagePagersState('reset');this.recacheData();l.empty(this.sideAdUnit);this.stream.destroy();this.root.setAttribute('aria-busy','true');var zb=this.closingAction===ga.NAVIGATE;this.closingAction=null;if(!this.openHandlerRegistered){ba.registerHandler(this.openHandler.bind(this));this.openHandlerRegistered=true;}g.inform('layer_hidden',{type:'PhotoSnowlift'});g.inform('PhotoSnowlift.CLOSE',{is_navigating:zb,fbid:yb});this._setZoomOut();this._previousZoomScrollPercent=null;};xb.prototype.createLoader=function(yb){"use strict";if(this.currentImageSize===null){this.adjustStageSize(xb.STAGE_MIN);}else{var zb=this.getStageSize(this.currentImageSize);zb=new bb(Math.max(zb.x,xb.STAGE_MIN.x),Math.max(zb.y,xb.STAGE_MIN.y));var ac=this.getImageSizeInStage(this.currentImageSize,zb);if(this.thumbSrc===null){this.adjustStageSize(ac);}else this.useImage(l.create('img',{className:'spotlight',alt:'',src:this.thumbSrc,style:{width:ac.x+'px',height:ac.y+'px'}}),ac,false);}this.setLoadingState(this.STATE_IMAGE_PIXELS,true);if(yb)setTimeout((function(){var bc=new Image(),cc=function(){if(!this.isOpen)return;if(!this.stream||!this.stream.errorInCurrent()){this.switchImage(yb,this.currentImageSize);this.setLoadingState(xb.STATE_IMAGE_DATA,false);}}.bind(this),dc=o.listen(bc,'load',cc),ec=function(){if(dc){dc.remove();dc=null;}};g.subscribeOnce('PhotoSnowlift.SWITCH_IMAGE',ec);g.subscribeOnce('PhotoSnowlift.CLOSE',ec);this._log(yb);bc.src=yb;}).bind(this),0);j.hide(this.stageActions);this.setStagePagersState('disabled');};xb.prototype.initDataFetched=function(yb){"use strict";ga.setPhotoSet(this.stream.getPhotoSet());ga.setLogFbids(yb.logids);this._albumBoundaries.start=this.stream.getCursor();var zb=this.stream.getCurrentImageData();ga.addPhotoView(zb.info,this.shouldShowHiRes(zb),this.fullscreen&&q.isFullScreen());var ac=this.stream.getCurrentExtraData();if(this._showHover&&ac)na.logImageImpression('snowlift',String(this.stream.getCursor()),Object.keys(ac.tagRects));if(ac&&ac.source!==(void 0)){this.source=parseInt(ac.source,10);ga.setSource(this.source);}if(!this.pageHandlers)this.pageHandlers=[o.listen(this.root,'click',this.pageListener.bind(this)),o.listen(this.root,'mouseleave',this.mouseLeaveListener.bind(this))];j.show(this.stageActions);this.root.setAttribute('aria-busy','false');this.isLoggedInViewer=yb.loggedin;this.disableAds=!this.isLoggedInViewer||yb.fromad||this.stream.isInViewAsMode();this.loadAds();if(this._isZoomAvailable(zb)){ga.addPanoramaImpression();var bc=new bb(this.stage.clientWidth,this.stage.clientHeight);this._displayZoomInButton(bc);}else if(this._hasZoomCapability)j.hide(this.showZoomInButton);};xb.prototype.adjustScrollerIfNecessary=function(){"use strict";clearTimeout(this.scrollerTimeout);this.scrollerTimeout=setTimeout(this.adjustScroller.bind(this),0);};xb.prototype.adjustScroller=function(yb){"use strict";clearTimeout(this.scrollerTimeout);this.initializeScroller();this.scrollableArea.resize();var zb=bb.getElementDimensions(this.rhc),ac=zb.y;ac-=bb.getElementDimensions(this.rhcHeader).y;ac-=bb.getElementDimensions(this.ufiInputContainer).y;if(this.placeInfo){var bc=bb.getElementDimensions(this.placeInfo);ac-=bc.y;ua.set(this.sideAdUnit,'bottom',bc.y+'px');}if(yb==null)yb=this.resizeCommentsForAds?this.lastAdsHeight:0;this.lastAdsHeight=yb;ac=Math.max(0,ac);var cc=bb.getElementDimensions(this.scrollerBody).y,dc=Math.max(xb.MIN_UFI_HEIGHT,ac-yb);if(cc>=dc){if(ac>dc){j.removeClass(this.rhc,'pinnedUfi');ac-=dc;}else{j.addClass(this.rhc,'pinnedUfi');ac=0;}ua.set(this.scroller,'height',dc+'px');}else{ua.set(this.scroller,'height','auto');j.removeClass(this.rhc,'pinnedUfi');ac-=cc;}var ec=bb.getElementDimensions(this.ufiInputContainer).y;ua.set(this.ufiForm,'padding-bottom',ec+'px');ka.resize(new bb(zb.x,ac));this.scrollableArea.adjustGripper();};xb.prototype.adjustForResize=function(){"use strict";this.currentMinSize=null;this.adjustStageSize();this.adjustForNewData();if(this._hasZoomCapability){if(!this._isZoomOn)this._conditionDisplayZoomInButton();this._scrollZoomedImageToPercent(this._previousZoomScrollPercent);}};xb.prototype.shouldShowHiRes=function(yb){"use strict";if(!yb||!yb.smallurl)return false;var zb=this.getStageSize(yb.dimensions);zb=this._adjustStageSizeForPixelRatio(zb);var ac=this.getImageSizeInStage(yb.dimensions,zb);return (ac.x>xb.STAGE_NORMAL_MAX.x||ac.y>xb.STAGE_NORMAL_MAX.y);};xb.prototype._adjustStageSizeForPixelRatio=function(yb){"use strict";if(window.devicePixelRatio&&window.devicePixelRatio>1)yb=new bb(yb.x*window.devicePixelRatio,yb.y*window.devicePixelRatio);return yb;};xb.prototype.getImageURL=function(yb){"use strict";if(yb.video){return null;}else if(yb.smallurl&&!this.shouldShowHiRes(yb))return yb.smallurl;return yb.url;};xb.prototype.getImageOrVideoDimensions=function(yb){"use strict";if(yb.video){var zb=this.getVideoElement(yb.video);if(zb)return this.getVideoSize(zb);}return this.getImageDimensions(yb);};xb.prototype.getImageDimensions=function(yb){"use strict";if(this._isZoomOn)return yb.originalDimensions;if(yb.smalldims&&(!this.shouldShowHiRes(yb)||this.image.src===yb.smallurl))return yb.smalldims;return yb.dimensions;};xb.prototype.getStageSize=function(yb,zb){"use strict";var ac=bb.getViewportDimensions(),bc=new bb(yb.x,yb.y+this.getExtraVerticalSpace());if(zb)bc=new bb(Math.max(yb.x,zb.x),Math.max(yb.y,zb.y));var cc,dc;if(this.fullscreen&&q.isFullScreen()){return new bb((this.rhcCollapsed?screen.width:screen.width-xb.SIDEBAR_SIZE_MAX),screen.height-xb.FULL_SCREEN_PADDING*2);}else{cc=Math.min(bc.x,(ac.x-xb.SIDEBAR_SIZE_MAX-xb.STAGE_CHROME.x));dc=Math.min(bc.y,ac.y-xb.STAGE_CHROME.y);}if(cc===0&&dc===0)return new bb(0,0);var ec=cc/dc,fc=bc.x/bc.y;if(ec<fc)return new bb(cc,Math.round(cc/fc));return new bb(Math.round(dc*fc),dc);};xb.prototype.getExtraVerticalSpace=function(){"use strict";if(this.getVideoOnStage())return xb.VIDEO_BOTTOM_BAR_SPACE*2;return 0;};xb.prototype.getComponentsHeight=function(){"use strict";var yb=this.getVideoOnStage();if(yb)return this.getVideoComponentsHeight(kb(yb));return 0;};xb.prototype.getImageSizeInStage=function(yb,zb){"use strict";var ac=yb.x,bc=yb.y,cc=this.getComponentsHeight(),dc=this.getExtraVerticalSpace();bc-=cc;zb=new bb(zb.x,zb.y-cc-dc);if(ac>=zb.x||bc>=zb.y){var ec=zb.x/zb.y,fc=ac/bc;if(ec<fc){ac=zb.x;bc=Math.round(ac/fc);}else if(ec>fc){bc=zb.y;ac=Math.round(bc*fc);}else{ac=zb.x;bc=zb.y;}}return new bb(ac,bc+cc);};xb.prototype.getStageSizeForZoomedImage=function(yb,zb){"use strict";if(this.fullscreen&&q.isFullScreen()){var ac=this.rhcCollapsed?screen.width:screen.width-xb.SIDEBAR_SIZE_MAX,bc=screen.height-xb.FULL_SCREEN_PADDING*2;return new bb(ac,bc);}var cc=bb.getViewportDimensions();if(zb===null)zb=new bb(0,0);var dc=new bb(Math.max(yb.x,xb.STAGE_MIN.x,zb.x),Math.max(yb.y,xb.STAGE_MIN.y,zb.y)),ec=cc.x-xb.STAGE_CHROME.x;if(!this.rhcCollapsed)ec-=xb.SIDEBAR_SIZE_MAX;ac=Math.min(dc.x,ec);bc=Math.min(dc.y,cc.y-xb.STAGE_CHROME.y);return new bb(ac,bc);};xb.prototype.adjustStageSize=function(yb){"use strict";var zb=this.currentImageSize;if(yb){zb=yb;}else{var ac=this.stream&&this.stream.getCurrentImageData();if(ac)zb=this.getImageOrVideoDimensions(ac);}if(!zb)return;this.currentImageSize=zb;var bc=this.getExtraVerticalSpace();if(this.shouldStretch&&!this.getVideoOnStage()&&zb.x>zb.y&&zb.x<=xb.TIMELINE_STRETCH_WIDTH&&zb.x>=xb.TIMELINE_STRETCH_MIN){zb.y=Math.round(zb.y*xb.TIMELINE_STRETCH_WIDTH/zb.x);zb.x=xb.TIMELINE_STRETCH_WIDTH;}var cc;if(this._isZoomOn){cc=this.getStageSizeForZoomedImage(zb,this.currentMinSize);}else cc=this.getStageSize(zb,this.currentMinSize);if(!this.currentMinSize)this.currentMinSize=new bb(0,0);this.currentMinSize=new bb(Math.max(cc.x,xb.STAGE_MIN.x,this.currentMinSize.x),Math.max(cc.y,xb.STAGE_MIN.y,this.currentMinSize.y));var dc=this.getImageSizeInStage(zb,this.currentMinSize),ec=this.currentMinSize.x-dc.x,fc=this.currentMinSize.y-dc.y;if(ec>0&&ec<xb.PADDING_MIN){this.currentMinSize.x-=ec;}else if(fc>0&&fc<xb.PADDING_MIN)this.currentMinSize.y-=fc;var gc=this.currentMinSize.x+xb.SIDEBAR_SIZE_MAX;if(this.rhcCollapsed)gc=this.currentMinSize.x;var hc=this.getVideoOnStage()&&this.pivotsCarouselElement,ic=0,jc=this.currentMinSize.y;if(hc){var kc=this.pivotsCarouselElement.clientHeight;ic=Math.ceil(kc/100)*100;jc=jc+ic;}this.snowliftPopup.style.cssText='width:'+gc+'px;'+'height:'+jc+'px;';var lc=this.currentMinSize.y-bc,mc=lc+ic;if(ab.firefox()){var nc=ua.get(this.stageWrapper,'font-size');lc=(lc/parseFloat(nc))+'em';mc=(mc/parseFloat(nc))+'em';}else{lc=lc+'px';mc=mc+'px';}this.stageWrapper.style.cssText='width:'+this.currentMinSize.x+'px;'+'line-height:'+lc+';';if(this.getVideoOnStage())this.videoStage.style.cssText='width:'+this.currentMinSize.x+'px;'+'height:'+mc+';';if(this._isZoomOn){var oc=this.currentMinSize.y-bc;if(zb.y>oc){var pc=(zb.x/zb.y)*oc;ua.apply(this.zoomedImage,{width:pc+"px",height:oc+"px"});}else ua.apply(this.zoomedImage,{width:zb.x+"px",height:zb.y+"px"});}else{dc.y-=this.getComponentsHeight();this.setMediaElementSize(dc);}if(hc)this.setPivotCarouselElementWidth(nc);var qc=this.getTagger();if(qc)qc.repositionTagger();this.adjustScrollerIfNecessary();};xb.prototype.setMediaElementSize=function(yb){"use strict";var zb=this.image;if(this.getVideoOnStage())if(this._videoPlayerStateManager&&this._videoPlayerStateManager.setDimensions){this._videoPlayerStateManager.setDimensions(yb.x,yb.y);}else zb=l.scry(this.videoStage,"._53j5")[0]||zb;zb.style.cssText='width:'+yb.x+'px;'+'height:'+yb.y+'px;';};xb.prototype.setPivotCarouselElementWidth=function(yb){"use strict";var zb=this.videoStage.clientWidth;if(ab.firefox()){zb=(zb/parseFloat(yb))+'em';}else zb=zb+'px';this.pivotsCarouselElement.style.width=zb;};xb.prototype.adjustForNewData=function(){"use strict";if(!this.image)return;var yb=l.scry(this.stage,'div.tagsWrapper')[0],zb=bb.getElementDimensions(this.image);if(yb){ua.set(yb,'width',zb.x+'px');ua.set(yb,'height',zb.y+'px');}};xb.prototype.adsDisplayedCallback=function(yb,zb){"use strict";var ac=this.resizeCommentsForAds&&!this.inAdsDisplayedCallback&&!this.disableAds&&yb<xb.MIN_ADS_VISIBLE&&zb.length>=xb.MIN_ADS_VISIBLE;if(ac){this.inAdsDisplayedCallback=true;var bc=zb[xb.MIN_ADS_VISIBLE-1];this.adjustScroller(bc);this.inAdsDisplayedCallback=false;}};xb.prototype.setLoadingState=function(yb,zb){"use strict";switch(yb){case xb.STATE_IMAGE_PIXELS:j.conditionClass(this.root,'imagePixelsLoading',zb);break;case xb.STATE_IMAGE_DATA:this.loadingStates[yb]=zb;j.conditionClass(this.root,'imageLoading',zb);break;case xb.STATE_HTML:this.loadingStates[yb]=zb;j.conditionClass(this.root,'dataLoading',zb);this.rhc.setAttribute('aria-busy',zb?'true':'false');break;}};xb.prototype.destroy=function(){"use strict";this.stageHandlers.forEach(function(yb){yb.remove();});if(this.pageHandlers){this.pageHandlers.forEach(function(yb){yb.remove();});this.pageHandlers=null;}this._slideshowToken&&clearInterval(this._slideshowToken);this._slideshowToken=null;this._videoPlayerStateManager=null;};xb.prototype.checkState=function(yb){"use strict";if(yb!=xb.STATE_ERROR&&!this.loadingStates[yb])return;switch(yb){case xb.STATE_IMAGE_DATA:var zb=this.stream.getCurrentImageData();if(zb){var ac=this.getImageURL(zb);if(ac){this.switchImage(ac,null,true);}else if(zb.video)this.switchVideo(zb.video,true);this.setLoadingState(yb,false);}break;case xb.STATE_HTML:if(this.stream.getCurrentHtml()){this.swapData();this.setLoadingState(yb,false);}break;default:if(this.stream.errorInCurrent()){j.hide(this.image);j.show(this.errorBox);}break;}};xb.prototype.buttonListener=function(event){"use strict";var yb=event.getTarget(),zb=Date.now();if(ca.byClass(yb,"_5qmg")){ga.addPanoramaClick();this.switchIntoZoomedImage();return;}if(ca.byClass(yb,"_5qmh")){this._setZoomOut();this.switchImage(this.getImageURL(this.stream.getCurrentImageData()));return false;}if(ca.byClass(yb,'fbPhotoTagApprovalBox'))return;if(zb-this.lastPage<350)return;if(ca.byClass(yb,'fbPhotosPhotoLike')){this.likePhoto();}else if(ca.byClass(yb,'tagApproveIgnore')){this.updateTagBox(event,yb);}else if(ca.byClass(yb,"_5ge9")){this.hideMorePhotos();this.toggleSlideshow();return false;}else if(ca.byClass(yb,"_5ymu")){if(!this._showingMorePhotos){na.logShowMorePhotos();var ac=this.stream.getCursor();if(ac)this.showMorePhotos(String(ac));if(this._hasZoomCapability)j.hide(this.showZoomInButton);}else{na.logHideMorePhotos();this._conditionDisplayZoomInButton();this.hideMorePhotos();}return;}else if(ca.byClass(yb,"_27n"))this._conditionDisplayZoomInButton();this.hideMorePhotos();};xb.prototype.toggleSlideshow=function(){"use strict";if(!this.slideshowGk)return;if(this._slideshowToken){this.stopSlideshow();}else this.startSlideshow();};xb.prototype.startSlideshow=function(){"use strict";this._slideshowToken=window.setInterval(this.page.bind(this,1,ab.chrome()&&q.isFullScreen()),xb.SLIDESHOW_TIME);j.addClass(this.root,'slideshowStarted');j.removeClass(this.root,'slideshowAvailable');};xb.prototype.stopSlideshow=function(){"use strict";this._slideshowToken&&clearInterval(this._slideshowToken);this._slideshowToken=null;j.addClass(this.root,'slideshowAvailable');j.removeClass(this.root,'slideshowStarted');};xb.prototype.likePhoto=function(){"use strict";ga.addButtonLike();var yb=db('fbPhotoSnowliftFeedback'),zb=l.scry(yb,'button.like_link')[0];if(!zb)zb=l.scry(yb,'a.UFILikeLink')[0];var ac=zb.getAttribute('href');if(q.isFullScreen())if(ab.chrome())zb.setAttribute('href','javascript:;');zb.click();zb.setAttribute('href',ac);};xb.prototype.toggleLikeButton=function(){"use strict";var yb=l.scry(this.buttonActions,'a.fbPhotosPhotoLike')[0];if(yb){var zb=l.find(this.root,'.likeCount'),ac=l.find(zb,'.likeCountNum');if(zb)if(j.hasClass(yb,'viewerLikesThis')){l.setContent(ac,parseInt(ac.textContent,10)-1);}else l.setContent(ac,parseInt(ac.textContent,10)+1);j.toggleClass(yb,'viewerLikesThis');j.removeClass(yb,'viewerAlreadyLikedThis');}};xb.prototype.likePhotoWithKey=function(){"use strict";return w.like(this.likePhoto.bind(this),lb());};xb.prototype.updateTagBox=function(yb,zb){"use strict";this.unhiliteAllTags();var ac=kb(yb);if(!ac)return;j.addClass(ac,'tagBox');j.addClass(ac,'tagBoxPendingResponse');j.removeClass(ac,'tagBoxPending');j.hide(l.find(ac,'span.tagForm'));if(zb){j.show(l.find(ac,'span.tagApproved'));}else j.show(l.find(ac,'span.tagIgnored'));};xb.prototype.rotate=function(yb){"use strict";var zb=this.stream.getCursor();if(this.getVideoOnStage()){var ac=(yb=='left')?270:90;nb(!!this.videoRotateURI);i.loadModules(["VideoRotate"],function(cc){new cc(zb,this.videoRotateURI).motionRotate(ac);}.bind(this));return;}var bc=fb({fbid:zb,opaquecursor:this.stream.getOpaqueCursor(zb),cs_ver:fa.VIEWER_SNOWLIFT},this.stream.getPhotoSetQuery());bc[yb]=1;this.setLoadingState(xb.STATE_IMAGE_DATA,true);this.setLoadingState(this.STATE_IMAGE_PIXELS,true);j.hide(this.image);new h('/ajax/photos/photo/rotate/').setAllowCrossPageTransition(true).setData(bc).setErrorHandler(this.rotationError.bind(this,zb)).setFinallyHandler(this.rotationComplete.bind(this,zb)).setMethod('POST').setReadOnly(false).send();};xb.prototype.rotationComplete=function(yb,zb){"use strict";if(yb==this.stream.getCursor()){this.setLoadingState(xb.STATE_IMAGE_DATA,false);this.switchImage(this.getImageURL(this.stream.getCurrentImageData()));this.swapData();}};xb.prototype.rotationError=function(yb,zb){"use strict";if(yb==this.stream.getCursor()){this.setLoadingState(xb.STATE_IMAGE_DATA,false);this.switchImage(this.getImageURL(this.stream.getCurrentImageData()));i.loadModules(["AsyncResponse"],function(ac){ac.defaultErrorHandler(zb);});}};xb.prototype.saveTagsFromPayload=function(yb){"use strict";this.storeFromData(yb);if('data' in yb&&this.stream.getCursor() in yb.data)this.swapData();};xb.prototype.saveEdit=function(){"use strict";if(!j.hasClass(this.root,'fbPhotoSnowliftEditMode'))return;i.loadModules(["PhotoInlineEditor","Form"],function(yb,zb){var ac=yb.getInstance(this.getViewerConst());ac&&zb.bootstrap(ac.getForm().controller);}.bind(this));};xb.prototype.mouseLeaveListener=function(event){"use strict";this.unhiliteAllTags();this.reHilitePendingTag();};xb.prototype.hilitePager=function(event){"use strict";var yb=bb.getEventPosition(event),zb=bb.getElementPosition(this.stage);if(aa.isRTL()){var ac=bb.getElementDimensions(this.stage);this.stagePagerPrev=ac.x-(yb.x-zb.x)<xb.GOPREV_AREA;}else this.stagePagerPrev=yb.x-zb.x<xb.GOPREV_AREA;j.conditionClass(this.prevPager,'hilightPager',this.stagePagerPrev);j.conditionClass(this.nextPager,'hilightPager',!this.stagePagerPrev);var bc,cc=event.getTarget();if(!ca.byClass(cc,'snowliftOverlay')&&!ca.byClass(cc,'bottomBarActions')&&!ca.byClass(cc,'snowliftPager'))bc=xb.PAGER_FADE;this.showPagers(bc);};xb.prototype.showPagers=function(yb){"use strict";clearTimeout(this.fadePagerTimer);this.setStagePagersState('active');if(typeof yb!=='undefined')this.fadePagerTimer=setTimeout(this.hidePagers.bind(this),yb);};xb.prototype.hidePagers=function(){"use strict";var yb=l.scry(this.getRoot(),'.fbPhotosPhotoActionsMenu')[0];if(yb)return;clearTimeout(this.fadePagerTimer);this.setStagePagersState('inactive');};xb.prototype.getTagger=function(){"use strict";return (this.PhotoTagger&&this.PhotoTagger.getInstance(fa.VIEWER_SNOWLIFT));};xb.prototype.unhiliteAllTags=function(){"use strict";clearTimeout(this.unhiliteTimer);l.scry(this.stage,'div.tagsWrapper div.hover').forEach(function(zb){j.removeClass(zb,'hover');});l.scry(this.stage,'div.tagsWrapper div.otherActive').forEach(function(zb){j.removeClass(zb,'otherActive');});this.hilitedTag=null;this.showingTypeaheadSuggestions=false;if(!j.hasClass(this.root,'taggingMode')){var yb=this.getTagger();if(yb){yb.hideTagger();yb.setCurrentFacebox(null);}}};xb.prototype.onCancelSaveRejectedLocation=function(event){"use strict";var yb=m.find(this.root,"#locationSuggestionDialogForm").childNodes,zb=null;for(var ac=0;ac<yb.length;ac++){var bc=yb[ac];if(bc.name==="fbid"){zb=bc.value;break;}}if(zb){var cc=new h("/ajax/photos/photo/location/edit/reject.php").setMethod("POST").setData({photoID:zb});cc.send();}};xb.prototype.switchHilitedTags=function(yb,zb){"use strict";if(this.switchTimer!==null){clearTimeout(this.switchTimer);this.switchTimer=null;}this.unhiliteAllTags();this.hiliteAllBoxes();var ac=kb(yb);if(ac){this.hilitedTag=yb;if(!j.hasClass(this.root,'taggingMode')&&ma.isFacebox(this.hilitedTag)){var bc=this.getTagger();if(bc){j.addClass(ac,'hover');var cc=bc.getFacebox(yb);bc.setCurrentFacebox(cc);if(cc)bc.addTagFromFacebox(cc);}}else j.addClass(ac,'hover');if(j.hasClass(ac,'tagBoxPending')&&!j.hasClass(ac,'showPendingTagName')&&zb===true){l.scry(this.stage,'div.tagsWrapper div.showPendingTagName').forEach(function(dc){j.removeClass(dc,'showPendingTagName');});j.addClass(ac,'showPendingTagName');}}};xb.prototype.reHilitePendingTag=function(){"use strict";var yb=kb(this.hilitedTag);if(yb&&j.hasClass(yb,'showPendingTagName'))return;var zb=l.scry(this.stage,'div.tagsWrapper div.showPendingTagName')[0];if(zb)this.switchHilitedTags(zb.id);};xb.prototype.hiliteTagsOnMouseMove=function(event){"use strict";if(!this.stream.getCurrentExtraData()||this.getVideoOnStage())return;if(this.switchTimer!==null)return;var yb=event.getTarget();if(ca.byClass(yb,'snowliftOverlay')||ca.byClass(yb,'fbPhotoSnowliftTagApproval')||ca.byClass(yb,'tagPointer')||ca.byClass(yb,'arrow')||ca.byClass(yb,'faceboxSuggestion')||ca.byClass(yb,'typeaheadWrapper')||ca.byClass(yb,'photoTagTypeahead'))return;var zb=ca.byClass(yb,'tagBoxPending'),ac=false;if(this.hilitedTag){var bc=kb(this.hilitedTag);ac=bc&&j.hasClass(bc,'tagBoxPending');}var cc=((!this.hilitedTag&&zb)||(!ac&&zb));if(cc){this.switchHilitedTags(zb.id);return;}if(zb&&(zb.id==this.hilitedTag))return;var dc=250,ec=15,fc=bb.getEventPosition(event);if(!this.startingMousePos)this.startingMousePos=fc;var gc=ma.absoluteToNormalizedPosition(this.image,fc);if(!this.haveLeftBufferRegion&&this.startingMousePos.distanceTo(fc)<ec){return;}else this.haveLeftBufferRegion=true;if(this.currentTagHasPrecedence(gc))return;var hc=ma.getNearestBox(this.stream.getCurrentExtraData().tagRects,gc);if(!hc){if(!ac){this.unhiliteAllTags();this.reHilitePendingTag();}return;}var ic=null;if(ac){var jc={};jc[this.hilitedTag]=this.stream.getCurrentExtraData().tagRects[this.hilitedTag];ic=ma.getNearestBox(jc,gc);}if(ic!==null&&ac)return;if(this.hilitedTag!=hc)if(ac){this.switchTimer=setTimeout(this.switchHilitedTags.bind(this,hc),dc);}else{if(this._showHover&&!this._seenTags[hc]){this._seenTags[hc]=true;na.logPivotImpression('snowlift',hc);}this.switchHilitedTags(hc);}};xb.prototype.currentTagHasPrecedence=function(yb){"use strict";if(!this.hilitedTag)return false;if(this.stream.getCurrentExtraData().tagRects[this.hilitedTag]===(void 0)){this.hilitedTag=null;return false;}var zb=this.stream.getCurrentExtraData().tagRects[this.hilitedTag],ac=new qa(zb.t+(zb.h()/2),zb.r,zb.b+(ma.isFacebox(this.hilitedTag)?10:0),zb.l,zb.domain);return ac.contains(yb);};xb.prototype.getVideoOnStage=function(){"use strict";var yb=this.stream&&this.stream.getCurrentImageData();return yb&&yb.video;};xb.prototype.shouldPageOnAction=function(yb,zb){"use strict";if(!this.isOpen||w.isShowingConfirmation())return false;var ac=l.isNode(zb)&&(ca.byClass(zb,'snowliftPager')||ca.byClass(zb,'stagePagers')||ca.byClass(zb,'pivotPageColumn')),bc=l.isNode(zb)&&ca.byClass(zb,'stage'),cc=j.hasClass(zb,'faceBox'),dc=(!j.hasClass(this.root,'taggingMode')&&cc&&!ac);if(dc){if(!this.showingTypeaheadSuggestions){this.getTagger().updateWithSuggestions();setTimeout((function(){l.find(this.getTagger().tagger,'input.textInput').focus();}).bind(this),0);}this.showingTypeaheadSuggestions=!this.showingTypeaheadSuggestions;return false;}var ec=((bc&&j.hasClass(this.root,'taggingMode'))||ca.byClass(zb,'tagBoxPending')||ca.byClass(zb,'tagBoxPendingResponse')||ca.byClass(zb,'fbPhotoTagApprovalBox')||ca.byClass(zb,'tag'));if(ec)return false;if(bc&&this._isZoomOn)bc=false;return yb==t.LEFT||yb==t.RIGHT||yb==pb||yb==qb||ac||dc||bc;};xb.prototype.keyHandler=function(yb,event){"use strict";if(event.getModifiers().any||u.getTopmostLayer()!==this.spotlight)return true;switch(o.getKeyCode(event)){case t.LEFT:case t.RIGHT:case pb:case qb:this.pageListener(event);return false;case rb:return this.toggleFullScreen();case sb:return this.likePhotoWithKey();case t.SPACE:this.toggleSlideshow();this.showPagers(xb.PAGER_FADE);return false;case t.ESC:if(this._isZoomOn){this._setZoomOut();this.switchImage(this.getImageURL(this.stream.getCurrentImageData()));return false;}break;}};xb.prototype.shouldHandlePendingTag=function(event){"use strict";var yb=this.getTagger();if(!yb||!yb.tags.length)return false;var zb=ma.absoluteToNormalizedPosition(this.getImage(),bb.getEventPosition(event)),ac=yb.findNearestTag(zb);if(!ac||!j.hasClass(ac.node,'tagBoxPending'))return false;g.inform('PhotoTagApproval.PENDING_TAG_PHOTO_CLICK',{id:ac.id,version:this.getVersionConst()});return true;};xb.prototype.pageListener=function(event){"use strict";var yb=o.getKeyCode(event),zb=event.getTarget();if(this._slideshowToken){this.stopSlideshow();return;}if(!this.shouldPageOnAction(yb,zb))return;if(this.shouldHandlePendingTag(event))return;var ac=0;if(yb==t.RIGHT||yb==qb){ac=1;ga.setPagingAction('key_right');this._disableMouseOver=true;}else if(yb==t.LEFT||yb==pb){ac=-1;ga.setPagingAction('key_left');this._disableMouseOver=true;}else if(ca.byClass(zb,'next')){ac=1;ga.setPagingAction('click_next');}else if(ca.byClass(zb,'prev')){ac=-1;ga.setPagingAction('click_prev');}else if(!this.stagePagerPrev){ac=1;ga.setPagingAction('click_stage');}else{ac=-1;ga.setPagingAction('click_stage_back');}var bc=l.scry(this.ufiForm,'input.mentionsHidden'),cc=false;for(var dc=0;dc<bc.length;dc++)if(!s.isEmpty(bc[dc])){cc=true;break;}if(cc||j.hasClass(this.root,'fbPhotoSnowliftEditMode')){this.warnLeavePage(this.page.bind(this,ac));}else{this.page(ac,ab.chrome()&&q.isFullScreen());this._previousZoomScrollPercent=null;}};xb.prototype.warnLeavePage=function(yb){"use strict";new k().setTitle(p._("Are you sure you want to leave this page?")).setBody(p._("You have unsaved changes that will be lost if you leave the page.")).setButtons([{name:'leave_page',label:p._("Leave this page"),handler:yb},{name:'continue_editing',label:p._("Stay on This Page"),className:'inputaux'}]).setModal(true).show();};xb.prototype.getUsesOpaqueCursor=function(){"use strict";return this.stream.getUsesOpaqueCursor();};xb.prototype.getOpaqueCursor=function(yb){"use strict";return this.stream.getOpaqueCursor(yb);};xb.prototype.setReachedLeftEnd=function(){"use strict";this.stream.setReachedLeftEnd();};xb.prototype.setReachedRightEnd=function(){"use strict";this.stream.setReachedRightEnd();};xb.prototype.page=function(yb,zb,ac){"use strict";if(!this.stream.isValidMovement(yb)||!this.stream.nonCircularPhotoSetCanPage(yb)){this.showPagers(xb.PAGER_FADE);return;}var bc=this.stream.getCursorAt(this.stream.calculatePositionForMovement(yb));if(this.snowflake&&((this.stream.getCursor()==this.firstInSet&&yb<0)||(this.firstInSet==bc&&yb>0))){this.showPagers(xb.PAGER_FADE);return;}this.lastPage=Date.now();this.unhiliteAllTags();this.startingMousePos=null;this.haveLeftBufferRegion=false;this._seenTags={};this._navCount+=yb;var cc=this.stream.allLoaded?Math.abs(this._navCount)-this.stream.getLength():null;if(this._extraSlidePivot&&this._albumFBID){if(!this._albumBoundaries.end&&cc===0){this._albumBoundaries.end=this.stream.getCursor();this._albumBoundaries.dir=yb;}else if(cc===-1)ja.fetch(this._albumFBID,this.stream);if(!this.onExtraSlide){if(this.stream.getCursor()===this._albumBoundaries.end&&bc===this._albumBoundaries.start&&yb===this._albumBoundaries.dir){this.showPivotSlide(this._albumFBID,zb);return;}else if(this.stream.getCursor()===this._albumBoundaries.start&&bc===this._albumBoundaries.end&&yb===-this._albumBoundaries.dir)this.showPivotSlide(this._albumFBID,zb);}else{this.hidePivotSlide();if(yb===-this._albumBoundaries.dir)return;}}var dc=this.getVideoOnStage();if(dc)this.switchVideo(dc,false);if(this.pivots&&this.pivots.page(yb))return;g.inform('PhotoSnowlift.PAGE');va.hide();this.recacheData();this.stream.moveCursor(yb);j.hide(this.image);if(yb!==0){this.storyID=null;this._updateContainerOwnerID();}if(yb!==0&&this._isZoomOn)this._setZoomOut();if(this.stream.errorInCurrent()){this.setLoadingState(xb.STATE_HTML,true);j.show(this.errorBox);return;}this.movementDelta+=yb;var ec=this.stream.getCurrentImageData();if(ec){var fc=this.getImageURL(ec);if(fc){this.switchImage(fc,null,true);}else if(ec.video)this.switchVideo(ec.video,true,ac);if(!zb){this.replaceUrl=true;mb(ec.info.permalink);}this.setLoadingState(xb.STATE_IMAGE_DATA,false);}else{this.setLoadingState(xb.STATE_IMAGE_PIXELS,true);this.setLoadingState(xb.STATE_IMAGE_DATA,true);}if(this.stream.getCurrentHtml()){this.swapData();}else this.setLoadingState(xb.STATE_HTML,true);this.disableAds=!this.isLoggedInViewer||this.stream.isInViewAsMode();this.loadAds();this.setLeftAndRightPagersState();if(this._slideshowToken){j.addClass(this.root,'slideshowStarted');}else if(this.slideshowAvailable)j.addClass(this.root,'slideshowAvailable');if(!this._extraSlidePivot&&this._showMorePhotos&&this._albumFBID)if(cc===-1){ja.fetch(this._albumFBID,this.stream);}else if(cc===0){na.logSuggestMorePhotos();this.showMorePhotos(this._albumFBID,true);this.showPagers();this._navCount=0;}else{this.hideMorePhotos();this.hidePagers();}};xb.prototype.showMorePhotos=function(yb,zb){"use strict";if(this._showingMorePhotos)return;this._showingMorePhotos=true;if(!this.searchPivot)this.searchPivot=this.overlay.appendChild(document.createElement('div'));j.addClass(this.stageWrapper,"_5ymv");this.searchPivotComponent=pa.render(pa.createElement(ia,{className:"_27g",fbid:yb,onclose:this.hideMorePhotos.bind(this),endofalbum:zb||false,withBackground:true}),this.searchPivot);};xb.prototype.hideMorePhotos=function(){"use strict";if(this.searchPivotComponent&&this._showingMorePhotos){this._showingMorePhotos=false;j.removeClass(this.stageWrapper,"_5ymv");this.searchPivotComponent.setProps({fbid:null});}};xb.prototype.showPivotSlide=function(yb,zb){"use strict";if(this.onExtraSlide)return;this.onExtraSlide=true;j.addClass(this.stageWrapper,"_3tvf");if(!this.pivotSlide){this.pivotSlide=l.create('div');l.insertBefore(this.stageActions,this.pivotSlide);}this.pivotSlideComponent=pa.render(pa.createElement(ha,{fbid:yb,isAlbum:this._isAlbum,albumOwnerName:this._albumOwnerName,visible:true,onReturn:this.page.bind(this,this._albumBoundaries.dir,zb)}),this.pivotSlide);};xb.prototype.hidePivotSlide=function(){"use strict";if(this.pivotSlideComponent&&this.onExtraSlide){this.pivotSlideComponent.setProps({visible:false});j.removeClass(this.stageWrapper,"_3tvf");}this.onExtraSlide=false;};xb.prototype.logImpressionDetailsForPhoto=function(){"use strict";var yb=[].concat(l.scry(db('fbPhotoSnowliftTagList'),'input.photoImpressionDetails'),l.scry(db('fbPhotoSnowliftFeedback'),'input.photoImpressionDetails'));if(yb.length===0)return;var zb={};for(var ac=0;ac<yb.length;ac++)zb[yb[ac].name]=yb[ac].value;if(this.getVideoOnStage()){zb.width=0;zb.height=0;}else{var bc=this.getImageDimensions(this.stream.getCurrentImageData());zb.width=bc.x;zb.height=bc.y;}ga.addDetailData(this.stream.getCursor(),zb);ka.setIsLogAdData(true);};xb.prototype.loadAds=function(){"use strict";if(this.disableAds)return;ka.loadAdsFromUserActivity();};xb.prototype.transitionHandler=function(yb){"use strict";if(yb.getQueryData().closeTheater||yb.getQueryData().permPage||this.returningToStart){if(this.isOpen)this.close();this.transitionHandlerRegistered=false;return false;}if(this.replaceUrl){this.replaceUrl=false;this._uriStack.push(yb.getQualifiedURI().toString());ba.transitionComplete(true);return true;}var zb=this._uriStack.length;if(zb>=2&&this._uriStack[zb-2]==yb.getQualifiedURI().toString())this._uriStack.pop();var ac=this.stream.getCursorForURI(yb.getUnqualifiedURI().toString());if(ac){var bc=this.stream.getRelativeMovement(ac);this.page(bc,true);ba.transitionComplete(false);return true;}if(this.isOpen){ba.transitionComplete(true);this.close();return true;}this.transitionHandlerRegistered=false;return false;};xb.prototype.recacheData=function(){"use strict";if(!this.loadingStates.html){var yb=this.stream.getCurrentHtml();for(var zb in yb){yb[zb]=gb(db(zb).childNodes);l.empty(db(zb));}}};xb.prototype.reloadIfTimeout=function(){"use strict";if(!r.hasLoaded(this.image)){var yb=this.makeNewImage(this.image.src,true);o.listen(yb,'load',this.useImage.bind(this,yb,null,true));this._log(yb.src);}};xb.prototype.useImage=function(yb,zb,ac){"use strict";if(ac&&r.hasLoaded(this.image))return;l.replace(this.image,yb);this.image=yb;this.adjustStageSize(zb);};xb.prototype.makeNewImage=function(yb,zb){"use strict";if(this.imageLoadingTimer){clearTimeout(this.imageLoadingTimer);this.imageLoadingTimer=null;}else if(!zb)this.imageRefreshTimer=setTimeout(this.reloadIfTimeout.bind(this),xb.LOADING_TIMEOUT);var ac=l.create('img',{className:'spotlight',alt:''});ac.setAttribute('aria-describedby','fbPhotosSnowliftCaption');ac.setAttribute('aria-busy','true');var bc=function(){clearTimeout(this.imageRefreshTimer);this.image.setAttribute('aria-busy','false');this.setLoadingState(this.STATE_IMAGE_PIXELS,false);setTimeout((function(){if(this.isOpen){this.adjustStageSize();this.adjustForNewData();}}).bind(this),0);}.bind(this);o.listen(ac,'load',bc);this._log(yb);ac.src=yb;return ac;};xb.prototype.switchImage=function(yb,zb,ac){"use strict";j.hide(this.image);j.hide(this.errorBox);this.setLoadingState(this.STATE_IMAGE_PIXELS,true);var bc=this.stream&&this.stream.getCurrentImageData();if(bc){ga.addPhotoView(bc.info,this.shouldShowHiRes(bc),this.fullscreen&&q.isFullScreen());if(this._showHover){var cc=this.stream.getCurrentExtraData();if(cc)na.logImageImpression('snowlift',String(this.stream.getCursor()),Object.keys(cc.tagRects));}}this.useImage(this.makeNewImage(yb,false),zb,false);if(ac)this.stream.preloadImages(this.shouldShowHiRes.bind(this));if(!this._isZoomOn&&this._isZoomAvailable(bc)){ga.addPanoramaImpression();var dc=new bb(this.stage.clientWidth,this.stage.clientHeight);this._displayZoomInButton(dc);}else if(this._hasZoomCapability)j.hide(this.showZoomInButton);if(this._isZoomOn)this.switchIntoZoomedImage();g.inform('PhotoSnowlift.SWITCH_IMAGE');};xb.prototype._conditionDisplayZoomInButton=function(){"use strict";if(!this._hasZoomCapability)return;if(this._isZoomAvailable()){var yb=new bb(this.stage.clientWidth,this.stage.clientHeight);this._displayZoomInButton(yb);}else j.hide(this.showZoomInButton);};xb.prototype._displayZoomInButton=function(yb){"use strict";var zb=parseInt(this.image.style.height,10),ac=(yb.y-zb)/2;if(ac>=xb.ZOOM_BUTTON_TOP_PAD+xb.ZOOM_BUTTON_BOT_PAD+xb.ZOOM_BUTTON_HEIGHT){var bc=ac-xb.ZOOM_BUTTON_HEIGHT-xb.ZOOM_BUTTON_TOP_PAD;ua.set(this.showZoomInButton,'bottom',bc+'px');}else ua.set(this.showZoomInButton,'bottom','60px');j.show(this.showZoomInButton);};xb.prototype._isZoomAvailable=function(yb){"use strict";if(typeof yb==="undefined")yb=this.stream&&this.stream.getCurrentImageData();if(!this._hasZoomCapability||!yb||!yb.originalDimensions)return false;var zb=new bb(this.stage.clientWidth,this.stage.clientHeight),ac=yb.originalDimensions,bc=ac.x/ac.y,cc=Math.min(zb.y*bc,ac.x);if(!isNaN(bc)&&bc>2&&ac.y>xb.MIN_PANORAMA_Y&&zb.x*xb.MIN_PANO_TO_STAGE_RATIO<cc){return true;}else return false;};xb.prototype._setZoomIn=function(){"use strict";this._isZoomOn=true;j.hide(this.showZoomInButton);j.hide(this.stageActions);j.show(this.showZoomOutButton);ua.set(this.stage,'overflow','hidden');this.spotlight.disableBehavior(v);this.collapseRHC();};xb.prototype._setZoomOut=function(){"use strict";if(!this._hasZoomCapability)return;this._isZoomOn=false;this.spotlight.enableBehavior(v);ua.set(this.stage,'overflow','visible');j.hide(this.showZoomInButton);j.hide(this.showZoomOutButton);j.hide(this.zoomedImage);j.hide(this.outerImageSlider);j.show(this.stageActions);this.uncollapseRHC();};xb.prototype.switchIntoZoomedImage=function(yb){"use strict";this._setZoomIn();j.hide(this.zoomedImage);j.hide(this.outerImageSlider);var zb=this.stream.getCurrentImageData(),ac=zb.originalDimensions;this.zoomedImage.src=zb.url;this.adjustStageSize(ac);this._initializeZoomedImagePositions(new bb(parseInt(ua.get(this.zoomedImage,'width'),10),parseInt(ua.get(this.zoomedImage,'height'),10)));j.hide(this.image);};xb.prototype._adjustInnerImageSlider=function(yb){"use strict";var zb=this.stage.clientWidth,ac=Math.min(100,(zb/yb.x)*100);ua.set(this.innerImageSlider,'width',ac+'%');return ac;};xb.prototype._getSliderSizeForZoomedImage=function(yb){"use strict";var zb=xb.MAX_SLIDER_HEIGHT*this.stage.clientHeight/yb.y,ac=xb.MAX_SLIDER_WIDTH*this.stage.clientWidth/yb.x,bc=Math.min(zb,ac);return new bb(100*yb.x*bc/this.stage.clientWidth,100*yb.y*bc/this.stage.clientHeight);};xb.prototype._initializeZoomedImagePositions=function(yb){"use strict";this._scrollZoomedImageToPercent(this._previousZoomScrollPercent);var zb=this._getSliderSizeForZoomedImage(yb);ua.set(this.outerImageSlider,'width',zb.x+'%');ua.set(this.outerImageSlider,'height',zb.y+'%');ua.set(this.outerImageSlider,'left',(50-zb.x/2)+'%');ua.set(this.showZoomOutButton,'bottom',zb.y*this.stage.clientHeight/100+parseInt(ua.get(this.outerImageSlider,'bottom'),10)+20+'px');j.show(this.zoomedImage);j.show(this.outerImageSlider);};xb.prototype._zoomedImageMouseDown=function(event){"use strict";if(!this._isZoomOn)return;j.addClass(this.stage,'showSlider');if(this._zoomedImageMouseMoveHandle)this._zoomedImageMouseMoveHandle.remove();var yb=false,zb=event.getTarget();if(ca.byClass(zb,"_10zv")){this.startSliderMargins=new bb(parseFloat(ua.get(this.innerImageSlider,'marginLeft')),parseFloat(ua.get(this.innerImageSlider,'marginTop')));this.startImageMargins=null;this.mouseDownStartPosition=new bb(event.clientX,event.clientY);}else if(ca.byClass(zb,"_10zx")){this.startSliderMargins=new bb(parseInt(ua.get(this.innerImageSlider,'marginLeft'),10),parseInt(ua.get(this.innerImageSlider,'marginTop'),10));this.startImageMargins=null;var ac=parseInt(ua.get(this.innerImageSlider,'width'),10);this.mouseDownStartPosition=new bb(this.innerImageSlider.getBoundingClientRect().left+ac/2,event.clientY);yb=true;}else if(ca.byClass(zb,"_10zw")){this.startImageMargins=new bb(parseInt(ua.get(this.zoomedImage,'marginLeft'),10),parseInt(ua.get(this.zoomedImage,'marginTop'),10));this.startSliderMargins=null;this.mouseDownStartPosition=new bb(event.clientX,event.clientY);}this._zoomedImageMouseMoveHandle=o.listen(this.stage,'mousemove',this._zoomedImagePan.bind(this));if(yb){this._zoomedImagePan(event);}else event.kill();};xb.prototype._zoomedImageMouseUp=function(event){"use strict";if(this._zoomedImageMouseMoveHandle){j.removeClass(this.stage,'showSlider');this._zoomedImageMouseMoveHandle.remove();this._zoomedImageMouseMoveHandle=null;var yb=parseFloat(ua.get(this.zoomedImage,'marginLeft')),zb=-this.zoomedImage.width+this.stage.clientWidth;this._previousZoomScrollPercent=yb/zb;}};xb.prototype._zoomedImagePan=function(event){"use strict";var yb;if(this.startSliderMargins){yb=event.clientX-this.mouseDownStartPosition.x;var zb=parseFloat(ua.get(this.outerImageSlider,'width')),ac=parseFloat(ua.get(this.innerImageSlider,'width')),bc=Math.max(0,Math.min(zb-ac,this.startSliderMargins.x+yb))/zb;ua.set(this.innerImageSlider,'marginLeft',100*bc+"%");ua.set(this.zoomedImage,'marginLeft',-1*bc*this.zoomedImage.width+'px');event.kill();}else if(this.startImageMargins){yb=1.75*(this.mouseDownStartPosition.x-event.clientX);var cc=Math.min(0,Math.max(this.startImageMargins.x-yb,-this.zoomedImage.width+this.stage.clientWidth));ua.set(this.zoomedImage,'marginLeft',cc+'px');ua.set(this.innerImageSlider,'marginLeft',(-cc/this.zoomedImage.width*100)+"%");event.kill();}};xb.prototype._scrollZoomedImageToPercent=function(yb){"use strict";if(yb===(void 0)||yb===null)yb=.5;var zb=new bb(parseInt(ua.get(this.zoomedImage,'width'),10),parseInt(ua.get(this.zoomedImage,'height'),10));ua.set(this.innerImageSlider,'marginLeft',((100-this._adjustInnerImageSlider(zb))*yb)+'%');ua.set(this.zoomedImage,'marginLeft',((this.stage.clientWidth-zb.x)*yb)+'px');};xb.prototype.switchVideo=function(yb,zb,ac){"use strict";this._pauseVideoIfNeeded();var bc='swf_'+yb;l.empty(this.videoStage);if(zb){j.addClass(this.stageWrapper,'showVideo');var cc=this.stream.getCurrentImageData();if(this.shouldRenderVideoPivots){j.hide(this.nextPager);j.hide(this.prevPager);}var dc=cc.video_element;l.find(dc,"._ox1").style.cssText='';var ec=null;if(this.pivotsCarouselElement)ec=m.scry(this.pivotsCarouselElement,"._32_l");if(ec)ec.forEach(function(ic){var jc=ic.getAttribute('data-fbid'),kc=this.stream.getCursor(),lc=l.find(ic,"._1pqn");if(jc===kc){j.show(lc);}else j.hide(lc);}.bind(this));j.addClass(dc,'videoStageContainer');l.appendContent(this.videoStage,dc);l.appendContent(this.videoStage,this.pivotsCarouselElement);if(window[bc]&&!kb(bc))window[bc].write(yb);var fc='video_warning_'+yb,gc=kb(yb);if(!this.videoWarnings)this.videoWarnings=[];if(gc&&this.videoWarnings[fc])l.setContent(gc,this.videoWarnings[fc]);this._videoPlayerStateManager=cc.controller;this._videoPlayerStateManager.reset();this._videoPlayerStateManager.collectFeedTrackingData();if(this._autoplayVideos){var hc=ac||cb.USER;this._videoPlayerStateManager.play(hc);}if(this._autoplayNextVideo)this._videoPlayerStateManager.addListener('finishPlayback',function(){var ic=cc.info.fbid.toString();if(this.haltAutoplay&&ic!==this.stream.fbidList[this.stream.fbidList.length-1]){if(this.autoplayOptionScreenConfig){var jc=this.autoplayOptionScreenConfig.controller;jc.registerCallbacks(dc,this.chooseToReplayVideo.bind(this,this._videoPlayerStateManager),this.handleAutoplay.bind(this,cc));}}else this.handleAutoplay(cc);}.bind(this));setTimeout(this.adjustStageSizeForVideo.bind(this,yb),0);}else{window[bc]&&window[bc].addVariable('video_autoplay',0);this.videoLoadTimer&&clearTimeout(this.videoLoadTimer);j.removeClass(this.stageWrapper,'showVideo');}};xb.prototype.removeAutoplayOptionScreen=function(){"use strict";if(this.autoplayOptionScreenConfig)this.autoplayOptionScreenConfig.controller.removeSelf();};xb.prototype.chooseToReplayVideo=function(yb){"use strict";yb.play(cb.USER);this.removeAutoplayOptionScreen();this.haltAutoplay=false;};xb.prototype.handleAutoplay=function(yb){"use strict";var zb=yb.info.fbid.toString();if(zb===this.stream.getCursor()&&zb!==this.stream.fbidList[this.stream.fbidList.length-1]){ta.adjustCarouselOnAutoPlay();this.page(1,false,cb.AUTOPLAY);}this.removeAutoplayOptionScreen();this.haltAutoplay=false;};xb.prototype.checkVideoStatus=function(yb){"use strict";if(this.videoLoadTimer)clearTimeout(this.videoLoadTimer);var zb=this.getVideoOnStage();if(!zb){return;}else{if(zb!==yb)return;this.adjustStageSizeForVideo(yb);}};xb.prototype.getVideoSize=function(yb){"use strict";return new bb(yb.getAttribute('data-video-width'),+yb.getAttribute('data-video-height')+this.getVideoComponentsHeight(yb));};xb.prototype.getVideoElement=function(yb){"use strict";return l.scry(this.videoStage,"._ox1")[0];};xb.prototype.getVideoComponentsHeight=function(yb){"use strict";var zb=0,ac=ca.byClass(yb,"_1c_u");if(!ac)return 0;var bc=l.scry(ac,"._2i84");if(bc.length){var cc=bc[0].getBoundingClientRect();zb=cc.bottom-cc.top;}return zb;};xb.prototype.adjustStageSizeForVideo=function(yb){"use strict";var zb=this.getVideoElement(yb);if(!zb){this.videoLoadTimer=setTimeout(this.checkVideoStatus.bind(this,yb),200);}else this.adjustStageSize(this.getVideoSize(zb));};xb.prototype.handleServerError=function(yb,zb){"use strict";l.setContent(this.errorBox,yb);this.storeFromData(zb);};xb.prototype.fixButtonText=function(yb){"use strict";if(!this.buttonTruncateGk)return;var zb=l.scry(yb,".photosTruncatingUIButton"),ac=parseInt(ua.get(yb,'width'),10);if(ac>tb){var bc={tagPhoto:p._("Tag photo"),doneTagPhoto:p._("Done Tagging"),addLocation:p._("Add Location"),editPhoto:p._("Edit")};for(var cc=0;cc<zb.length;cc++){var dc=zb[cc];j.addClass(dc,"_2n0k");wa.set(dc,bc[dc.getAttribute('data-buttonname')],'below','center');}}};xb.prototype.swapData=function(){"use strict";var yb,zb=this.stream.getCurrentHtml();if(zb){this.setLoadingState(xb.STATE_HTML,false);for(var ac in zb){yb=kb(ac);yb&&l.setContent(yb,zb[ac]);}var bc=kb('photosTruncatingUIButtonGroup');bc&&this.fixButtonText(bc);g.inform('PhotoSnowlift.DATA_CHANGE',fb(this.stream.getCurrentImageData().info,{movement:this.movementDelta}),g.BEHAVIOR_STATE);this.movementDelta=0;if(this.stream.getCurrentExtraData())g.inform('PhotoSnowlift.EXTRA_DATA_CHANGE',this.stream.getCurrentExtraData(),g.BEHAVIOR_STATE);}this.adjustScroller();this.scrollableArea.showScrollbar(false);this.adjustForNewData();this.logImpressionDetailsForPhoto();};xb.prototype.updateTotalCount=function(yb,zb,ac){"use strict";var bc=this.stream.getCurrentHtml();if(bc){var cc=db('fbPhotoSnowliftPositionAndCount');l.replace(cc,ac);cc=ac;j.show(cc);var dc='fbPhotoSnowliftPositionAndCount';bc[dc]=gb(cc.childNodes);}this.stream.setTotalCount(yb);this.stream.setFirstCursorIndex(zb);};xb.prototype.addPhotoFbids=function(yb,zb,ac,bc){"use strict";if(bc&&this.sessionID&&bc!=this.sessionID)return;var cc=this.stream.getCursor()===null;if(this.shouldRenderVideoPivots&&!this._videoSameAsSource)this.stream.fbidList=[];this.stream.attachToFbidsList(yb,zb,ac);if(ac&&cc)this.page(0,true);if(this.pivots&&ac)this.pivots.setCycleCount(this.stream.calculateDistance(this.stream.getCursor(),this.stream.firstCursor));if(!this.pagersShown&&this.stream.canPage())this.setStagePagersState('ready');if(!this.slideshowAvailable&&this.stream.canPage()){this.slideshowAvailable=true;j.addClass(this.root,'slideshowAvailable');}this.setLeftAndRightPagersState();if(this.shouldRenderVideoPivots&&!this._videoSameAsSource){var dc=this.stream.getCursor(),ec=this.stream.calculateDistance(dc,this._mediaFBID);this.stream.moveCursor(ec);}};xb.prototype.attachTagger=function(yb,zb){"use strict";l.appendContent(this.stageActions,yb);if(zb)zb.setTokenarea(this.taglist);};xb.prototype.storeFromData=function(yb){"use strict";if(!this.isOpen)return;if(yb.pivots)this.pivotsCarouselElement=yb.pivots;if(yb.autoplay_option_screen_config){this.autoplayOptionScreenConfig=yb.autoplay_option_screen_config;if(this.autoplayOptionScreenConfig&&this.autoplayOptionScreenConfig.enabled)this.addHaltAutoplaySubscription();}this.shouldRenderVideoPivots=yb.should_render_pivots;if(yb.ssid&&this.sessionID&&this.sessionID!=yb.ssid)return;var zb=this.stream.storeToCache(yb);if('error' in zb){this.checkState(xb.STATE_ERROR);return;}if('init' in yb){if(this.shouldRenderVideoPivots)this._videoSameAsSource=yb.init.videoSameAsSource;this._mediaFBID=yb.init.fbid;this._albumFBID=yb.init.album_fbid;this._isAlbum=yb.init.is_album;this._albumOwnerName=yb.init.album_owner_name;this._autoplayVideos=yb.init.autoplay_videos;this._autoplayNextVideo=yb.init.autoplay_next_video;}if('init' in zb){this.initDataFetched(zb.init);if(this.openExplicitly){this.replaceUrl=true;mb(this.stream.getCurrentImageData().info.permalink);}if(this.stream.canPage())this.setStagePagersState('ready');this.setLeftAndRightPagersState();}if('image' in zb)this.checkState(xb.STATE_IMAGE_DATA);if('data' in zb)this.checkState(xb.STATE_HTML);};xb.prototype.setLeftAndRightPagersState=function(){"use strict";if(this.stream.isNonCircularPhotoSet()){j.conditionClass(this.root,'disableLeft',!this.stream.nonCircularPhotoSetCanPage(-1));j.conditionClass(this.root,'disableRight',!this.stream.nonCircularPhotoSetCanPage(1));}if(this.snowflake){j.conditionClass(this.root,'disableLeft',this.stream.getCursor()==this.firstInSet);var yb=this.stream.getCursorAt(this.stream.calculatePositionForMovement(1));j.conditionClass(this.root,'disableRight',yb==this.firstInSet);}};xb.prototype.setStagePagersState=function(yb){"use strict";switch(yb){case 'ready':j.addClass(this.root,'pagingReady');this.pagersShown=true;return;case 'active':j.addClass(this.root,'pagingActivated');return;case 'inactive':j.removeClass(this.root,'pagingActivated');return;case 'disabled':case 'reset':j.removeClass(this.root,'pagingReady');return;}};xb.prototype.deletePhoto=function(yb){"use strict";this.closeRefresh();};xb.prototype.closeRefresh=function(){"use strict";this.refreshOnClose=true;this.spotlight.hide();};xb.prototype.onHiliteTag=function(yb,zb){"use strict";if(zb.version!=fa.VIEWER_SNOWLIFT)return;var ac=zb.tag;if(ac)this.switchHilitedTags(ac,true);};xb.prototype.onUpdateTagBox=function(yb,zb){"use strict";if(zb.version==fa.VIEWER_SNOWLIFT)this.updateTagBox(zb.id,zb.approve);};xb.prototype._log=function(yb){"use strict";if(this._shouldLog){this._logger&&this._logger.log(yb);return true;}return false;};xb.prototype._enableMouseOver=function(){"use strict";this._disableMouseOver=false;};xb.prototype._interceptMouseOver=function(event){"use strict";if(this._disableMouseOver)event.kill();};xb.prototype.isReturningToStart=function(){"use strict";return !!this.returningToStart;};xb.prototype._pauseVideoIfNeeded=function(){"use strict";if(this._videoPlayerStateManager)this._videoPlayerStateManager.pause('unloaded');};xb.getInstance=function(){"use strict";if(!xb._instance)xb._instance=new xb();return xb._instance;};xb.initWithSpotlight=function(yb,zb){"use strict";xb.getInstance().init(yb,zb);};xb.addPhotoFbids=function(yb,zb,ac,bc){"use strict";xb.getInstance().addPhotoFbids(yb,zb,ac,bc);};xb.setReachedLeftEnd=function(){"use strict";xb.getInstance().setReachedLeftEnd();};xb.setReachedRightEnd=function(){"use strict";xb.getInstance().setReachedRightEnd();};xb.attachFollowFlyout=function(yb){"use strict";l.insertAfter(db('fbPhotoSnowliftSubscribe'),yb);};xb.attachSubscribeFlyout=function(yb){"use strict";l.insertAfter(db('fbPhotoSnowliftSubscribe'),yb);};xb.attachTagger=function(yb,zb){"use strict";xb.getInstance().attachTagger(yb,zb);};xb.preload=function(yb,zb){"use strict";xb.getInstance().preload(yb,zb);};xb.bootstrap=function(yb,zb){"use strict";var ac=yb&&za(yb).getQueryData();if(ac&&ac.hasOwnProperty('share_id')){i.loadModules(["SpotlightShareViewer"],function(bc){bc.bootstrap(yb,zb);});return;}xb.getInstance().bootstrap(yb,zb);};xb.closeRefresh=function(){"use strict";xb.getInstance().closeRefresh();};xb.deletePhoto=function(yb){"use strict";xb.getInstance().deletePhoto(yb);};xb.getImage=function(){"use strict";return xb.getInstance().getImage();};xb.getImageId=function(){"use strict";return xb.getInstance().getImageId();};xb.getLoadQuery=function(){"use strict";return xb.getInstance().getLoadQuery();};xb.getRHCBody=function(){"use strict";return xb.getInstance().getRHCBody();};xb.getRHCFooter=function(){"use strict";return xb.getInstance().getRHCFooter();};xb.getRHCHeader=function(){"use strict";return xb.getInstance().getRHCHeader();};xb.getRoot=function(){"use strict";return xb.getInstance().getRoot();};xb.likePhotoSkipConfirmation=function(yb){"use strict";xb.getInstance().likePhotoSkipConfirmation(yb);};xb.onCancelSaveRejectedLocation=function(event){"use strict";xb.getInstance().onCancelSaveRejectedLocation(event);};xb.saveTagsFromPayload=function(yb){"use strict";xb.getInstance().saveTagsFromPayload(yb);};xb.saveTagsFromPayloadDelayed=function(yb){"use strict";setTimeout(xb.saveTagsFromPayload.bind(null,yb),2000);};xb.handleServerError=function(yb,zb){"use strict";xb.getInstance().handleServerError(yb,zb);};xb.setVideoWarning=function(yb,zb){"use strict";var ac=xb.getInstance(),bc='video_warning_'+yb;if(!ac.videoWarnings)ac.videoWarnings=[];ac.videoWarnings[bc]=zb;};xb.storeFromData=function(yb){"use strict";xb.getInstance().storeFromData(yb);};xb.swapData=function(){"use strict";xb.getInstance().swapData();};xb.updateTotalCount=function(yb,zb,ac){"use strict";xb.getInstance().updateTotalCount(yb,zb,ac);};xb.setVideoRotateURI=function(yb){"use strict";xb.getInstance().videoRotateURI=yb;};fb(xb,{STATE_ERROR:'error',STATE_HTML:'html',STATE_IMAGE_PIXELS:'image_pixels',STATE_IMAGE_DATA:'image',LOADING_TIMEOUT:2000,PAGER_FADE:3000,FULL_SCREEN_PADDING:10,STAGE_NORMAL_MAX:{x:960,y:960},STAGE_MIN:{x:520,y:520},SIDEBAR_SIZE_MAX:360,MIN_PANORAMA_Y:240,ZOOM_BUTTON_HEIGHT:52,ZOOM_BUTTON_BOT_PAD:60,ZOOM_BUTTON_TOP_PAD:16,MAX_SLIDER_HEIGHT:.075,MAX_SLIDER_WIDTH:.75,MIN_PANO_TO_STAGE_RATIO:1.2,STAGE_CHROME:{x:82,y:42},VIDEO_BOTTOM_BAR_SPACE:40,GOPREV_AREA:120,TIMELINE_STRETCH_WIDTH:843,TIMELINE_STRETCH_MIN:480,MIN_TAG_DISTANCE:83,PADDING_MIN:40,MIN_UFI_HEIGHT:250,COLLECTIONS_UNTAGGED_PHOTOS:3,PHOTOS_OF_YOU_SUGGESTIONS:28,FRIENDS_IN_PHOTOS_SUGGESTIONS:31,MIN_ADS_VISIBLE:1,PINNED_UFI_ADJUSTMENT:11,ADD_COMMENT_HEIGHT:54,SLIDESHOW_TIME:3000,_instance:null,touch:jb,touchMarkup:jb});fb(xb.prototype,{switchTimer:null,imageRefreshTimer:null,imageLoadingTimer:null,lastPage:0,currentMinSize:null,currentImageSize:null,resetUriStack:true,thumbSrc:null,shouldStretch:false,stageMax:xb.STAGE_NORMAL_MAX,stageChrome:xb.STAGE_CHROME,stagePagerPrev:null,ua:null,PhotoTagger:null});e.exports=xb;},null);
|
|
__d("ProfileActionBarLogger",["FBJSON","MarauderLogger","Optimus"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();function j(){i.addEventListener('mouseup','data-loggable','ProfileHighQualityLogger',{handleOptimus:function(k,l,m){h.log('profile_high_quality_action',null,g.parse(l.getAttribute('data-store')));return false;}});}f.init=j;},null);
|
|
__d("ProfileEscapeHatch",["CSS","ProfileTabUtils","TimelineComponentKeys","TimelineController"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();function k(l){"use strict";this.$ProfileEscapeHatch0=l;j.register(i.ESCAPE_HATCH,this);}k.prototype.handleTabChange=function(l){"use strict";g.conditionShow(this.$ProfileEscapeHatch0,h.isTimelineTab(l));};e.exports=k;},null);
|
|
__d("TimelineDrag",["ArbiterMixin","Event","Locale","Style","Vector","mixin"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();var m=l(g);for(var n in m)if(m.hasOwnProperty(n))p[n]=m[n];var o=m===null?null:m.prototype;p.prototype=Object.create(o);p.prototype.constructor=p;p.__superConstructor__=m;function p(q,r,s){"use strict";s=s||{};this._listenOn=s.listenOn;this._offsetInput=r;this._defaultOffset=s.default_offset;this._killClicks=s.killClicks;this._vertical=true;this._RTLXSwitch=false;this.setPicture(q,s);}p.prototype.setPicture=function(q,r){"use strict";if(!q)return false;r=r||{};this._picture=q;this._defaultOffset=r.default_offset;if(r.offsetInput)this._offsetInput=r.offsetInput;if(r.vertical!==(void 0))this._vertical=r.vertical;if(r.height)this._containerHeight=r.height;if(r.width)this._containerWidth=r.width;if(this._vertical){this._offsetType='top';this._eventCoord='y';}else{this._RTLXSwitch=i.isRTL();this._offsetType='left';this._eventCoord='x';}if(this._picture.complete){this._initialLoad();}else this._loadListener=h.listen(this._picture,'load',function(){this._loadListener.remove();this._loadListener=null;this._initialLoad();}.bind(this));};p.prototype.destroy=function(){"use strict";this._stopDrag();this._saveOffset();this._mousedown&&this._mousedown.remove();this._mousedown=null;this._onclick&&this._onclick.remove();this._onclick=null;this._loadListener&&this._loadListener.remove();this._loadListener=null;};p.prototype._initialLoad=function(){"use strict";var q=this._listenOn?this._listenOn:this._picture;this._mousedown&&this._mousedown.remove();this._mousedown=h.listen(q,'mousedown',this._onMouseDown.bind(this));if(this._vertical){this._maxOffset=this._containerHeight-this._picture.offsetHeight;}else this._maxOffset=this._containerWidth-this._picture.offsetWidth;if(this._defaultOffset!==(void 0))this._setOffset(this._defaultOffset);this._onclick&&this._onclick.remove();this._onclick=null;if(this._killClicks)this._onclick=h.listen(q,'click',this._onClick.bind(this));this._saveOffset();};p.prototype._onClick=function(event){"use strict";event.kill();};p.prototype._onMouseDown=function(event){"use strict";var q=parseInt(j.get(this._picture,this._offsetType),10)||0;this._pictureStartDragOffset=q-k.getEventPosition(event)[this._eventCoord];this._startDrag();event.kill();};p.prototype._startDrag=function(){"use strict";if(!this._dragStarted){this.inform('startdrag',this);this._dragTokens=[h.listen(document.documentElement,'mouseup',this._onMouseUp.bind(this)),h.listen(document.documentElement,'mousemove',this._onMouseMove.bind(this))];this._dragStarted=true;}};p.prototype._saveOffset=function(){"use strict";var q=parseInt(j.get(this._picture,this._offsetType),10);if(this._RTLXSwitch){this._offsetInput.value=q+this._containerWidth-this._picture.offsetWidth;}else this._offsetInput.value=q;};p.prototype._stopDrag=function(){"use strict";if(this._dragStarted){this.inform('stopdrag',this);this._dragStarted=false;this._dragTokens.forEach(function(q){q.remove();});this._saveOffset();}};p.prototype._onMouseUp=function(event){"use strict";this._stopDrag();event.kill();};p.prototype._setOffset=function(q){"use strict";if(this._RTLXSwitch){q=Math.max(0,Math.min(q,-this._maxOffset));}else q=Math.min(0,Math.max(q,this._maxOffset));j.set(this._picture,this._offsetType,q+'px');};p.prototype._onMouseMove=function(event){"use strict";this._setOffset(this._pictureStartDragOffset+k.getEventPosition(event)[this._eventCoord]);event.kill();};e.exports=p;},null);
|
|
__d("TimelineCover",["Arbiter","Button","CSS","DOM","DOMScroll","Event","FileInputUploader","HTML","PageTransitions","Parent","Run","Style","TimelineDrag","$","cx","fbt","ge","tidyEvent"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){b.__markCompiled&&b.__markCompiled();function y(z,aa,ba){"use strict";this.root=t('fbProfileCover');if(typeof aa==='object'){this._coverHeight=aa.cover_height;this._coverWidth=aa.cover_width;this.previewing=aa.previewing;this._isLegacy=false;}else{this._isLegacy=true;this._coverHeight=aa;this.previewing=ba;}this._parentSection=p.byClass(this.root,'fbTimelineSection');this.cover=j.find(this.root,'.cover');y.instance=this;this.editing=false;q.onBeforeUnload(this.onBeforeUnload.bind(this));if(!this._parentSection)this._parentSection=p.byClass(this.root,'fbEventHeader');if(this.previewing){this.editMode();this.updateCoverImage(this.previewing);}}y.prototype.showLoadingIndicator=function(){"use strict";var z=w('fbCoverImageContainer');if(z)i.addClass(z,'opaquedLoading');};y.prototype.hideLoadingIndicator=function(){"use strict";var z=w('fbCoverImageContainer');if(z)i.removeClass(z,'opaquedLoading');};y.prototype.onBeforeUnload=function(){"use strict";if(this.isInEditMode())return v._("If you leave this page, your cover photo will not be saved. To save, press the \"save\" button below your cover photo.");};y.prototype.isCoverImageVerticalFlow=function(z){"use strict";return !(z.style.height);};y.prototype.editMode=function(){"use strict";h.setEnabled(j.find(this.root,'button.cancelButton'),true);h.setEnabled(j.find(this.root,'button.saveButton'),true);this.hideLoadingIndicator();this._coverImage=j.scry(this.root,'.coverImage')[0];var z=j.scry(this._coverImage,'.coverWrap')[0];if(z){var aa=j.find(z,'.coverPhotoImg');this._originalIsVertical=this.isCoverImageVerticalFlow(aa);this._originalOffset=r.get(aa,this._originalIsVertical?'top':'left');}i.addClass(this._parentSection,'fbEditCover');k.scrollTo(this.root);if(this.previewing){j.remove(this._coverImage);i.show(this._coverImage);}var ba=j.scry(this._coverImage,'.coverPhotoImg')[0];if(ba)this._createDragger();this.editing=true;g.inform('CoverPhotoEdit',{sender:this,state:"open"});};y.prototype._exitEditMode=function(){"use strict";if(this._timelineDrag){this._timelineDrag.destroy();this._timelineDrag=null;}j.find(this.root,'input.hiddenPhotoID').value=null;h.setEnabled(j.find(this.root,'button.cancelButton'),false);h.setEnabled(j.find(this.root,'button.saveButton'),false);i.removeClass(this._parentSection,'fbEditCover');this.hideLoadingIndicator();this.previewing=false;g.inform('CoverPhotoEdit',{sender:this,state:"closed"});this.editing=false;};y.prototype._createDragger=function(z){"use strict";var aa;if(this._isLegacy){aa=j.find(this.root,'input.photoOffsetInput');this._originalIsVertical=true;}else{var ba=z===(void 0)?this._originalIsVertical:z;aa=ba?j.find(this.root,'input.photoOffsetYInput'):j.find(this.root,'input.photoOffsetXInput');}this._timelineDrag=new s(j.find(this.root,'.coverImage .coverPhotoImg'),aa,{height:this._coverHeight,width:this._coverWidth,listenOn:this.cover,vertical:ba,killClicks:true});};y.prototype.updateCoverImage=function(z,aa){"use strict";if(aa)this.editMode();j.find(this.root,'input.hiddenPhotoID').value=z;h.setEnabled(j.find(this.root,'button.saveButton'),true);if(aa)j.replace(j.find(this.root,'.coverImage'),typeof aa==='string'?n(aa):aa);var ba=j.find(j.find(this.root,'.coverImage'),'.coverPhotoImg'),ca=this.isCoverImageVerticalFlow(ba),da;if(this._isLegacy){da=j.find(this.root,'input.photoOffsetInput');}else da=ca?j.find(this.root,'input.photoOffsetYInput'):j.find(this.root,'input.photoOffsetXInput');if(this._timelineDrag){this._timelineDrag.setPicture(ba,{offsetInput:da,vertical:ca});}else this._createDragger(ca);this._updateHeader();};y.prototype.cancelUpdate=function(){"use strict";this._reloadAfterNextUpdate=false;j.remove(j.scry(this.root,'.coverImage')[0]);j.prependContent(this.cover,this._coverImage);if(this._originalOffset!==(void 0))r.set(j.find(this._coverImage,'.coverPhotoImg'),this._originalIsVertical?'top':'left',this._originalOffset);this._exitEditMode();this._updateHeader();};y.prototype.saveComplete=function(){"use strict";if(this._reloadAfterNextUpdate)a.location.reload();this._coverImage=j.scry(this.root,'.coverImage')[0];var z=p.byClass(this.root,'fbTimelineTopSectionBase');z&&i.removeClass(z,"_6_5");this._exitEditMode();this._updateHeader();o.rewriteCurrentURI(o.getCurrentURI().getUnqualifiedURI(),o.getCurrentURI().removeQueryData('preview_cover'));};y.prototype.isInEditMode=function(){"use strict";return this.editing;};y.prototype._updateHeader=function(){"use strict";var z=j.scry(this.root,'.coverImage')[0];if(!z)return;var aa=i.hasClass(z,'coverNoImage'),ba=i.hasClass(this._parentSection,'noCoverImage');if(aa!==ba)i.conditionClass(this._parentSection,'noCoverImage',aa);};y.getInstance=function(){"use strict";return y.instance;};y.staticUpdateCoverImage=function(z){"use strict";y.getInstance().updateCoverImage(null,z);};y.prototype.setupFileUpload=function(z,aa,ba){"use strict";z.subscribe('change',function(){var ca=new m(z.getInput()).setURI(aa).setAllowCrossOrigin(true);ca.subscribe('failure',function(){y.showErrorDialog(v._("Cover Upload Failed"),v._("Uploading the new cover picture failed. Please try again."));});ca.subscribe(['success','failure'],function(){this.hideLoadingIndicator();z.clear();i.removeClass(z.getControl(),ba);z.getInput().disabled=false;}.bind(this));this.showLoadingIndicator();this._reloadAfterNextUpdate=true;ca.send();i.addClass(z.getControl(),ba);z.getInput().disabled=true;}.bind(this));};y.setupFileUpload=function(z,aa,ba){"use strict";this.getInstance().setupFileUpload(z,aa,ba);};y.imageUploadDone=function(z,aa){"use strict";this.getInstance().updateCoverImage(z,aa);};y.showErrorDialog=function(z,aa){"use strict";new Dialog().setTitle(z).setButtons(Dialog.OK).setBody(aa).show();this.getInstance().hideLoadingIndicator();};y.initFileUploadMenu=function(z){"use strict";y.showLoadingAfterFileUpload(z.getForm());};y.showLoadingAfterFileUpload=function(z){"use strict";x(z.subscribe('submit',function(){y.getInstance().showLoadingIndicator();}));};y.instance=null;e.exports=y;},null);
|
|
__d("TimelineCoverPhotoChangePrivacyDialog",["Arbiter","Event"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();var i={init:function(j,k,l){this._dialog=j;this._tooltipLink=l;this._closeButton=k;this._showDialog=false;this._tooltip=null;},registerDialogShow:function(){this._showDialog=true;g.subscribe('CoverPhotoEdit',function(j,k){if(!this._showDialog)return;if(k.state==="open"){this._dialog&&this._dialog.show();if(this._tooltipLink){this._tooltip=this._tooltipLink.getAttribute('data-hover');this._tooltipLink.setAttribute('data-hover',null);}}else if(k.state==="closed")this.hideDialog();}.bind(this));h.listen(this._closeButton,'click',this.hideDialog.bind(this));},hideDialog:function(){this._dialog&&this._dialog.hide();if(this._tooltipLink)this._tooltipLink.setAttribute('data-hover',this._tooltip);this._showDialog=false;}};e.exports=i;},null);
|
|
__d("TimelineNavLight",["CSS","DOM","DOMQuery","Parent","ProfileOverviewDOMID","TimelineAppSectionConstants","TimelineComponentKeys","TimelineController","TimelineSection","csx","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){b.__markCompiled&&b.__markCompiled();var r="_6-7",s="_529n",t="_5215",u="_70k",v="._6-7",w="._6-6";function x(y){"use strict";this.$TimelineNavLight0=i.scry(y,v)[0];this.$TimelineNavLight1=i.scry(y,w);var z=j.byClass(y,u).offsetWidth,aa=this.$TimelineNavLight1[this.$TimelineNavLight1.length-1];if(aa.offsetLeft+aa.offsetWidth>z)g.addClass(y,t);for(var ba=this.$TimelineNavLight1.length-1;ba>1;ba--)if(this.$TimelineNavLight1[ba].offsetLeft+this.$TimelineNavLight1[ba].offsetWidth>z){h.remove(this.$TimelineNavLight1[ba]);}else break;g.removeClass(j.byClass(y,s),s);o.subscribe('Medley/transitionToSection',function(ca,da){this.$TimelineNavLight3(da.slice(k.PREFIX_MEDLEY.length));}.bind(this));n.register(m.COVER_NAV,this);}x.prototype.handleTabChange=function(y){"use strict";this.$TimelineNavLight3(y);};x.prototype.$TimelineNavLight3=function(y){"use strict";this.$TimelineNavLight0&&g.removeClass(this.$TimelineNavLight0,r);this.$TimelineNavLight1.some(function(z){var aa=l.collectionTabKeyToAppTabKey[y]||y;if(z.getAttribute('data-tab-key')===aa){g.addClass(z,r);this.$TimelineNavLight0=z;return true;}}.bind(this));};e.exports=x;},null);
|
|
__d("TimelineProfilePicConfig",["fbt"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h={loading:'timeline/profile_pic/loading',success:'timeline/profile_pic/success',leavingMessage:g._("Your profile picture is still uploading, are you sure you want to leave?")};e.exports=h;},null);
|
|
__d("TimelineProfilePic",["Arbiter","CSS","Dialog","DOM","HTML","TimelineProfilePicConfig","Run","$","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){b.__markCompiled&&b.__markCompiled();var p;q.init=function(r,s){"use strict";q.destroyInstance();p=new q(r||'fbProfileCover',s||'.profilePicThumb');};function q(r,s){"use strict";this.$TimelineProfilePic0=n(r);this.$TimelineProfilePic1=s;this.$TimelineProfilePic2=[g.subscribe(l.loading,this.startLoading.bind(this)),g.subscribe(l.success,this.onUploadSuccess.bind(this))];m.onBeforeUnload(this.onBeforeUnload.bind(this));m.onLeave(this.destroy.bind(this));}q.prototype.$TimelineProfilePic3=function(r){"use strict";this.$TimelineProfilePic4=r;h.conditionClass(this.$TimelineProfilePic0,'profilePicLoading',r);};q.prototype.destroy=function(){"use strict";this.$TimelineProfilePic2.forEach(function(r){r.unsubscribe();});this.$TimelineProfilePic2=[];p=null;};q.prototype.startLoading=function(r,s){"use strict";this.$TimelineProfilePic3(!!s.isLoading);};q.prototype.onUploadSuccess=function(r,s){"use strict";this.$TimelineProfilePic3(false);if(!s.newPic)return;var t=i.getCurrent();if(t)t.hide();var u=s.newPic;j.replace(j.find(this.$TimelineProfilePic0,this.$TimelineProfilePic1),typeof u==='string'?k(u):u);if(typeof(s.profileId)!==(void 0)&&typeof(s.headerPicURL)!==(void 0)){var v=o('profile_pic_header_'+s.profileId);if(v)v.src=s.headerPicURL;}var w=o('fbProfilePicSelector');if(w)h.removeClass(w,'fbTimelineNullProfilePicSelector');};q.prototype.onBeforeUnload=function(){"use strict";if(p===this&&this.$TimelineProfilePic4)return l.leavingMessage;};q.destroyInstance=function(){"use strict";p&&p.destroy();};e.exports=q;},null);
|
|
__d("TimelineURI",["BizSiteIdentifier.brands","BusinessURI.brands","ProfileTabConst","TimelineAppSectionConstants","URI","goURI"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();var m={parseURI:function(n){n=k(n);var o=n.getQueryData(),p=n.getPath(),q=p.split('/').slice(1);if(q[0]=='people'||q[0]=='pages')q=q.slice(2);var r=o.sk||q[1]||i.TIMELINE;if(r==i.WALL)r=i.TIMELINE;var s=null,t=null;if(r==i.TIMELINE){t=parseInt(q[2],10)||null;s=parseInt(q[3],10)||null;}return {path:p,id:o.id||q[0],key:r,viewas:o.viewas?o.viewas:0,filter:o.filter?o.filter:null,year:t,month:s,friendship:!!o.and};},goToProfileID:function(n){if(g.isBizSite()){l(h('/profile.php').addQueryData('id',n),true);}else l(k('/'+n),true);},getTabKeyFromURI:function(n){var o=m.getSectionKeyFromURI(n);return j.collectionTabKeyToAppTabKey[o]||o;},getSectionKeyFromURI:function(n){return n.getQueryData().sk||n.getPath().split('/')[2];},getVanityFromURI:function(n){if(n.getQueryData().id)return n.getQueryData.id;return n.getPath().split('/')[1];}};e.exports=m;},null);
|
|
__d("legacy:TimelineCover",["TimelineCover"],function(a,b,c,d){b.__markCompiled&&b.__markCompiled();a.TimelineCover=b('TimelineCover');},3);
|
|
__d("TypeaheadSubmitOnSelect",["Form","copyProperties"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();function i(j){"use strict";this._typeahead=j;}i.prototype.enable=function(){"use strict";this._subscription=this._typeahead.subscribe('select',function(){var j=this._typeahead.getCore().getElement().form;if(j)j.getAttribute('rel')=='async'?g.bootstrap(j):j.submit();}.bind(this));};i.prototype.disable=function(){"use strict";this._typeahead.unsubscribe(this._subscription);this._subscription=null;};h(i.prototype,{_subscription:null});e.exports=i;},null);
|
|
__d("legacy:SubmitOnSelectTypeaheadBehavior",["TypeaheadSubmitOnSelect"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();if(!a.TypeaheadBehaviors)a.TypeaheadBehaviors={};a.TypeaheadBehaviors.submitOnSelect=function(h){h.enableBehavior(g);};},3);
|