text: if (self.CavalryLogger) { CavalryLogger.start_js(["VXMzE"]); }
  
  __d("FaceboxSourceConstants",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={SNOWLIFT_SUGGEST:"snowlift_suggest",SNOWLIFT_DISMISS:"photo_snowlift_unit_suggestions",PERMALINK_SUGGEST:"permalink_suggest",PERMALINK_DISMISS:"photo_permalink_suggestions",UPLOADER_SUGGEST:"uploader_suggest",UPLOADER_DISMISS:"album_uploader_suggestions"};}),null);
  __d("PhotoTagDataSourceType",[],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PRODUCT_ITEMS:"product_items",DEFAULT:"default"};}),null);
  __d('PhotoTagApproval',['Arbiter','CSS','DOM','Event','Parent','PhotosConst','ge'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this.viewer=i;this.units=[];this.currentUnit=0;var j=i.getVersionConst();if(j==c('PhotosConst').VIEWER_SNOWLIFT){this._root=c('ge')('fbPhotoSnowliftTagApproval');}else this._root=c('ge')('fbPhotoPageTagApproval');c('Arbiter').subscribe(i.getEventString('DATA_CHANGE'),this.restartTagApproval.bind(this));c('Arbiter').subscribe('PhotoTagApproval.PENDING_TAG_PHOTO_CLICK',this.pendingTagPhotoClick.bind(this));c('Event').listen(this._root,'click',this.handleClick.bind(this));c('Event').listen(this._root,'mousemove',function(k){this.hiliteCurrentPendingTag();c('Event').kill(k);}.bind(this));this.restartTagApproval();}h.prototype.handleClick=function(event){'use strict';var i=event.getTarget();if(c('CSS').hasClass(i,'nextPager')&&c('CSS').hasClass(i,'enabled')){this.showNextUnit();}else if(c('CSS').hasClass(i,'prevPager')&&c('CSS').hasClass(i,'enabled')){this.showPrevUnit();}else if(c('Parent').byClass(i,'fbPhotoApprovalPendingButtons')){var j=this.units[this.currentUnit],k=this.getTagNameID(j);if(k){var l=c('Parent').byClass(i,'approve');c('Arbiter').inform('PhotoTagApproval.UPDATE_TAG_BOX',{id:k,approve:l,version:this.viewer.getVersionConst()});}setTimeout(this.removeSelectedUnit.bind(this),0);}return true;};h.prototype.loadUnits=function(i){'use strict';this.units=c('DOM').scry(this._root,'div.fbPhotoApprovalUnit');if(this.units.length){c('CSS').show(this._root);this.showUnit(i);c('CSS').conditionClass(this._root,'hidePagers',this.units.length==1);}else{c('CSS').hide(this._root);c('Arbiter').inform('PhotoTagApproval.HILITE_TAG',{tag:null,version:this.viewer.getVersionConst()});}};h.prototype.restartTagApproval=function(){'use strict';this.loadUnits(0);};h.prototype.pendingTagPhotoClick=function(i,j){'use strict';if(j.version!==c('PhotosConst').VIEWER_PERMALINK&&j.version!==c('PhotosConst').VIEWER_SNOWLIFT)return true;var k='approve:'+j.id;for(var l=0;l<this.units.length;l++)if(this.units[l].id===k){this.showUnit(l);return false;}return true;};h.prototype.removeSelectedUnit=function(){'use strict';var i=this.units[this.currentUnit];c('DOM').remove(i);this.loadUnits(this.currentUnit);};h.prototype.showNextUnit=function(){'use strict';this.showUnit(this.currentUnit+1);};h.prototype.showPrevUnit=function(){'use strict';this.showUnit(this.currentUnit-1);};h.prototype.getTagNameID=function(i){'use strict';var j=i.id.indexOf(':');return i.id.slice(j+1);};h.prototype.showUnit=function(i){'use strict';this.units.forEach(c('CSS').hide);this.currentUnit=(i+this.units.length)%this.units.length;var j=this.units[this.currentUnit];c('CSS').show(j);this.hiliteCurrentPendingTag();c('CSS').conditionClass(c('DOM').find(this._root,'a.prevPager'),'enabled',this.currentUnit>0);c('CSS').conditionClass(c('DOM').find(this._root,'a.nextPager'),'enabled',this.currentUnit<this.units.length-1);};h.prototype.hiliteCurrentPendingTag=function(){'use strict';var i=this.units[this.currentUnit],j=this.getTagNameID(i);c('Arbiter').inform('PhotoTagApproval.HILITE_TAG',{tag:j,version:this.viewer.getVersionConst()});};f.exports=h;}),null);
  __d('legacy:photo-tag-approval',['PhotoTagApproval'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();b.PhotoTagApproval=c('PhotoTagApproval');}),3);
  __d("XFamilyBulkTagAddAsyncController",["XController"],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/family\/bulk_tag_save\/",{subject:{type:"Int"},save_tags:{type:"String"}});}),null);
  __d('PhotoTagStore',['AsyncRequest','XFamilyBulkTagAddAsyncController','isEmpty'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){'use strict';this._tagList={};this._textTagList={};this._originalTagList={};this._dirtyPhotosByUid={};h.instance=this;}h.prototype.getPhotoTags=function(i){'use strict';return this._tagList[i]||{};};h.prototype.photoHasTags=function(i){'use strict';return !c('isEmpty')(this.getPhotoTags(i));};h.prototype.clear=function(){'use strict';this._tagList={};this._textTagList={};this._originalTagList={};this._dirtyPhotosByUid={};};h.prototype.addTag=function(i,j,k,l){'use strict';i[j]=i[j]||{};var m=i[j][k]||[];m.push(l);i[j][k]=m;};h.prototype.revert=function(i){'use strict';var j=this._tagList,k=this._originalTagList;for(var l in j)if(c('isEmpty')(k[l][i])){j[l][i]=[];}else j[l][i]=k[l][i];this._dirtyPhotosByUid={};};h.prototype.hasNewTags=function(){'use strict';return !c('isEmpty')(this._tagList)||!c('isEmpty')(this._textTagList);};h.prototype.userHasDirtyTags=function(i){'use strict';return !c('isEmpty')(this._dirtyPhotosByUid[i]);};h.prototype.userDirtyTagsCount=function(i){'use strict';return Object.keys(this._dirtyPhotosByUid[i]).length;};h.prototype.handleTagFetch=function(i){'use strict';for(var j in i)this.loadTagInfo(j,i[j]);};h.prototype.saveAlbumTagsForUser=function(i,j){var k=arguments.length<=2||arguments[2]===undefined?false:arguments[2];'use strict';var l={},m=[],n=this._dirtyPhotosByUid[i]||{};for(var o in n){var p=this._tagList[o][i];if(c('isEmpty')(p)){m[m.length]=o;continue;}p.forEach(function(s){l[o]={x:s.x,y:s.y};});}var q={subject:i,action:'save',save_tags:l},r='/ajax/photos/album/tags.php';if(k){q={subject:i,save_tags:JSON.stringify(l)};r=c('XFamilyBulkTagAddAsyncController').getURIBuilder().getURI();}new (c('AsyncRequest'))().setURI(r).setData(q).setHandler(function(s){j(s.payload);}).setAllowCrossPageTransition(true).send();delete this._dirtyPhotosByUid[i];};h.prototype.getTagsFromList=function(i){'use strict';var j=[];for(var k in i)if(i.hasOwnProperty(k))for(var l in i[k])if(i[k].hasOwnProperty(l))i[k][l].forEach(function(m){return j.push(m);});return j;};h.prototype.getAllTags=function(){'use strict';var i=this.getTagsFromList(this._tagList),j=this.getTagsFromList(this._textTagList);return i.concat(j);};h.prototype.removeTag=function(i,j){'use strict';var k=this._tagList[i],l=this._originalTagList[i]||{};if(l[j]){this._dirtyPhotosByUid[j]=this._dirtyPhotosByUid[j]||{};this._dirtyPhotosByUid[j][i]=true;}else delete this._dirtyPhotosByUid[j][i];for(var m in k)if(m==j){var n=this._tagList[i][m];delete this._tagList[i][m];if(c('isEmpty')(this._tagList[i]))delete this._tagList[i];return n;}};h.prototype.removeTextTag=function(i,j){'use strict';var k=this._textTagList[i];if(!c('isEmpty')(k[j])){var l=this._textTagList[i][j];this._textTagList[i][j]=[];if(c('isEmpty')(this._textTagList[i]))delete this._textTagList[i];return l;}return [];};h.prototype.removeAllNewTagsOfUser=function(i){'use strict';var j=[];if(!this.userHasDirtyTags(i))return j;var k=this._dirtyPhotosByUid[i];for(var l in k)j=j.concat(this.removeTag(l,i));return j;};h.prototype.removeAllTagsFromPhoto=function(i){'use strict';var j=[];if(!c('isEmpty')(this._tagList[i]))for(var k in this._tagList[i]){if(!this._tagList[i].hasOwnProperty(k))continue;j=j.concat(this.removeTag(i,k));}if(!c('isEmpty')(this._textTagList[i]))for(var l in this._textTagList[i]){if(!this._textTagList[i].hasOwnProperty(l))continue;j=j.concat(this.removeTextTag(i,l));}return j;};h.prototype.storeTag=function(i,j,k,l,m){'use strict';this.storeTagWithOptions(i,j,k,l,{can_remove:m});};h.prototype.storeTagWithOptions=function(i,j,k,l,m){'use strict';this._dirtyPhotosByUid[j]=this._dirtyPhotosByUid[j]||{};this._dirtyPhotosByUid[j][i]=true;var n={x:k,y:l};Object.assign(n,m);if(!j){this.addTag(this._textTagList,i,n.name,n);}else this.addTag(this._tagList,i,j,n);};h.prototype.loadTagInfo=function(i,j){'use strict';this._tagList[i]={};this._originalTagList[i]={};for(var k=0;k<j.length;k++){var l=j[k];this.addTag(this._tagList,i,l.subject,l);this.addTag(this._originalTagList,i,l.subject,l);}};h.getInstance=function(){'use strict';if(h.instance===null)new h();return h.instance;};h.instance=null;f.exports=h;}),null);
  __d("PhotosTaggingWaterfall",["AsyncSignal"],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){h._queueName=i||h._queueName;}Object.assign(h,{BEGIN:"begin",TAG_FACE:"tag_face",HOVER_TAG_FACE:"hover_tag_face",SHOW_SUGGEST:"show_suggest",ADD_NAME:"add_name",TAG_CONFIRMED:"tag_confirmed",FINISH:"finish",TYPE_NAME:'type_name',SELECT_NAME:'select_name',_queueName:null,sendSignal:function i(j,k){new (c("AsyncSignal"))('/ajax/photos/tag_waterfall.php',{data:JSON.stringify(j)}).setHandler(k).send();}});f.exports=h;}),null);
  __d('PhotoTagger',['csx','Arbiter','AsyncRequest','AsyncResponse','CSS','DOM','DOMQuery','Event','FaceboxSourceConstants','Hovercard','Keys','LegacyMentionsInput.react','Parent','PhotosConst','PhotosTaggingWaterfall','PhotosUtils','PhotoTagStore','PhotoTagDataSourceType','React','ReactDOM','Style','UFIAddCommentController','UFICentralUpdates','UFIContainer.react','UFIComment.react','URI','Vector','WWWBase','getElementPosition','removeFromArray'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(k,l){return (k%l+l)%l;}function j(k){'use strict';this.viewer=k;this.version=k.getVersionConst();this.datasources={};this.photoData={};this.tagRects={};this.ajaxURIs={tagsInit:'/ajax/photos/photo/tags/tags_init.php',tagsAlbum:'/ajax/photos/photo/tags/tags_album.php',fetchDatasource:'/ajax/photos/photo/tags/fetch_datasource.php',tagAction:'/ajax/photo_tagging_ajax.php',tagWithAction:'/ajax/with_tagging_ajax.php'};this.recognizedUsers=[];this.addedSuggestions=[];this.featuredSuggestions=[];this.albumSuggestions=[];this.friendSuggestions=[];this.suggestionAlbum=-1;this.addCommentController=null;j.instances[this.version]=this;}j.prototype.initSnowlift=function(k,l,m,n){'use strict';this._init(k,l,m,this.viewer.container,n);};j.prototype.initPermalink=function(k,l,m){'use strict';this._init(k,l,m,this.viewer.actionList);};j.prototype._init=function(k,l,m,n,o){'use strict';this.root=this.viewer.getRoot();this.tagger=k;this.tokenizer=l;this.ufi=o;this._qn=null;this.typeahead=l.getTypeahead();this.userId=m;this.makeProfilePicMenuContainer=n;this.faceboxes=[];this.tags=[];this.currentFacebox=null;this.currentTextbox=null;this.revokedFaceboxes=[];this.requestFaceboxNextTag=false;this.clickState=c('DOM').find(this.root,'div.stageActions');this.newTagBox=c('DOM').find(this.clickState,'div.newTagBox');this.addTagLink=c('DOM').find(this.root,this.elemNames[this.version].addTagLink);this.overlayActions=c('DOM').find(this.root,this.elemNames[this.version].overlayActions);this.setupHandlers();this.hideNewTagTimer=null;this.needAlbumSuggestionsFetch=true;this.fetchTaggingSuggestions({owner:this.photoData.owner});this.setDataSource(this.typeahead.getData());this.updateFaceboxes();this.tagAccumulating=false;return this;};j.prototype.setTagAccumulator=function(k){'use strict';this.tagAccumulating=k;};j.prototype.fetchTaggingSuggestions=function(k){'use strict';var l=new (c('URI'))(c('WWWBase').uri).setPath(this.ajaxURIs.tagsInit);new (c('AsyncRequest'))().setAllowCrossPageTransition(true).setAllowCrossOrigin(true).setURI(l).setData(k).setOption('retries',1).setHandler(function(n){var o=n.getPayload();this.featuredSuggestions=o.featuredTaggees;this.friendSuggestions=o.friendTaggees;this.updateTypeaheadSuggestions();}.bind(this)).send();var m=this.typeahead.subscribe('bootstrap',function(n,o){if(o&&!o.bootstrapping){if(this.taggingMode)this.updateWithSuggestions();this.typeahead.unsubscribe(m);this.typeahead.subscribe('focus',function(){if(this.taggingMode)this.updateWithSuggestions();}.bind(this));this.typeahead.subscribe('click',function(){if(!this.taggingMode)this.updateWithSuggestions();}.bind(this));this.tokenizer.subscribe('removeToken',this.updateWithSuggestions.bind(this));this.tokenizer.subscribe('addToken',this.addSuggestion.bind(this));this.typeahead.subscribe('respond',function(p,q){if(this.taggingMode&&q&&!q.results.length)this.updateWithSuggestions();}.bind(this));}}.bind(this));};j.prototype.fetchAlbumTaggingSuggestions=function(){'use strict';new (c('AsyncRequest'))().setURI(this.ajaxURIs.tagsAlbum).setData({cachedAlbum:this.suggestionAlbum,photo:this.photoData.fbid}).setOption('retries',1).setAllowCrossPageTransition(true).setHandler(function(k){this.needAlbumSuggestionsFetch=false;var l=k.getPayload();if(l.length===0)return;this.suggestionAlbum=l.album;this.albumSuggestions=l.taggees;this.updateTypeaheadSuggestions();}.bind(this)).send();};j.prototype.resetAlbumTaggingSuggestions=function(){'use strict';this.needAlbumSuggestionsFetch=true;this.updateTypeaheadSuggestions();};j.prototype.updateTypeaheadSuggestions=function(){'use strict';this.typeahead.getView().setSuggestions(this.addedSuggestions.concat(this.recognizedUsers,this.featuredSuggestions,this.needAlbumSuggestionsFetch?[]:this.albumSuggestions,this.friendSuggestions));};j.prototype.saveClickPosition=function(k,l){'use strict';var m=c('Vector').getElementPosition(k),n=c('Vector').getElementDimensions(k);this.clickPercentToPhoto=new (c('Vector'))((l.x-m.x)/n.x,(l.y-m.y)/n.y);};j.prototype.getCalculatedClickPosition=function(k){'use strict';var l=c('Vector').getElementPosition(k),m=c('Vector').getElementDimensions(k);if(m.x===0||m.y===0)return null;return new (c('Vector'))(this.clickPercentToPhoto.x*m.x+l.x,this.clickPercentToPhoto.y*m.y+l.y,'document');};j.prototype.repositionTagger=function(){'use strict';if(this.clickPercentToPhoto){var k=this.viewer.getImage(),l=this.getCalculatedClickPosition(k);if(!l)return;this.addTagFromClickPos(l);}};j.prototype.setupHandlers=function(){'use strict';this.handlers=[c('Event').listen(this.clickState,'click',this.addTag.bind(this)),c('Event').listen(this.addTagLink,'click',this.checkActions.bind(this)),c('Event').listen(this.overlayActions,'click',this.checkActions.bind(this))];this.setupAddTagHandlers();c('Event').listen(document.documentElement,'keydown',function(event){if(!this.taggingMode)return;var k=c('Event').getKeyCode(event);if(k===c('Keys').ESC){this.deactivateTagging();}else if(k===c('Keys').TAB)this.addNextTagFromFacebox(event.shiftKey?-1:1);}.bind(this));this.subscriptions=[c('Arbiter').subscribe(this.viewer.getEventString('PAGE'),this.restartTagging.bind(this)),c('Arbiter').subscribe(this.viewer.getEventString('DATA_CHANGE'),this.setPhotoData.bind(this)),c('Arbiter').subscribe(this.viewer.getEventString('EXTRA_DATA_CHANGE'),this.setExtraData.bind(this)),c('Arbiter').subscribe(this.viewer.getEventString('CLOSE'),this.deactivateTagging.bind(this))];c('UFICentralUpdates').subscribe('update-comments',function(k,l){if(l.comments&&l.comments.length)this.commentAdded(l.comments,l.payloadsource);}.bind(this));this.tokenizer.subscribe('addToken',this.saveTag.bind(this));this.tokenizer.subscribe('removeToken',this.removeTag.bind(this));this.tokenizer.subscribe('markTagAsSpam',this.markTagAsSpam.bind(this));};j.prototype.setupAddTagHandlers=function(){'use strict';if(this.ufi){var k=c('DOM').scry(this.root,'.tagPhotoLink');k.forEach(function(l){c('Event').listen(l,'click',this.showTaggerFromClick.bind(this));},this);}};j.prototype.updateWithSuggestions=function(k,l){'use strict';var m=this.typeahead.getData().buildUids(' ',this.typeahead.getView().getSuggestions(),this.typeahead.getCore().getExclusions());if(!m.length)return;var n=this.typeahead.getData().respond('',m);for(var o=0;o<n.length;o++)n[o].index=-1000+o;};j.prototype.addSuggestion=function(k,l){'use strict';var m=l.info&&l.info.uid;if(m){this.addedSuggestions.unshift(m);this.updateTypeaheadSuggestions();}};j.prototype.setQueueName=function(k){'use strict';this._qn=k;return this;};j.prototype._sendWaterfallLogSignal=function(k){'use strict';c('PhotosTaggingWaterfall').sendSignal({qn:this._qn,source:this.viewer.getSourceString(),step:k,pid:this.photoData.pid});};j.prototype._sendFaceboxSuggestionLogSignal=function(k,l,m){'use strict';c('PhotosTaggingWaterfall').sendSignal({step:c('PhotosTaggingWaterfall').SHOW_SUGGEST,photo_owner:this.photoData.owner,tagee:k,is_first:true,source:l,photo_id:this.photoData.fbid,facebox_id:m});};j.prototype._bumpQueueName=function(){'use strict';if(this._qn)this._qn+=1;};j.prototype.activateTagging=function(){'use strict';c('Arbiter').inform('PhotoTagger.ACTIVATE_TAGGING');if(this.getDataSource()){this.dataSourceFetched(this.getDataSource());}else new (c('AsyncRequest'))(this.ajaxURIs.fetchDatasource).setData({fbid:this.photoData.fbid,version:this.version,data_source_type:this.dataSourceType}).send();if(this.needAlbumSuggestionsFetch)this.fetchAlbumTaggingSuggestions();};j.prototype.restartTagging=function(){'use strict';this.hideNewTag();this.hideTagger();this.hideExistingTags();this.revokedFaceboxes=[];this.setCurrentFacebox(null);if(this.taggingMode){this.requestFaceboxNextTag=true;this.activateTagging();}};j.prototype.getDataSource=function(){'use strict';return this.datasources[this.getDataSourceKey()];};j.prototype.getDataSourceKey=function(){'use strict';var k;if(this.photoData.ownertype=='user'&&!this.photoData.obj_id){k='friends';}else k=this.photoData.obj_id||this.photoData.owner;if(this.dataSourceType===c('PhotoTagDataSourceType').PRODUCT_ITEMS)return k+'_products';return k;};j.prototype.setDataSource=function(k){'use strict';if(this.typeahead.getData()!=k)this.typeahead.swapData(k);this.datasources[this.getDataSourceKey()]=k;};j.prototype.dataSourceFetched=function(k){'use strict';this.taggingMode=true;c('CSS').addClass(this.root,'taggingMode');this._hidePivots();c('Arbiter').inform('PhotoTagger.ACTIVATED_TAGGING');this._bumpQueueName();this._sendWaterfallLogSignal(c('PhotosTaggingWaterfall').BEGIN);this.setDataSource(k);};j.prototype.deactivateTagging=function(){'use strict';if(this.taggingMode===true)this._sendWaterfallLogSignal(c('PhotosTaggingWaterfall').FINISH);this.taggingMode=false;this.hideNewTag();this.hideTagger();this.hideExistingTags();this.setCurrentFacebox(null);this._showPivots();c('CSS').removeClass(this.root,'taggingMode');c('Arbiter').inform('PhotoTagger.DEACTIVATED_TAGGING');};j.prototype._hidePivots=function(){'use strict';var k=c('DOMQuery').scry(this.root,'.tag');for(var l=0;l<k.length;l++)c('CSS').hide(k[l]);};j.prototype._showPivots=function(){'use strict';var k=c('DOMQuery').scry(this.root,'.tag');for(var l=0;l<k.length;l++)c('CSS').show(k[l]);};j.prototype.checkActions=function(event){'use strict';var k=event.getTarget(),l=c('Parent').byClass(k,'fbPhotosPhotoActionsTag'),m=c('Parent').byClass(k,'fbPhotosPhotoActionsProductTag');if(l||m)if(this.taggingMode){this.deactivateTagging();}else{this.dataSourceType=m?c('PhotoTagDataSourceType').PRODUCT_ITEMS:c('PhotoTagDataSourceType').DEFAULT;this.activateTagging();this.addNextTagFromFacebox(1);}};j.prototype.hideTagger=function(){'use strict';c('CSS').hide(this.tagger);this.clickPercentToPhoto=null;var k=c('DOM').scry(this.tagger,'input.textInput')[0];if(k)k.blur();};j.prototype.showTaggerFromClick=function(){'use strict';var k=event.getTarget(),l=c('Parent').byClass(k,'tagPhotoLink'),m=l.getAttribute('data-x'),n=l.getAttribute('data-y');if(m!==null&&n!==null){var o=new (c('Vector'))(m,n),p=this.viewer.getImage();o=c('PhotosUtils').normalizedToAbsolutePosition(p,o);this.setClickPosAndFacebox(o);this.addTagFromClickPos(o);}this.showTagger();};j.prototype.showTagger=function(){'use strict';c('DOM').scry(this.root,'.fbPhotosPhotoTagboxBase').forEach(function(p){c('CSS').removeClass(p,'hover');c('CSS').removeClass(p,'tagClick');if(this.taggingMode)c('CSS').hide(c('DOM').find(p,'.tag'));},this);var k=c('DOM').find(this.tagger,'.typeaheadContainer'),l=c('DOM').find(k,'.arrow .nub'),m=3;c('Style').set(k,'margin-left',0);c('Style').set(l,'margin-left',0);var n=c('getElementPosition')(k);if(n.x<=0)if(!c('CSS').hasClass(this.tagger,'fbPhotoTaggerFlipped')){c('Style').set(k,'margin-left',-2*n.x+'px');c('Style').set(l,'margin-left',n.x-m+'px');}if(this.ufi){var o=c('DOM').find(this.tagger,"._12nb");c('CSS').show(k);c('CSS').hide(o);}c('CSS').show(this.tagger);setTimeout(function(){c('DOM').find(this.tagger,'input.textInput').focus();}.bind(this),0);this.hideNewTag();c('Arbiter').inform('reflow');};j.prototype.showNewTag=function(k,l){'use strict';if(l&&this.ufi){c('CSS').addClass(l,'hover');c('DOM').find(l,'.uiLinkButtonInput').value=k;return;}if(!this.newTagBox)return;c('DOM').setContent(c('DOM').find(this.newTagBox,'div.tagName'),c('DOM').create('span',null,k));c('CSS').show(this.newTagBox);this.hideNewTagTimer=setTimeout(this.hideNewTag.bind(this),3000);};j.prototype.hideNewTag=function(){'use strict';if(!this.newTagBox)return;if(this.hideNewTagTimer!==null){clearTimeout(this.hideNewTagTimer);this.hideNewTagTimer=null;}c('CSS').hide(this.newTagBox);};j.prototype.getTaggerPositioningOrigin=function(){'use strict';return c('Vector').getElementPosition(this.clickState,'document');};j.prototype.setClickPosAndFacebox=function(k){'use strict';var l=this.viewer.getImage();this.saveClickPosition(l,k);var m=c('PhotosUtils').absoluteToNormalizedPosition(l,k);this.setCurrentFacebox(this.findNearestFacebox(m));};j.prototype.addTagFromClickPos=function(k){'use strict';this.currentTextbox=null;this.hideExistingTags();if(this.currentFacebox){this.addTagFromFaceboxDontSave(this.currentFacebox);}else{var l=this.viewer.getImage(),m=c('PhotosUtils').absoluteToNormalizedPosition(l,k);if(this.tags!==undefined)for(var n=0;n<this.tags.length;n++)if(this.tags[n].rect.contains(m)){this.showExistingTag(this.tags[n]);this.currentTextbox=this.tags[n];}this.removeSuggestionFromTagger();c('CSS').removeClass(c('DOM').find(this.tagger,'.faceBox'),'faceBoxHidden');if(this.currentTextbox){var o=this.currentTextbox.rect.w()/100*c('Vector').getElementDimensions(l).x;this.addTagFromPosition(k,o);}else this.addTagFromPosition(k,this.TAG_BOX_SIZE);}};j.prototype.showExistingTag=function(k){'use strict';if(this.taggingMode){this._hidePivots();c('CSS').show(c('DOM').find(k.node,'.tag'));c('CSS').addClass(k.node,'tagClick');}else c('CSS').addClass(k.node,'hover');this.hideTagger();};j.prototype.hideExistingTags=function(){'use strict';var k=c('DOM').scry(this.root,'.tagClick');k&&k.forEach(function(l){c('CSS').removeClass(l,'tagClick');if(this.taggingMode)c('CSS').hide(c('DOM').find(l,'.tag'));}.bind(this));};j.prototype.addTag=function(event){'use strict';var k=event.getTarget(),l=c('Parent').byClass(k,'fbPhotosPhotoButtons');if(!this.taggingMode||l&&k!==l||c('Parent').byClass(k,'fbPhotosPhotoActions')||c('Parent').byClass(k,'faceboxSuggestion')||c('Parent').byClass(k,'photoTagTypeahead')||c('Parent').byClass(k,'tagUfi'))return;var m=c('Vector').getEventPosition(event);this.setClickPosAndFacebox(m);this.addTagFromClickPos(m);};j.prototype.showTagIfCommentAdded=function(){'use strict';if(this.taggingMode){var k=this.getClickPointForSave(),l=c('Vector').from(k.x,k.y);if(k!==null)for(var m=0;m<this.tags.length;m++)if(this.tags[m].rect.contains(l)){this.showExistingTag(this.tags[m]);this.hideTagger();return;}}};j.prototype.commentAdded=function(k,l){'use strict';k.forEach(function(m){var n=this.getClickPointForSave(),o=null;if(m.isPhotoTag&&(m.photoTextTagID===null||m.photoTextTagID===undefined)&&m.photoTagX!==null&&m.photoTagY!==null)if(n!==null&&m.photoTagX===n.x&&m.photoTagY===n.y){o=c('DOM').find(this.tagger,"._12nb");}else{var p=new (c('Vector'))(m.photoTagX,m.photoTagY),q=this.findNearestTag(p);if(q!==null)o=c('DOM').find(q.node,"._12nb");}if(o!==null){var r=c('DOM').find(o,'.UFIContainer'),s={};s[m.author]={id:m.author};c('ReactDOM').render(c('React').createElement(c('UFIContainer.react'),null,c('React').createElement(c('UFIComment.react'),{comment:m,authorProfiles:s,feedback:{},contextArgs:{}})),r);c('Style').set(c('DOM').find(o,'.UFIAddComment'),'opacity',.5);c('DOM').find(o,'textarea').setAttribute('disabled','disabled');}},this);};j.prototype.showTaggerUFI=function(event){'use strict';var k=c('DOM').find(this.tagger,'.typeaheadContainer'),l=c('DOM').find(this.tagger,"._12nb"),m=c('DOM').find(l,'.arrow .nub'),n=3,o=c('getElementPosition')(l);if(o.x<=0&&!c('CSS').hasClass(this.tagger,'fbPhotoTaggerFlipped')){c('Style').set(l,'margin-left',-2*o.x+'px');c('Style').set(m,'margin-left',o.x-n+'px');}else{c('Style').set(l,'margin-left',0);c('Style').set(m,'margin-left',0);}var p=this.getClickPointForSave(),q=c('DOM').find(l,'.tagUfiAddComment'),r=c('DOM').find(this.viewer.ufiInputContainer,'input[name="ft_ent_identifier"]'),s={ftentidentifier:r.value,source:q.getAttribute('data-source'),mentionsinput:{inputComponent:c('LegacyMentionsInput.react')},hideActorPhoto:true,isPhotoTag:true,photoFBID:this.viewer.getCurrentPhotoInfo().fbid,photoTagX:p.x,photoTagY:p.y};this.addCommentController=c('UFIAddCommentController').factory(q,s);var t=c('DOM').find(l,'.UFIContainer');if(t.firstChild!==null)c('DOM').remove(t.firstChild);c('Style').set(c('DOM').find(l,'.UFIAddComment'),'opacity',1);c('DOM').find(l,'textarea').removeAttribute('disabled');c('CSS').show(this.tagger);c('CSS').hide(k);c('CSS').show(l);c('Arbiter').inform('reflow');};j.prototype._findNearest=function(k,l){'use strict';var m=Infinity,n=null;k.forEach(function(o){if(o.rect.contains(l)){var p=l.distanceTo(o.rect.getCenter());if(p<m){m=p;n=o;}}});return n;};j.prototype.findNearestFacebox=function(k){'use strict';return this._findNearest(this.faceboxes,k);};j.prototype.findNearestTag=function(k){'use strict';return this._findNearest(this.tags,k);};j.prototype.addNextTagFromFacebox=function(k){'use strict';if(this.faceboxes.length===0)return;if(!this.currentFacebox){this.setCurrentFacebox(this.faceboxes[0]);}else{var l=this.faceboxes.indexOf(this.currentFacebox),m=i(l+k,this.faceboxes.length);if(m===l)return;this.setCurrentFacebox(this.faceboxes[m]);}this.addTagFromFacebox(this.currentFacebox);};j.prototype.addTagFromFaceboxDontSave=function(k){'use strict';c('CSS').addClass(k.node,'active');c('CSS').addClass(c('DOM').find(this.tagger,'.faceBox'),'faceBoxHidden');var l=k.rect.getCenter(),m=this.viewer.getImage(),n=c('PhotosUtils').normalizedToAbsolutePosition(m,l),o=k.rect.w()/100*c('Vector').getElementDimensions(m).x;if(k.rect.w()>this.HUGE_FACE_THRESH&&k.rect.h()>this.HUGE_FACE_THRESH)o*=this.HUGE_FACE_SHRINK_FACTOR;var p=this.getFaceboxSuggestionFromFaceboxElem(k.node);if(p){var q=this.version===c('PhotosConst').VIEWER_PERMALINK?c('FaceboxSourceConstants').PERMALINK_DISMISS:c('FaceboxSourceConstants').SNOWLIFT_DISMISS;this.addSuggestionToTagger(k,p);this._sendFaceboxSuggestionLogSignal(p.getAttribute('data-id'),q,k.id);}else this.removeSuggestionFromTagger();this.addTagFromPosition(n,o);return n;};j.prototype.getFaceboxSuggestionFromFaceboxElem=function(k){'use strict';return c('DOM').scry(k,"._570u")[0];};j.prototype.addSuggestionToTagger=function(k,l){'use strict';this.removeSuggestionFromTagger();c('CSS').addClass(this.tagger,'suggestionActive');var m=c('DOM').find(this.tagger,'.typeaheadContainer'),n=l.cloneNode(true);this.stripReactID(n);c('DOM').appendContent(m,n);this.setupFaceboxSuggestionHandlers(k,n);};j.prototype.stripReactID=function(k){'use strict';k.removeAttribute('data-reactid');for(var l=0;l<k.children.length;l++)this.stripReactID(k.children[l]);};j.prototype.removeSuggestionFromTagger=function(){'use strict';c('CSS').removeClass(this.tagger,'suggestionActive');var k=c('DOM').scry(this.tagger,'.faceboxSuggestion');k&&k.forEach(function(l){c('DOM').remove(l);});};j.prototype.dismissFaceboxSuggestion=function(k,l,m,n){'use strict';new (c('AsyncRequest'))().setURI('/ajax/dismiss_tag_suggest.php').setMethod('POST').setData({facebox_logs:[{facebox:k,log_data:{photo_owner:m,tagee:l,is_first:true}}],closing_source:n,closing_action:'no'}).setAllowCrossPageTransition(true).send();};j.prototype.addTagFromFacebox=function(k){'use strict';this.currentTextbox=null;var l=this.addTagFromFaceboxDontSave(k),m=this.viewer.getImage();this.saveClickPosition(m,l);};j.prototype.addTagFromPosition=function(k,l){'use strict';var m=this.viewer.getImage(),n=this.calcTaggerPosition(m,k,l);this.calcClickPoint(m,k);if(!n){this.hideTagger();return;}n.setElementPosition(this.tagger);if(this.newTagBox){n.setElementPosition(this.newTagBox);new (c('Vector'))(l,l).setElementDimensions(this.newTagBox);}var o=c('Vector').getElementPosition(m),p=c('Vector').getElementDimensions(m),q=this.typeahead.getView();if(k.y>o.y+p.y*3/4){c('CSS').addClass(this.tagger,'fbPhotoTaggerFlipped');q.addTypeaheadFlip('fbPhotoTaggerFlipped');if(k.x>o.x+p.x*1/2){this.flipRules('fbPhotoTaggerRight','fbPhotoTaggerLeft',q);}else this.flipRules('fbPhotoTaggerLeft','fbPhotoTaggerRight',q);}else{c('CSS').removeClass(this.tagger,'fbPhotoTaggerFlipped');c('CSS').removeClass(this.tagger,'fbPhotoTaggerLeft');c('CSS').removeClass(this.tagger,'fbPhotoTaggerRight');q.removeTypeaheadFlip('fbPhotoTaggerFlipped');q.removeTypeaheadFlip('fbPhotoTaggerLeft');q.removeTypeaheadFlip('fbPhotoTaggerRight');}if(!this.taggingMode||this.currentTextbox===null)if(this.ufi&&this.currentFacebox===null){this.showTaggerUFI();}else this.showTagger();if(this.taggingMode){this._sendWaterfallLogSignal(c('PhotosTaggingWaterfall').TAG_FACE);}else this._sendWaterfallLogSignal(c('PhotosTaggingWaterfall').HOVER_TAG_FACE);};j.prototype.flipRules=function(k,l,m){'use strict';c('CSS').addClass(this.tagger,k);c('CSS').removeClass(this.tagger,l);m.addTypeaheadFlip(k);m.removeTypeaheadFlip(l);};j.prototype.calcTaggerPosition=function(k,l,m,n){'use strict';n=n||m;var o=c('Vector').getElementPosition(k),p=c('Vector').getElementDimensions(k),q=new (c('Vector'))(m/2,n/2),r=l.sub(o);for(var s in {x:1,y:1}){if(l[s]<o[s]||l[s]>o[s]+p[s])return null;var t=s==='x'?m:n;if(r[s]<t/2){q[s]=r[s];}else if(p[s]<r[s]+t/2)q[s]=t-(p[s]-r[s]);}var u=3,v=c('DOM').find(this.tagger,'.faceBox');c('Style').set(v,'width',m-u*2+'px');c('Style').set(v,'height',n-u*2+'px');var w=l.sub(this.getTaggerPositioningOrigin());return w.sub(q.x,q.y);};j.prototype.calcClickPoint=function(k,l){'use strict';var m=c('Vector').getElementDimensions(k),n=c('Vector').getElementPosition(k),o=l.sub(n);this.clickPoint={x:o.x/m.x,y:o.y/m.y};};j.prototype.getClickPointForSave=function(){'use strict';if(this.clickPoint===undefined)return null;return {x:this.clickPoint.x*100,y:this.clickPoint.y*100};};j.prototype.getTaggingDataForSave=function(k,l){'use strict';var m=this.getTaggingData('add',k.isFreeform()?'':k.getValue(),k.getText(),l),n=this.getClickPointForSave();m.x=n.x;m.y=n.y;m.from_facebox=!!this.currentFacebox;m.tagging_mode=!!this.taggingMode;return m;};j.prototype.saveTag=function(k,l,m){'use strict';var n=this.getTaggingDataForSave(l,m);if(this.tagAccumulating){c('PhotoTagStore').getInstance().storeTagWithOptions(this.photoData.fbid,n.subject,n.x,n.y,n);}else new (c('AsyncRequest'))().setURI(this.ajaxURIs.tagAction).setMethod('POST').setData(n).setAllowCrossPageTransition(true).setHandler(this.tagsChangeHandler.bind(this)).setErrorHandler(this.checkError.bind(this,l)).send();var o=this.userId===n.subject;if(o){var p=c('DOM').scry(this.makeProfilePicMenuContainer,'[data-picid="'+this.viewer.getCurrentPhotoInfo().fbid+'"]');if(p.length===1){var q=p[0];c('CSS').removeClass(q,'hide');}}var r=new (c('Vector'))(n.x,n.y),s=this.findNearestTag(r);if(s&&s.rect.contains(r)){this.showNewTag(l.getText(),s.node);}else this.showNewTag(l.getText());this.hideTagger();var t=this.currentFacebox;if(t){if(this.taggingMode)this.addNextTagFromFacebox(1);this.removeFacebox(t);}c('Arbiter').inform('PhotoTagger.ADDING_TAG',{subject:n.subject,text:l.getText()});c('Arbiter').inform('PhotoTagger.SAVE_TAG',{photo_fbid:this.photoData.fbid,self_tag:o});};j.prototype.getTaggingData=function(k,l,m,n){'use strict';return {cs_ver:this.version,pid:this.photoData.pid,fbid:this.photoData.fbid,id:this.photoData.owner,subject:l,name:m,action:k,source:n?n:this.viewer.getSourceString(),qn:this._qn,position:this.getPosition(),slsource:this.viewer.getViewerSource(),slset:this.viewer.getViewerSet()};};j.prototype.getPosition=function(){'use strict';return this.viewer.getPosition();};j.prototype.tagsChangeHandler=function(k){'use strict';};j.prototype.checkError=function(k,l){'use strict';if(l.getPayload()&&l.getPayload().clear_tag){k.already_untagged=true;this.tokenizer.removeToken(k);}c('AsyncResponse').defaultErrorHandler(l);};j.prototype.removeTag=function(k,l,m){'use strict';if(l.already_untagged)return;var n='remove';if(c('DOM').scry(l.element,'a.pending')[0])n='retract';if(l.blockUser)n='remove_block';if(this.tagAccumulating){if(l.isFreeform()){c('PhotoTagStore').getInstance().removeTextTag(this.photoData.fbid,l.getInfo().text);}else c('PhotoTagStore').getInstance().removeTag(this.photoData.fbid,l.getInfo().uid);}else new (c('AsyncRequest'))().setURI(this.ajaxURIs.tagAction).setMethod('POST').setData(this.getTaggingData(n,l.isFreeform()?'':l.getInfo().uid,l.getInfo().text)).setHandler(function(q){this.tagsChangeHandler(q);m&&m();}.bind(this)).setAllowCrossPageTransition(true).send();if(this.userId===parseInt(l.getValue(),10)&&this.userId!==this.viewer.getCurrentPhotoInfo().owner){var o=c('DOM').scry(this.makeProfilePicMenuContainer,'[data-picid="'+this.viewer.getCurrentPhotoInfo().fbid+'"]');if(o.length===1){var p=o[0];c('CSS').addClass(p,'hide');}c('Arbiter').inform('PhotoTagger.REMOVED_MAKE_PROFILE_PIC_OPTION');}};j.prototype.removeTagByID=function(k,l,m){'use strict';var n=this.tokenizer.tokens;for(var o=0;o<n.length;o++)if(n[o].info.uid==l)return this.removeTag(null,n[o],m);};j.prototype.removeTagByIDFromHovercardLink=function(k,l,m){'use strict';this.removeTagByID(k,l,function(){if(c('Hovercard').contains(m))c('Hovercard').hide(true);});};j.prototype.removeWithTag=function(k,l){'use strict';new (c('AsyncRequest'))().setURI(this.ajaxURIs.tagWithAction).setMethod('POST').setData({action:'remove_with',taggee:l,tag:k,version:this.version,fbid:this.photoData.fbid}).setHandler(function(m){this.tagsChangeHandler(m);c('Hovercard').hide(true);}.bind(this)).setAllowCrossPageTransition(true).send();};j.prototype.setPhotoData=function(k,l){'use strict';this.clickPercentToPhoto=null;this.photoData=l;return this;};j.prototype.setExtraData=function(k,l){'use strict';this.tagRects=l.tagRects;this.updateFaceboxes();this.setupAddTagHandlers();this._setInitialFaceboxFromID(l);if(l.openTag)setTimeout(function(){this.activateTagging();this._setInitialFaceboxFromID(l);if(this.faceboxes.length===1){this.addTagFromFacebox(this.currentFacebox);}else this.addNextTagFromFacebox(1);}.bind(this),0);return this;};j.prototype._setInitialFaceboxFromID=function(k){'use strict';if(k.initialFaceboxID!==null&&this.faceboxes.length!==0){var l=this.getFacebox(k.initialFaceboxID);if(l!==null){var m=this.faceboxes.indexOf(l);m=i(m-1,this.faceboxes.length);this.setCurrentFacebox(this.faceboxes[m]);}}};j.prototype.markTagAsSpam=function(k,l){'use strict';new (c('AsyncRequest'))().setURI(this.ajaxURIs.tagAction).setMethod('POST').setData(this.getTaggingData('mark_as_spam',l,null)).send();};j.prototype.removeFacebox=function(k){'use strict';if(k===null)return;this.revokedFaceboxes.push(k.rect.getCenter());c('removeFromArray')(this.faceboxes,k);c('DOM').remove(k.node);if(k===this.currentFacebox)this.setCurrentFacebox(null);};j.prototype.setCurrentFacebox=function(k){'use strict';if(this.currentFacebox)c('CSS').removeClass(this.currentFacebox.node,'active');this.currentFacebox=k;if(k){this.recognizedUsers=JSON.parse(k.node.getAttribute('data-recognizeduids'));this.updateTypeaheadSuggestions();}};j.prototype.updateRevokedFaceboxes=function(){'use strict';this.revokedFaceboxes=this.revokedFaceboxes.filter(function(k){for(var l=0;l<this.faceboxes.length;++l){var m=this.faceboxes[l],n=k.distanceTo(m.rect.getCenter());if(n<this.EPSILON)return true;}return false;}.bind(this));this.revokedFaceboxes.forEach(function(k){var l=this.findNearestFacebox(k);c('removeFromArray')(this.faceboxes,l);c('DOM').remove(l.node);}.bind(this));};j.prototype.updateFaceboxes=function(){'use strict';this.faceboxes=[];this.tags=[];for(var k in this.tagRects){var l;if(c('PhotosUtils').isFacebox(k)){l=this.faceboxes;}else if(c('PhotosUtils').isTag(k))l=this.tags;if(l){var m='container';if(this.version===c('PhotosConst').VIEWER_PERMALINK)m='root';var n=c('DOM').scry(this.viewer[m],'#'+k);if(n.length>0)l.push({node:n[0],id:k,rect:this.tagRects[k]});}this.showTagIfCommentAdded();}this.updateRevokedFaceboxes();this.faceboxes.sort(function(p,q){return p.rect.getCenter().x-q.rect.getCenter().x;});if(this.currentFacebox){var o=this.currentFacebox.rect.getCenter();this.setCurrentFacebox(this.findNearestFacebox(o));c('CSS').addClass(this.currentFacebox.node,'active');}if(this.requestFaceboxNextTag){this.addNextTagFromFacebox(1);this.requestFaceboxNextTag=false;}};j.prototype.getFacebox=function(k){'use strict';for(var l=0;l<this.faceboxes.length;++l)if(this.faceboxes[l].id===k)return this.faceboxes[l];return null;};j.prototype.setupFaceboxSuggestionHandlers=function(k,l){'use strict';var m=c('DOM').find(l,"a._570w"),n=c('DOM').find(l,"a._570x");this.handlers.push(c('Event').listen(m,'click',function(o){var p=this._getCurrentFaceboxID(),q=this.version===c('PhotosConst').VIEWER_PERMALINK?c('FaceboxSourceConstants').PERMALINK_DISMISS:c('FaceboxSourceConstants').SNOWLIFT_DISMISS;this.dismissFaceboxSuggestion(k.id.replace('face:',''),l.getAttribute('data-id'),this.photoData.owner,q);this.removeSuggestionFromTagger();this.hideTagger();c('DOM').remove(this.getFaceboxSuggestionFromFaceboxElem(k.node));c('Arbiter').inform('PhotoTagger.TAG_SUGGESTION_REJECTED/'+p);}.bind(this)),c('Event').listen(n,'click',function(o){var p=this._getCurrentFaceboxID(),q={uid:l.getAttribute('data-id'),text:l.getAttribute('data-text')},r=this.tokenizer.createToken(q),s=this.version===c('PhotosConst').VIEWER_PERMALINK?c('FaceboxSourceConstants').PERMALINK_SUGGEST:c('FaceboxSourceConstants').SNOWLIFT_SUGGEST;this.saveTag(null,r,s);c('Arbiter').inform('PhotoTagger.TAG_SUGGESTION_CONFIRMED/'+p);}.bind(this)));};j.prototype._getCurrentFaceboxID=function(){'use strict';return this.currentFacebox&&this.currentFacebox.id.substring(5);};j.getInstance=function(k){'use strict';return j.instances[k];};j.resetAlbumTaggingSuggestions=function(k){'use strict';var l=j.getInstance(k);l&&l.resetAlbumTaggingSuggestions();};Object.assign(j,{instances:{}});Object.assign(j.prototype,{TAG_BOX_SIZE:100,EPSILON:.0025,HUGE_FACE_THRESH:90,HUGE_FACE_SHRINK_FACTOR:.6,elemNames:{6:{addTagLink:'div.fbPhotosPhotoOwnerButtons',overlayActions:'div.snowliftOverlayBar'}}});f.exports=j;}),null);
  __d('PhotoPermalink',['csx','$','Arbiter','Assert','AsyncRequest','Bootloader','CSS','DOM','Event','KeyEventController','Keys','PhotoWarningScreenConfig','PageTransitions','Parent','PhotoPermalinkURI','PhotosConst','PhotoSessionLog','PhotoStreamCache','PhotosUtils','PhotoTagger','PhotoTagSearchPivotLogger','PhotoViewer','PhotoWarningScreen','PhotoWarningScreenMixin','Scroll','Style','Vector','classWithMixins','emptyFunction','ge','goURI','mixin'],(function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k=c('PhotoWarningScreenConfig').GraphicEvents;i=babelHelpers.inherits(l,c('classWithMixins')(c('PhotoViewer'),c('mixin')(c('PhotoWarningScreenMixin'))));j=i&&i.prototype;function l(){'use strict';j.constructor.call(this);this._uriStack=[];this.replaceUrl=false;this.payloadInitialized=false;this._seenTags={};}l.prototype.init=function(m){'use strict';this.stream=new (c('PhotoStreamCache'))();this.stream.init(c('PhotosConst').VIEWER_PERMALINK,'PhotoViewerPagelet','pagelet_photo_viewer');this.reset();this.root=c('$')('fbPhotoPageContainer');this.header=c('$')('fbPhotoPageHeader');this.stageWrapper=c('DOM').find(this.root,'.stageContainer');this.videoStage=c('DOM').find(this.stageWrapper,'div.videoStage');this.buttonActions=c('DOM').find(this.root,'div.stageButtons');this.viewLargerLink=c('DOM').scry(this.root,'a.fbPhotoViewLarger').pop();this.feedback=c('ge')('fbPhotoPageFeedback');this.image=c('ge')('fbPhotoImage');this.errorBox=c('ge')('fbPhotoPageError');this.actionList=c('ge')('fbPhotoPageActions');this.stageActions=c('DOM').find(this.root,'div.stageActions');this.photoContentContainer=c('$')('fbxPhotoContentContainer');this.photoImageStage=c('DOM').find(this.root,'.fbPhotoImageStage');this.existingPhotoWarning=c('DOM').scry(this.root,"._2v00").pop();this.initGraphicWarningDOM(this.existingPhotoWarning||m.graphic_warning_markup);this._canSeeGraphicWarning=!!m.can_see_graphic_warning;this.showingTypeaheadSuggestions=false;this.loadingStates={image:false,html:false};this.unhiliteTimer=null;this.source=null;if(this.image)this.imageLoadListener=c('Event').listen(this.image,'load',this.adjustForNewData.bind(this));this.pageHandlers=[c('Event').listen(this.root,'mouseout',this.mouseOutListener.bind(this)),c('Event').listen(this.root,'mousemove',this.mouseMoveListener.bind(this)),c('Event').listen(this.stageWrapper,'click',this.stageClickListener.bind(this)),c('Event').listen(this.buttonActions,'click',this.buttonListener.bind(this)),c('Event').listen(this.actionList,'click',this.rotateListener.bind(this)),c('Event').listen(this.feedback,'click',function(event){var n=event.getTarget();if(c('Parent').byClass(n,'like_link')||c('Parent').byClass(n,'UFILikeLink')&&c('Parent').byClass(n,'UIActionLinks'))c('CSS').toggleClass(c('DOM').find(this.buttonActions,'div.likeCommentGroup'),'viewerLikesThis');}.bind(this))];c('PageTransitions').registerHandler(this.transitionHandler.bind(this));c('KeyEventController').registerKey('LEFT',this.goNav.bind(this));c('KeyEventController').registerKey('RIGHT',this.goNav.bind(this));c('PhotoSessionLog').initLogging(c('PhotoSessionLog').PERMALINK);this._showHover=m.pivot_hover;c('Arbiter').subscribe('PhotoTagApproval.HILITE_TAG',this.onHiliteTag.bind(this));c('Arbiter').subscribe('PhotoTagApproval.UPDATE_TAG_BOX',this.onUpdateTagBox.bind(this));this.adjustForNewData();};l.prototype.getEventPrefix=function(){'use strict';return 'PhotoPermalink';};l.prototype.getSourceString=function(){'use strict';return 'permalink';};l.prototype.getViewerSource=function(){'use strict';return this.source;};l.prototype.getViewerSet=function(){'use strict';return this.stream.getPhotoSet();};l.prototype.getVersionConst=function(){'use strict';return c('PhotosConst').VIEWER_PERMALINK;};l.prototype.getGraphicWarningContainer=function(){'use strict';return this.photoContentContainer;};l.prototype.getGraphicWarningHiddenContent=function(){'use strict';return this.photoImageStage;};l.prototype.saveTagsFromPayload=function(m){'use strict';this.storeFromData(m);if('data' in m&&this.stream.getCursor() in m.data)this.swapData();};l.prototype.goNav=function(event){'use strict';var m=c('Event').getKeyCode(event)||event.getTarget(),n=event.type==='click'&&c('Parent').byClass(m,'stageWrapper')&&!c('Parent').byClass(m,'tagBoxPending')&&!c('Parent').byClass(m,'tagBoxPendingResponse')&&!c('Parent').byClass(m,'uiButtonGroup');if(n&&c('CSS').hasClass(this.root,'taggingMode'))return false;if(m==c('Keys').LEFT){this.page(-1);}else if(m==c('Keys').RIGHT||n)this.page(1);return false;};l.prototype.pagerClick=function(m){'use strict';if(m=='prev'){this.page(-1);}else if(m=='next')this.page(1);return false;};l.prototype.setLoadingState=function(m,n){'use strict';switch(m){case l.STATE_IMAGE_DATA:this.loadingStates[m]=n;c('CSS').conditionClass(this.root,'imageLoading',n);break;case l.STATE_HTML:this.loadingStates[m]=n;c('CSS').conditionClass(this.root,'dataLoading',n);break;}};l.prototype.checkState=function(m){'use strict';if(m!=l.STATE_ERROR&&!this.loadingStates[m])return;switch(m){case l.STATE_IMAGE_DATA:var n=this.stream.getCurrentImageData();if(n){if(n.url){this.switchImage(n.url,true);}else if(n.video)this.switchVideo(n.video,true);this.setLoadingState(m,false);}break;case l.STATE_HTML:if(this.stream.getCurrentHtml()){this.swapData();this.setLoadingState(m,false);}break;default:if(this.stream.errorInCurrent()){if(this.image)c('CSS').hide(this.image);c('CSS').show(this.errorBox);}break;}};l.prototype.reHilitePendingTag=function(){'use strict';var m=c('ge')(this.hilitedTag);if(m&&c('CSS').hasClass(m,'showPendingTagName'))return;var n=c('DOM').scry(this.root,'div.tagsWrapper div.showPendingTagName')[0];if(n)this.switchHilitedTags(n.id);};l.prototype.setReachedLeftEnd=function(){'use strict';this.stream.setReachedLeftEnd();};l.prototype.setReachedRightEnd=function(){'use strict';this.stream.setReachedRightEnd();};l.prototype.isPagingAllowed=function(m){'use strict';return this.stream.isValidMovement(m)&&!c('CSS').hasClass(this.root,'croppingMode');};l.prototype.page=function(m,n){'use strict';if(!this.isPagingAllowed(m)||!this.stream.nonCircularPhotoSetCanPage(m))return;this._seenTags={};this.unhiliteAllTags();var o=this.getVideoOnStage();if(o)this.switchVideo(o,false);this.recacheData();this.stream.moveCursor(m);if(this.image)c('CSS').hide(this.image);if(this.stream.errorInCurrent()){this.setLoadingState(l.STATE_HTML,true);c('CSS').show(this.errorBox);return;}var p=this.stream.getCurrentImageData();if(p){if(p.url){if(m!==0)if(p.info.isgraphic){if(this._canSeeGraphicWarning){this.showGraphicWarning();c('PhotoWarningScreen').logGraphic(k.GRAPHIC_PHOTO_SHOWN_WITH_WARNING);}else{this.hideGraphicWarning();c('PhotoWarningScreen').logGraphic(k.GRAPHIC_PHOTO_SHOWN_NO_WARNING);}}else this.hideGraphicWarning();this.switchImage(p.url,true);if(this.viewLargerLink)this.viewLargerLink.setAttribute('href',p.info.permalink);}else if(p.video)this.switchVideo(p.video,true);if(!n){this.replaceUrl=true;c('goURI')(p.info.permalink);}}else{this.waitForLoadCount++;this.setLoadingState(l.STATE_IMAGE_DATA,true);}if(this.stream.getCurrentHtml()){this.swapData();}else this.setLoadingState(l.STATE_HTML,true);c('Arbiter').inform('PhotoPermalink.PAGE');};l.prototype.transitionHandler=function(m){'use strict';if(!c('PhotoPermalinkURI').isValid(m))return false;var n=m.getQualifiedURI().toString();if(this.replaceUrl){this.replaceUrl=false;this._uriStack.push(n);c('PageTransitions').transitionComplete();return true;}var o=this._uriStack.length;if(o>=2&&this._uriStack[o-2]===n)this._uriStack.pop();var p=this.stream.getCursorForURI(m.getUnqualifiedURI().toString());if(p){var q=this.stream.getRelativeMovement(p);this.page(q,true);c('PageTransitions').transitionComplete();return true;}return false;};l.prototype.recacheData=function(m){'use strict';if(!this.loadingStates.html){var n=this.stream.getCurrentHtml();for(var o in n){var p=c('ge')(o);if(p)n[o]=Array.from(p.childNodes);if(m!==true&&o!=='fbPhotoPageHeader'&&p)c('DOM').empty(c('$')(o));}}};l.prototype.getCurrentPhotoInfo=function(){'use strict';var m=this.stream.getCurrentImageData();return m&&m.info;};l.prototype.getVideoOnStage=function(){'use strict';var m=this.stream.getCurrentImageData();return m&&m.video;};l.prototype.switchImage=function(m,n){'use strict';c('CSS').hide(this.image);c('CSS').hide(this.errorBox);var o=this.stream&&this.stream.getCurrentImageData();if(o){c('PhotoSessionLog').addPhotoView(o.info);if(this._showHover){var p=this.stream.getCurrentExtraData();if(p)c('PhotoTagSearchPivotLogger').logImageImpression('permalink',String(this.stream.getCursor()),Object.keys(p.tagRects));}}var q=c('DOM').create('img',{id:'fbPhotoImage',className:'fbPhotoImage',alt:'',src:m});c('DOM').replace(this.image,q);this.image=q;if(this.imageLoadListener)this.imageLoadListener.remove();this.imageLoadListener=c('Event').listen(this.image,'load',this.adjustForNewData.bind(this));if(n)this.stream.preloadImages();};l.prototype.switchVideo=function(m,n){'use strict';var o='swf_'+m;if(n){c('CSS').addClass(this.stageWrapper,'showVideo');this.videoStage.id=m;if(window[o]&&!c('ge')(o))window[o].write(m);}else{this.videoStage.id='fbPageVideoStage';window[o].addVariable('video_autoplay',0);c('DOM').empty(this.videoStage);c('CSS').removeClass(this.stageWrapper,'showVideo');}};l.prototype.swapData=function(){'use strict';if(this.dataLoadTimer){this.setLoadingState(l.STATE_HTML,true);clearTimeout(this.dataLoadTimer);this.dataLoadTimer=setTimeout(this.clearTimer.bind(this,true),100);return;}var m,n=this.stream.getCurrentHtml();if(n){for(var o in n){var p=n[o];if(Array.isArray(p)&&p.length===1&&p[0]===undefined)continue;m=c('ge')(o);m&&c('DOM').setContent(m,n[o]);}c('Arbiter').inform('PhotoPermalink.DATA_CHANGE',this.stream.getCurrentImageData().info,c('Arbiter').BEHAVIOR_STATE);if(this.stream.getCurrentExtraData()){c('Arbiter').inform('PhotoPermalink.EXTRA_DATA_CHANGE',this.stream.getCurrentExtraData(),c('Arbiter').BEHAVIOR_STATE);var q=this.stream.getCurrentExtraData();if(q&&q.source!==undefined){this.source=q.source;c('PhotoSessionLog').setSource(this.source);}}this.setLoadingState(l.STATE_HTML,false);this.dataLoadTimer=setTimeout(this.clearTimer.bind(this,false),100);}this.adjustForNewData();};l.prototype.clearTimer=function(m){'use strict';this.dataLoadTimer=false;m&&this.swapData();};l.prototype.adjustForNewData=function(){'use strict';if(!this.image)return;var m=c('DOM').scry(this.stageWrapper,'div.tagsWrapper')[0],n=c('Vector').getElementDimensions(this.image);if(m){c('Style').set(m,'width',n.x+'px');c('Style').set(m,'height',n.y+'px');}};l.prototype.fetchInitBucket=function(m){'use strict';if(!this.stream.isLoaded())return;this.stream.fetch(m,true);};l.prototype.addPhotoFbids=function(m,n,o){'use strict';var p=this.stream.getCursor()===null;this.stream.attachToFbidsList(m,n,o);if(o&&p)this.page(0);};l.prototype.attachTagger=function(m){'use strict';c('DOM').appendContent(this.stageActions,m);};l.prototype.storeFromData=function(m){'use strict';var n=this.stream.storeToCache(m);if('init' in m){c('PhotoSessionLog').setPhotoSet(this.stream.getPhotoSet());c('PhotoSessionLog').setLogFbids(true);c('PhotoSessionLog').addPhotoView(this.stream.getCurrentImageData().info);if(this._showHover){var o=this.stream.getCurrentExtraData();if(o)c('PhotoTagSearchPivotLogger').logImageImpression('permalink',String(this.stream.getCursor()),Object.keys(o.tagRects));}}if('error' in n){this.checkState(l.STATE_ERROR);return;}if('image' in n)this.checkState(l.STATE_IMAGE_DATA);if('data' in n)this.checkState(l.STATE_HTML);if(!this.payloadInitialized&&this.stream.getCurrentExtraData()){this.payloadInitialized=true;c('Arbiter').inform('PhotoPermalink.EXTRA_DATA_CHANGE',this.stream.getCurrentExtraData(),c('Arbiter').BEHAVIOR_STATE);}};l.prototype.handleServerError=function(m,n){'use strict';c('DOM').setContent(this.errorBox,m);this.storeFromData(n);};l.prototype.updateTotalCount=function(m,n,o){'use strict';var p=c('ge')('fbPhotoPagePositionAndCount');p&&c('DOM').setContent(p,o);this.stream.setTotalCount(m);this.stream.setFirstCursorIndex(n);};l.prototype.buttonListener=function(event){'use strict';var m=event.getTarget();if(c('Parent').byClass(m,'likeButton')){var n=c('DOM').scry(this.feedback,'button.like_link')[0];if(!n)n=c('DOM').scry(this.feedback,'a.UFILikeLink')[0];n&&n.click();}else if(c('Parent').byClass(m,'commentButton')){var o=c('DOM').scry(this.feedback,'div.commentBox textarea')[0];if(!o)o=c('DOM').scry(this.feedback,'li.UFIAddComment textarea')[0];if(o){o.focus();c('Scroll').setTop(this.root,this.root.scrollHeight);}}};l.prototype.rotateListener=function(event){'use strict';var m=event.getTarget();if(c('Parent').byClass(m,'rotateRight')){this.rotate('right');}else if(c('Parent').byClass(m,'rotateLeft'))this.rotate('left');};l.prototype.stageClickListener=function(event){'use strict';var m=event.getTarget(),n=c('CSS').hasClass(m,'faceBox'),o=c('Parent').byClass(m,'fbPhotoTagApprovalBox')||c('Parent').byClass(m,'faceboxSuggestion')||c('Parent').byClass(m,'videoStage')||c('Parent').byClass(m,'tag')||c('Parent').byClass(m,'typeaheadWrapper')||c('Parent').byClass(m,'photoTagLink')||c('Parent').byClass(m,'photoTagTypeahead')||c('Parent').byClass(m,'fbPhotoViewLarger')||n;if(n){if(!this.showingTypeaheadSuggestions){var p=this.getTagger();p.updateWithSuggestions();setTimeout(function(){c('DOM').find(p.tagger,'input.textInput').focus();}.bind(this),0);}this.showingTypeaheadSuggestions=!this.showingTypeaheadSuggestions;}if(o){return true;}else this.goNav(event);};l.prototype.rotate=function(m){'use strict';var n=this.stream.getCursor();if(this.getVideoOnStage()){var o=m=='left'?270:90;c('Assert').isTruthy(this.videoRotateURI,"Video rotate URI not set.");c('Bootloader').loadModules(["VideoRotate"],function(q){new q(n,this.videoRotateURI).motionRotate(o);}.bind(this),'PhotoPermalink');return;}var p=babelHelpers['extends']({fbid:n,opaquecursor:this.stream.getOpaqueCursor(n),cs_ver:c('PhotosConst').VIEWER_PERMALINK},this.stream.getPhotoSetQuery());p[m]=1;this.setLoadingState(l.STATE_IMAGE_DATA,true);c('CSS').hide(this.image);new (c('AsyncRequest'))('/ajax/photos/photo/rotate/').setMethod('POST').setAllowCrossPageTransition(true).setReadOnly(false).setData(p).setFinallyHandler(this.rotateComplete.bind(this,n)).send();};l.prototype.rotateComplete=function(m,n){'use strict';if(m==this.stream.getCursor()){this.setLoadingState(l.STATE_IMAGE_DATA,false);this.switchImage(this.stream.getCurrentImageData().url);this.swapData();}};l.prototype.mouseOutListener=function(event){'use strict';var m=event.getTarget(),n=event.getRelatedTarget(),o=c('Parent').byClass(m,'stageActions'),p=c('Parent').byClass(m,'stageWrapper'),q=c('Parent').byClass(n,'stageActions'),r=c('Parent').byClass(n,'stageWrapper'),s=c('Parent').byClass(n,'uiContextualLayer'),t=!r&&!s&&p&&!q||o&&!r;if(t)this.unhiliteAllTags(true);};l.prototype.mouseMoveListener=function(event){'use strict';var m=event.getTarget(),n=c('Parent').byClass(m,'faceboxSuggestion')||c('Parent').byClass(m,'tagPointer')||c('Parent').byClass(m,'typeaheadWrapper')||c('Parent').byClass(m,'photoTagTypeahead')||c('Parent').byClass(m,'arrow');if(!c('Parent').byClass(m,'stageActions')&&!c('Parent').byClass(m,'stageWrapper')||n)return;this.hiliteTagsOnMouseMove(event);};l.prototype.unhiliteAllTags=function(m,event){'use strict';c('DOM').scry(this.stageWrapper,'div.tagsWrapper div.hover').forEach(function(o){if(m&&c('CSS').hasClass(o,'tagBoxPending'))return;c('CSS').removeClass(o,'hover');});if(m)return;c('DOM').scry(this.stageWrapper,'div.tagsWrapper div.otherActive').forEach(function(o){c('CSS').removeClass(o,'otherActive');});if(this.unhiliteTimer!==null){clearTimeout(this.unhiliteTimer);this.unhiliteTimer=null;}this.hilitedTag=null;this.showingTypeaheadSuggestions=false;if(!c('CSS').hasClass(this.root,'taggingMode')){var n=this.getTagger();if(n){n.hideTagger();n.setCurrentFacebox(null);}}};l.prototype.getTagger=function(){'use strict';return c('PhotoTagger').getInstance(c('PhotosConst').VIEWER_PERMALINK);};l.prototype.switchHilitedTags=function(m,n){'use strict';this.unhiliteAllTags();this.hiliteAllBoxes();var o=c('ge')(m);if(o){this.hilitedTag=m;if(!c('CSS').hasClass(this.root,'taggingMode')&&c('PhotosUtils').isFacebox(this.hilitedTag)){var p=this.getTagger();if(p){c('CSS').addClass(o,'hover');var q=p.getFacebox(m);p.setCurrentFacebox(q);if(q)p.addTagFromFacebox(q);}}else c('CSS').addClass(o,'hover');if(c('CSS').hasClass(o,'tagBoxPending')&&!c('CSS').hasClass(o,'showPendingTagName')&&n===true){c('DOM').scry(this.stageWrapper,'div.tagsWrapper div.showPendingTagName').forEach(function(r){c('CSS').removeClass(r,'showPendingTagName');});c('CSS').addClass(o,'showPendingTagName');}}};l.prototype.hiliteTagsOnMouseMove=function(event){'use strict';if(!this.stream.getCurrentExtraData()||this.getVideoOnStage())return;if(this.unhiliteTimer!==null)return;var m=event.getTarget();if(c('Parent').byClass(m,'fbPhotoPageTagApproval')||c('Parent').byClass(m,'tagPointer'))return;var n=c('Parent').byClass(m,'tagBoxPending'),o=false;if(this.hilitedTag){var p=c('ge')(this.hilitedTag);o=p&&c('CSS').hasClass(p,'tagBoxPending');}var q=!this.hilitedTag&&n||!o&&n;if(q){this.switchHilitedTags(n.id);return;}if(n&&n.id==this.hilitedTag)return;var r=250,s=c('PhotosUtils').absoluteToNormalizedPosition(this.image,c('Vector').getEventPosition(event)),t=c('PhotosUtils').getNearestBox(this.stream.getCurrentExtraData().tagRects,s);if(!t){if(!o){this.unhiliteAllTags();this.reHilitePendingTag();}return;}var u=null;if(o){var v={};v[this.hilitedTag]=this.stream.getCurrentExtraData().tagRects[this.hilitedTag];u=c('PhotosUtils').getNearestBox(v,s);}if(u!==null&&o)return;if(this.hilitedTag!=t)if(o){this.unhiliteTimer=setTimeout(this.unhiliteAllTags.bind(this,false,event),r);}else{if(this._showHover&&!this._seenTags[t]){this._seenTags[t]=true;c('PhotoTagSearchPivotLogger').logPivotImpression('permalnk','pivot_impression',t);}this.switchHilitedTags(t);}};l.prototype.updateTagBox=function(m,n){'use strict';this.unhiliteAllTags();var o=c('ge')(m);if(!o)return;c('CSS').addClass(o,'tagBox');c('CSS').addClass(o,'tagBoxPendingResponse');c('CSS').removeClass(o,'tagBoxPending');c('CSS').hide(c('DOM').find(o,'span.tagForm'));if(n){c('CSS').show(c('DOM').find(o,'span.tagApproved'));}else c('CSS').show(c('DOM').find(o,'span.tagIgnored'));};l.prototype.reset=function(){'use strict';while(this.pageHandlers&&this.pageHandlers.length)this.pageHandlers.pop().remove();if(this.imageLoadListener){this.imageLoadListener.remove();this.imageLoadListener=null;}c('KeyEventController').getInstance().resetHandlers();};l.prototype.onHiliteTag=function(m,n){'use strict';if(n.version!=c('PhotosConst').VIEWER_PERMALINK)return;var o=n.tag;if(o){this.switchHilitedTags(o,true);}else this.unhiliteAllTags();};l.prototype.onUpdateTagBox=function(m,n){'use strict';if(n.version==c('PhotosConst').VIEWER_PERMALINK)this.updateTagBox(n.id,n.approve);};l.prototype.setHasLocation=function(m){'use strict';c('CSS').conditionClass(this.root,'hasLocation',m);};l.getInstance=function(){'use strict';if(!l._instance)l._instance=new l();return l._instance;};l.addPhotoFbids=function(m,n,o){'use strict';l.getInstance().addPhotoFbids(m,n,o);};l.setReachedLeftEnd=function(){'use strict';l.getInstance().setReachedLeftEnd();};l.setReachedRightEnd=function(){'use strict';l.getInstance().setReachedRightEnd();};l.attachTagger=function(m){'use strict';l.getInstance().attachTagger(m);};l.disableAjaxPipeForVideo=function(){'use strict';var m=l.getInstance();if(m.stream)m.stream.setUseAjaxPipe(false);};l.init=function(m){'use strict';l.getInstance().init(m||{});};l.recacheData=function(m){'use strict';l.getInstance().recacheData(m);};l.saveTagsFromPayload=function(m){'use strict';l.getInstance().saveTagsFromPayload(m);};l.saveTagsFromPayloadDelayed=function(m){'use strict';setTimeout(l.saveTagsFromPayload.bind(null,m),2000);};l.handleServerError=function(m,n){'use strict';l.getInstance().handleServerError(m,n);};l.setHasLocation=function(m){'use strict';l.getInstance().setHasLocation(m);};l.storeFromData=function(m){'use strict';l.getInstance().storeFromData(m);};l.swapData=function(){'use strict';l.getInstance().swapData();};l.updateTotalCount=function(m,n,o){'use strict';l.getInstance().updateTotalCount(m,n,o);};l.setVideoRotateURI=function(m){'use strict';l.getInstance().videoRotateURI=m;};Object.assign(l,{STATE_ERROR:'error',STATE_HTML:'html',STATE_IMAGE_DATA:'image',MIN_TAG_DISTANCE:80,_instance:null,touchMarkup:c('emptyFunction')});f.exports=l;}),null);
  __d('PhotoTags',['csx','cx','Arbiter','CSS','DOM','Event','Parent','PhotosConst','ge'],(function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();function j(k,l,m){'use strict';this.tagTargets=k;this.tagBox=l;this.version=m||c('PhotosConst').VIEWER_PERMALINK;this.handlers=[];this.tagTargets.forEach(function(n){this.handlers.push(c('Event').listen(n,{mouseover:this.showTag.bind(this),mouseout:this.hideTags.bind(this)}));}.bind(this));this.subscriptions=[];if(this.version==c('PhotosConst').VIEWER_SNOWLIFT)this.subscriptions.push(c('Arbiter').subscribe("PhotoSnowlift.PAGE",this.hideTags.bind(this)));}j.prototype.showTag=function(event){'use strict';var k=event.getTarget(),l=c('CSS').hasClass(k,'taggee'),m=c('CSS').matchesSelector(k,"._54ru"),n=null,o=null;if(l){n=k.getAttribute('data-tag');o=k.getAttribute('data-tagtype');}else if(m){var p=c('Parent').byTag(k,'a');n=p&&p.getAttribute('data-tag');}if(!n){k=c('Parent').byClass(k,'taggee');if(k){n=k.getAttribute('data-tag');o=k.getAttribute('data-tagtype');}}var q=this.version==c('PhotosConst').VIEWER_PERMALINK?'perm:tag:'+n:'tag:'+n,r=q&&c('ge')(q);if(r){if(o==='product'){c('CSS').addClass(r,'hover');}else c('CSS').addClass(r,'showTag');c('CSS').addClass(this.tagBox,'showingTag');}};j.prototype.hideTags=function(){'use strict';c('CSS').removeClass(this.tagBox,'showingTag');c('DOM').scry(this.tagBox,'div.showTag').forEach(function(k){c('CSS').removeClass(k,'showTag');});c('DOM').scry(this.tagBox,'div.hover').forEach(function(k){c('CSS').removeClass(k,'hover');});};j.prototype.destroy=function(){'use strict';for(var k in this.handlers)this.handlers[k].remove();this.subscriptions.forEach(c('Arbiter').unsubscribe.bind(c('Arbiter')));};f.exports=j;}),null);
  __d('legacy:PhotoTags',['PhotoTags'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();b.PhotoTags=c('PhotoTags');}),3);