LocalCDN-Firefox-Chrome-Brave/resources/findify-bundle/7.0.11/recommendation.jsm

1 line
7.2 KiB
JavaScript

(self.findifyJsonp=self.findifyJsonp||[]).push([[864],{aaqy:function(e,t,n){"use strict";var o=n("tZxb");function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,u){if(u!==o){var a=new Error("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");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return n.PropTypes=n,n}},T9WB:function(e,t,n){e.exports=n("aaqy")()},tZxb:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},jKGO:function(e,t,n){"use strict";function o(e){return(o="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)}var r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(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"!==o(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+o(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)}var l=n("Jmof"),c=n("T9WB"),s=[],d=[];function f(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(o){var r=f(e[o]);r.loading?t.loading=!0:(t.loaded[o]=r.loaded,t.error=r.error),n.push(r.promise),r.promise.then((function(e){t.loaded[o]=e})).catch((function(e){t.error=e}))}))}catch(e){t.error=e}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function m(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function h(e,t){var o,f;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var p=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:m,webpack:null,modules:null},t),h=null;function y(){return h||(h=e(p.loader)),h.promise}return s.push(y),"function"==typeof p.webpack&&d.push((function(){if(e=p.webpack,"object"===r(n.m)&&e().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return y();var e})),f=o=function(t){function n(o){i(this,n);var r=u(this,t.call(this,o));return r.retry=function(){r.setState({error:null,loading:!0,timedOut:!1}),h=e(p.loader),r._loadModule()},y(),r.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},r}return a(n,t),n.preload=function(){return y()},n.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},n.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(p.modules)&&p.modules.forEach((function(t){e.context.loadable.report(t)})),h.loading){"number"==typeof p.delay&&(0===p.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){e.setState({pastDelay:!0})}),p.delay)),"number"==typeof p.timeout&&(this._timeout=setTimeout((function(){e.setState({timedOut:!0})}),p.timeout));var t=function(){e._mounted&&(e.setState({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts())};h.promise.then((function(){t()})).catch((function(e){t()}))}},n.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},n.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},n.prototype.render=function(){return this.state.loading||this.state.error?l.createElement(p.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?p.render(this.state.loaded,this.props):null},n}(l.Component),o.contextTypes={loadable:c.shape({report:c.func.isRequired})},f}function y(e){return h(f,e)}y.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return h(p,e)};var b=function(e){function t(){return i(this,t),u(this,e.apply(this,arguments))}return a(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function g(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return g(e)}))}b.propTypes={report:c.func.isRequired},b.childContextTypes={loadable:c.shape({report:c.func.isRequired}).isRequired},y.Capture=b,y.preloadAll=function(){return new Promise((function(e,t){g(s).then(e,t)}))},y.preloadReady=function(){return new Promise((function(e,t){g(d).then(e,e)}))},e.exports=y},"jd+S":function(e,t,n){"use strict";t.default={views:{search:function(){return Promise.all([n.e(154),n.e(825),n.e(261),n.e(464)]).then(n.bind(n,"2g2b"))},autocomplete:function(){return n.e(413).then(n.bind(n,"Ne2L"))},recommendation:function(){return n.e(864).then(n.bind(n,"0Y/9"))},zeroResults:function(){return Promise.all([n.e(154),n.e(825),n.e(261),n.e(464)]).then(n.bind(n,"d67Z"))},custom:function(){return n.e(996).then(n.bind(n,"oJDh"))},content:function(){return Promise.all([n.e(825),n.e(49)]).then(n.bind(n,"8bt2"))},tabs:function(){return n.e(635).then(n.bind(n,"TDmD"))}},recommendation:{grid:function(){return Promise.all([n.e(825),n.e(92)]).then(n.bind(n,"9/O+"))},slider:function(){return Promise.all([n.e(251),n.e(825),n.e(172)]).then(n.bind(n,"8BDN"))}},autocomplete:{sidebar:function(){return Promise.all([n.e(692),n.e(825),n.e(261),n.e(713)]).then(n.bind(n,"cyJn"))},dropdown:function(){return Promise.all([n.e(825),n.e(261),n.e(783)]).then(n.bind(n,"+MKu"))},fullscreenWithInput:function(){return Promise.all([n.e(825),n.e(261),n.e(405)]).then(n.bind(n,"wRha"))}},components:{virtualizedList:function(){return Promise.all([n.e(626),n.e(756)]).then(n.bind(n,"nGW9"))},drawer:function(){return Promise.all([n.e(692),n.e(12)]).then(n.bind(n,"94tO"))},dropdown:function(){return Promise.all([n.e(945),n.e(825),n.e(978)]).then(n.bind(n,"0kbf"))}}}},yi8E:function(e,t,n){"use strict";var o=n("jKGO"),r=n.n(o),i=n("jd+S");t.default=r()({loader:i.default.recommendation.grid,loading:function(){return null}})},SWjm:function(e,t,n){"use strict";var o=n("jKGO"),r=n.n(o),i=n("jd+S");t.default=r()({loader:i.default.recommendation.slider,loading:function(){return null}})},"0Y/9":function(e,t,n){"use strict";n.r(t);var o=n("Jmof"),r=n("aZci"),i=n("yi8E"),u=n("SWjm");t.default=function(){var e=(0,r.useConfig)().config.get("template");return"slider"===e?(0,o.createElement)(u.default):"grid"===e?(0,o.createElement)(i.default):null}}}]);