YUI.add("set-models",function(e,t){function r(e){r.superclass.constructor.call(this,e)}var n=require("lib/flog")(t);e.Models[this.name]=r,e.extend(r,e.FlickrModelRegistry,{langBundles:this.details.langBundles,name:this.name,remote:{read:function(t){return e.ListFetchers["flickr-photosets-getPhotos"].run(t,this.appContext)},create:function(t,n){return e.ModelCreators["flickr-photosets-create"].run(t,n)},createHidden:function(t,n){return e.ModelCreators["flickr-photosets-createHidden"].run(t,n)},addPhoto:function(t,n){return e.ModelCreators["flickr-photosets-addPhoto"].run(t,n)},removePhoto:function(t,n){return e.ModelCreators["flickr-photosets-removePhoto"].run(t,n)},update:function(t,n){return e.ModelUpdaters["flickr-photosets-editMeta"].run({photosetId:t,title:n.title?n.title.newVal:this.getValue(t,"title"),description:n.description?n.description.newVal:this.getValue(t,"description")},this.appContext)},setPrimaryPhoto:function(t,n){return e.ModelUpdaters["flickr-photosets-setPrimaryPhoto"].run(t,n)},"delete":function(t){if(typeof t=="string"){var n=t;t={setID:n}}return e.ModelDeletors["flickr-photosets-delete-deletor"].run(t,this.appContext)}},addPhoto:function(e,t){return this.getValue(e,"photoPageList").hasMaxBoundary()&&this.getValue(e,"photoPageList").appendToList(t),this.getValue(e,"photoContextList").hasMaxBoundary()&&this.getValue(e,"photoContextList").appendToList(t),this},removePhoto:function(e,t){return this.getValue(e,"photoPageList").removeFromList(t.getValue("id")),this.getValue(e,"photoContextList").removeFromList(t.getValue("id")),this},hasPhoto:function(e,t){return this.getValue(e,"photoPageList").getFromListByID(t)||this.getValue(e,"photoContextList").getFromListByID(t)},getSizeToFit:function(t,r,i){n.warn("Using `getSizeToFit` is deprecated. See model comments for more details.");var s=e.PhotoModelHelper.getSizeToFit(t,r,e.merge({sizes:this.getValue(t,"primaryPhotoSizes"),includeSquare:!0,cropToFit:!0},i));return s&&(s.url=s.src),s},getLargestPrimaryPhotoSize:function(t,n){return e.PhotoModelHelper.getLargestSize(t,n)},attributes:{normalizedId:{readOnly:!0,defaultFn:function(e){return e.split("-")[0]}},displayType:{readOnly:!0,defaultFn:function(){return"set"}},title:{validator:function(t,n){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},description:{validator:function(t,n){return e.AttributeHelpers.validateString(t)},setter:function(t){return e.AttributeHelpers.coerceString(t)},defaultValue:""},owner:{isModel:!0},isOwner:e.PhotoModelHelper.attributes.isOwner,photoPageList:{isCollection:!0,pageFetch:{listFetcher:e.ListFetchers["flickr-photosets-getPhotos"]}},photoContextList:{isListProxy:!0,contextFetch:{listFetcher:e.ListFetchers["flickr-photosets-getContext"],listItemIdField:"photoId"}},photoCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)}},videoCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)}},totalCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultFn:function(e){return this.getValue(e,"photoCount")+this.getValue(e,"videoCount")}},viewCount:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)}},photoCountDisplay:{readOnly:!0,derivedBy:["totalCount"],defaultFn:function(e){var t=this.getValue(e,"photoCount"),n=this.getValue(e,"videoCount"),r=this.getValue(e,"totalCount"),i="";return t-=n,t===0&&n===0?i=this.intlMessage({intlName:"models.ZERO_PHOTOS"}):t===1&&n===0?i=this.intlMessage({intlName:"models.ONE_PHOTO"}):t>1&&n===0?i=this.intlMessage({intlName:"models.MULTIPLE_PHOTOS",photos:t}):t===0&&n===1?i=this.intlMessage({intlName:"models.ONE_VIDEO"}):t===1&&n===1?i=this.intlMessage({intlName:"models.ONE_PHOTO_AND_ONE_VIDEO"}):t>1&&n===1?i=this.intlMessage({intlName:"models.MULTIPLE_PHOTOS_AND_ONE_VIDEO",photos:t}):t===0&&n>1?i=this.intlMessage({intlName:"models.MULTIPLE_VIDEOS",videos:n}):t===1&&n>1?i=this.intlMessage({intlName:"models.ONE_PHOTO_AND_MULTIPLE_VIDEOS",videos:n}):t>1&&n>1&&(i=this.intlMessage({intlName:"models.MULTIPLE_PHOTOS_AND_MULTIPLE_VIDEOS",photos:t,videos:n})),r===0?i=this.intlMessage({intlName:"models.ZERO_ITEMS"}):r===1?i=this.intlMessage({intlName:"models.ONE_ITEM"}):r>1&&(i=this.intlMessage({intlName:"models.MULTIPLE_ITEMS",items:r})),i}},photoAndVideosDisplay:{readOnly:!0,derivedBy:["photoCount","videoCount"],defaultFn:function(e){var t=this.getValue(e,"photoCount"),n=this.getValue(e,"videoCount"),r="";return t===0&&n===0?r=this.intlMessage({intlName:"models.ZERO_PHOTOS"}):t===1&&n===0?r=this.intlMessage({intlName:"models.ONE_PHOTO"}):t>1&&n===0?r=this.intlMessage({intlName:"models.MULTIPLE_PHOTOS",photos:t}):t===0&&n===1?r=this.intlMessage({intlName:"models.ONE_VIDEO"}):t===1&&n===1?r=this.intlMessage({intlName:"models.ONE_PHOTO_AND_ONE_VIDEO"}):t>1&&n===1?r=this.intlMessage({intlName:"models.MULTIPLE_PHOTOS_AND_ONE_VIDEO",photos:t}):t===0&&n>1?r=this.intlMessage({intlName:"models.MULTIPLE_VIDEOS",videos:n}):t===1&&n>1?r=this.intlMessage({intlName:"models.ONE_PHOTO_AND_MULTIPLE_VIDEOS",videos:n}):t>1&&n>1&&(r=this.intlMessage({intlName:"models.MULTIPLE_PHOTOS_AND_MULTIPLE_VIDEOS",photos:t,videos:n})),r}},sharedEntityDisplay:{readOnly:!0,derivedBy:["videoCount","photoCount"],defaultFn:function(e){var t=this.getValue(e,"photoCount"),n=this.getValue(e,"videoCount"),r=this.getValue(e,"owner"),i="";return t&&!n?i=this.intlMessage({intlName:"shared-entity.USERNAME_HAS_SHARED_PHOTOS_ONLY",username:r.getValue("displayname"),photoCount:parseInt(t,10)}):!t&&n?i=this.intlMessage({intlName:"shared-entity.USERNAME_HAS_SHARED_VIDEOS_ONLY",username:r.getValue("displayname"),videoCount:parseInt(n,10)}):t&&n&&(i=this.intlMessage({intlName:"shared-entity.USERNAME_HAS_SHARED_PHOTOS_VIDEOS"
,username:r.getValue("displayname"),photoCount:parseInt(t,10),videoCount:parseInt(n,10)})),i}},primary:{},primaryPhotoSizes:{},primaryNeedsInterstitial:{},bestIconURL:{readOnly:!0,derivedBy:["primaryPhotoSizes"],defaultFn:function(t){var n=e.PhotoModelHelper.getSizeToFit(t,{height:48,width:48},e.merge({sizes:this.getValue(t,"primaryPhotoSizes"),includeSquare:!0,cropToFit:!0}));return n?n.src:""}},url:{readOnly:!0,derivedBy:["owner","normalizedId"],defaultFn:function(e){var t=this.getValue(e,"owner"),n=this.getValue(e,"isSharedEntity"),r=this.getValue(e,"normalizedId");return t&&n===!0?"/photos/"+t.getValue("pathAlias")+"/shares/"+r:t?"/photos/"+t.getValue("pathAlias")+"/albums/"+r:undefined}},isAutoUploadSet:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},isSharedEntity:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},canShare:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},canDownload:{validator:function(t){return e.AttributeHelpers.validateBoolean(t)},setter:function(t){return e.AttributeHelpers.coerceBoolean(t)},defaultValue:!1},urlSuffix:{readOnly:!0,defaultFn:function(e){var t=this.getValue(e,"isSharedEntity");return t?"shares-"+e:"album-"+e}},gpCode:{defaultFn:function(e){return null}},gpOwner:{defaultFn:function(e){return null}}}},{buildCompoundId:function(e,t,n){var r=e;return t&&(r+="-"+t),n&&(t||(r+="-dateposted"),r+="-"+n),r},splitCompoundId:function(e){var t=e.split("-");return{nsid:t[0],orderBy:t[1],viewAs:t[2]}}})},"@VERSION@",{requires:["flickr-model-registry","flickr-promise","flickr-photosets-addPhoto-creator","flickr-photosets-removePhoto-deletor","flickr-photosets-delete-deletor","flickr-photosets-getPhotos-fetcher","flickr-photosets-getContext-fetcher","flickr-photosets-create-creator","flickr-photosets-createHidden-creator","flickr-photosets-editMeta-updater","flickr-photosets-setPrimaryPhoto-updater","photo-model-helper"],langBundles:["models","shared-entity"]});
YUI.add("photo-groups-models",function(e){function t(e){t.superclass.constructor.call(this,e)}e.Models[this.name]=t,e.extend(t,e.FlickrModelRegistry,{name:this.name,remote:{read:function(t){return e.ModelFetchers["flickr-photos-getAllContexts"].run(t,this.appContext)}},attributes:{id:{},groups:{isCollection:!0},total:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultValue:0}}})},"@VERSION@",{requires:["api-helper","flickr-model-registry","flickr-promise","flickr-photos-getAllContexts-fetcher"]});
YUI.add("flickr-photos-getAllContexts-fetcher",function(e,t){"use strict";function n(t){var n;return n={photo_id:t.id,extras:e.APIHelper.request.getRebootPhotoExtras()+","+e.APIHelper.request.getRebootGroupExtras()+","+e.APIHelper.request.getRebootAlbumsListExtras(),primary_photo_extras:"url_sq, url_t, url_s, url_m, needs_interstitial"},t.scrappy&&(n.get_all_galleries=1,n.no_faves_context=1,n.per_type_limit=6,n.get_totals=1,n.sort="date-desc"),n}function r(t,n){var r=t[0],i=t[1],s=t[2],o={},u=[],a,f=t[8],l=t[9],c=t[10],h=t[11],p;return o.faves=t[3],o.gallery=t[4],o.pool=t[5],o.set=t[6],o.stream=t[7],e.Object.each(o,function(t,n){r[n]&&e.Array.each(r[n],function(n){e.APIHelper.response.addContextToRegistry(n,t,i,h),u.push(t.proxy(n.id))})}),s.exists(n.id)||(a=s.add({id:n.id,totalGroups:r.totals&&r.totals.groups,totalSets:r.totals&&r.totals.sets,totalGalleries:r.totals&&r.totals.galleries}),s.setValue(n.id,"contexts",u)),f.addOrUpdate({id:n.id,total:r.totals&&r.totals.groups,groups:s.getContextsOfType(n.id,"group-pool-models")}),p=s.getContextsOfType(n.id,"set-models"),p.forEach(function(e){e.setValue("totalCount",parseInt(e.getValue("photoCount"),10)+parseInt(e.getValue("videoCount"),10))}),l.addOrUpdate({id:n.id,total:r.totals&&r.totals.sets,sets:p}),c.addOrUpdate({id:n.id,total:r.totals&&r.totals.galleries,galleries:s.getContextsOfType(n.id,"gallery-models")}),a}function i(n,r){var i=this;return r.flipper.isFlipped("enable-scrappy-photo-page")&&(n.scrappy=!0),e.Promise.all([r.callAPI("flickr.photos.getAllContexts",this._processParams(n),!0),r.getModelRegistry("person-models"),r.getModelRegistry("photo-contexts-models"),r.getModelRegistry("favorite-models"),r.getModelRegistry("gallery-models"),r.getModelRegistry("group-pool-models"),r.getModelRegistry("set-models"),r.getModelRegistry("photostream-models"),r.getModelRegistry("photo-groups-models"),r.getModelRegistry("photo-sets-models"),r.getModelRegistry("photo-galleries-models"),r.getModelRegistry("group-models")]).then(function(e){return i._processResponse(e,n)},e.FetcherErrorLogger(t))}e.namespace("ModelFetchers")["flickr-photos-getAllContexts"]={run:i,_processParams:n,_processResponse:r}},"@VERSION@",{requires:["flickr-promise","api-helper"],optional:["photo-contexts-models","favorite-models","gallery-models","group-pool-models","photostream-models","set-models","photo-groups-models","photo-sets-models","photo-galleries-models","group-models"]});
YUI.add("photo-contexts-models",function(e){function t(e){t.superclass.constructor.call(this,e),this.getMorePromises={"group-pool-models":{},"set-models":{},"gallery-models":{}},this.continuationKeys={"group-pool-models":{},"set-models":{},"gallery-models":{}}}e.Models[this.name]=t,e.extend(t,e.FlickrModelRegistry,{name:this.name,remote:{read:function(t){return this.appContext.flipper.isFlipped("enable-scrappy-photo-page")?e.ModelFetchers["flickr-photos-getAllContexts"].run(t,this.appContext):e.ModelFetchers["flickr-photos-getInfo"].run(t,this.appContext)}},getMoreContextsOfType:function(t,n,r){var i=this,s,o,u,a,f,l,c,h="-1",p=e.APIHelper.request.getRebootPhotoExtras();switch(n){case"group-pool-models":s="flickr.photos.getGroups",u="groups.group",p+=","+e.APIHelper.request.getRebootGroupExtras();break;case"set-models":s="flickr.photos.getSets",u="sets.set";break;case"gallery-models":s="flickr.photos.getGalleries",u="galleries.gallery"}return s?this.exists(t)?(a=this.continuationKeys[n][t]||"0",a===h?e.Promise.resolve({type:n,newContexts:[],loadedAll:!0}):(o={photo_id:t,extras:p,primary_photo_extras:"url_sq, url_t, url_s, url_m",continuation:a,per_page:r},l=t+"_"+a,c=this.getMorePromises[n][l],c?c:(this.getMorePromises[n][l]=(new e.FlickrPromise({apiResponse:this.appContext.callAPI(s,o,!0),contextRegistry:this.appContext.getModelRegistry(n),personRegistry:this.appContext.getModelRegistry("person-models")})).then(function(r){var s=[],o=r.apiResponse,a=r.contextRegistry,c=r.personRegistry,p,d,v;return d=u.split(".").reduce(function(t,n){return e.Lang.isObject(t)?t[n]:undefined},o),d&&(e.Array.each(d,function(t){e.APIHelper.response.addContextToRegistry(t,a,c),s.push(a.proxy(t.id))}),s.length&&(v=i.getContextsOfType(t,n).map(function(e){return e.getValue("id")}),s=s.filter(function(e){return v.indexOf(e.getValue("id"))===-1}),s.length&&i.getValue(t,"contexts").appendToListMulti(s))),f=o.continuation,typeof f=="undefined"?f=h:e.Lang.isNumber(f)&&(f+=""),p=f===h,i.continuationKeys[n][t]=f,delete i.getMorePromises[n][l],{type:n,newContexts:s,loadedAll:p}}),this.getMorePromises[n][l]))):e.Promise.reject("[photo-contexts-models] getMoreContextsOfType was called for an ID that isn't in the registry: "+t):e.Promise.reject("[photo-contexts-models] getMoreContextsOfType was called without an invalid type: "+n)},getContextsOfType:function(t,n){return n=e.Array(n),this.getValue(t,"contexts").getList().filter(function(e){return n.indexOf(e.registry.name)>-1})},getContextsNotOfType:function(t,n){return n=e.Array(n),this.getValue(t,"contexts").getList().filter(function(e){return n.indexOf(e.registry.name)===-1})},attributes:{contexts:{isCollection:!0},totalGroups:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultValue:0},totalSets:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultValue:0},totalGalleries:{validator:function(t){return e.AttributeHelpers.validateInteger(t)},setter:function(t){return e.AttributeHelpers.coerceInteger(t)},defaultValue:0}}})},"@VERSION@",{requires:["api-helper","flickr-model-registry","flickr-promise","flickr-photos-getInfo-fetcher","flickr-photos-getAllContexts-fetcher"]});
YUI.add("vr-overlay-view",function(e,t){var n=require("lib/flog")(t),r;r={css:{destinationContainer:"body",closeX:".close"},options:{}},e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(e){return this.photoId=e.photoId,this.nsid=e.nsid,this.isMobile=e.isMobile,this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this.immersed=!1,this},subviewConfig:{},loadState:function(){var e=this;return this.appContext.getModel("photo-models",e.photoId).then(function(t){return e.set("photo",t),e.canVr().then(function(t){e.set("canVr",t)})})},buildContainer:function(){var e=this.get("canVr");return this.set("isActiveViewAgnostic",!0),e?(this.setContainerWithTemplate("vr-overlay"),this):this},buildErrorContainer:function(){this.setContainerHTML("")},activate:function(){var t=this;if(!this.get("canVr"))return;return this.loadFlickvr().then(function(){var n=t.get("container");n.addClass("active"),t.registerEventHandler(n.one(r.css.closeX).on("click",e.bind(t.closeVr,t))),t.registerEventHandler(t.get("container").on("click",t.openVr,t)),t.isMobile||t.openVr()}).then(null,function(e){n.error("Failed to load flickvr from CDN",{err:e})}),this},loadFlickvr:function(){return new e.Promise(function(t,r){if(window.Flickvr)return t();e.Get.js("https://s.yimg.com/uy/flickvr/version.js",function(i){if(i)return r();if(!window.FlickvrVersion)return r();e.Get.js("https://s.yimg.com/uy/flickvr/"+window.FlickvrVersion+".js",function(e){return e?r():(n.log("flickvr loaded successfully from CDN"),t())})})})},hasEquirectangularTag:function(){return this.appContext.getModel("photo-tags-models",this.photoId).then(function(e){var t=!1,n=e.toJSON();return n.tags.forEach(function(e){var n=e.tagRaw.toLowerCase();n==="equirectangular"&&(t=!0)}),t})},inEquirectangularGroup:function(){return this.appContext.getModel("photo-groups-models",this.photoId).then(function(e){var t=!1,n=e.toJSON();return n.groups.forEach(function(e){e.id==="44671723@N00"&&(t=!0)}),t})},canVr:function(){var t=this,n,r,i=!1;return t.appContext.flipper.isFlipped("enable-vr")?(n=t.get("photo"),n&&(r=n.getValue("aspectRatio"),r&&r>=1.99&&r<=2.01&&(i=!0)),i?e.Promise.all([t.appContext.callAPI("flickr.vr.isEquirectangular",{photo_id:n.id})]).then(function(t){return e.Promise.resolve(!!t[0].is_equirectangular)}):e.Promise.resolve(!1)):e.Promise.resolve(!1)},onParentViewEvent:function(e,t){var n;if(t&&t[0]){n=t[0];switch(n){case"vrIconClicked":this.openVr();break;case"vKeyPressed":this.toggleVr()}}},toggleVr:function(){this.immersed?this.closeVr():this.openVr()},openVr:function(t){if(this.immersed||t&&t.target.hasClass("close")){this.vr.controls&&this.vr.controls.autoRotate&&(this.vr.controls.autoRotate=!1);return}var n=this,r=this.get("photo"),i=r.getLargestSize(),s=this.templates("flickr-balls")({}),o=new Image,u,a;t&&t.halt(),a=e.Node.create("<div></div>"),a.addClass("vr-loading-layer"),a.addClass("fluid"),a.append(s),n.get("container").append(a),u=i.displayUrl.replace("staticflickr","static.flickr"),o.crossOrigin="anonymous",o.onload=function(){n.immersed=!0,n.vr=new window.Flickvr,n.vr.initialize(u,{container:n.get("container").getDOMNode(),useContainerDimensions:!n.isMobile,enableVrHeadset:n.appContext.flipper.isFlipped("enable-vr-headset"),autoRotate:!n.isMobile}).then(function(t){t.style.position="absolute",n.vr.enterVR(),n.get("container").one(".vr-loading-layer").remove(),n.get("container").addClass("immersed"),n.escHandle=n.attachKeyEvent("down:27",e.betterThrottle(n.closeVr.bind(n),100))})},o.src=u},closeVr:function(e){var t=this.get("container");e&&e.preventDefault(),this.vr&&this.vr.destroy(),this.escHandle&&(this.detachRegisteredEvent(this.escHandle),delete this.escHandle),this.immersed=!1,t.removeClass("immersed")},beforeDestroy:function(){this.set("lastContainer",this.get("container")),this.immersed&&this.closeVr()},destructor:function(){var e=this.get("lastContainer");e&&(e.remove(!0),this.set("lastContainer",null))}})},"@VERSION@",{requires:["flickr-view","better-throttle","vr-css","get","hermes-template-vr-overlay","hermes-template-flickr-balls","fluid-balls-css"],optional:["photo-models","photo-tags-models","photo-groups-models"],langBundles:["common","photo-page-scrappy"]});
YUI.add("hermes-lang-photo-page-scrappy",function(e,t){e.Intl.add("hermes/photo-page-scrappy","en-US",{PAGE_TITLE:["${title}"," | Flickr - Photo Sharing!"],BACK_TO:["Back to ","${entryType}"],COULDNT_UPDATE_SETTINGS:["We couldn't update your settings"],ADULT_CONTENT:["Adult Content"],MATURE_AUDIENCES:["This content is for mature audiences only."],USER_DISCRETION:["User discretion is advised."],SHOW_ME_THIS_CONTENT_TYPE:["Show Me This Content Type From Now On"],CHANGE_SAFE_SEARCH_IN_SETTINGS:['You can always change <a href="/account/prefs/safesearch/?from=privacy" data-track="photoWellSafeSearchClick">SafeSearch settings</a> in your account preferences.'],SIGNED_IN_FOR_CONTENT:["You must be signed in to see this content."],VIDEO_COMING_SOON:["Video support coming soon"],FIND_OUT_MORE_AD:["Find out more at ","${brand}"],SHARE_THIS_PHOTO:["Share this photo"],DOWNLOAD_THIS_VIDEO:["Download this video"],DOWNLOAD_THIS_PHOTO:["Download this photo"],VIEW_ALL_SIZES:["View all sizes"],DOWNLOAD_PHOTO:["Download photo"],SOME_RIGHTS_RESERVED:["Some rights reserved"],DOWNLOAD:["Download"],ERROR_LOADING_CONTEXT:["Error loading context"],ADD_TITLE:["Add title"],ADD_DESCRIPTION:["Add description"],TITLE_DESCRIPTION_FAILURE:["We couldn't change the Title and Description at this time."],VIEW_PREVIOUS_COMMENT:["View previous comment"],VIEW_MORE_PREVIOUS_COMMENTS:["View ","${count}"," previous comments"],EMPTY_COMMENT_ERROR:["An empty comment box? That won't work!"],COMMENT_RATE_LIMIT_ERROR:["Slow down, partner! To protect the Flickr community against spam and spammy behavior we place a few restrictions on commenting."],COMMENT_POST_ERROR:["We couldn't post your comment."],MORE_COMMENTS_ERROR:["We couldn't get more comments."],COMMENT_PERMALINK_ERROR:["We were unable to find the specified comment on the photo."],DELETE_COMMENT:["Delete Comment"],COMMENT_DELETE_CONFIRMATION:["Are you sure you want to delete this comment?"],COMMENT_DELETE_ERROR:["We couldn't delete your comment."],COMMENT_LOADING_ERROR:["Error loading comments"],COMMENT:["Comment"],SHOW_MORE_COMMENTS:["${count}"," more"],REPLY:["Reply"],PERMALINK:["Permalink"],SINGLE_FAVER:['<a class="faved-by-person-link" href="/photos/',"${pathAlias}",'/">',"${displayName}","</a> faved this"],DOUBLE_FAVER:['<a class="faved-by-person-link" href="/photos/',"${pathAliasOne}",'/">',"${displayNameOne}",'</a> and <a class="faved-by-person-link" href="/photos/',"${pathAliasTwo}",'/">',"${displayNameTwo}","</a> faved this"],TRIPLE_FAVER:['<a class="faved-by-person-link" href="/photos/',"${pathAliasOne}",'/">',"${displayNameOne}",'</a>, <a class="faved-by-person-link" href="/photos/',"${pathAliasTwo}",'/">',"${displayNameTwo}",'</a>, and <a class="faved-by-person-link" href="/photos/',"${pathAliasThree}",'/">',"${displayNameThree}","</a> faved this"],MULTI_FAVER:['<a class="faved-by-person-link" href="/photos/',"${pathAliasOne}",'/">',"${displayNameOne}",'</a>, <a class="faved-by-person-link" href="/photos/',"${pathAliasTwo}",'/">',"${displayNameTwo}",'</a> and <a class="remaining-faved-by" href="#">',"${count}"," more people</a> faved this"],RELATIONSHIP_FRIEND_ERROR:["There was a problem setting your friend relationship."],RELATIONSHIP_FAMILY_ERROR:["There was a problem setting your family relationship."],HIDE_EXIF:["Hide EXIF"],SHOW_EXIF:["Show EXIF"],EDIT_LOCATION:["Edit Location"],EDIT_LOCATION_ORGANIZR:["We\u2019re hard at work redesigning our brand new photo experience. For now, you can Edit Location in Organizr."],SAVE_LOCATION:["Save location"],APERTURE:["Aperture"],FOCAL_LENGTH:["Focal length"],EXPOSURE_TIME:["Exposure time"],FLASH_AUTO_FIRED:["Flash (auto, fired)"],FLASH_AUTO_NO_FIRE:["Flash (auto, did not fire)"],FLASH_ON_FIRED:["Flash (on, fired)"],FLASH_ON_NO_FIRE:["Flash (on, did not fire)"],FLASH_OFF:["Flash (off, did not fire)"],FLASH_SIMPLE_ON:["On"],FLASH_SIMPLE_OFF:["Off"],POWERED_BY:["POWERED BY"],FOURSQUARE:["FOURSQUARE"],ADD_PHOTO_TO_MAP:["Add this photo to your map"],SINGULAR_FAVE:["fave"],PLURAL_FAVE:["faves"],SINGULAR_VIEW:["view"],PLURAL_VIEW:["views"],SINGULAR_COMMENT:["comment"],PLURAL_COMMENT:["comments"],LICENSE_ERROR:["There was a problem changing your photo's license"],ALL_RIGHTS_RESERVED:["All rights reserved"],NO_RESTRICTIONS:["No known copyright restrictions"],PUBLIC_DOMAIN:["Public domain"],USA_GOV_WORK:["United States government work"],SAFETY_CHANGE_ERROR:["There was an error while changing your photo's safety level"],PRIVACY_CHANGE_ERROR:["There was a problem changing your photo's privacy"],COMMENT_PERM_CHANGE_ERROR:["There was an error while changing your photo's commenting permission"],FLAG_PHOTO:["Flag Photo"],MARK_FOR_REVIEW:["Mark for review"],ADDITIONAL_INFO:["Additional info"],VIEWING_THIS_PHOTO:["Viewing this photo"],PRIVACY_UPDATE_ERROR:["There was an error while updating the privacy. Please try again."],META_PERMS_UPDATE_ERROR:["There was an error while updating add meta permission. Please try again."],ADD_META_TO_THIS_PHOTO:["Add tags and people to this photo"],COMMENT_PERMS_UPDATE_ERROR:["There was an error while updating commenting permission. Please try again."],COMMENTING_ON_THIS_PHOTO:["Commenting on this photo"],SAFETY_UPDATE_ERROR:["There was an error while updating the safety level. Please try again."],SAFETY_LEVEL_OF_PHOTO:["Safety level of this photo"],FLAG_ERROR:["There was an error trying to flag this photo. Please try again."],PROVIDE_FEEDBACK:["Provide feedback on the new photo page"],ERROR_DELETING_AUTOTAG:["Error deleting Autotag"],AUTOTAGS:["Autotags"],CONTACT_LIST_ERROR:["An error occurred while trying to fetch your contact list. Please try again."],FAILED_TO_REMOVE_PERSON:["Failed to remove that person from the photo at this time."],PERSON_CANNOT_BE_TAGGED:["This person cannot be tagged."],PEOPLE_IN_PHOTO:["People in photo"],ADD_PEOPLE:["Add people"],ADD_PERSON:["Add a person"],ERROR_REMOVING_FROM_GROUP:["There was a problem removing this photo from the group"],ERROR_ACCEPTING_INVITATION:["There was a problem accepting the group invitation"
],SEARCH_GROUPS:["Search groups"],PHOTO_NOT_IN_GROUPS:["This photo is currently not in any groups"],ADD_TO_GROUP:["Add to group"],INVITE_TO_GROUP:["Invite to group"],ONE_GROUP_INVITATION:["You have 1 group invitation"],N_GROUP_INVITATIONS:["You have ","${count}"," group invitations"],VIEW_MORE_GROUPS:["View more groups"],ERROR_REMOVING_FROM_ALBUM:["There was a problem removing this photo from the album"],WARNING_REMOVE_LAST_PHOTO_FROM_ALBUM:["You're about to remove the last photo from an album, which will also delete the album."],REMOVE_PHOTO_AND_ALBUM:["Remove photo and delete album"],ADD_PHOTO_TO_ALBUM:["Add this photo to an album"],SEARCH_ALBUMS:["Search albums"],ADD_TO_ALBUM:["Add to album"],PHOTO_NOT_IN_ALBUMS:["This photo is currently not in any albums"],VIEW_MORE_ALBUMS:["View more albums"],PHOTO_IN_ONE_ALBUM:["This photo is in 1 album"],PHOTO_IN_N_ALBUMS:["This photo is in ","${count}"," albums"],INVITE_PENDING:["Invite pending"],CANCEL_INVITE:["Cancel invite"],ACCEPT_INVITE:["Accept invite"],ONE_ITEM:["1 item"],N_ITEMS:["${count}"," items"],ERROR_REMOVING_FROM_GALLERY:["There was a problem removing this photo from the gallery"],SEARCH_GALLERIES:["Search galleries"],ADD_TO_GALLERY:["Add to gallery"],PHOTO_NOT_IN_GALLERIES:["This photo is currently not in any galleries"],VIEW_MORE_GALLERIES:["View more galleries"],PHOTO_IN_ONE_GALLERY:["This photo is in 1 gallery"],PHOTO_IN_N_GALLERIES:["This photo is in ","${count}"," galleries"],DELETE_PHOTO:["Delete Photo"],PERMANTENTLY_DELETE:["Do you want to permanently delete this photo?"],EDIT_PHOTO:["Edit photo"],NO_VIDEOS_IN_AVIARY:["Videos cannot be edited in Aviary"],ENHANCE_WITH_AVIARY:["Enhance with Aviary"],NO_VIDEO_ROTATION:["Videos cannot be rotated"],ROTATE:["Rotate"],NO_VIDEO_REPLACE:["Videos cannot be replaced"],REPLACE:["Replace"],PHOTO_NAVIGATION:["Photo navigation"],THUMBNAIL_NAVIGATION:["Thumbnail navigation"],ZOOM:["Zoom"],VIEW_IN_LIGHTBOX:["View in light box"],BACK_TO_CONTEXT:["Back to context"],ADD_TAG:["Add tag"],GO_TO_ORGANIZER:["Go to Organizr"],ALBUM:["album"],ALBUMS:["albums"],ERROR_LOADING_ALBUMS:["There was a problem loading your albums"],ERROR_ADDING_PHOTO_TO_ALBUM:["There was a problem adding this photo to the album"],ERROR_REMOVING_PHOTO_FROM_ALBUM:["There was a problem removing this photo from the album"],ERROR_LOADING_GROUPS:["There was a problem loading the groups you can add photos to"],ERROR_ADDING_TO_GROUP:["There was a problem adding this photo to the group"],ERROR_ADDING_TO_GROUP_NOT_OWNER:["Sorry, the photo couldn't be added to the group because you don't own the photo."],ERROR_ADDING_TO_GROUP_NOT_MEMBER:["Sorry, the photo couldn't be added to the group. You are not a member of the group."],ERROR_ADDING_TO_GROUP_ALREADY_IN_POOL:["The photo is already in that group pool."],ERROR_ADDING_TO_GROUP_MAX_POOLS:["Sorry, the photo couldn't be added to the group because it is already in the maximum number of group pools."],ERROR_ADDING_TO_GROUP_MAX_PHOTOS_FROM_USER:["Sorry, the photo couldn't be added to the group. You have already added the maximum number of photos to the pool."],ERROR_ADDING_TO_GROUP_ADDED_TO_QUEUE:["Your photo has been added to the pending queue for the group."],ERROR_ADDING_TO_GROUP_ALREADY_IN_QUEUE:["Your photo is already in the pending queue for the group."],ERROR_ADDING_TO_GROUP_INVALID_CONTENT:["Sorry, the photo couldn't be added to the group. For more information, check the group requirements for media type, content type, safety level, and geo location."],ERROR_ADDING_TO_GROUP_MAX_IN_POOL:["Sorry, the photo couldn't be added to the group. The group has the maximum number of photos allowed in a pool."],ERROR_INVITING_TO_GROUP:["There was a problem inviting this photo to the group"],ERROR_CANCELING_GROUP_INVITIATON:["There was a problem canceling this photo's invitation to the group"],NO_MATCHES:["No matches"],CREATE_NEW:["Create new"],ERROR_LOADING_GROUP_INVITATIONS:["There was a problem loading this photo's group invitations"],NO_GROUP_INVITATIONS:["No pending group invitations"],PENDING_INVITATIONS_FOR_PHOTO:["Pending invitations for this photo"],LOADING_INVITATIONS:["Loading invitations"],ERROR_LOADING_GALLERIES:["There was a problem loading your galleries"],ERROR_ADDING_TO_GALLERY:["There was a problem adding this photo to the gallery"],ERROR_PHOTO_NOT_ALLOWED_IN_GALLERY:["The owner of this photo does not allow the photo to be added to your gallery"],ERROR_CREATING_GALLERY:["There was a problem creating your new gallery"],DATE_TAKEN_FORMAT:["The taken date must be in the MM/DD/YYYY hh:mm:ss format."],DATE_POSTED_FUTURE:["The posted date cannot be in the future."],DATE_UPLOADED_FUTURE:["The uploaded date cannot be in the future."],DATE_POSTED_FLICKR_JOIN:["Posted date must be after you joined Flickr."],DATE_UPLOADED_FLICKR_JOIN:["Uploaded date must be after you joined Flickr."],ERROR_SAVING_DATE:["Error saving dates"],DATE_INVALID:["One or more dates are invalid"],EDIT_DATES:["Edit Dates"],DATE_TAKEN_ON:["Date Taken On"],DATE_POSTED_ON:["Date Posted On"],DATE_UPLOADED_ON:["Date Uploaded On"],TAKEN_CIRCA:["Taken circa ","${intlDate}"],TAKEN_SOMETIME_IN:["Taken sometime in ","${intlDate}"],TAKEN_IN:["Taken in ","${intlDate}"],TAKEN_ON:["Taken on ",{type:"date",valueName:"intlDate",format:"long"}],UPLOADED_ON:["Uploaded on ","${intlDate}"],SOMETHING_WENT_WRONG:["Something went wrong."],REFRESH_BROWSER:["Please refresh your browser and try again."],TWITTER_NOT_FOUND:["Twitter account not found on posting"],TUMBLR_NOT_FOUND:["Tumblr account not found on posting"],LINK:["Link"],LINK_TO_VIDEO:["Link to this video:"],LINK_TO_PHOTO:["Link to this photo:"],NO_LINKS_FOR_RESTRICTED_VIDEO:["Links are not available for restricted videos"],PRIVATE_VIDEO_SHARE:["This is a private video, do you still want to share it?"],NO_LINKS_FOR_RESTRICTED_PHOTO:["Links are not available for restricted photos"],PRIVATE_PHOTO_SHARE:["This is a private photo, do you still want to share it?"],SHARING_RESTRICTED_VIDEO:["Sharing is restricted for this video"
],SHARING_RESTRICTED_PHOTO:["Sharing is restricted for this photo"],EMBED:["Embed"],PUBLIC_TO_SHARE:["Please share this photo publicly to view embed code"],SIZE:["Size:"],TITLE_AND_OWNER_AT_START:["Display title and owner at start"],SHARE_NOW:["Share now!"],SHARE_PHOTO:["Share Photo"],SHARE_ON_TWITTER:["Share on Twitter"],AUTHORIZE_FOR_TWITTER:["please authorize Flickr to post on Twitter"],SHARE_ON_TUMBLR:["Share on Tumblr"],PUBLISH_NOW:["Publish now"],ADD_TO_QUEUE:["Add to queue"],SAVE_AS_DRAFT:["Save as draft"],AUTHORIZE_FOR_TUMBLR:["please authorize Flickr to post on Tumblr"],SHARE_VIA_MAIL:["Share via mail"],SCREEN_NAME_OR_EMAIL:["Screen name or email"],SQUARE:["Square"],SMALL:["Small"],MEDIUM:["Medium"],LARGE:["Large"],ORIGINAL:["Original"],DUPLICATE_TAG:["Duplicate Tag"],INVALID_TAG:["Invalid Tag"],MAXIMUM_TAG_LIMIT:["Maximum tag limit (76) reached"],MAX_TAG_LIMIT:["Maximum tag limit (75) reached"],ERROR_ADDING_TAG:["Error adding tag"],ERROR_DELETING_TAG:["Error deleting tag"],TAGS:["Tags"],ADD_TAGS:["Add tags"],ADD_A_TAG:["Add a tag"],PHOTO_IN_ONE_GROUP:["This photo is in 1 group"],PHOTO_IN_MANY_GROUPS:["This photo is in ",{type:"number",valueName:"count"}," groups"],PHOTO_IN_NO_GROUPS:["This photo is not in any groups"],ADD_A_COMMENT:["Add a comment"],COMMENT_TUTORIAL:["press Enter to post and Shift+Enter for newline"],SIGNED_IN_TO_POST_A_COMMENT:["You must be signed in to post a comment"],SHARE:["Share"],CODE:["Code"],INCLUDE_A_MESSAGE:["Include a message"],FOR_MORE_INFORMATION_SAFESEARCH:['For more information please read <a href="//www.flickr.com/help/photos/?search=flag#145">this FAQ</a>.'],FLAG_CONFIRMATION_SAFE_WITHIN:['This photo is marked as <a href="//www.flickr.com/help/filters/#258">safe</a> and falls within your <a href="//www.flickr.com/account/prefs/safesearch/">SafeSearch settings</a>.'],FLAG_CONFIRMATION_SAFE_OUTSIDE:['This photo is marked as <a href="//www.flickr.com/help/filters/#258">safe</a> and falls outside your <a href="//www.flickr.com/account/prefs/safesearch/">SafeSearch settings</a>.'],FLAG_CONFIRMATION_MODERATE_WITHIN:['This photo is marked as <a href="//www.flickr.com/help/filters/#258">moderate</a> and falls within your <a href="//www.flickr.com/account/prefs/safesearch/">SafeSearch settings</a>.'],FLAG_CONFIRMATION_MODERATE_OUTSIDE:['This photo is marked as <a href="//www.flickr.com/help/filters/#258">moderate</a> and falls outside your <a href="//www.flickr.com/account/prefs/safesearch/">SafeSearch settings</a>.'],FLAG_CONFIRMATION_RESTRICTED_WITHIN:['This photo is marked as <a href="//www.flickr.com/help/filters/#258">restricted</a> and falls within your <a href="//www.flickr.com/account/prefs/safesearch/">SafeSearch settings</a>.'],FLAG_CONFIRMATION_RESTRICTED_OUTSIDE:['This photo is marked as <a href="//www.flickr.com/help/filters/#258">restricted</a> and falls outside your <a href="//www.flickr.com/account/prefs/safesearch/">SafeSearch settings</a>.'],PRIVATE_PHOTO:["Private photo"],PHOTO_UNFIT_FOR_YOUR_EYES:["Photo is unfit for your eyes. Have a kitten: (^._.^)\uff89"],NO_PHOTO_WITH_THAT_ID:["No photo found with id ","${photoId}"],NO_MEMBERS_FOUND:["No members found"],TAKEN_ON_INTL:["Taken on ",{type:"date",valueName:"intlDate",format:"long"}],UPLOADED_ON_INTL:["Uploaded on ",{type:"date",valueName:"intlDate",format:"long"}],TAKEN_IN_MONTH:["Taken in ",{type:"date",valueName:"intlDate",format:"monthYear"}],VIEW_IN_LIGHTBOX_SHORTCUT:["View in light box"],ZOOM_MAX_MESSAGE:["Whoa there, tiger! This photo is already at maximum size."],CLICK_TO_FAVE_PHOTO:["Click here to fave this photo"],CLICK_TO_FAVE_VIDEO:["Click here to fave this video"],BACK_TO_ACTIVITY_FEED:["Back to activity feed"],BACK_TO_PHOTOSTREAM:["Back to photostream"],BACK_TO_SHARED_PHOTOS:["Back to shared photos"],BACK_TO_ALBUM:["Back to album"],BACK_TO_CONTACTS_LIST:["Back to contacts list"],BACK_TO_FAVORITES:["Back to favorites"],BACK_TO_GALLERY:["Back to gallery"],BACK_TO_PROFILE:["Back to profile"],BACK_TO_EXPLORE:["Back to explore"],BACK_TO_COMMONS:["Back to commons"],BACK_TO_GROUP:["Back to group"],BACK_TO_GROUPS:["Back to groups"],BACK_TO_MAP:["Back to map"],BACK_TO_SEARCH:["Back to search"],BACK_TO_TAG:["Back to tag"],ERROR_ADDING_PHOTOS_TO_ALBUM:["There was a problem adding these photos to the album"],ERROR_REMOVING_PHOTOS_FROM_ALBUM:["There was a problem removing these photos from the album"],ERROR_CREATING_ALBUM:["There was a problem creating your new album"],STRICTER_PRIVACY_CHANGE_DIALOG_TITLE:["Changing to a stricter privacy level"],STRICTER_PRIVACY_CHANGE_DIALOG_MESSAGE:["Changing a photo to a stricter privacy level will remove any favorites that have accumulated. It will also change the URL of the photo."],TAGS_HELPER_TEXT:["Tags are keywords that make photos easier to find. Add as many as you like, and Flickr\u2019s friendly robots will try to help out by adding some for you."],TAGS_HELP_TEXT:["Tags are keywords that make photos easier to find in Flickr search. The ones you add will show up in dark gray. Flickr\u2019s friendly robots will try to help out by adding some for you; these will appear with just a gray outline."],PRIVATE_TAGS_OWNER_HELPER_TEXT:["This private tag is only visible to you and your friends and family who are allowed to see this photo."],PRIVATE_TAGS_FRIENDS_FAMILY_HELPER_TEXT:["This private tag is only visible to you because you are a friend or family of the photo\u2019s owner."],CREATE_WALLART_WITH_PHOTO:["Create wall art with this photo"],ERROR_ROTATING_PHOTO:["There was a problem rotating this photo, please close and retry."],ROTATE_PHOTO:["Rotate photo"],ERROR_REPLACING_PHOTO:["There was a problem replacing this photo, please close and retry."],REPLACE_PHOTO:["Replace photo"],PERMANENTLY_REPLACE:['Permanently replace this photo ("',"${photoTitle}",'" by ',"${username}",") with <em>","${fileName}","</em>?"],REPLACE_WARNING:["Replacing a photo can't be undone. Choose a file to replace this photo with."],REPLACE_UPLOADING:["Uploading <em>","${fileName}"
,"</em>..."],ERROR_DELETING_PHOTO:["There was a problem deleting this photo, please close and retry."],SHOW_MORE_STATS:["Show more stats"],SIGNUP_AND_DOWNLOAD_TITLE:["You found a photo to download!"],SIGNUP_AND_DOWNLOAD_VIDEO_TITLE:["You found a video to download!"],SIGNUP_AND_DOWNLOAD_MESSAGE:["Join Flickr to access billions of photos."],SIGNUP_AND_COMMENT_TITLE:["Comment on this photo!"],SIGNUP_AND_COMMENT_MESSAGE:["Join Flickr to leave a comment on this photo."],IMMERSIFY:["Immersify"],SIGNUP_FOOTER_MESSAGE:["Join Flickr to explore world class photos"],TIMEOUT_FAILURE:["We're having some trouble displaying this photo at the moment. Please try again."],BUY:["Buy"]})},"@VERSION@",{requires:["intl"]});
YUI.add("hermes-template-zoom",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){return""},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/zoom",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-zoom-modal",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return'<img src="'+e.escapeExpression((s=(s=n.smallSrc||(t!=null?t.smallSrc:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"smallSrc",hash:{},data:i}):s))+'" class="zoom-small">'},3:function(e,t,n,r,i){var s;return'<img src="'+e.escapeExpression((s=(s=n.largeSrc||(t!=null?t.largeSrc:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"largeSrc",hash:{},data:i}):s))+'" class="zoom-large">'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{};return'<div class="zoom-modal hidden">\n <div class="zoom-photo-container">\n '+((s=n["if"].call(o,t!=null?t.smallSrc:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n "+((s=n["if"].call(o,t!=null?t.largeSrc:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'\n <span class="facade-of-protection-zoom"></span>\n </div>\n</div>\n'},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/zoom-modal",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("animation-manager",function(e){e.AnimationManager=function(){function i(){return n=!1,r=[],!YUI.Env.isServer&&!e.config.win.requestAnimationFrame&&s(),{subscribe:u}}function s(){var t=["webkit","moz"],n,r,i=0;for(r=0;r<t.length&&!e.config.win.requestAnimationFrame;++r)n=t[r],e.config.win.requestAnimationFrame=e.config.win[n+"RequestAnimationFrame"],e.config.win.cancelAnimationFrame=e.config.win[n+"CancelAnimationFrame"]||e.config.win[n+"CancelRequestAnimationFrame"];if(!e.config.win.requestAnimationFrame||!e.config.win.cancelAnimationFrame)e.config.win.requestAnimationFrame=function(e){var t=Date.now(),n=Math.max(i+16,t);return setTimeout(function(){e(i=n)},n-t)},e.config.win.cancelAnimationFrame=clearTimeout}function o(){if(!n)return;r.forEach(function(e,t){e()}),e.config.win.requestAnimationFrame(o)}function u(t){return r.push(t),n||(n=!0,e.config.win.requestAnimationFrame(o)),{detach:function(){r.splice(r.indexOf(t),1),r.length||(n=!1)}}}var t,n,r;return t||(t=i()),t}()},"@VERSION@",{requires:[]});
YUI.add("zoom-view",function(e){e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,forceGpu:null,initializer:function(t){return this.photoId=t.photoId,this.disableIfSmall=!!t.disableIfSmall,YUI.Env.isServer||(e.config.win.location.search.indexOf("gpu=on")>-1?this.forceGpu=!0:e.config.win.location.search.indexOf("gpu=off")>-1&&(this.forceGpu=!1)),this},loadState:function(){var e=this;return this.appContext.getModel("photo-models",e.photoId).then(function(t){e.set("photo",t)})},buildContainer:function(){return this.setContainerWithTemplate("zoom"),this},activate:function(){var t=this,n=t.getZoomKeyScope();return this.get("photo").getValue("needsInterstitial")||(this.parentViewContainer=this.get("container").ancestor(".view"),t.registerEventHandler(t.get("container").on("click",function(n){n.preventDefault(),t.cursorCoords=[n.pageX-e.config.win.pageXOffset,n.pageY-e.config.win.pageYOffset],e.rapidTracker.beacon(t.name,"zoomInClick"),t.zoomIn(t.cursorCoords)})),t.attachKeyEvent("down:90",e.betterThrottle(function(n){n.preventDefault(),e.rapidTracker.beacon(t.name,"zoomInKeyPress"),t.zoomIn()},100)),t.attachKeyEvent("down:90,27",e.betterThrottle(function(n){n.preventDefault(),e.rapidTracker.beacon(t.name,"zoomOutKeyPress"),t.zoomOut()},100),n),t.attachKeyEvent("down:37,38,39,40",e.betterThrottle(function(n){var r=[t.currentZoomRegion.left,t.currentZoomRegion.top],i=200;n.preventDefault();switch(n.button){case 37:r[0]+=i;break;case 38:r[1]+=i;break;case 39:r[0]-=i;break;case 40:r[1]-=i}e.rapidTracker.beacon(t.name,"zoomPanKeyPress"),t.panZoomNode(r)},16),n),t.registerEventHandler(t.appContext.flapp.before("activeViewChange",function(n){e.fire("flickr:removeKeyEventScope",t.getZoomKeyScope()),t.detachRegisteredEvents(),t.detachEventHandlers(),t.cleanUp()}))),this},getZoomEdgeMargin:function(){return 100},panZoomNodeToCurrentCoords:function(){if(!this.zoomedIn)return;var e=this.cursorCoords,t=this.getZoomPanCoordsForCursor(e);if(!t)return;this.panZoomNode(t)},panZoomNode:function(e){if(this.currentZoomRegion.left===e[0]&&this.currentZoomRegion.top===e[1])return;e=this.constrainPanCoords(e),this.currentZoomRegion.left=e[0],this.currentZoomRegion.top=e[1],this.pendingCoords=e},constrainPanCoords:function(e){var t,n,r,i,s=this.getZoomEdgeMargin(),o=[this.appContext.viewportData.getWidth(),this.appContext.viewportData.getHeight()],u=[this.zoomImageFullWidth,this.zoomImageFullHeight],a=[u[0]+2*s,u[1]+2*s];return t=0,n=o[0]-u[0]-2*s,r=0,i=o[1]-u[1]-2*s,e[0]>t?e[0]=t:e[0]<n&&(e[0]=n),e[1]>r?e[1]=r:e[1]<i&&(e[1]=i),u[0]<o[0]&&(e[0]=.5*(o[0]-a[0])),u[1]<o[1]&&(e[1]=.5*(o[1]-a[1])),e},getZoomPanCoordsForCursor:function(e){if(!e)return;var t=this.getZoomEdgeMargin(),n=[this.appContext.viewportData.getWidth(),this.appContext.viewportData.getHeight()],r=[this.zoomImageFullWidth,this.zoomImageFullHeight],i=[r[0]+2*t,r[1]+2*t],s=[e[0]/n[0],e[1]/n[1]],o=[s[0]*(n[0]-i[0]),s[1]*(n[1]-i[1])];return o},getZoomSmallRegion:function(){var t=this.get("container");return{left:t.getX()-e.config.win.pageXOffset-this.getZoomEdgeMargin(),top:t.getY()-e.config.win.pageYOffset-this.getZoomEdgeMargin(),width:parseInt(t.getStyle("width"),10),height:parseInt(t.getStyle("height"),10)}},resizeZoomNode:function(t,n){var r=this,i,s,o=e.config.win.performance&&e.config.win.performance.now;return n?new e.Promise(function(n,u){function a(e){var u=o?e-i:Date.now()-i,a=u/r.getZoomTransitionTime(),f;return a>=1?(f=t,r.isAnimatingZoom=!1,setTimeout(function(){n()},r.getZoomTransitionTime())):f={left:s.left+(t.left-s.left)*a,top:s.top+(t.top-s.top)*a,width:s.width+(t.width-s.width)*a,height:s.height+(t.height-s.height)*a},f}function f(n){var i=a(n);if(r.zoomingIn||r.zoomingOut)r.resizeZoomNode(i,!1),i!==t&&e.config.win.requestAnimationFrame(f)}r.isAnimatingZoom=!0,i=o?e.config.win.performance.now():Date.now(),s=r.currentZoomRegion,e.config.win.requestAnimationFrame(f)}):(this.currentZoomRegion=t,this.zoomPhotoContainerNode&&this.zoomPhotoContainerNode.setStyle("transform","translate("+t.left+"px, "+t.top+"px) scale("+t.width/this.zoomImageFullWidth+")"),e.Promise.resolve())},getZoomTransitionTime:function(){return 200},zoomOut:function(){var t=this,n=this.zoomNode;e.fire("flickr:removeKeyEventScope",this.getZoomKeyScope()),this.detachEventHandlers(),this.resizeZoomNode(this.getZoomSmallRegion(),!0),n.addClass("hiding"),this.zoomedIn=!1,this.zoomingIn=!1,this.zoomingOut=!0,setTimeout(function(){t.zoomingOut&&n&&n._node&&(t.parentViewContainer.removeClass("zoomed"),n.removeClass("hiding"),n.addClass("hidden"),setTimeout(function(){t.zoomingOut&&(t.cleanUp(),this.zoomingOut=!1)},200))},this.getZoomTransitionTime()+0),delete this.pendingCoords,delete this.currentCoords},detachEventHandlers:function(){this.zoomNode&&(this.zoomNode.detachAll("mousemove"),this.mouseWheelHandler&&this.mouseWheelHandler.detach(),this.touchHandlers&&(this.touchHandlers.forEach(function(e){e.detach()}),delete this.touchHandlers))},cleanUp:function(){this.zoomNode&&(this.zoomNode.remove(!0),this.zoomedIn=!1,this.zoomingIn=!1,this.zoomingOut=!1,delete this.zoomNode,delete this.zoomPhotoContainerNode,delete this.pendingCoords,delete this.currentCoords,this.zoomAnimationHandle.detach())},isImageReadyToDisplay:function(e){var t;return e?(t=new Image,t.src=e,t.complete||t.naturalWidth):!1},getZoomKeyScope:function(){return this.name+this._yuid},zoomMouseMoveHandler:function(t){this.cursorCoords=[t.pageX-e.config.win.pageXOffset,t.pageY-e.config.win.pageYOffset],this.isAnimatingZoom||this.panZoomNodeToCurrentCoords()},zoomScrollWheelHandler:function(e){e.preventDefault();var t=e.wheelDeltaX,n=e.wheelDeltaY;t===undefined&&(t=-e.deltaX||0),n===undefined&&(n=-e.deltaY||0),this.panZoomNode([this.currentZoomRegion.left+t,this.currentZoomRegion.top+n])},getSizes:function(){var e=this.parentViewContainer.one(".low-res-photo"),t=this.parentViewContainer.one(".main-photo");return{small:e?e.getAttribute("src"):"",medium:t?t.getAttribute("src"):"",large:
this.getLargestSize()}},getLargestSize:function(){var e=this.appContext.flipper.isFlipped("enable-zoom-proxy"),t=this.appContext.flipper.config["zoom-proxy-prefix"],n;return e&&t?(n=this.get("photo").getLargestSize({excludeSizes:[]}),n.key==="o"&&(console.log("proxyPrefix",t,"largestSize.displayUrl",n.displayUrl),n.displayUrl=n.url=t+"http:"+n.displayUrl,console.log("proxying original",n.url))):n=this.get("photo").getLargestSize(),n},zoomIn:function(t){var n=this,r,i,s=this.getSizes(),o=this.isImageReadyToDisplay(s.medium),u=this.isImageReadyToDisplay(s.large.url),a=this.getZoomPixelRatio(),f=this.getZoomSmallRegion(),l,c,h,p=this.maxMsgNode;if(this.disableIfSmall&&f.width>=s.large.width){p||(p=this.maxMsgNode=e.Node.create('<div class="zoom-max-message">'+n.intlMessage({intlName:"photo-page-scrappy.ZOOM_MAX_MESSAGE"})+"</div>")),this.get("container").contains(p)||(p.addClass("hidden"),this.get("container").append(p)),setTimeout(function(){p&&p.inDoc()&&(p.removeClass("hidden"),this.maxMsgNodeHidingTimer&&(clearTimeout(this.maxMsgNodeHidingTimer),delete this.maxMsgNodeHidingTimer),this.maxMsgNodeHidingTimer=setTimeout(function(){p&&p.inDoc()&&p.addClass("hidden")},3e3))},0);return}e.fire("flickr:setKeyEventScope",this.getZoomKeyScope()),this.zoomingIn=!0,this.zoomAnimationHandle=e.AnimationManager.subscribe(function(){var r=n.getDeteriorationRateForEasing(),i,s,o={x:0,y:0},u={x:0,y:0},a={x:0,y:0};if(n.pendingCoords){o.x=parseInt(n.pendingCoords[0],10),o.y=parseInt(n.pendingCoords[1],10),n.currentCoords?(u.x=n.currentCoords[0],u.y=n.currentCoords[1]):(i=n.getZoomPanCoordsForCursor(t),s=n.constrainPanCoords(i),u.x=parseInt(s[0],10),u.y=parseInt(s[1],10)),o.x<u.x?a.x=u.x-Math.abs(o.x-u.x)*r:a.x=u.x+Math.abs(o.x-u.x)*r,o.y<u.y?a.y=u.y-Math.abs(o.y-u.y)*r:a.y=u.y+Math.abs(o.y-u.y)*r,a.x=parseInt(a.x,10),a.y=parseInt(a.y,10),a.x===u.x&&(o.x<u.x?a.x=u.x-1:o.x>u.x&&(a.x=u.x+1)),a.y===u.y&&(o.y<u.y?a.y=u.y-1:o.y>u.y&&(a.y=u.y+1));if(a.x!==o.x||a.y!==o.y)(n.forceGpu===!0||e.config.win.devicePixelRatio>1)&&n.forceGpu!==!1?n.zoomPhotoContainerNode.setStyle("transform","translate3d("+a.x+"px, "+a.y+"px, 0)"):n.zoomPhotoContainerNode.setStyle("transform","translate("+a.x+"px, "+a.y+"px)");n.currentCoords=[a.x,a.y],a.x===o.x&&a.y===o.y&&delete n.pendingCoords}}),this.zoomNode?(this.zoomingOut=!1,r=this.zoomNode,r.removeClass("hiding"),this.detachEventHandlers()):r=this.zoomNode=e.Node.create(this.templates("zoom-modal")({smallSrc:o?s.medium:s.small,largeSrc:u?s.large.url:""})),i=this.zoomPhotoContainerNode=r.one(".zoom-photo-container"),this.zoomImageFullWidth=s.large.width/a,this.zoomImageFullHeight=s.large.height/a,t||(t=[this.appContext.viewportData.viewport.width/2,this.appContext.viewportData.viewport.height/2],n.cursorCoords=t),l=this.getZoomPanCoordsForCursor(t),l=this.constrainPanCoords(l),c={left:l[0],top:l[1],width:this.zoomImageFullWidth,height:this.zoomImageFullHeight},i.setStyle("transition","none"),this.resizeZoomNode(f,!1),r.on("click",function(t){if(n.zoomingIn)return;t.preventDefault(),e.rapidTracker.beacon(n.name,"zoomOutClick"),n.zoomOut()}),e.one("body").append(r),i.setStyle("width",c.width),i.setStyle("height",c.height),e.soon(function(){if(n.zoomingIn){r.removeClass("hidden"),i.setStyle("transition",""),"ontouchstart"in document&&e.use("event-touch",function(){n.touchHandlers=[],n.touchHandlers.push(e.on("touchstart",function(e){e.changedTouches.length&&e.changedTouches.length===1&&(n.touching=[e.changedTouches[0].pageX,e.changedTouches[0].pageY])})),n.touchHandlers.push(e.on("touchmove",function(e){var t=e.pageX,r=e.pageY,i,s;n.touching&&e.changedTouches.length&&e.changedTouches.length===1&&(t=e.changedTouches[0].pageX,r=e.changedTouches[0].pageY,e.preventDefault(),i=t-n.touching[0],s=r-n.touching[1],n.touching=[t,r],n.panZoomNode([n.currentZoomRegion.left+i,n.currentZoomRegion.top+s]))})),n.touchHandlers.push(e.on("touchend",function(e){delete n.touching}))});if(!("ontouchstart"in document)||n.appContext.flipper.isFlipped("enable-always-bind-mouse-events-zoom-view"))r.on("mousemove",n.zoomMouseMoveHandler.bind(n)),n.mouseWheelHandler=function(){var e=n.zoomScrollWheelHandler.bind(n);return h="onwheel"in document.createElement("div")?"wheel":"mousewheel",document.addEventListener(h,e,!1),{detach:function(){document.removeEventListener(h,e,!1)}}}();n.parentViewContainer.addClass("zoomed"),n.resizeZoomNode(c,!0).then(function(){n.zoomingIn&&(n.zoomingIn=!1,n.zoomedIn=!0,n.panZoomNodeToCurrentCoords(),u||i.append('<img src="'+s.large.url+'" class="zoom-large">'))})}})},getDeteriorationRateForEasing:function(){return.2},getZoomPixelRatio:function(){return 1}})},"@VERSION@",{requires:["flickr-view","better-throttle","flickr-promise","zoom-css","hermes-template-zoom","hermes-template-zoom-modal","animation-manager"],optional:["photo-models"],langBundles:["photo-page-scrappy"]});
YUI.add("hermes-template-photo-well-media-scrappy",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s,o=t!=null?t:{};return' <div class="restricted-interstitial">\n <div class="restricted-interstitial-message">\n <h2>'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ADULT_CONTENT"},data:i}))+"</h2>\n"+((s=n["if"].call(o,t!=null?t.isSignedIn:t,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(5,i,0),data:i}))!=null?s:"")+" </div>\n </div>\n"},2:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a=e.escapeExpression;return" <p>"+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.MATURE_AUDIENCES"},data:i}))+"<br />"+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.USER_DISCRETION"},data:i}))+"</p>\n\n"+((s=n.unless.call(o,t!=null?t.isMinor:t,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")},3:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return" <p><button class='ui-button'><span>"+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SHOW_ME_THIS_CONTENT_TYPE"},data:i}))+"</span></button></p>\n <p>"+u((n.intlHTMLMessage||t&&t.intlHTMLMessage||o).call(s,{name:"intlHTMLMessage",hash:{intlName:"photo-page-scrappy.CHANGE_SAFE_SEARCH_IN_SETTINGS"},data:i}))+"</p>\n"},5:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a=e.escapeExpression;return" <p>"+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SIGNED_IN_FOR_CONTENT"},data:i}))+' <a href="//'+a((s=(s=n.host||(t!=null?t.host:t))!=null?s:u,typeof s=="function"?s.call(o,{name:"host",hash:{},data:i}):s))+'/signin/" data-track="photoWellSignInClick">'+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"common.SIGN_IN"},data:i}))+"</a></p>\n"},7:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.isVideo:t,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(11,i,0),data:i}))!=null?s:""},8:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f="function",l=e.escapeExpression;return' <div class="videoplayer main-photo" style="width:'+l((o=(o=n.width||(t!=null?t.width:t))!=null?o:a,typeof o===f?o.call(u,{name:"width",hash:{},data:i}):o))+"px; height:"+l((o=(o=n.height||(t!=null?t.height:t))!=null?o:a,typeof o===f?o.call(u,{name:"height",hash:{},data:i}):o))+'px;">'+((s=n["if"].call(u,t!=null?t.isHTML5Video:t,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</div>\n"},9:function(e,t,n,r,i){var s;return'<video id="video_1" poster="'+e.escapeExpression((s=(s=n.src||(t!=null?t.src:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"src",hash:{},data:i}):s))+'" class="video-js vjs-big-play-centered"></video>'},11:function(e,t,n,r,i){var s;return"\n"+((s=n["if"].call(t!=null?t:{},t!=null?t.showFuzzy:t,{name:"if",hash:{},fn:e.program(12,i,0),inverse:e.program(14,i,0),data:i}))!=null?s:"")},12:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return' <span class="restricted-image main-photo" style="width:'+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+"px;height:"+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+'px;">\n </span>\n'},14:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return' <span class="facade-of-protection-neue" style="width:'+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+"px;height:"+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+'px;">\n '+f((n.outlet||t&&t.outlet||u).call(o,t!=null?t["zoom-view"]:t,{name:"outlet",hash:{},data:i}))+"\n "+f((n.outlet||t&&t.outlet||u).call(o,t!=null?t["vr-overlay-view"]:t,{name:"outlet",hash:{},data:i}))+'\n </span>\n\n <img width="'+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+'" height="'+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+'" src="'+f((s=(s=n.src||(t!=null?t.src:t))!=null?s:u,typeof s===a?s.call(o,{name:"src",hash:{},data:i}):s))+'" class="low-res-photo" alt="'+f((s=(s=n.imgAltText||(t!=null?t.imgAltText:t))!=null?s:u,typeof s===a?s.call(o,{name:"imgAltText",hash:{},data:i}):s))+'">\n <img width="'+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+'" height="'+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+'" src="'+f((s=(s=n.highResSrc||(t!=null?t.highResSrc:t))!=null?s:u,typeof s===a?s.call(o,{name:"highResSrc",hash:{},data:i}):s))+'" class="main-photo is-hidden" onload="registerFirstPhoto(this)" alt="'+f((s=(s=n.imgAltText||(t!=null?t.imgAltText:t))!=null?s:u,typeof s===a?s.call(o,{name:"imgAltText",hash:{},data:i}):s))+'">\n <noscript>\n <img width="'+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+'" height="'+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+'" src="'+f((s=(s=n.highResSrc||(t!=null?t.highResSrc:t))!=null?s:u,typeof s===a?s.call(o,{name:"highResSrc",hash:{},data:i}):s))+'" class="main-photo" alt="'+f((s=(s=n.imgAltText||(t!=null?t.imgAltText:t))!=null?s:u,typeof s===a?s.call(o,{name:"imgAltText",hash:{},data:i}):s))+'">\n </noscript>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.needsInterstitial:t,{name:"if",hash
:{},fn:e.program(1,i,0),inverse:e.program(7,i,0),data:i}))!=null?s:""},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/photo-well-media-scrappy",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-photo-well-ad",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return'<a class="ad-frame" href="'+e.escapeExpression((s=(s=n.clickUrl||(t!=null?t.clickUrl:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"clickUrl",hash:{},data:i}):s))+'" data-track="ad_link_image" target="_blank">'},3:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return' <div class="ad-wrapper">\n <img width=\''+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+"' height='"+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+"' src='"+f((s=(s=n.src||(t!=null?t.src:t))!=null?s:u,typeof s===a?s.call(o,{name:"src",hash:{},data:i}):s))+'\'/>\n <a class="ad-footer" href="'+f((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||u).call(o,t!=null?t.clickUrl:t,{name:"renderTrustedMarkup",hash:{},data:i}))+'" data-track="ad_link_bottom" target="_blank">\n <h1>'+f((n.intlHTMLMessage||t&&t.intlHTMLMessage||u).call(o,{name:"intlHTMLMessage",hash:{brand:t!=null?t.brand:t,intlName:"photo-page-scrappy.FIND_OUT_MORE_AD"},data:i}))+"</h1>\n </a>\n </div>\n"},5:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return" <img width='"+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+"' height='"+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+"' src='"+f((s=(s=n.src||(t!=null?t.src:t))!=null?s:u,typeof s===a?s.call(o,{name:"src",hash:{},data:i}):s))+"' />\n"},7:function(e,t,n,r,i){return'<div class="more-info"> \n\n <span><i class="moneyball"></i> '+e.escapeExpression((n.intlHTMLMessage||t&&t.intlHTMLMessage||n.helperMissing).call(t!=null?t:{},{name:"intlHTMLMessage",hash:{brand:t!=null?t.brand:t,intlName:"photo-page-scrappy.FIND_OUT_MORE_AD"},data:i}))+"</span>\n</div>\n</a>"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o,u,a=t!=null?t:{},f=n.helperMissing,l="function",c=n.blockHelperMissing,h=((s=n["if"].call(a,t!=null?t.adFrame:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n\n";return s=(o=(o=n.adsTypeB||(t!=null?t.adsTypeB:t))!=null?o:f,u={name:"adsTypeB",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i},typeof o===l?o.call(a,u):o),n.adsTypeB||(s=c.call(t,s,u)),s!=null&&(h+=s),s=(o=(o=n.adsTypeB||(t!=null?t.adsTypeB:t))!=null?o:f,u={name:"adsTypeB",hash:{},fn:e.noop,inverse:e.program(5,i,0),data:i},typeof o===l?o.call(a,u):o),n.adsTypeB||(s=c.call(t,s,u)),s!=null&&(h+=s),h+"\n"+((s=n["if"].call(a,t!=null?t.adFrame:t,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))!=null?s:"")},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/photo-well-ad",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("photo-well-media-scrappy-view",function(e,t){var n=require("lib/flog")(t),r=500,i=500,s=40,o;o={photo:{render:function(){var t=this,n=this.get("photo"),r,i,s,o="";return t.preloadImage&&(t.preloadImage.onload=null),this.appContext.forceServerRender?(r=this.getPhotoForDisplay({canvas:{width:Number.MAX_VALUE,height:Number.MAX_VALUE}}),i=r):(r=this.getPhotoForDisplay(),i=this.getPhotoForDisplay({includeSizes:["sq","q","t","s","n"]})),n.getValue("owner")&&(n.getValue("title").trim()===""?o=this.intlMessage({intlName:"common.UNTITLED"}):o=n.getValue("title"),o+=" | "+this.intlMessage({intlName:"common.BY_USER",user:n.getValue("owner").getValue("username")})),s=this.get("container").one(".main-photo"),(!s||parseInt(s.getAttribute("width"),10)!==r.width||parseInt(s.getAttribute("height"),10)!==r.height)&&this.setContainerWithTemplate("photo-well-media-scrappy",{width:r.width,height:r.height,src:i.url,highResSrc:r.url,imgAltText:o,needsInterstitial:n.getValue("needsInterstitial"),isSignedIn:this.appContext.getViewer().signedIn,isVideo:!1,isMinor:this.appContext.getViewer().isMinor}),YUI.Env.isServer?(this.serverWidth=r.width,this.serverHeight=r.height):n.getValue("needsInterstitial")||(t.preloadImage=new Image,t.preloadImage.onload=function(){if(this.onloadFired)return;if(!t.isActiveAndInDOM())return;this.onloadFired=!0;var n,i="photoPageShowedSize",s="\u00f8";try{n=/(?:_([a-z]))?\.jpg/.exec(r.url),n&&n[1]&&(s=n[1])}catch(o){}finally{i+=String(s).toUpperCase()}e.rapidTracker.beacon(this.name,i);var u=t.get("container").one(".low-res-photo"),a=t.get("container").one(".main-photo");a.removeClass("is-hidden").show(),u.hide()},t.preloadImage.src=r.url,t.preloadImage.complete&&t.preloadImage.onload()),this}},video:{render:function(){var e=this.get("photo"),t=this.appContext.flipper.isFlipped("enable-html5-video-2016"),n=this.getPhotoForDisplay({excludeSizes:[]});return this.player?(this.player.dimension&&t?(this.player.dimension("width",n.width),this.player.dimension("height",n.height)):this.player.resize(n.width,n.height),this):(this.setContainerWithTemplate("photo-well-media-scrappy",{width:n.width,height:n.height,src:n.url,needsInterstitial:e.getValue("needsInterstitial"),isVideo:!0,isHTML5Video:t,isSignedIn:this.appContext.getViewer().signedIn,"zoom-view":""}),this)}},ad:{render:function(){var e,t;return this.adJSON?e=this.adJSON:(e=this.appContext.adManager.getAdJSON(),this.adJSON=e),t=this.getAdSize(e),this.setContainerWithTemplate("photo-well-ad",{width:t.width,height:t.height,src:e.url,clickUrl:e.clickUrl,brand:e.brand,adsTypeB:this.appContext.flipper.isFlipped("moneyball-ads-type-b"),adFrame:!0}),this}}},e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,subviewConfig:{"zoom-view":{requiredToShowOnClient:!1,requiredToShowOnServer:!1,disabled:function(){return!this.appContext.flipper.isFlipped("enable-scrappy-zoom")}},"vr-overlay-view":{requiredToShowOnClient:!0,requiredToShowOnServer:!0,destinationContainer:".photo-well-media-scrappy-view",disabled:function(){return!this.appContext.flipper.isFlipped("enable-vr")}}},initializer:function(e){return this.photoId=e.photoId,this.isAd=!!e.ad,this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this},loadState:function(){var e=this;return this.appContext.getModel("photo-models",e.photoId).then(function(t){e.set("photo",t)})},buildContainer:function(){return YUI.Env.isServer||this.set("clientRendered",!0),this.isAd?o.ad.render.call(this):o[this.get("photo").getValue("isVideo")?"video":"photo"].render.call(this),!YUI.Env.isServer&&this.subviews["vr-overlay-view"]&&this.subviews["vr-overlay-view"].get("canVr")&&this.subviews["zoom-view"]&&(this.canVR=!0,this.subviews["zoom-view"].destroy({remove:!0})),this},handleInterstitialDismissButtonClick:function(t){var r=this,i=this.get("personPreferences"),s=this.get("photo"),o=s.getValue("safetyLevel");e.rapidTracker.beacon(this.name,"restrictedContentInterstitialClick"),i.setValue("safeSearch",o),i.registry.remoteUpdate(r.appContext.auth.user.nsid).then(function(e){var t=s.registry.attributeSearch({needsInterstitial:!0});t.forEach(function(e){s.registry.getValue(e,"safetyLevel")<=i.getValue("safeSearch")&&s.registry.setValue(e,"needsInterstitial",!1)}),r.buildContainer()},function(e){n.error({err:e}),r.onError(r.intlMessage({intlName:"photo-page-scrappy.COULDNT_UPDATE_SETTINGS"}))})},onParentViewEvent:function(e,t){t&&t[0]==="photoWellResized"&&(this.get("photo").getValue("needsInterstitial")||(this.set("canvasSizeIsDirty",!0),this.buildContainer()))},activate:function(){var t=this,n,r;return this.get("photo").getValue("isVideo")&&(t.player=new e.FlickrVideoPlayer({container:t.get("container").one(".videoplayer"),model:t.get("photo"),appContext:t.appContext,videoNode:e.one("#video_1")?e.one("#video_1")._node:null}),t.player.init().then(function(){}),t.on("destroy",function(){t.player&&(t.player.destroy(),t.player=null)})),this.get("photo").getValue("needsInterstitial")||this.registerEventHandler(e.on("flickr:photo-media-well-update",function(e){t.set("canvasSizeIsDirty",!0),t.buildContainer()})),this.registerEventHandler(e.on("flickr:display-note-box",function(i){n=e.Node.create('<div class="note-box"></div>'),r=t.get("container").one(".main-photo").getXY(),t.get("container").append(n),n.setStyles({top:i.noteBoxTop+t.get("container").one(".main-photo").getDOMNode().offsetTop,left:i.noteBoxLeft,width:i.noteBoxWidth,height:i.noteBoxHeight})})),this.appContext.getViewer().signedIn&&this.appContext.getModel("person-preferences-models",t.appContext.auth.user.nsid).then(function(e){t.set("personPreferences",e),t.get("photo").getValue("needsInterstitial")&&!this.appContext.getViewer().isMinor&&t.registerEventHandler(t.get("container").one(".restricted-interstitial-message button").on("click",t.handleInterstitialDismissButtonClick,t))}),this},onError:function(t){var n=this;this.fire("subviewViewEvent","getDialogOffset",function(r){var i=e.Views.dialog.getInstance
("dialog-alert",{content:t,attrs:{title:"Error",level:"warning",confirmLabel:"OK"},parent:n,offsetLeft:r,dialogClass:"scrappy-dialog"});i.show()})},getPhotoForDisplay:function(e){var t=this.getCanvasSize(),n=this.getPixelRatio(),r,i,s;return e&&e.canvasSize&&(t=e.canvasSize),r=this.get("photo").getSizeToFit(t,e),i=Math.min(t.height/n,r.height),s=Math.min(t.width/n,r.width/r.height*i),i=Math.min(i,r.height/r.width*s),{width:Math.round(s),height:Math.round(i),url:r.url,pixelRatio:r.width/s}},getAdSize:function(e){var t=this.getCanvasSize(),n=this.getPixelRatio(),r=80,i=140,s,o;return this.appContext.flipper.isFlipped("moneyball-ads-type-b")&&(t.height-=(r+i)*n,t.width-=i*n),s=Math.min(t.height/n,e.height),o=Math.min(t.width/n,e.width/e.height*s),s=Math.min(s,e.height/e.width*o),{width:o,height:s}},getCanvasSize:function(){var e,t=this.getPixelRatio(),n,o=this.get("container"),u,a,f,l,c={width:r,height:i};return this.get("canvasSizeIsDirty")?YUI.Env.isServer||(n=this.get("container").ancestor(),u=o.getStyle("paddingTop")?parseInt(o.getStyle("paddingTop").match(/[0-9]+/)[0],10):0,a=o.getStyle("paddingBottom")?parseInt(o.getStyle("paddingBottom").match(/[0-9]+/)[0],10):0,l=s,f=s,n&&(e=n.get("region"),e.height=parseInt(n.getStyle("height").match(/[0-9]+/)[0],10)-(u+a),e.width=this.appContext.viewportData.viewport.width-(l+f))):e=this.get("cachedCanvasSize"),this.appContext.viewportData.viewport.width>0&&(c={width:this.appContext.viewportData.viewport.width,height:this.appContext.viewportData.viewport.height-240}),e||(e={top:0,left:0,bottom:i,right:r,width:c.width,height:c.height}),e.height*=t,e.width*=t,e},getPixelRatio:function(){return this.appContext.getViewer().getPixelRatio()}},{ATTRS:{canvasSizeIsDirty:{value:!0,setter:function(e){return!!e}},cachedCanvasSize:{getter:function(t){return e.merge(t)},setter:function(t){return e.merge(t)}}}})},"@VERSION@",{requires:["flickr-view","moment","flickr-video-player","vr-overlay-view","zoom-view","hermes-template-photo-well-media-scrappy","hermes-template-photo-well-ad"],optional:["photo-models"],langBundles:["common","photo-page-scrappy"]});
YUI.add("hermes-template-context-slider-photo",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){return"currentImage"},3:function(e,t,n,r,i){return"restricted-image"},5:function(e,t,n,r,i){return" <span class='play-slideshow'>▶</span>\n <span class='countdown-slideshow'></span>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f="function",l=e.escapeExpression;return'<a class="context-thumb emptyImage '+((s=n["if"].call(u,t!=null?t.currentPhoto:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+" "+((s=n["if"].call(u,t!=null?t.needsInterstitial:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'" href="'+l((o=(o=n.url||(t!=null?t.url:t))!=null?o:a,typeof o===f?o.call(u,{name:"url",hash:{},data:i}):o))+'" data-track="contextSliderNextPhotoClick" style="background-image: url('+l((o=(o=n.background||(t!=null?t.background:t))!=null?o:a,typeof o===f?o.call(u,{name:"background",hash:{},data:i}):o))+"); left: "+l((o=(o=n.left||(t!=null?t.left:t))!=null?o:a,typeof o===f?o.call(u,{name:"left",hash:{},data:i}):o))+'px" data-photo-id="'+l((o=(o=n.id||(t!=null?t.id:t))!=null?o:a,typeof o===f?o.call(u,{name:"id",hash:{},data:i}):o))+'" title="'+l((o=(o=n.title||(t!=null?t.title:t))!=null?o:a,typeof o===f?o.call(u,{name:"title",hash:{},data:i}):o))+'">\n'+((s=n["if"].call(u,t!=null?t.currentPhoto:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))!=null?s:"")+"</a>"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/context-slider-photo",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-context-slider-scrappy",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s=t!=null?t:{},o=n.helperMissing,u=e.escapeExpression;return" <div class='loadingError'>\n <p>"+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.ERROR_LOADING_CONTEXT"},data:i}))+'</p>\n <p><button href="#" class="ui-button ui-button-cta ui-button-transparent retry">'+u((n.intlMessage||t&&t.intlMessage||o).call(s,{name:"intlMessage",hash:{intlName:"common.RETRY"},data:i}))+"</button></p>\n </div>\n"},3:function(e,t,n,r,i){var s,o=t!=null?t:{};return"\n <div class='context-slider small-slider "+((s=n["if"].call(o,t!=null?t.slideshowEnabled:t,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))!=null?s:"")+'\'>\n\n <div class="wrapper is-ready clear-float small-photos">\n\n <div class="slider">\n\n'+((s=n.each.call(o,t!=null?t.previousPhotos:t,{name:"each",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,t!=null?t["is-ad"]:t,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))!=null?s:"")+"\n\n"+((s=n.each.call(o,t!=null?t.nextPhotos:t,{name:"each",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n </div>\n\n </div>\n\n </div>\n\n"+((s=n["if"].call(o,t!=null?t.showBigSlider:t,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"},4:function(e,t,n,r,i){return"slideshowEnabled"},6:function(e,t,n,r,i){var s;return(s=e.invokePartial(r["context-slider-photo"],t,{name:"context-slider-photo",data:i,indent:" ",helpers:n,partials:r,decorators:e.decorators}))!=null?s:""},8:function(e,t,n,r,i){return' <a class="context-thumb middle currentImage adThumb">Ad</a>\n'},10:function(e,t,n,r,i){var s;return(s=n.each.call(t!=null?t:{},t!=null?t.currentPhoto:t,{name:"each",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))!=null?s:""},11:function(e,t,n,r,i){var s;return(s=e.invokePartial(r["context-slider-photo"],t,{name:"context-slider-photo",data:i,indent:" ",helpers:n,partials:r,decorators:e.decorators}))!=null?s:""},13:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a=e.escapeExpression;return" <div class='context-slider big-slider "+((s=n["if"].call(o,t!=null?t.slideshowEnabled:t,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))!=null?s:"")+'\'>\n\n <span class="nav nav-l">\n <span class="hide-text">←</span>\n </span>\n\n <div class="wrapper clear-float">\n\n <div class="slider">\n\n '+a((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||u).call(o,t!=null?t.previousBigPhotos:t,{name:"renderTrustedMarkup",hash:{},data:i}))+"\n\n"+((s=n["if"].call(o,t!=null?t["is-ad"]:t,{name:"if",hash:{},fn:e.program(14,i,0),inverse:e.program(16,i,0),data:i}))!=null?s:"")+"\n "+a((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||u).call(o,t!=null?t.nextBigPhotos:t,{name:"renderTrustedMarkup",hash:{},data:i}))+'\n\n </div>\n\n </div>\n\n <span class="nav nav-r">\n <span class="hide-text">→</span>\n </span>\n\n </div>\n'},14:function(e,t,n,r,i){return' <a class="context-thumb middle currentImage adThumb">Ad</a>\n'},16:function(e,t,n,r,i){var s;return(s=n.each.call(t!=null?t:{},t!=null?t.currentPhoto:t,{name:"each",hash:{},fn:e.program(17,i,0),inverse:e.noop,data:i}))!=null?s:""},17:function(e,t,n,r,i){var s;return(s=e.invokePartial(r["context-slider-photo"],t,{name:"context-slider-photo",data:i,indent:" ",helpers:n,partials:r,decorators:e.decorators}))!=null?s:""},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s;return(s=n["if"].call(t!=null?t:{},t!=null?t.loadingError:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))!=null?s:""},usePartial:!0,useData:!0}),r={};e.Array.each(["context-slider-photo","context-slider-photo","context-slider-photo","context-slider-photo"],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/context-slider-scrappy",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base","hermes-template-context-slider-photo","hermes-template-context-slider-photo","hermes-template-context-slider-photo","hermes-template-context-slider-photo"]});
YUI.add("hermes-template-context-image",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return'\n <a data-loaded="false" style="left:'+e.escapeExpression((s=(s=n.left||(t!=null?t.left:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"left",hash:{},data:i}):s))+';float:left;display:block;position:absolute;background-color:gray;height:40px;width:86px;border:1px solid transparent;" href="#">\n \n </a>\n\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s;return(s=n.each.call(t!=null?t:{},t!=null?t.images:t,{name:"each",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:""},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/context-image",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-context-text",function(e,t){var n=e.Template.Handlebars.revive({compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return'\n\n<span data-loaded="true" style="left:'+f((s=(s=n.left||(t!=null?t.left:t))!=null?s:u,typeof s===a?s.call(o,{name:"left",hash:{},data:i}):s))+';float:left;display:block;position:absolute;height:40px;width:86px;border:1px solid #ccc;" href="#">\n '+f((s=(s=n.text||(t!=null?t.text:t))!=null?s:u,typeof s===a?s.call(o,{name:"text",hash:{},data:i}):s))+"\n</span>\n\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/context-text",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("context-slider-scrappy-view",function(e,t){var n=require("lib/flog")(t);e.FlickrView.create(this.name,e.FlickrView,[],{langBundles:this.details.langBundles,initializer:function(t){return this.photoId=t.photoId,this.contextData=e.clone(t.context,!0),this.currentPosition=0,this.numberOfPhotosEitherSideInViewPort=3,this.numberOfPositionsToMove=3,this.numberOfPositionsToBuffer=3,this.positionsLoadedNext=0,this.positionsLoadedPrev=0,this.positionsAheadLimit=25,this.numberOfPositionsToPreFetch=t.numberOfPositionsToPreFetch,this.numberOfPositionsToRefetchAt=t.numberOfPositionsToRefetchAt,this.photoWidth=50,this.photoMargin=15,this.photoWidthPlusMargin=65,this.photoWidthSmall=20,this.photoMarginSmall=5,this.photoWidthPlusMarginSmall=25,this.atStart=!1,this.atEnd=!1,this.isAd=!!t.ad,this.photosInSlider={},!YUI.Env.isServer&&e.StorageHelper.getItem("slideshowInProgress")==="true"?this.slideshowInProgress=!0:this.slideshowInProgress=!1,this.slideshowDwellSeconds=5,this.get("container").get("innerHTML")===""&&this.setContainerHTML(""),this},loadState:function(){var t=this,r=t.contextData,i=new e.FlickrPromise({photo:t.appContext.getModel("photo-models",t.photoId),context:t.appContext.getModel(r.modelName,r.params)});return i.then(function(e){t.set("photo",e.photo),t.set("contextModel",e.context)},function(e){if(!e.getModelFailure&&e.code!==1||r.modelName==="photostream-models")throw e;return t.contextData.modelName="photostream-models",t.appContext.getModel("photo-models",t.photoId).then(function(e){return t.set("photo",e),t.contextData.params.id=t.get("photo").getValue("owner").getValue("nsid"),t.appContext.getModel("photostream-models",t.contextData.params).then(function(e){t.set("contextModel",e)})})}).then(function(){var n=e.merge(r.params,{photoId:t.photoId,numNext:t.numberOfPositionsToPreFetch,numPrev:t.numberOfPositionsToPreFetch,refetchAt:t.numberOfPositionsToRefetchAt});return t.get("contextModel").getValue("photoContextList").getContext(n)}).then(function(e){t.positionsLoadedNext=t.positionsLoadedNext+e.next.length,t.positionsLoadedPrev=t.positionsLoadedPrev+e.previous.length,t.photosInSlider[0]=t.get("photo").getValue("id"),t.set("initialContextResponse",e)},function(e){if(e.notInContext||e.code===99)return t.get("contextModel").setValue("photoContextList",[]),t.contextData.modelName="photostream-models",t.contextData.params.id=t.get("photo").getValue("owner").getValue("nsid"),t.loadState();throw e}).then(null,function(e){throw n.error("There was a problem loading the context slider data.",{err:e}),e})},assignContextPositionsAndAddToDOM:function(e){var t=this.get("container"),n=t.one(".small-slider .slider"),r=t.one(".big-slider .slider"),i=e.contextResponse,s,o,u;for(u=0;u<i.previous.length;u++)o=-1-u,typeof this.photosInSlider[o]=="undefined"&&(s=i.previous[u].toJSON(),this.photosInSlider[o]=i.previous[u].getValue("id"),s.left=o*this.photoWidthPlusMarginSmall,s.background=this.getBackgroundImage(i.previous[u]),s.url=this.getContextifiedURLForPhoto(i.previous[u]),n.append(this.templates("context-slider-photo")(s)),s.left=o*this.photoWidthPlusMargin,r.append(this.templates("context-slider-photo")(s)));for(u=0;u<i.next.length;u++)o=1+u,typeof this.photosInSlider[o]=="undefined"&&(s=i.next[u].toJSON(),this.photosInSlider[o]=i.next[u].getValue("id"),s.left=o*this.photoWidthPlusMarginSmall,s.background=this.getBackgroundImage(i.next[u]),s.url=this.getContextifiedURLForPhoto(i.next[u]),n.append(this.templates("context-slider-photo")(s)),s.left=o*this.photoWidthPlusMargin,r.append(this.templates("context-slider-photo")(s)))},checkBoundary:function(e){var t=e.contextResponse,n=e.requestedPreviousAmount,r=e.requestedNextAmount,i=e.positionWhenChecking,s=this.get("contextModel").getValue("photoContextList"),o=this.get("container"),u=o.one(".nav-l"),a=o.one(".nav-r");this.currentPosition-this.numberOfPhotosEitherSideInViewPort>this.positionsLoadedNext&&this.move(-Math.abs(this.currentPosition-this.positionsLoadedNext)),this.currentPosition<0&&Math.abs(this.currentPosition+this.numberOfPhotosEitherSideInViewPort)>this.positionsLoadedPrev&&this.move(Math.abs(this.currentPosition+this.numberOfPhotosEitherSideInViewPort)-this.positionsLoadedPrev),s.hasMinBoundary()&&t.previous.length-Math.abs(i)<=this.numberOfPhotosEitherSideInViewPort&&n>0&&(u.hide(),this.atStart=!0),s.hasMaxBoundary()&&t.next.length-Math.abs(i)<=this.numberOfPhotosEitherSideInViewPort&&r>0&&(a.hide(),this.atEnd=!0)},buildContainer:function(){function u(e,r,i,s){e>3&&(e=3);var o=t[r],u="";for(var a=0;a<e;a++){var f=o[a],l=f.toJSON(),c=(a+1)*n.photoWidthPlusMarginSmall*s;l.background=n.getBackgroundImage(f),l.currentPhoto=!1,l.url=n.getContextifiedURLForPhoto(f),l.left=c/n.photoWidthPlusMarginSmall*n.photoWidthPlusMargin,u+=n.templates("context-slider-photo")(l),l.left=c,i.push(l),n.photosInSlider[""+(a+1)*s]=l}return u}var e=this.get("photo").toJSON(),t=this.get("initialContextResponse"),n=this;e.background=this.getBackgroundImage(this.get("photo")),e.left=0,e.currentPhoto=!0,e.url=this.getContextifiedURLForPhoto(this.get("photo"));var r=[],i=[],s="",o="";this.positionsLoadedNext>0&&(o=u(this.positionsLoadedNext,"next",r,1)),this.positionsLoadedPrev>0&&(s=u(this.positionsLoadedPrev,"previous",i,-1)),this.setContainerWithTemplate("context-slider-scrappy",{previousPhotos:i,nextPhotos:r,previousBigPhotos:s,nextBigPhotos:o,currentPhoto:[e],slideshowEnabled:this.appContext.flipper.isFlipped("enable-photopage-slideshow"),"is-ad":this.isAd,showBigSlider:!this.appContext.forceServerRender}),this.isAd&&(t.next.pop(),t.next=[this.get("photo")].concat(t.next))},buildErrorContainer:function(){this.setContainerWithTemplate("context-slider-scrappy",{loadingError:!0})},activate:function(){var t=this,n=t.get("container"),r=n.one(".big-slider"),i=!1,s,o,u=this.appContext.getViewer().prefs.keyboardShortcutsEnabled,a=this.numberOfPhotosEitherSideInViewPort;return this.assignContextPositionsAndAddToDOM({contextResponse:this.get("initialContextResponse"
),requestedPreviousAmount:a,requestedNextAmount:a}),this.checkBoundary({contextResponse:this.get("initialContextResponse"),requestedPreviousAmount:a,requestedNextAmount:a,positionWhenChecking:this.currentPosition}),e.StorageHelper.getItem("showBigContextSlider")==="true"?(n.addClass("hover"),setTimeout(function(){n.setStyle("transition","opacity 300ms ease-out, background-position 150ms ease-out"),n.all(".context-slider").setStyle("transition","opacity 300ms ease-out")},300)):(n.setStyle("transition","opacity 300ms ease-out, background-position 150ms ease-out"),n.all(".context-slider").setStyle("transition","opacity 300ms ease-out")),this.appContext.flipper.isFlipped("enable-photopage-slideshow")&&(this.slideshowInProgress&&this.startSlideshow(),this.registerEventHandler(this.get("container").all(".currentImage").on("click",function(e){e.preventDefault(),t.slideshowInProgress?t.stopSlideshow():t.startSlideshow()}))),e.use("transition",function(e){var a=t.get("container").one(".nav-l"),f=t.get("container").one(".nav-r");a&&t.registerEventHandler(a.on("click",function(){n.setStyle("transition","opacity 300ms ease-out"),e.rapidTracker.beacon(t.name,"contextSliderMoveLeftClick"),t.move(-1*t.numberOfPositionsToMove)})),f&&t.registerEventHandler(f.on("click",function(){n.setStyle("transition","opacity 300ms ease-out"),e.rapidTracker.beacon(t.name,"contextSliderMoveRightClick"),t.move(1*t.numberOfPositionsToMove)})),u&&(t.attachKeyEvent("down:188",e.betterThrottle(function(r){e.rapidTracker.beacon(t.name,"contextSliderMoveLeftKeyPress"),n.addClass("hover"),t.bringIntoFocus(),t.atStart||t.move(-1*t.numberOfPositionsToMove)},20)),t.attachKeyEvent("down:190",e.betterThrottle(function(r){e.rapidTracker.beacon(t.name,"contextSliderMoveRightKeyPress"),n.addClass("hover"),t.bringIntoFocus(),t.atEnd||t.move(1*t.numberOfPositionsToMove)},20))),t.registerEventHandler(n.on("hover",function(){i=!0,clearTimeout(s),s=setTimeout(function(){i&&n.addClass("hover")},150)},function(){i=!1,clearTimeout(o),e.StorageHelper.setItem("showBigContextSlider","false"),o=setTimeout(function(){i||(n.setStyles({width:"100%",height:"80px"}),r.setStyle("height","80px"),n.removeClass("hover"),setTimeout(function(){n.removeAttribute("style"),r.removeAttribute("style")},300))},500)})),t.registerEventHandler(n.all(".context-thumb:not(.currentImage)").on("click",function(){e.StorageHelper.setItem("showBigContextSlider","true")}))}),this},startSlideshow:function(){function s(){if(r===0&&t.slideshowInProgress){t.appContext.flapp.navigate(n);return}i.all(".currentImage .countdown-slideshow").set("text",r),r-=1}this.slideshowInProgress=!0;var t=this,n=this.getContextifiedURLForPhoto(this.get("initialContextResponse").next[0]),r=this.slideshowDwellSeconds,i=this.get("container");e.StorageHelper.setItem("slideshowInProgress","true"),i.all(".currentImage .play-slideshow").hide(),s(),this.slideshowTimer=setInterval(function(){s()},1e3)},stopSlideshow:function(){this.slideshowInProgress=!1,this.get("container").all(".currentImage .countdown-slideshow").set("text",""),this.get("container").all(".currentImage .play-slideshow").show(),clearInterval(this.slideshowTimer),e.StorageHelper.setItem("slideshowInProgress","false")},move:function(t){var n=this,r=this.get("contextModel").getValue("photoContextList"),i=t>0?"right":"left",s=this.get("container"),o=s.one(".big-slider .slider"),u=s.one(".small-slider .slider"),a,f,l,c,h,p=s.one(".nav-l"),d=s.one(".nav-r"),v;if(i==="right"&&this.currentPosition-this.positionsLoadedNext>this.positionsAheadLimit)return!1;if(i==="left"&&this.currentPosition<=0&&Math.abs(this.currentPosition)-this.positionsLoadedPrev>this.positionsAheadLimit)return!1;s.addClass("hover"),this.currentPosition+=t,v=this.currentPosition,typeof this.photosInSlider[this.currentPosition+this.numberOfPhotosEitherSideInViewPort+1]!="undefined"&&(d.show(),this.atEnd=!1),typeof this.photosInSlider[this.currentPosition-(this.numberOfPhotosEitherSideInViewPort+1)]!="undefined"&&(p.show(),this.atStart=!1),a=this.currentPosition*this.photoWidthPlusMargin*-1,f=this.currentPosition*this.photoWidthPlusMarginSmall*-1,o.transition({left:a+"px",duration:.3,easing:"ease-out"}),u.setStyle("left",f+"px"),i==="right"?c=this.currentPosition+this.numberOfPositionsToMove+this.numberOfPositionsToBuffer:i==="left"&&(c=this.currentPosition-(this.numberOfPositionsToMove+this.numberOfPositionsToBuffer)),l=typeof this.photosInSlider[c]=="undefined",l&&(h=e.merge(n.contextData.params,{photoId:this.get("photo").getValue("id"),refetchAt:this.numberOfPositionsToRefetchAt}),i==="right"?h.numNext=Math.abs(c)+this.numberOfPositionsToPreFetch:i==="left"&&(h.numPrev=Math.abs(c)+this.numberOfPositionsToPreFetch),r.getContext(h).then(function(e){n.positionsLoadedNext=typeof h.numNext!="undefined"?h.numNext:n.positionsLoadedNext,n.positionsLoadedPrev=typeof h.numPrev!="undefined"?h.numPrev:n.positionsLoadedPrev,n.assignContextPositionsAndAddToDOM({contextResponse:e,requestedPreviousAmount:h.numPrev,requestedNextAmount:h.numNext}),n.checkBoundary({contextResponse:e,requestedPreviousAmount:h.numPrev,requestedNextAmount:h.numNext,positionWhenChecking:v})},function(e){n.checkBoundary({contextResponse:{previous:[],next:[]},requestedPreviousAmount:h.numPrev,requestedNextAmount:h.numNext,positionWhenChecking:v})}))},getBackgroundImage:function(e){var t,n=this.appContext.getViewer().getPixelRatio(),r;return t={width:this.photoWidth*n,height:this.photoWidth*n},r={cropToFit:!0,includeSizes:["sq","t","q","s","n"]},e.getSizeToFit(t,r).url},getContextifiedURLForPhoto:function(t){if(t){var n=e.URLHelper.getPhotoPage({photoId:t.getValue("id"),pathAlias:t.getValue("owner").getValue("pathAlias"),contextSuffix:this.get("contextModel").getValue("urlSuffix")});return n}},beforeDestroy:function(){clearInterval(this.slideshowTimer)}})},"@VERSION@",{requires:["flickr-view","hermes-template-context-slider-scrappy","hermes-template-context-slider-photo","hermes-template-context-image","hermes-template-context-text"
,"context-slider-scrappy-css","storage-helper"],optional:[],langBundles:["common","photo-page-scrappy"]});
YUI.add("hermes-template-photo-engagement",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return' <div class="button butt">\n <a href="'+f((s=(s=n.marketplaceLicensingUrl||(t!=null?t.marketplaceLicensingUrl:t))!=null?s:u,typeof s===a?s.call(o,{name:"marketplaceLicensingUrl",hash:{},data:i}):s))+'" target="_blank" data-photoid="'+f((s=(s=n.photoId||(t!=null?t.photoId:t))!=null?s:u,typeof s===a?s.call(o,{name:"photoId",hash:{},data:i}):s))+'" data-ownerid="'+f((s=(s=n.ownerId||(t!=null?t.ownerId:t))!=null?s:u,typeof s===a?s.call(o,{name:"ownerId",hash:{},data:i}):s))+'" class="photoListLicenseButton" data-track="subPhotoLicenseButtonClick" title="'+f((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.BUY"},data:i}))+'">'+f((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.BUY"},data:i}))+"\n </a>\n </div>\n"},3:function(e,t,n,r,i){var s,o=t!=null?t:{};return'\n <div class="wallart'+((s=n["if"].call(o,t!=null?t.isWallartLowQuality:t,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n <a href="#" title="'+e.escapeExpression((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.CREATE_WALLART_WITH_PHOTO"},data:i}))+'">\n <i class="ui-icon-wallart"></i>\n </a>\n </div>\n\n'},4:function(e,t,n,r,i){return" dimmed"},6:function(e,t,n,r,i){return" "+e.escapeExpression((n.outlet||t&&t.outlet||n.helperMissing).call(t!=null?t:{},t!=null?t["photo-well-scrappy-edit-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"},8:function(e,t,n,r,i){return" "+e.escapeExpression((n.outlet||t&&t.outlet||n.helperMissing).call(t!=null?t:{},t!=null?t["fave-view"]:t,{name:"outlet",hash:{},data:i}))+"\n"},10:function(e,t,n,r,i){return"disabled"},12:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a=e.escapeExpression;return' <a href="'+a((s=(s=n.downloadLink||(t!=null?t.downloadLink:t))!=null?s:u,typeof s=="function"?s.call(o,{name:"downloadLink",hash:{},data:i}):s))+'" class="server-only-link" title="'+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.DOWNLOAD_THIS_VIDEO"},data:i}))+'">\n'},14:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a=e.escapeExpression;return' <a href="'+a((s=(s=n.downloadLink||(t!=null?t.downloadLink:t))!=null?s:u,typeof s=="function"?s.call(o,{name:"downloadLink",hash:{},data:i}):s))+'" title="'+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.DOWNLOAD_THIS_PHOTO"},data:i}))+'">\n'},16:function(e,t,n,r,i){return' <div class="display-obscured-download-sizes">\n '+e.escapeExpression((n.renderTrustedMarkup||t&&t.renderTrustedMarkup||n.helperMissing).call(t!=null?t:{},t!=null?t.downloadItems:t,{name:"renderTrustedMarkup",hash:{},data:i}))+"\n </div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{};return((s=n["if"].call(o,t!=null?t.showLicenseButton:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,t!=null?t.canCreateWallart:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n"+((s=n["if"].call(o,t!=null?t.viewerIsOwner:t,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.program(8,i,0),data:i}))!=null?s:"")+"\n"+e.escapeExpression((n.outlet||t&&t.outlet||n.helperMissing).call(o,t!=null?t["share-view"]:t,{name:"outlet",hash:{},data:i}))+'\n\n<div class="download '+((s=n.unless.call(o,t!=null?t.downloadingAvailable:t,{name:"unless",hash:{},fn:e.program(10,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n'+((s=n["if"].call(o,t!=null?t.isVideo:t,{name:"if",hash:{},fn:e.program(12,i,0),inverse:e.program(14,i,0),data:i}))!=null?s:"")+' <i class="ui-icon-download"></i>\n </a>\n\n'+((s=n["if"].call(o,t!=null?t.downloadItems:t,{name:"if",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))!=null?s:"")+"\n</div>\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/photo-engagement",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-download-dialog",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return' "'+e.escapeExpression(e.lambda((s=t!=null?t.photo:t)!=null?s.title:s,t))+'"\n'},3:function(e,t,n,r,i){var s;return' <i class="ui-icon-tiny-'+e.escapeExpression(e.lambda((s=t!=null?t.photo:t)!=null?s.license:s,t))+'cc"></i>\n'},5:function(e,t,n,r,i){return' <i class="ui-icon-tiny-government"></i>\n'},7:function(e,t,n,r,i){return' <i class="ui-icon-tiny-noKnown"></i>\n'},9:function(e,t,n,r,i){return' <i class="ui-icon-tiny-copyright"> </i>\n'},11:function(e,t,n,r,i){var s,o=e.escapeExpression;return' <span class="license license-'+o(e.lambda((s=t!=null?t.photo:t)!=null?s.license:s,t))+'">'+o((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(t!=null?t:{},{name:"intlMessage",hash:{intlName:"photo-page-scrappy.SOME_RIGHTS_RESERVED"},data:i}))+"</span>\n"},13:function(e,t,n,r,i){var s,o=e.escapeExpression;return' <span class="license license-'+o(e.lambda((s=t!=null?t.photo:t)!=null?s.license:s,t))+'">'+o((n.licenseString||t&&t.licenseString||n.helperMissing).call(t!=null?t:{},(s=t!=null?t.photo:t)!=null?s.license:s,{name:"licenseString",hash:{},data:i}))+"</span>\n"},15:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f="function",l=e.escapeExpression;return' <li class="'+l((o=(o=n.label||(t!=null?t.label:t))!=null?o:a,typeof o===f?o.call(u,{name:"label",hash:{},data:i}):o))+((s=n["if"].call(u,t!=null?t.selected:t,{name:"if",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))!=null?s:"")+'">\n <a href="'+l((o=(o=n.url||(t!=null?t.url:t))!=null?o:a,typeof o===f?o.call(u,{name:"url",hash:{},data:i}):o))+'" data-track="downloadSizeSelected'+l((o=(o=n.label||(t!=null?t.label:t))!=null?o:a,typeof o===f?o.call(u,{name:"label",hash:{},data:i}):o))+'">\n <span class="label">'+l((o=(o=n.label||(t!=null?t.label:t))!=null?o:a,typeof o===f?o.call(u,{name:"label",hash:{},data:i}):o))+'</span>\n <span class="resolution">'+l((o=(o=n.width||(t!=null?t.width:t))!=null?o:a,typeof o===f?o.call(u,{name:"width",hash:{},data:i}):o))+" × "+l((o=(o=n.height||(t!=null?t.height:t))!=null?o:a,typeof o===f?o.call(u,{name:"height",hash:{},data:i}):o))+"</span>\n </a>\n </li>\n"},16:function(e,t,n,r,i){return" selected"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a=e.escapeExpression,f=e.lambda;return'<div class="download-dialog">\n <h2>'+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.DOWNLOAD_PHOTO"},data:i}))+'</h2>\n <p class="title">\n'+((s=n["if"].call(o,(s=t!=null?t.photo:t)!=null?s.title:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+" by "+a(f((s=(s=t!=null?t.photo:t)!=null?s.owner:s)!=null?s.displayname:s,t))+'\n </p>\n <p class="license-info">\n <a href="'+a((n.configVal||t&&t.configVal||u).call(o,"licenseUrls",(s=t!=null?t.photo:t)!=null?s.license:s,{name:"configVal",hash:{},data:i}))+'" class="license-url" target="_newtab">\n'+((s=n["if"].call(o,t!=null?t.licenseIsCreativeCommons:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.licenseisGovt:t,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.licenseisNoLic:t,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.licenseisCopy:t,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))!=null?s:"")+((s=n["if"].call(o,t!=null?t.licenseIsCreativeCommons:t,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.program(13,i,0),data:i}))!=null?s:"")+' </a>\n </p>\n <ul class="sizes">\n'+((s=n.each.call(o,t!=null?t.sizes:t,{name:"each",hash:{},fn:e.program(15,i,0),inverse:e.noop,data:i}))!=null?s:"")+" </ul>\n <p class='buttons'>\n <a href=\""+a(f((s=t!=null?t.photo:t)!=null?s.url:s,t))+'/sizes/l" class="all-sizes" data-track="viewAllSizesClick">'+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.VIEW_ALL_SIZES"},data:i}))+'</a>\n <button class="ui-dialog-button ui-dialog-button-neutral ui-dialog-button-done" data-track="downloadClick"><span>'+a((n.intlMessage||t&&t.intlMessage||u).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.DOWNLOAD"},data:i}))+'</span></button>\n </p>\n <button class="ui-dialog-button ui-dialog-button-neutral ui-dialog-button-close hide-text"><span> </span></button>\n</div>'},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/download-dialog",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("hermes-template-scrappy-download-menu",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return(s=n.each.call(t!=null?t:{},t!=null?t.sizes:t,{name:"each",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))!=null?s:""},2:function(e,t,n,r,i){var s,o=t!=null?t:{},u=n.helperMissing,a="function",f=e.escapeExpression;return' <li class="'+f((s=(s=n.label||(t!=null?t.label:t))!=null?s:u,typeof s===a?s.call(o,{name:"label",hash:{},data:i}):s))+'">\n <a href="'+f((s=(s=n.url||(t!=null?t.url:t))!=null?s:u,typeof s===a?s.call(o,{name:"url",hash:{},data:i}):s))+'" data-track="downloadSizeSelected'+f((s=(s=n.label||(t!=null?t.label:t))!=null?s:u,typeof s===a?s.call(o,{name:"label",hash:{},data:i}):s))+'" class="download-image-size">\n <span class="label">'+f((s=(s=n.label||(t!=null?t.label:t))!=null?s:u,typeof s===a?s.call(o,{name:"label",hash:{},data:i}):s))+'</span>\n <span class="resolution">('+f((s=(s=n.width||(t!=null?t.width:t))!=null?s:u,typeof s===a?s.call(o,{name:"width",hash:{},data:i}):s))+" × "+f((s=(s=n.height||(t!=null?t.height:t))!=null?s:u,typeof s===a?s.call(o,{name:"height",hash:{},data:i}):s))+")</span>\n </a>\n </li>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o=t!=null?t:{},u=e.escapeExpression;return'<ul class="sizes">\n'+((s=n["if"].call(o,t!=null?t.showDownloadSizes:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+' <li><a href="'+u(e.lambda((s=t!=null?t.photo:t)!=null?s.url:s,t))+'/sizes/l" class="all-sizes server-only-link" data-track="viewAllSizesClick">'+u((n.intlMessage||t&&t.intlMessage||n.helperMissing).call(o,{name:"intlMessage",hash:{intlName:"photo-page-scrappy.VIEW_ALL_SIZES"},data:i}))+"</a></li>\n</ul>"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/scrappy-download-menu",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});
YUI.add("wallart-helper",function(e){"use strict";e.WallartHelper=function(e){this.validWallartTypes=["canvas","mounted"],this.appContext=e,this.dimensions=[{canvas:{FLICKR_2_1:[975,825,750,600,693,543,28.5,28.5,112.5,112.5,75,75,93.75],FLICKR_2_3:[1125,1125,900,900,1050,1050,75,75,150,150,75,75,125],FLICKR_2_2:[1275,1050,1050,825,1250,950,75,75,150,150,75,75,125],FLICKR_2_4:[1725,1425,1500,1200,1850,1450,75,75,150,150,75,75,125],FLICKR_2_5:[2025,1725,1800,1500,2250,1850,75,75,150,150,75,75,125],FLICKR_2_6:[2475,1725,2250,1500,2850,1850,75,75,150,150,75,75,125]},mounted:{FLICKR_2_9:[1e3,800,974.666,774.666,950.668,750.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_9_1:[1e3,800,974.666,774.666,950.668,750.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_9_2:[1e3,800,974.666,774.666,950.668,750.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_9_3:[1e3,800,974.666,774.666,950.668,750.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_11:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_11_1:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_11_2:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_11_3:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10:[1400,1100,1375.334,1075.334,1367.112,1067.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10_1:[1400,1100,1375.334,1075.334,1367.112,1067.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10_2:[1400,1100,1375.334,1075.334,1367.112,1067.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10_3:[1400,1100,1375.334,1075.334,1367.112,1067.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12:[2e3,1600,1975.334,1575.334,1967.112,1567.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12_1:[2e3,1600,1975.334,1575.334,1967.112,1567.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12_2:[2e3,1600,1975.334,1575.334,1967.112,1567.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12_3:[2e3,1600,1975.334,1575.334,1967.112,1567.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13:[3e3,2e3,2975.334,1975.334,2967.112,1967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13_1:[3e3,2e3,2975.334,1975.334,2967.112,1967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13_2:[3e3,2e3,2975.334,1975.334,2967.112,1967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13_3:[3e3,2e3,2975.334,1975.334,2967.112,1967.112,4.111,4.111,12.333,12.333,100,100,100]}},{canvas:{FLICKR_2_1:[825,975,600,750,543,693,28.5,28.5,112.5,112.5,75,75,93.75],FLICKR_2_3:[1125,1125,900,900,1050,1050,75,75,150,150,75,75,125],FLICKR_2_2:[1050,1275,825,1050,950,1250,75,75,150,150,75,75,125],FLICKR_2_4:[1425,1725,1200,1500,1450,1850,75,75,150,150,75,75,125],FLICKR_2_5:[1725,2025,1500,1800,1850,2250,75,75,150,150,75,75,125],FLICKR_2_6:[1725,2475,1500,2250,1850,2850,75,75,150,150,75,75,125]},mounted:{FLICKR_2_9:[800,1e3,774.666,974.666,750.668,950.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_9_1:[800,1e3,774.666,974.666,750.668,950.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_9_2:[800,1e3,774.666,974.666,750.668,950.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_9_3:[800,1e3,774.666,974.666,750.668,950.668,12.667,12.667,12.667,12.667,100,100,100],FLICKR_2_11:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_11_1:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_11_2:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_11_3:[1200,1200,1175.334,1175.334,1167.112,1167.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10:[1100,1400,1075.334,1375.334,1067.112,1367.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10_1:[1100,1400,1075.334,1375.334,1067.112,1367.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10_2:[1100,1400,1075.334,1375.334,1067.112,1367.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_10_3:[1100,1400,1075.334,1375.334,1067.112,1367.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12:[1600,2e3,1575.334,1975.334,1567.112,1967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12_1:[1600,2e3,1575.334,1975.334,1567.112,1967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12_2:[1600,2e3,1575.334,1975.334,1567.112,1967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_12_3:[1600,2e3,1575.334,1975.334,1567.112,1967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13:[2e3,3e3,1975.334,2975.334,1967.112,2967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13_1:[2e3,3e3,1975.334,2975.334,1967.112,2967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13_2:[2e3,3e3,1975.334,2975.334,1967.112,2967.112,4.111,4.111,12.333,12.333,100,100,100],FLICKR_2_13_3:[2e3,3e3,1975.334,2975.334,1967.112,2967.112,4.111,4.111,12.333,12.333,100,100,100]}}]},e.WallartHelper.prototype.getNewSku=function(e,t){var n,r,i=e.slice(e.length-1);if(t.size){["FLICKR_2_1","FLICKR_2_3","FLICKR_2_2","FLICKR_2_4","FLICKR_2_5","FLICKR_2_6"].indexOf(e)>-1?r="canvas":["FLICKR_2_9","FLICKR_2_11","FLICKR_2_10","FLICKR_2_12","FLICKR_2_13"].indexOf(e)>-1?r="mounted":["FLICKR_2_9_1","FLICKR_2_11_1","FLICKR_2_10_1","FLICKR_2_12_1","FLICKR_2_13_1"].indexOf(e)>-1?r="mounted":["FLICKR_2_9_2","FLICKR_2_11_2","FLICKR_2_10_2","FLICKR_2_12_2","FLICKR_2_13_2"].indexOf(e)>-1?r="mounted":["FLICKR_2_9_3","FLICKR_2_11_3","FLICKR_2_10_3","FLICKR_2_12_3","FLICKR_2_13_3"].indexOf(e)>-1&&(r="mounted");switch(t.size){case"8x10":case"10x8":r==="canvas"?n="FLICKR_2_1":r==="mounted"&&(n="FLICKR_2_9",this.convertSkuTo(e,"type")==="mounted"?["1","2","3"].indexOf(i)>-1?n+="_"+i:n+="_1":n+="_1");break;case"12x12":r==="canvas"?n="FLICKR_2_3":r==="mounted"&&(n="FLICKR_2_11",this.convertSkuTo(e,"type")==="mounted"?["1","2","3"].indexOf(i)>-1?n+="_"+i:n+="_1":n+="_1");break;case"11x14":case"14x11":r==="canvas"?n="FLICKR_2_2":r==="mounted"&&(n="FLICKR_2_10",this.convertSkuTo
(e,"type")==="mounted"?["1","2","3"].indexOf(i)>-1?n+="_"+i:n+="_1":n+="_1");break;case"16x20":case"20x16":r==="canvas"?n="FLICKR_2_4":r==="mounted"&&(n="FLICKR_2_12",this.convertSkuTo(e,"type")==="mounted"?["1","2","3"].indexOf(i)>-1?n+="_"+i:n+="_1":n+="_1");break;case"20x24":case"24x20":r==="canvas"&&(n="FLICKR_2_5");break;case"20x30":case"30x20":r==="canvas"?n="FLICKR_2_6":r==="mounted"&&(n="FLICKR_2_13",this.convertSkuTo(e,"type")==="mounted"?["1","2","3"].indexOf(i)>-1?n+="_"+i:n+="_1":n+="_1")}}if(t.style)switch(t.style){case"canvas":if(e==="FLICKR_2_9"||e==="FLICKR_2_9_1"||e==="FLICKR_2_9_2"||e==="FLICKR_2_9_3")n="FLICKR_2_1";else if(e==="FLICKR_2_11"||e==="FLICKR_2_11_1"||e==="FLICKR_2_11_2"||e==="FLICKR_2_11_3")n="FLICKR_2_3";else if(e==="FLICKR_2_10"||e==="FLICKR_2_10_1"||e==="FLICKR_2_10_2"||e==="FLICKR_2_10_3")n="FLICKR_2_2";else if(e==="FLICKR_2_12"||e==="FLICKR_2_12_1"||e==="FLICKR_2_12_2"||e==="FLICKR_2_12_3")n="FLICKR_2_4";else if(e==="FLICKR_2_13"||e==="FLICKR_2_13_1"||e==="FLICKR_2_13_2"||e==="FLICKR_2_13_3")n="FLICKR_2_6";break;case"mounted":e==="FLICKR_2_1"?n="FLICKR_2_9_1":e==="FLICKR_2_3"?n="FLICKR_2_11_1":e==="FLICKR_2_2"?n="FLICKR_2_10_1":e==="FLICKR_2_4"?n="FLICKR_2_12_1":e==="FLICKR_2_5"?n="FLICKR_2_12_1":e==="FLICKR_2_6"&&(n="FLICKR_2_13_1")}if(t.material)switch(t.material){case"lustre":if(e==="FLICKR_2_9"||e==="FLICKR_2_9_1"||e==="FLICKR_2_9_2"||e==="FLICKR_2_9_3")n="FLICKR_2_9_1";else if(e==="FLICKR_2_11"||e==="FLICKR_2_11_1"||e==="FLICKR_2_11_2"||e==="FLICKR_2_11_3")n="FLICKR_2_11_1";else if(e==="FLICKR_2_10"||e==="FLICKR_2_10_1"||e==="FLICKR_2_10_2"||e==="FLICKR_2_10_3")n="FLICKR_2_10_1";else if(e==="FLICKR_2_12"||e==="FLICKR_2_12_1"||e==="FLICKR_2_12_2"||e==="FLICKR_2_12_3")n="FLICKR_2_12_1";else if(e==="FLICKR_2_13"||e==="FLICKR_2_13_1"||e==="FLICKR_2_13_2"||e==="FLICKR_2_13_3")n="FLICKR_2_13_1";break;case"glossy":if(e==="FLICKR_2_9"||e==="FLICKR_2_9_1"||e==="FLICKR_2_9_2"||e==="FLICKR_2_9_3")n="FLICKR_2_9_2";else if(e==="FLICKR_2_11"||e==="FLICKR_2_11_1"||e==="FLICKR_2_11_2"||e==="FLICKR_2_11_3")n="FLICKR_2_11_2";else if(e==="FLICKR_2_10"||e==="FLICKR_2_10_1"||e==="FLICKR_2_10_2"||e==="FLICKR_2_10_3")n="FLICKR_2_10_2";else if(e==="FLICKR_2_12"||e==="FLICKR_2_12_1"||e==="FLICKR_2_12_2"||e==="FLICKR_2_12_3")n="FLICKR_2_12_2";else if(e==="FLICKR_2_13"||e==="FLICKR_2_13_1"||e==="FLICKR_2_13_2"||e==="FLICKR_2_13_3")n="FLICKR_2_13_2";break;case"matte":if(e==="FLICKR_2_9"||e==="FLICKR_2_9_1"||e==="FLICKR_2_9_2"||e==="FLICKR_2_9_3")n="FLICKR_2_9_3";else if(e==="FLICKR_2_11"||e==="FLICKR_2_11_1"||e==="FLICKR_2_11_2"||e==="FLICKR_2_11_3")n="FLICKR_2_11_3";else if(e==="FLICKR_2_10"||e==="FLICKR_2_10_1"||e==="FLICKR_2_10_2"||e==="FLICKR_2_10_3")n="FLICKR_2_10_3";else if(e==="FLICKR_2_12"||e==="FLICKR_2_12_1"||e==="FLICKR_2_12_2"||e==="FLICKR_2_12_3")n="FLICKR_2_12_3";else if(e==="FLICKR_2_13"||e==="FLICKR_2_13_1"||e==="FLICKR_2_13_2"||e==="FLICKR_2_13_3")n="FLICKR_2_13_3"}return n},e.WallartHelper.prototype.getArtDimensions=function(e,t){var n={renderedWidth:0,renderedHeight:1,shownWidth:2,shownHeight:3,guarenteedWidth:4,guarenteeHeight:5,safetyWidth:6,safetyHeight:7,bleedWidth:8,bleedHeight:9,optimumDPI:10,minimumDPI:11,depth:12},r,i=[];r=this.dimensions;switch(e){case"FLICKR_2_1":i=r[t].canvas.FLICKR_2_1;break;case"FLICKR_2_9":case"FLICKR_2_9_1":case"FLICKR_2_9_2":case"FLICKR_2_9_3":i=r[t].mounted.FLICKR_2_9;break;case"FLICKR_2_3":i=r[t].canvas.FLICKR_2_3;break;case"FLICKR_2_11":case"FLICKR_2_11_1":case"FLICKR_2_11_2":case"FLICKR_2_11_3":i=r[t].mounted.FLICKR_2_11;break;case"FLICKR_2_2":i=r[t].canvas.FLICKR_2_2;break;case"FLICKR_2_10":case"FLICKR_2_10_1":case"FLICKR_2_10_2":case"FLICKR_2_10_3":i=r[t].mounted.FLICKR_2_10;break;case"FLICKR_2_4":i=r[t].canvas.FLICKR_2_4;break;case"FLICKR_2_12":case"FLICKR_2_12_1":case"FLICKR_2_12_2":case"FLICKR_2_12_3":i=r[t].mounted.FLICKR_2_12;break;case"FLICKR_2_5":i=r[t].canvas.FLICKR_2_5;break;case"FLICKR_2_6":i=r[t].canvas.FLICKR_2_6;break;case"FLICKR_2_13":case"FLICKR_2_13_1":case"FLICKR_2_13_2":case"FLICKR_2_13_3":i=r[t].mounted.FLICKR_2_13}return{map:n,dimensions:i}},e.WallartHelper.prototype.isCC=function(e){return e.getValue("photoSource")===2?!0:!1},e.WallartHelper.prototype.isMK=function(e){return e.getValue("photoSource")===3?!0:!1},e.WallartHelper.prototype.getCorrectedLargestSize=function(e){var t,n,r;return e.getValue("oWidth")&&e.getValue("oHeight")?t={width:e.getValue("oWidth"),height:e.getValue("oHeight")}:t=e.getLargestSize({excludeSizes:[]}),r={width:t.width,height:t.height},n=e.getValue("rotation"),Math.abs(n)%180!==0&&(t.width=r.height,t.height=r.width),t},e.WallartHelper.prototype.getInitialSku=function(e,t){var n,r,i=["FLICKR_2_4","FLICKR_2_12_1","FLICKR_2_12_2","FLICKR_2_12_3"],s;return this.wallartModel=e,e.getValue("photo").getValue("oWidth")&&e.getValue("photo").getValue("oHeight")?s={width:e.getValue("photo").getValue("oWidth"),height:e.getValue("photo").getValue("oHeight")}:s=this.getCorrectedLargestSize(e.getValue("photo")),s.width>=s.height?r=0:r=1,e.setValue("isCC",this.isCC(e)),e.setValue("isMK",this.isMK(e)),n=this.getLargestSizeWallartSku(s,r,t,i),t==="mounted"&&n.match(/(FLICKR_)[0-9]{1,2}_[0-9]{1,2}_[0-9]{1,2}/g)&&(n=n.slice(0,-1)+"1"),{sku:n,orientation:r}},e.WallartHelper.prototype.getLargestSizeWallartSku=function(e,t,n,r){var i,s,o,u=!1;s=this.dimensions,r||(r=[]);for(o in s[t][n]){if(e.width>=s[t][n][o][0]&&e.height>=s[t][n][o][1]){i=o;if(r.indexOf(o)>-1)break;continue}if(!i){u=!0;break}break}if(u){u=!1;for(o in s[t].canvas){if(!(e.width>=s[t].canvas[o][0]&&e.height>=s[t].canvas[o][1])){i||(i=o);break}i=o}}return i},e.WallartHelper.prototype.convertSkuTo=function(e,t,n,r){var i;n||(n=0),r||(r=!1);if(t==="size")switch(e){case"FLICKR_2_1":case"FLICKR_2_9":case"FLICKR_2_9_1":case"FLICKR_2_9_2":case"FLICKR_2_9_3":n===0?i="8x10":n===1&&(i="10x8");break;case"FLICKR_2_3":case"FLICKR_2_11":case"FLICKR_2_11_1":case"FLICKR_2_11_2":case"FLICKR_2_11_3":i="12x12";break;case"FLICKR_2_2":case"FLICKR_2_10"
:case"FLICKR_2_10_1":case"FLICKR_2_10_2":case"FLICKR_2_10_3":n===0?i="11x14":n===1&&(i="14x11");break;case"FLICKR_2_4":case"FLICKR_2_12":case"FLICKR_2_12_1":case"FLICKR_2_12_2":case"FLICKR_2_12_3":n===0?i="16x20":n===1&&(i="20x16");break;case"FLICKR_2_5":n===0?i="20x24":n===1&&(i="24x20");break;case"FLICKR_2_6":case"FLICKR_2_13":case"FLICKR_2_13_1":case"FLICKR_2_13_2":case"FLICKR_2_13_3":n===0?i="20x30":n===1&&(i="30x20")}else if(t==="size-copy")switch(e){case"FLICKR_2_1":case"FLICKR_2_9":case"FLICKR_2_9_1":case"FLICKR_2_9_2":case"FLICKR_2_9_3":n===0?i='8" x 10"':n===1&&(i='10" x 8"');break;case"FLICKR_2_3":case"FLICKR_2_11":case"FLICKR_2_11_1":case"FLICKR_2_11_2":case"FLICKR_2_11_3":i='12" x 12"';break;case"FLICKR_2_2":case"FLICKR_2_10":case"FLICKR_2_10_1":case"FLICKR_2_10_2":case"FLICKR_2_10_3":n===0?i='11" x 14"':n===1&&(i='14" x 11"');break;case"FLICKR_2_4":case"FLICKR_2_12":case"FLICKR_2_12_1":case"FLICKR_2_12_2":case"FLICKR_2_12_3":n===0?i='16" x 20"':n===1&&(i='20" x 16"');break;case"FLICKR_2_5":n===0?i='20" x 24"':n===1&&(i='24" x 20"');break;case"FLICKR_2_6":case"FLICKR_2_13":case"FLICKR_2_13_1":case"FLICKR_2_13_2":case"FLICKR_2_13_3":n===0?i='20" x 30"':n===1&&(i='30" x 20"')}else if(t==="type")switch(e){case"FLICKR_2_1":case"FLICKR_2_3":case"FLICKR_2_2":case"FLICKR_2_4":case"FLICKR_2_5":case"FLICKR_2_6":i="canvas";break;case"FLICKR_2_9":case"FLICKR_2_9_1":case"FLICKR_2_9_2":case"FLICKR_2_9_3":case"FLICKR_2_11":case"FLICKR_2_11_1":case"FLICKR_2_11_2":case"FLICKR_2_11_3":case"FLICKR_2_10":case"FLICKR_2_10_1":case"FLICKR_2_10_2":case"FLICKR_2_10_3":case"FLICKR_2_12":case"FLICKR_2_12_1":case"FLICKR_2_12_2":case"FLICKR_2_12_3":case"FLICKR_2_13":case"FLICKR_2_13_1":case"FLICKR_2_13_2":case"FLICKR_2_13_3":i="mounted"}else if(t==="product-description")switch(e){case"FLICKR_2_1":i={title:"wallart.CANVAS_WRAP",description:["","wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_8X10":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_10X8"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2_PREVIEW");break;case"FLICKR_2_3":i={title:"wallart.CANVAS_WRAP",description:["wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_12X12","wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2"]},r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2_PREVIEW");break;case"FLICKR_2_2":i={title:"wallart.CANVAS_WRAP",description:["","wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_11X14":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_14X11"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2_PREVIEW");break;case"FLICKR_2_4":i={title:"wallart.CANVAS_WRAP",description:["","wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_16X20":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_20X16"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2_PREVIEW");break;case"FLICKR_2_5":i={title:"wallart.CANVAS_WRAP",description:["","wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_20X24":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_24X20"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2_PREVIEW");break;case"FLICKR_2_6":i={title:"wallart.CANVAS_WRAP",description:["","wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_20X30":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_1_30X20"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_CANVAS_PART_2_PREVIEW");break;case"FLICKR_2_9":case"FLICKR_2_9_1":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE_KICKSTAND"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_8X10":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_10X8"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE_KICKSTAND_PREVIEW");break;case"FLICKR_2_9_2":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY_KICKSTAND"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_8X10":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_10X8"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY_KICKSTAND_PREVIEW");break;case"FLICKR_2_9_3":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE_KICKSTAND"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_8X10":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_10X8"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE_KICKSTAND_PREVIEW");break;case"FLICKR_2_10":case"FLICKR_2_10_1":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE_KICKSTAND"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_11X14":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_14X11"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE_KICKSTAND_PREVIEW");break;case"FLICKR_2_10_2":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY_KICKSTAND"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_11X14":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_14X11"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY_KICKSTAND_PREVIEW");break;case"FLICKR_2_10_3":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE_KICKSTAND"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_11X14":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_14X11"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE_KICKSTAND_PREVIEW"
);break;case"FLICKR_2_11":case"FLICKR_2_11_1":i={title:"wallart.PHOTO_MOUNT",description:["wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_12X12","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE"]};break;case"FLICKR_2_11_2":i={title:"wallart.PHOTO_MOUNT",description:["wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_12X12","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY"]},r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY_PREVIEW");break;case"FLICKR_2_11_3":i={title:"wallart.PHOTO_MOUNT",description:["wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_12X12","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE"]},r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE_PREVIEW");break;case"FLICKR_2_12":case"FLICKR_2_12_1":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_16X20":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_20X16"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE_PREVIEW");break;case"FLICKR_2_12_2":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_16X20":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_20X16"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY_PREVIEW");break;case"FLICKR_2_12_3":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_16X20":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_20X16"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE_PREVIEW");break;case"FLICKR_2_13":case"FLICKR_2_13_1":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_20X30":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_30X20"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_LUSTRE_PREVIEW");break;case"FLICKR_2_13_2":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_20X30":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_30X20"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_GLOSSY_PREVIEW");break;case"FLICKR_2_13_3":i={title:"wallart.PHOTO_MOUNT",description:["","wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE"]},n===0?i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_20X30":n===1&&(i.description[0]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_1_30X20"),r&&(i.description[1]="wallart.PRODUCT_DESCRIPTION_MOUNTED_PART_2_MATTE_PREVIEW")}else if(t==="material")switch(e){case"FLICKR_2_9":case"FLICKR_2_9_1":case"FLICKR_2_11":case"FLICKR_2_11_1":case"FLICKR_2_10":case"FLICKR_2_10_1":case"FLICKR_2_12":case"FLICKR_2_12_1":case"FLICKR_2_13":case"FLICKR_2_13_1":i="lustre";break;case"FLICKR_2_9_2":case"FLICKR_2_11_2":case"FLICKR_2_10_2":case"FLICKR_2_12_2":case"FLICKR_2_13_2":i="glossy";break;case"FLICKR_2_9_3":case"FLICKR_2_11_3":case"FLICKR_2_10_3":case"FLICKR_2_12_3":case"FLICKR_2_13_3":i="matte"}else if(t==="material-pretty")switch(e){case"FLICKR_2_9":case"FLICKR_2_9_1":case"FLICKR_2_11":case"FLICKR_2_11_1":case"FLICKR_2_10":case"FLICKR_2_10_1":case"FLICKR_2_12":case"FLICKR_2_12_1":case"FLICKR_2_13":case"FLICKR_2_13_1":i="wallart.PREMIUM_LUSTRE";break;case"FLICKR_2_9_2":case"FLICKR_2_11_2":case"FLICKR_2_10_2":case"FLICKR_2_12_2":case"FLICKR_2_13_2":i="wallart.GLOSSY";break;case"FLICKR_2_9_3":case"FLICKR_2_11_3":case"FLICKR_2_10_3":case"FLICKR_2_12_3":case"FLICKR_2_13_3":i="wallart.MATTE"}return i},e.WallartHelper.prototype.isValidWallartType=function(e){return typeof e=="string"&&this.validWallartTypes.indexOf(e)>-1},e.WallartHelper.prototype.getCreationsThumbInfo=function(e,t){var n,r,i,s,o,u;return n=this.convertSkuTo(e,"type",t),i=this.convertSkuTo(e,"size",t),s=this.convertSkuTo(e,"size-copy",t),r=this.convertSkuTo(e,"product-description",t),i==="12x12"?o="square":o=t===0?"landscape":"portrait",r||(r={title:""}),u={type:n,size:i,sizeCopy:s,typeCopy:r.title,layout:o},u},e.WallartHelper.prototype.isPhotoWallartable=function(e,t){var n,r=[],i=[],s=[],o=[],u,a,f=[];u=this.getCorrectedLargestSize(e),t||(u.width>=u.height?t=0:t=1);for(a in this.dimensions[t].canvas)u.width>=this.dimensions[t].canvas[a][0]&&u.height>=this.dimensions[t].canvas[a][1]&&f.indexOf(a)<0&&(r.push(a),i.push(this.convertSkuTo(a,"size",t)),s.push("canvas"),o.push("canvas"+this.convertSkuTo(a,"size",t)));for(a in this.dimensions[t].mounted)u.width>=this.dimensions[t].mounted[a][0]&&u.height>=this.dimensions[t].mounted[a][1]&&f.indexOf(a)<0&&(r.push(a),i.push(this.convertSkuTo(a,"size",t)),s.push("mounted"),o.push("mounted"+this.convertSkuTo(a,"size",t)));return n={skus:r,sizes:i,types:s,typeAndSize:o},n}},"@VERSION@",{affinity:"",requires:[],optional:[]});
YUI.add("hermes-template-signup-modal",function(e,t){var n=e.Template.Handlebars.revive({1:function(e,t,n,r,i){var s;return" "+e.escapeExpression((s=(s=n.signUpHeaderClass||(t!=null?t.signUpHeaderClass:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"signUpHeaderClass",hash:{},data:i}):s))},3:function(e,t,n,r,i){var s;return" style=\"background-image:url('"+e.escapeExpression((s=(s=n.signUpHeaderImage||(t!=null?t.signUpHeaderImage:t))!=null?s:n.helperMissing,typeof s=="function"?s.call(t!=null?t:{},{name:"signUpHeaderImage",hash:{},data:i}):s))+"')\""},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i){var s,o,u=t!=null?t:{},a=n.helperMissing,f="function",l=e.escapeExpression;return'<div class="signup-modal-body">\n <div class="head'+((s=n["if"].call(u,t!=null?t.signUpHeaderClass:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))!=null?s:"")+'"'+((s=n["if"].call(u,t!=null?t.signUpHeaderImage:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))!=null?s:"")+'></div>\n <h3 class="signup-title">'+l((o=(o=n.signUpTitle||(t!=null?t.signUpTitle:t))!=null?o:a,typeof o===f?o.call(u,{name:"signUpTitle",hash:{},data:i}):o))+'</h3>\n <p class="signup-message">'+l((o=(o=n.signUpMessage||(t!=null?t.signUpMessage:t))!=null?o:a,typeof o===f?o.call(u,{name:"signUpMessage",hash:{},data:i}):o))+'</p>\n <button class="large action signup-button">'+l((n.intlMessage||t&&t.intlMessage||a).call(u,{name:"intlMessage",hash:{intlName:"common.SIGN_UP_WITH_YAHOO"},data:i}))+'</button>\n</div>\n<div class="signup-modal-footer">\n <span>'+l((n.intlMessage||t&&t.intlMessage||a).call(u,{name:"intlMessage",hash:{intlName:"common.HAVE_YAHOO_ACCOUNT"},data:i}))+'</span>\n <a href="#" class="signin-link">'+l((n.intlMessage||t&&t.intlMessage||a).call(u,{name:"intlMessage",hash:{intlName:"common.SIGN_IN"},data:i}))+"</a>\n</div>\n"},useData:!0}),r={};e.Array.each([],function(t){var n=e.Template.get("hermes/"+t);n&&(r[t]=n)}),e.Template.register("hermes/signup-modal",function(t,i){return i=i||{},i.partials=i.partials?e.merge(r,i.partials):r,n(t,i)})},"@VERSION@",{requires:["template-base","handlebars-base"]});