mediacms/static/js/liked.js

1 line
6.3 KiB
JavaScript
Raw Normal View History

!function(){"use strict";var e,t={510:function(e,t,n){var r=n(2541),o=n(8259);(0,r.X)("page-liked",o.LikedMediaPage)},8285:function(e,t,n){n.r(t),n.d(t,{ProfileLikedPage:function(){return b}}),n(5101),n(3080),n(2004),n(8407),n(6394),n(8288),n(5677),n(2129),n(4655);var r=n(5466),o=n(3074),i=n.n(o),u=n(3613),a=n(8578),l=n(5910),c=n(8556),f=n(6970),s=n(824);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(b,e);var t,n,o,i,d=(o=b,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(o);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return m(this,e)});function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=d.call(this,e,"author-liked")).state={resultsCount:null},t.getCountFunc=t.getCountFunc.bind(g(t)),t}return t=b,(n=[{key:"getCountFunc",value:function(e){this.setState({resultsCount:e})}},{key:"pageContent",value:function(){var e=this;return[this.state.author?r.createElement(c.Z,{key:"ProfilePagesHeader",author:this.state.author,type:"liked"}):null,this.state.author?r.createElement(f.Z,{key:"ProfilePagesContent"},r.createElement(u.ApiUrlConsumer,null,(function(t){return r.createElement(l.MediaListWrapper,{title:e.props.title+(null!==e.state.resultsCount?" ("+e.state.resultsCount+")":""),className:"items-list-ver"},r.createElement(s.LazyLoadItemListAsync,{itemsCountCallback:e.getCountFunc,requestUrl:t.user.liked,hideAuthor:!a.PageStore.get("config-media-item").displayAuthor,hideViews:!a.PageStore.get("config-media-item").displayViews,hideDate:!a.PageStore.get("config-media-item").displayPublishDate,canEdit:!1}))}))):null]}}])&&p(t.prototype,n),b}(n(4982).a);b.propTypes={title:i().string.isRequired},b.defaultProps={title:"Liked media"}},8259:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LikedMediaPage=t.AnonymousLikedMediaPage=void 0;var u=i(n(5466)),a=n(3613),l=n(8578),c=n(2546),f=n(473),s=n(5910),d=n(824),p=n(8285),y=n(7637);t.AnonymousLikedMediaPage=function(e){var t=e.id,n=void 0===t?"liked-media":t,r=e.title,o=void 0===r?l.PageStore.get("config-enabled").pages.liked.title:r,i=u.useState(null),c=i[0],f=i[1];return u.default.createElement(y.Page,{id:n},u.default.createElement(a.ApiUrlConsumer,null,(function(e){return u.default.createElement