YUI.add("list-proxy",function(e){function i(e,t,n){this.registry=e,this.attrName=n,this.attrDef=this.registry.attributes[n],this.id=t,this.isListProxy=!0}function s(e,r){e[r==="min"?n:t]=!0}function o(e,t){return e+JSON.stringify(t)}function u(e){return r[e]}function a(e,t){r[e]=t}function f(e){delete r[e]}function l(t,n,r,i){if(!i||!e.Lang.isFunction(i.run))return e.Promise.reject("[list-proxy] `_cacheFetches` fetchFcn.run is not a function");var s=o(t,n),l=u(s);return l?l:(a(s,i.run.call(i,n,r).then(function(e){return f(s),e},function(e){throw f(s),e})),u(s))}function c(t,n,r){var i=e.merge({},t),s=n.getValue(i.id,r),o=s.getList(),u=-1,a=s.hasMinBoundary&&s.hasMinBoundary(),f=s.hasMaxBoundary&&s.hasMaxBoundary(),c,h,p,d,v,m,g=n.attributes[r].contextFetch.listFetcher,y=i.numNext,b=i.numPrev;return i.refetchAt=typeof i.refetchAt!="undefined"?i.refetchAt:5,o.some(function(e,t){return e.getValue("id")===i.listItemId&&(u=t+1),!e.registry.exists(e.id)})||u===1&&!a||u===o.length&&!f||u===-1?(i.numPrev=i.numPrev+i.refetchAt,i.numNext=i.numNext+i.refetchAt,l("context",i,n.appContext,g)):(c=u+i.numNext,h=o.length,p=o[0].getValue("id"),d=o[h-1].getValue("id"),v=o.slice(0,u===1?0:u-1).reverse().slice(0,i.numPrev),m=o.slice(u,c),c>h&&u<i.numPrev&&!a&&!f?l("context",i,n.appContext,g):c>h&&!f?(i.photoId=d,i.numPrev=0,i.numNext=c-h,l("context",i,n.appContext,g).then(function(e){return{previous:v,next:m.concat(e.next).slice(0,y)}})):u<=i.numPrev&&!a?(i.photoId=p,i.numNext=0,i.numPrev=i.numPrev-u+1,l("context",i,n.appContext,g).then(function(e){return{previous:v.concat(e.previous).slice(0,b),next:m}})):new e.Promise(function(e){e({previous:v,next:m}),u>=o.length-i.numNext&&i.refetchAt>0&&!f&&(i.photoId=d,i.numPrev=0,i.numNext=i.refetchAt,l("context",i,n.appContext,g)),u-1<=i.numPrev&&i.refetchAt>0&&!a&&(i.photoId=p,i.numPrev=i.refetchAt,i.numNext=0,l("context",i,n.appContext,g))}))}function h(e,t,n){var r,i;for(r=t;r<n;r++){i=e[r];if(typeof i=="undefined"||!i.registry.exists(i.id))return!1}return!0}function p(t,n,r){var i=e.merge({},t),s=n.getValue(i.id,r),o,u,a=s.getList();o=i.perPage*(i.page-1),u=i.perPage*(i.page-1)+i.perPage;if(s.hasMinBoundary&&s.hasMinBoundary()&&a.length>=u||s.hasMaxBoundary&&s.hasMaxBoundary()&&s.hasMinBoundary&&s.hasMinBoundary())if(h(a,o,u)||!n.attributes[r].pageFetch)return e.when(a.slice(o,u));return l("page",i,n.appContext,n.attributes[r].pageFetch.listFetcher)}function d(t,n,r){var i=n.getValue(t.id,r).getList(),s,o;return s=t.offset,o=t.offset+t.limit,i.length>=o&&h(i,s,o)?e.when(i.slice(s,o)):l("range",t,n.appContext,n.attributes[r].rangeFetch.listFetcher)}var t="hasMaxBoundary",n="hasMinBoundary",r;i.prototype={getPage:function(t){var n=e.merge({page:1,perPage:20},t,this.attrDef.pageFetch);return n.id=this.id,e.ListProxyStatic.fetchListByPage(n,this.registry,this.attrName)},getRange:function(t){var n=e.merge({offset:0,limit:10},t,this.attrDef.rangeFetch);return n.id=this.id,e.ListProxyStatic.fetchListByRange(n,this.registry,this.attrName)},getContext:function(t){var n=e.merge({numPrev:10,numNext:10},t,this.attrDef.contextFetch);return n.id=this.id,n.listItemId=t[n.listItemIdField],e.ListProxyStatic.fetchListByContext(n,this.registry,this.attrName)},getList:function(){return this.registry._data[this.id][this.attrName]||[]},appendToListMulti:function(t){var n=e.clone(this.registry._data[this.id][this.attrName])||[];t.forEach(function(e){n.push(e)}),n.hasMinBoundary=this.hasMinBoundary(),n.hasMaxBoundary=this.hasMaxBoundary(),this.registry.setValue(this.id,this.attrName,n,!1)},appendToList:function(t){var n=e.clone(this.registry._data[this.id][this.attrName])||[];n.push(t),n.hasMinBoundary=this.hasMinBoundary(),n.hasMaxBoundary=this.hasMaxBoundary(),this.registry.setValue(this.id,this.attrName,n,!1)},prependToList:function(e){var t=this.registry._data[this.id][this.attrName]||[];t.unshift(e)},getFromListByID:function(t,n){var r=this.registry._data[this.id][this.attrName]||[],i=!1;return e.Array.some(r,function(e){e[n||"id"]===t&&(i=e)}),i?i:!1},removeFromList:function(t,n){var r=this.registry._data[this.id][this.attrName]||[],i,s=0;if(r.length===0)return;e.Array.some(r,function(e){return s++,e[n||"id"]===t});if(s===r.length&&r[s-1][n||"id"]!==t)return;s>0&&(i=r.slice(0,s-1).concat(r.slice(s)),i.hasMinBoundary=this.hasMinBoundary(),i.hasMaxBoundary=this.hasMaxBoundary(),this.registry.setValue(this.id,this.attrName,i))},setMinBoundary:function(){this.getList()[n]=!0},hasMinBoundary:function(){return!!this.getList()[n]},setMaxBoundary:function(){this.getList()[t]=!0},hasMaxBoundary:function(){return!!this.getList()[t]},toJSON:function(){var t=[];return e.Array.each(this.getList(),function(e){t.push(e.toJSON())}),t}},r={},e.ListProxy=i,e.ListProxyStatic={setBoundary:s,fetchListByContext:c,fetchListByPage:p,fetchListByRange:d}},"@VERSION@");
YUI.add("api-helper",function(e){function f(){return t.join(",")}function l(){return n.join(",")}function c(){return r.join(",")}function h(){return i.join(",")}function p(){return s.join(",")}function d(){return o.join(",")}function v(){t=t.concat(u),i=i.concat(u),o=o.concat(u)}function m(t){function v(e){return n++,e.getValue("id")===d}var n=0,r,i=t.model,s=t.next,o=t.prev,u=t.hasMin,a=t.hasMax,f=t.current,l=t.numNext,c=t.numPrev,h,p,d=i.getValue("id");return f.some(v)?n===1&&s.length===0?r=o.concat(f):n===f.length&&o.length===0?r=f.concat(s):n<o.length&&f.length-n<s.length?r=o.concat([i],s):(r=f,p=o.slice(0),p.some(function(e){return!r.some(function(t){return t.getValue("id")===e.getValue("id")})})?r=r.slice(n-1):p=[],h=s.slice(0),h.every(function(e){return r.some(function(t){return t.getValue("id")===e.getValue("id")})})?h=[]:r=r.slice(0,n),r=p.concat(r,h)):s.length===0&&l===0?r=o.concat([i],f):o.length===0&&c===0?r=f.concat([i],s):r=o.concat([i],s),(a||l>0&&s.length<l)&&e.ListProxyStatic.setBoundary(r,"max"),(u||c>0&&o.length<c)&&e.ListProxyStatic.setBoundary(r,"min"),r}function g(t){var n=t.current,r=t.newPages,i=t.perPage,s=t.pageNum,o=t.hasMin,u=t.hasMax,a=t.totalItems,f=[],l=[],c=[];return n.length===0?(c=r,s===1&&e.ListProxyStatic.setBoundary(c,"min"),typeof a!="undefined"&&a<=s*i&&e.ListProxyStatic.setBoundary(c,"max")):(o&&s!==1&&(f=n.slice(0,s*i),l=n.slice(s*i)),r.length<i||a===i*s?l=[]:a&&a>n.length&&u?(f=f.length===0?n.slice(0,-1*(s-1)*i):f,l=n.slice(-1*(s-1)*i)):u&&(l=l.length===0?n:l),c=f.concat(r,l),(o||s===1)&&e.ListProxyStatic.setBoundary(c,"min"),(u||r.length<i||a===i*s)&&e.ListProxyStatic.setBoundary(c,"max")),c}function y(t){if(!t)return t;var n=t;try{var r=/^\/\/c\d(\.staticflickr\.com\/\d\/\d+\/)(\d+)(_.+\.jpg)$/,i=t.match(r),s=e.config.flickr.farm["flickr-cdns"];if(i&&s&&s.length>0){var o=i[2],u=parseInt(o,10)%s.length+1;s.indexOf(u)>-1&&(n="//c"+u+i[1]+i[2]+i[3])}}catch(a){}return n}function b(e){var t=/^([a-z]+\:)(\/\/(farm[0-9]{1,2}|c[0-9])\.static[\.]?flickr.com)/g,n;if(typeof e!="string"){for(n in e)e[n]=e[n]?e[n].replace(t,"$2"):null,e[n]=y(e[n]);return e}return y(e.replace(t,"$2"))}function w(t,n){var r={};return!n&&t.id?e.Object.each(t,function(n,i){var s=/^url_([a-z]+)$/.exec(i),o;s&&(o=s[1],r[o]={displayUrl:b(t["url_"+o]),width:parseInt(t["width_"+o],10),height:parseInt(t["height_"+o],10)},t["url_"+o+"_cdn"]?(YUI.Env.isServer||(e.config.flickr.cdnUrls=!0),r[o].url=b(t["url_"+o+"_cdn"])):(YUI.Env.isServer||(e.config.flickr.cdnUrls=!1),r[o].url=b(t["url_"+o])))}):t&&t[0]&&t[0].location?e.Object.each(t,function(e,t){var n=/_[a-z0-9]+_([a-z])\./.exec(e.location);if(n&&e.width>0&&e.width>0&&n[1]!=="o"){var i=n[1],s=i,o=new RegExp("_("+i+").$");s=i==="m"?"s":i,s=i==="l"?"m":i,r[s]={displayUrl:b(e.location),width:parseInt(e.width,10),height:parseInt(e.height,10),url:b(e.location.replace(o,"_"+s+".")),key:s}}}):e.Array.each(t,function(t,n,i){if(t.media==="video")return;var s=/sizes\/(\w+)\/?$/.exec(t.url)[1];if(!s)return;r[s]={displayUrl:b(t.source),width:parseInt(t.width,10),height:parseInt(t.height,10)},t.source_cdn?(YUI.Env.isServer||(e.config.flickr.cdnUrls=!0),r[s].url=b(t.source_cdn)):(YUI.Env.isServer||(e.config.flickr.cdnUrls=!1),r[s].url=b(t.source))}),r}function E(e){var t,n=!1;for(t=0;t<e.length;t++)e[t].label==="HD MP4"&&(n=!0);return n}function S(e,t){var n={id:e.id,title:e.title,description:e.description&&e.description.content||"",sizes:w(e),isHD:E(e),needsInterstitial:e.needsInterstitial,canComment:e.canComment,canPublicComment:e.publiceditability?e.publiceditability.cancomment:0,canAddMeta:e.canAddMeta||e.canAddmeta,safetyLevel:e.safetyLevel,license:e.license,mediaType:e.media,secret:e.secret,rotation:e.rotation,hasInvalidColorspaceForPrint:e.hasInvalidColorspaceForPrint,oWidth:e.oWidth?parseInt(e.oWidth,10):0,oHeight:e.oHeight?parseInt(e.oHeight,10):0,isMarketplacePrintable:e.isMarketplacePrintable?e.isMarketplacePrintable:undefined,isMarketplaceLicensable:e.isMarketplaceLicensable?e.isMarketplaceLicensable:undefined,marketplaceLicensingUrl:e.marketplaceLicensingUrl?e.marketplaceLicensingUrl:""};return n.owner={pathAlias:e.pathalias||e.pathAlias,username:e.ownername,realname:e.realname,id:t||e.owner,buddyicon:b(e.iconurls),isAdFree:e.isAdFree,isPro:e.ispro,dateCreated:e.ownerDatecreate},n.curation=T(e),n.engagement={id:e.id,ownerNsid:t||e.owner,isFaved:e.isfavorite||!1,canShare:e.canShare,canDownload:e.canDownload,commentCount:e.countComments,faveCount:e.countFaves,viewCount:e.countViews},n.stats={id:e.id,dateTaken:e.datetaken,datePosted:e.dateupload,takenGranularity:e.datetakengranularity,isDateTakenUnknown:e.datetakenunknown||e.datetakenunknown==="1"||e.datetakenunknown===1},n}function x(t){var n;return t.owner&&t.owner.accountId?n={id:t.id,pathAlias:t.owner.accountIdAlias||t.owner.accountId,username:t.owner.accountIdAlias,realname:t.owner.name,nsid:t.owner.accountId,ownerNsid:t.owner.accountId,isFaved:!1,faveCount:t.stats.favesCount,commentCount:t.stats.commentsCount,title:t.title,description:t.description,mediaType:undefined,license:undefined,sizes:e.APIHelper.response.parsePhotoSize(t.sizes),needsInterstitial:t.needsInterstitial||undefined,canComment:undefined,isMarketplaceLicensable:undefined,marketplaceLicensingUrl:undefined,hasInvalidColorspaceForPrint:!1,oWidth:parseInt(t.sizes[0].width,10),oHeight:parseInt(t.sizes[0].height,10),isMarketplacePrintable:undefined}:(n={id:t.id,pathAlias:t.pathalias||t.owner,username:t.ownername,realname:t.realname,nsid:t.owner,ownerNsid:t.owner,isFaved:t.isfavorite||!1,faveCount:t.countFaves,commentCount:t.countComments,title:t.title,description:t.description&&t.description.content||"",mediaType:t.media,license:t.license,sizes:e.APIHelper.response.parsePhotoSize(t),needsInterstitial:t.needsInterstitial,canComment:t.canComment,isMarketplaceLicensable:t.isMarketplaceLicensable?t.isMarketplaceLicensable:undefined,marketplaceLicensingUrl:t.marketplaceLicensingUrl?t.marketplaceLicensingUrl:"",hasInvalidColorspaceForPrint
:t.hasInvalidColorspaceForPrint?t.hasInvalidColorspaceForPrint:!1,oWidth:t.oWidth?parseInt(t.oWidth,10):0,oHeight:t.oHeight?parseInt(t.oHeight,10):0,isMarketplacePrintable:t.isMarketplacePrintable?t.isMarketplacePrintable:undefined},n=e.merge(n,T(t))),n}function T(e){var t;return e.curation?(t={id:e.id,is3MP:!!e.curation.is_3_megapixels,ownerCountryApproved:!!e.curation.owner_country_approved,ownerFollowedByCurators:!!e.curation.owner_followed_by_curators,ownerAdded:!!e.curation.owner_added,ownerPassedOver:!!e.curation.owner_passed_over},e.curation.status_color&&e.curation.status_color!=="white"&&(t.statusColor=e.curation.status_color)):t=null,t}function N(t){var n=[],r=t.photos,i=t.photoModelRegistry,s=t.personModelRegistry,o=t.photoEngagementModelRegistry,u=t.photoStatsModelRegistry,a=t.photoCurationModelRegistry,f=t.ownerID,l=t.existingPerson,c={},h={},p={},d={};return r.length&&e.Array.each(r,function(e){var t=S(e,f),r=t.owner.id;c[r]||(l?c[r]=l:(s.addOrUpdate(t.owner),c[r]=s.proxy(r))),h[e.id]||(o.addOrUpdate(t.engagement),h[e.id]=o.proxy(e.id)),p[e.id]||(u.addOrUpdate(t.stats),p[e.id]=u.proxy(e.id)),a&&!d[e.id]&&t.curation&&(a.addOrUpdate(t.curation),d[e.id]=a.proxy(e.id)),t.owner=c[r],t.engagement=h[e.id],t.stats=p[e.id],t.curation=d[e.id],i.addOrUpdate(t),n.push(i.proxy(e.id))}),n}function C(t){var n=[],r=t.pages,i=t.pageModelRegistry;return r.length&&e.Array.each(r,function(e){var t=k(e);i.addOrUpdate(t),n.push(i.proxy(e.id))}),n}function k(t){var n={id:t.id,pageNumber:t.pageNumber,template:parseInt(t.template,10),countPhotos:t.countPhotos,backgroundColor:t.backgroundColor};return e.Lang.isNumber(n.backgroundColor)&&(n.backgroundColor=""+n.backgroundColor,n.backgroundColor=n.backgroundColor.match(/.{1,3}/g).join(",")),n}function L(e){var t={id:e.nsid,pathAlias:e.pathAlias,username:e.username,realname:e.realname,isAdFree:e.isAdFree,isPro:e.ispro,buddyicon:b(e.iconurls),location:e.location};return e.datecreate&&(t.dateCreated=e.datecreate),e.curation&&(t.curation={id:e.nsid,curationEnrollmentStatus:e.curation&&e.curation.status_name||"",curationCanPassOver:e.curation&&e.curation.can_pass_over||!1}),t}function A(e){var t=[],n=e.places,r=e.placeRegistry;return n.length&&n.forEach(function(e){var n,i=e.woeid||e.place_id;n=O(e),r.addOrUpdate(n),t.push(r.proxy(i))}),t}function O(e){return{id:e.woeid||e.place_id,woeId:e.woeid,woeName:e.woe_name,placeId:e.place_id,placeType:e.place_type,placeTypeId:e.place_type_id,placeUrl:e.place_url,latitude:e.latitude,longitude:e.longitude}}function M(e){return{id:e.nsid||e.user,username:e.username,realname:e.realname,iconfarm:e.iconfarm,iconserver:e.iconserver,pathAlias:e.pathAlias}}function _(e){return typeof e!="string"?e:(e[0]==="_"&&(e=e.slice(1)),e.replace(/_([a-zA-Z0-9])/g,function(e,t,n){return t.toUpperCase()}))}function D(t){return e.each(t,function(n,r){e.Lang.isObject(n)&&r!=="appContext"&&(n=D(n));var i=_(r);t[i]=n}),t}function P(e){e.extras?e.extras=e.extras+",static_maps":e.extras="static_maps",e.static_map_zoom="3,6,14",e.static_map_width="245",e.static_map_height="100"}function H(t,n,r,i){var s,o;n.name==="gallery-models"&&(t.compoundId=t.id,t.id=t.compoundId.split("-").pop()),t.owner&&(s=e.APIHelper.response.parsePerson(t.owner),t.owner=r.addOrUpdate(s)),n.name==="group-pool-models"&&(t.title=e.Escape.html(t.title),o=i.parseGroupModel(t.id,t.pathAlias,t),t={id:t.id,pathAlias:t.pathAlias,group:i.addOrUpdate(o)});if(n.name==="set-models"||n.name==="gallery-models")t.primaryPhotoSizes=B(t);n.addOrUpdate(t)}function B(t){var n=e.Lang.isObject(t)&&t.primaryPhotoExtras,r={};return e.Lang.isObject(n)&&(e.Object.each(n,function(t,i){var s=/^url_([a-z]+)$/.exec(i),o;s&&(o=s[1],r[o]={displayUrl:b(t),width:parseInt(n["width_"+o],10),height:parseInt(n["height_"+o],10)},n["url_"+o+"_cdn"]?(YUI.Env.isServer||(e.config.flickr.cdnUrls=!0),r[o].src=b(n["url_"+o+"_cdn"])):(YUI.Env.isServer||(e.config.flickr.cdnUrls=!1),r[o].src=b(n["url_"+o])))}),delete t.primaryPhotoExtras),r}function j(e){var t={};return t.title=e.title.content,t.id=e.id,t.photoCount=parseInt(e.photos,10),t.primary=e.primary,t.videoCount=parseInt(e.videos,10),t.totalCount=t.photoCount+t.videoCount,t.primaryPhotoSizes=B({primaryPhotoExtras:e}),t}var t=["can_addmeta","can_comment","can_download","can_share","contact","count_comments","count_faves","count_views","date_taken","date_upload","description","icon_urls_deep","isfavorite","ispro","license","media","needs_interstitial","owner_name","owner_datecreate","path_alias","realname","rotation","safety_level","secret_k","secret_h","url_c","url_f","url_h","url_k","url_l","url_m","url_n","url_o","url_q","url_s","url_sq","url_t","url_z","visibility","visibility_source","o_dims","is_marketplace_printable","is_marketplace_licensable","publiceditability"],n=["datecreate","date_activity","eighteenplus","invitation_only","needs_interstitial","non_members_privacy","pool_pending_count","privacy","member_pending_count","icon_urls","date_activity_detail"],r=["url_c","url_h","url_k","url_l","url_m","url_n","url_o","url_q","url_s","url_sq","url_t","url_z","path_alias","owner_name"],i=["can_comment","count_comments","count_faves","description","isfavorite","license","media","needs_interstitial","owner_name","path_alias","realname","rotation","url_c","url_l","url_m","url_n","url_q","url_s","url_sq","url_t","url_z"],s=["owner_name","path_alias","realname","sizes","url_m","url_n","url_q","url_s","url_sq","url_t","url_z","url_c","url_h","url_k","url_l","url_z","needs_interstitial"],o=["icon_urls","safe_search"],u=["curation_metadata"],a={fave:function(t){return{id:e.guid(),type:t.type,owner:M(t),timestamp:t.dateadded}},comment:function(e){return{id:e.commentid,type:e.type,owner:M(e),content:e._content,timestamp:e.dateadded}},contacted:function(t){return{id:e.guid(),type:t.type,owner:M(t),timestamp:t.dateadded}},added_to_gallery:function(t){return{id:e.guid(),type:t.type,owner:M(t),galleryId:t.galleryid,timestamp:t.dateadded}},people:function(t,n){return{id
:e.guid(),type:t.type,owner:M(t),timestamp:t.dateadded,personTagged:n}},tag:function(t){return{id:e.guid(),type:t.type,owner:M(t),timestamp:t.dateadded}}};e.APIHelper={request:{getRebootPhotoExtras:f,getRebootGroupExtras:l,getRebootSearchSetsExtras:c,getRebootPhotoLiteExtras:h,getRebootAlbumsListExtras:p,getRebootPeopleExtras:d,addStaticMapsParams:P,addRebootCuratorExtras:v},response:{addOrReplaceListByContext:m,addOrReplaceListByPage:g,parsePhoto:S,parsePhotoLite:x,isHD:E,parsePhotos:N,parsePage:k,parsePages:C,parsePhotoSize:w,parsePerson:L,parsePlaces:A,parseContact:M,parseNotificationsEvents:a,agnosticizeFarmPathTransferProtocol:b,camelCaseProperties:D,addContextToRegistry:H,parsePrimaryPhotoSizes:B,parsePhotoSetMeta:j}}},"@VERSION@",{requires:["flickr-promise","list-proxy"]});
YUI.add("flickr-api",function(e){"use strict";function o(t,r){this.transport=e.transportFactory(t,r?r.flipper:null),this.base_url=e.config.flickr.api.api_base_url||n,typeof r!="undefined"&&(this.appContext=r),YUI.Env.isServer?YUI.Env.isProduction?(this.api_url=YUI.Env.config.api.hostname_server_prod,this.batchURL=YUI.Env.config.api.hostname_server_prod+"/services/batch"):(this.api_url=YUI.Env.config.api.hostname_server,this.batchURL=YUI.Env.config.api.hostname_server+"/services/batch"):r&&r.normalizedProtocol==="https"?this.api_url=e.config.flickr.api.hostname_client_https:this.api_url=e.config.flickr.api.hostname_client_http}var t=require("lib/flog")("API"),n="/services/rest",r=[96,97,98,99,100,105,106,111,112,114,115,116,117,118,119],i=["flickr.photos.getInfo","flickr.photos.search","flickr.people.search","flickr.photosets.search","flickr.groups.search","flickr.people.getInfo","flickr.groups.pools.getPhotos","flickr.groups.getInfo","flickr.groups.getTopContributors","flickr.products.books.getBook","flickr.products.orders.getOrder","flickr.site.getBucketTestConfig","flickr.cameraroll.getMap","flickr.cameraroll.getPhotosByOffset","flickr.stats.getGraphData","flickr.stats.getTotalViewsForDateRange","flickr.stats.getMiscStats","flickr.stats.getPopularPhotos","flickr.stats.getReferrerCategoriesForDate","flickr.stats.getTotalViews"],s=function(e){return e&&e.message&&e.message.indexOf&&(e.message.indexOf("Photo not found")>-1||e.message.indexOf("not found (invalid ID)")>-1||e.message.indexOf("not found (inactive member)")>-1||e.message.indexOf("Login Failed")>-1)};o.prototype.callMethod=function(n,o,u,a){function g(i){var u,f="";i&&i.headers&&(i.headers["x-served-by"]&&(f=i.headers["x-served-by"]),i.headers["x-account-nsid"]&&this.appContext.setPreliminaryViewerNsid(i.headers["x-account-nsid"])),e.fletrics.increment("api.calls"+m),e.fletrics.increment("api.calls.responded"+m),h&&h.stop(),p&&p.stop(),d&&d.stop(),YUI.Env.isServer&&i.debug&&(YUI.Env.config.api.log_urls&&!i.debug.wasBatched&&t.info("url",{method:n,url:i.debug.url}),YUI.Env.config.api.log_curl&&!i.debug.wasBatched&&console.log(YUI.Env.server.curler(i.debug)));try{u=i.responseText?JSON.parse(i.responseText):i;if(!u)throw t.error("returned an empty response",{method:n}),"Empty response"}catch(l){var c="";if(i&&i.responseText){var v=i.responseText.toLowerCase().indexOf("<body>");v>-1?c=i.responseText.slice(v,100):c=i.responseText.slice(0,100)}throw t.error("responded with unparseable JSON",{method:n,err:l,servedBy:f,headers:i&&i.headers,response:c}),l.fatal=!0,l}try{if(typeof a.camelCase=="undefined"||a.camelCase)u=e.APIHelper.response.camelCaseProperties(u)}catch(l){throw t.error("failed camelCase parsing",{method:n,err:l,servedBy:f}),l.fatal=!0,l}if(u.stat==="ok")return t.log("successfully returned",{method:n,response:u}),u;throw u.stat==="fail"?(u.fatal=!0,s(u)&&(u.is404=!0),u.code?r.indexOf(u.code)!==-1?(t.error('responded with "stat: fail" and fatal error code',{method:n,response:u,servedBy:f,headers:i&&i.headers,config:o}),u):(t.warn('responded with "stat: fail" and non-fatal error code',{method:n,response:u,servedBy:f}),u.fatal=!1,u):(t.error('responded with "stat: fail" but no error code',{method:n,response:u,servedBy:f}),u)):(t.error('responded without a known "stat"',{method:n,response:u,servedBy:f}),u.fatal=!0,u)}function y(e){throw e.fatal=!0,e.code&&["ECONNRESET","ECONNREFUSED","ECONNABORTED","EHOSTUNREACH","ENETDOWN","ENETUNREACH","ETIMEDOUT"].indexOf(e.code)!==-1&&(e.timeout=!0),e.resp&&e.resp.status===0&&e.resp.statusText==="timeout"&&(e.clientTimeout=!0),s(e)&&(e.is404=!0),t.error("failed in an unexpected way",{method:n,err:e}),e}var f,l,c,h=null,p=null,d=null,v=!1,m="";return o=o||{},a=a||{},this.appContext&&this.appContext.request&&(this.appContext.request.UA.isBot||this.appContext.request.UA.isSharingBot)&&(v=!0,m=e.fletrics.getBotString()),i.indexOf(n)!==-1&&(h=e.fletrics.createStopwatch("api."+n+".latency"+m),e.fletrics.increment("api."+n+".calls"+m)),["flickr.photos.getInfo"].indexOf(n)!==-1&&(p=e.fletrics.createStopwatch("api."+n+".latency.histogram"+m)),d=e.fletrics.createStopwatch("api.latency"),e.fletrics.increment("api.calls.initiated"+m),this.appContext&&this.appContext.random_slice&&(o.random_slice=this.appContext.random_slice),!YUI.Env.isServer&&e.config.flickr.random_slice&&(o.random_slice=e.config.flickr.random_slice),this.appContext&&this.appContext.flipper.isFlipped("enable-viewer-nsid-check")&&!YUI.Env.isServer&&(l=this.appContext.getViewer(),o.viewerNSID=l.signedIn?l.nsid:""),(!e.config.flickr.cameraroll.suppress_logging||n!=="flickr.cameraroll.getPhotosByOffset"&&n!=="flickr.cameraroll.getMapVersion")&&t.info("params",{method:n,config:o}),f={flickr:!0,data:o},f.data.method=n,a.timeout&&(f.timeout=a.timeout),c=this.api_url+this.base_url,h&&h.start(),p&&p.start(),d&&d.start(),!o.neverBatch&&this.appContext&&this.appContext.flipper.isFlipped("enable-flickr-api-request-batching")&&this.appContext.forceServerRender&&(f.batchURL=this.batchURL,f.includeInBatchRequest=!0),this.transport.makeRequest(c,f,u).then(g.bind(this),y.bind(this)).then(undefined,function(t){throw t.fatal?e.fletrics.increment("api.failures"+m):e.fletrics.increment("api.warnings"+m),t})},o.prototype.fetchSiteKey=function(){return this.transport.makeSiteKeyRequest(this.api_url+this.base_url)},o.prototype.fetchCsrf=function(){return this.transport.makeCsrfRequest(this.api_url+this.base_url)},e.namespace("FlickrAPI"),e.FlickrAPI=o},"@VERSION@",{requires:["promise","oop","fletrics","api-helper"]});
YUI.add("cycle",function(Y,NAME){typeof Y.decycle!="function"&&(Y.decycle=function(t){"use strict";var n=[],r=[];return function i(e,t){var s,o,u;if(typeof e!="object"||e===null||e instanceof Boolean||e instanceof Date||e instanceof Number||e instanceof RegExp||e instanceof String)return e;for(s=0;s<n.length;s+=1)if(n[s]===e)return{$ref:r[s]};n.push(e),r.push(t);if(Object.prototype.toString.apply(e)==="[object Array]"){u=[];for(s=0;s<e.length;s+=1)u[s]=i(e[s],t+"["+s+"]")}else{u={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&(u[o]=i(e[o],t+"["+JSON.stringify(o)+"]"))}return u}(t,"$")}),typeof Y.retrocycle!="function"&&(Y.retrocycle=function retrocycle($){"use strict";var px=/^\$(?:\[(?:\d+|\"(?:[^\\\"\u0000-\u001f]|\\([\\\"\/bfnrt]|u[0-9a-zA-Z]{4}))*\")\])*$/;return function rez(value){var i,item,name,path;if(value&&typeof value=="object")if(Object.prototype.toString.apply(value)==="[object Array]")for(i=0;i<value.length;i+=1)item=value[i],item&&typeof item=="object"&&(path=item.$ref,typeof path=="string"&&px.test(path)?value[i]=eval(path):rez(item));else for(name in value)typeof value[name]=="object"&&(item=value[name],item&&(path=item.$ref,typeof path=="string"&&px.test(path)?value[name]=eval(path):rez(item)))}($),$})},"@VERSION@");
YUI.add("model-import-export",function(e,t){var n=require("lib/flog")(t),r="_flickrModelRegistry",i;i=e.ModelImportExport=function(e){this.appContext=e,this.objectCache={}},i.prototype={exportAll:function(){var t={};return e.Object.each(this.appContext.modelRegistries,function(e,n){t[n]=this.exportRegistry(e)},this),t=e.decycle(t),t},exportRegistry:function(e){return Object.keys(e._data).map(function(t){return this.exportModel(e,t)},this)},exportModel:function(e,t){var i={},s=e.name;return this.objectCache[s]||(this.objectCache[s]={}),this.objectCache[s][t]?i=this.objectCache[s][t]:(i[r]=e.name,Object.keys(e.attributes).forEach(function(r){var s=e.attributes[r],o,u,a,f;try{s.readOnly||(o=e.getValue(t,r),o!==e.getDefaultValue(t,r)&&(u=e.getValue(t,r,!0),s.isModel?a=this.exportModel(o.registry,o.getValue("id")):s.isListProxy?o.getList().length?a=o.getList().map(function(e){return this.exportModel(e.registry,e.getValue("id"))},this):a=undefined:s.isCollection?(f=o._data.length?o._data.map(function(e){return e?this.exportModel(e.registry,e.getValue("id")):undefined},this):[],a={_data:f,fetchedStart:o.fetchedStart,fetchedEnd:o.fetchedEnd,totalItems:o.totalItems}):s.serialize&&typeof s.serialize=="function"?a=s.serialize(u):a=u,i[r]=a))}catch(l){n.warn("Error exporting attribute",{err:l,attr:r})}},this),this.objectCache[s][t]=i),i},importAll:function(t){t=e.retrocycle(t);var n=this,r=Object.keys(t),i=r.map(this.appContext.getModelRegistry,this.appContext);return i.length?e.Promise.all(i).then(function(e){e.forEach(function(e){n.importRegistry(t[e.name])})}):e.Promise.resolve()},importRegistry:function(e){e.forEach(function(e){this.importModel(e)},this)},importModel:function(t){var n=t[r],i=this.appContext.modelRegistries[n],s={};return i.exists(t.id)||(e.Object.each(t,function(e,t){var n=i.attributes[t];n&&(n.isModel?s[t]=this.importModel(e):n.isListProxy?s[t]=e.map(this.importModel,this):n.isCollection?(s[t]=e,s[t].pageContent=s[t]._data.map(function(e){return e?this.importModel(e):undefined},this),s[t].page=1,s[t].perPage=s[t].pageContent.length):n.deserialize&&typeof n.deserialize=="function"?s[t]=n.deserialize(e):s[t]=e)},this),i.add(s,!1,!0)),i.proxy(t.id)}}},"@VERSION@",{requires:["cycle"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("cookie",function(e,t){function h(e){throw new TypeError(e)}function p(e){(!s(e)||e==="")&&h("Cookie name must be a non-empty string.")}function d(e){(!s(e)||e==="")&&h("Subcookie name must be a non-empty string.")}var n=e.Lang,r=e.Object,i=null,s=n.isString,o=n.isObject,u=n.isUndefined,a=n.isFunction,f=encodeURIComponent,l=decodeURIComponent,c=e.config.doc;e.Cookie={_createCookieString:function(e,t,n,r){r=r||{};var i=f(e)+"="+(n?f(t):t),u=r.expires,a=r.path,l=r.domain;return o(r)&&(u instanceof Date&&(i+="; expires="+u.toUTCString()),s(a)&&a!==""&&(i+="; path="+a),s(l)&&l!==""&&(i+="; domain="+l),r.secure===!0&&(i+="; secure")),i},_createCookieHashString:function(e){o(e)||h("Cookie._createCookieHashString(): Argument must be an object.");var t=[];return r.each(e,function(e,n){!a(e)&&!u(e)&&t.push(f(n)+"="+f(String(e)))}),t.join("&")},_parseCookieHash:function(e){var t=e.split("&"),n=i,r={};if(e.length)for(var s=0,o=t.length;s<o;s++)n=t[s].split("="),r[l(n[0])]=l(n[1]);return r},_parseCookieString:function(e,t,n){var r={};if(s(e)&&e.length>0){var o=t===!1?function(e){return e}:l,a=e.split(/;\s/g),f=i,c=i,h=i;for(var p=0,d=a.length;p<d;p++){h=a[p].match(/([^=]+)=/i);if(h instanceof Array)try{f=l(h[1]),c=o(a[p].substring(h[1].length+1))}catch(v){}else f=l(a[p]),c="";!u(n)&&n.reverseCookieLoading?u(r[f])&&(r[f]=c):r[f]=c}}return r},_setDoc:function(e){c=e},exists:function(e){p(e);var t=this._parseCookieString(c.cookie,!0);return t.hasOwnProperty(e)},get:function(e,t){p(e);var n,r,s;return a(t)?(s=t,t={}):o(t)?s=t.converter:t={},n=this._parseCookieString(c.cookie,!t.raw,t),r=n[e],u(r)?i:a(s)?s(r):r},getSub:function(e,t,n,r){var s=this.getSubs(e,r);return s!==i?(d(t),u(s[t])?i:a(n)?n(s[t]):s[t]):i},getSubs:function(e,t){p(e);var n=this._parseCookieString(c.cookie,!1,t);return s(n[e])?this._parseCookieHash(n[e]):i},remove:function(t,n){return p(t),n=e.merge(n||{},{expires:new Date(0)}),this.set(t,"",n)},removeSub:function(e,t,n){p(e),d(t),n=n||{};var r=this.getSubs(e);if(o(r)&&r.hasOwnProperty(t)){delete r[t];if(!n.removeIfEmpty)return this.setSubs(e,r,n);for(var i in r)if(r.hasOwnProperty(i)&&!a(r[i])&&!u(r[i]))return this.setSubs(e,r,n);return this.remove(e,n)}return""},set:function(e,t,n){p(e),u(t)&&h("Cookie.set(): Value cannot be undefined."),n=n||{};var r=this._createCookieString(e,t,!n.raw,n);return c.cookie=r,r},setSub:function(e,t,n,r){p(e),d(t),u(n)&&h("Cookie.setSub(): Subcookie value cannot be undefined.");var i=this.getSubs(e);return o(i)||(i={}),i[t]=n,this.setSubs(e,i,r)},setSubs:function(e,t,n){p(e),o(t)||h("Cookie.setSubs(): Cookie value must be an object.");var r=this._createCookieString(e,this._createCookieHashString(t),!1,n);return c.cookie=r,r}}},"3.16.0",{requires:["yui-base"]});
YUI.add("better-use",function(e){var t={},n;e.betterUse=n=function(r,i,s){var o,u,a,f;a=function(t,n){var r;try{if(window.performance){var i=window.performance.timing;i.responseEnd&&i.responseStart&&!isNaN(i.responseEnd)&&!isNaN(i.responseEnd)&&(r=i.responseEnd-i.responseStart)}}catch(s){}var o=new Error("Loading failed: "+t.msg);return o.type="failure",r&&(o.ttl=r),o.moduleLoadingError=!0,o.data=t.data,o.modules=n,o.failed=t.failed,e.fletrics&&e.fletrics.increment("betterUse.failures"),o},f=function(t,n){e.config&&e.config.win&&e.config.win.beaconError&&e.config.win.beaconError(t,e.config.win.location.href,{message:n})},s=s||!1;if(typeof r=="string"){if(r.trim()==="")return e.Promise.reject("[better-use] `betterUse` called without any modules.");r=[r]}if(!e.Lang.isArray(r)||r.length<1)return e.Promise.reject("[better-use] `betterUse` called without any modules.");if(s&&r.join("").length>300){var l=[];while(r.length>0)l.push(e.betterUse(r.splice(0,10)));return e.Promise.all(l)}return i=i&&i._yuid?i:e,o=i._yuid,t[o]?(t[o].modules=t[o].modules.concat(r),t[o].promise):(t[o]||(t[o]={modules:r,promise:undefined}),u=t[o].promise=new e.Promise(function(r,u){e.soon(function(){var l=t[o].modules,c=l.slice(0),h;delete t[o],l.push(function(e,t){clearTimeout(h);if(t.success)r(e),e.fletrics;else if(!s)e.fletrics,n(l.slice(0,-1),i,!s).then(function(e){r(e)},function(e){u(e)});else try{var o=/(https:\/\/s\.yimg\.com\/zz\/combo[\S]+)\.js/g,p=/(https:\/\/s\.yimg\.com\/zz\/combo[\S]+)\.css/g,d=t&&t.msg?t.msg.match(o):!1;if(d){var v=document.createElement("script");v.onload=function(){r(e)},v.onerror=function(e){u(a(t,c)),f("[better-use] Load module manually","Manually load: Failure - "+(e?e.message:"."))},v.src=d[0]+"?"+(new Date).getTime().toString(),e.config.doc.body.appendChild(v)}else{d=t&&t.msg?t.msg.match(p):!1;if(d){var m=document.createElement("link");m.rel="stylesheet",m.onload=function(){r(e)},m.onerror=function(e){u(a(t,c)),f("[better-use] Load css module manually","Manually load: Failure - "+(e?e.message:"."))},m.href=d[0]+"?"+(new Date).getTime().toString(),e.config.doc.head.appendChild(m)}else u(a(t,c))}}catch(g){u(a(t,c))}}),h=setTimeout(function(){if(!s)e.fletrics,n(l.slice(0,-1),i,!s).then(function(e){r(e)},function(e){u(e)});else{var t;try{if(window.performance){var o=window.performance.timing;o.responseEnd&&o.responseStart&&!isNaN(o.responseEnd)&&!isNaN(o.responseEnd)&&(t=o.responseEnd-o.responseStart)}}catch(a){}var f=new Error("timed out after "+e.betterUse.timeout+"ms");t&&(f.ttl=t),f.type="timeout",f.moduleLoadingError=!0,f.modules=c,e.fletrics&&e.fletrics.increment("betterUse.timeouts"),u(f)}},e.betterUse.timeout),i.use.apply(i,l)})}),u.then(null,function(t){e.fletrics&&e.fletrics.increment("betterUse."+t.type);if(e.config&&e.config.win&&e.config.win.beaconError){var n;try{n=JSON.stringify(t.data)}catch(r){}e.config&&e.config.win&&e.config.win.beaconError&&e.config.win.beaconError("[better-use] "+t.type,e.config.win.location.href,{modules:t.modules.join(", "),message:t.message,ttl:t.ttl,data:n,failed:t.failed})}throw t}))},e.betterUse.timeout=YUI.Env.isServer?1e4:3e5},"@VERSION@",{requires:["flickr-promise","timers","fletrics"]});
YUI.add("view-counter",function(e,t){function r(t){this.appContext=t.appContext,this.queued={},this.logging={},this.logged={},this.pendingFlush=undefined,this.avoidDuplicates=!1,this.maxPerCall=e.Lang.isNumber(t.maxPerCall)?t.maxPerCall:20,this.flushDelay=e.Lang.isNumber(t.flushDelay)?t.flushDelay:1e3}var n=require("lib/flog")(t);e.ViewCounter=r,r.prototype={queue:function(t,n,r){var i,s;if(!t||!this.canQueue(t))return;if(!n||!e.Lang.isString(n))n="";n.charAt(0)==="/"&&(i=!0),s={photo_id:t},r&&(s.async=!0),i?s.path=n:s.referrer=n,this.queued[t]=s,this.pendingFlush||(this.pendingFlush=setTimeout(this.flushQueue.bind(this),this.flushDelay))},flushQueue:function(e){var t=!1;e&&(this.avoidDuplicates=this.avoidDuplicates||!!e.avoidDuplicates,t=!!e.resetDuplicateTracking),this.pendingFlush?(clearTimeout(this.pendingFlush),this.pendingFlush=undefined,t?this.logQueuedViews().then(function(){this.logged={},this.avoidDuplicates=!1}.bind(this)):this.logQueuedViews()):this.logged={}},logQueuedViews:function(){var t=this,n,r,i=this.avoidDuplicates,s;return n=this.queued,this.queued={},r=Object.keys(n),this.maxPerCall&&this.maxPerCall<r.length&&r.forEach(function(e,r){r>=this.maxPerCall&&(t.queue(n[e]),n[e]=undefined,delete n[e])}),e.mix(this.logging,n),s={views:JSON.stringify(e.Object.values(n))},this.appContext.callAPI("flickr.photos.addView",s).then(function(){e.mix(t.logged,n)},function(){return}).then(function(){i||Object.keys(n).forEach(function(e){t.logging[e]=undefined,delete t.logging[e]})})},canQueue:function(e){return this.queued[e]||this.logging[e]||this.logged[e]?!1:!0},recordAlbumView:function(e){var t={views:JSON.stringify([{user_id:e.albumOwnerID,photoset_id:e.albumID,referrer:e.referrer}])};this.appContext.callAPI("flickr.photosets.addView",t).then(function(){},function(t){n.error("flickr.photosets.addView failed",{err:t,params:e})})},recordPhotostreamView:function(e){var t={views:JSON.stringify([{user_id:e.photostreamOwnerId,referrer:e.referrer}])};this.appContext.callAPI("flickr.people.addView",t).then(function(){},function(t){n.error("flickr.people.addView failed",{err:t,params:e})})}}},"@VERSION@",{requires:[]});
YUI.add("flipper",function(e){"use strict";e.Flipper=function(e){this.config=e},e.Flipper.prototype.isFlipped=function(e){return typeof this.config[e]!="undefined"?this.config[e]:!1},e.Flipper.prototype.getValue=function(e){var t=this.isFlipped(e);return t},e.Flipper.prototype.toJSON=function(){return this.config},e.Flipper.prototype.prepareForExport=function(){var e=this;Object.keys(this.config).forEach(function(t){e.config[t]===!1&&delete e.config[t]})}},"@VERSION@",{requires:[]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("handlebars-base",function(e,t){
/*!
Handlebars.js - Copyright (C) 2011 Yehuda Katz
https://raw.github.com/wycats/handlebars.js/master/LICENSE
*/
;var n=e.namespace("Handlebars");n.VERSION="1.0.0",n.COMPILER_REVISION=4,n.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"},n.helpers={},n.partials={};var r=Object.prototype.toString,i="[object Function]",s="[object Object]";n.registerHelper=function(e,t,i){if(r.call(e)===s){if(i||t)throw new n.Exception("Arg not supported with multiple helpers");n.Utils.extend(this.helpers,e)}else i&&(t.not=i),this.helpers[e]=t},n.registerPartial=function(e,t){r.call(e)===s?n.Utils.extend(this.partials,e):this.partials[e]=t},n.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Missing helper: '"+e+"'")}),n.registerHelper("blockHelperMissing",function(e,t){var s=t.inverse||function(){},o=t.fn,u=r.call(e);return u===i&&(e=e.call(this)),e===!0?o(this):e===!1||e==null?s(this):u==="[object Array]"?e.length>0?n.helpers.each(e,t):s(this):o(e)}),n.K=function(){},n.createFrame=Object.create||function(e){n.K.prototype=e;var t=new n.K;return n.K.prototype=null,t},n.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(e,t){if(n.logger.level<=e){var r=n.logger.methodMap[e];typeof console!="undefined"&&console[r]&&console[r].call(console,t)}}},n.log=function(e,t){n.logger.log(e,t)},n.registerHelper("each",function(e,t){var s=t.fn,o=t.inverse,u=0,a="",f,l=r.call(e);l===i&&(e=e.call(this)),t.data&&(f=n.createFrame(t.data));if(e&&typeof e=="object")if(e instanceof Array)for(var c=e.length;u<c;u++)f&&(f.index=u),a+=s(e[u],{data:f});else for(var h in e)e.hasOwnProperty(h)&&(f&&(f.key=h),a+=s(e[h],{data:f}),u++);return u===0&&(a=o(this)),a}),n.registerHelper("if",function(e,t){var s=r.call(e);return s===i&&(e=e.call(this)),!e||n.Utils.isEmpty(e)?t.inverse(this):t.fn(this)}),n.registerHelper("unless",function(e,t){return n.helpers["if"].call(this,e,{fn:t.inverse,inverse:t.fn})}),n.registerHelper("with",function(e,t){var s=r.call(e);s===i&&(e=e.call(this));if(!n.Utils.isEmpty(e))return t.fn(e)}),n.registerHelper("log",function(e,t){var r=t.data&&t.data.level!=null?parseInt(t.data.level,10):1;n.log(r,e)});var o=["description","fileName","lineNumber","message","name","number","stack"];n.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n=0;n<o.length;n++)this[o[n]]=t[o[n]]},n.Exception.prototype=new Error,n.SafeString=function(e){this.string=e},n.SafeString.prototype.toString=function(){return this.string.toString()};var u={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},a=/[&<>"'`]/g,f=/[&<>"'`]/,l=function(e){return u[e]||"&"};n.Utils={extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},escapeExpression:function(e){return e instanceof n.SafeString?e.toString():e==null||e===!1?"":(e=e.toString(),f.test(e)?e.replace(a,l):e)},isEmpty:function(e){return!e&&e!==0?!0:r.call(e)==="[object Array]"&&e.length===0?!0:!1}},n.VM={template:function(e){var t={escapeExpression:n.Utils.escapeExpression,invokePartial:n.VM.invokePartial,programs:[],program:function(e,t,r){var i=this.programs[e];return r?i=n.VM.program(e,t,r):i||(i=this.programs[e]=n.VM.program(e,t)),i},merge:function(e,t){var r=e||t;return e&&t&&(r={},n.Utils.extend(r,t),n.Utils.extend(r,e)),r},programWithDepth:n.VM.programWithDepth,noop:n.VM.noop,compilerInfo:null};return function(r,i){i=i||{};var s=e.call(t,n,r,i.helpers,i.partials,i.data),o=t.compilerInfo||[],u=o[0]||1,a=n.COMPILER_REVISION;if(u!==a){if(u<a){var f=n.REVISION_CHANGES[a],l=n.REVISION_CHANGES[u];throw"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+f+") or downgrade your runtime to an older version ("+l+")."}throw"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+o[1]+")."}return s}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=function(e,i){return i=i||{},t.apply(this,[e,i.data||n].concat(r))};return i.program=e,i.depth=r.length,i},program:function(e,t,n){var r=function(e,r){return r=r||{},t(e,r.data||n)};return r.program=e,r.depth=0,r},noop:function(){return""},invokePartial:function(e,t,r,i,s,o){var u={helpers:i,partials:s,data:o};if(e===undefined)throw new n.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(r,u);if(!n.compile)throw new n.Exception("The partial "+t+" could not be compiled when running in runtime-only mode");return s[t]=n.compile(e,{data:o!==undefined}),s[t](r,u)}},n.template=n.VM.template,n.VERSION+="-yui",n.revive=n.template,e.namespace("Template").Handlebars=n},"3.16.0",{requires:[]});
YUI.add("better-handlebars",function(e,t){
/*!
handlebars v4.0.5
Copyright (C) 2011-2015 by Yehuda Katz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@license
*/
;(function(t,n){typeof exports=="object"&&typeof module=="object"?module.exports=n():typeof define=="function"&&define.amd?define([],n):typeof exports=="object"?exports.Handlebars=n():t.Handlebars=n()})(this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";function g(){var e=new o.HandlebarsEnvironment;return h.extend(e,o),e.SafeString=a["default"],e.Exception=l["default"],e.Utils=h,e.escapeExpression=h.escapeExpression,e.VM=d,e.template=function(t){return d.template(t,e)},e}var r=n(1)["default"],i=n(2)["default"];t.__esModule=!0;var s=n(3),o=r(s),u=n(17),a=i(u),f=n(5),l=i(f),c=n(4),h=r(c),p=n(18),d=r(p),v=n(19),m=i(v),y=g();y.create=g,m["default"](y),y["default"]=y,t["default"]=y,e.exports=t["default"]},function(e,t){"use strict";t["default"]=function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.__esModule=!0},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e:{"default":e}},t.__esModule=!0},function(e,t,n){"use strict";function v(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},u.registerDefaultHelpers(this),a.registerDefaultDecorators(this)}var r=n(2)["default"];t.__esModule=!0,t.HandlebarsEnvironment=v;var i=n(4),s=n(5),o=r(s),u=n(6),a=n(14),f=n(16),l=r(f),c="4.0.5";t.VERSION=c;var h=7;t.COMPILER_REVISION=h;var p={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};t.REVISION_CHANGES=p;var d="[object Object]";v.prototype={constructor:v,logger:l["default"],log:l["default"].log,registerHelper:function(t,n){if(i.toString.call(t)===d){if(n)throw new o["default"]("Arg not supported with multiple helpers");i.extend(this.helpers,t)}else this.helpers[t]=n},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,n){if(i.toString.call(t)===d)i.extend(this.partials,t);else{if(typeof n=="undefined")throw new o["default"]('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=n}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,n){if(i.toString.call(t)===d){if(n)throw new o["default"]("Arg not supported with multiple decorators");i.extend(this.decorators,t)}else this.decorators[t]=n},unregisterDecorator:function(t){delete this.decorators[t]}};var m=l["default"].log;t.log=m,t.createFrame=i.createFrame,t.logger=l["default"]},function(e,t){"use strict";function s(e){return n[e]}function o(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}function l(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function c(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return i.test(e)?e.replace(r,s):e}function h(e){return!e&&e!==0?!0:f(e)&&e.length===0?!0:!1}function p(e){var t=o({},e);return t._parent=e,t}function d(e,t){return e.path=t,e}function v(e,t){return(e?e+".":"")+t}t.__esModule=!0,t.extend=o,t.indexOf=l,t.escapeExpression=c,t.isEmpty=h,t.createFrame=p,t.blockParams=d,t.appendContextPath=v;var n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,i=/[&<>"'`=]/,u=Object.prototype.toString;t.toString=u;var a=function(t){return typeof t=="function"};a(/x/)&&(t.isFunction=a=function(e){return typeof e=="function"&&u.call(e)==="[object Function]"}),t.isFunction=a;var f=Array.isArray||function(e){return e&&typeof e=="object"?u.call(e)==="[object Array]":!1};t.isArray=f},function(e,t){"use strict";function r(e,t){var i=t&&t.loc,s=undefined,o=undefined;i&&(s=i.start.line,o=i.start.column,e+=" - "+s+":"+o);var u=Error.prototype.constructor.call(this,e);for(var a=0;a<n.length;a++)this[n[a]]=u[n[a]];Error.captureStackTrace&&Error.captureStackTrace(this,r),i&&(this.lineNumber=s,this.column=o)}t.__esModule=!0;var n=["description","fileName","lineNumber","message","name","number","stack"];r.prototype=new Error,t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function y(e){s["default"](e),u["default"](e),f["default"](e),c["default"](e),p["default"](e),v["default"](e),g["default"](e)}var r=n(2)["default"];t.__esModule=!0,t.registerDefaultHelpers=y;var i=n(7),s=r(i),o=n(8),u=r(o),a=n(9),f=r(a),l=n(10),c=r(l),h=n(11),p=r(h),d=n(12),v=r(d),m=n(13),g=r(m)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4);t["default"]=function(e){e.registerHelper("blockHelperMissing",function(t,n){var i=n.inverse,s=n.fn;if(t===!0)return s(this);if(t===!1||t==null)return i(this);if(r.isArray(t))return t.length>0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):i(this);if(n.data&&n.ids){var o=r.createFrame(n.data);o.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:o}}return s(t,n)})},e.exports=t["default"]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var i=n(4),s=n(5),o=r(s);t["default"]=function(e){e.registerHelper("each",function(e,t){function l(t,r,s){a&&(a.key=t,a.index=r,a.first=r===0,a.last=!!s,f&&(a.contextPath=f+t)),u+=n(e[t],{data:a,blockParams:i.blockParams([e[t],t],[f+t,null])})}if(!t)throw new o["default"]("Must pass iterator to #each");var n=t.fn,r=t.inverse,s=0,u="",a=undefined,f=undefined;t.data&&t.ids&&(f=i.appendContextPath(t.data.contextPath,t.ids[0])+"."),i.isFunction(e)&&(e=e.call(this)),t.data&&(a=i.createFrame(t.data));if(e&&typeof e=="object")if(i.isArray(e))for(var c=e.length;s<c;s++)s in e&&l(s,s,s===e.length-1);else{var h=undefined;for(var p in e)e.hasOwnProperty(p)&&(h!==undefined&&l(h,s-1),h=p,s++);h!==undefined&&l(h,s-1,!0)}return s===0&&(u=r(this)),u})},e.exports=t["default"
]},function(e,t,n){"use strict";var r=n(2)["default"];t.__esModule=!0;var i=n(5),s=r(i);t["default"]=function(e){e.registerHelper("helperMissing",function(){if(arguments.length===1)return undefined;throw new s["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},e.exports=t["default"]},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4);t["default"]=function(e){e.registerHelper("if",function(e,t){return r.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)}),e.registerHelper("unless",function(t,n){return e.helpers["if"].call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){e.registerHelper("log",function(){var t=[undefined],n=arguments[arguments.length-1];for(var r=0;r<arguments.length-1;r++)t.push(arguments[r]);var i=1;n.hash.level!=null?i=n.hash.level:n.data&&n.data.level!=null&&(i=n.data.level),t[0]=i,e.log.apply(e,t)})},e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0,t["default"]=function(e){e.registerHelper("lookup",function(e,t){return e&&e[t]})},e.exports=t["default"]},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4);t["default"]=function(e){e.registerHelper("with",function(e,t){r.isFunction(e)&&(e=e.call(this));var n=t.fn;if(!r.isEmpty(e)){var i=t.data;return t.data&&t.ids&&(i=r.createFrame(t.data),i.contextPath=r.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:i,blockParams:r.blockParams([e],[i&&i.contextPath])})}return t.inverse(this)})},e.exports=t["default"]},function(e,t,n){"use strict";function o(e){s["default"](e)}var r=n(2)["default"];t.__esModule=!0,t.registerDefaultDecorators=o;var i=n(15),s=r(i)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4);t["default"]=function(e){e.registerDecorator("inline",function(e,t,n,i){var s=e;return t.partials||(t.partials={},s=function(i,s){var o=n.partials;n.partials=r.extend({},o,t.partials);var u=e(i,s);return n.partials=o,u}),t.partials[i.args[0]]=i.fn,s})},e.exports=t["default"]},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4),i={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var n=r.indexOf(i.methodMap,t.toLowerCase());n>=0?t=n:t=parseInt(t,10)}return t},log:function(t){t=i.lookupLevel(t);if(typeof console!="undefined"&&i.lookupLevel(i.level)<=t){var n=i.methodMap[t];console[n]||(n="log");for(var r=arguments.length,s=Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];console[n].apply(console,s)}}};t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function l(e){var t=e&&e[0]||1,n=f.COMPILER_REVISION;if(t!==n){if(t<n){var r=f.REVISION_CHANGES[n],i=f.REVISION_CHANGES[t];throw new a["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}throw new a["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}function c(e,t){function n(n,r,i){i.hash&&(r=o.extend({},r,i.hash),i.ids&&(i.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,r,i);var s=t.VM.invokePartial.call(this,n,r,i);s==null&&t.compile&&(i.partials[i.name]=t.compile(n,e.compilerOptions,t),s=i.partials[i.name](r,i));if(s!=null){if(i.indent){var u=s.split("\n");for(var f=0,l=u.length;f<l;f++){if(!u[f]&&f+1===l)break;u[f]=i.indent+u[f]}s=u.join("\n")}return s}throw new a["default"]("The partial "+i.name+" could not be compiled when running in runtime-only mode")}function i(t){function a(t){return""+e.main(r,t,r.helpers,r.partials,s,u,o)}var n=arguments.length<=1||arguments[1]===undefined?{}:arguments[1],s=n.data;i._setup(n),!n.partial&&e.useData&&(s=m(t,s));var o=undefined,u=e.useBlockParams?[]:undefined;return e.useDepths&&(n.depths?o=t!==n.depths[0]?[t].concat(n.depths):n.depths:o=[t]),a=g(e.main,a,r,n.depths||[],s,u),a(t,n)}if(!t)throw new a["default"]("No environment passed to template");if(!e||!e.main)throw new a["default"]("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r={strict:function(t,n){if(n in t)return t[n];throw new a["default"]('"'+n+'" not defined in '+t)},lookup:function(t,n){var r=t.length;for(var i=0;i<r;i++)if(t[i]&&t[i][n]!=null)return t[i][n]},lambda:function(t,n){return typeof t=="function"?t.call(n):t},escapeExpression:o.escapeExpression,invokePartial:n,fn:function(n){var r=e[n];return r.decorator=e[n+"_d"],r},programs:[],program:function(t,n,r,i,s){var o=this.programs[t],u=this.fn(t);return n||s||i||r?o=h(this,t,u,n,r,i,s):o||(o=this.programs[t]=h(this,t,u)),o},data:function(t,n){while(t&&n--)t=t._parent;return t},merge:function(t,n){var r=t||n;return t&&n&&t!==n&&(r=o.extend({},n,t)),r},noop:t.VM.noop,compilerInfo:e.compiler};return i.isTop=!0,i._setup=function(n){if(!n.partial){r.helpers=r.merge(n.helpers,t.helpers),e.usePartial&&(r.partials=r.merge(n.partials,t.partials));if(e.usePartial||e.useDecorators)r.decorators=r.merge(n.decorators,t.decorators)}else r.helpers=n.helpers,r.partials=n.partials,r.decorators=n.decorators},i._child=function(t,n,i,s){if(e.useBlockParams&&!i)throw new a["default"]("must pass block params");if(e.useDepths&&!s)throw new a["default"]("must pass parent depths");return h(r,t,e[t],n,0,i,s)},i}function h(e,t,n,r,i,s,o){function u(t){var i=arguments.length<=1||arguments[1]===undefined?{}:arguments[1],u=o;return o&&t!==o[0]&&(u=[t].concat(o)),n(e,t,e.helpers,e.partials,i.data||r,s&&[i.blockParams].concat(s),u)}return u=g(n,u,e,o,r,s),u.program=t,u.depth=o?o.length:0,u.blockParams=i||0,u}function p(e,t,n){return e?!e.call&&!n.name&&(n.name=e,e=n.partials[e]):n.name==="@partial-block"?
e=n.data["partial-block"]:e=n.partials[n.name],e}function d(e,t,n){n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var r=undefined;n.fn&&n.fn!==v&&(n.data=f.createFrame(n.data),r=n.data["partial-block"]=n.fn,r.partials&&(n.partials=o.extend({},n.partials,r.partials))),e===undefined&&r&&(e=r);if(e===undefined)throw new a["default"]("The partial "+n.name+" could not be found");if(e instanceof Function)return e(t,n)}function v(){return""}function m(e,t){if(!t||!("root"in t))t=t?f.createFrame(t):{},t.root=e;return t}function g(e,t,n,r,i,s){if(e.decorator){var u={};t=e.decorator(t,u,n,r&&r[0],i,s,r),o.extend(t,u)}return t}var r=n(1)["default"],i=n(2)["default"];t.__esModule=!0,t.checkRevision=l,t.template=c,t.wrapProgram=h,t.resolvePartial=p,t.invokePartial=d,t.noop=v;var s=n(4),o=r(s),u=n(5),a=i(u),f=n(3)},function(e,t){(function(n){"use strict";t.__esModule=!0,t["default"]=function(e){var t=typeof n!="undefined"?n:window,r=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=r),e}},e.exports=t["default"]}).call(t,function(){return this}())}])}),e.Handlebars=YUI.Env.isServer?module.exports:this.Handlebars,e.Handlebars.revive=e.Handlebars.template,e.namespace("Template").Handlebars=e.Handlebars},"@VERSION@",{condition:{trigger:"handlebars-base",when:"after"}});
YUI.add("url",function(e,t){e[t]=function(t){var n=e.Lang.isString(t)?e.merge(e.config.flickr.url,{path:t},arguments[1]):e.merge(e.config.flickr.url,t);return n.protocol===!1?n.protocol="":n.protocol.substr(-1)!==":"&&(n.protocol+=":"),n.host===!1?n.path:e.Lang.sub("{protocol}//{host}{path}",n)}},"@VERSION@",{requires:["yui-base"]});
YUI.add("url-helper",function(e){function s(t){var n,r,i,s,o,u,a,f,l,c;n=t.photoId,r=t.pathAlias;if(!n)return;if(!r)return;if(t.page){try{s=parseInt(t.page,10)}catch(h){return}if(s===1||!e.Lang.isNumber(s))s=!1}return o=e.Lang.isBoolean(t.lightbox)?t.lightbox:null,u=e.Lang.isBoolean(t.sizes)||e.Lang.isString(t.sizes)?t.sizes:null,a=e.Lang.isString(t.hash)?t.hash:null,f=e.Lang.isBoolean(t.exif)?t.exif:null,l=e.Lang.isBoolean(t.faves)?t.faves:null,c=e.Lang.isBoolean(t.details)?t.details:null,i=e.Lang.isString(t.contextSuffix)?t.contextSuffix:null,"/photos/"+r+"/"+n+"/"+(u?"sizes/"+(e.Lang.isString(u)?u+"/":""):"")+(f?"meta/":"")+(l?"favorites/":"")+(c?"edit-details/":"")+(i?"in/"+i+"/":"")+(s?"page"+s+"/":"")+(o?"lightbox/":"")+(a?"#"+a:"")}function o(e,n,r){var i,s,o,u={params:{}},a=[],f;i=e.indexOf("-"),i===-1&&(i=e.length),s=e.slice(0,i),o=e.slice(i+1);switch(s){case"contacts":u.modelName="contacts-photo-models",u.params.id="me";break;case"contactsfaves":u.modelName="photostream-models",t.nsid(n)?u.params.id=n:u.params.pathAlias=n;break;case"explore":u.modelName="explore-models",u.params.id=o;break;case"faves":u.modelName="favorite-models",a=o.split("|"),t.nsid(a[0])?u.params.id=a[0]:u.params.pathAlias=a[0];break;case"gallery":u.modelName="gallery-models",a=o.split("-"),f=a.length>=2?a.length-1:1,u.params.id=a[f],u.params.compoundId=o;break;case"photolist":u.modelName="photoList-models",u.params.id=o;break;case"photosof":u.modelName="photosof-models",t.nsid(o)?u.params.id=o:u.params.pathAlias=o;break;case"pool":u.modelName="group-pool-models",a=o.split("|"),t.nsid(a[0])?u.params.id=a[0]:t.pathAlias(a[0])?u.params.pathAlias=a[0]:(u.modelName="photostream-models",t.nsid(n)?u.params.id=n:u.params.pathAlias=n);break;case"set":case"album":u.modelName="set-models",u.params.id=o;break;case"shares":u.modelName="set-models",u.params.gpOwner=n,u.params.gpCode=o,u.params.id=o,u.params.isSharedEntity=!0;break;case"dateposted":case"datetaken":u.modelName="photostream-models",s==="datetaken"?u.params.orderBy="datetaken":o&&(u.params.orderBy="dateposted"),["public","friend","family","ff"].indexOf(o)>-1&&(u.params.viewAs=o),t.nsid(n)?u.params.id=n:u.params.pathAlias=n;break;default:u.modelName="photostream-models",t.nsid(n)?u.params.id=n:u.params.pathAlias=n}return u}function u(t){var n,r,s,o;for(s=0;s<i.length;s++){n=i[s];for(o=0;o<n.patterns.length;o++){r=n.patterns[o].exec(t);if(r)return n=e.clone(n),n.match=r[0],n}}return null}function a(t){var n;for(n=0;n<i.length;n++)if(i[n].name===t)return e.clone(i[n]);return null}function f(e){var t=this,n=e.map(function(e){return t._encodeBase58(e)});return n.join("-")}function l(e){var t="",r="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",i=e,s=function(e){return r[parseInt(e,10)]},o;e=n(e);while(e.gte(58))i=e.div(58),o=e.mod(58),t=s(o)+t,e=i;return s(e)+t}function c(e){var t=e.getValue("url"),n=e.getValue("nsid"),r=e.getValue("pathAlias"),i="/people/"+r+"/",s=e.registry.appContext.flipper.isFlipped("rename-set-to-album")?"albums":"sets";return{cameraroll:"/cameraroll",photostream:t,edit:t+"?details=1",albums:t+s,map:t+"map",favorites:t+"favorites",theirGroups:"/people/"+e.getValue("pathAlias")+"/groups/",myGroups:"/groups/",stats:t+"stats",creations:t+"creations",contacts:t+"contacts",galleries:t+"galleries",collections:t+"collections",archives:t+"archives",tags:t+"tags",popular:t+"popular-interesting",slideshow:t+"show",profile:i,photosOf:i+"photosof",people:"/photos/friends",list:"/people/"+e.getValue("pathAlias")+"/contacts",revlist:"/people/"+e.getValue("pathAlias")+"/contacts/rev",sendFlickrMail:"/mail/write/?to="+n,ignore:"/ignore.gne/?id="+n,godPage:"/god/accounts/account.gne?nsid="+n}}function h(e){var t=e.getValue("url");return{photos:t+"pool/",admin:t+"admin/",discussions:t+"discuss/",members:t+"members/",map:t+"map/",rules:t+"rules/",about:t+"",invite:"/groups_invite_pre.gne?id="+e.id,thumbnails:t+"pool/?thumb=1",addPhotos:t+"pool/add/",godPage:"/god/group.gne?nsid="+e.id,unlock:t+"admin/throttle/"}}function p(e,t,n){var r=e.getValue("url");return n?r+=n.id+"/":t&&(r+="page"+t+"/"),r}function d(e,t){var n=t||typeof t=="undefined"?"https":"http";return n+"://flic.kr/p/"+this._encodeBase58(e)}function v(e){var t=e.indexOf("@"),n=e.substring(0,t),r=e.substr(t+3);return"https://flic.kr/ps/"+this._encodeBase58(n+r)}function m(e){var t=e.indexOf("@"),n=e.substring(0,t),r=e.substr(t+3);return"https://flic.kr/f/"+this._encodeBase58(n+r)}function g(e){var t=e.indexOf("@"),n=e.substring(0,t),r=e.substr(t+2);return r.length===1&&(r="0"+r),"https://flic.kr/g/"+this._encodeBase58(n+r)}function y(e){return"https://flic.kr/s/"+this._encodeBase58(e)}function b(t,n,r){var i,s;return n&&r?s="//farm"+n+".staticflickr.com/"+r+"/buddyicons/"+t+".jpg":typeof t=="string"&&(i=parseInt(t.split("@")[0],10),isNaN(i)||(i%=100,i%=12,i<10&&(i="0"+i),s=e.url("/images/buddyicon"+i+".png"))),s}function w(t,n){var r;return n=n||"best",n==="best"?t&&e.Lang.isObject(t)&&(["retina","large","medium","small","default"].forEach(function(e){var n=t[e];if(!n)return;if(r)return;if(n.indexOf("images/buddyicon")===-1){r=n;return}}),r||(r=t.retina)):r=t[n],e.APIHelper.response.agnosticizeFarmPathTransferProtocol(r)}function E(t,n,r,i,s){var o;return s==="m"?o="":o="_"+s,"//farm"+t+"."+e.config.flickr.farm.host+"/"+n+"/"+r+"_"+i+o+".jpg"}function S(e,t,n,r){var i;return r==="m"?i="":i="_"+r,e+"/"+t+"_"+n+i+".jpg"}function x(e,t){var n,r,i,s={},o="/photos/"+t,u="/people/"+t,a={url:"",type:""};n=e.indexOf("-"),n===-1&&(n=e.length),r=e.slice(0,n),i=e.slice(n+1);switch(r){case"album":case"set":a.url=o+"/albums/"+i,a.type="album";break;case"contacts":a.url="/photos/contacts/",a.type="contacts list";break;case"contactsfaves":case"dateposted":case"datetaken":a.url=o,a.type="photostream";break;case"explore":a.url="/explore/",a.type="explore";break;case"faves":a.url="/photos/"+i+"/favorites/",a.type="favorites";break;case"gallery":n=i.lastIndexOf("-"),s.user=i.substring(0,n),s.galleryID=i
.substring(n+1),a.url="/photos/"+s.user+"/galleries/"+s.galleryID,a.type="gallery";break;case"group":case"pool":a.url="/groups/"+i+"/pool/",a.type="group";break;case"photolist":a.url=o,a.type="photostream";break;case"photosof":a.url=u+"/photosof/",a.type="photosof";break;case"public":a.url=o,a.type="photostream";break;case"shares":a.url=o+"/shares/"+i,a.type="shares";break;default:a.url=o,a.type="photostream"}return a}function T(t){if(t instanceof Array){var n=[];return t.forEach(function(e){n.push(T(e))}),n.join(",")}return t.indexOf("//")===0?t="https:"+t:t.indexOf("/")===0&&(t=e.url(t)),t}var t=require("lib/helpers/type-validator"),n=require("int"),r=/photos\/(([0-9]+@N[0-9]+)|((?!(?:tags)\/)[0-9a-zA-Z-_]+))\/([0-9]+)\/?/,i=[{name:"account",patterns:[/^\/account\/?/]},{name:"activity_feed",patterns:[/^\/$/]},{name:"album",patterns:[/^\/photos\/[^\/]+\/(?:sets|albums)\/[^\/]+\/?/,/^\/photos\/[^\/]+\/?\d+\/in\/(?:set|album)/]},{name:"albums",patterns:[/^\/photos\/[^\/]+\/(?:sets|albums)\/?/]},{name:"cameraroll",patterns:[/^\/cameraroll\/?/]},{name:"commons",patterns:[/^\/commons\/?/]},{name:"contacts_list",patterns:[/^\/photos\/(?:friends|contacts)\/?/,/^\/photos\/[^\/]+\/friends\/?/,/^\/photos\/[^\/]+\/?\d+\/in\/contacts/]},{name:"create",patterns:[/^\/create\/?/]},{name:"creations",patterns:[/^\/photos\/[^\/]+\/creations\/?/]},{name:"explore",patterns:[/^\/explore(?:\/[^\/]+\/[^\/]+\/[^\/]+)?\/?/,/^\/photos\/[^\/]+\/?\d+\/in\/explore/]},{name:"favorites",patterns:[/^\/photos\/[^\/]+\/(?:faves|favorites|favourites)\/?/,/^\/photos\/[^\/]+\/?\d+\/in\/faves/]},{name:"gallery",patterns:[/^\/galleries\/?/,/^\/photos\/[^\/]+\/galleries\/[^\/]+\/?/]},{name:"groups",patterns:[/^\/groups\/?$/,/^\/photos\/[^\/]+\/?\d+\/in\/pool/]},{name:"group",patterns:[/^\/groups\/[^\/]+\/?/]},{name:"map",patterns:[/^\/map\/?/]},{name:"marketplace",patterns:[/^\/marketplace\/?/]},{name:"tags",patterns:[/^\/tags\/?$/,/^\/photos\/alltags\/?/,/^\/tags\/alltags\/?$/,/^\/photos\/tags\/?$/,/^\/photos\/tags-day\/?$/,/^\/photos\/tags-week\/?$/,/^\/photos\/[^\/]+\/?\d+\/in\/tag/]},{name:"tag",patterns:[/^\/tags\/[^\/]+\/?/,/^\/photos\/tags\/[^\/]+\/?/]},{name:"photo_page",patterns:[/^\/photos\/[^\/]+\/[0-9]+\/?/]},{name:"photostream",patterns:[/^\/photos\/[^\/]+\/?$/]},{name:"places",patterns:[/^\/places\/?/]},{name:"profile",patterns:[/^\/people\/[^\/]+\/?/,/^\/photos\/[^\/]+\/?\d+\/in\/photosof/]},{name:"search",patterns:[/^\/search(?:\/?.*)$/]},{name:"shares",patterns:[/^\/photos\/[^\/]+\/shares\/[^\/]+\/?/]},{name:"stats",patterns:[/^\/photos\/[^\/]+\/stats\/?/]}];e.URLHelper={PHOTOPAGE_PATTERN:r,getPhotoPage:s,parseContextURL:o,getContextEntity:x,getShortURL:d,getShortPhotostreamURL:v,getShortGroupURL:g,getShortAlbumURL:y,getShortFavoritesURL:m,getSiteSectionByURL:u,getSiteSectionByName:a,generateShortenedPhotolist:f,_encodeBase58:l,generatePersonUrls:c,generateGroupUrls:h,getBuddyIconURL:b,getGroupIconURL:w,getDiscussionUrl:p,getFarmURL:E,getFarmURLWithPrefix:S,addProtocolToURL:T}},"@VERSION@",{requires:["url","api-helper"]});
YUI.add("moment",function(e,t){(function(e){function nt(e,t,n){switch(arguments.length){case 2:return e!=null?e:t;case 3:return e!=null?e:t!=null?t:n;default:throw new Error("Implement me")}}function rt(e,t){return o.call(e,t)}function it(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function st(e){t.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+e)}function ot(e,t){var n=!0;return vt(function(){return n&&(st(e),n=!1),t.apply(this,arguments)},t)}function ut(e,t){Z[e]||(st(t),Z[e]=!0)}function at(e,t){return function(n){return yt(e.call(this,n),t)}}function ft(e,t){return function(n){return this.localeData().ordinal(e.call(this,n),t)}}function lt(e,t){var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),i,s;return t-r<0?(i=e.clone().add(n-1,"months"),s=(t-r)/(r-i)):(i=e.clone().add(n+1,"months"),s=(t-r)/(i-r)),-(n+s)}function ct(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):e.isPM!=null?(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):t}function ht(){}function pt(e,n){n!==!1&&Pt(e),mt(this,e),this._d=new Date(+e._d),tt===!1&&(tt=!0,t.updateOffset(this),tt=!1)}function dt(e){var n=kt(e),r=n.year||0,i=n.quarter||0,s=n.month||0,o=n.week||0,u=n.day||0,a=n.hour||0,f=n.minute||0,l=n.second||0,c=n.millisecond||0;this._milliseconds=+c+l*1e3+f*6e4+a*36e5,this._days=+u+o*7,this._months=+s+i*3+r*12,this._data={},this._locale=t.localeData(),this._bubble()}function vt(e,t){for(var n in t)rt(t,n)&&(e[n]=t[n]);return rt(t,"toString")&&(e.toString=t.toString),rt(t,"valueOf")&&(e.valueOf=t.valueOf),e}function mt(e,t){var n,r,i;typeof t._isAMomentObject!="undefined"&&(e._isAMomentObject=t._isAMomentObject),typeof t._i!="undefined"&&(e._i=t._i),typeof t._f!="undefined"&&(e._f=t._f),typeof t._l!="undefined"&&(e._l=t._l),typeof t._strict!="undefined"&&(e._strict=t._strict),typeof t._tzm!="undefined"&&(e._tzm=t._tzm),typeof t._isUTC!="undefined"&&(e._isUTC=t._isUTC),typeof t._offset!="undefined"&&(e._offset=t._offset),typeof t._pf!="undefined"&&(e._pf=t._pf),typeof t._locale!="undefined"&&(e._locale=t._locale);if(m.length>0)for(n in m)r=m[n],i=t[r],typeof i!="undefined"&&(e[r]=i);return e}function gt(e){return e<0?Math.ceil(e):Math.floor(e)}function yt(e,t,n){var r=""+Math.abs(e),i=e>=0;while(r.length<t)r="0"+r;return(i?n?"+":"":"-")+r}function bt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t- +e.clone().add(n.months,"M"),n}function wt(e,t){var n;return t=It(t,e),e.isBefore(t)?n=bt(e,t):(n=bt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Et(e,n){return function(r,i){var s,o;return i!==null&&!isNaN(+i)&&(ut(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period)."),o=r,r=i,i=o),r=typeof r=="string"?+r:r,s=t.duration(r,i),St(this,s,e),this}}function St(e,n,r,i){var s=n._milliseconds,o=n._days,u=n._months;i=i==null?!0:i,s&&e._d.setTime(+e._d+s*r),o&&gn(e,"Date",mn(e,"Date")+o*r),u&&vn(e,mn(e,"Month")+u*r),i&&t.updateOffset(e,o||u)}function xt(e){return Object.prototype.toString.call(e)==="[object Array]"}function Tt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function Nt(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&At(e[o])!==At(t[o]))&&s++;return s+i}function Ct(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=V[e]||$[t]||t}return e}function kt(e){var t={},n,r;for(r in e)rt(e,r)&&(n=Ct(r),n&&(t[n]=e[r]));return t}function Lt(n){var r,i;if(n.indexOf("week")===0)r=7,i="day";else{if(n.indexOf("month")!==0)return;r=12,i="month"}t[n]=function(s,o){var u,a,f=t._locale[n],l=[];typeof s=="number"&&(o=s,s=e),a=function(e){var n=t().utc().set(i,e);return f.call(t._locale,n,s||"")};if(o!=null)return a(o);for(u=0;u<r;u++)l.push(a(u));return l}}function At(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(t>=0?n=Math.floor(t):n=Math.ceil(t)),n}function Ot(e,t){return(new Date(Date.UTC(e,t+1,0))).getUTCDate()}function Mt(e,n,r){return cn(t([e,11,31+n-r]),n,r).week}function _t(e){return Dt(e)?366:365}function Dt(e){return e%4===0&&e%100!==0||e%400===0}function Pt(e){var t;e._a&&e._pf.overflow===-2&&(t=e._a[f]<0||e._a[f]>11?f:e._a[l]<1||e._a[l]>Ot(e._a[a],e._a[f])?l:e._a[c]<0||e._a[c]>24||e._a[c]===24&&(e._a[h]!==0||e._a[p]!==0||e._a[d]!==0)?c:e._a[h]<0||e._a[h]>59?h:e._a[p]<0||e._a[p]>59?p:e._a[d]<0||e._a[d]>999?d:-1,e._pf._overflowDayOfYear&&(t<a||t>l)&&(t=l),e._pf.overflow=t)}function Ht(t){return t._isValid==null&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&t._pf.charsLeftOver===0&&t._pf.unusedTokens.length===0&&t._pf.bigHour===e)),t._isValid}function Bt(e){return e?e.toLowerCase().replace("_","-"):e}function jt(e){var t=0,n,r,i,s;while(t<e.length){s=Bt(e[t]).split("-"),n=s.length,r=Bt(e[t+1]),r=r?r.split("-"):null;while(n>0){i=Ft(s.slice(0,n).join("-"));if(i)return i;if(r&&r.length>=n&&Nt(s,r,!0)>=n-1)break;n--}t++}return null}function Ft(e){var n=null;if(!v[e]&&g)try{n=t.locale(),require("./locale/"+e),t.locale(n)}catch(r){}return v[e]}function It(e,n){var r,i;return n._isUTC?(r=n.clone(),i=(t.isMoment(e)||Tt(e)?+e:+t(e))- +r,r._d.setTime(+r._d+i),t.updateOffset(r,!1),r):t(e).local()}function qt(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Rt(e){var t=e.match(E),n,r;for(n=0,r=t.length;n<r;n++)Y[t[n]]?t[n]=Y[t[n]]:t[n]=qt(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=t[n]instanceof Function?t[n].call(i,e):t[n];return s}}function Ut(e,t){return e.isValid()?(t=zt(t,e.localeData()),J[t]||(J[t]=Rt(t)),J[t](e)):e.localeData().invalidDate()}function zt
(e,t){function r(e){return t.longDateFormat(e)||e}var n=5;S.lastIndex=0;while(n>=0&&S.test(e))e=e.replace(S,r),S.lastIndex=0,n-=1;return e}function Wt(e,t){var n,r=t._strict;switch(e){case"Q":return D;case"DDDD":return H;case"YYYY":case"GGGG":case"gggg":return r?B:N;case"Y":case"G":case"g":return F;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?j:C;case"S":if(r)return D;case"SS":if(r)return P;case"SSS":if(r)return H;case"DDD":return T;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return L;case"a":case"A":return t._locale._meridiemParse;case"x":return M;case"X":return _;case"Z":case"ZZ":return A;case"T":return O;case"SSSS":return k;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?P:x;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return x;case"Do":return r?t._locale._ordinalParse:t._locale._ordinalParseLenient;default:return n=new RegExp(Zt(Yt(e.replace("\\","")),"i")),n}}function Xt(e){e=e||"";var t=e.match(A)||[],n=t[t.length-1]||[],r=(n+"").match(z)||["-",0,0],i=+(r[1]*60)+At(r[2]);return r[0]==="+"?i:-i}function Vt(e,n,r){var i,s=r._a;switch(e){case"Q":n!=null&&(s[f]=(At(n)-1)*3);break;case"M":case"MM":n!=null&&(s[f]=At(n)-1);break;case"MMM":case"MMMM":i=r._locale.monthsParse(n,e,r._strict),i!=null?s[f]=i:r._pf.invalidMonth=n;break;case"D":case"DD":n!=null&&(s[l]=At(n));break;case"Do":n!=null&&(s[l]=At(parseInt(n.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":n!=null&&(r._dayOfYear=At(n));break;case"YY":s[a]=t.parseTwoDigitYear(n);break;case"YYYY":case"YYYYY":case"YYYYYY":s[a]=At(n);break;case"a":case"A":r._meridiem=n;break;case"h":case"hh":r._pf.bigHour=!0;case"H":case"HH":s[c]=At(n);break;case"m":case"mm":s[h]=At(n);break;case"s":case"ss":s[p]=At(n);break;case"S":case"SS":case"SSS":case"SSSS":s[d]=At(("0."+n)*1e3);break;case"x":r._d=new Date(At(n));break;case"X":r._d=new Date(parseFloat(n)*1e3);break;case"Z":case"ZZ":r._useUTC=!0,r._tzm=Xt(n);break;case"dd":case"ddd":case"dddd":i=r._locale.weekdaysParse(n),i!=null?(r._w=r._w||{},r._w.d=i):r._pf.invalidWeekday=n;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":e=e.substr(0,1);case"gggg":case"GGGG":case"GGGGG":e=e.substr(0,2),n&&(r._w=r._w||{},r._w[e]=At(n));break;case"gg":case"GG":r._w=r._w||{},r._w[e]=t.parseTwoDigitYear(n)}}function $t(e){var n,r,i,s,o,u,f;n=e._w,n.GG!=null||n.W!=null||n.E!=null?(o=1,u=4,r=nt(n.GG,e._a[a],cn(t(),1,4).year),i=nt(n.W,1),s=nt(n.E,1)):(o=e._locale._week.dow,u=e._locale._week.doy,r=nt(n.gg,e._a[a],cn(t(),o,u).year),i=nt(n.w,1),n.d!=null?(s=n.d,s<o&&++i):n.e!=null?s=n.e+o:s=o),f=hn(r,i,s,u,o),e._a[a]=f.year,e._dayOfYear=f.dayOfYear}function Jt(e){var t,n,r=[],i,s;if(e._d)return;i=Qt(e),e._w&&e._a[l]==null&&e._a[f]==null&&$t(e),e._dayOfYear&&(s=nt(e._a[a],i[a]),e._dayOfYear>_t(s)&&(e._pf._overflowDayOfYear=!0),n=un(s,0,e._dayOfYear),e._a[f]=n.getUTCMonth(),e._a[l]=n.getUTCDate());for(t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[c]===24&&e._a[h]===0&&e._a[p]===0&&e._a[d]===0&&(e._nextDay=!0,e._a[c]=0),e._d=(e._useUTC?un:on).apply(null,r),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[c]=24)}function Kt(e){var t;if(e._d)return;t=kt(e._i),e._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],Jt(e)}function Qt(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Gt(n){if(n._f===t.ISO_8601){tn(n);return}n._a=[],n._pf.empty=!0;var r=""+n._i,i,s,o,u,a,f=r.length,l=0;o=zt(n._f,n._locale).match(E)||[];for(i=0;i<o.length;i++)u=o[i],s=(r.match(Wt(u,n))||[])[0],s&&(a=r.substr(0,r.indexOf(s)),a.length>0&&n._pf.unusedInput.push(a),r=r.slice(r.indexOf(s)+s.length),l+=s.length),Y[u]?(s?n._pf.empty=!1:n._pf.unusedTokens.push(u),Vt(u,s,n)):n._strict&&!s&&n._pf.unusedTokens.push(u);n._pf.charsLeftOver=f-l,r.length>0&&n._pf.unusedInput.push(r),n._pf.bigHour===!0&&n._a[c]<=12&&(n._pf.bigHour=e),n._a[c]=ct(n._locale,n._a[c],n._meridiem),Jt(n),Pt(n)}function Yt(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})}function Zt(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function en(e){var t,n,r,i,s;if(e._f.length===0){e._pf.invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<e._f.length;i++){s=0,t=mt({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._pf=it(),t._f=e._f[i],Gt(t);if(!Ht(t))continue;s+=t._pf.charsLeftOver,s+=t._pf.unusedTokens.length*10,t._pf.score=s;if(r==null||s<r)r=s,n=t}vt(e,n||t)}function tn(e){var t,n,r=e._i,i=I.exec(r);if(i){e._pf.iso=!0;for(t=0,n=R.length;t<n;t++)if(R[t][1].exec(r)){e._f=R[t][0]+(i[6]||" ");break}for(t=0,n=U.length;t<n;t++)if(U[t][1].exec(r)){e._f+=U[t][0];break}r.match(A)&&(e._f+="Z"),Gt(e)}else e._isValid=!1}function nn(e){tn(e),e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))}function rn(e,t){var n=[],r;for(r=0;r<e.length;++r)n.push(t(e[r],r));return n}function sn(n){var r=n._i,i;r===e?n._d=new Date:Tt(r)?n._d=new Date(+r):(i=y.exec(r))!==null?n._d=new Date(+i[1]):typeof r=="string"?nn(n):xt(r)?(n._a=rn(r.slice(0),function(e){return parseInt(e,10)}),Jt(n)):typeof r=="object"?Kt(n):typeof r=="number"?n._d=new Date(r):t.createFromInputFallback(n)}function on(e,t,n,r,i,s,o){var u=new Date(e,t,n,r,i,s,o);return e<1970&&u.setFullYear(e),u}function un(e){var t=new Date(Date.UTC.apply(null,arguments));return e<1970&&t.setUTCFullYear(e),t}function an(e,t){if(typeof e=="string")if(!isNaN(e))e=parseInt(e,10);else{e=t.weekdaysParse(e);if(typeof e!="number")return null}return e}function fn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ln(e,n,r){var i=t.duration(e).abs(),o=s(i.as("s")),u=s(i.as("m")),a=s(i.as("h")),f=s(i.as("d")),l=s(i.as("M")),c=s(i.as("y")),h=o<K.s&&["s",o]||u===1&&["m"]||u<K.m&&["mm",u]||a===1&&["h"]||a<K.h&&["hh",a]||f===1&&["d"]||f<K.d&&["dd",f]||l===1&&["M"]||l<K.M&&["MM"
,l]||c===1&&["y"]||["yy",c];return h[2]=n,h[3]=+e>0,h[4]=r,fn.apply({},h)}function cn(e,n,r){var i=r-n,s=r-e.day(),o;return s>i&&(s-=7),s<i-7&&(s+=7),o=t(e).add(s,"d"),{week:Math.ceil(o.dayOfYear()/7),year:o.year()}}function hn(e,t,n,r,i){var s=un(e,0,1).getUTCDay(),o,u;return s=s===0?7:s,n=n!=null?n:i,o=i-s+(s>r?7:0)-(s<i?7:0),u=7*(t-1)+(n-i)+o+1,{year:u>0?e:e-1,dayOfYear:u>0?u:_t(e-1)+u}}function pn(n){var r=n._i,i=n._f,s;return n._locale=n._locale||t.localeData(n._l),r===null||i===e&&r===""?t.invalid({nullInput:!0}):(typeof r=="string"&&(n._i=r=n._locale.preparse(r)),t.isMoment(r)?new pt(r,!0):(i?xt(i)?en(n):Gt(n):sn(n),s=new pt(n),s._nextDay&&(s.add(1,"d"),s._nextDay=e),s))}function dn(e,n){var r,i;n.length===1&&xt(n[0])&&(n=n[0]);if(!n.length)return t();r=n[0];for(i=1;i<n.length;++i)n[i][e](r)&&(r=n[i]);return r}function vn(e,t){var n;if(typeof t=="string"){t=e.localeData().monthsParse(t);if(typeof t!="number")return e}return n=Math.min(e.date(),Ot(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function mn(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function gn(e,t,n){return t==="Month"?vn(e,n):e._d["set"+(e._isUTC?"UTC":"")+t](n)}function yn(e,n){return function(r){return r!=null?(gn(this,e,r),t.updateOffset(this,n),this):mn(this,e)}}function bn(e){return e*400/146097}function wn(e){return e*146097/400}function En(e){t.duration.fn[e]=function(){return this._data[e]}}function Sn(e){if(typeof ender!="undefined")return;i=r.moment,e?r.moment=ot("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",t):r.moment=t}var t,n="2.9.0",r=typeof global=="undefined"||typeof window!="undefined"&&window!==global.window?this:global,i,s=Math.round,o=Object.prototype.hasOwnProperty,u,a=0,f=1,l=2,c=3,h=4,p=5,d=6,v={},m=[],g=typeof module!="undefined"&&module&&module.exports,y=/^\/?Date\((\-?\d+)/i,b=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,w=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,E=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,S=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,x=/\d\d?/,T=/\d{1,3}/,N=/\d{1,4}/,C=/[+\-]?\d{1,6}/,k=/\d+/,L=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,A=/Z|[\+\-]\d\d:?\d\d/gi,O=/T/i,M=/[\+\-]?\d+/,_=/[\+\-]?\d+(\.\d{1,3})?/,D=/\d/,P=/\d\d/,H=/\d{3}/,B=/\d{4}/,j=/[+-]?\d{6}/,F=/[+-]?\d+/,I=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,q="YYYY-MM-DDTHH:mm:ssZ",R=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],U=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],z=/([\+\-]|\d\d)/gi,W="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),X={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},V={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},$={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},J={},K={s:45,m:45,h:22,d:26,M:11},Q="DDD w W M D d".split(" "),G="M D H h m s w W".split(" "),Y={M:function(){return this.month()+1},MMM:function(e){return this.localeData().monthsShort(this,e)},MMMM:function(e){return this.localeData().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.localeData().weekdaysMin(this,e)},ddd:function(e){return this.localeData().weekdaysShort(this,e)},dddd:function(e){return this.localeData().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return yt(this.year()%100,2)},YYYY:function(){return yt(this.year(),4)},YYYYY:function(){return yt(this.year(),5)},YYYYYY:function(){var e=this.year(),t=e>=0?"+":"-";return t+yt(Math.abs(e),6)},gg:function(){return yt(this.weekYear()%100,2)},gggg:function(){return yt(this.weekYear(),4)},ggggg:function(){return yt(this.weekYear(),5)},GG:function(){return yt(this.isoWeekYear()%100,2)},GGGG:function(){return yt(this.isoWeekYear(),4)},GGGGG:function(){return yt(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return At(this.milliseconds()/100)},SS:function(){return yt(At(this.milliseconds()/10),2)},SSS:function(){return yt(this.milliseconds(),3)},SSSS:function(){return yt(this.milliseconds(),3)},Z:function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+yt(At(e/60),2)+":"+yt(At(e)%60,2)},ZZ:function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+yt(At(e/60),2)+yt(At(e)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},Z={},et=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],tt=!1;while(Q.length)u=Q.pop(),Y[u+"o"]=ft(Y[u],u);while(G.length)u=G.pop(),Y[u+u]=at(Y[u],2);Y.DDDD=at(Y.DDD,3),vt(ht.prototype,{set:function(e){var t,n;for(n in e)t=e[n],typeof t=="function"?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},
_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e,n,r){var i,s,o;this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);for(i=0;i<12;i++){s=t.utc([2e3,i]),r&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[i]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i"));if(r&&n==="MMMM"&&this._longMonthsParse[i].test(e))return i;if(r&&n==="MMM"&&this._shortMonthsParse[i].test(e))return i;if(!r&&this._monthsParse[i].test(e))return i}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var n,r,i;this._weekdaysParse||(this._weekdaysParse=[]);for(n=0;n<7;n++){this._weekdaysParse[n]||(r=t([2e3,1]).day(n),i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i"));if(this._weekdaysParse[n].test(e))return n}},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return(e+"").toLowerCase().charAt(0)==="p"},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t,n){var r=this._calendar[e];return typeof r=="function"?r.apply(t,[n]):r},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(e){return e},postformat:function(e){return e},week:function(e){return cn(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),t=function(t,n,r,i){var s;return typeof r=="boolean"&&(i=r,r=e),s={},s._isAMomentObject=!0,s._i=t,s._f=n,s._l=r,s._strict=i,s._isUTC=!1,s._pf=it(),pn(s)},t.suppressDeprecationWarnings=!1,t.createFromInputFallback=ot("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.min=function(){var e=[].slice.call(arguments,0);return dn("isBefore",e)},t.max=function(){var e=[].slice.call(arguments,0);return dn("isAfter",e)},t.utc=function(t,n,r,i){var s;return typeof r=="boolean"&&(i=r,r=e),s={},s._isAMomentObject=!0,s._useUTC=!0,s._isUTC=!0,s._l=r,s._i=t,s._f=n,s._strict=i,s._pf=it(),pn(s).utc()},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=e,i=null,s,o,u,a;return t.isDuration(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:typeof e=="number"?(r={},n?r[n]=e:r.milliseconds=e):(i=b.exec(e))?(s=i[1]==="-"?-1:1,r={y:0,d:At(i[l])*s,h:At(i[c])*s,m:At(i[h])*s,s:At(i[p])*s,ms:At(i[d])*s}):(i=w.exec(e))?(s=i[1]==="-"?-1:1,u=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*s},r={y:u(i[2]),M:u(i[3]),d:u(i[4]),h:u(i[5]),m:u(i[6]),s:u(i[7]),w:u(i[8])}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(a=wt(t(r.from),t(r.to)),r={},r.ms=a.milliseconds,r.M=a.months),o=new dt(r),t.isDuration(e)&&rt(e,"_locale")&&(o._locale=e._locale),o},t.version=n,t.defaultFormat=q,t.ISO_8601=function(){},t.momentProperties=m,t.updateOffset=function(){},t.relativeTimeThreshold=function(t,n){return K[t]===e?!1:n===e?K[t]:(K[t]=n,!0)},t.lang=ot("moment.lang is deprecated. Use moment.locale instead.",function(e,n){return t.locale(e,n)}),t.locale=function(e,n){var r;return e&&(typeof n!="undefined"?r=t.defineLocale(e,n):r=t.localeData(e),r&&(t.duration._locale=t._locale=r)),t._locale._abbr},t.defineLocale=function(e,n){return n!==null?(n.abbr=e,v[e]||(v[e]=new ht),v[e].set(n),t.locale(e),v[e]):(delete v[e],null)},t.langData=ot("moment.langData is deprecated. Use moment.localeData instead.",function(e){return t.localeData(e)}),t.localeData=function(e){var n;e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr);if(!e)return t._locale;if(!xt(e)){n=Ft(e);if(n)return n;e=[e]}return jt(e)},t.isMoment=function(e){return e instanceof pt||e!=null&&rt(e,"_isAMomentObject")},t.isDuration=function(e){return e instanceof dt};for(u=et.length-1;u>=0;--u)Lt(et[u]);t.normalizeUnits=function(e){return Ct(e)},t.invalid=function(e){var n=t.utc(NaN);return e!=null?vt(n._pf,e):n._pf.userInvalidated=!0,n},t.parseZone=function(){return t.apply(null,arguments).parseZone()},t.parseTwoDigitYear=function(
e){return At(e)+(At(e)>68?1900:2e3)},t.isDate=Tt,vt(t.fn=pt.prototype,{clone:function(){return t(this)},valueOf:function(){return+this._d-(this._offset||0)*6e4},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var e=t(this).utc();return 0<e.year()&&e.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():Ut(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Ut(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return Ht(this)},isDSTShifted:function(){return this._a?this.isValid()&&Nt(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray())>0:!1},parsingFlags:function(){return vt({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(e){return this.utcOffset(0,e)},local:function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(e){var n=Ut(this,e||t.defaultFormat);return this.localeData().postformat(n)},add:Et(1,"add"),subtract:Et(-1,"subtract"),diff:function(e,t,n){var r=It(e,this),i=(r.utcOffset()-this.utcOffset())*6e4,s,o,u,a;return t=Ct(t),t==="year"||t==="month"||t==="quarter"?(u=lt(this,r),t==="quarter"?u/=3:t==="year"&&(u/=12)):(o=this-r,u=t==="second"?o/1e3:t==="minute"?o/6e4:t==="hour"?o/36e5:t==="day"?(o-i)/864e5:t==="week"?(o-i)/6048e5:o),n?u:gt(u)},from:function(e,n){return t.duration({to:this,from:e}).locale(this.locale()).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(e){var n=e||t(),r=It(n,this).startOf("day"),i=this.diff(r,"days",!0),s=i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse";return this.format(this.localeData().calendar(s,this,t(n)))},isLeapYear:function(){return Dt(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=an(e,this.localeData()),this.add(e-t,"d")):t},month:yn("Month",!0),startOf:function(e){e=Ct(e);switch(e){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return e==="week"?this.weekday(0):e==="isoWeek"&&this.isoWeekday(1),e==="quarter"&&this.month(Math.floor(this.month()/3)*3),this},endOf:function(t){return t=Ct(t),t===e||t==="millisecond"?this:this.startOf(t).add(1,t==="isoWeek"?"week":t).subtract(1,"ms")},isAfter:function(e,n){var r;return n=Ct(typeof n!="undefined"?n:"millisecond"),n==="millisecond"?(e=t.isMoment(e)?e:t(e),+this>+e):(r=t.isMoment(e)?+e:+t(e),r<+this.clone().startOf(n))},isBefore:function(e,n){var r;return n=Ct(typeof n!="undefined"?n:"millisecond"),n==="millisecond"?(e=t.isMoment(e)?e:t(e),+this<+e):(r=t.isMoment(e)?+e:+t(e),+this.clone().endOf(n)<r)},isBetween:function(e,t,n){return this.isAfter(e,n)&&this.isBefore(t,n)},isSame:function(e,n){var r;return n=Ct(n||"millisecond"),n==="millisecond"?(e=t.isMoment(e)?e:t(e),+this===+e):(r=+t(e),+this.clone().startOf(n)<=r&&r<=+this.clone().endOf(n))},min:ot("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(e){return e=t.apply(null,arguments),e<this?this:e}),max:ot("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(e){return e=t.apply(null,arguments),e>this?this:e}),zone:ot("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),utcOffset:function(e,n){var r=this._offset||0,i;return e!=null?(typeof e=="string"&&(e=Xt(e)),Math.abs(e)<16&&(e*=60),!this._isUTC&&n&&(i=this._dateUtcOffset()),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==e&&(!n||this._changeInProgress?St(this,t.duration(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&this._offset===0},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):typeof this._i=="string"&&this.utcOffset(Xt(this._i)),this},hasAlignedHourOffset:function(e){return e?e=t(e).utcOffset():e=0,(this.utcOffset()-e)%60===0},daysInMonth:function(){return Ot(this.year(),this.month())},dayOfYear:function(e){var n=s((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add(e-n,"d")},quarter:function(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)},weekYear:function(e){var t=cn(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return e==null?t:this.add(e-t,"y")},isoWeekYear:function(e){var t=cn(this,1,4).year;return e==null?t:this.add(e-t,"y")},week:function(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")},isoWeek:function(e){var t=cn(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")},weekday:function(e){var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")},isoWeekday:function(e){return e==null?this.day()||7:this.day(this.day()%7?e:e-7)},isoWeeksInYear:function(){return Mt(this.year(),1,4)},weeksInYear:function(){var e=this.localeData()._week;return Mt(this.year(),e.dow,e.doy)},get:function(e){return e=Ct(e),this[e]()},set:function(e,t){var n;if(typeof e=="object")for(n in e)this
.set(n,e[n]);else e=Ct(e),typeof this[e]=="function"&&this[e](t);return this},locale:function(n){var r;return n===e?this._locale._abbr:(r=t.localeData(n),r!=null&&(this._locale=r),this)},lang:ot("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===e?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return-Math.round(this._d.getTimezoneOffset()/15)*15}}),t.fn.millisecond=t.fn.milliseconds=yn("Milliseconds",!1),t.fn.second=t.fn.seconds=yn("Seconds",!1),t.fn.minute=t.fn.minutes=yn("Minutes",!1),t.fn.hour=t.fn.hours=yn("Hours",!0),t.fn.date=yn("Date",!0),t.fn.dates=ot("dates accessor is deprecated. Use date instead.",yn("Date",!0)),t.fn.year=yn("FullYear",!0),t.fn.years=ot("years accessor is deprecated. Use year instead.",yn("FullYear",!0)),t.fn.days=t.fn.day,t.fn.months=t.fn.month,t.fn.weeks=t.fn.week,t.fn.isoWeeks=t.fn.isoWeek,t.fn.quarters=t.fn.quarter,t.fn.toJSON=t.fn.toISOString,t.fn.isUTC=t.fn.isUtc,vt(t.duration.fn=dt.prototype,{_bubble:function(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,o,u=0;r.milliseconds=e%1e3,i=gt(e/1e3),r.seconds=i%60,s=gt(i/60),r.minutes=s%60,o=gt(s/60),r.hours=o%24,t+=gt(o/24),u=gt(bn(t)),t-=gt(wn(u)),n+=gt(t/30),t%=30,u+=gt(n/12),n%=12,r.days=t,r.months=n,r.years=u},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return gt(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+At(this._months/12)*31536e6},humanize:function(e){var t=ln(this,!e,this.localeData());return e&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(e,n){var r=t.duration(e,n);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(e,n){var r=t.duration(e,n);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(e){return e=Ct(e),this[e.toLowerCase()+"s"]()},as:function(e){var t,n;e=Ct(e);if(e==="month"||e==="year")return t=this._days+this._milliseconds/864e5,n=this._months+bn(t)*12,e==="month"?n:n/12;t=this._days+Math.round(wn(this._months/12));switch(e){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return t*24+this._milliseconds/36e5;case"minute":return t*24*60+this._milliseconds/6e4;case"second":return t*24*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(t*24*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+e)}},lang:t.fn.lang,locale:t.fn.locale,toIsoString:ot("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),i=Math.abs(this.minutes()),s=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(n?n+"D":"")+(r||i||s?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(s?s+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),t.duration.fn.toString=t.duration.fn.toISOString;for(u in X)rt(X,u)&&En(u.toLowerCase());t.duration.fn.asMilliseconds=function(){return this.as("ms")},t.duration.fn.asSeconds=function(){return this.as("s")},t.duration.fn.asMinutes=function(){return this.as("m")},t.duration.fn.asHours=function(){return this.as("h")},t.duration.fn.asDays=function(){return this.as("d")},t.duration.fn.asWeeks=function(){return this.as("weeks")},t.duration.fn.asMonths=function(){return this.as("M")},t.duration.fn.asYears=function(){return this.as("y")},t.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=At(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),g?module.exports=t:typeof define=="function"&&define.amd?(define(function(e,n,s){return s.config&&s.config()&&s.config().noGlobal===!0&&(r.moment=i),t}),Sn(!0)):Sn()}).call(this),
/*!
moment
https://github.com/moment/moment
Copyright (c) 2011-2013 Tim Wood, Iskren Chernev, Moment.js contributors
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/
e.moment=YUI.Env.isServer?module.exports:this.moment,typeof window!="undefined"&&(window.moment=YUI.Env.isServer?module.exports:this.moment)},"@VERSION@");
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("escape",function(e,t){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`"},r={html:function(e){return(e+"").replace(/[&<>"'\/`]/g,r._htmlReplacer)},regex:function(e){return(e+"").replace(/[\-$\^*()+\[\]{}|\\,.?\s]/g,"\\$&")},_htmlReplacer:function(e){return n[e]}};r.regexp=r.regex,e.Escape=r},"3.16.0",{requires:["yui-base"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatype-number-parse",function(e,t){var n=e.Escape.regex,r="\\s*";e.mix(e.namespace("Number"),{_buildParser:e.cached(function(e,t,i,s){var o=[],u;return e&&o.push("^"+r+n(e)+r),t&&o.push(r+n(t)+r+"$"),i&&o.push(n(i)+"(?=\\d)"),u=new RegExp("(?:"+o.join("|")+")","g"),s==="."&&(s=null),function(e){return e=e.replace(u,""),s?e.replace(s,"."):e}}),parse:function(t,n){var r;n&&typeof t=="string"&&(r=this._buildParser(n.prefix,n.suffix,n.thousandsSeparator,n.decimalSeparator),t=r(t)),typeof t=="string"&&e.Lang.trim(t)!==""&&(t=+t);if(typeof t!="number"||!isFinite(t))t=null;return t}}),e.namespace("Parsers").number=e.Number.parse,e.namespace("DataType"),e.DataType.Number=e.Number},"3.16.0",{requires:["escape"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatype-number-format",function(e,t){var n=e.Lang;e.mix(e.namespace("Number"),{format:function(e,t){if(n.isNumber(e)){t=t||{};var r=e<0,i=e+"",s=t.decimalPlaces,o=t.decimalSeparator||".",u=t.thousandsSeparator,a,f,l,c;n.isNumber(s)&&s>=0&&s<=20&&(i=e.toFixed(s)),o!=="."&&(i=i.replace(".",o));if(u){a=i.lastIndexOf(o),a=a>-1?a:i.length,f=i.substring(a);for(l=0,c=a;c>0;c--)l%3===0&&c!==a&&(!r||c>1)&&(f=u+f),f=i.charAt(c-1)+f,l++;i=f}return i=t.prefix?t.prefix+i:i,i=t.suffix?i+t.suffix:i,i}return n.isValue(e)&&e.toString?e.toString():""}}),e.namespace("DataType"),e.DataType.Number=e.Number},"3.16.0");
YUI.add("intl-messageformat",function(e,t){(function(e,t){"use strict";var n=e.Intl||e.IntlPolyfill,r=t(n);typeof define=="function"&&define.amd&&define(r),typeof module=="object"&&typeof module.exports=="object"&&(module.exports=r),e&&(e.IntlMessageFormat=r)})(typeof global!="undefined"?global:this,function(e){"use strict";function u(e,t,n){typeof e=="string"&&(e=u.__parse(e));if(!e||typeof e.length!="number")throw new TypeError("A pattern must be provided as a String or Array.");n=this._mergeFormats(u.FORMATS,n),i(this,"_locale",{value:this._resolveLocale(t)}),e=this._compilePattern(e,t,n),i(this,"_pattern",{value:e}),this.format=o.call(this.format,this)}function f(e){var t=e.match(a);return t?new l(t[1]):e}function l(e){this.valueName=e}function c(e,t){this.valueName=e,this.options=t}function h(e,t,n){this.valueName=e,this.options=t,this.pluralFunction=n}function d(e,t){var n=/[{}]/g,r=[],i=0,s=0,o,u,a,f,l;a=n.exec(e);while(a){i+=a[0]==="{"?1:-1;if(i<0)throw new Error("Imbalanced bracket detected at index "+a.index+' for message "'+e+'"');i===0&&(o=a.index+1,r.push(e.slice(s,o)),s=o),i===1&&s!==a.index&&(u=e.slice(s,a.index),u.indexOf("{")===-1&&(r.push(u),s=a.index)),a=n.exec(e)}if(i!==0)throw new Error("Brackets were not properly closed: "+e);s!==e.length&&r.push(e.slice(s));if(t)for(f=0,l=r.length;f<l;f++)r[f]=r[f].replace(/^\s+|\s+$/gm,"");return r}function v(e){return e.replace(/^\{\s*/,"").replace(/\s*\}$/,"")}function m(e){return e.indexOf("{")>=0}function g(e,t){var n,r,i,s,o;e.options={};if(t.length%2)throw new Error("Options must come in pairs: "+t.join(", "));for(o=0,s=t.length;o<s;o+=2)i=t[o],r=t[o+1],e.options[i]=r,n=n||i==="other";if(!n)throw new Error('Options must include default "other" option: '+t.join(", "));return e}function y(e,t){return e.format=t[0],e}function b(e,t,n){var r={type:n.type,valueName:t[1]},i=t[2]&&d(t[2],!0);return n.tokenParser&&i&&(r=n.tokenParser(r,i)),n.postParser&&(r=n.postParser(r)),r}function w(e,t){var n,r;for(n=0,r=p.length;n<r;n++)if(E(p[n],e,t))return e[t];return e[t]}function E(e,t,n){var r=t[n],i=r.match(e.regex),s,o=[],u,a,f;if(i){s=e.parse(r,i,e),t[n]=s;if(s&&s.options&&typeof s.options=="object")for(u in s.options)s.options.hasOwnProperty(u)&&o.push(u);for(a=0,f=o.length;a<f;a++)S(s,o[a],e);return!0}return!!i}function S(e,t,n){var r=e.options&&e.options[t];r=v(r),e.options[t]=x(r,n.outputFormatter)}function x(e,t){var n,r,i;if(!m(e))return t?t(e):[e];n=d(e);for(r=0,i=n.length;r<i;r++)n[r].charAt(0)==="{"&&(n[r]=w(n,r));return n}function T(e){var t=Array.prototype.slice.call(arguments,1),n,r,i,s;for(n=0,r=t.length;n<r;n+=1){i=t[n];if(!i)continue;for(s in i)i.hasOwnProperty(s)&&(e[s]=i[s])}return e}if(!e)throw new ReferenceError("Intl must be available");var t=Object.prototype.hasOwnProperty,n=function(){try{return!!Object.defineProperty({},"a",{})}catch(e){return!1}}(),r=!n&&!Object.prototype.__defineGetter__,i=n?Object.defineProperty:function(e,n,r){if("get"in r&&e.__defineGetter__)e.__defineGetter__(n,r.get);else if(!t.call(e,n)||"value"in r)e[n]=r.value},s=Object.create||function(e,n){function o(){}var r,s;o.prototype=e,r=new o;for(s in n)t.call(n,s)&&i(r,s,n[s]);return r},o=Function.prototype.bind||function(e){var t=this,n=[].slice.call(arguments,1);return function(){t.apply(e,n.concat([].slice.call(arguments)))}};i(u,"FORMATS",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{"short":{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},"long":{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{"short":{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},"long":{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),i(u,"__availableLocales__",{value:[]}),i(u,"__localeData__",{value:s(null)}),i(u,"__addLocaleData",{value:function(e){if(!e||!e.locale)throw new Error("Object passed does not identify itself with a valid language tag");if(!e.messageformat)throw new Error("Object passed does not contain locale data for IntlMessageFormat");var t=u.__availableLocales__,n=u.__localeData__,r=e.locale.toLowerCase().split("-")[0];t.push(r),n[r]=e.messageformat,u.defaultLocale===undefined&&(u.defaultLocale=r)}}),i(u,"__parse",{value:x}),i(u,"defaultLocale",{enumerable:!0,writable:!0}),u.prototype.format=function(e){return this._format(this._pattern,e)},u.prototype.resolvedOptions=function(){return{locale:this._locale}},u.prototype._compilePattern=function(n,r,i){typeof n=="string"&&(n=[n]);var s=this._locale,o=u.__localeData__,a=[],l,p,d,v,m,g,y,b,w,E,S;for(l=0,p=n.length;l<p;l+=1){d=n[l];if(typeof d=="string"){a.push(f(d));continue}v=d.type,m=d.valueName,b=d.options;if(b){E={};for(w in b){if(!t.call(b,w))continue;S=b[w];if(v==="plural"&&typeof S=="string"&&S.indexOf("${#}")>=0){S=S.match(/(.*)\${#}(.*)/),E[w]=[S[1],{valueName:m,format:(new e.NumberFormat(r)).format},S[2]];continue}E[w]=this._compilePattern(S,r,i)}}switch(v){case"date":g=i.date[d.format],a.push({valueName:m,format:(new e.DateTimeFormat(r,g)).format});break;case"time":g=i.time[d.format],a.push({valueName:m,format:(new e.DateTimeFormat(r,g)).format});break;case"number":g=i.number[d.format],a.push({valueName:m,format:(new e.NumberFormat(r,g)).format});break;case"plural":y=o[s].pluralFunction,a.push(new h(m,E,y));break;case"select":a.push(new c(m,E));break;default:throw new Error("Message pattern part at index "+l+" does not have a valid type")}}return a},u.prototype._format=function(e,n){var r="",i,s,o,u,a,f;for(i=0,s=e.length;i<s;i+=1){o=e[i];if(typeof o=="string"){r+=o;continue}u=o.valueName;if(!n||!t.call(n,u))throw new Error("A value must be provided for: "+u);a=n[u],f=o.options,f?r+=this._format(o.getOption(a),n):r+=o.format(a)}return r},u.prototype._mergeFormats=function(e,n){var r={},i,o;for(
i in e){if(!t.call(e,i))continue;r[i]=o=s(e[i]),n&&t.call(n,i)&&T(o,n[i])}return r},u.prototype._resolveLocale=function(e){var t=u.__availableLocales__,n,r,i,s;if(t.length===0)throw new Error("No locale data has been provided for IntlMessageFormat yet");typeof e=="string"&&(e=[e]);if(e&&e.length)for(i=0,s=e.length;i<s;i+=1){n=e[i].toLowerCase().split("-")[0];if(!/[a-z]{2,3}/i.test(n))throw new RangeError('"'+e[i]+'" is not a structurally valid language tag');if(t.indexOf(n)>=0)break}return n||u.defaultLocale};var a=/^\${([-\w]+)}$/;l.prototype.format=function(e){return e?typeof e=="string"?e:String(e):""},c.prototype.getOption=function(e){var t=this.options;return t[e]||t.other},h.prototype.getOption=function(e){var t=this.options,n=this.pluralFunction(e);return t[n]||t.other};var p=[{type:"string",regex:/^{\s*([-\w]+)\s*}$/,parse:b,postParser:function(e){return"${"+e.valueName+"}"}},{type:"select",regex:/^{\s*([-\w]+)\s*,\s*select\s*,\s*(.*)\s*}$/,parse:b,tokenParser:g},{type:"plural",regex:/^{\s*([-\w]+)\s*,\s*plural\s*,\s*(.*)\s*}$/,parse:b,tokenParser:g,outputFormatter:function(e){return e.replace(/#/g,"${#}")}},{type:"time",regex:/^{\s*([-\w]+)\s*,\s*time(?:,(.*))?\s*}$/,parse:b,tokenParser:y,postParser:function(e){return e.format=e.format||"medium",e}},{type:"date",regex:/^{\s*([-\w]+)\s*,\s*date(?:,(.*))?\s*}$/,parse:b,tokenParser:y,postParser:function(e){return e.format=e.format||"medium",e}},{type:"number",regex:/^{\s*([-\w]+)\s*,\s*number(?:,(.*))?\s*}$/,parse:b,tokenParser:y},{type:"custom",regex:/^{\s*([-\w]+)\s*,\s*([a-zA-Z]*)(?:,(.*))?\s*}$/,parse:b,tokenParser:y}];return u}),function(e){var t=e.IntlMessageFormat,n=[function(e){},function(e){return e=Math.floor(e),e===1?"one":"other"},function(e){return e=Math.floor(e),e>=0&&e<=1?"one":"other"},function(e){var t=Math.floor(Math.abs(e));return e=Math.floor(e),t===0||e===1?"one":"other"},function(e){return e=Math.floor(e),e===0?"zero":e===1?"one":e===2?"two":e%100>=3&&e%100<=10?"few":e%100>=11&&e%100<=99?"many":"other"},function(e){return e=Math.floor(e),e%10===1&&e%100!==11?"one":e%10>=2&&e%10<=4&&!(e%100>=12&&e%100<=14)?"few":e%10===0||e%10>=5&&e%10<=9||e%100>=11&&e%100<=14?"many":"other"},function(e){return"other"},function(e){return e=Math.floor(e),e%10===1&&e%100!==11&&e%100!==71&&e%100!==91?"one":e%10===2&&e%100!==12&&e%100!==72&&e%100!==92?"two":!(e%10>=3&&e%10<=4||e%10===9)||e%100>=10&&e%100<=19||e%100>=70&&e%100<=79||e%100>=90&&e%100<=99?e!==0&&e%1e6===0?"many":"other":"few"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length,r=parseInt(e.toString().replace(/^[^.]*\.?/,""),10);return e=Math.floor(e),n===0&&t%10===1&&(t%100!==11||r%10===1&&r%100!==11)?"one":n===0&&t%10>=2&&t%10<=4&&(!(t%100>=12&&t%100<=14)||r%10>=2&&r%10<=4&&!(r%100>=12&&r%100<=14))?"few":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),t===1&&n===0?"one":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),t===1&&n===0?"one":t>=2&&t<=4&&n===0?"few":n!==0?"many":"other"},function(e){return e=Math.floor(e),e===0?"zero":e===1?"one":e===2?"two":e===3?"few":e===6?"many":"other"},function(e){var t=Math.floor(Math.abs(e)),n=parseInt(e.toString().replace(/^[^.]*\.?|0+$/g,""),10);return e=Math.floor(e),e===1||n!==0&&(t===0||t===1)?"one":"other"},function(e){var t=Math.floor(Math.abs(e));return e=Math.floor(e),t===0||t===1?"one":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),t>=0&&t<=1&&n===0?"one":"other"},function(e){return e=Math.floor(e),e===1?"one":e===2?"two":e>=3&&e<=6?"few":e>=7&&e<=10?"many":"other"},function(e){return e=Math.floor(e),e===1||e===11?"one":e===2||e===12?"two":e>=3&&e<=10||e>=13&&e<=19?"few":"other"},function(e){return e=Math.floor(e),e%10===1?"one":e%10===2?"two":e%100===0||e%100===20||e%100===40||e%100===60?"few":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),t===1&&n===0?"one":t===2&&n===0?"two":n!==0||e>=0&&e<=10||e%10!==0?"other":"many"},function(e){var t=Math.floor(Math.abs(e)),n=parseInt(e.toString().replace(/^[^.]*\.?|0+$/g,""),10);return e=Math.floor(e),n!==0||t%10!==1||t%100===11&&n===0?"other":"one"},function(e){return e=Math.floor(e),e===0?"zero":e===1?"one":"other"},function(e){return e=Math.floor(e),e===1?"one":e===2?"two":"other"},function(e){var t=Math.floor(Math.abs(e));return e=Math.floor(e),e===0?"zero":t!==0&&t!==1||e===0?"other":"one"},function(e){var t=parseInt(e.toString().replace(/^[^.]*\.?/,""),10);return e=Math.floor(e),e%10!==1||e%100>=11&&e%100<=19?e%10>=2&&e%10<=9&&!(e%100>=11&&e%100<=19)?"few":t!==0?"many":"other":"one"},function(e){var t=e.toString().replace(/^[^.]*\.?/,"").length,n=parseInt(e.toString().replace(/^[^.]*\.?/,""),10);return e=Math.floor(e),e%10===0||e%100>=11&&e%100<=19||t===2&&n%100>=11&&n%100<=19?"zero":e%10===1&&(e%100!==11||t===2&&n%10===1&&(n%100!==11||t!==2&&n%10===1))?"one":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length,r=parseInt(e.toString().replace(/^[^.]*\.?/,""),10);return e=Math.floor(e),n!==0||t%10!==1&&r%10!==1?"other":"one"},function(e){return e=Math.floor(e),e===1?"one":e===0||e%100>=2&&e%100<=10?"few":e%100>=11&&e%100<=19?"many":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),t===1&&n===0?"one":n===0&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)?"few":n===0&&t!==1&&(t%10>=0&&t%10<=1||n===0&&(t%10>=5&&t%10<=9||n===0&&t%100>=12&&t%100<=14))?"many":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length,r=parseInt(e.toString().replace(/^[^.]*\.?|0+$/g,""),10);return e=Math.floor(e),t===1&&(n===0||t===0&&r===1)?"one":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length
;return e=Math.floor(e),t===1&&n===0?"one":n!==0||e===0||e!==1&&e%100>=1&&e%100<=19?"few":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),n===0&&t%10===1&&t%100!==11?"one":n===0&&(t%10===0||n===0&&(t%10>=5&&t%10<=9||n===0&&t%100>=11&&t%100<=14))?"many":"other"},function(e){var t=Math.floor(Math.abs(e));return e=Math.floor(e),t===0||e===1?"one":e>=2&&e<=10?"few":"other"},function(e){var t=Math.floor(Math.abs(e)),n=parseInt(e.toString().replace(/^[^.]*\.?/,""),10);return e=Math.floor(e),e===0||e===1||t===0&&n===1?"one":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),n===0&&t%100===1?"one":n===0&&t%100===2?"two":n===0&&(t%100>=3&&t%100<=4||n!==0)?"few":"other"},function(e){return e=Math.floor(e),e>=0&&e<=1||e>=11&&e<=99?"one":"other"},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return e=Math.floor(e),n===0&&t%10===1&&t%100!==11?"one":n===0&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)?"few":n===0&&(t%10===0||n===0&&(t%10>=5&&t%10<=9||n===0&&t%100>=11&&t%100<=14))?"many":"other"}];t.__addLocaleData({locale:"aa",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"af",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"agq",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ak",messageformat:{pluralFunction:n[2]}}),t.__addLocaleData({locale:"am",messageformat:{pluralFunction:n[3]}}),t.__addLocaleData({locale:"ar",messageformat:{pluralFunction:n[4]}}),t.__addLocaleData({locale:"as",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"asa",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ast",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"az",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"bas",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"be",messageformat:{pluralFunction:n[5]}}),t.__addLocaleData({locale:"bem",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"bez",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"bg",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"bm",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"bn",messageformat:{pluralFunction:n[3]}}),t.__addLocaleData({locale:"bo",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"br",messageformat:{pluralFunction:n[7]}}),t.__addLocaleData({locale:"brx",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"bs",messageformat:{pluralFunction:n[8]}}),t.__addLocaleData({locale:"byn",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ca",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"cgg",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"chr",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"cs",messageformat:{pluralFunction:n[10]}}),t.__addLocaleData({locale:"cy",messageformat:{pluralFunction:n[11]}}),t.__addLocaleData({locale:"da",messageformat:{pluralFunction:n[12]}}),t.__addLocaleData({locale:"dav",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"de",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"dje",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"dua",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"dyo",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"dz",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"ebu",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ee",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"el",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"en",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"eo",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"es",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"et",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"eu",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ewo",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"fa",messageformat:{pluralFunction:n[3]}}),t.__addLocaleData({locale:"ff",messageformat:{pluralFunction:n[13]}}),t.__addLocaleData({locale:"fi",messageformat:{pluralFunction:n[14]}}),t.__addLocaleData({locale:"fil",messageformat:{pluralFunction:n[14]}}),t.__addLocaleData({locale:"fo",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"fr",messageformat:{pluralFunction:n[13]}}),t.__addLocaleData({locale:"fur",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ga",messageformat:{pluralFunction:n[15]}}),t.__addLocaleData({locale:"gd",messageformat:{pluralFunction:n[16]}}),t.__addLocaleData({locale:"gl",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"gsw",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"gu",messageformat:{pluralFunction:n[3]}}),t.__addLocaleData({locale:"guz",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"gv",messageformat:{pluralFunction:n[17]}}),t.__addLocaleData({locale:"ha",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"haw",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"he",messageformat:{pluralFunction:n[18]}}),t.__addLocaleData({locale:"hi",messageformat:{pluralFunction:n[3]}}),t.__addLocaleData({locale:"hr",messageformat:{pluralFunction:n[8]}}),t.__addLocaleData({locale:"hu",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"hy",messageformat:{pluralFunction:n[13]}}),t.__addLocaleData({locale:"ia",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"id",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"ig",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"ii",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"is",messageformat:{pluralFunction:n[19]}}),t.__addLocaleData({locale:"it"
,messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"ja",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"jgo",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"jmc",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ka",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"kab",messageformat:{pluralFunction:n[13]}}),t.__addLocaleData({locale:"kam",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"kde",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"kea",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"khq",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ki",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"kk",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"kkj",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"kl",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"kln",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"km",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"kn",messageformat:{pluralFunction:n[3]}}),t.__addLocaleData({locale:"ko",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"kok",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ks",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ksb",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ksf",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ksh",messageformat:{pluralFunction:n[20]}}),t.__addLocaleData({locale:"kw",messageformat:{pluralFunction:n[21]}}),t.__addLocaleData({locale:"ky",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"lag",messageformat:{pluralFunction:n[22]}}),t.__addLocaleData({locale:"lg",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"lkt",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"ln",messageformat:{pluralFunction:n[2]}}),t.__addLocaleData({locale:"lo",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"lt",messageformat:{pluralFunction:n[23]}}),t.__addLocaleData({locale:"lu",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"luo",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"luy",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"lv",messageformat:{pluralFunction:n[24]}}),t.__addLocaleData({locale:"mas",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"mer",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"mfe",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"mg",messageformat:{pluralFunction:n[2]}}),t.__addLocaleData({locale:"mgh",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"mgo",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"mk",messageformat:{pluralFunction:n[25]}}),t.__addLocaleData({locale:"ml",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"mn",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"mr",messageformat:{pluralFunction:n[3]}}),t.__addLocaleData({locale:"ms",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"mt",messageformat:{pluralFunction:n[26]}}),t.__addLocaleData({locale:"mua",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"my",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"naq",messageformat:{pluralFunction:n[21]}}),t.__addLocaleData({locale:"nb",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"nd",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ne",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"nl",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"nmg",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"nn",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"nnh",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"nr",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"nso",messageformat:{pluralFunction:n[2]}}),t.__addLocaleData({locale:"nus",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"nyn",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"om",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"or",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"os",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"pa",messageformat:{pluralFunction:n[2]}}),t.__addLocaleData({locale:"pl",messageformat:{pluralFunction:n[27]}}),t.__addLocaleData({locale:"ps",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"pt",messageformat:{pluralFunction:n[28]}}),t.__addLocaleData({locale:"rm",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"rn",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ro",messageformat:{pluralFunction:n[29]}}),t.__addLocaleData({locale:"rof",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ru",messageformat:{pluralFunction:n[30]}}),t.__addLocaleData({locale:"rw",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"rwk",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"sah",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"saq",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"sbp",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"se",messageformat:{pluralFunction:n[21]}}),t.__addLocaleData({locale:"seh",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ses",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"sg",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"shi",messageformat:{pluralFunction:n[31]}}),t.__addLocaleData({locale:"si",messageformat:{pluralFunction:n[32]}}),t.__addLocaleData({locale:"sk",messageformat:{pluralFunction:n[10]}}),t.__addLocaleData({locale:"sl",messageformat:{pluralFunction:n[33]}}),t.__addLocaleData({locale:"sn",messageformat
:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"so",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"sq",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"sr",messageformat:{pluralFunction:n[8]}}),t.__addLocaleData({locale:"ss",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ssy",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"st",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"sv",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"sw",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"swc",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ta",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"te",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"teo",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"tg",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"th",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"ti",messageformat:{pluralFunction:n[2]}}),t.__addLocaleData({locale:"tig",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"tn",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"to",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"tr",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"ts",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"twq",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"tzm",messageformat:{pluralFunction:n[34]}}),t.__addLocaleData({locale:"uk",messageformat:{pluralFunction:n[35]}}),t.__addLocaleData({locale:"ur",messageformat:{pluralFunction:n[9]}}),t.__addLocaleData({locale:"uz",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"vai",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"ve",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"vi",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"vo",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"vun",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"wae",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"wal",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"xh",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"xog",messageformat:{pluralFunction:n[1]}}),t.__addLocaleData({locale:"yav",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"yo",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"zgh",messageformat:{pluralFunction:n[0]}}),t.__addLocaleData({locale:"zh",messageformat:{pluralFunction:n[6]}}),t.__addLocaleData({locale:"zu",messageformat:{pluralFunction:n[3]}})}(typeof global!="undefined"?global:this);var n=IntlMessageFormat.__localeData__.en.pluralFunction;IntlMessageFormat.__localeData__.zh.pluralFunction=n,IntlMessageFormat.__localeData__.vi.pluralFunction=n,IntlMessageFormat.__localeData__.ko.pluralFunction=n,IntlMessageFormat.__localeData__.id.pluralFunction=n},"@VERSION@",{es:!0});
YUI.add("handlebars-helper-intl",function(e,t){(function(e,t){"use strict";var n=e.Intl||e.IntlPolyfill;typeof define=="function"&&define.amd&&define(["intl-messageformat"],function(e){return t(n,e)}),typeof exports=="object"&&(module.exports=t(n,require("intl-messageformat"))),e.HandlebarsHelperIntl=t(n,e.IntlMessageFormat)})(typeof global!="undefined"?global:this,function(e,t){"use strict";function i(t,n,i){var s,o,u,a,f,l,c;if(JSON){if(i){s=[];for(u in i)i.hasOwnProperty(u)&&s.push(u);s.sort();for(a=0,f=s.length;a<f;a+=1)u=s[a],o={},o[u]=i[u],s[a]=o}l=JSON.stringify([n,s])}c=r[t][l];if(c)return c;switch(t){case"number":c=new e.NumberFormat(n,i);break;case"date":c=new e.DateTimeFormat(n,i)}return l&&(r[t][l]=c),c}function s(e){var t=Array.prototype.slice.call(arguments,1),n,r,i,s;for(n=0,r=t.length;n<r;n+=1){i=t[n];if(!i)continue;for(s in i)i.hasOwnProperty(s)&&(e[s]=i[s])}return e}if(!e)throw new ReferenceError("Intl must be available.");if(!t)throw new ReferenceError("IntlMessageFormat must be available.");var n={};n.registerWith=function(n){function l(e){if(!e.fn)throw new ReferenceError("{{#intl}} must be invoked as a block helper");var t=o(e.data),n=s({},t.intl,e.hash);return t.intl=n,e.fn(this,{data:t})}function c(e,t,n){e=new Date(e);if(!e||!e.getTime())throw new TypeError("A date must be provided.");n||(n=t,t=null);var r=n.hash,o=n.data,u=o.intl&&o.intl.locales;return t?(typeof t=="string"&&(t=p("formats.date."+format,n)),t=s({},t,r)):t=r,i("date",u,t).format(e)}function h(e,t,n){if(typeof e!="number")throw new TypeError("A number must be provided.");n||(n=t,t=null);var r=n.hash,o=n.data,u=o.intl&&o.intl.locales;return t?(typeof t=="string"&&(t=p("formats.number."+format,n)),t=s({},t,r)):t=r,i("number",u,t).format(e)}function p(e,t){var n=t.data&&t.data.intl,r=e.split("."),i,s,o;try{for(o=0,s=r.length;o<s;o++)i=n=n[r[o]]}finally{if(i===undefined)throw new ReferenceError("Could not find Intl object: "+e)}return i}function d(e,n){n||(n=e,e=null);var r=n.hash;if(!e&&typeof e!="string"&&!r.intlName)throw new ReferenceError("{{intlMessage}} must be provided a message or intlName");var i=n.data.intl||{},s=i.locales,o=i.formats;return!e&&r.intlName&&(e=p(r.intlName,n)),typeof e=="function"?e(r):(typeof e.format!="function"&&(e=new t(e,s,o)),e.format(r))}function v(){var e=[].slice.call(arguments).pop(),t=e.hash,n,i;for(n in t)t.hasOwnProperty(n)&&(i=t[n],typeof i=="string"&&(t[n]=u(i)));return new r(String(d.apply(this,arguments)))}var r=n.SafeString,o=n.createFrame,u=n.Utils.escapeExpression,a={intl:l,intlDate:c,intlNumber:h,intlGet:p,intlMessage:d,intlHTMLMessage:v},f;for(f in a)a.hasOwnProperty(f)&&n.registerHelper(f,a[f])};var r={number:{},date:{}};return n})},"@VERSION@",{es:!0,requires:["intl-messageformat"]});
YUI.add("god-message",function(e){"use strict";e.godMessage=function(t){var n,r,i,s,o,u,a="GOD_MESSAGE_MISSING";if(typeof t.intlName=="undefined")return a;r=t.intlName,i=r.split(".");if(!(e.config.flickr&&e.config.flickr.god&&e.config.flickr.god.lang&&e.config.flickr.god.lang))return a;n=e.clone(e.config.flickr.god.lang);try{for(u=0,o=i.length;u<o;u++)s=n=n[i[u]]}finally{if(s===undefined)return a}return s}},"@VERSION@",{requires:["oop"]});
YUI.add("handlebars-helpers",function(e){"use strict";function o(t,n,r){var i="relative-dates.",s="NO_DATE",o="SHORT",u="LONG",a="_FUTURE",f="_PAST",l={s:"SECOND_",ss:"SECONDS_",m:"MINUTE_",mm:"MINUTES_",h:"HOUR_",hh:"HOURS_",d:"DAY_",dd:"DAYS_",M:"MONTH_",MM:"MONTHS_",y:"YEAR_",yy:"YEARS_"},c,h,p,d,v,m,g,y="",b;return t?(c=e.moment.duration(t.diff(e.moment())),h=Math.round(Math.abs(+c)/1e3),p=Math.round(h/60),d=Math.round(p/60),v=Math.round(d/24),m=Math.round(v/365),b=h<45&&["s",h]||p===1&&["m"]||p<45&&["mm",p]||d===1&&["h"]||d<22&&["hh",d]||v===1&&["d"]||v<=25&&["dd",v]||v<=45&&["M"]||v<345&&["MM",Math.round(v/30)]||m===1&&["y"]||["yy",m],g=c>0,r&&(y=g?a:f),{intlName:i+l[b[0]]+(n?o:u)+y,time:b[1]}):{intlName:i+s}}var t,n,r,i=e.Handlebars,s={outlet:function(e,t){var n,r;return t=typeof t=="undefined"?!0:t,e?e.render?(r=e,n=YUI.Env.isServer?r.get("container").get("outerHTML"):'<div id="'+r.getId()+'" class="hb-placeholder"></div>'):YUI.Env.isServer&&t?n=e.get("outerHTML"):t?n='<div id="'+e._yuid+'"></div>':n=e:n="",new i.SafeString(n)},photoDescription:function(e,t){return t?new i.SafeString(e.split("\n").map(function(e){return e.trim()===""?" ":"<p>"+s.addLinkToHash(e)+"</p>"}).join("").split("<br>").map(function(e){return e.trim()===""?" ":s.addLinkToHash(e)}).join("")):new i.SafeString(e.split("\n").map(function(e){return"<p>"+(e.trim()===""?" ":s.addLinkToHash(e))+"</p>"}).join(""))},photoAttribution:function(e,t,n){var r="",i;e.owner&&e.owner.displayname&&(r=e.owner.displayname);if(!t||!t["remove-by-attribution"])e.isOwner?(i="common.BY_YOU",r=""):i="common.BY_USER";return n.fn({user:r,intlName:i})},commentPermalinkId:function(e){return e=e.split("-"),"comment"+e[2]},contactUrl:function(e){return"/photos/"+e.pathAlias||e.id},renderTrustedMarkupWithLineBreaks:function(t){return t=t.replace(/(\r\n|\n|\r)/gm,"<br>"),e.Handlebars.helpers.renderTrustedMarkup(t)},renderSafeInlineComment:function(t,n){t=t.replace(/(\r\n|\n|\r)/gm," ");var r=r||120,i=t?t.length:0,s="";return i?(n&&(n=" "+n),e.Handlebars.helpers.stripTags(t).length<=r?s=t:(s=e.Handlebars.helpers.stripTags(t),s.length>r&&(s=e.Handlebars.helpers.truncate(s,r.toString(),!1,n))),e.Handlebars.helpers.renderTrustedMarkupWithLineBreaks(s)):s},stripTags:function(e){var t="";return e&&(t=String(e).replace(/<\/?[^>]+>/g,"")),t},photoNote:function(e){return e=e.replace(/(\r\n|\n|\r)/gm,"<p> </p>"),new i.SafeString(e)},canRemoveTag:function(t,n,r,i){return e.Handlebars.helpers.canRemoveAnyTag(t,n,r,null,i)},canRemoveAnyTag:function(e,t,n,r,i){return n||t&&e===t||r&&r===t?i.fn(this):""},formatNumber:function(t){var n=0,r=1e3,i=r/10,s=1e6,o=s/10;try{n=typeof t!="number"?parseInt(t,10):t}catch(u){}return n<1?"":n<r?e.Handlebars.helpers.friendlyNumber(n):n<s?e.Handlebars.helpers.friendlyNumber(Math.floor(n/i)/10)+"k":e.Handlebars.helpers.friendlyNumber(Math.floor(n/o)/10)+"M"},obfuscateInternals:function(e){return e=e.toString(),parseInt(e.split("").map(function(e){return e.charCodeAt(0)}).join(""),10).toString(16)},renderMetaInfo:function(e){return!e&&typeof e!="boolean"?"":e.indexOf&&e.indexOf("<")>-1?e:new i.SafeString(e)},addLinkToHash:function(e){var t=/\s#[^#\s]+/gi,n=/<[\s]*[\/]*[\s]*script[\s]*>/gi,r=/<[^>]*(on[a-zA-Z]+=)[^>]*>/gi,i=/<[\s]*[\/]*[\s]*iframe[\s]*>/gi,s;return e=e.replace(n,""),e=e.replace(i,""),e=e.replace(r,""),s=e.replace(t,function(t,n,r){return n>0&&e.slice(n-1,n)==="&"?t:' <a href="/photos/tags/'+t.slice(2)+'">'+t.slice(1)+"</a>"}),s},isFlipped:function(e,t){var n=t.data.flippers||this.flippers;if(e)return n[e]?t.fn(this):t.inverse(this)},isNotFlipped:function(e,t){var n=t.data.flippers||this.flippers;if(e)return n[e]?t.inverse(this):t.fn(this)},urlPhoto:function(t,n){var r="#";return r=e.URLHelper.getPhotoPage({photoId:t.id,pathAlias:t.owner.pathAlias,contextSuffix:n}),r},getTagSearchUrl:function(e){return"/search/?tags="+e},shortUrlPhoto:function(t,n){return t?e.URLHelper.getShortURL(t.id,n):window.location.href},friendlyDateScrappySubphoto:function(t,n,r,i){var s="",o;return r?n===8?s="photo-page-scrappy.TAKEN_CIRCA":n===6?s="photo-page-scrappy.TAKEN_SOMETIME_IN":n===4?s="photo-page-scrappy.TAKEN_IN_MONTH":s="photo-page-scrappy.TAKEN_ON_INTL":s="photo-page-scrappy.UPLOADED_ON_INTL",o=function(){return r&&n===8?"granularity"in t&&"year"in t?t.year:t.replace(/^([\d]+)(.*)/g,"$1"):(t instanceof Date||("granularity"in t&&"year"in t?(t=e.moment(t.year+"-"+t.month+"-"+t.day+" "+t.hour+":"+t.minute+":"+t.second,"YYYY-M-D HH:mm:ss"),t.tzOffset&&t.utcOffset(t.tzOffset)):typeof t=="string"&&t.indexOf("-")>-1?t=e.moment(t):t=e.moment(t,"X")),n===6&&r?t.format("YYYY"):n===4&&r?t.toDate():t.toDate())}(),i.fn({intlName:s,intlDate:o})},friendlyDate:function(t,n){var r="Sometime in ",i="Circa ";return n===8?i+t.replace(/^([\d]+)(.*)/g,"$1"):(t instanceof Date||(typeof t=="string"&&t.indexOf("-")>-1?t=e.moment(t):t=e.moment(t,"X")),n===6?r+t.format("YYYY"):n===4?t.format("MMMM")+" "+t.format("YYYY"):t.format("MMMM D, YYYY"))},friendlyNumber:function(t){return e.Number.format(t,{thousandsSeparator:","})},friendlyDataSize:function(e){var t=["B","KB","MB","GB","TB"],n,r,i,s,o=100,u=parseInt(e,10)||1;return n=Math.ceil(Math.log(u)/Math.LN10),i=Math.floor(n/3),s=u/Math.pow(10,i*3),s=Math.floor(s*o)/o,r=t[i],e===0&&(s=0),s+r},_friendlySinceDate:function(t,n,r){var i=e.moment(t),s="";return i.isValid()||(i=e.moment(t,"X")),i.unix()===0?s=o():s=o(i,n,r),s},friendlySinceDate:function(t,n,r,i){return i.fn(e.Handlebars.helpers._friendlySinceDate(t,n,r))},capitalize:function(e){return e[0].toLocaleUpperCase()+e.slice(1)},renderTrustedMarkup:function(e){if(e)return new i.SafeString(e)},pickRandomItem:function(e,t){if(!e)return"--- delimiter required ---";var n=t.fn(this),r=n.split("</"+e+">").slice(0,-1).map(function(t){return t.replace("<"+e+">","").trim()});return r[Math.floor(r.length*Math.random())]||"--- no valid items ---"},randomLine:function(e){var t=e.fn(this),n;return t?(t=t.trim(),t[0]==="\n"&&(t=t.slice(1)),t
[t.length-1]==="\n"&&(t=t.slice(0,t.length-1)),n=t.split("\n"),n[Math.floor(n.length*Math.random())]):"<!-- no lines to return -->"},configVal:function(e,t){return t===undefined||!e||!n[e]?"":(n._index=n._index||{},n._index[e]||(n._index[e]=n[e].reduce(function(e,t){return e[t.value+""]=t.text,e},{})),n._index[e][t+""]||"")},eachConfigVal:function(e,t){return(n[e]||[]).map(function(e){return t.fn(e)}).join("")},safetyLevelString:function(e,t){for(var r=0;r<n.safetyLevel.length;r++)if(e.toString()===n.safetyLevel[r].value)return t.fn(n.safetyLevel[r])},privacyString:function(e,t){for(var r=0;r<n.privacy.length;r++)if(e===n.privacy[r].value)return t.fn(n.privacy[r])},licenseString:function(e,t){for(var r=0;r<n.licenseDisplay.length;r++)if(e.toString()===n.licenseDisplay[r].value)return t.fn(n.licenseDisplay[r])},truncate:function(e,t,n,i,s){return r.truncate(e,t,{respectWords:n===!1?!1:!0,ellipsis:typeof i=="string"?i:"...",escape:typeof s!="undefined"?s:!0})},json:function(e){var t=!1,n;return typeof e=="object"?(n=JSON.stringify(e,null,t?" ":""),n.indexOf("\u2028")>-1&&(n=n.replace(/\u2028/g,"\\u2028")),n.indexOf("\u2029")>-1&&(n=n.replace(/\u2029/g,"\\u2029")),n=n.replace(/\//g,"\\/")):n="{}",new i.SafeString(n)},ifCond:function(e,t,n,r){switch(t){case"===":return e===n?r.fn(this):r.inverse(this);case"!==":return e!==n?r.fn(this):r.inverse(this);case"<":return e<n?r.fn(this):r.inverse(this);case"<=":return e<=n?r.fn(this):r.inverse(this);case">":return e>n?r.fn(this):r.inverse(this);case">=":return e>=n?r.fn(this):r.inverse(this);case"in":return(n+"").trim().replace(/\s*[,;]\s*/,",").split(/[,;]/).indexOf(e)>=0?r.fn(this):r.inverse(this);case"||":return e||n?r.fn(this):r.inverse(this);case"&&":return e&&n?r.fn(this):r.inverse(this);default:return r.inverse(this)}},fallback:function(e,t,n){return e===null||e===undefined||e===""?t:e},"for":function(e,t,n,r){var i="",s;for(s=e;s<t;s+=n)i+=r.fn(s);return i},log:function(){var e=new Array(arguments.length);for(var t=0;t<e.length;++t)e[t]=arguments[t];console[YUI.Env.isServer?"warn":"log"].apply(console,Array.prototype.slice.call(e,0,e.length-1))},protocol:function(){return e.config.flickr.url.protocol},host:function(){return e.config.flickr.url.host},godMessage:function(t){return e.godMessage(t.hash)},chainHelpers:function(){var e=new Array(arguments.length),t,n;for(var r=0;r<e.length;++r)e[r]=arguments[r];return t=e.shift(),e.forEach(function(e){typeof e=="string"&&(n=e.split(" "),t=s[n.shift()].apply(null,[t].concat(n)))}),t},multiHighlightString:function(e,t,n){var r="",s=0,o,u,a,f=!1,l;e=e||"",t=t||[],e=i.Utils.escapeExpression(e),t=t.sort(function(e,t){return e.end-t.end});for(l=0,o=e.length,u=t.length;l<u;l++){a=t[l],f=!1;while(s<a.start&&s<o)r+=e[s++];s<a.end&&(r+='<span class="'+n+'">',f=!0);while(s<a.end&&s<o)r+=e[s++];f&&(r+="</span>")}while(s<o)r+=e[s++];return new i.SafeString(r)}};for(t in s)e.Handlebars.registerHelper(t,s[t]);e.config.global.HandlebarsHelperIntl.registerWith(e.Handlebars),r={truncate:function(e,t,n){return e||(e=""),n||(n={}),e.length>t&&(n.respectWords?e=e.substr(0,t+1).split(/([^\w])/).reduce(function(e,n){return e.length+n.length>t-1?e:(e+=n,e)},""):e=e.substr(0,t-1),e+=n.ellipsis),n.escape?e:new i.SafeString(e)}},n={safetyLevel:[{value:"0",text:"Safe",key:"settings.SAFE"},{value:"1",text:"Moderate",key:"settings.MODERATE"},{value:"2",text:"Restricted",key:"settings.RESTRICTED"}],privacy:[{value:"public",text:"Public",key:"settings.PUBLIC"},{value:"private",text:"Private",key:"settings.PRIVATE"},{value:"friends",text:"Friends",key:"settings.FRIENDS"},{value:"family",text:"Family",key:"settings.FAMILY"},{value:"friendsandfamily",text:"Friends & Family",key:"settings.FRIENDS_AND_FAMILY"}],commentingPermission:[{value:"0",text:"Only you",key:"settings.ONLY_YOU"},{value:"1",text:"Friends & Family",key:"settings.FRIENDS_AND_FAMILY"},{value:"2",text:"People you follow",key:"settings.PEOPLE_YOU_FOLLOW"},{value:"3",text:"Any Flickr member",key:"settings.ANY_FLICKR_MEMBER"}],metaPermission:[{value:"0",text:"Only you",key:"settings.ONLY_YOU"},{value:"1",text:"Friends & Family",key:"settings.FRIENDS_AND_FAMILY"},{value:"2",text:"People you follow",key:"settings.PEOPLE_YOU_FOLLOW"},{value:"3",text:"Any Flickr member",key:"settings.ANY_FLICKR_MEMBER"}],licenseDisplay:[{value:"0",text:"All rights reserved",key:"settings.ALL_RIGHTS_RESERVED"},{value:"10",text:"Public Domain Work",key:"settings.PUBLIC_DOMAIN_WORK"},{value:"9",text:"Public Domain Dedication (CC0)",key:"settings.PUBLIC_DOMAIN_DEDICATION"},{value:"4",text:"Attribution",key:"settings.ATTRIBUTION"},{value:"5",text:"Attribution-ShareAlike",key:"settings.ATTRIBUTION_SHAREALIKE"},{value:"6",text:"Attribution-NoDerivs",key:"settings.ATTRIBUTION_NODERIVS"},{value:"2",text:"Attribution-NonCommercial",key:"settings.ATTRIBUTION_NONCOMMERCIAL"},{value:"1",text:"Attribution-NonCommercial-ShareAlike",key:"settings.ATTRIBUTION_NONCOMMERCIAL_SHAREALIKE"},{value:"3",text:"Attribution-NonCommercial-NoDerivs",key:"settings.ATTRIBUTION_NONCOMMERCIAL_NODERIVS"},{value:"7",text:"No known copyright restrictions",key:"settings.NO_COPYRIGHT_RESTRICTIONS"},{value:"8",text:"United States government work",key:"settings.US_GOV_WORK"}],licenseSelect:[{value:"0",text:"All rights reserved",key:"settings.ALL_RIGHTS_RESERVED"},{value:"10",text:"Public Domain Work",key:"settings.PUBLIC_DOMAIN_WORK"},{value:"9",text:"Public Domain Dedication (CC0)",key:"settings.PUBLIC_DOMAIN_DEDICATION"},{value:"4",text:"Attribution",key:"settings.ATTRIBUTION"},{value:"5",text:"Attribution-ShareAlike",key:"settings.ATTRIBUTION_SHAREALIKE"},{value:"6",text:"Attribution-NoDerivs",key:"settings.ATTRIBUTION_NODERIVS"},{value:"2",text:"Attribution-NonCommercial",key:"settings.ATTRIBUTION_NONCOMMERCIAL"},{value:"1",text:"Attribution-NonCommercial-ShareAlike",key:"settings.ATTRIBUTION_NONCOMMERCIAL_SHAREALIKE"},{value:"3",text:"Attribution-NonCommercial-NoDerivs",key:"settings.ATTRIBUTION_NONCOMMERCIAL_NODERIVS"}],licenseUrls
:[{value:"0",text:"https://help.yahoo.com/kb/flickr/SLN25525.html?impressions=true"},{value:"1",text:"https://creativecommons.org/licenses/by-nc-sa/2.0/"},{value:"2",text:"https://creativecommons.org/licenses/by-nc/2.0/"},{value:"3",text:"https://creativecommons.org/licenses/by-nc-nd/2.0/"},{value:"4",text:"https://creativecommons.org/licenses/by/2.0/"},{value:"5",text:"https://creativecommons.org/licenses/by-sa/2.0/"},{value:"6",text:"https://creativecommons.org/licenses/by-nd/2.0/"},{value:"7",text:"/commons/usage/"},{value:"8",text:"http://www.usa.gov/copyright.shtml"},{value:"9",text:"https://creativecommons.org/publicdomain/zero/1.0/"},{value:"10",text:"https://creativecommons.org/publicdomain/mark/1.0/"}],addMetaPermission:[{value:"0",text:"Only you",key:"settings.ONLY_YOU"},{value:"1",text:"Friends & Family",key:"settings.FRIENDS_AND_FAMILY"},{value:"2",text:"People you follow",key:"settings.PEOPLE_YOU_FOLLOW"},{value:"3",text:"Any Flickr member",key:"settings.ANY_FLICKR_MEMBER"}]}},"@VERSION@",{requires:["handlebars-base","url-helper","moment","datatype-number","flipper","handlebars-helper-intl","god-message"]});
YUI.add("localizable",function(e,t){var n=e.config.global.IntlMessageFormat,r=function(){var e={};return function(t,n){var r=t.join(".");return e.hasOwnProperty(r)?e[r]:e[r]=n()}},i=r(),s=r(),o=function(t,n,r){var s={};return e.Array.each(t,function(e){s[e]=i([n,e],function(){return u(e,n,r)})}),s},u=function(t,r,i){var o=e.Intl.get("hermes/"+t,null,r);return e.Object.each(o,function(e,u){o[u]=s([r,t,u],function(){return new n(e,r,i)})}),o};e.Localizable={appContext:{},langBundles:[],langFormatters:{date:{monthYear:{month:"long",year:"numeric"},monthYearShort:{month:"short",year:"numeric"},month:{month:"long"},year:{year:"numeric"}},number:{USD:{style:"currency",currency:"USD"}}},defaultLang:e.config.lang,getLang:function(){return this.appContext.lang||this.defaultLang},getLangBundles:function(){return o(this.langBundles,this.getLang(),this.langFormatters)},intlMessage:function(t){var n=this.getLangBundles();return n.locales=this.getLang(),e.Handlebars.helpers.intlMessage({hash:t,data:{intl:n}})},intlHTMLMessage:function(t){var n=this.getLangBundles();return n.locales=this.getLang(),e.Handlebars.helpers.intlMessage({hash:t,data:{intl:n}})}}},"@VERSION@",{requires:["handlebars-base","handlebars-helpers","intl-messageformat"]});
YUI.add("experiments-fullscreen",function(e){var t;t=function(e){this.flipper=e.flipper,this.appContext=e},t.prototype.disableRealFullscreenButtons=function(){return!this.mode},t.prototype.getMode=function(){return this.mode},t.prototype.enableFullscreen=function(){this.mode=!0},t.prototype.disableFullscreen=function(){this.mode=!1},e.namespace("Experiments").Fullscreen=t},"@VERSION@",{requires:[]});
YUI.add("experiments-opt-out",function(e,t){var n=require("lib/flog")(t),r;r=function(e){this.appContext=e,this.optOutEnabled=undefined},r.prototype.enabled=function(){var e=this.appContext.flipper.isFlipped("reboot_photo_page_optin_type");if(typeof this.optOutEnabled=="undefined"){if(!this.appContext.flipper.isFlipped("buckets"))return this.optOutEnabled=!0,n.log("Buckets not flipped; optOutEnabled is true"),this.optOutEnabled;switch(e){case"optin":this.optOutEnabled=!0;break;case"forced_in":this.optOutEnabled=!1;break;default:this.optOutEnabled=!0}}return this.optOutEnabled},e.namespace("Experiments").OptOut=r},"@VERSION@",{requires:[]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("jsonp",function(e,t){function r(){this._init.apply(this,arguments)}var n=e.Lang.isFunction;r.prototype={_init:function(t,r){this.url=t,this._requests={},this._timeouts={},r=n(r)?{on:{success:r}}:r||{};var i=r.on||{};i.success||(i.success=this._defaultCallback(t,r)),this._config=e.merge({context:this,args:[],format:this._format,allowCache:!1},r,{on:i})},_defaultCallback:function(){},send:function(){function u(e,r){return n(e)?function(n){var o=!0,u="_requests";r?(++t._timeouts[s],--t._requests[s]):(t._requests[s]||(o=!1,u="_timeouts"),--t[u][s]),!t._requests[s]&&!t._timeouts[s]&&delete YUI.Env.JSONP[s],o&&e.apply(i.context,[n].concat(i.args))}:null}var t=this,r=e.Array(arguments,0,!0),i=t._config,s=t._proxy||e.guid(),o;return i.allowCache&&(t._proxy=s),t._requests[s]===undefined&&(t._requests[s]=0),t._timeouts[s]===undefined&&(t._timeouts[s]=0),t._requests[s]++,r.unshift(t.url,"YUI.Env.JSONP."+s),o=i.format.apply(t,r),i.on.success?(YUI.Env.JSONP[s]=u(i.on.success),e.Get.js(o,{onFailure:u(i.on.failure),onTimeout:u(i.on.timeout,!0),timeout:i.timeout,charset:i.charset,attributes:i.attributes,async:i.async}).execute(),t):t},_format:function(e,t){return e.replace(/\{callback\}/,t)}},e.JSONPRequest=r,e.jsonp=function(t,n){var r=new e.JSONPRequest(t,n);return r.send.apply(r,e.Array(arguments,2,!0))},YUI.Env.JSONP||(YUI.Env.JSONP={})},"3.16.0",{requires:["get","oop"]});
YUI.add("murmurhash",function(e){function t(e,t){var n,r,i,s,o,u,a,f;n=e.length&3,r=e.length-n,i=t,o=3432918353,u=461845907,f=0;while(f<r)a=e.charCodeAt(f)&255|(e.charCodeAt(++f)&255)<<8|(e.charCodeAt(++f)&255)<<16|(e.charCodeAt(++f)&255)<<24,++f,a=(a&65535)*o+(((a>>>16)*o&65535)<<16)&4294967295,a=a<<15|a>>>17,a=(a&65535)*u+(((a>>>16)*u&65535)<<16)&4294967295,i^=a,i=i<<13|i>>>19,s=(i&65535)*5+(((i>>>16)*5&65535)<<16)&4294967295,i=(s&65535)+27492+(((s>>>16)+58964&65535)<<16);a=0;switch(n){case 3:a^=(e.charCodeAt(f+2)&255)<<16;case 2:a^=(e.charCodeAt(f+1)&255)<<8;case 1:a^=e.charCodeAt(f)&255,a=(a&65535)*o+(((a>>>16)*o&65535)<<16)&4294967295,a=a<<15|a>>>17,a=(a&65535)*u+(((a>>>16)*u&65535)<<16)&4294967295,i^=a}return i^=e.length,i^=i>>>16,i=(i&65535)*2246822507+(((i>>>16)*2246822507&65535)<<16)&4294967295,i^=i>>>13,i=(i&65535)*3266489909+(((i>>>16)*3266489909&65535)<<16)&4294967295,i^=i>>>16,i>>>0}e.murmurhash=t},"@VERSION@");
YUI.add("moneyball-manager",function(e,t){"use strict";function r(e,t){this.initialAdShown=!1,this.adCouldBeShown=!1,this.dwellTime=0,this.isFetching=!1,this.contextOwnerIsPro=!1,this.origin={},this.context={},this.ads=[],this.timeoutID=0,this.adCallsCounter=0,this.currentlyShowingAd=!1,this.fetchingPhotoAd=!1,this.adPosition=1,e&&t?(this.referrer=e,this.appContext=t):n.error("Attempt to instantiate moneyball-manager without appContext/referrer")}function i(t){var r,i,s,o;if(t&&t.ads&&!t.error&&!!t.ads.length){for(s=0,o=t.ads.length;s<o;s++){r=t.ads[s];if(e.Lang.isString(r.tag))try{i=e.JSON.parse(r.tag)}catch(u){e.rapidTracker.beacon(this.name,"errorParsingAdPayload"),n.error("Ad payload contains invalid JSON",{err:u}),this.isFetching=!1;continue}else i=r.tag;if(!i||!e.Lang.isObject(i)||!i.secHqImage||!i.hqImageWidth||!i.hqImageHeight){e.rapidTracker.beacon(this.name,"adPayloadLacksKeyData"),this.isFetching=!1;continue}this.ads.push({url:i.secHqImage,width:i.hqImageWidth,height:i.hqImageHeight,headline:i.headline,clickUrl:i.clickUrl,buddyicon:i.secImage,buddyiconHeight:i.imageHeight,buddyiconWidth:i.imageWidth,landingUrl:i.landingUrl,summary:i.summary,brand:i.source,beacon:r.beacon,imprTrackingUrl:i.imprTrackingUrl})}this.ads.length&&(this.preloadAd(this.ads[0].url),e.rapidTracker.beacon(this.name,"fetchedValidAdPayload"))}else this.appContext.flipper.isFlipped("show_photo_ads")&&this.fetchingPhotoAd===!1&&(this.isFetching=!1,this.adCallsCounter--,this.fetchAdIfRequired({adEndpoint:e.url("/photoad.gne?r="+Date.now())}),this.fetchingPhotoAd=!0)}var n=require("lib/flog")(t);r.prototype.getAdJSON=function(){var e={};return this.ads.length?e=this.ads[0]:n.error("getAdJSON was called with no ads pre-loaded"),e},r.prototype.markAdAsSeen=function(){var t=this;this.ads.length?(this.initialAdShown=!0,this.resetPhotoAdsCounter(),this.timeoutID=window.setTimeout(function(){t.ads.length&&(t.fireAdBeacon(t.ads[0].beacon),t.ads[0].imprTrackingUrl&&t.fireAdBeacon(t.ads[0].imprTrackingUrl),t.ads.shift(),e.rapidTracker.beacon(t.name,"adImpression",{pos:t.adPosition}),t.dwellTime=Date.now())},e.config.flickr.moneyball.dwell_threshold)):n.error("markAdAsSeen was called with no ads left in the queue")},r.prototype.beaconDwellTime=function(){var t=Date.now()-this.dwellTime;this.dwellTime=0,e.rapidTracker.beacon(this.name,"adDwellTime",{dwell:t})},r.prototype.adIsUnloading=function(){this.beaconDwellTime(),window.clearTimeout(this.timeoutID),this.currentlyShowingAd=!1},r.prototype.adIsLoading=function(){this.currentlyShowingAd=!0},r.prototype.isEnabled=function(){return!this.appContext.forceServerRender&&this.appContext.flipper.isFlipped("moneyball_kill_switch")&&this.appContext.flipper.isFlipped("moneyball")&&!this.appContext.getViewer().signedIn},r.prototype.adNext=function(){var t,n,r,i,s,o,u;return YUI.Env.isServer||!this.context.current?!1:(this.adPosition++,t=this.isEnabled(),n=this.adCouldBeShown,s=this.enoughPhotoViewsAccrued(),r=this.contextOwnerIsPro,o=!!this.ads.length,i=o&&!!this.ads[0].preloaded,u=this.adjacentPhotosAreAdFriendly(),t&&n&&s&&!r&&u&&e.rapidTracker.beacon(this.name,"adSlotAvailable"),t&&n&&!r&&i&&s&&u)},r.prototype.resetPhotoAdsCounter=function(){e.Cookie.set("adCounter",0,{path:"/",domain:"flickr.com"})},r.prototype.enoughPhotoViewsAccrued=function(){var t=e.Cookie.get("adCounter",Number),n=this.getThreshold();return t=t||0,t>=n},r.prototype.enoughPhotoViewsToPrefetchAd=function(){var t=e.Cookie.get("adCounter",Number),n=this.getThreshold();return t=t||0,n-t<=e.config.flickr.moneyball.prefetch_threshold},r.prototype.adjacentPhotosAreAdFriendly=function(){var e=!0;return this.origin.arrow==="next"?e=this.context.next.adFriendly&&this.context.current.adFriendly:e=this.context.previous.adFriendly&&this.context.current.adFriendly,e},r.prototype.setAdCouldBeShown=function(e,t,r){typeof e=="undefined"&&(e=!1),t&&r?(this.origin.arrow=t,this.origin.url=r):e&&(n.error("Attempt to schedule an ad without setting nav direction or URL"),e=!1),this.adCouldBeShown=e},r.prototype.updateContext=function(t){var n=["photostream-models","set-models","photoList-models"],r;this.contextOwnerIsPro=!1;if(e.Array.indexOf(n,t.type)!==-1||/^\/search\/\?.+=[0-9]+@N[0-9]{2}.*/.test(t.entryURL))r=t.current.getValue("owner"),r&&(this.contextOwnerIsPro=r.getValue("isPro"));this.context.previous=this.extractKeyDataFromPhotoModel(t.prev),this.context.current=this.extractKeyDataFromPhotoModel(t.current),this.context.next=this.extractKeyDataFromPhotoModel(t.next)},r.prototype.getThreshold=function(){var t;try{this.initialAdShown?t=e.config.flickr.moneyball.threshold[this.referrer].subsequent:t=e.config.flickr.moneyball.threshold[this.referrer].initial}catch(r){n.error("There is no matching value for referrer in the ad/referrer config",{referrer:this.referrer,err:r}),t=100}return t},r.prototype.fireAdBeacon=function(e){var t;e=e.replace("$(AD_POSN)",this.adPosition),t=new Image,t.src=e},r.prototype.fetchAdIfRequired=function(t){var n="&callback={callback}",r=this,s;if(this.isFetching)return;this.ads.length&&!this.ads[0].preloaded?(this.isFetching=!0,this.preloadAd(this.ads[0].url)):!this.ads.length&&this.adCallsCounter<e.config.flickr.moneyball.number_of_ad_calls&&this.enoughPhotoViewsToPrefetchAd()&&(this.isFetching=!0,t.adEndpoint?s=t.adEndpoint+n:s=e.config.flickr.moneyball.endpoint+"&ri="+e.murmurhash(t.spaceid*9999999999,Math.random()*99999)+n,e.rapidTracker.beacon(this.name,"requestingNewAdPayload"),this.adCallsCounter++,e.jsonp(s,{on:{success:function(e){i.call(r,e)},failure:function(){r.isFetching=!1,e.rapidTracker.beacon(r.name,"adPayloadRequestFailed")},timeout:function(){r.isFetching=!1,e.rapidTracker.beacon(r.name,"adPayloadTimedOut")}}}))},r.prototype.updatePhotoAdsCounter=function(){var t=e.Cookie.get("adCounter",Number);return t=t||0,e.Cookie.set("adCounter",++t,{path:"/",domain:"flickr.com"}),t},r.prototype.extractKeyDataFromPhotoModel=function(e){var t={};return e&&(t={adFriendly:e.getValue("safetyLevel"
)===0,url:this.getBackgroundImage(e),link:e.getValue("url")}),t},r.prototype.getBackgroundImage=function(e){var t,n,r,i={height:40,width:101};return n=this.appContext.getViewer().getPixelRatio(),t={width:i.width*n,height:i.height*n},r={cropToFit:!0,includeSizes:["sq","t","q","s","n"]},e.getSizeToFit(t,r).url},r.prototype.preloadAd=function(t){var n,r=this;n=e.Node.create("<img>"),n.on("load",function(){r.ads.length&&(r.ads[0].preloaded=!0),r.isFetching=!1}),n.setAttribute("src",t)},e.namespace("AdManager"),e.AdManager=r},"@VERSION@",{requires:["cookie","jsonp","io-base","json-parse","murmurhash","url"]});
YUI.add("viewport-data",function(e){"use strict";var t=16,n="vp",r=function(r){var i=this,s,o,u;i.appContext=r,s=r.getCookie(n),s&&(o=s.split(","),o.length>4?(this.containerWidths=o.slice(4),this.containerWidths=this.containerWidths.map(function(e){return u=e.split(":"),{name:u[0],width:u[1]}})):this.containerWidths=[]),YUI.Env.isServer?s?(this.viewport={width:parseInt(o[0],10),height:parseInt(o[1],10)},this.density=o[2]?parseFloat(o[2]):1,this.scrollbarWidth=o[3]?parseInt(o[3],10):t):(this.viewport={width:0,height:0},this.density=1,this.scrollbarWidth=t,this.containerWidths=[]):(e.config.win&&(i.density=e.config.win.devicePixelRatio||1,i.scrollbarWidth=e.OverflowHelper.detectScrollbarSize(e.one("body"))),i.setCookieWithCurrentViewportRegion(),i.containerWidths||(i.containerWidths=[]),e.globalEvents.subscribe("window:resize",function(e){i.setCookieWithCurrentViewportRegion()}))};r.VIEWPORT_COOKIE_NAME=n,r.MAX_NUM_CONTAINER_WIDTHS=20,r.prototype.setCookie=function(){var t,r;if(!this.viewport.width||this.viewport.width<0||!this.viewport.height||this.viewport.height<0)return;t=""+this.viewport.width+","+this.viewport.height+","+this.density+","+this.scrollbarWidth,e.Lang.isArray(this.containerWidths)&&(r=this.containerWidths.reduce(function(e,t,n,r){return e+=t.name+":"+t.width,n<r.length-1&&(e+=","),e},""),r&&(t=t+","+r)),this.appContext.setCookie({cookieName:n,cookieValue:t,path:"/",expiresMonthsFromNow:1})},r.prototype.setCookieWithCurrentViewportRegion=function(){this.viewport=e.DOM.viewportRegion(),this.setCookie()},r.prototype.getWidth=function(){return this.viewport.width},r.prototype.getHeight=function(){return this.viewport.height},r.prototype.getDevicePixelRatio=function(){return this.density},r.prototype.getScrollbarWidth=function(){return this.scrollbarWidth},r.prototype.getContainerWidth=function(e){var t=0;return this.containerWidths.some(function(n){if(n.name===e)return t=parseInt(n.width,10),!0}),t},r.prototype.setContainerWidth=function(e,t){var n;this.containerWidths.length>=r.MAX_NUM_CONTAINER_WIDTHS&&(this.containerWidths=this.containerWidths.slice(this.containerWidths.length-r.MAX_NUM_CONTAINER_WIDTHS+1)),n=this.containerWidths.some(function(n){if(n.name===e)return n.width=t,!0}),n||this.containerWidths.push({name:e,width:t}),this.setCookie()},e.ViewportData=r},"@VERSION@");
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("querystring-parse-simple",function(e,t){var n=e.namespace("QueryString");n.parse=function(e,t,r){t=t||"&",r=r||"=";for(var i={},s=0,o=e.split(t),u=o.length,a;s<u;s++)a=o[s].split(r),a.length>0&&(i[n.unescape(a.shift())]=n.unescape(a.join(r)));return i},n.unescape=function(e){return decodeURIComponent(e.replace(/\+/g," "))}},"3.16.0",{requires:["yui-base"]});
YUI.add("browser-support",function(e,t){var n="Google Page Speed Insights",r=new RegExp(["UP\\.Link","UP\\.Browser","Profile\\/MIDP-","MMP\\/","NetFront","BlackBerry","Danger hiptop","Windows CE","MMP\\/","MIDP","Palm","Nokia","Symbian","iPhone","iPod","Android.+Mobile","Mobile.+Firefox","BB10.+Mobile","webOS","SAMSUNG.+Mobile Safari","SEC_.+Mobile Safari",n+".+Mobile"].join("|"),"i"),i=new RegExp([n].join("|"),"i"),s=["facebot","facebook","facebookexternalhit","twitterbot","twitter","pinterest"],o=["bot","crawl","slurp","spider"],u=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i,a=function(e){var t;try{t=YUI.Env.parseUA(e)}catch(n){}return t&&t.userAgent?t.userAgent.toLowerCase():""},f=function(e,t){var n=!1,r;if(e===undefined||e==="")return!0;if(t)for(r in t)t[r]!==undefined&&!isNaN(t[r])&&t[r]>0&&(n=!0);return!n};e.mix(e.namespace("BrowserSupport"),{isUnsupportedBrowser:function(e){var t,n=!1;try{t=YUI.Env.parseUA(e)}catch(r){}return f(e,t)?!1:(t.safari>=536||t.chrome>=20||t.gecko>=24||t.opera>=15||t.os==="android"||t.os==="ios"&&t.ios>=6||t.ie>=10||(n=!0),i.test(t.userAgent)&&(n=!1),n)},isReallyUnsupportedBrowser:function(e){var t,n=!1;try{t=YUI.Env.parseUA(e)}catch(r){}return f(e,t)?!1:(t.safari>=533.21||t.chrome>=13||t.gecko>=2||(e||"").indexOf("Firefox/4.0")>-1||t.opera>=12||t.os==="android"||t.os==="ios"&&t.ios>=4||t.ie>=9||(n=!0),n)},isMobileBrowser:function(e){try{var t=YUI.Env.parseUA(e);return t.ipad?!1:t.mobile&&/Nexus 10/.test(t.userAgent)?!1:t.mobile?!0:r.test(t.userAgent)}catch(n){}return!1},isMobileOrTablet:function(e){try{var t=YUI.Env.parseUA(e);return t.mobile?!0:r.test(t.userAgent)}catch(n){}return!1},isBot:function(e){var t=!1,n;return n=a(e),o.some(function(e){return n.indexOf(e)>-1?(t=!0,!0):!1}),t},isSharingBot:function(e){var t=!1,n;return n=a(e),s.some(function(e){return n.indexOf(e)>-1?(t=!0,!0):!1}),t},isFacebook:function(e){var t=!1,n;return n=a(e),n.indexOf("facebookexternalhit/1.1")>-1&&(t=!0),t},getOSString:function(e){var t,n="";try{t=YUI.Env.parseUA(e)}catch(r){}return e&&e.indexOf("Windows Phone")>-1?n="windows":t&&t.os&&(n=t.os.toLowerCase()),n},isWebview:function(e){return u.test(e)},isGooglePageSpeedToolMobile:function(e){var t=n+".+Mobile";return(new RegExp(t)).test(e)},isGooglePageSpeedToolDesktop:function(e){return(new RegExp(n)).test(e)},getCommonMobileViewportWidth:function(){return 320}})},"@VERSION@",{requires:[]});
YUI.add("healthjs",function(e,t){typeof window!="undefined"?(function n(e,t,r){function i(o,u){if(!t[o]){if(!e[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=t[o]={exports:{}};e[o][0].call(l.exports,function(t){var n=e[o][1][t];return i(n?n:t)},l,l.exports,n,e,t,r)}return t[o].exports}var s=typeof require=="function"&&require;for(var o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){var r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];t.exports=function(e){var t=-1,n,i=e.length;for(n=0;n<i;n++)t=t>>>8^r[(t^e.charCodeAt(n))&255];return t>0?t=Math.abs(t-4294967295):t=Math.abs(t^-1),t.toString(16)}},{}],2:[function(e,t,n){function a(e){if(!(this instanceof a))return new a(e);e=e||{};if(!e.postEndpoint)throw new Error(i+"Constructor needs an endpoint.");this.queued=[],this.pendingFlush=undefined,this.avoidDuplicates=!1,this.maxPerCall=e.maxPerCall||10,this.flushDelay=e.flushDelay||1e3,this.postEndpoint=e.postEndpoint}var r=e("./checksum"),i="[healthjs client] - ",s=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],o=function(){var e=!1;for(var t=0;t<s.length;t++){try{e=s[t]()}catch(n){continue}break}return e},u=function(e,t,n){var r=o();if(!r)return;r.open("POST",e,!0),r.setRequestHeader("Content-Type","application/json"),r.onreadystatechange=function(){r.readyState===4&&r.status!==200&&n(r.responseText)},r.send(t)};a.prototype={beacon:function(e,t){this.queued.push({action:e,metadata:t}),this.pendingFlush||(this.pendingFlush=setTimeout(this.flushQueue.bind(this),this.flushDelay)),this.queued.length>=this.maxPerCall&&this.flushQueue({force:!this.pendingFlush})},flushQueue:function(e){e=e||{};if(this.pendingFlush||e.force){this.pendingFlush&&(clearTimeout(this.pendingFlush),this.pendingFlush=undefined);var t=[],n,r,i=this.queued,s=i.length;for(var o=0;o<s;o++){var u=i[o];t.push({a:u.action,m:u.metadata})}n=(new Date).getTime()+"",r=this.makeChecksum({beacons:t,d:n}),this.queued=[];try{this.doPostBeacon({beacons:t,d:n,c:r},e)}catch(a){this.doPixelBeacon(t,n,r,e)}}},doPostBeacon:function(e,t){var n=this;u(this.postEndpoint,JSON.stringify(e),function(r){if(r){n.doPixelBeacon(e.beacons,e.d,e.c,t);return}})},doPixelBeacon:function(e,t,n,r){var i,s=new Image;i=this.postEndpoint+"?"+this.jsonToQueryString({beacons:JSON.stringify(e)})+"&d="+encodeURIComponent(t)+"&c="+encodeURIComponent(n),r.callback&&(s.onload=s.onerror=r.callback),s.src=i},makeChecksum:function(e){var t=JSON.stringify(e);return r(t)},jsonToQueryString:function(e){var t=Object.keys(e),n=t.length,r=[];for(var i=0;i<n;i++)r.push(encodeURIComponent(t[i])+"="+encodeURIComponent(e[t[i]]));return r.join("&")}},t.exports=a,function(e){e.Health=a}(typeof window!="undefined"?window:this)},{"./checksum":1}]},{},[2]),e.Health=window.Health(e.config.flickr.healthjs)):e.Health=require("health-beaconer").serverBeaconing},"@VERSION@");
YUI.add("app-context",function(e,t){var n=require("lib/flog")(t),r=["bucket","normalizedProtocol","buckets","slice","random_slice","referrer","flipper","lang","gp_code","gp_owner","share_code"],i,s=YUI.Env.isServer?e.config.flickr.api.server_default_timeout:e.config.flickr.api.client_default_timeout,o=YUI.Env.isServer?e.config.flickr.api.server_retry_timeout:e.config.flickr.api.client_retry_timeout,u=[117,118,119],a=new RegExp(e.config.flickr.api.write_api_method_regex),f=e.config.flickr.model_eviction,l={};i=e.AppContext=function(t){var n,i;i=this,t=t||{},t.request&&(this.request=t.request,r.forEach(function(e){e in t.request&&(t[e]=t.request[e])})),n={},r.forEach(function(e){e in t&&(i[e]=t[e],n[e]=t[e])}),this.viewTiming={},this.params=n,this.modelRegistries={},this.modelImportExport=new e.ModelImportExport(this),this.flickrAPI=new e.FlickrAPI(this.request,this),this.auth=t.auth,this.flapp=t.flapp,this.writeAPICallsMadeOnThisPage={},this._moduleInstances={},this._pendingYUIPromises={},this._loadedViews={},this._apiCalls={},this._previousLocation=null,this._uploadInProgress=!1,this._pendingUploadErrorModal=null,this._concurrentAPICalls=0,this._apiQueueOrder=[],this._apiQueueFunctions={},this._preliminaryNsid=null,this.flipper=new e.Flipper(t.flipper),this.experiments={fullscreen:new e.Experiments.Fullscreen(this),optOut:new e.Experiments.OptOut(this)},this.secure=this.normalizedProtocol&&this.normalizedProtocol==="https",this.adManager=new e.AdManager(n.referrer,this),this.viewportData=new e.ViewportData(this),this.clientId="f"+Math.round(Math.random()*1e4).toString(36),this.initGlobalEvictionExemptionConfig()},i.prototype={routeConfig:{},instantiateYUIModule:function(t,n){if(!e.Lang.isString(t)||!e.Lang.isFunction(n))return e.Promise.reject("[app-context] `instantiateYUIModule` called without a `name` or `initializer`.");var r=this,i,s=this._moduleInstances,o=this._pendingYUIPromises;return o[t]||(s[t]?o[t]=e.when(s[t]):(i=YUI.Env.isServer?r.request.app.yui:e,o[t]=e.betterUse(t,i).then(function(){var e=n();return s[t]=e,delete o[t],e}))),o[t]},getModelRegistry:function(t){if(!e.Lang.isString(t))return e.Promise.reject("[app-context] `getModelRegistry` called without a `name`.");var r=this,i;return this.instantiateYUIModule(t,function(s){if(!e.Models||!e.Models[t]||typeof e.Models[t]!="function")throw n.error("There was an error loading the modelregistry",{status:s}),e.fletrics.increment("appContext.getmodelregistry.failures"),i=new Error("[app-context] - Model registry failed to load:"+t),i.moduleLoadingError=!0,i;var o=new e.Models[t](r);return r.modelRegistries[t]=o,o})},getModel:function(t,n,r){return!e.Lang.isString(t)||!n?e.Promise.reject("[app-context] `getModelRegistry` called without a `registryName` or `modelId`."):this.getModelRegistry(t).then(function(t){var i;return this._refetchExistingModels&&(e.Lang.isObject(n,!0)?i=t.attributeSearch(n):i=[n],i.forEach(function(e){this.canEvictModel(t,e)&&this.evictModel(t,e)}.bind(this))),t.get(n,r)}.bind(this))},markAsNewlyFetched:function(e,t){this._refetchExistingModels&&(this._refetchedModels[e]||(this._refetchedModels[e]={}),this._refetchedModels[e][t]=!0)},getRoute:function(t){var r=this,i;return this.instantiateYUIModule(t,function(s){if(!e.Routes||!e.Routes[t]||typeof e.Routes[t]!="function")throw n.error("There was an error loading the route",{status:s}),e.fletrics.increment("appContext.getroute.failures"),i=new Error("[app-context] - Route failed to load:"+t),i.moduleLoadingError=!0,i;return new e.Routes[t](r)})},getView:function(t,r,i){var s=this,o=YUI.Env.isServer?s.request.app.yui:e,u=[t],a;return r=r||{},r.appContext=s,i&&u.push("layout-"+i+"-css"),e.betterUse(u,o).then(function(i){if(!e.Views||!e.Views[t]||typeof e.Views[t]!="function")throw n.error("There was an error loading the view",{status:i}),e.fletrics.increment("appContext.getview.failures"),a=new Error("[app-context] - View failed to load:"+t),a.moduleLoadingError=!0,a;return s._loadedViews[t]=!0,new e.Views[t](r)})},getLoadedViews:function(){return Object.keys(this._loadedViews)},setGPCredentials:function(e){var t=this;e===null?(delete t.params.gp_owner,delete t.params.gp_code,delete t.params.share_code,delete l.gp_owner,delete l.gp_code,delete l.share_code):e!==null&&e.gp_code&&(t.params.gp_owner=e.gp_owner,t.params.gp_code=e.gp_code,t.params.share_code=e.share_code,l.gp_owner=e.gp_owner,l.gp_code=e.gp_code,l.share_code=e.share_code)},getCookie:function(t){return YUI.Env.isServer?this.request.cookies[escape(t)]:e.Cookie.get(t)},setCookie:function(t){if(!YUI.Env.isServer){(!t.cookieName||typeof t.cookieValue=="undefined"||!t.path)&&n.error("Missing important parameters to set a cookie");var r=t.cookieName,i=t.cookieValue,s=t.domain||".flickr.com",o=t.path,u=t.expiresMonthsFromNow||3,a=t.expires?t.expires:e.moment().add(u,"months").toDate();t.remove&&e.Cookie.remove(r,{domain:t.domain||".flickr.com",path:o}),e.Cookie.set(r,i,{domain:s,path:o,expires:a})}else n.warn("You can't set a cookie from the server with AppContext -- use middleware.",t)},removeCookie:function(t){YUI.Env.isServer?n.warn("You can't remove a cookie from the server with AppContext -- use middleware.",t):((!t.cookieName||!t.path)&&n.error("Missing important parameters to remove a cookie"),e.Cookie.remove(t.cookieName,{domain:t.domain||".flickr.com",path:t.path}))},getViewer:function(){var e={},t=this;return e.getPixelRatio=function(){var e;return e=YUI.Env.isServer?t.getCookie("density"):window.devicePixelRatio,e||(e=1),e},this.auth&&this.auth.signedIn?(e.nsid=this.auth.user.nsid,e.intl=this.auth.intl,e.signedIn=this.auth.signedIn,e.isInsecureGod=this.auth.isInsecureGod,e.isMinor=this.auth.isMinor,e.prefs={keyboardShortcutsEnabled:this.auth.keyboardShortcutsEnabled,timezonePref:this.auth.timezonePref,downloadAccessPref:this.auth.downloadAccessPref}):this._preliminaryNsid?(e.nsid=this._preliminaryNsid,e.signedIn=!0):(e.signedIn=!1,e.prefs={keyboardShortcutsEnabled:!0,timezonePref:{name:"",dst:!1,
offset:"00:00",isDefaults:!0}}),e},setPreliminaryViewerNsid:function(e){this._preliminaryNsid=e},getKeyboardManager:function(){return this._keyboardManager||(this._keyboardManager=new e.KeyboardManager),this._keyboardManager},initGlobalEvictionExemptionConfig:function(){var e=this.getViewer().nsid;this._globalEvictionExemptionConfig={},e&&(this._globalEvictionExemptionConfig["person-preferences-models"]={exemptIds:[e]})},initCuratorTools:function(){!this.curatorToolsInited&&this.flipper.isFlipped("enable-curator-tools")&&this.getViewer()&&this.getViewer().isInsecureGod&&e.APIHelper.request.addRebootCuratorExtras(),this.curatorToolsInited=!0},getPreviousURL:function(){var e="";return this._previousLocation&&(e=this._previousLocation.pathname,this._previousLocation.querystring&&(e+="?"+this._previousLocation.querystring),this._previousLocation.hash&&(e+="#"+this._previousLocation.hash)),e},getPreviousLocation:function(){return e.merge(this._previousLocation)},setPreviousLocation:function(){this._previousLocation=this.getLocation()},updateModelRefetchState:function(t,n){if(!this.flipper.isFlipped("evict-models-on-navigate")||!t||n){this._refetchExistingModels=!1,this._refetchedModels=null;return}var r,i;this._previousLocation&&(r=e.URLHelper.getSiteSectionByURL(this._previousLocation.pathname)),t&&(t="/"+t.split("/").slice(3).join("/"),i=e.URLHelper.getSiteSectionByURL(t)),this._refetchExistingModels=undefined,i&&f.entry_refetch_exemptions[i.name]&&(this._refetchExistingModels=!1),r&&f.exit_refetch_exemptions[r.name]&&(this._refetchExistingModels=!1),typeof this._refetchExistingModels=="undefined"&&i&&r&&(f.transition_refetch_exemptions[r.name]&&f.transition_refetch_exemptions[r.name][i.name]?this._refetchExistingModels=!1:this._refetchExistingModels=r.name!==i.name),typeof this._refetchExistingModels=="undefined"&&(this._refetchExistingModels=!1),this._refetchedModels={}},hasClientSideRouted:function(){return!!this._clientSideRouted},setClientSideRouted:function(e){this._clientSideRouted=e},getReferrer:function(){var e;try{e=this.flapp.get("activeView").getViewDataFromHistory("referrer")}catch(t){}return e},getLocation:function(){var t;return YUI.Env.isServer?(t={protocol:this.request.normalizedProtocol,hostname:this.request.hostname,pathname:this.request.path,query:this.request.query,querystring:this.request.query?e.QueryString.stringify(this.request.query):"",hash:""},t.href=t.protocol+"://"+t.hostname+this.request.originalUrl):(t={protocol:e.config.win.location.protocol.split(":")[0],hostname:e.config.win.location.hostname,pathname:e.config.win.location.pathname,querystring:e.config.win.location.search.split("?")[1],href:e.config.win.location.href,hash:e.config.win.location.hash},t.query=t.querystring?e.QueryString.parse(t.querystring):""),t},getViewCounter:function(){return this._viewCounter||(this._viewCounter=new e.ViewCounter({appContext:this})),this._viewCounter},getBucket:function(e){return this.buckets?this.buckets[e]:undefined},handleMismatchedNSID:function(){var t,n;t=e.mix({langBundles:["common"],appContext:this},e.Localizable),n=new e.Views.FluidModal({title:t.intlMessage({intlName:"common.ERROR"}),actionButtonLabel:t.intlMessage({intlName:"common.OK"}),textMessage:t.intlMessage({intlName:"common.MISMATCHED_NSID_ERROR"}),appContext:this,dismissOnOverlayClick:!1,dismissOnActionClick:!0,actionButtonDisabled:!1,showCancelButton:!0,hideModalOverlay:!1,showCancelX:!0}),n.on("actionClick",function(t){e.config.win.location.reload(!0)}),n.show()},mitigateClientPanda:function(t){var n,r;return n=e.mix({langBundles:["common"],appContext:this},e.Localizable),r=new e.Views.FluidModal({title:n.intlMessage({intlName:"common.ERROR"}),actionButtonLabel:n.intlMessage({intlName:"common.OK"}),htmlMessage:n.intlMessage({intlName:t}),appContext:this,dismissOnOverlayClick:!1,dismissOnActionClick:!0,actionButtonDisabled:!1,showCancelButton:!0,hideModalOverlay:!1,showCancelX:!0}),r.on("actionClick",function(t){e.config.win.location.reload(!0)}),r.show(),e.PromiseChainDestroyer()},callAPI:function(t,r,i,f){var c=this,h,p=[t,r,null,f],d,v;return i=i&&!YUI.Env.isServer,l!==null?p=[t,e.merge(r,l),null,f]:p=[t,r,null,f],h=t+"__"+Object.keys(r).sort().map(function(e){return encodeURIComponent(e)+"_"+encodeURIComponent(r[e])}).join("__"),this._apiCalls[h]?((!e.config.flickr.cameraroll.suppress_logging||t!=="flickr.cameraroll.getPhotosByOffset")&&n.log("Reusing API call",{method:t}),c._apiQueueOrder.length>1&&(v=c._apiQueueOrder.indexOf(h),v>-1&&v<c._apiQueueOrder.length-1&&(c._apiQueueOrder.splice(v,1),c._apiQueueOrder.push(h))),this._apiCalls[h].then(function(t){return e.clone(t,!0)},function(t){throw e.clone(t,!0)})):(i&&(p.push(null),p.push({timeout:s})),t.match(a)&&this.cacheWriteAPICall(h,t),this._apiCalls[h]=new e.Promise(function(r,s){var a;a=function(){c.flickrAPI.callMethod.apply(c.flickrAPI,p).then(function(e){return c.onAPICallComplete(h,!0),e},function(r){c.onAPICallComplete(h,!1);if(c.flipper.isFlipped("enable-viewer-nsid-check")&&!YUI.Env.isServer&&u.indexOf(r.code)!==-1)return c.handleMismatchedNSID(),e.PromiseChainDestroyer();if(!YUI.Env.isServer&&r.status===0&&r.total===0)return c.mitigateClientPanda("common.NETWORK_CONNECTIVITY_ISSUE");if(i&&(r.clientTimeout||r.status===0||r.transportFailure)){n.log("Retrying API call",{method:t}),delete c._apiCalls[h];if(!YUI.Env.isServer&&e.config.win.beaconError){if(e.config.win.document)try{r.domain=e.config.win.document.domain}catch(s){}e.config.win.beaconError("[app-context] Retrying API ",e.config.win.location.href,r)}return d=p[p.length-1],d.timeout&&(d.timeout=o),c._apiCalls[h]=c.flickrAPI.callMethod.apply(c.flickrAPI,p).then(function(r){return c.onAPICallComplete(h,!0),n.log("Successfully retried API call",{method:t}),e.fire("appContext:apiRetry",{apiMethod:t,code:418}),!YUI.Env.isServer&&e.config.win.beaconError&&e.config.win.beaconError("[app-context] Successful API retry ",e.config.win.location.href,{}),r},function(r){throw c.onAPICallComplete
(h,!1),n.log("Failed retry of API call",{method:t}),e.fire("appContext:apiRetry",{apiMethod:t,code:408}),!YUI.Env.isServer&&e.config.win.beaconError&&e.config.win.beaconError("[app-context] Failed API retry ",e.config.win.location.href,{}),r}),c._concurrentAPICalls++,c._apiCalls[h]}throw r}).then(r,s)},YUI.Env.isServer?a():(c._apiQueueOrder.push(h),c._apiQueueFunctions[h]=a,c.callNextInQueue())}),this._apiCalls[h])},callNextInQueue:function(){var t=e.config.flickr.api.max_concurrent_api_calls,n,r;this._apiQueueOrder.length&&this._concurrentAPICalls<t&&(this._concurrentAPICalls++,n=this._apiQueueOrder.pop(),r=this._apiQueueFunctions[n],delete this._apiQueueFunctions[n],r())},cacheWriteAPICall:function(e,t){this.writeAPICallsMadeOnThisPage[e]={methodName:t,completed:!1,failed:!1}},onAPICallComplete:function(e,t){var n=this.writeAPICallsMadeOnThisPage[e];n&&(n.completed=!0,n.failed=!t),delete this._apiCalls[e],this._concurrentAPICalls--,this.callNextInQueue()},clearWriteAPICallCache:function(){this.writeAPICallsMadeOnThisPage={}},canEvictModel:function(e,t){var n,r,i,s;return!e||!t?!1:e.exists(t)?(n=e.name,r=this._globalEvictionExemptionConfig[n],i=r&&r.exemptIds&&r.exemptIds.indexOf(t)!==-1,i?!1:(this._refetchedModels[n]||(this._refetchedModels[n]={}),s=this._refetchedModels[n],s[t]?!1:!0)):!1},evictModel:function(e,t){var n=e.name,r;this.flipper.isFlipped("model-eviction-debugging")&&console.log("[EVICT] "+n+" ["+t+"]"),r=e.getOwnedModels(t),r.forEach(function(e){this.canEvictModel(e.registry,e.id)&&this.evictModel(e.registry,e.id)}.bind(this)),e.remove(t)},evictModels:function(t){var r=this.getViewer().nsid,i,s,o=[],u=this.modelRegistries,a,f;for(i in this.writeAPICallsMadeOnThisPage)s=this.writeAPICallsMadeOnThisPage[i],s.completed&&!s.failed&&o.push(s);o.forEach(function(e){}),this._refetchExistingModels&&(r&&(t=e.merge(t,this._globalEvictionExemptionConfig)),Object.keys(this.modelRegistries).forEach(function(e){a=u[e],f=t[e],f?f.exemptIds?(f.evictIds&&n.warn("Error in eviction config for registry: cannot specify both a whitelist (`evictIds`) and a blacklist (`exemptIds`) for model eviction. Ignoring `evictIds` and evicting all models except those listed in `exemptIds`.",{modelRegistryName:e}),a.removeAllExcept(f.exemptIds)):f.evictIds&&f.evictIds.forEach(function(t){u[e].remove(t)}):u[e].removeAll()}))},markUploadInProgress:function(e){this._uploadInProgress=e},uploadIsInProgress:function(){return this._uploadInProgress},storePendingUploadErrorModal:function(e){this._pendingUploadErrorModal=e},retrievePendingUploadErrorModal:function(e){return this._pendingUploadErrorModal},_doForcedServerRender:function(){if(!YUI.Env.isServer||!this.request||!this.request.headers)return!1;var e=!1;return e=e||this.request.UA.isBot,e=e||this.request.UA.isSharingBot,this.flipper.isFlipped("enable-server-render-for-unsupported-browsers")&&(e=e||this.request.UA.isUnsupportedBrowser),this.flipper.isFlipped("enable-forced-server-render")&&(e=!0),e},getUA:function(){return YUI.Env.isServer?this.request.UA:e.config.flickr.request.UA},logViewTiming:function(){var e,t=this.flapp.get("activeView"),n=0,r=" ",i=this;e=function(t,s){n++,Object.keys(t.subviews).forEach(function(o){var u=t.subviews[o].get("container").hasClass("requiredToShowOnServer")||t.subviews[o]._params.requiredToShowOnClient,a=s&&u,f="-";f=u?"\ud83d\udd39":"-",f=a?"\ud83d\udd37":f,console.log("| "+r+(new Array(n)).join(" |"+r)+" "+f+" "+o+" (initialization: "+i.viewTiming[o].initialize+"ms)"+" (loadState: "+i.viewTiming[o].loadState+"ms)"),e(t.subviews[o],a)}),n--},console.log(this.routeConfig.module+": "+this.routeTiming+"ms"),console.log("\ud83d\udd37 "+t.name+" (initialization: "+this.viewTiming[t.name].initialize+"ms)"+" (loadState: "+this.viewTiming[t.name].loadState+"ms)"),e(t,!0)},getHealthBeaconer:function(){var t={beacon:function(){},flushQueue:function(){}};if(this.flipper.isFlipped("enable-healthjs-beaconing")){if(this._beaconer)return this._beaconer;var r=".client",i="flickr-heartbeat.",s=this.request&&this.request.UA&&this.request.UA.isUnsupportedBrowser,o=function(t){u.indexOf(t)>-1&&e.config.win&&e.config.win.beaconError&&t.indexOf(".viewtiming.")===-1&&e.config.win.beaconError(i+t+(s||""),e.config.win.location.href,{unsupported:s})},u=["route.photo.route.500.client","api.other.client","api.timeouts.client","page.failures.client","api.other.bot.client","api.timeouts.bot.client","page.failures.other.client","crashes.client","server.error.500.client","client.error.500.client"],a=e.Health,f=e.Health.beacon;return a.beacon=function(e,t){var n=["api.calls.responded.client","api.calls.client","api.calls.initiated.client","api.flickr.photos.getInfo.calls.client","test.photo.page.requests.client"];if(e&&e.name&&n.indexOf(e.name)>-1)return;return f.call(a,e,t)},n.log("Setting up healthjs beaconer."),!a||!e.on?(n.error("Healthjs beaconer failed to initialize."),t):(e.on("metrics:increment",function(e,t){a.beacon({name:e+r,type:"TYPE_NUMBER",aggregation:"AGG_SUM",value:t||1},{unsupported:s}),o(e+r)}),e.on("metrics:set",function(e,t){a.beacon({name:e+r,type:"TYPE_STATS",aggregation:"AGG_AVERAGE",value:t||1},{unsupported:s}),o(e+r)}),e.on("metrics:sync",function(){a.flushQueue({force:!0})}),this._beaconer=a,a)}return t}}},"@VERSION@",{requires:["oop","flickr-api","flickr-promise","fletrics","promise","model-import-export","cookie","better-use","view-counter","flipper","localizable","moment","experiments-fullscreen","experiments-opt-out","moneyball-manager","viewport-data","querystring-parse-simple","querystring-stringify-simple","url-helper","browser-support","api-helper","healthjs"]});
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("querystring-stringify",function(e,t){var n=e.namespace("QueryString"),r=[],i=e.Lang;n.escape=encodeURIComponent,n.stringify=function(e,t,s){var o,u,a,f,l,c,h=t&&t.sep?t.sep:"&",p=t&&t.eq?t.eq:"=",d=t&&t.arrayKey?t.arrayKey:!1;if(i.isNull(e)||i.isUndefined(e)||i.isFunction(e))return s?n.escape(s)+p:"";if(i.isBoolean(e)||Object.prototype.toString.call(e)==="[object Boolean]")e=+e;if(i.isNumber(e)||i.isString(e))return n.escape(s)+p+n.escape(e);if(i.isArray(e)){c=[],s=d?s+"[]":s,f=e.length;for(a=0;a<f;a++)c.push(n.stringify(e[a],t,s));return c.join(h)}for(a=r.length-1;a>=0;--a)if(r[a]===e)throw new Error("QueryString.stringify. Cyclical reference");r.push(e),c=[],o=s?s+"[":"",u=s?"]":"";for(a in e)e.hasOwnProperty(a)&&(l=o+a+u,c.push(n.stringify(e[a],t,l)));return r.pop(),c=c.join(h),!c&&s?s+"=":c}},"3.16.0",{requires:["yui-base"]});
YUI.add("better-cache",function(e){function s(e,t){return e.score<t.score?-1:e.score>t.score?1:0}function o(){var e,r,o;t.sort(s),i={},t.length>n&&(o=t.shift(),o.callback&&o.callback()),e=t.length;for(r=0;r<e;r++)i[t[r].key]=r}var t=[],n,r=0,i={};n=e.config.flickr.better_cache_size||100,e.betterCache={reset:function(){t=[],r=0,i={}},_cache:t,getSize:function(){return t.length},unset:function(e){var n=i[e];if(typeof n=="undefined")return;t.splice(n,1),o()},set:function(e,n,s){var u;if(n===!1){this.unset(e);return}u=i[e]?t[i[e]]:!1,u?(t[i[e]].value=n,t[i[e]].score=r++,typeof s=="function"&&(u.callback=s)):(u={key:e,value:n,score:r++},typeof s=="function"&&(u.callback=s),t.push(u)),o()},get:function(e){return typeof i[e]=="number"?(t[i[e]].score=++r,t[i[e]].value):null}}},"@VERSION@");
/*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("datatype-xml-parse",function(e,t){e.mix(e.namespace("XML"),{parse:function(t){var n=null,r;return typeof t=="string"&&(r=e.config.win,r.ActiveXObject!==undefined?(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t)):r.DOMParser!==undefined?n=(new DOMParser).parseFromString(t,"text/xml"):r.Windows!==undefined&&(n=new Windows.Data.Xml.Dom.XmlDocument,n.loadXml(t))),n===null||n.documentElement===null||n.documentElement.nodeName==="parsererror",n}}),e.namespace("Parsers").xml=e.XML.parse,e.namespace("DataType"),e.DataType.XML=e.XML},"3.16.0");