YUI.add("group-menu-view",(function(e){"use strict";e.namespace("Views")[this.name]=e.Base.create("group-menu-view",e.Views["avatar-menu-view"],[],{langBundles:this.details.langBundles,initializer:function(e){return this.constructor.superclass.initializer.call(this,e),this.menuType="group",this.excludeSelectors=[".large",".no-menu"].concat(this.excludeSelectors||[]),this.avatarSelector=".avatar.group",this.cardSubviewName="group-card-view",this},getParams:function(e){var i={appContext:this.appContext,isActiveViewAgnostic:!0};return i.groupId=e.getData("group-nsid"),i.signature=i.groupId,i}})}),"@VERSION@",{requires:["flickr-promise","flickr-view","fluid-droparound-view","group-card-view","avatar-menu-view"],langBundles:["common"]});YUI.add("hermes-template-partner-account-banner",(function(e,a){var r=e.Template.Handlebars.revive({compiler:[8,">= 4.3.0"],main:function(e,a,r,n,t){return'<div class="banner-container">\n\t<p>Dear Flickr Member: due to partnership changes with AT&T, you need to update your primary email address. <a class="learn-more">Learn more</a></p>\n</div>\n'},useData:!0}),n={};e.Array.each([],(function(a){var r=e.Template.get("hermes/"+a);r&&(n[a]=r)})),e.Template.register("hermes/partner-account-banner",(function(a,t){return(t=t||{}).partials=t.partials?e.merge(n,t.partials):n,r(a,t)}))}),"@VERSION@",{requires:["template-base","handlebars-base"]});YUI.add("hermes-template-partner-account-modal",(function(e,t){var a=e.Template.Handlebars.revive({compiler:[8,">= 4.3.0"],main:function(e,t,a,n,r){return'<div>\n\tWith the launch of the new att.net homepage on June 30, 2017, you will need to change the primary email address you use to sign into your Flickr/Yahoo account. Your data and photos on Flickr will not be deleted or modified in any way. You will need to complete this process before June 30, 2017 in order to continue accessing your Flickr account.\n\t<br/><br/>\n\t<a href="/partner-account">Click here to learn more about these changes.</a>\n\t<br/><br/>\n\t<a href="/account/transfer">\n\t\t<button class="update-email">Update your email address</button>\n\t</a>\n</div>\n'},useData:!0}),n={};e.Array.each([],(function(t){var a=e.Template.get("hermes/"+t);a&&(n[t]=a)})),e.Template.register("hermes/partner-account-modal",(function(t,r){return(r=r||{}).partials=r.partials?e.merge(n,r.partials):n,a(t,r)}))}),"@VERSION@",{requires:["template-base","handlebars-base"]});YUI.add("partner-account-banner-view",(function(e,t){e.FlickrView.create(this.name,e.FlickrView,[],{buildContainer:function(){return this.setContainerWithTemplate("partner-account-banner"),this},activate:function(){var n=this.get("container").one(".learn-more");return n&&this.registerEventHandler(n.on("click",this.openModal.bind(this))),e.AnchorRepositioner.addOffset(t,this.get("container")),this},openModal:function(){new e.Views.FluidModal({title:"The way you sign in to Flickr is changing",htmlMessage:this.templates("partner-account-modal")({}),appContext:this.appContext,dismissOnOverlayClick:!0,dismissOnActionClick:!0,showCancelX:!0,showCancelButton:!1,showActionButton:!1,showFooter:!1}).show()},destructor:function(){e.AnchorRepositioner.removeOffset(t)}})}),"@VERSION@",{requires:["flickr-view","hermes-template-partner-account-banner","hermes-template-partner-account-modal"]});YUI.add("hermes-template-flickr-chat-center",(function(n,l){var e=n.Template.Handlebars.revive({1:function(n,l,e,t,a){var c,r=null!=l?l:n.nullContext||{},i=n.hooks.helperMissing,o="function",s=n.escapeExpression,u=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return'\t\t\t<div class="recipient" data-nsid="'+s(typeof(c=null!=(c=u(e,"n")||(null!=l?u(l,"n"):l))?c:i)===o?c.call(r,{name:"n",hash:{},data:a,loc:{start:{line:6,column:37},end:{line:6,column:42}}}):c)+'">\n\t\t\t\t<img src="https://farm'+s(typeof(c=null!=(c=u(e,"f")||(null!=l?u(l,"f"):l))?c:i)===o?c.call(r,{name:"f",hash:{},data:a,loc:{start:{line:7,column:26},end:{line:7,column:31}}}):c)+".static.flickr.com/"+s(typeof(c=null!=(c=u(e,"s")||(null!=l?u(l,"s"):l))?c:i)===o?c.call(r,{name:"s",hash:{},data:a,loc:{start:{line:7,column:50},end:{line:7,column:55}}}):c)+"/buddyicons/"+s(typeof(c=null!=(c=u(e,"n")||(null!=l?u(l,"n"):l))?c:i)===o?c.call(r,{name:"n",hash:{},data:a,loc:{start:{line:7,column:67},end:{line:7,column:72}}}):c)+'.jpg" width="24" height="24" class="BuddyIconX fade-in" nsid="'+s(typeof(c=null!=(c=u(e,"n")||(null!=l?u(l,"n"):l))?c:i)===o?c.call(r,{name:"n",hash:{},data:a,loc:{start:{line:7,column:134},end:{line:7,column:139}}}):c)+'">\n\t\t\t\t'+s(typeof(c=null!=(c=u(e,"a")||(null!=l?u(l,"a"):l))?c:i)===o?c.call(r,{name:"a",hash:{},data:a,loc:{start:{line:8,column:4},end:{line:8,column:9}}}):c)+" ("+s(typeof(c=null!=(c=u(e,"r")||(null!=l?u(l,"r"):l))?c:i)===o?c.call(r,{name:"r",hash:{},data:a,loc:{start:{line:8,column:11},end:{line:8,column:16}}}):c)+")</div>\n"},compiler:[8,">= 4.3.0"],main:function(n,l,e,t,a){var c,r=n.lookupProperty||function(n,l){if(Object.prototype.hasOwnProperty.call(n,l))return n[l]};return'<div class="flickr-chat-center">\n\t<div class="header">Flickr Mail - '+n.escapeExpression(n.lambda(null!=(c=null!=l?r(l,"recipients"):l)?r(c,"length"):c,l))+' contacts</div>\n\t<div class="toggle">-</div>\n\t<div class="recipient-list">\n'+(null!=(c=r(e,"each").call(null!=l?l:n.nullContext||{},null!=l?r(l,"recipients"):l,{name:"each",hash:{},fn:n.program(1,a,0),inverse:n.noop,data:a,loc:{start:{line:5,column:2},end:{line:9,column:11}}}))?c:"")+"\t</div>\n</div>\n"},useData:!0}),t={};n.Array.each([],(function(l){var e=n.Template.get("hermes/"+l);e&&(t[l]=e)})),n.Template.register("hermes/flickr-chat-center",(function(l,a){return(a=a||{}).partials=a.partials?n.merge(t,a.partials):t,e(l,a)}))}),"@VERSION@",{requires:["template-base","handlebars-base"]});YUI.add("flickr-chat-center-view",(function(t){t.namespace("Views")[this.name]=t.Base.create("flickr-chat-center-view",t.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(t){return this.maximized=!0,this},loadState:function(){return this.appContext.getModel("person-models",{id:this.appContext.getViewer().nsid}).then((t=>{t.getValue("contactsCacheUrl")&&this.parseContactsData(t.getValue("contactsCacheUrl"))}))},parseContactsData:function(e){var n={success:function(t,e,i){if("-1"!==e.responseText&&""!==e.responseText){var c,s=e.responseText.split("")[1];this.contacts=s.split("");for(var a=this,o=0,r=this.contacts.length;o<r;o++)0!==(c=a.contacts[o].split("")).length&&(a.contacts[o]={},a.contacts[o].n=c[0],a.contacts[o].e=c[1],a.contacts[o].u=c[2],a.contacts[o].r=c[3],a.contacts[o].s=c[4],a.contacts[o].f=c[5],a.contacts[o].a=c[6],a.contacts[o].d=c[7],a.contacts[o].y=c[8],a.contacts[o].c=c[9],a.contacts[o].us=a.contacts[o].u,a.contacts[o].rs=a.contacts[o].r,a.contacts[o][0]=a.contacts[o].u);a.contacts=a.contacts.sort(((t,e)=>t.a.localeCompare(e.a))),this.renderContactList()}else this.allowNoContacts?this.contacts=[]:n.failure()}.bind(this),failure:function(t){console.error("error",t)}};e?t.io(e,{method:"GET",on:n}):n.failure()},buildContainer:function(t){return this.setContainerWithTemplate("flickr-chat-center",{recipients:t||[]}),this},renderContactList:function(){console.log(this.contacts),this.buildContainer(this.contacts)},activate:function(){var e=this.get("container"),n=e.one(".toggle");return this.on("contactsReceived",(function(t){this.setContainerWithTemplate("flickr-chat-center",{recipients:this.get("recipients")})})),e.delegate("click",function(e){var n=e.target.getAttribute("data-nsid");this.appContext.getView("flickr-chat-view",{nsid:n,externalBinding:!0}).then((function(e){e.loadState().then((function(){e.buildContainer(),e.makeOffset(),t.one("body").append(e.get("container")),e.activate(),e.on("hide",(function(){e.unblurWindow(),e.destroy()})),e.blurWindow()}))}))}.bind(this),".recipient"),n.on("click",function(){var t;this.maximized?(t=e.get("clientHeight"),e.setStyle("bottom",40-t),n.setHTML("+")):(e.setStyle("bottom",0),n.setHTML("-")),this.maximized=!this.maximized}.bind(this)),this}})}),"@VERSION@",{requires:["flickr-view","person-models","hermes-template-flickr-chat-center"]});YUI.add("hermes-template-featured-toast",(function(e,r){var t=e.Template.Handlebars.revive({compiler:[8,">= 4.3.0"],main:function(e,r,t,a,n){var l=e.lookupProperty||function(e,r){if(Object.prototype.hasOwnProperty.call(e,r))return e[r]};return'<div class="featured-toast">\n\t'+e.escapeExpression((l(t,"renderTrustedMarkup")||r&&l(r,"renderTrustedMarkup")||e.hooks.helperMissing).call(null!=r?r:e.nullContext||{},null!=r?l(r,"htmlContent"):r,{name:"renderTrustedMarkup",hash:{},data:n,loc:{start:{line:2,column:1},end:{line:2,column:36}}}))+"\n</div>\n"},useData:!0}),a={};e.Array.each([],(function(r){var t=e.Template.get("hermes/"+r);t&&(a[r]=t)})),e.Template.register("hermes/featured-toast",(function(r,n){return(n=n||{}).partials=n.partials?e.merge(a,n.partials):a,t(r,n)}))}),"@VERSION@",{requires:["template-base","handlebars-base"]});