From 987bc95326b19d7ba1528c304d979858b8b8ab4b Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 18 Feb 2020 17:16:32 +0100 Subject: [PATCH] displaying only first img in search results as all but first image derivative are missing, still to fix --- .../custom/materiotheme/assets/dist/main.js | 2 +- .../materiotheme/vuejs/store/modules/search.js | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/web/themes/custom/materiotheme/assets/dist/main.js b/web/themes/custom/materiotheme/assets/dist/main.js index 253fc54..301c8cd 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.js +++ b/web/themes/custom/materiotheme/assets/dist/main.js @@ -23,4 +23,4 @@ e.exports=function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r * @author Feross Aboukhadijeh * @license MIT */ -e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var i=n(57),o=n(2),r=n(96),a=n(97);function s(e){this.defaults=e,this.interceptors={request:new r,response:new r}}s.prototype.request=function(e,t){"string"==typeof e&&(e=o.merge({url:arguments[0]},t)),(e=o.merge(i,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var n=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){n.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){n.push(e.fulfilled,e.rejected)});n.length;)r=r.then(n.shift(),n.shift());return r},o.forEach(["delete","get","head","options"],function(n){s.prototype[n]=function(e,t){return this.request(o.merge(t||{},{method:n,url:e}))}}),o.forEach(["post","put","patch"],function(r){s.prototype[r]=function(e,t,n){return this.request(o.merge(n||{},{method:r,url:e,data:t}))}}),e.exports=s},function(e,t,n){"use strict";var i=n(2);e.exports=function(n,r){i.forEach(n,function(e,t){t!==r&&t.toUpperCase()===r.toUpperCase()&&(n[r]=e,delete n[t])})}},function(e,t,n){"use strict";var i=n(77);e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e}},function(e,t,n){"use strict";var o=n(2);function a(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(o.isURLSearchParams(t))r=t.toString();else{var i=[];o.forEach(t,function(e,t){null!=e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),i.push(a(t)+"="+a(e))}))}),r=i.join("&")}return r&&(e+=(-1===e.indexOf("?")?"?":"&")+r),e}},function(e,t,n){"use strict";var o=n(2),a=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,r,i={};return e&&o.forEach(e.split("\n"),function(e){if(r=e.indexOf(":"),t=o.trim(e.substr(0,r)).toLowerCase(),n=o.trim(e.substr(r+1)),t){if(i[t]&&0<=a.indexOf(t))return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}}),i}},function(e,t,n){"use strict";var r,i,o,a=n(2);function s(e){var t=e;return i&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}e.exports=a.isStandardBrowserEnv()?(i=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a"),r=s(window.location.href),function(e){var t=a.isString(e)?s(e):e;return t.protocol===r.protocol&&t.host===r.host}):function(){return!0}},function(e,t,n){"use strict";var s=n(2);e.exports=s.isStandardBrowserEnv()?{write:function(e,t,n,r,i,o){var a=[];a.push(e+"="+encodeURIComponent(t)),s.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),s.isString(r)&&a.push("path="+r),s.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(2);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},e.exports=i},function(e,t,n){"use strict";var r=n(2),i=n(98),o=n(78),a=n(57),s=n(99),u=n(100);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(t){return c(t),t.baseURL&&!s(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return c(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(c(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(t,n,e){return r.forEach(e,function(e){t=e(t,n)}),t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(79);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i(function(e){t=e}),cancel:t}},e.exports=i},function(e,t,n){"use strict";e.exports=function(t){return function(e){return t.apply(null,e)}}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var s,u,c=e.length;0r.count?r.infiniteLoadingState.complete():r.infiniteLoadingState.loaded())}}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(3);var r,i=n(8);n(4),(r=n(6))&&r.__esModule;var o={namespaced:!0,state:{contenttype:null,items:[],page:0,infiniteLoadingState:null},getters:{},mutations:{setItems:function(e,t){e.items=e.items.concat(t)},incrementPage:function(e){e.page+=1},setInfiniteState:function(e,t){e.infiniteLoadingState=t}},actions:{getItems:function(e){e.dispatch;var n=e.commit,r=e.state;return i.REST.get("/blabla_rest?_format=json&page=".concat(r.page),{}).then(function(e){var t=e.data;t.length?(n("setItems",t),r.infiniteLoadingState&&r.infiniteLoadingState.loaded()):r.infiniteLoadingState&&r.infiniteLoadingState.complete()}).catch(function(e){Promise.reject(e)})},nextPage:function(e,t){var n=e.dispatch,r=e.commit;e.state;r("incrementPage"),r("setInfiniteState",t),n("getItems")},getItemIndex:function(e,t){e.dispatch,e.commit;return e.state.items.findIndex(function(e){return e.uuid==t})},getPrevNextItems:function(e,t){e.dispatch,e.commit;var n=e.state;return{prev:n.items[t-1],next:n.items[t+1]}}}};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(3);var r,i=n(8);n(4),(r=n(6))&&r.__esModule;var o={namespaced:!0,state:{items:[]},getters:{},mutations:{setItems:function(e,t){e.items=e.items.concat(t)}},actions:{getItems:function(e){e.dispatch;var n=e.commit;e.state;i.REST.get("/showrooms_rest?_format=json",{}).then(function(e){var t=e.data;n("setItems",t)}).catch(function(e){Promise.reject(e)})}}};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(3);var r,i=n(8);n(4),(r=n(6))&&r.__esModule;var o={namespaced:!0,state:{pricing:{}},getters:{},mutations:{setPricing:function(e,t){e.pricing=t}},actions:{getPricing:function(e){e.dispatch;var n=e.commit;e.state;i.REST.get("/pricing_rest?_format=json",{}).then(function(e){var t=e.data;n("setPricing",t)}).catch(function(e){Promise.reject(e)})}}};t.default=o},function(e,t,n){"use strict";function d(e){return-1=t.length?r():t[e]?n(t[e],function(){i(e+1)}):i(e+1)};i(0)}function be(n){return function(e,t,u){var c=!1,f=0,l=null;_e(n,function(t,e,n,r){if("function"==typeof t&&void 0===t.cid){c=!0,f++;var i,o=Oe(function(e){!function(e){return e.__esModule||xe&&"Module"===e[Symbol.toStringTag]}(e)||(e=e.default),t.resolved="function"==typeof e?e:q.extend(e),n.components[r]=e,--f<=0&&u()}),a=Oe(function(e){var t="Failed to resolve async component "+r+": "+e;l||(l=d(e)?e:new Error(t),u(l))});try{i=t(o,a)}catch(e){a(e)}if(i)if("function"==typeof i.then)i.then(o,a);else{var s=i.component;s&&"function"==typeof s.then&&s.then(o,a)}}}),c||u()}}function _e(e,n){return we(e.map(function(t){return Object.keys(t.components).map(function(e){return n(t.components[e],t.instances[e],t,e)})}))}function we(e){return Array.prototype.concat.apply([],e)}var xe="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Oe(n){var r=!1;return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(!r)return r=!0,n.apply(this,e)}}var ke=function(t){function e(e){t.call(this),this.name=this._name="NavigationDuplicated",this.message='Navigating to current location ("'+e.fullPath+'") is not allowed',Object.defineProperty(this,"stack",{value:(new t).stack,writable:!0,configurable:!0})}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e}(Error);ke._name="NavigationDuplicated";function Se(e,t){this.router=e,this.base=function(e){if(!e)if(J){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=h,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]}function je(e,o,a,t){var n=_e(e,function(e,t,n,r){var i=function(e,t){"function"!=typeof e&&(e=q.extend(e));return e.options[t]}(e,o);if(i)return Array.isArray(i)?i.map(function(e){return a(e,t,n,r)}):a(i,t,n,r)});return we(t?n.reverse():n)}function Ce(e,t){if(t)return function(){return e.apply(t,arguments)}}Se.prototype.listen=function(e){this.cb=e},Se.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},Se.prototype.onError=function(e){this.errorCbs.push(e)},Se.prototype.transitionTo=function(e,t,n){var r=this,i=this.router.match(e,this.current);this.confirmTransition(i,function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(e){e(i)}))},function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach(function(e){e(t)}))})},Se.prototype.confirmTransition=function(n,t,e){function r(t){!p(ke,t)&&d(t)&&i.errorCbs.length&&i.errorCbs.forEach(function(e){e(t)}),e&&e(t)}var i=this,o=this.current;if(C(n,o)&&n.matched.length===o.matched.length)return this.ensureURL(),r(new ke(n));var a=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){t.index=n,t.updateRoute(r)},function(e){p(ke,e)&&(t.index=n)})}},e.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Se),Ne={currentRoute:{configurable:!0}};function Fe(t,n){return t.push(n),function(){var e=t.indexOf(n);-1r.count?r.infiniteLoadingState.complete():r.infiniteLoadingState.loaded())}}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(3);var r,i=n(8);n(4),(r=n(6))&&r.__esModule;var o={namespaced:!0,state:{contenttype:null,items:[],page:0,infiniteLoadingState:null},getters:{},mutations:{setItems:function(e,t){e.items=e.items.concat(t)},incrementPage:function(e){e.page+=1},setInfiniteState:function(e,t){e.infiniteLoadingState=t}},actions:{getItems:function(e){e.dispatch;var n=e.commit,r=e.state;return i.REST.get("/blabla_rest?_format=json&page=".concat(r.page),{}).then(function(e){var t=e.data;t.length?(n("setItems",t),r.infiniteLoadingState&&r.infiniteLoadingState.loaded()):r.infiniteLoadingState&&r.infiniteLoadingState.complete()}).catch(function(e){Promise.reject(e)})},nextPage:function(e,t){var n=e.dispatch,r=e.commit;e.state;r("incrementPage"),r("setInfiniteState",t),n("getItems")},getItemIndex:function(e,t){e.dispatch,e.commit;return e.state.items.findIndex(function(e){return e.uuid==t})},getPrevNextItems:function(e,t){e.dispatch,e.commit;var n=e.state;return{prev:n.items[t-1],next:n.items[t+1]}}}};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(3);var r,i=n(8);n(4),(r=n(6))&&r.__esModule;var o={namespaced:!0,state:{items:[]},getters:{},mutations:{setItems:function(e,t){e.items=e.items.concat(t)}},actions:{getItems:function(e){e.dispatch;var n=e.commit;e.state;i.REST.get("/showrooms_rest?_format=json",{}).then(function(e){var t=e.data;n("setItems",t)}).catch(function(e){Promise.reject(e)})}}};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;n(3);var r,i=n(8);n(4),(r=n(6))&&r.__esModule;var o={namespaced:!0,state:{pricing:{}},getters:{},mutations:{setPricing:function(e,t){e.pricing=t}},actions:{getPricing:function(e){e.dispatch;var n=e.commit;e.state;i.REST.get("/pricing_rest?_format=json",{}).then(function(e){var t=e.data;n("setPricing",t)}).catch(function(e){Promise.reject(e)})}}};t.default=o},function(e,t,n){"use strict";function d(e){return-1=t.length?r():t[e]?n(t[e],function(){i(e+1)}):i(e+1)};i(0)}function be(n){return function(e,t,u){var c=!1,f=0,l=null;_e(n,function(t,e,n,r){if("function"==typeof t&&void 0===t.cid){c=!0,f++;var i,o=Oe(function(e){!function(e){return e.__esModule||xe&&"Module"===e[Symbol.toStringTag]}(e)||(e=e.default),t.resolved="function"==typeof e?e:q.extend(e),n.components[r]=e,--f<=0&&u()}),a=Oe(function(e){var t="Failed to resolve async component "+r+": "+e;l||(l=d(e)?e:new Error(t),u(l))});try{i=t(o,a)}catch(e){a(e)}if(i)if("function"==typeof i.then)i.then(o,a);else{var s=i.component;s&&"function"==typeof s.then&&s.then(o,a)}}}),c||u()}}function _e(e,n){return we(e.map(function(t){return Object.keys(t.components).map(function(e){return n(t.components[e],t.instances[e],t,e)})}))}function we(e){return Array.prototype.concat.apply([],e)}var xe="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Oe(n){var r=!1;return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(!r)return r=!0,n.apply(this,e)}}var ke=function(t){function e(e){t.call(this),this.name=this._name="NavigationDuplicated",this.message='Navigating to current location ("'+e.fullPath+'") is not allowed',Object.defineProperty(this,"stack",{value:(new t).stack,writable:!0,configurable:!0})}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e}(Error);ke._name="NavigationDuplicated";function Se(e,t){this.router=e,this.base=function(e){if(!e)if(J){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=h,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]}function je(e,o,a,t){var n=_e(e,function(e,t,n,r){var i=function(e,t){"function"!=typeof e&&(e=q.extend(e));return e.options[t]}(e,o);if(i)return Array.isArray(i)?i.map(function(e){return a(e,t,n,r)}):a(i,t,n,r)});return we(t?n.reverse():n)}function Ce(e,t){if(t)return function(){return e.apply(t,arguments)}}Se.prototype.listen=function(e){this.cb=e},Se.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},Se.prototype.onError=function(e){this.errorCbs.push(e)},Se.prototype.transitionTo=function(e,t,n){var r=this,i=this.router.match(e,this.current);this.confirmTransition(i,function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(e){e(i)}))},function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach(function(e){e(t)}))})},Se.prototype.confirmTransition=function(n,t,e){function r(t){!p(ke,t)&&d(t)&&i.errorCbs.length&&i.errorCbs.forEach(function(e){e(t)}),e&&e(t)}var i=this,o=this.current;if(C(n,o)&&n.matched.length===o.matched.length)return this.ensureURL(),r(new ke(n));var a=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){t.index=n,t.updateRoute(r)},function(e){p(ke,e)&&(t.index=n)})}},e.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Se),Ne={currentRoute:{configurable:!0}};function Fe(t,n){return t.push(n),function(){var e=t.indexOf(n);-1