YUI.add("murmurhash",(function(h){h.murmurhash=function(h,r){var a,e,t,c,o,d,n,u;for(a=3&h.length,e=h.length-a,t=r,o=3432918353,d=461845907,u=0;u<e;)n=255&h.charCodeAt(u)|(255&h.charCodeAt(++u))<<8|(255&h.charCodeAt(++u))<<16|(255&h.charCodeAt(++u))<<24,++u,t=27492+(65535&(c=5*(65535&(t=(t^=n=(65535&(n=(n=(65535&n)*o+(((n>>>16)*o&65535)<<16)&4294967295)<<15|n>>>17))*d+(((n>>>16)*d&65535)<<16)&4294967295)<<13|t>>>19))+((5*(t>>>16)&65535)<<16)&4294967295))+((58964+(c>>>16)&65535)<<16);switch(n=0,a){case 3:n^=(255&h.charCodeAt(u+2))<<16;case 2:n^=(255&h.charCodeAt(u+1))<<8;case 1:t^=n=(65535&(n=(n=(65535&(n^=255&h.charCodeAt(u)))*o+(((n>>>16)*o&65535)<<16)&4294967295)<<15|n>>>17))*d+(((n>>>16)*d&65535)<<16)&4294967295}return t^=h.length,t=2246822507*(65535&(t^=t>>>16))+((2246822507*(t>>>16)&65535)<<16)&4294967295,t=3266489909*(65535&(t^=t>>>13))+((3266489909*(t>>>16)&65535)<<16)&4294967295,(t^=t>>>16)>>>0}}),"@VERSION@");YUI.add("moola-manager",(function(e,t){"use strict";var i=require("hermes-core/flog")(t);class n{constructor(t,n){this.initialAdShown=!1,this.adCouldBeShown=!1,this.dwellTime=0,this.contextOwnerIsPro=!1,this.origin={},this.context={},this.timeoutID=0,this.adCallsCounter=0,this.currentlyShowingAd=!1,this.adPosition=1,this.viewerCanSeeAds=null,this.infolinksScriptSource=e.config.flickr.moola.vendors.infolinks.scriptSource,this.infolinksPid=e.config.flickr.moola.vendors.infolinks.pid,this.infolinksWsid=e.config.flickr.moola.vendors.infolinks.wsid,this.infolinksIdName=e.config.flickr.moola.vendors.infolinks.idName,this.infolinksClassName=e.config.flickr.moola.vendors.infolinks.className,t&&n?(this.referrer=t,this.appContext=n):i.error("Attempt to instantiate moola-manager without appContext/referrer")}getAdsSlotsOnPage(){return document.querySelectorAll(".moola-container")}setAdViewStatus(){this.viewerCanSeeAds=!(this.appContext.forceServerRender||this.appContext.flipper.isFlipped("moola_killswitch")||this.appContext.getViewer().signedIn&&this.appContext.getViewer().isPro)}markAdAsSeen(){this.initialAdShown=!0,this.resetPhotoAdsCounter(),this.adCallsCounter--}adIsUnloading(){clearTimeout(this.timeoutID),this.currentlyShowingAd=!1}adIsLoading(){this.currentlyShowingAd=!0}isEnabled(){return null===this.viewerCanSeeAds&&this.setAdViewStatus(),this.viewerCanSeeAds}adNext(){var t,i,n,o,s,r;return!(YUI.Env.isServer||!this.context.current)&&(this.adPosition++,t=this.isEnabled(),i=this.adCouldBeShown,o=this.enoughPhotoViewsAccrued(),n=this.contextOwnerIsPro,s=this.adjacentPhotosAreAdFriendly(),r=this.referrerIsDenied(),t&&i&&o&&!n&&s&&!r&&e.rapidTracker.beacon(this.name,"adSlotAvailable"),t&&i&&!n&&o&&s&&!r)}resetPhotoAdsCounter(){this.appContext.cookieCatcher.setCookieIfAllowed("adCounter",0,{path:"/",domain:"flickr.com"})}enoughPhotoViewsAccrued(){var t=e.Cookie.get("adCounter",Number);return(t=t||0)>=this.getThreshold()}adjacentPhotosAreAdFriendly(){return"next"===this.origin.arrow?this.context.next.adFriendly&&this.context.current.adFriendly:this.context.previous.adFriendly&&this.context.current.adFriendly}referrerIsDenied(){var e=[];return this.appContext.getViewer().signedIn||e.push("/"),e.indexOf(this.appContext.getPreviousURL())>-1}setAdCouldBeShown(e,t,n){void 0===e&&(e=!1),t&&n?(this.origin.arrow=t,this.origin.url=n):e&&(i.info("Attempt to schedule an ad without setting nav direction or URL"),e=!1),this.adCouldBeShown=e}updateContext(t){var i;this.contextOwnerIsPro=!1,(-1!==e.Array.indexOf(["photostream-models","set-models","photoList-models","feed-batch-models"],t.type)||/^\/search\/\?.+=[0-9]+@N[0-9]{2}.*/.test(t.entryURL))&&(i=t.current.getValue("owner"))&&(this.contextOwnerIsPro=i.getValue("isPro")),this.context.previous=this.extractKeyDataFromPhotoModel(t.prev),this.context.current=this.extractKeyDataFromPhotoModel(t.current),this.context.next=this.extractKeyDataFromPhotoModel(t.next)}getThreshold(){var t;try{t=this.initialAdShown?e.config.flickr.moola.threshold[this.referrer].subsequent:e.config.flickr.moola.threshold[this.referrer].initial}catch(e){i.info("There is no matching value for referrer in the ad/referrer config",{referrer:this.referrer,err:e}),t=100}return t}updatePhotoAdsCounter(){var t=e.Cookie.get("adCounter",Number);return t=t||0,this.appContext.cookieCatcher.setCookieIfAllowed("adCounter",++t,{path:"/",domain:"flickr.com"}),t}extractKeyDataFromPhotoModel(e){var t={};return e&&(t={adFriendly:0===e.getValue("safetyLevel"),url:this.getBackgroundImage(e),link:e.getValue("url")}),t}getBackgroundImage(e){var t,i,n,o=40;return t={width:101*(i=this.appContext.getViewer().getPixelRatio()),height:o*i},n={cropToFit:!0,includeSizes:["sq","t","q","s","n"]},e.getSizeToFit(t,n).url}handleInfolinks(e,t){var i=this.appContext.viewportData.getWidth();t||i<735||this.appContext.getViewer().signedIn||this.appContext.getViewer().isPro||e?this.stopInfolinksAdUnit():this.injectInfolinksAdUnit()}injectInfolinksAdUnit(){if(this.infolinksActiveOnPage()||this.infolinksScriptOnPage())window.postMessage(JSON.stringify({message:"RESTORE",apiK:"lJKHQWQlPm"}),"*");else{var t=document.createElement("script");window.infolinks_pid=this.infolinksPid,window.infolinks_wsid=this.infolinksWsid,t.src=this.infolinksScriptSource,t.type="text/javascript",t.classList.add(this.infolinksClassName),t.async=!0,document.body.appendChild(t)}e.Snowplough.sendStructuredEvent({category:"ad",action:"ad_request",label:"infolinks",property:"sticky"}),this.oneSecondTimer&&clearTimeout(this.oneSecondTimer),this.oneSecondTimer=setTimeout((function(){e.Snowplough.sendStructuredEvent({category:"ad",action:"ad_request_timer",label:"infolinks",property:"sticky",value:1})}),1e3),this.twoSecondsTimer&&clearTimeout(this.twoSecondsTimer),this.twoSecondsTimer=setTimeout((function(){e.Snowplough.sendStructuredEvent({category:"ad",action:"ad_request_timer",label:"infolinks",property:"sticky",value:2})}),2e3)}injectStickyAdUnit(){}destroyStickyAdUnit(){}infolinksActiveOnPage(){var e="#"+this.infolinksIdName;return!!document.querySelector(e)}infolinksScriptOnPage(){var e="."+this.infolinksClassName;return!!document.querySelector(e)}stopInfolinksAdUnit(){this.infolinksActiveOnPage()&&(window.postMessage(JSON.stringify({message:"DESTROY",apiK:"lJKHQWQlPm"}),"*"),this.oneSecondTimer&&clearTimeout(this.oneSecondTimer),this.twoSecondsTimer&&clearTimeout(this.twoSecondsTimer))}canShowAd(e){var t=!this.appContext.flipper.isFlipped("moola-killswitch"),i=0===e.getValue("safetyLevel"),n=e.getValue("owner").getValue("isPro"),o=this.appContext.getViewer();return!!t&&(!n&&(!(!n&&!i)&&(!o.signedIn||!o.isPro)))}getHashedAdValue(t){var i=e.config.win.location.href+(e.config.flickr.request?e.config.flickr.request.id:window.reqId)+t+(new Date).getTime().toString()+this.getRandomInteger();return e.murmurhash(i,i+"there is no need to be so salty")}getRandomInteger(){var e=1e11;return Math.floor(9e11*Math.random()+e)}getAdPositioning(e){var t,i,n=e.one(".moola-container");return n&&(i=(t=n.getDOMNode().getBoundingClientRect()).top.toString()+t.right.toString()+t.bottom.toString()+t.left.toString()),i}refreshAdUnit(){this.isEnabled()&&window.asc&&asc.cmd.push((function(){asc.refresh()}))}processAdsOnPage(){this.isEnabled()}destroyAdUnitsOnPage(){}detectAdBlocker(){var e=document.createElement("div"),t=document.querySelector("html");e.className="textads banner-ads banner_ads ad-unit ad-zone ad-space adsbox",e.style.height="1px",document.body.appendChild(e),e.offsetHeight||t.classList.add("user-moola-block"),e.remove()}getAdBlockStatus(){return document.querySelector("html").classList.contains("user-moola-block")}}e.namespace("AdManager"),e.AdManager=n,e.namespace("AscendeumAdManager"),e.AscendeumAdManager=class extends n{constructor(...e){super(...e)}processAdsOnPage(){super.processAdsOnPage(),window.asc&&asc.cmd.push((function(){asc.processAdsOnPage()}))}destroyAdUnitsOnPage(){super.destroyAdUnitsOnPage(),window.asc&&asc.cmd.push((function(){asc.destroy()}))}},e.namespace("NextMilleniumAdManager"),e.NextMilleniumAdManager=class extends n{constructor(...t){super(...t),this.stickyAdUnit=e.config.flickr.moola.positions.photopage[1].ad_unit_desktop.nm}processAdsOnPage(){if(super.processAdsOnPage(),window.paGlobal){this.getAdsSlotsOnPage().forEach((t=>{let n=t.dataset.nmactivated;t.dataset.nmAdunit&&!n&&t.dataset.nmAdunit!==this.stickyAdUnit?(window.paGlobal.directInject(t.dataset.nmAdunit,t),t.setAttribute("data-nmactivated",!0),e.Snowplough.sendStructuredEvent({category:"ad",action:"ad_request",label:"nm",value:t.dataset.nmAdunit}),i.info("Next Millenium: Injected ad "+t.dataset.nmAdunit)):i.info("Next Millenium Didnt inject ad "+t.dataset.nmAdunit+" into element "+t.id)}))}}destroyAdUnitsOnPage(){if(super.destroyAdUnitsOnPage(),window.paGlobal){this.getAdsSlotsOnPage().forEach((function(e){e.dataset.nmId&&(window.paGlobal.resetUnit(e.dataset.nmId,e),i.info("Next Millenium: Reset ad "+e.dataset.nmId))}))}}injectStickyAdUnit(){top&&top.callUnitMan&&(top.callUnitMan(this.stickyAdUnit),e.Snowplough.sendStructuredEvent({category:"ad",action:"ad_request",label:"nm",value:this.stickyAdUnit}),i.info("Next Millenium: Manually called ad "+this.stickyAdUnit))}destroyStickyAdUnit(e){window.paGlobal&&(paGlobal.resetPl(this.stickyAdUnit),i.info("Next Millenium: Manually reset ad "+this.stickyAdUnit))}},e.namespace("TestAdManager"),e.TestAdManager=class extends n{constructor(...e){super(...e)}processAdsOnPage(){super.processAdsOnPage(),this.getAdsSlotsOnPage().forEach((function(e){e.style="display: flex;justify-content: center;align-items: center;height: 100%;",e.innerHTML='<div style="box-sizing: border-box; background-color: #ff0084; font-size: 20px; padding: 20px; display: flex; justify-content: center; align-items: center; color:white;width: 100%;"> Ad goes here</div>',i.info("Test Ads: Injected test ad")}))}}}),"@VERSION@",{requires:["cookie","io-base","json-parse","murmurhash","url"],optionalRequires:["hermes-core"]});YUI.add("viewport-data",(function(t){"use strict";var i="vp",e=function(e){var o,n,r,h=this;h.appContext=e,(o=e.getCookie(i))&&((n=o.split(",")).length>4?(this.containerWidths=n.slice(4),this.containerWidths=this.containerWidths.map((function(t){return{name:(r=t.split(":"))[0],width:r[1]}}))):this.containerWidths=[]),YUI.Env.isServer?o?(this.viewport={width:parseInt(n[0],10),height:parseInt(n[1],10)},this.density=n[2]?parseFloat(n[2]):1,this.scrollbarWidth=n[3]?parseInt(n[3],10):16):(this.viewport={width:0,height:0},this.density=1,this.scrollbarWidth=16,this.containerWidths=[]):(t.config.win&&(h.density=t.config.win.devicePixelRatio||1,h.scrollbarWidth=t.OverflowHelper.detectScrollbarSize(t.one("body"))),h.setCookieWithCurrentViewportRegion(),h.containerWidths||(h.containerWidths=[]),t.globalEvents.subscribe("window:resize",(function(t){h.setCookieWithCurrentViewportRegion()})))};e.VIEWPORT_COOKIE_NAME=i,e.MAX_NUM_CONTAINER_WIDTHS=20,e.prototype.setCookie=function(){var e,o;!this.viewport.width||this.viewport.width<0||!this.viewport.height||this.viewport.height<0||(e=this.viewport.width+","+this.viewport.height+","+this.density+","+this.scrollbarWidth,t.Lang.isArray(this.containerWidths)&&(o=this.containerWidths.reduce((function(t,i,e,o){return t+=i.name+":"+i.width,e<o.length-1&&(t+=","),t}),""))&&(e=e+","+o),this.appContext.setCookie({cookieName:i,cookieValue:e,path:"/",expiresMonthsFromNow:1}))},e.prototype.setCookieWithCurrentViewportRegion=function(){this.viewport=t.DOM.viewportRegion(),this.setCookie()},e.prototype.getWidth=function(){return this.viewport.width},e.prototype.getHeight=function(){return this.viewport.height},e.prototype.getDevicePixelRatio=function(){return this.density},e.prototype.getScrollbarWidth=function(){return this.scrollbarWidth},e.prototype.getCommonMobileViewportWidth=function(){return 320},e.prototype.getContainerWidth=function(t){var i=0;return this.containerWidths.some((function(e){if(e.name===t)return i=parseInt(e.width,10),!0})),i},e.prototype.setContainerWidth=function(t,i){this.containerWidths.length>=e.MAX_NUM_CONTAINER_WIDTHS&&(this.containerWidths=this.containerWidths.slice(this.containerWidths.length-e.MAX_NUM_CONTAINER_WIDTHS+1)),this.containerWidths.some((function(e){if(e.name===t)return e.width=i,!0}))||this.containerWidths.push({name:t,width:i}),this.setCookie()},t.ViewportData=e}),"@VERSION@");YUI.add("querystring-parse-simple",function(e,t){var n=e.namespace("QueryString");n.parse=function(e,t,r){t=t||"&",r=r||"=";for(var i={},s=0,o=e.split(t),u=o.length,a;s<u;s++)a=o[s].split(r),a.length>0&&(i[n.unescape(a.shift())]=n.unescape(a.join(r)));return i},n.unescape=function(e){return decodeURIComponent(e.replace(/\+/g," "))}},"3.16.0",{requires:["yui-base"]});
YUI.add("browser-support",(function(e,o){var r="Google Page Speed Insights",i=new RegExp(["UP\\.Link","UP\\.Browser","Profile\\/MIDP-","MMP\\/","NetFront","BlackBerry","Danger hiptop","Windows CE","MMP\\/","MIDP","Palm","Nokia","Symbian","iPhone","iPod","Android.+Mobile","Mobile.+Firefox","BB10.+Mobile","webOS","SAMSUNG.+Mobile Safari","SEC_.+Mobile Safari",r+".+Mobile"].join("|"),"i"),n=new RegExp([r].join("|"),"i"),t=new RegExp(["Edge"].join("|"),"i"),s=["facebot","facebook","facebookexternalhit","twitterbot","twitter","pinterest"],a=["bot","crawl","slurp","spider"],u=new RegExp(["Mediapartners-Google","AdsBot-Google","Googlebot","Google Favicon"].join("|"),"i"),c=new RegExp(["bingbot","BingPreview"].join("|"),"i"),f=/Windows NT (?:(?:4|5)\.\d|6\.(?:0|1))/i,p=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i,d="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)",l=function(e){var o;try{o=YUI.Env.parseUA(e)}catch(e){}return o&&o.userAgent?o.userAgent.toLowerCase():""},g=function(e,o){var r,i=!1;if(void 0===e||""===e)return!0;if(o)for(r in o)void 0!==o[r]&&!isNaN(o[r])&&o[r]>0&&(i=!0);return!i};e.mix(e.namespace("BrowserSupport"),{isUnsupportedBrowser:function(e){var o,r=!1;try{o=YUI.Env.parseUA(e)}catch(e){}return!g(e,o)&&(o.safari>=536||o.chrome>=20||o.gecko>=24||o.opera>=15||"android"===o.os||"ios"===o.os&&o.ios>=6||o.ie>11||(r=!0),n.test(o.userAgent)&&(r=!1),e===d||r)},isReallyUnsupportedBrowser:function(e){var o,r=!1;try{o=YUI.Env.parseUA(e)}catch(e){}return!g(e,o)&&(o.safari>=533.21||o.chrome>=13||o.gecko>=2||(e||"").indexOf("Firefox/4.0")>-1||o.opera>=12||"android"===o.os||"ios"===o.os&&o.ios>=4||o.ie>=9||(r=!0),e!==d&&r)},isMobileBrowser:function(e){try{var o=YUI.Env.parseUA(e);return!o.ipad&&((!o.mobile||!/Nexus 10/.test(o.userAgent))&&(!!o.mobile||i.test(o.userAgent)))}catch(e){}return!1},isMobileOrTablet:function(e){try{var o=YUI.Env.parseUA(e);return!!o.mobile||i.test(o.userAgent)}catch(e){}return!1},isBot:function(e){var o,r=!1;return o=l(e),a.some((function(e){return o.indexOf(e)>-1&&(r=!0,!0)})),r},isSharingBot:function(e){var o,r=!1;return o=l(e),s.some((function(e){return o.indexOf(e)>-1&&(r=!0,!0)})),r},isFacebook:function(e){var o=!1;return l(e).indexOf("facebookexternalhit/1.1")>-1&&(o=!0),o},isGoogle:function(e){return u.test(l(e))},isBing:function(e){return c.test(l(e))},getOSString:function(e){var o,r="";try{o=YUI.Env.parseUA(e)}catch(e){}return e&&e.indexOf("Windows Phone")>-1?r="windows":o&&o.os&&(r=o.os.toLowerCase()),r},isWebview:function(e){return p.test(e)},isGooglePageSpeedToolMobile:function(e){return new RegExp(r+".+Mobile").test(e)},isGooglePageSpeedToolDesktop:function(e){return new RegExp(r).test(e)},isEdge:function(e){return new RegExp(t).test(e)},isOldWindows:function(e){return f.test(e)}})}),"@VERSION@",{requires:[]});YUI.add("pluginhost-base",function(e,t){function r(){this._plugins={}}var n=e.Lang;r.prototype={plug:function(e,t){var r,i,s;if(n.isArray(e))for(r=0,i=e.length;r<i;r++)this.plug(e[r]);else e&&!n.isFunction(e)&&(t=e.cfg,e=e.fn),e&&e.NS&&(s=e.NS,t=t||{},t.host=this,this.hasPlugin(s)?this[s].setAttrs&&this[s].setAttrs(t):(this[s]=new e(t),this._plugins[s]=e));return this},unplug:function(e){var t=e,r=this._plugins;if(e)n.isFunction(e)&&(t=e.NS,t&&(!r[t]||r[t]!==e)&&(t=null)),t&&(this[t]&&(this[t].destroy&&this[t].destroy(),delete this[t]),r[t]&&delete r[t]);else for(t in this._plugins)this._plugins.hasOwnProperty(t)&&this.unplug(t);return this},hasPlugin:function(e){return this._plugins[e]&&this[e]},_initPlugins:function(e){this._plugins=this._plugins||{},this._initConfigPlugins&&this._initConfigPlugins(e)},_destroyPlugins:function(){this.unplug()}},e.namespace("Plugin").Host=r},"3.16.0",{requires:["yui-base"]});
YUI.add("pluginhost-config",function(e,t){var n=e.Plugin.Host,r=e.Lang;n.prototype._initConfigPlugins=function(t){var n=this._getClasses?this._getClasses():[this.constructor],r=[],i={},s,o,u,a,f;for(o=n.length-1;o>=0;o--)s=n[o],a=s._UNPLUG,a&&e.mix(i,a,!0),u=s._PLUG,u&&e.mix(r,u,!0);for(f in r)r.hasOwnProperty(f)&&(i[f]||this.plug(r[f]));t&&t.plugins&&this.plug(t.plugins)},n.plug=function(t,n,i){var s,o,u,a;if(t!==e.Base){t._PLUG=t._PLUG||{},r.isArray(n)||(i&&(n={fn:n,cfg:i}),n=[n]);for(o=0,u=n.length;o<u;o++)s=n[o],a=s.NAME||s.fn.NAME,t._PLUG[a]=s}},n.unplug=function(t,n){var i,s,o,u;if(t!==e.Base){t._UNPLUG=t._UNPLUG||{},r.isArray(n)||(n=[n]);for(s=0,o=n.length;s<o;s++)i=n[s],u=i.NAME,t._PLUG[u]?delete t._PLUG[u]:t._UNPLUG[u]=i}}},"3.16.0",{requires:["pluginhost-base"]});
YUI.add("base-pluginhost",function(e,t){var n=e.Base,r=e.Plugin.Host;e.mix(n,r,!1,null,1),n.plug=r.plug,n.unplug=r.unplug},"3.16.0",{requires:["base-base","pluginhost"]});
YUI.add("template-base",function(e,t){function n(t,n){this.defaults=n,this.engine=t||e.Template.Micro,this.engine||e.error("No template engine loaded.")}n._registry={},n.register=function(e,t){return n._registry[e]=t,t},n.get=function(e){return n._registry[e]},n.render=function(t,r,i){var s=n._registry[t],o="";return s?o=s(r,i):e.error('Unregistered template: "'+t+'"'),o},n.prototype={compile:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.compile(t,n)},precompile:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.precompile(t,n)},render:function(t,n,r){return r=r?e.merge(this.defaults,r):this.defaults,this.engine.render?this.engine.render(t,n,r):this.engine.compile(t,r)(n,r)},revive:function(t,n){return n=n?e.merge(this.defaults,n):this.defaults,this.engine.revive?this.engine.revive(t,n):t}},e.Template=e.Template?e.mix(n,e.Template):n},"3.16.0",{requires:["yui-base"]});
YUI.add("history-helper",(function(t,e){var r=require("hermes-core/flog")(e);t.HistoryHelper={setData:function(t,e,i){var o={};if("undefined"!=typeof history&&history.replaceState){void 0!==history.state&&null!==history.state&&void 0!==history.state.flickr&&(o=history.state.flickr),void 0===o[t]&&(o[t]={}),o[t][e]=i;try{history.replaceState({flickr:o},"")}catch(t){}return!0}return r.warn("Failed attempt to store history data",{namespace:t,key:e}),!1},getData:function(t,e){var r;if("undefined"!=typeof history&&void 0!==history.state&&null!==history.state&&void 0!==history.state.flickr&&void 0!==(r=history.state.flickr[t])&&void 0!==r[e])return r[e]}}}),"@VERSION@",{requires:[],optionalRequires:["hermes-core"]});YUI.add("flickr-view",(function(e,t){var i=require("hermes-core/flog")(t);e.FlickrView=e.Base.create("flickrView",e.Base,[],{viewState:null,subviews:{},subviewConfig:null,_eventHandles:null,initializer:function(e){return this.appContext=e.appContext,delete e.appContext,""===this.get("container").get("innerHTML")&&this.setContainerHTML(""),this.set("headContainer",""),this.isBuilt=!1,this.isActivated=!1,this.isErrorBuilt=!1,this.subviewsWithLoadingError={},this._params=e||{},this.isMobile=e.isMobile,this.subviews={},this._eventHandles=[],this.appContext&&!this.appContext.viewTiming&&(this.appContext.viewTiming={}),this.appContext&&(this.appContext.viewTiming[this.name]={initialize:0,loadState:0,buildContainer:0,buildHeadContainer:0,activate:0}),this},initialize:function(t){var r=this;return this.initializeStartTime=Date.now(),this.isErrorBuilt=!1,this.serverRendered=!(!t||!t.serverRendered)&&t.serverRendered,r.beforeDestroy&&(r.beforeDestroyHandler=r.before("destroy",r.beforeDestroy)),YUI.Env.isServer||this.registerEventHandler(this.appContext.flapp.after("activeViewChange",(function(e){r.normalizedActivate()}))),this.on("parentViewEvent",this.handleParentViewEvent.bind(this,this.name)),this.setupSubviews().then((function(){var e,t;if(r.isErrorBuilt){if(r.error.is404)throw r.error;throw t=new Error("Subview of "+r.name+" causing loadState error"),r.error&&(t.message+=": "+r.error.message,r.error.method&&(t.message+=", method="+r.error.method),t.message+=" | subview failure: "+r.error.fatal,r.error.wasDealbreaker&&(t.message+=" dealbreaker failed "),r.error.wasMultipleSubviews&&(t.message+=" multiple subviews failed "),t.fatal=r.error.fatal),t}if(r.loadStateTimingStart=Date.now(),!(e=r.loadState()))throw new Error("View "+r.name+" loadState function does not return a promise");return e})).then((function(){if(r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].loadState=Date.now()-r.loadStateTimingStart),YUI.Env.isServer||!r.get("container").hasClass("requiredToShowOnServer")||t&&t.wasDeferred){var e=Date.now();try{r.buildContainer()}catch(e){throw i.error("Error building",{topic:r.name,err:e}),r.fire("loadingError",{message:e.message,fatal:!0,wasDealbreaker:!0}),r.buildErrorContainer(),r.isErrorBuilt=!0,e}if(r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].buildContainer=Date.now()-e),r.get("isRootView")){r._buildFullRootViewAdditionalViewClasses();var n=r.get("rootViewAdditionalViewClasses");n&&n.length>0&&r.get("container").addClass(n.join(" "))}}r.isBuilt=!0,r.isErrorBuilt=!1,r.fire("loadingSuccess")}),(function(e){throw r.fire("loadingError",{message:e.message,fatal:e.fatal,is404:e.is404,wasMultipleSubviews:e.wasMultipleSubviews,wasDealbreaker:e.wasDealbreaker}),r.buildErrorContainer(),r.isErrorBuilt=!0,i.error("Error loading state",{topic:r.name,err:e}),e})).then((function(){var e,t;return r.isErrorBuilt||r.get("isActiveViewAgnostic")||(e=Date.now(),r._buildFullHeadMeta(),r.buildHeadContainer=Date.now()-e),YUI.Env.isServer||(r.shouldDeferSubviews&&r._setupDeferredSubviewsInitialization(),t=Date.now(),r.normalizedActivate(),r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].activate=Date.now()-t)),r.appContext&&r.appContext.viewTiming&&r.appContext.viewTiming[r.name]&&(r.appContext.viewTiming[r.name].initialize=Date.now()-r.initializeStartTime),r}),(function(e){throw YUI.Env.isServer||(r.shouldDeferSubviews&&r._setupDeferredSubviewsInitialization(),r.normalizedActivate()),e})).catch(e.PromiseCatcher(this.name))},render:function(){return this},buildHeadContainer:function(){return this.set("headContainer",""),this},_buildSubviewHeadContainers:function(){var e=[],t=this,i="<script";return Object.keys(this.subviews).forEach((function(i){-1===e.indexOf(t.subviews[i].get("headContainer"))&&e.push(t.subviews[i].get("headContainer"))})),e.sort((function(e,t){var r=e.toLowerCase().indexOf(i)>-1,n=t.toLowerCase().indexOf(i)>-1;return r&&!n?1:!r&&n?-1:0})).join("")},_buildFullHeadMeta:function(){var e;return this.buildHeadContainer(),e=(e=this.get("headContainer")).concat(this._buildSubviewHeadContainers()),this.set("headContainer",e.concat("")),this},setRootViewAdditionalViewClasses:function(){return this.set("rootViewAdditionalViewClasses",[]),this},_buildFullRootViewAdditionalViewClasses:function(){var e=[];return e=e.concat(this._buildSubviewRootViewAdditionalViewClasses()),this.set("rootViewAdditionalViewClasses",e),this},_buildSubviewRootViewAdditionalViewClasses:function(){this.setRootViewAdditionalViewClasses();var e=this.get("rootViewAdditionalViewClasses")||[],t=this;return Object.keys(this.subviews).forEach((function(i){var r=t.subviews[i]._buildSubviewRootViewAdditionalViewClasses();e=e.concat(r)})),e},_setupDeferredSubviewsInitialization:function(){setTimeout(function(){var t=e.config.win.document.body;t.scrollTop>0||t.clientHeight-50<=t.scrollHeight?this._loadDeferredSubviews():(this.deferredViewScrollListener=e.globalEvents.subscribe("window:scroll",this._loadDeferredSubviews.bind(this)),this.registerEventHandler(this.deferredViewScrollListener))}.bind(this),10)},_loadDeferredSubviews:function(){this.loadingDeferred||(this.loadingDeferred=!0,this._removeDeferredViewScrollListener(),this._recursivelyLoadDeferredSubview(0,!1))},_removeDeferredViewScrollListener:function(){this.deferredViewScrollListener&&(this.deferredViewScrollListener.detach(),this.deferredViewScrollListener=null)},_recursivelyLoadDeferredSubview:function(t,r){var n=Object.keys(this.subviewConfig||[]).filter(function(e){var t=this.subviewConfig[e];return!0!==t.disabled&&(("function"!=typeof t.disabled||!t.disabled.call(this,this._params))&&this.subviewConfig[e].canDefer)}.bind(this)),a=this;if(t<=n.length-1){var s,o=n[t],u=e.merge(this._params,this.subviewConfig[o]);u.container=null,u.wasDeferred=!0,i.log("Loading deferred view",{topic:a.name,view:o});try{s=this.appContext.getView(o,u)}catch(e){return void this._onDeferredViewLoadingError(t,r,e)}s.then((function(e){if(!e)return i.error("An error occured trying to load the deferred view.",{topic:a.name}),r?(t++,r=!1):r=!0,void a._recursivelyLoadDeferredSubview(t,r);e.initialize(u).then((function(){e.on("subviewViewEvent",(function(t){t&&t.details&&t.details.length&&a.onSubviewEvent.call(a,e.name,t.details)})),u&&u.additionalViewClasses&&u.additionalViewClasses.forEach((function(t){e.get("container").addClass(t)})),a._addDeferredViewToDOM(e),e.normalizedActivate(),t++,a._recursivelyLoadDeferredSubview(t,!1)})).catch(a._onDeferredViewLoadingError.bind(this,t,r))}))}},_onDeferredViewLoadingError:function(e,t,r){i.error("An error occured trying to initialize the deferred view",{topic:this.name,err:r}),t?(e++,t=!1):t=!0,this._recursivelyLoadDeferredSubview(e,t)},_addDeferredViewToDOM:function(e){if(e){var t=this.get("container").one("."+e.name),r=e.get("container");t&&r?t.replace(r):i.error("Could not add view to DOM in _addDeferredViewToDOM",{topic:this.name,view:e.name})}else i.error("Non-view passed to _addDeferredViewToDOM.",{topic:this.name})},attachKeyEvent:function(e,t,i){return this.registerEventHandler(this.appContext.getKeyboardManager().on(e,i||this._params.keyEventScope||"*",t.bind(this)))},setContainerHTML:function(e){var t=this;return this.get("container").setHTML(e),YUI.Env.isServer||(this.get("container").generateID(),Object.keys(this.subviews||{}).forEach((function(e,i,r){var n=t.subviews[e],a=n.get("container"),s=n.getId?n.getId():a._yuid,o=t.get("container").one("#"+s);o&&o.replace(a)}))),this},setupSubviews:function(){var t,r=this,n=[],a=[],s=[],o=this.appContext.flipper.isFlipped("enable-non-blocking-on-non-required-views"),u={};return this.subviewConfig?(Object.keys(this.subviewConfig).forEach((function(e){!0!==r.subviewConfig[e].disabled&&("function"==typeof r.subviewConfig[e].disabled&&r.subviewConfig[e].disabled.call(r,r._params)||(u[e]=r.subviewConfig[e]))})),Object.keys(u).map((function(l){t=YUI.Env.isServer?u[l].requiredToShowOnServer||u[l].requiredToShow||r.appContext.forceServerRender&&!u[l].neverShowOnServer:u[l].requiredToShowOnClient||u[l].requiredToShow;var c=e.merge(r._params,u[l]);if(!r.shouldDeferSubviews&&c.canDefer&&delete c.canDefer,r.shouldDeferSubviews&&c.canDefer)i.log("Deferring subview.",{topic:r.name,view:l}),(o?s:n).push(r.instantiateSubview(l,c).then((function(e){return e.setContainerHTML(""),e.get("container").addClass("deferred-view"),e})));else if(t){(o?a:n).push(r.instantiateSubview(l,c).then((function(e){return e.wasRequiredToShow=!0,r.setupSubview(l,c,e)})))}else{(o?s:n).push(r.instantiateSubview(l,c).then((function(t){t.wasRequiredToShow=!1,YUI.Env.isServer||e.soon((function(){r.setupSubview(l,c,t)}))})))}})).filter((function(e){return!!e})),o?(a.length?e.Promise.all(a):e.Promise.resolve()).then((function(){s.length&&!YUI.Env.isServer&&e.Promise.all(s).then((function(){r.buildContainer(),r.normalizedActivate()}))})):n.length?e.Promise.all(n):e.Promise.resolve()):e.Promise.resolve()},registerSubview:function(e,t){t||(t=e.name),this.subviews[t]=e},instantiateSubview:function(t,r){var n=this;return r.container=this.getContainer({isSubview:!0,subviewName:t,subviewParams:r}),this.appContext.getView(t,r).then(null,(function(){return i.log("getView failed to load view, retrying once more."),n.appContext.getView(t,r)})).then((function(e){return e.on("loadingError",n.handleSubviewLoadingError.bind(n)),e.on("loadingSuccess",n.handleSubviewLoadingSuccess.bind(n)),e.on("subviewViewEvent",n.handleSubviewEvent.bind(n,e.name)),n.registerSubview(e,t),e._params&&(e._params.keyEventScope=n._params.keyEventScope),e})).catch(e.PromiseCatcher(this.name))},onSubviewEvent:function(e,t){return!0},onParentViewEvent:function(e,t){return!0},handleSubviewEvent:function(e,t){var i=t&&t.details||[];!1!==this.onSubviewEvent(e,i)&&this.fire.apply(this,["subviewViewEvent"].concat(i))},handleParentViewEvent:function(e,t){var i,r=t&&t.details||[];if(!1!==this.onParentViewEvent(e,r))for(i in this.subviews)this.subviews[i].fire.apply(this.subviews[i],["parentViewEvent"].concat(r))},handleSubviewLoadingSuccess:function(e){this.subviewsWithLoadingError[e.target.name]&&delete this.subviewsWithLoadingError[e.target.name]},handleSubviewLoadingError:function(e){var t;this.subviewConfig[e.target.name].dealbreaker&&(this.hasDealbreakerSubviewLoadingError=!0),this.subviewsWithLoadingError[e.target.name]=e.details[0],this.isErrorBuilt||(t=Object.keys(this.subviewsWithLoadingError),(this.hasDealbreakerSubviewLoadingError||t.length>=2)&&(this.error={message:"",fatal:!0},t.forEach(function(e,i){var r=this.subviewsWithLoadingError[e];i!==t.length-1?this.error.message+="["+e+"] "+r.message+" | ":this.error.message+="["+e+"] "+r.message,r.is404&&(this.error.is404=!0),r.method&&(this.error.method+=r.method),r.fatal||(this.error.fatal=!1)}.bind(this)),this.fire("loadingError",{message:this.error.message,fatal:this.error.fatal,is404:this.error.is404,wasDealbreaker:this.hasDealbreakerSubviewLoadingError,wasMultipleSubviews:t&&t.length>=2}),this.buildErrorContainer(),this.isErrorBuilt=!0,i.error("subview forced the error loading state",{topic:this.name,view:e.target.name})))},setupSubview:function(t,r,n){var a=this;return(r=e.merge(r||{})).alreadyRendered=a.alreadyRendered,n.set("isActiveViewAgnostic",a.get("isActiveViewAgnostic")),n.initialize(r).then((function(){return a.subviews[t]}),(function(e){i.error("Error getting/initializing view",{topic:a.name,err:e,view:t})})).catch(e.PromiseCatcher(this.name))},attachEvents:function(t){if(t){var i={},r=this;Object.keys(t).forEach((function(n){var a,s;a={selector:(n.match(/([\w-_#\.\[\]~|$^*= ]+) /i)||[])[1]||"[data-action]",type:(n.match(/([\w]+):/i)||[])[1]||"click",action:(n.match(/:([\w]+)/i)||[])[1]||"_default_"},i[s=a.selector+"/"+a.type]||(i[s]={},r.registerEventHandler(r.get("container").delegate(a.type,(function(t){var n,o,u,l;if(n=t.target.ancestor(a.selector,!0),"click"===a.type&&(o=t.target.ancestor(".server-only-link",!0)))return!0===t.metaKey||!0===t.ctrlKey?void 0:void(e.config.win.location=o.get("href"));if(n&&(l=(u=n.getData()||{}).action||"_default_",i[s].hasOwnProperty(l))){if(!i[s][l])throw new Error('Handler for "'+l+'" UI event is undefined');i[s][l].call(r,t,u)}}),a.selector))),i[s][a.action]=t[n]}))}},registerEventHandler:function(t){if(e.Lang.isFunction(t.detach))return this._eventHandles.push(t),t},detachRegisteredEvent:function(t){var i=this._eventHandles.indexOf(t);-1!==i&&e.Lang.isFunction(t.detach)&&(t.detach(),this._eventHandles.splice(i,1))},detachRegisteredEvents:function(){this._eventHandles.length&&(this._eventHandles.forEach((function(e){e.detach()})),this._eventHandles=[])},generateSignature:function(t,i){var r={},n=function(e){var t=0;if(0===e.length)return t;for(var i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i),t&=t;return t};return e.Object.each(i,(function(e,t){"container"!==t&&"appContext"!==t&&"context"!==t&&"cspNonce"!==t&&"parentView"!==t&&"keyEventScope"!==t&&void 0!==e&&"function"!=typeof e&&(r[t]="object"==typeof e?1:e)})),t+"__"+Object.keys(r).sort().map((function(e){var t,i;try{t=encodeURIComponent(e)}catch(i){t=encodeURIComponent(n(e))}try{i=encodeURIComponent(r[e])}catch(i){t=encodeURIComponent(n(r[e]))}return t+"_"+i})).join("__")},getContainer:function(t){(t=t||{}).subviewParams=t.subviewParams||{};var i,r,n,a,s=["view",t.subviewName||t.viewName||this.name],o=t.subviewName?t.subviewParams.additionalViewClasses:this.additionalViewClasses,u=t.subviewParams.preferredViewTag||"div";return(!t.isSubview||t.subviewParams.requiredToShowOnServer||t.subviewParams.requiredToShow)&&YUI.Env.isServer&&s.push("requiredToShowOnServer"),this.theme&&s.push(this.theme),e.Lang.isArray(o)&&o.length?s=s.concat(o):e.Lang.isFunction(o)&&(a=o.call(this),e.Lang.isArray(a)&&a.length&&(s=s.concat(a))),t.subviewName||s.push(e.FlickrView.ROOT_VIEW_CLASS_NAME),s=' class="'+s.join(" ")+'"',t.subview?i=t.subview.getId():t.subviewName&&t.subviewParams&&(i=this.generateSignature(t.subviewName,t.subviewParams)),YUI.Env.isServer?r={html:"",setHTML:function(e){this.html=e},getHTML:function(e){return this.html},get:function(e){switch(e){case"innerHTML":return this.html;case"outerHTML":return"<"+u+" "+s+(n?' style="'+Object.keys(n).reduce((function(e,t,i,r){return e+t+": "+n[t]+(i<r.length-1?"; ":"")}),"")+'"':"")+(i?' data-view-signature="'+i+'"':"")+">"+this.html+"</"+u+">"}return null},hasChildNodes:function(){return!1},addClass:function(e){""!==(e=e.trim())&&(s=s.slice(0,-1)+" "+e+'"')},hasClass:function(e){return s.split('"')[1].split(" ").indexOf(e)>-1},removeClass:function(e){var t=s.split('"')[1].split(" "),i=t.indexOf(e);-1!==i&&(t.splice(i,1),s=' class="'+t.join(" ")+'"')},setStyle:function(e,t){n||(n={}),n[e]=t},setStyles:function(e){n||(n={}),Object.keys(e).forEach((function(t){n[t]=e[t]}))},appendChild:function(e){this.html+=e.html},all:function(){return{each:function(){}}},one:function(){return null}}:(i&&(r=this.get("container").one('[data-view-signature="'+i+'"]')),r?r.removeAttribute("data-view-signature"):r=e.Node.create("<"+u+" "+s+"></"+u+">")),r},renderSubviews:function(){var e=this;return Object.keys(this.subviews).forEach((function(t,r,n){try{e.subviews[t].render()}catch(r){i.error("Error rendering view",{topic:e.name,err:r,view:t})}})),{}},templates:function(t){var r,n,a=e.Template.get("hermes/"+t),s=this.getLangBundles(),o=this;if(s.locales=this.appContext.lang||this.defaultLang,"function"!=typeof a)throw i.error("Template not found",{topic:this.name,template:t}),new Error("Template not found: "+t);return this.appContext.flipper&&(r=this.appContext.flipper),this.appContext.segments&&(n=this.appContext.segments.segments),function(e){return!(e=e||{}).flippers&&r&&(e.flippers=r.toJSON()),!e.segments&&n&&(e.segments=n),e.isMobile=o._params.isMobile,e.cspNonce=o._params.cspNonce,o.appContext.forceServerRender&&(e.isServerRendered=!0),Object.keys(o.subviewConfig||{}).forEach((function(t){e[t]||(e[t]=o.subviews[t]?o.subviews[t].get("container"):"")})),a(e,{data:{intl:s,flippers:e.flippers,segments:e.segments}})}},loadState:function(){return e.Promise.resolve()},updateHead:function(){null!==this.get("headContainer")&&(e.one("head").all('[data-dynamic="true"]').remove(!0),e.one("head").append(this.get("headContainer")))},canActivate:function(){var e=!1;return(this.isBuilt||this.isErrorBuilt)&&(this.isActivated||this.isErrorActivated||this.isActiveAndInDOM()&&(e=!0)),e},isActiveAndInDOM:function(){var e=this.get("container");return e&&(this.get("isActiveViewAgnostic")||this.appContext.flapp.get("activeView").get("container").contains(e))&&e.inDoc()},activate:function(){return this},activateSubviews:function(){var e,t;for(e in this.subviews){t=this.subviews[e];try{t.normalizedActivate(),t.recursivelyActivateSubviews()}catch(t){i.error("Error activating view",{topic:this.name,err:t,view:e})}}return this},recursivelyActivateSubviews:function(e){var t,r,n=e||this.subviews;for(t in n)if((r=n[t]).canActivate()){r.normalizedActivate();try{r.normalizedActivate(),this.recursivelyActivateSubviews(r.subviews)}catch(e){i.error("Error activating view",{topic:this.name,err:e,view:r})}}return this},normalizedActivate:function(){this.canActivate()&&(this.isErrorBuilt?(this.isErrorActivated=!0,this.activateErrorContainer()):(this.activate(),this.isActivated=!0,this.activateSubviews()))},onCSSLoaded:function(t){var i=this;this.appContext.isCSSLoaded?t.call(i):this.registerEventHandler(e.on("css-loaded",(function(){t.call(i)})))},buildErrorContainer:function(){this.setContainerHTML("")},activateErrorContainer:function(){var e=this,t=this.get("container").one(".retry");t&&t.on("click",(function(t){t.preventDefault(),e.isErrorActivated=!1,e.initialize()}))},setViewDataOnHistory:function(t,i){return e.HistoryHelper.setData(this.name,t,i)},getViewDataFromHistory:function(t){return e.HistoryHelper.getData(this.name,t)},getTrackingSegments:function(){return{}},updateDataLayer:function(){},reload:function(t,i){var r=this,n=[];if(!t.length)return e.Promise.resolve();for(var a=0;a<t.length;a++)n.push(this.appContext.getModelRegistry(t[a]));return e.Promise.all(n).then((function(e){for(var t=0;t<e.length;t++)Array.isArray(i)?e[t].remove(i[t]):e[t].remove(i);YUI.Env.isServer||r.appContext.flapp.navigate(r.appContext.getLocation().href)})).catch(e.PromiseCatcher(this.name))},destroy:function(t){this.set("destroyed",!0);var i,r=this.get("container");if(this.detachRegisteredEvents(),!YUI.Env.isServer&&this.isActiveAndInDOM()){this.setRootViewAdditionalViewClasses();var n=this.get("rootViewAdditionalViewClasses")||[],a=e.one("."+e.FlickrView.ROOT_VIEW_CLASS_NAME);n&&a&&n.forEach((function(e){a.removeClass(e)}))}return this._removeDeferredViewScrollListener(),e.Node&&r&&(r.detach&&r.detach(),t&&(t.remove||t.delete)&&r.remove&&r.remove(!0),this.set("container",null)),this.destroySubviews(),i=e.FlickrView.superclass.destroy.call(this),this.beforeDestroyHandler&&this.beforeDestroyHandler.detach(),i},destroySubviews:function(){var e=this;Object.keys(this.subviews||{}).forEach((function(t,i,r){e.subviews[t].destroy()}))},bringIntoFocus:function(){var e=this.get("container"),t=e.getAttribute("tabindex")||null;e.setAttribute("tabindex","-1"),e.focus(),e.blur(),t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")},setContainerWithTemplate:function(e,t){this.setContainerHTML(this.templates(e)(t))},getAdditionalSpContexts:function(){return[]},godMessage:e.godMessage},{ATTRS:{container:{value:"",setter:function(e){return e||this.getContainer()}},trackedElementIDs:{value:[],validator:function(t){return e.Lang.isArray(t)}},rapidConf:{value:{},validator:function(t){return e.Lang.isObject(t)}},isActiveViewAgnostic:{value:!1},isRootView:{value:!1},rootViewAdditionalViewClasses:{value:[],validator:function(t){return e.Lang.isArray(t)}},isCSSLoaded:{getter:function(){return!!this.appContext.isCSSLoaded}}},create:function(t,r,n,a,s){e.namespace("Views"),e.Views[t]&&i.warn("A view with this name already exists. Did you mean to redefine it?",{view:t}),a.destroy&&a.destroy!==e.FlickrView.prototype.destroy&&i.warn("`destroy` method was overridden. Did you mean `destructor`?",{view:t}),a.initialize&&a.initialize!==e.FlickrView.prototype.initialize&&i.warn("`initialize` method was overridden. Did you mean `initializer`?",{view:t});try{e.Views[t]=e.Base.create(t,r,n,a,s)}catch(r){throw i.warn("`Base.create` method failed, maybe because of Chrome 51?",{view:t}),!YUI.Env.isServer&&e.config.win.beaconError&&e.config.win.beaconError("`Base.create` method failed, maybe because of Chrome 51?",e.config.win.location.href,r),r}if(r&&r!==e.FlickrView&&r.prototype&&r.prototype.langBundles){var o,u=(e.Views[t].prototype.langBundles||[]).concat(r.prototype.langBundles);o=e.Array.dedupe(u),e.Views[t].prototype.langBundles=o}return e.Views[t]},ROOT_VIEW_CLASS_NAME:"flickr-view-root-view"}),e.mix(e.FlickrView.prototype,e.Localizable)}),"@VERSION@",{requires:["base","template-base","flickr-promise","handlebars-base","handlebars-helpers","localizable","history-helper","god-message"],optionalRequires:["hermes-core"]});YUI.add("banner-view",(function(i,e){require("hermes-core/flog")(e);i.FlickrView.create(this.name,i.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(i){this.params=i,this.subview=this.params.subview},loadState:function(){return i.Promise.resolve()},buildContainer:function(){},activate:function(){var e=this,t=this.get("container");return this.subviewParent=t,this.subview?(this.subview.on("dismiss",(function(t){if(i.Snowplough){var s={category:"banner",action:"dismiss",label:e.subview.name};t.property&&(s.property=t.property),t.value&&(s.value=t.value),i.Snowplough.sendStructuredEvent(s)}e.dismiss()})),this.subview.initialize().then((function(){return e.setupSubview()}))):this},setupSubview:function(){var i=this,e=i.subview.get("container");return i.subviewParent.empty(),i.subviewParent.appendChild(e),i.subview.on("activated",(function(){i.fire("subviewActivated")})),i.subview.activate(),i.subview.activateSubviews(),this},dismiss:function(){this.fire("dismissed")},handleContainerClose:function(){this.subview&&this.subview.close&&this.subview.close()}})}),"@VERSION@",{requires:["flickr-view"],optionalRequires:["hermes-core"],langBundles:["common"]});