text: webpackJsonp([15],{1380:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1383);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1383:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(){return i("div",{className:c.default.container},void 0,i("a",{href:"/"},void 0,i(a.default,{type:"logo",className:c.default.logo})),i("p",{className:c.default.text},void 0,"Make something awesome"))}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}();t.default=r;var u=o(1),l=(n(u),o(22)),a=n(l),s=o(1384),c=n(s)},1384:function(e,t){e.exports={container:"_2WMKE",logo:"_1Ig-9",text:"_1cQDt"}},1385:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1399);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1386:function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.reportPhotoImpressions=void 0;var a=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),c=o(1),f=r(c),d=o(5),p=o(1436),h=r(p),y=o(3),v=o(12),b=n(v),_=.5;t.reportPhotoImpressions=function(e){var t="WrappedReportPhotoImpressionsComponent",o={photo:c.PropTypes.object.isRequired,position:c.PropTypes.number.isRequired,reportPhotoImpression:c.PropTypes.func.isRequired},n=function(t){function o(){return i(this,o),u(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return l(o,t),s(o,[{key:"reportImpression",value:function(e){if(e){var t=this.props,o=t.photo,n=t.position,r=t.reportPhotoImpression;r({photo:{id:o.id,position:n}})}}},{key:"render",value:function(){var t=f.default.createElement(e,this.props);return y.isBrowser&&(0,y.checkSupportsIntersectionObservers)()?a(h.default,{onChange:this.reportImpression.bind(this),threshold:_},void 0,t):t}}]),o}(c.Component);n.displayName=t,n.propTypes=o;var r={reportPhotoImpression:b.reportPhotoImpression};return(0,d.connect)(null,r)(n)}},1387:function(e,t){e.exports={container:"y5w1y",photo:"cV68d",photoInfo:"hduMF",leftActions:"_31wG7 _3YIV2",rightActions:"_287Ma tPMQE",user:"_114MZ",collectionButtonContainer:"_1XDiz",userLink:"_3isoq",userImageContainer:"_8p1N4 _3YIV2",userAvatar:"_1fYZF",userName:"_1imKo _3YIV2",userTopLink:"_1f9xN"}},1392:function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.FeedContainer=void 0;var a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(1),c=r(s),f=o(5),d=o(12),p=n(d),h=o(1397),y=r(h),v={setContentWidth:s.PropTypes.func.isRequired,children:s.PropTypes.element.isRequired},b=t.FeedContainer=function(e){function t(){return i(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),a(t,[{key:"componentDidMount",value:function(){this.setContentWidth(),window.addEventListener("resize",this.handleResize.bind(this))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize.bind(this))}},{key:"setContentWidth",value:function e(){var e=this.props.setContentWidth;this.elem&&e(this.elem.offsetWidth-24)}},{key:"handleResize",value:function(){this.setContentWidth()}},{key:"render",value:function(){var e=this,t=this.props.children;return c.default.createElement("div",{className:y.default.container,ref:function(t){e.elem=t}},t)}}]),t}(s.Component);b.propTypes=v;var _={setContentWidth:p.setContentWidth};t.default=(0,f.connect)(null,_)(b)},1393:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1392);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1397:function(e,t){e.exports={container:"Nqw-T _22ZDn dvlCB"}},1399:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(1),c=(n(s),o(2)),f=n(c),d=o(193),p=n(d),h=o(192),y=o(288),v=n(y),b=o(1404),_=n(b),m="AddToCollectionButtonTooltip",P={onClickOutside:s.PropTypes.func.isRequired,anchor:s.PropTypes.string.isRequired},g="left",T={anchor:g},w=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),a(t,[{key:"componentDidMount",value:function(){(0,h.startPersistedFullStoryRecording)()}},{key:"render",value:function(){var e=this.props,t=e.onClickOutside,o=e.anchor;return l(p.default,{onClickOutside:t},void 0,l(v.default,{verticalPositionOverride:"top",className:(0,f.default)(_.default.tooltip,"right"===o&&_.default.tooltipAnchorRight),tipPositionClassName:"right"===o?_.default.tipAlignRight:void 0},void 0,l("div",{className:_.default.tooltipContents},void 0,"Click here to save and bookmark this photo into a ",l("strong",{},void 0,"Collection"),".")))}}]),t}(s.Component);w.displayName=m,w.propTypes=P,w.defaultProps=T,t.default=w},1402:function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SmallPhoto=void 0;var a=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),c=o(1),f=r(c),d=o(5),p=o(2),h=r(p),y=o(23),v=r(y),b=o(143),_=r(b),m=o(12),P=n(m),g=o(285),T=o(3),w=o(290),O=o(97),j=o(477),k=o(185),S=o(1385),C=r(S),R=o(474),M=r(R),A=o(186),N=r(A),I=o(476),E=r(I),W=o(475),q=r(W),B=o(473),x=r(B),L=o(1405),U=r(L),V="SmallPhoto",D={children:c.PropTypes.node,photo:c.PropTypes.object.isRequired,className:c.PropTypes.string,containerClassName:c.PropTypes.string,photoRef:c.PropTypes.func,width:c.PropTypes.number,height:c.PropTypes.number,imageUrl:c.PropTypes.string,location:c.PropTypes.object.isRequired,linkTo:c.PropTypes.oneOfType([c.PropTypes.object,c.PropTypes.string]),showPhotoInfoOnHover:c.PropTypes.bool,fillWidth:c.PropTypes.bool,jsLoaded:c.PropTypes.bool.isRequired,windowWidth:c.PropTypes.number,setSelectedPhoto:c.PropTypes.func.isRequired,dismissAddToCollectionButtonTooltip:c.PropTypes.func.isRequired,shouldShowAddToCollectionButtonTooltip:c.PropTypes.bool.isRequired},$=t.SmallPhoto=function(e){function t(e){i(this,t);var o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.handleMouseMove=o.handleMouseMove.bind(o),o.handleMouseLeave=o.handleMouseLeave.bind(o),o.state={isHovering:!1},o}return l(t,e),s(t,[{key:"handleMouseMove",value:function(){this.setState({isHovering:!0})}},{key:"handleMouseLeave",value:function(){this.setState({isHovering:!1})}},{key:"renderPhotoInfo",value:function(){var e=this,t=this.props,o=t.photo,n=t.linkTo,r=t.location,i=t.setSelectedPhoto,u=t.windowWidth,l=t.shouldShowAddToCollectionButtonTooltip,s=u>g.EXTRA_SMALL_MAX;return a("div",{className:(0,h.default)(U.default.photoInfo,l&&U.default.photoInfoIsShown),onMouseMove:s&&this.handleMouseMove,onMouseLeave:s&&this.handleMouseLeave},void 0,a(v.default,{to:n||(0,T.buildPhotoLink)(o,r,u),className:U.default.photoInfoLink,onClick:function(){return i({id:o.id,ref:e.linkElem})}}),this.renderActions())}},{key:"renderLikeButton",value:function(){var e=this.props,t=e.location,o=e.photo;return a(E.default,{type:"alt",location:t,photo:o})}},{key:"renderAddToCollectionButton",value:function(){var e=this.props,t=e.location,o=e.photo,n=e.shouldShowAddToCollectionButtonTooltip,r=e.dismissAddToCollectionButtonTooltip;return a("div",{className:U.default.addToCollectionButtonContainer},void 0,a(x.default,{className:U.default.collectionButton,type:"alt",photo:o,location:t}),n&&a(C.default,{anchor:"right",onClickOutside:r}))}},{key:"renderDownloadButton",value:function(){var e=this.props.photo;return a("div",{className:U.default.buttonDownloadContainer},void 0,a(q.default,{type:"alt",photo:e}))}},{key:"renderUserLink",value:function(){var e=this.props.photo.user;return a("div",{className:U.default.userContainer},void 0,a(N.default,{includeAvatar:!0,user:e,type:"alt"}))}},{key:"renderOrderPrintsButton",value:function(){var e=this.props.photo;return a(M.default,{photo:e,type:"outline-alt"})}},{key:"renderTopActions",value:function(){return a("div",{className:U.default.actionsTop},void 0,this.renderLikeButton(),this.renderAddToCollectionButton(),this.renderOrderPrintsButton())}},{key:"renderBottomActions",value:function(){return a("div",{className:U.default.actionsBottom},void 0,this.renderUserLink(),this.renderDownloadButton())}},{key:"renderActions",value:function(){var e=this.state.isHovering,t=this.props,o=t.jsLoaded,n=t.shouldShowAddToCollectionButtonTooltip;return n||e||!o?a("div",{},void 0,this.renderTopActions(),this.renderBottomActions()):null}},{key:"renderImage",value:function(){var e=this,t=this.props,o=t.photo,n=t.photoRef,r=t.linkTo,i=t.width,u=t.height,l=t.imageUrl,a=t.location,s=t.windowWidth,c=t.fillWidth,d=t.children,p=t.className;return f.default.createElement(v.default,{ref:function(t){(0,_.default)(n)&&n(t),e.linkElem=t},to:r||(0,T.buildPhotoLink)(o,a,s),title:"View the photo By "+o.user.name,className:(0,h.default)(U.default.photo,p),style:{backgroundImage:'url("'+l+'")',backgroundColor:o.color,width:c?"100%":i,height:u}},d)}},{key:"render",value:function(){var e=this.props,t=e.containerClassName,o=e.showPhotoInfoOnHover;return a("div",{className:(0,h.default)(U.default.container,t)},void 0,this.renderImage(),o&&this.renderPhotoInfo())}}]),t}(c.Component);$.displayName=V,$.propTypes=D;var F=function(e,t){var o=(0,j.getAddToCollectionButtonTooltip)(e);return{jsLoaded:(0,w.getJsLoaded)(e),windowWidth:(0,O.getWindowWidth)(e),shouldShowAddToCollectionButtonTooltip:void 0!==o&&null!==o&&o.photoId===t.photo.id&&(0,k.isAddToButtonTooltipXpSelector)(e)}},G={setSelectedPhoto:P.setSelectedPhoto,dismissAddToCollectionButtonTooltip:P.dismissAddToCollectionButtonTooltip};t.default=(0,d.connect)(F,G)($)},1403:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1402);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1404:function(e,t){e.exports={tooltip:"_2jGYU",tooltipAnchorRight:"_3wBHV",tipAlignRight:"_2paTI",tooltipContents:"_17zHf"}},1405:function(e,t){e.exports={container:"_3vgBX",photo:"_1hz5D",image:"_1kALN",photoInfo:"bQJ8Z",photoInfoIsShown:"_2j4gG",photoInfoLink:"_23lr1",actionsTop:"_2yfpM",actionsBottom:"_1a5YS",userContainer:"CpQi5 _3YIV2",buttonDownloadContainer:"_3i-Ef tPMQE",addToCollectionButtonContainer:"_3W6mQ"}},1416:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{totalHeight:e,photos:t}}function a(e){var t=0,o=e[0];return e.forEach(function(e,n){e.totalHeight<o.totalHeight&&(t=n,o=e)}),t}function s(e){return Array.from({length:e}).map(function(){return l()})}Object.defineProperty(t,"__esModule",{value:!0}),t.Masonry=void 0;var c=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),f=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),d=o(1),p=n(d),h=o(5),y=o(2),v=n(y),b=o(97),_=o(285),m=o(1418),P=n(m),g=o(1430),T=n(g),w="Masonry",O={photos:d.PropTypes.array.isRequired,location:d.PropTypes.object.isRequired,windowWidth:d.PropTypes.number},j=t.Masonry=function(e){function t(e){r(this,t);var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.state={gridCount:e.windowWidth<=_.SMALL_MAX?2:3},o.renderGrid=o.renderGrid.bind(o),o}return u(t,e),f(t,[{key:"componentWillUpdate",value:function(e){var t=this.props.windowWidth;e.windowWidth!==t&&(e.windowWidth<=_.SMALL_MAX?this.setState({gridCount:2}):this.setState({gridCount:3}))}},{key:"getGridData",value:function(e){var t=this.props.photos,o=s(e);t.forEach(function(e){var t=o[a(o)];e.height&&e.width&&(t.totalHeight+=e.height/e.width,t.photos.push(e))});var n=o.map(function(e){return e.photos});return n}},{key:"renderGrid",value:function(e,t){var o=this.props,n=o.location,r=o.photos,i=this.state.gridCount;return p.default.createElement("div",{key:t,ref:"MasonryGrid"+t,className:(0,v.default)(T.default.Grid,3===i&&T.default.GridThree,2===i&&T.default.GridTwo,1===i&&T.default.GridOne)},e.map(function(e,t){var o=r.indexOf(e);return c(P.default,{gridCount:i,photo:e,position:o,location:n},t)}))}},{key:"render",value:function(){var e=this.state.gridCount,t=this.getGridData(e).map(this.renderGrid);return c("div",{id:"gridMulti",className:T.default.container},void 0,t)}}]),t}(d.Component);j.displayName=w,j.propTypes=O;var k=function(e){return{windowWidth:(0,b.getWindowWidth)(e)}};t.default=(0,h.connect)(k)(j)},1417:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),i=o(1),u=(n(i),o(5)),l=o(56),a=o(478),s=o(30),c=o(1403),f=n(c),d=o(1386),p=o(1431),h=n(p),y="MasonryPhoto",v={location:i.PropTypes.object.isRequired,contentWidth:i.PropTypes.number,pixelRatio:i.PropTypes.number.isRequired,photo:i.PropTypes.object.isRequired,gridCount:i.PropTypes.number.isRequired},b=function(e){var t=e.gridCount,o=e.location,n=e.contentWidth,i=e.pixelRatio,u=e.photo,l=16,a=Math.ceil(n/t-2*l),c=(0,s.getImageSizeAndImgixUrl)({photo:u,isMasonry:!0,parentWidth:a,pixelRatio:i}),d=c.backgroundImageUrl,p=c.imageWidth,y=c.imageHeight;return r("div",{className:h.default.photoContainer},void 0,r(f.default,{fillWidth:!0,showPhotoInfoOnHover:!0,width:p,height:y,imageUrl:d,photo:u,location:o}))};b.displayName=y,b.propTypes=v;var _=function(e){return{contentWidth:(0,a.getContentWidth)(e),pixelRatio:(0,l.getPixelRatio)(e)}};t.default=(0,d.reportPhotoImpressions)((0,u.connect)(_)(b))},1418:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1417);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1419:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1416);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1420:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TEST_ATTRIBUTE="photo-component"},1421:function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Photo=void 0;var a=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),s=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),c=o(1),f=(r(c),o(5)),d=o(12),p=n(d),h=o(477),y=o(185),v=o(1385),b=r(v),_=o(474),m=r(_),P=o(186),g=r(P),T=o(476),w=r(T),O=o(473),j=r(O),k=o(475),S=r(k),C=o(1423),R=r(C),M=o(1387),A=r(M),N=o(1420),I="Photo",E={location:c.PropTypes.object.isRequired,photo:c.PropTypes.object.isRequired,position:c.PropTypes.number.isRequired,dismissAddToCollectionButtonTooltip:c.PropTypes.func.isRequired,shouldShowAddToCollectionButtonTooltip:c.PropTypes.bool.isRequired},W=t.Photo=function(e){function t(){return i(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),s(t,[{key:"renderLikeButton",value:function(){var e=this.props,t=e.location,o=e.photo;return a(w.default,{photo:o,location:t})}},{key:"renderAddToCollectionButton",value:function(){var e=this.props,t=e.location,o=e.photo,n=e.dismissAddToCollectionButtonTooltip,r=e.shouldShowAddToCollectionButtonTooltip;return a("div",{className:A.default.collectionButtonContainer},void 0,a(j.default,{photo:o,location:t}),r&&a(b.default,{onClickOutside:n}))}},{key:"renderleftActions",value:function(){return a("div",{className:A.default.leftActions},void 0,this.renderLikeButton(),this.renderAddToCollectionButton())}},{key:"renderRightActions",value:function(){var e=this.props.photo;return a("div",{className:A.default.rightActions},void 0,a(S.default,{photo:e,showLabel:!(0,_.isPhotoPrintable)(e.id)}),a(m.default,{photo:e,showLabel:!0}))}},{key:"renderUser",value:function(){var e=this.props.photo.user;return a("div",{className:A.default.user},void 0,a(g.default,{includeAvatar:!0,user:e}))}},{key:"renderPhotoInfo",value:function(){return a("div",{className:A.default.photoInfo},void 0,this.renderleftActions(),this.renderUser(),this.renderRightActions())}},{key:"renderTopUserLink",value:function(){var e=this.props.photo.user;return a("div",{className:A.default.userTopLink},void 0,a(g.default,{includeAvatar:!0,user:e}))}},{key:"render",value:function(){var e=this.props,t=e.location,o=e.photo,n=e.position;return a("div",{className:A.default.container,"data-test":N.TEST_ATTRIBUTE},void 0,this.renderTopUserLink(),a(R.default,{location:t,position:n,photo:o}),this.renderPhotoInfo())}}]),t}(c.Component);W.displayName=I,W.propTypes=E;var q=function(e,t){var o=(0,h.getAddToCollectionButtonTooltip)(e);return{shouldShowAddToCollectionButtonTooltip:void 0!==o&&null!==o&&o.photoId===t.photo.id&&(0,y.isAddToButtonTooltipXpSelector)(e)}},B={dismissAddToCollectionButtonTooltip:p.dismissAddToCollectionButtonTooltip};t.default=(0,f.connect)(q,B)(W)},1422:function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoImage=void 0;var a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(1),c=r(s),f=o(23),d=r(f),p=o(5),h=o(12),y=n(h),v=o(56),b=o(478),_=o(97),m=o(3),P=o(30),g=o(1386),T=o(1387),w=r(T),O="PhotoImage",j={location:s.PropTypes.object.isRequired,photo:s.PropTypes.object.isRequired,windowWidth:s.PropTypes.number,contentWidth:s.PropTypes.number,pixelRatio:s.PropTypes.number.isRequired,setSelectedPhoto:s.PropTypes.func.isRequired},k=t.PhotoImage=function(e){function t(){return i(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),a(t,[{key:"render",value:function(){var e=this,t=this.props,o=t.photo,n=t.photo.user,r=t.pixelRatio,i=t.location,u=t.setSelectedPhoto,l=t.windowWidth,a=t.contentWidth,s=(0,m.isPhone)(l)?l:a,f=(0,P.getImageSizeAndImgixUrl)({photo:o,parentWidth:s,pixelRatio:r}),p=f.backgroundImageUrl,h=f.imageWidth,y=f.imageHeight;return c.default.createElement(d.default,{ref:function(t){e.elem=t},href:(0,m.nodeUrl)()+"/photos/"+o.id,to:(0,m.buildPhotoLink)(o,i,l),title:"View the photo By "+n.name,className:w.default.photo,style:{backgroundImage:'url("'+p+'")',width:h,height:y},onClick:function(){return u({id:o.id,ref:e.elem})}})}}]),t}(s.Component);k.displayName=O,k.propTypes=j;var S=function(e){return{pixelRatio:(0,v.getPixelRatio)(e),windowWidth:(0,_.getWindowWidth)(e),contentWidth:(0,b.getContentWidth)(e)}},C={setSelectedPhoto:y.setSelectedPhoto};t.default=(0,g.reportPhotoImpressions)((0,p.connect)(S,C)(k))},1423:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1422);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1424:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1421);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1425:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TEST_ATTRIBUTE="photos-list-view"},1426:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),i=o(1),u=(n(i),o(1424)),l=n(u),a=o(1432),s=n(a),c=o(1425),f="PhotosListView",d={location:i.PropTypes.object.isRequired,photos:i.PropTypes.array},p=function(e){var t=e.location,o=e.photos;return r("div",{id:"gridSingle",className:s.default.container,"data-test":c.TEST_ATTRIBUTE},void 0,o.map(function(e,o){return r(l.default,{photo:e,position:o,location:t},e.id)}))};p.displayName=f,p.propTypes=d,t.default=p},1427:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1426);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1430:function(e,t){e.exports={container:"_3_WtK _1VOuf",Grid:"_1OvAL _3YIV2",GridThree:"_27nWV",GridTwo:"_1eGVY",GridOne:"_3nHtz"}},1431:function(e,t){e.exports={photoContainer:"_1pn7R"}},1432:function(e,t){e.exports={container:"_1I8cs"}},1433:function(e,t,o){"use strict";var n=o(51),r=o(4),i=o(1435);e.exports=function(){function e(e,t,o,n,u,l){l!==i&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return o.checkPropTypes=n,o.PropTypes=o,o}},1434:function(e,t,o){e.exports=o(1433)()},1435:function(e,t,o){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},1436:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var o={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),s=o(1),c=(n(s),o(1434)),f=n(c),d=o(1437),p=function(e){return"function"==typeof e},h=function(e){function t(){var e,o,n,r;i(this,t);for(var l=arguments.length,a=Array(l),s=0;s<l;s++)a[s]=arguments[s];return o=n=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),n.state={inView:!1},n.node=null,n.handleNode=function(e){n.node&&(0,d.unobserve)(n.node),e&&(0,d.observe)(e,n.handleChange,n.props.threshold),
  n.node=e},n.handleChange=function(e){return n.setState({inView:e})},r=o,u(n,r)}return l(t,e),a(t,[{key:"componentWillUpdate",value:function(e,t){this.props.onChange&&t.inView!==this.state.inView&&(this.props.onChange(t.inView),t.inView&&e.unobserve)}},{key:"componentDidUpdate",value:function(e,t){t.inView!==this.state.inView&&this.state.inView&&this.props.triggerOnce&&((0,d.unobserve)(this.node),this.node=null)}},{key:"componentWillUnmount",value:function(){this.node&&((0,d.unobserve)(this.node),this.node=null)}},{key:"render",value:function e(){var t=this.props,o=t.children,e=t.render,n=t.tag,i=(t.triggerOnce,t.threshold,r(t,["children","render","tag","triggerOnce","threshold"])),u=this.state.inView;return(0,s.createElement)(n,Object.assign({},i,{ref:this.handleNode}),u&&p(e)?e():null,p(o)?o(u):o)}}]),t}(s.Component);h.propTypes={tag:f.default.node,children:f.default.oneOfType([f.default.func,f.default.node]),triggerOnce:f.default.bool,threshold:f.default.number,onChange:f.default.func,render:f.default.func},h.defaultProps={tag:"div",threshold:0,triggerOnce:!1},t.default=h},1437:function(e,t,o){"use strict";function n(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e&&t){var n=l.get(o);n||(n=new IntersectionObserver(i,{threshold:o}),l.set(o,n)),u.set(e,{callback:t,visible:!1,threshold:o}),n.observe(e)}}function r(e){if(e){var t=u.get(e);if(t){u.delete(e);var o=l.get(t.threshold);o&&o.unobserve(e);var n=!1;u.forEach(function(e){e.threshold===t.threshold&&(n=!0)}),o&&!n&&(o.disconnect(),l.delete(t.threshold))}}}function i(e){e.forEach(function(e){if(u.has(e.target)){var t=e.isIntersecting,o=e.intersectionRatio,n=e.target,r=u.get(n),i=r.callback,l=r.visible,a=r.threshold,s=l?o>a:o>=a;void 0!==t&&(s=s&&t),u.set(n,{callback:i,visible:s,threshold:a}),i&&i(s)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=n,t.unobserve=r;var u=new Map,l=new Map;t.default={observe:n,unobserve:r}},1554:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1603);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1571:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1756);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1580:function(e,t){e.exports={container:"_3bvY_ _22ZDn dvlCB",clearfix:"_17uii _1iK9o",userResults:"_14up7 _3ofrt",userResult:"_2rsYO",usersViewAllLink:"_1grHS",collectionsViewAllLinkContainer:"_283UG _13jTO _3kobr TBNoB _1vc38",collectionsViewAllLink:"_3FQUq _3Y6hz _1WCyJ _21rCr",collectionsNoResultsContainer:"_1bOYI _13jTO CTQC5",collectionsNoResults:"_2NOo0",collectionsNoResultsParagraph:"_2NnBl",collectionResults:"_3IyQF _1iK9o _3vG8- _3ofrt",collectionPageResults:"k8yXo",collectionResultWrapper:"_1a-Mo _13jTO _3kobr TBNoB _1vc38"}},1599:function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionResult=void 0;var i=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),u=o(1),l=(r(u),o(5)),a=o(48),s=r(a),c=o(24),f=r(c),d=o(49),p=r(d),h=o(50),y=r(h),v=o(12),b=n(v),_=o(3),m=o(289),P=r(m),g=o(1841),T=r(g),w=(0,s.default)((0,p.default)("CollectionResult"),(0,y.default)({collection:u.PropTypes.object.isRequired,trackCollectionResultClick:u.PropTypes.func.isRequired,trackingProperty:u.PropTypes.string})),O=t.CollectionResult=w(function(e){var t=e.collection,o=e.trackCollectionResultClick,n=e.trackingProperty,r=(0,f.default)(t,"total_photos");return i("div",{className:T.default.collectionCard,style:{backgroundImage:(0,_.urlToBackgroundImage)((0,f.default)(t,"cover_photo.urls.regular"))}},void 0,i("div",{className:T.default.collectionImage}),i("div",{className:T.default.overlay},void 0,i("a",{className:T.default.collectionAnchor,href:(0,f.default)(t,"links.html"),onClick:function(){void 0!==n&&o({collectionId:t.id,trackingProperty:n})}},void 0,i("h4",{className:T.default.photos},void 0,i(P.default,{number:r})," "+(0,_.pluralizePhoto)(r)),i("h2",{className:T.default.title},void 0,t.title))))}),j={trackCollectionResultClick:b.trackCollectionResultClick};t.default=(0,l.connect)(null,j)(O)},1600:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1599);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1603:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),i=o(1),u=(n(i),o(48)),l=n(u),a=o(49),s=n(a),c=o(50),f=n(c),d=o(1842),p=n(d),h=(0,l.default)((0,s.default)("EmptyState"),(0,f.default)({type:i.PropTypes.oneOf(["photos","collections","users","photo-likes","collection-photos"]).isRequired}));t.default=h(function(e){var t=e.type;return r("div",{className:p.default.emptyStateContainer},void 0,r("img",{alt:"No content available",className:p.default.emptyStateImg,src:"/a/img/empty-states/"+t+".png"}))})},1662:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.UserResult=void 0;var r=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),i=o(1),u=(n(i),o(2)),l=n(u),a=o(48),s=n(a),c=o(49),f=n(c),d=o(50),p=n(d),h=o(23),y=n(h),v=o(57),b=n(v),_=o(5),m=o(56),P=o(3),g=o(1862),T=n(g),w=(0,s.default)((0,f.default)("UserResult"),(0,p.default)({user:i.PropTypes.object.isRequired,className:i.PropTypes.string,pixelRatio:i.PropTypes.number.isRequired})),O=t.UserResult=w(function(e){var t=e.className,o=e.user,n=e.pixelRatio,i=(0,P.getAvatarUrlFromApiUser)({user:o,pixelRatio:n,nodeEnv:b.default.get("NODE_ENV"),size:"small"});return r("div",{className:(0,l.default)(T.default.userContainer,t)},void 0,r(y.default,{to:{pathname:(0,P.buildUserUrl)(o)},className:T.default.userLink,onClick:function(){return window.scrollTo(0,0)}},void 0,r("div",{className:T.default.userWrapper},void 0,r("img",{alt:"User avatar",src:i,className:T.default.userAvatar}),r("div",{className:T.default.userInfoContainer},void 0,r("div",{className:T.default.userName},void 0,o.name),r("div",{className:T.default.userHandle},void 0,"@",o.username)))))}),j=function(e){return{pixelRatio:(0,m.getPixelRatio)(e)}};t.default=(0,_.connect)(j)(O)},1663:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1662);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1754:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={path:"collections/:query",getComponent:function(e,t){o.e(33).then(function(e){t(null,o(1753).default)}.bind(null,o)).catch(o.oe)}}},1755:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TEST_ATTRIBUTE="search-photos-route"},1756:function(e,t,o){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function s(e,t){e.params,e.loadContext;return void t()}Object.defineProperty(t,"__esModule",{value:!0}),t.SearchPhotos=void 0;var c=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),f=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),d=o(1),p=(r(d),o(5)),h=o(2),y=r(h),v=o(297),b=r(v),_=o(18);o(187),o(286),o(188),o(472);var m=o(12),P=n(m),g=o(29),T=o(185),w=o(3),O=o(488),j=o(70),k=o(97),S=o(201),C=o(1393),R=r(C),M=o(1419),A=r(M),N=o(1427),I=r(N),E=o(497),W=r(E),q=o(1380),B=r(q),x=o(284),L=r(x),U=o(1554),V=r(U),D=o(1880),$=r(D),F=o(1755),G=(0,j.normalizeResponse)("searchPhotos"),H="search.photos",z=20,Y="SearchPhotos",X={search:d.PropTypes.object.isRequired,location:d.PropTypes.object,updateData:d.PropTypes.func.isRequired,resetSearchResults:d.PropTypes.func.isRequired,addPhotosToSearchPhotoFeed:d.PropTypes.func.isRequired,searchXps:d.PropTypes.object.isRequired,api:d.PropTypes.object,serverFetch:d.PropTypes.object,windowWidth:d.PropTypes.number},Q=t.SearchPhotos=function(e){function t(e){i(this,t);var o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o.fetchPhotos=o.fetchPhotos.bind(o),o}return l(t,e),f(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.updateData,o=e.resetSearchResults,n=e.api,r=e.search,i=e.serverFetch,u=e.searchXps;this.fetch=(0,b.default)(function(e,t,o){n.custom.search.photos(e,t,z,u).then(g.toJson).then(g.throwErrorsIfPresent).then(G).then(o)},O.SEARCH_DELAY),this.resetData=function(e){var n=e.entities,r=e.result;t(n),o({photos:{total:r.total,results:r.results,maxPage:r.total_pages,lastPageFetched:1,isLoading:!1}})},i[H]||this.fetch(r.query,1,this.resetData),this.addScrollSubscription()}},{key:"componentWillReceiveProps",value:function(e){e.search.query!==this.props.search.query&&(this.fetch(e.search.query,1,this.resetData),this.removeScrollSubscription(),this.addScrollSubscription())}},{key:"componentWillUnmount",value:function(){this.removeScrollSubscription()}},{key:"addScrollSubscription",value:function(){var e=this,t=_.Observable.fromEvent(window,"scroll").filter(function(){return(0,w.shouldFetchMoreContent)()}).map(function(){return e.props.search.photos.lastPageFetched}).distinct();this.scrollSubscription=t.subscribe(this.fetchPhotos)}},{key:"fetchPhotos",value:function(){var e=this.props,t=e.search,o=e.updateData,n=e.addPhotosToSearchPhotoFeed,r=t.photos,i=r.maxPage,u=r.lastPageFetched;if(!(u>i)){var l=(u||1)+1;this.fetch(t.query,l,function(e){var t=e.entities,r=e.result;o(t),n({lastPageFetched:l,photoIds:r.results})})}}},{key:"removeScrollSubscription",value:function(){this.scrollSubscription.unsubscribe(),this.fetchSubscription&&this.fetchSubscription.unsubscribe()}},{key:"render",value:function(){var e=this.props,t=e.search,o=t.relatedKeywords,n=t.photos,r=n.total,i=n.results,u=n.maxPage,l=n.lastPageFetched,s=n.isLoading,f=e.windowWidth,d=e.location,p=/\/search\/photos\/./.test(d.pathname);return 0!==r||s?c(R.default,{},void 0,c("div",{"data-test":F.TEST_ATTRIBUTE},void 0,p&&c(W.default,{keywords:o,hideOnMobile:!0}),(0,w.isPhone)(f)?c(I.default,{photos:i,location:d}):c(A.default,{photos:i,location:d}),l<u&&c(L.default,{}),c(B.default,{}))):c("div",{className:(0,y.default)(a({},$.default.hideEmptyState,!p))},void 0,c(V.default,{type:"photos"}))}}]),t}(d.Component);Q.loadProps=s,Q.displayName=Y,Q.propTypes=X;var J={updateData:P.updateData,resetSearchResults:P.resetSearchResults,addPhotosToSearchPhotoFeed:P.addPhotosToSearchPhotoFeed},K=function(e){return{windowWidth:(0,k.getWindowWidth)(e),serverFetch:(0,S.getServerFetch)(e),searchXps:(0,T.getAllSearchXps)(e)}};t.default=(0,p.connect)(K,J)(Q)},1757:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={path:"photos/:query",getComponent:function(e,t){Promise.resolve().then(function(e){t(null,o(1571).default)}.bind(null,o)).catch(o.oe)}}},1758:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.TEST_ATTRIBUTE="search-all-route"},1759:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,n,r){var i=t&&t.defaultProps,u=arguments.length-3;if(o||0===u||(o={}),o&&i)for(var l in i)void 0===o[l]&&(o[l]=i[l]);else o||(o=i||{});if(1===u)o.children=r;else if(u>1){for(var a=Array(u),s=0;s<u;s++)a[s]=arguments[s+3];o.children=a}return{$$typeof:e,type:t,key:void 0===n?null:""+n,ref:null,props:o,_owner:null}}}(),i=o(1),u=n(i),l=o(49),a=n(l),s=o(50),c=n(s),f=o(48),d=n(f),p=o(23),h=n(p),y=o(1663),v=n(y),b=o(1600),_=n(b),m=o(1571),P=n(m),g=o(1580),T=n(g),w=o(1758),O=(0,d.default)((0,a.default)("SearchAll"),(0,c.default)({search:i.PropTypes.object,location:i.PropTypes.object.isRequired})),j=(0,d.default)((0,a.default)("CollectionResults"),(0,c.default)({collections:i.PropTypes.array.isRequired,query:i.PropTypes.string.isRequired}))(function(e){var t=e.collections,o=e.query;if(0===t.length)return r("div",{});var n=t.filter(function(e,t){return t<3}).map(function(e){return r("div",{className:T.default.collectionResultWrapper},e.id,r(_.default,{collection:e}))});return r("div",{className:T.default.container},void 0,r("div",{className:T.default.clearfix},void 0,r("div",{className:T.default.collectionResults},void 0,n,r("div",{className:T.default.collectionsViewAllLinkContainer},void 0,r(h.default,{className:T.default.collectionsViewAllLink,to:{pathname:"/search/collections/"+o}},void 0,"View all")))))}),k=(0,d.default)((0,a.default)("UserResults"),(0,c.default)({users:i.PropTypes.array.isRequired,query:i.PropTypes.string.isRequired}))(function(e){var t=e.users,o=e.query;return 0===t.length?r("div",{}):r("div",{className:T.default.container},void 0,r("div",{className:T.default.clearfix},void 0,r("div",{className:T.default.userResults},void 0,[t.filter(function(e,t){return t<4}).map(function(e){return r(v.default,{className:T.default.userResult,user:e},e.id)})],r(h.default,{className:T.default.usersViewAllLink,to:{pathname:"/search/users/"+o}},void 0,"View all"))))});t.default=O(function(e){var t=e.search,o=e.location,n=t.photos,i=t.collections,l=t.users,a=t.query;return r("div",{"data-test":w.TEST_ATTRIBUTE},void 0,r(k,{users:l.results,query:a}),!i.isLoading&&r(j,{photos:n.results,collections:i.results,location:o,query:a}),u.default.cloneElement(r(P.default,{search:t}),e))})},1760:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1759);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(r).default}})},1761:function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1760),i=n(r);t.default={path:":query",component:i.default}},1765:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={path:"users/:query",getComponent:function(e,t){o.e(31).then(function(e){t(null,o(1764).default)}.bind(null,o)).catch(o.oe)}}},1841:function(e,t){e.exports={collectionCard:"_19YI0",collectionImage:"_1TTXA",overlay:"JMGHr",collectionAnchor:"_3f-p2 _21rCr",photos:"eSzjM UDEGo",title:"_2tFg5 _1WCyJ _3myVE"}},1842:function(e,t){e.exports={emptyStateContainer:"_1SdCr",emptyStateImg:"_3AIC0",emptyStateDesc:"_4zmjf",cta:"_2d_9Y"}},1862:function(e,t){e.exports={userContainer:"SbSHT",userLink:"_1sWGy",userWrapper:"_25HuQ",userAvatar:"_3956z",userInfoContainer:"giJhl",userName:"Ydxwp",userHandle:"_6SJLS"}},1880:function(e,t){e.exports={hideEmptyState:"F1aw1"}}});