/*!CK:2174695988!*//*1403497380,*/ if (self.CavalryLogger) { CavalryLogger.start_js(["ZPJC4"]); } __d("PlaceTagType",[],function(a,b,c,d,e,f){e.exports={CITY:"city",STATE_PROVINCE:"state_province",COUNTRY:"country",PLACE:"place",EVENT:"event",UNCONFIRMED_RESIDENCE:"unconfirmed_residence",RESIDENCE:"residence",TEXT:"text"};},null); __d("PhotoAlbumAudienceInput",["Arbiter","CSS","DOM","Event"],function(a,b,c,d,e,f,g,h,i,j){function k(l,m,n,o,p){"use strict";this.$PhotoAlbumAudienceInput0=l;if(m){this.$PhotoAlbumAudienceInput1=m;this.$PhotoAlbumAudienceInput2=n;this.$PhotoAlbumAudienceInput3=o;this.$PhotoAlbumAudienceInput4=p;g.subscribe('Tokenizer/init',this.$PhotoAlbumAudienceInput5.bind(this));j.listen(this.$PhotoAlbumAudienceInput3,'click',this.$PhotoAlbumAudienceInput6.bind(this));}}k.prototype.removeHiddenPrivacyWidget=function(){"use strict";[this.$PhotoAlbumAudienceInput0,this.$PhotoAlbumAudienceInput1,this.$PhotoAlbumAudienceInput4].forEach(function(l){if(l&&h.hasClass(l,'hidden_elem'))i.remove(l);});};k.prototype.$PhotoAlbumAudienceInput6=function(){"use strict";this.$PhotoAlbumAudienceInput7.removeAllTokens();this.$PhotoAlbumAudienceInput8(null,null);};k.prototype.$PhotoAlbumAudienceInput5=function(l,m){"use strict";if(this.$PhotoAlbumAudienceInput7||this.$PhotoAlbumAudienceInput2!=m.element)return;this.$PhotoAlbumAudienceInput7=m;this.$PhotoAlbumAudienceInput8(null,null);g.subscribe('Form/change',this.$PhotoAlbumAudienceInput8.bind(this));};k.prototype.$PhotoAlbumAudienceInput8=function(l,m){"use strict";var n=this.$PhotoAlbumAudienceInput7.getTokens().length>0;this.$PhotoAlbumAudienceInputa(n);};k.prototype.$PhotoAlbumAudienceInputa=function(l){"use strict";h.conditionShow(this.$PhotoAlbumAudienceInput1,l);h.conditionShow(this.$PhotoAlbumAudienceInput0,!l);this.$PhotoAlbumAudienceInput4&&h.conditionShow(this.$PhotoAlbumAudienceInput4,l);};e.exports=k;},null); __d("PhotoAlbumPlacesTypeahead",["Arbiter"],function(a,b,c,d,e,f,g){function h(i){"use strict";if(!i)return;if(i.getCore().getHiddenValue()){var j={uid:i.getCore().getHiddenValue(),text:i.getCore().getValue()};g.inform('PhotoAlbumPlacesTypeahead.EXIST_PLACE',j);}i.subscribe('select',function(k,l){g.inform('PhotoAlbumPlacesTypeahead.SELECTED_PLACE',l.selected);}.bind(this));i.subscribe('reset',function(){if(!i.getCore().getHiddenValue())g.inform('PhotoAlbumPlacesTypeahead.RESET_PLACE');}.bind(this));this._initialized=true;}h.prototype.init=function(i){"use strict";if(this._initialized)return;h.call(this,i);};e.exports=h;},null); __d("PhotoBulkEditTagger",["Arbiter","AsyncRequest","CSS","DOM","DOMQuery","Event","FaceboxSourceConstants","Parent","PhotosConst","PhotosTaggingWaterfall","PhotoTagger","SubscriptionsHandler","Vector","$","copyProperties","csx","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){var x=60;for(var y in q)if(q.hasOwnProperty(y))aa[y]=q[y];var z=q===null?null:q.prototype;aa.prototype=Object.create(z);aa.prototype.constructor=aa;aa.__superConstructor__=q;function aa(ba,ca,da,ea){"use strict";q.call(this,ba);this.editor=ba;this.faceboxes=[];this.gkEnableTagNext=ea.gkEnableTagNext;this._qn=ea.qn;this.tokenizer=da;this.editor.registerTagger(this);this.typeahead=da.getTypeahead();this.handlers=new r();this.root=this.editor.getRoot();this.tagger=ca;this.hideNewTagTimer=null;this.photoKey=null;this._needTaggingData=true;this._currentRecognition={box:null,isTagged:false,suggestion:null};this._hoverState=false;this._tagging=false;this.setupHandlers();this._sendWaterfallLogSignal(p.BEGIN);this.fetchTaggingSuggestions();this.setTagAccumulator(ea.bulkSaveTags);this.setNeedTaggingData(ea.needTaggingData);this.version=o.BULK_EDITOR;l.listen(this.root,'mousemove',function(event){var fa=event.getTarget();if(this._hoverState&&!(n.byClass(fa,'faceBox')||n.byClass(fa,'tagPointer')||n.byClass(fa,'arrow')||n.byClass(fa,'faceboxSuggestion'))){this.removeSuggestionFromTagger();this.hideTagger();}}.bind(this));}aa.prototype.setupUserActionLogging=function(){"use strict";return null;};aa.prototype.logUserActionEvent=function(ba){"use strict";return null;};aa.prototype.addFaceboxes=function(ba){"use strict";this.faceboxes=k.scry(ba.parentNode,'.faceBox');this.faceboxes.sort(function(ca,da){return ca.offsetLeft===da.offsetLeft?ca.offsetTop-da.offsetTop:ca.offsetLeft-da.offsetLeft;});this.faceboxes.forEach(function(ca){var da={image:ba,facebox:ca};l.listen(ca,'mouseenter',this._mouseOverFacebox.bind(this,da));}.bind(this));};aa.prototype.saveTag=function(ba,ca,da){"use strict";z.saveTag.call(this,ba,ca,da);g.inform('PhotoBulkEditTagger.TAG_SAVED',{editor:this.root,fbid:this.photoData.fbid});};aa.prototype.setNeedTaggingData=function(ba){"use strict";this._needTaggingData=ba;return this;};aa.prototype.setTagAccumulator=function(ba){"use strict";z.setTagAccumulator.call(this,ba);return this;};aa.prototype.needTaggingData=function(){"use strict";return this._needTaggingData;};aa.prototype.setupHandlers=function(){"use strict";l.listen(this.root,'click',this.clickHandler.bind(this));this.tokenizer.subscribe(['addToken','removeToken'],this.handleTokenAction.bind(this));this.tokenizer.subscribe('switchTarget',this.switchPhoto.bind(this));g.subscribe('PhotoBulkEditTagger.DATA_SOURCE_READY',this.useTaggingDataSource.bind(this));g.subscribe(this.editor.mapEventNameToNamespace('PhotosBulkEditor.PHOTO_REORDER_START'),this.hideTagger.bind(this));};aa.prototype.hideTagger=function(){"use strict";z.hideTagger.apply(this,arguments);if(this._currentRecognition.box&&!this._currentRecognition.isTagged)i.show(this._currentRecognition.box);this._tagging=false;this._hoverState=false;this._currentRecognition.box=null;this._currentRecognition.isTagged=false;this._currentRecognition.suggestion=null;this.recognizedUsers=[];};aa.prototype.done=function(){"use strict";this._sendWaterfallLogSignal(p.FINISH);};aa.prototype.handleTokenAction=function(ba,ca){"use strict";var da=t(this.photoKey),ea=j.find(da,'.peopleIcon'),fa=j.find(da,'.editablePhotoTagList'),ga=j.find(ea,'.count'),ha=this.tokenizer.getTokens().length,ia=ca.info.suggestion?m.UPLOADER_SUGGEST:null;if(this._currentRecognition.box)this._currentRecognition.isTagged=!!ha;i.conditionClass(ea,'hasPeople',!!ha);i.conditionClass(fa,'hasPeople',!!ha);j.setContent(ga,ha);if(ba=='addToken'){this.saveTag(ba,ca,ia);if(!this.gkEnableTagNext)return;for(var ja=0;ja0,s=i.scry(n.getContent(),'#hide_from_newsfeed')[0],t=s&&s.checked;h.inform('PhotosBulkBackdateEditor.SAVED',{context:m,backdatedDate:q,hideFromNewsfeed:t,useDateFromFile:r});n.hide();j.set(m);});}};e.exports=l;},null); __d("PhotoBulkEditTokenizer",["DOM","Event","Input","Parent","Tokenizer","UserAgent","getObjectValues"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){for(var n in k)if(k.hasOwnProperty(n))p[n]=k[n];var o=k===null?null:k.prototype;p.prototype=Object.create(o);p.prototype.constructor=p;p.__superConstructor__=k;function p(){"use strict";if(k!==null)k.apply(this,arguments);}p.prototype.init=function(q,r,s,t){"use strict";this._tokenareaListeners={};o.init.call(this,q,r,s,t);this.inform('initialized');};p.prototype.initEvents=function(){"use strict";var q=l.firefox()<4?'keypress':'keydown';h.listen(this.input,'paste',this.paste.bind(this));h.listen(this.input,q,this.keydown.bind(this));};p.prototype.setTokenarea=function(q){"use strict";this.tokenarea=q;this.addTokenareaListener(q);this.reset();};p.prototype.addTokenareaListener=function(q){"use strict";if(this._tokenareaListeners[q.id])return;var r=this.handleEvents.bind(this);this._tokenareaListeners[q.id]=m(h.listen(q,{click:r,keydown:r}));};p.prototype.handleEvents=function(event){"use strict";var q=j.byClass(event.getTarget(),'editablePhotoTagList');if(!q){return;}else if(this.tokenarea!==q){this.setTokenarea(q);this.inform('switchTarget',this.tokenarea.id);}return o.handleEvents.call(this,event);};p.prototype.reset=function(){"use strict";var q=this.getTokenElements().map(function(r){return {uid:g.scry(r,'input')[0].value,text:g.scry(r,'input')[1].value};});i.reset(this.input);return o.reset.call(this,q);};p.prototype.updateTokenareaVisibility=function(){"use strict";return null;};p.prototype.insertToken=function(q){"use strict";g.prependContent(this.tokenarea,q.getElement());};e.exports=p;},null); __d("PlaceUtils",["PlaceTagType"],function(a,b,c,d,e,f,g){var h={placesClose:function(i,j,k,l){i=i||0;j=j||0;k=k||0;l=l||0;return (Math.abs(i-k)<1e-05)&&(Math.abs(j-l)<1e-05);},isNonSpecificPlace:function(i){return (i==g.CITY||i==g.STATE_PROVINCE||i==g.COUNTRY);}};e.exports=h;},null); __d("ProgressiveDatepicker",["Arbiter","ArbiterMixin","CSS","DataStore","DOM","Event","Parent","copyProperties","mixin","shield"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(w){return new Date(w[0],w[1],w[2],w[3],w[4]);}function r(w,x){while(w.length)k.insertAfter(x,w.pop());}var s=o(h);for(var t in s)if(s.hasOwnProperty(t))v[t]=s[t];var u=s===null?null:s.prototype;v.prototype=Object.create(u);v.prototype.constructor=v;v.__superConstructor__=s;function v(w,x){"use strict";this._root=w;this._savedLabels={};this._savedPeriodsBack=[];this._savedPeriodsFront=[];this._menus={};this._mintime=x.mintime&&new Date(1000*x.mintime);this._maxtime=x.maxtime&&new Date(1000*x.maxtime);j.set(w,'datepicker',this);k.scry(w,'select').forEach(function(y){l.listen(y,'change',p(this._handleChange,this,y));var z=m.byClass(y,'period');l.listen(y,'focus',i.addClass.bind(null,z,'periodFocus'));l.listen(y,'blur',i.removeClass.bind(null,z,'periodFocus'));this._setMenuSelectionState(y);if(y.getAttribute('data-name')==='month')this._filterInvalidDates();}.bind(this));k.scry(w,'a.periodLabel').forEach(function(y){var z=m.byClass(y,'period');l.listen(y,'click',function(){i.addClass(z,'periodSelected');i.addClass(z,'periodFocus');});});this._filterInvalidDates();this.inform('initialized',this,g.BEHAVIOR_STATE);}v.prototype.setDate=function(w,x,y,z,aa){"use strict";this._addSavedPeriods();var ba=v.PERIODS;for(var ca=0;ca=0)?x[w[0]]:0),((y-1>=1)?x[w[1]]-1:0),((y-1>=2)?x[w[2]]:1),((y-1>=3)?x[w[3]]:0),((y-1>=4)?x[w[4]]:0)];ca[y]=ba.value;if(y===v.PERIODS.indexOf('month'))ca[y]=ca[y]-1;var da=q(ca),ea=[((y-1>=0)?x[w[0]]:9001),((y-1>=1)?x[w[1]]-1:11),((y-1>=2)?x[w[2]]:this._daysInCurrentMonth()),((y-1>=3)?x[w[3]]:23),((y-1>=4)?x[w[4]]:59)];ea[y]=ba.value;if(y===v.PERIODS.indexOf('month')){ea[y]--;ea[y+1]=this._daysInMonth(ea[0],ea[1]);}var fa=q(ea),ga=(da>this._maxtime),ha=(fathis._daysInCurrentMonth());if(ha||ga||ia){if(ba.selected){ba.selected=false;this._resetMenu(y);}k.remove(ba);if(ga||ia){this._savedPeriodsBack[y].push(ba);}else this._savedPeriodsFront[y].push(ba);}else aa++;}}};v.getInstance=function(w){"use strict";return w?j.get(w,'datepicker'):null;};n(v,{PERIODS:['year','month','day','hour','minute']});e.exports=v;},null); __d("PhotosBulkEditablePhoto",["Arbiter","AsyncDialog","AsyncRequest","AsyncResponse","CSS","Dialog","DOM","Event","Focus","Form","Input","Parent","PhotosConst","PlaceUtils","ProgressiveDatepicker","csx","cx","tx"],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){var y=null,z=null,aa=false;function ba(ca,da,ea,fa,ga,ha,ia){"use strict";this._root=ca;this._mentionsTypeahead=da;this._placesTypeahead=ea;this._photoData=fa;this._hasOwnPlaceValue=!!ea.getCore().getHiddenValue();var ja=m.find(ca,'.placesInput'),ka=m.find(ca,'.captionTextarea');this._metadataInputs=m.find(ca,'.metadataInputs');this._editorId=ga;this._published=ha;this._showMove=ia;this._photoDataKey=this._root.id;this._hasTimeTaken=!!this._photoData.timeTaken;this._hasExistingDateValue=this._photoData.isBackdated||this._photoData.hasDerivedDateFromAlbum;this._listeners=[n.listen(ca,'click',this._handleClick.bind(this)),n.listen(ja,'focus',this._placesFocus.bind(this)),n.listen(ka,'focus',this._captionFocus.bind(this)),n.listen(ka,'blur',this._save.bind(this)),n.listen(ca,'submit',function(){return false;})];this._previousSaveData=p.serialize(this._root);var la=m.scry(this._root,'div.backdateInput .periodMenu');for(var ma=0;mar.timeTaken;};p.prototype._autoOrder=function(){"use strict";var q=this._sortableGroup.getOrder().map(function(w){return this._photos['editablePhoto_'+w].getPhotoData();}.bind(this));for(var r=0;r