mediacms/static/js/search.js

1 line
44 KiB
JavaScript
Raw Normal View History

!function(){var e={748:function(e,t,n){"use strict";var r=n(9087),i=(n(5101),n(5466)),o=(n(6116),n(4426)),s=(n(8349),n(6010)),a=n(5666),l=n(8487),c=n(8024);function u(e){return(u="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 f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=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&&f(e,t)}(b,e);var t,n,r,u,m=(r=b,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(r);if(u){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(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=m.call(this,e)).state={mobileSearchField:o.Z.get("is-visible-mobile-search")},t.onChangedMobileSearchFieldVisibility=t.onChangedMobileSearchFieldVisibility.bind(d(t)),t}return t=b,(n=[{key:"componentDidMount",value:function(){if(o.Z.on("changed_mobile_search_field_visibility",this.onChangedMobileSearchFieldVisibility),void 0===o.Z.get("current-page")||"add-media"===o.Z.get("current-page")){var e=document.querySelector(".media-uploader-wrap");if(e){var t=document.createElement("div");t.setAttribute("class","pre-upload-msg"),t.innerHTML=o.Z.get("config-contents").uploader.belowUploadArea,e.appendChild(t)}}setTimeout(function(){var e,t=document.querySelectorAll(".alert.alert-dismissible .close");if(t.length)for(e=0;e<t.length;)t[e].addEventListener("click",this.onClickAlertClose),e+=1}.bind(this),1e3)}},{key:"onClickAlertClose",value:function(e){var t=this.parentNode;(0,c.Ec)(t,"hiding"),setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}.bind(this),400)}},{key:"onChangedMobileSearchFieldVisibility",value:function(){this.setState({mobileSearchField:o.Z.get("is-visible-mobile-search")})}},{key:"render",value:function(){return i.createElement("header",{className:"page-header"+(this.state.mobileSearchField?" mobile-search-field":"")+(o.Z.get("config-user").is.anonymous?" anonymous-user":"")},i.createElement(l.Z,null),i.createElement(s.Z,null),i.createElement(a.Z,null))}}])&&p(t.prototype,n),b}(i.PureComponent),b=n(3123).Y;n(7441),n(2322),n(9006);var g=n(3074),v=n.n(g),O=n(8204),S=n(4830),w=n(9174),_=(n(2701),n(5261)),E=n(7207),k=n(2836),P=n(2331);function C(e){return(C="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 j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T(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 A(e,t,n){return t&&T(e.prototype,t),n&&T(e,n),e}function N(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,config