@salla.sa/twilight-components 2.14.24 → 2.14.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/cjs/{Helper-8b706e72.js → Helper-56efb09e.js} +4 -2
  2. package/dist/cjs/Helper-56efb09e.js.map +1 -0
  3. package/dist/cjs/app-globals-9596263d.js.map +1 -1
  4. package/dist/cjs/salla-add-product-button_48.cjs.entry.js +1 -1
  5. package/dist/cjs/salla-add-product-button_48.cjs.entry.js.map +1 -1
  6. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  7. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  8. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  9. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  10. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  11. package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
  12. package/dist/collection/Helpers/Helper.js +3 -1
  13. package/dist/collection/Helpers/Helper.js.map +1 -1
  14. package/dist/components/Helper.js +3 -1
  15. package/dist/components/Helper.js.map +1 -1
  16. package/dist/components/index.js.map +1 -1
  17. package/dist/components/salla-quick-buy2.js.map +1 -1
  18. package/dist/esm/{Helper-c5b72361.js → Helper-3025592f.js} +4 -2
  19. package/dist/esm/Helper-3025592f.js.map +1 -0
  20. package/dist/esm/app-globals-15e3c645.js.map +1 -1
  21. package/dist/esm/salla-add-product-button_48.entry.js +1 -1
  22. package/dist/esm/salla-add-product-button_48.entry.js.map +1 -1
  23. package/dist/esm/salla-filters-widget.entry.js +1 -1
  24. package/dist/esm/salla-filters.entry.js +1 -1
  25. package/dist/esm/salla-notifications.entry.js +1 -1
  26. package/dist/esm/salla-orders.entry.js +1 -1
  27. package/dist/esm/salla-products-slider.entry.js +1 -1
  28. package/dist/esm/salla-reviews.entry.js +1 -1
  29. package/dist/esm-es5/Helper-3025592f.js +5 -0
  30. package/dist/esm-es5/Helper-3025592f.js.map +1 -0
  31. package/dist/esm-es5/app-globals-15e3c645.js.map +1 -1
  32. package/dist/esm-es5/salla-add-product-button_48.entry.js +1 -1
  33. package/dist/esm-es5/salla-add-product-button_48.entry.js.map +1 -1
  34. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  35. package/dist/esm-es5/salla-filters.entry.js +1 -1
  36. package/dist/esm-es5/salla-notifications.entry.js +1 -1
  37. package/dist/esm-es5/salla-orders.entry.js +1 -1
  38. package/dist/esm-es5/salla-products-slider.entry.js +1 -1
  39. package/dist/esm-es5/salla-reviews.entry.js +1 -1
  40. package/dist/twilight/{p-572be994.system.entry.js → p-00fea9e4.system.entry.js} +2 -2
  41. package/dist/twilight/p-05c5b251.js.map +1 -1
  42. package/dist/twilight/p-12acd128.js +5 -0
  43. package/dist/twilight/p-12acd128.js.map +1 -0
  44. package/dist/twilight/{p-900b41fb.entry.js → p-22c5fed4.entry.js} +2 -2
  45. package/dist/twilight/{p-900b41fb.entry.js.map → p-22c5fed4.entry.js.map} +1 -1
  46. package/dist/twilight/{p-6e0a235a.entry.js → p-29bb96eb.entry.js} +2 -2
  47. package/dist/twilight/{p-c8f14d8f.system.entry.js → p-2a65790e.system.entry.js} +2 -2
  48. package/dist/twilight/{p-012877f7.system.entry.js → p-31f62211.system.entry.js} +2 -2
  49. package/dist/twilight/p-3e698672.system.js.map +1 -1
  50. package/dist/twilight/{p-346b1d3f.system.entry.js → p-672e2d86.system.entry.js} +2 -2
  51. package/dist/twilight/p-7c8ac4aa.system.js +5 -0
  52. package/dist/twilight/p-7c8ac4aa.system.js.map +1 -0
  53. package/dist/twilight/{p-5f689d13.entry.js → p-8a1d8623.entry.js} +2 -2
  54. package/dist/twilight/{p-f07ec02a.entry.js → p-a0138c35.entry.js} +2 -2
  55. package/dist/twilight/{p-4bc35b2b.system.entry.js → p-a24650b3.system.entry.js} +2 -2
  56. package/dist/twilight/{p-f0bfbb14.system.entry.js → p-acdf56d4.system.entry.js} +2 -2
  57. package/dist/twilight/{p-f0bfbb14.system.entry.js.map → p-acdf56d4.system.entry.js.map} +1 -1
  58. package/dist/twilight/{p-1dcd7c3b.entry.js → p-b5c29a36.entry.js} +2 -2
  59. package/dist/twilight/{p-dc21b7de.entry.js → p-c3d862f6.entry.js} +2 -2
  60. package/dist/twilight/p-d2b0dbcd.system.js +1 -1
  61. package/dist/twilight/{p-24062fa1.system.entry.js → p-de44d734.system.entry.js} +2 -2
  62. package/dist/twilight/{p-e0b02e94.entry.js → p-f803b45f.entry.js} +2 -2
  63. package/dist/twilight/twilight.esm.js +1 -1
  64. package/package.json +5 -5
  65. package/dist/cjs/Helper-8b706e72.js.map +0 -1
  66. package/dist/esm/Helper-c5b72361.js.map +0 -1
  67. package/dist/esm-es5/Helper-c5b72361.js +0 -5
  68. package/dist/esm-es5/Helper-c5b72361.js.map +0 -1
  69. package/dist/twilight/p-9776f50d.system.js +0 -5
  70. package/dist/twilight/p-9776f50d.system.js.map +0 -1
  71. package/dist/twilight/p-b9c0ec80.js +0 -5
  72. package/dist/twilight/p-b9c0ec80.js.map +0 -1
  73. /package/dist/twilight/{p-572be994.system.entry.js.map → p-00fea9e4.system.entry.js.map} +0 -0
  74. /package/dist/twilight/{p-6e0a235a.entry.js.map → p-29bb96eb.entry.js.map} +0 -0
  75. /package/dist/twilight/{p-c8f14d8f.system.entry.js.map → p-2a65790e.system.entry.js.map} +0 -0
  76. /package/dist/twilight/{p-012877f7.system.entry.js.map → p-31f62211.system.entry.js.map} +0 -0
  77. /package/dist/twilight/{p-346b1d3f.system.entry.js.map → p-672e2d86.system.entry.js.map} +0 -0
  78. /package/dist/twilight/{p-5f689d13.entry.js.map → p-8a1d8623.entry.js.map} +0 -0
  79. /package/dist/twilight/{p-f07ec02a.entry.js.map → p-a0138c35.entry.js.map} +0 -0
  80. /package/dist/twilight/{p-4bc35b2b.system.entry.js.map → p-a24650b3.system.entry.js.map} +0 -0
  81. /package/dist/twilight/{p-1dcd7c3b.entry.js.map → p-b5c29a36.entry.js.map} +0 -0
  82. /package/dist/twilight/{p-dc21b7de.entry.js.map → p-c3d862f6.entry.js.map} +0 -0
  83. /package/dist/twilight/{p-24062fa1.system.entry.js.map → p-de44d734.system.entry.js.map} +0 -0
  84. /package/dist/twilight/{p-e0b02e94.entry.js.map → p-f803b45f.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{r as s,h as t,H as i,g as e}from"./p-bdd00808.js";import{H as r}from"./p-b9c0ec80.js";import"./p-5a803ecc.js";const d="";const l=class{constructor(t){s(this,t);this.blockTitle=undefined;this.subTitle=undefined;this.sliderId=undefined;this.displayAllUrl=undefined;this.autoplay=undefined;this.source=undefined;this.sourceValue=undefined;this.limit=undefined;this.sliderConfig=undefined;this.productCardComponent="custom-salla-product-card";this.includes=undefined;this.productsData=undefined;this.isReady=undefined;this.sourceValueIsValid=undefined;this.hasCustomComponent=undefined;this.apiUrl="";this.parsedSourceValue=undefined}componentWillLoad(){return salla.onReady().then((()=>{this.includes=r.parseJson(this.includes||this.host.getAttribute("includes"));if(!Array.isArray(this.includes)){this.includes=null}r.setIncludes(this.includes);this.sourceValueIsValid=!!(this.getSourceValue()||this.isSourceWithoutValue());if(!this.sourceValueIsValid){salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`);return}this.hasCustomComponent=!!customElements.get(this.productCardComponent);if(this.source==="json"){this.productsData=this.getSourceValue();this.isReady=true;return}if(this.getSource()=="related"&&!salla.config.get("store.settings.product.related_products_enabled")){this.isReady=false;return}return salla.product.api.fetch({source:this.getSource(),source_value:this.getSourceValue(),limit:this.limit}).then((s=>r.injectExtraFieldsToResponse(s))).then((s=>{this.productsData=s.data;this.isReady=true;salla.event.emit("salla-products-slider::products.fetched",s.data)}))}))}componentDidRender(){let s=0;const t=setInterval((()=>{var i;(i=this.host.querySelectorAll('[loading="lazy"]'))===null||i===void 0?void 0:i.forEach((s=>s.removeAttribute("loading")));s++;if(s>=10){clearInterval(t)}}),1e3)}isSourceWithoutValue(){return["offers","latest","sales","top-rated"].includes(this.getSource())}getItemHTML(s){this.getSource()==="landing-page"&&(s.url="");if(this.hasCustomComponent&&this.productCardComponent.toLowerCase()=="custom-salla-product-card"){return t("div",{class:"s-products-slider-card"},t("custom-salla-product-card",{product:s,source:this.getSource(),"source-value":this.getSourceValue()}))}if(this.hasCustomComponent){const i=document.createElement(this.productCardComponent);i.setAttribute("product",JSON.stringify(s));i.setAttribute("source",this.getSource());i.setAttribute("source-value",this.getSourceValue());return t("div",{class:"s-products-slider-card",innerHTML:i.outerHTML})}return t("div",{class:"s-products-slider-card"},t("salla-product-card",{"show-quantity":this.getSource()=="landing-page","hide-add-btn":this.getSource()=="landing-page","shadow-on-hover":true,product:s}))}canRender(){return this.sourceValueIsValid&&this.isReady}getSource(){return r.getProductsSource(this.source)}getSourceValue(){return r.getProductsSourceValue(this.source,this.sourceValue)}render(){var s;if(!this.canRender()){return}return t(i,{class:"s-products-slider-wrapper"},t("salla-slider",{class:"s-products-slider-slider",id:this.sliderId||`s-products-slider-${Math.random().toString(36).substr(2,9)}`,"auto-play":this.autoplay,type:"carousel","block-title":this.blockTitle,"block-subTitle":this.subTitle,"display-all-url":this.displayAllUrl,sliderConfig:this.sliderConfig?this.sliderConfig:null},t("div",{slot:"items"},(s=this.productsData)===null||s===void 0?void 0:s.map((s=>this.getItemHTML(s))))))}get host(){return e(this)}};l.style=d;export{l as salla_products_slider};
5
- //# sourceMappingURL=p-6e0a235a.entry.js.map
4
+ import{r as s,h as t,H as i,g as e}from"./p-bdd00808.js";import{H as r}from"./p-12acd128.js";import"./p-5a803ecc.js";const d="";const l=class{constructor(t){s(this,t);this.blockTitle=undefined;this.subTitle=undefined;this.sliderId=undefined;this.displayAllUrl=undefined;this.autoplay=undefined;this.source=undefined;this.sourceValue=undefined;this.limit=undefined;this.sliderConfig=undefined;this.productCardComponent="custom-salla-product-card";this.includes=undefined;this.productsData=undefined;this.isReady=undefined;this.sourceValueIsValid=undefined;this.hasCustomComponent=undefined;this.apiUrl="";this.parsedSourceValue=undefined}componentWillLoad(){return salla.onReady().then((()=>{this.includes=r.parseJson(this.includes||this.host.getAttribute("includes"));if(!Array.isArray(this.includes)){this.includes=null}r.setIncludes(this.includes);this.sourceValueIsValid=!!(this.getSourceValue()||this.isSourceWithoutValue());if(!this.sourceValueIsValid){salla.logger.warn(`source-value prop is required for source [${this.getSource()}]`);return}this.hasCustomComponent=!!customElements.get(this.productCardComponent);if(this.source==="json"){this.productsData=this.getSourceValue();this.isReady=true;return}if(this.getSource()=="related"&&!salla.config.get("store.settings.product.related_products_enabled")){this.isReady=false;return}return salla.product.api.fetch({source:this.getSource(),source_value:this.getSourceValue(),limit:this.limit}).then((s=>r.injectExtraFieldsToResponse(s))).then((s=>{this.productsData=s.data;this.isReady=true;salla.event.emit("salla-products-slider::products.fetched",s.data)}))}))}componentDidRender(){let s=0;const t=setInterval((()=>{var i;(i=this.host.querySelectorAll('[loading="lazy"]'))===null||i===void 0?void 0:i.forEach((s=>s.removeAttribute("loading")));s++;if(s>=10){clearInterval(t)}}),1e3)}isSourceWithoutValue(){return["offers","latest","sales","top-rated"].includes(this.getSource())}getItemHTML(s){this.getSource()==="landing-page"&&(s.url="");if(this.hasCustomComponent&&this.productCardComponent.toLowerCase()=="custom-salla-product-card"){return t("div",{class:"s-products-slider-card"},t("custom-salla-product-card",{product:s,source:this.getSource(),"source-value":this.getSourceValue()}))}if(this.hasCustomComponent){const i=document.createElement(this.productCardComponent);i.setAttribute("product",JSON.stringify(s));i.setAttribute("source",this.getSource());i.setAttribute("source-value",this.getSourceValue());return t("div",{class:"s-products-slider-card",innerHTML:i.outerHTML})}return t("div",{class:"s-products-slider-card"},t("salla-product-card",{"show-quantity":this.getSource()=="landing-page","hide-add-btn":this.getSource()=="landing-page","shadow-on-hover":true,product:s}))}canRender(){return this.sourceValueIsValid&&this.isReady}getSource(){return r.getProductsSource(this.source)}getSourceValue(){return r.getProductsSourceValue(this.source,this.sourceValue)}render(){var s;if(!this.canRender()){return}return t(i,{class:"s-products-slider-wrapper"},t("salla-slider",{class:"s-products-slider-slider",id:this.sliderId||`s-products-slider-${Math.random().toString(36).substr(2,9)}`,"auto-play":this.autoplay,type:"carousel","block-title":this.blockTitle,"block-subTitle":this.subTitle,"display-all-url":this.displayAllUrl,sliderConfig:this.sliderConfig?this.sliderConfig:null},t("div",{slot:"items"},(s=this.productsData)===null||s===void 0?void 0:s.map((s=>this.getItemHTML(s))))))}get host(){return e(this)}};l.style=d;export{l as salla_products_slider};
5
+ //# sourceMappingURL=p-29bb96eb.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- System.register(["./p-f422bbf9.system.js","./p-910b705d.system.js","./p-9776f50d.system.js","./p-8f7b9e36.system.js"],(function(s){"use strict";var e,i,t,a;return{setters:[function(s){e=s.r;i=s.h},function(s){t=s.a},function(s){a=s.H},function(){}],execute:function(){var l='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n';var n="";var r=s("salla_reviews",function(){function s(s){var i=this;e(this,s);this.displayAllURL=null;this.displayAllLink=undefined;this.source=undefined;this.sourceValue=undefined;this.limit=5;this.type="store";this.sort="latest";this.hideCustomerInfo=false;this.reviews=[];this.isRTL=undefined;this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.source=this.source;salla.onReady((function(){i.displayAllURL=salla.url.get("testimonials");i.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((function(){i.testimonialText=salla.lang.get("blocks.home.testimonials");i.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}s.prototype.fetchReviews=function(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}var s=["products","categories"].includes(this.source);var e={limit:this.limit,source:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue,sort:this.sort,type:this.type,hide_customer_info:this.hideCustomerInfo?1:0};return salla.api.request("reviews",{params:e},"get")};s.prototype.componentWillLoad=function(){var s=this;return new Promise((function(s){return salla.onReady(s)})).then((function(){return s.fetchReviews()})).then((function(s){return s.data||[]})).then((function(e){if(e.length){s.reviews=e;s.showReviews=true;a.generateReviewSchema(s.reviews)}}))};s.prototype.render=function(){return i("div",{class:"s-reviews-container"},i("div",{class:"s-reviews-header-wrapper"},i("h1",{class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?i("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,i("span",{class:"s-reviews-display-all-icon",innerHTML:t})):null),i("salla-slider",{centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:"testimonials-".concat(this.source,"-slider")},i("div",{slot:"items"},this.reviews.map((function(s,e){return i("div",{key:e,class:"s-reviews-swiper-slide"},i("div",{class:"s-reviews-testimonial"},i("div",{class:"s-reviews-testimonial__inner"},i("div",{class:"s-reviews-testimonial__avatar"},i("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),i("div",{class:"s-reviews-testimonial__text"},i("p",{innerHTML:s.content}),i("div",{class:"s-reviews-testimonial__name_wrapper"},i("div",{class:"s-reviews-testimonial__info"},s.name&&i("h2",null,"".concat(s.name))),i("div",{class:"s-reviews-testimonial__rating"},i("salla-rating-stars",{size:"small",value:s.stars})))),i("span",{class:"s-reviews-testimonial__icon",innerHTML:l}))))})))))};return s}());r.style=n}}}));
5
- //# sourceMappingURL=p-c8f14d8f.system.entry.js.map
4
+ System.register(["./p-f422bbf9.system.js","./p-910b705d.system.js","./p-7c8ac4aa.system.js","./p-8f7b9e36.system.js"],(function(s){"use strict";var e,i,t,a;return{setters:[function(s){e=s.r;i=s.h},function(s){t=s.a},function(s){a=s.H},function(){}],execute:function(){var l='\x3c!-- Generated by IcoMoon.io --\x3e\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n<title>quote-open</title>\n<path d="M8 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM12 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4zM25.333 12v-5.333c0-0.737-0.596-1.333-1.333-1.333-3.676 0-6.667 2.991-6.667 6.667v8c0 3.676 2.991 6.667 6.667 6.667h1.333c3.676 0 6.667-2.991 6.667-6.667v-1.333c0-3.676-2.991-6.667-6.667-6.667zM29.333 20c0 2.205-1.795 4-4 4h-1.333c-2.205 0-4-1.795-4-4v-8c0-1.739 1.115-3.221 2.667-3.772v5.105c0 0.737 0.596 1.333 1.333 1.333h1.333c2.205 0 4 1.795 4 4z"></path>\n</svg>\n';var n="";var r=s("salla_reviews",function(){function s(s){var i=this;e(this,s);this.displayAllURL=null;this.displayAllLink=undefined;this.source=undefined;this.sourceValue=undefined;this.limit=5;this.type="store";this.sort="latest";this.hideCustomerInfo=false;this.reviews=[];this.isRTL=undefined;this.showReviews=false;this.testimonialText=salla.lang.get("blocks.home.testimonials");this.displayAllLinkText=salla.lang.get("blocks.home.display_all");this.source=this.source;salla.onReady((function(){i.displayAllURL=salla.url.get("testimonials");i.isRTL=salla.config.get("theme.is_rtl",true)}));salla.lang.onLoaded((function(){i.testimonialText=salla.lang.get("blocks.home.testimonials");i.displayAllLinkText=salla.lang.get("blocks.home.display_all")}))}s.prototype.fetchReviews=function(){if(this.source==="json"){return Promise.resolve(JSON.parse(this.sourceValue))}var s=["products","categories"].includes(this.source);var e={limit:this.limit,source:this.source,items:s?JSON.parse(this.sourceValue):this.sourceValue,sort:this.sort,type:this.type,hide_customer_info:this.hideCustomerInfo?1:0};return salla.api.request("reviews",{params:e},"get")};s.prototype.componentWillLoad=function(){var s=this;return new Promise((function(s){return salla.onReady(s)})).then((function(){return s.fetchReviews()})).then((function(s){return s.data||[]})).then((function(e){if(e.length){s.reviews=e;s.showReviews=true;a.generateReviewSchema(s.reviews)}}))};s.prototype.render=function(){return i("div",{class:"s-reviews-container"},i("div",{class:"s-reviews-header-wrapper"},i("h1",{class:"s-reviews-header"},this.testimonialText),!!this.displayAllLink?i("a",{href:this.displayAllURL,class:"s-reviews-display-all"},this.displayAllLinkText,i("span",{class:"s-reviews-display-all-icon",innerHTML:t})):null),i("salla-slider",{centered:true,"slides-per-view":1,type:"testimonials",class:"s-reviews-testimonials-slider","controls-outer":true,"auto-play":true,id:"testimonials-".concat(this.source,"-slider")},i("div",{slot:"items"},this.reviews.map((function(s,e){return i("div",{key:e,class:"s-reviews-swiper-slide"},i("div",{class:"s-reviews-testimonial"},i("div",{class:"s-reviews-testimonial__inner"},i("div",{class:"s-reviews-testimonial__avatar"},i("img",{src:"images/s-empty.png","data-src":s.avatar,alt:s.name?s.name:"testimonial-"+e,class:"lazy"})),i("div",{class:"s-reviews-testimonial__text"},i("p",{innerHTML:s.content}),i("div",{class:"s-reviews-testimonial__name_wrapper"},i("div",{class:"s-reviews-testimonial__info"},s.name&&i("h2",null,"".concat(s.name))),i("div",{class:"s-reviews-testimonial__rating"},i("salla-rating-stars",{size:"small",value:s.stars})))),i("span",{class:"s-reviews-testimonial__icon",innerHTML:l}))))})))))};return s}());r.style=n}}}));
5
+ //# sourceMappingURL=p-2a65790e.system.entry.js.map
@@ -1,5 +1,5 @@
1
1
  var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function r(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?i(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(i=0)),i)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * Crafted with ❤ by Salla
4
- */System.register(["./p-f422bbf9.system.js","./p-9776f50d.system.js","./p-82b08e0b.system.js","./p-8f7b9e36.system.js"],(function(t){"use strict";var e,i,n,s,o,r,a;return{setters:[function(t){e=t.r;i=t.c;n=t.h;s=t.H;o=t.g},function(t){r=t.H},function(t){a=t.F},function(){}],execute:function(){var l=":host{display:block}";var u=t("salla_filters_widget",function(){function t(t){e(this,t);this.changed=i(this,"changed",7);this.initHeight=195;this.withLoadMore=undefined;this.filtersData=undefined;this.option=undefined;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}t.prototype.connectedCallback=function(){var t=this;this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((function(){t.page=salla.config.get("page")}));salla.lang.onLoaded((function(){t.showMoreLabel=salla.lang.getWithDefault("common.titles.more",t.showMoreLabel);t.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",t.showLessLabel)}))};t.prototype.componentDidLoad=function(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight="".concat(this.initHeight,"px"));this.widgetContent.style.height="".concat(this.widgetContent.scrollHeight,"px")};t.prototype.setWidgetHeight=function(t){if(t===void 0){t=250}return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){this.widgetContent.removeAttribute("style");setTimeout((function(){var t=e.widgetContent.offsetHeight;e.widgetContent.style.height=t+"px"}),t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.option.type===a.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((function(t){return t.checked=false}));return[2]}))}))};t.prototype.showMore=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?"".concat(this.widgetValues.scrollHeight,"px"):"".concat(this.initHeight,"px");setTimeout((function(){t.widgetContent.style.height="".concat(t.widgetContent.scrollHeight,"px")}),400);return[2]}))}))};t.prototype.toggleWidget=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){this.isOpen=!this.isOpen;r.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(function(){return t.isOpen}));return[2]}))}))};t.prototype.renderFilterOption=function(t){var e=this;if(![a.VALUES,a.MINIMUM,a.VARIANTS].includes(t.type)){return""}return t.values.map((function(i,s){var o=typeof i=="number"?i:i.key||i.value;return n("label",{class:"s-filters-label",htmlFor:"".concat(t.key,"-option-").concat(o),key:"".concat(t.key,"-option-").concat(o)},n("input",{id:"".concat(t.key,"-option-").concat(o),name:t.key,type:"radio",checked:e.isSelectedOption(t,o),class:"s-filters-radio",onChange:function(i){return e.changed.emit({event:i,option:t,value:o})}}),e.getOptionLabel(t,i))}))};t.prototype.isSelectedOption=function(t,e){if(t.type===a.MINIMUM){return this.filtersData[t.key]==e}if(t.type===a.VARIANTS){return this.filtersData[t.type]&&this.filtersData[t.type][Object.keys(this.filtersData[t.type])[0]]==e}if(t.type===a.RANGE){return this.filtersData[t.key]&&this.filtersData[t.key].min==e.min&&this.filtersData[t.key].max==e.max}if(t.type===a.VALUES){return this.filtersData[t.key]&&Number(this.filtersData[t.key])==Number(e)}return false};t.prototype.getOptionLabel=function(t,e){if(t.key=="rating"){return n("salla-rating-stars",{size:"small",value:e})}var i=e.value||"null";return n("span",{class:"s-filters-option-name"},i)};t.prototype.render=function(){var t=this;return n(s,{class:"s-filters-widget-container"},n("h3",{class:"s-filters-widget-title",onClick:function(){return t.toggleWidget()}},n("span",null,this.option.label),n("span",{class:"s-filters-widget-plusminus ".concat(this.isOpen?"s-filters-widget-plusminus-active":"")})),n("div",{class:"s-filters-widget-content",ref:function(e){return t.widgetContent=e}},n("div",{class:"s-filters-widget-values",ref:function(e){return t.widgetValues=e}},n("slot",null),this.option.type!==a.RANGE?this.renderFilterOption(this.option):n("salla-price-range",{onChanged:function(e){t.changed.emit(e.detail)},ref:function(e){return t.priceRange=e},filtersData:this.filtersData,option:this.option})),this.withLoadMore&&n("a",{class:"s-filters-widget-more",onClick:function(){return t.showMore()}},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))};Object.defineProperty(t.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());u.style=l}}}));
5
- //# sourceMappingURL=p-012877f7.system.entry.js.map
4
+ */System.register(["./p-f422bbf9.system.js","./p-7c8ac4aa.system.js","./p-82b08e0b.system.js","./p-8f7b9e36.system.js"],(function(t){"use strict";var e,i,n,s,o,r,a;return{setters:[function(t){e=t.r;i=t.c;n=t.h;s=t.H;o=t.g},function(t){r=t.H},function(t){a=t.F},function(){}],execute:function(){var l=":host{display:block}";var u=t("salla_filters_widget",function(){function t(t){e(this,t);this.changed=i(this,"changed",7);this.initHeight=195;this.withLoadMore=undefined;this.filtersData=undefined;this.option=undefined;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل";this.page=salla.config.get("page")}t.prototype.connectedCallback=function(){var t=this;this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;salla.onReady((function(){t.page=salla.config.get("page")}));salla.lang.onLoaded((function(){t.showMoreLabel=salla.lang.getWithDefault("common.titles.more",t.showMoreLabel);t.showLessLabel=salla.lang.getWithDefault("common.elements.show_less",t.showLessLabel)}))};t.prototype.componentDidLoad=function(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight="".concat(this.initHeight,"px"));this.widgetContent.style.height="".concat(this.widgetContent.scrollHeight,"px")};t.prototype.setWidgetHeight=function(t){if(t===void 0){t=250}return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){this.widgetContent.removeAttribute("style");setTimeout((function(){var t=e.widgetContent.offsetHeight;e.widgetContent.style.height=t+"px"}),t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.option.type===a.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((function(t){return t.checked=false}));return[2]}))}))};t.prototype.showMore=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?"".concat(this.widgetValues.scrollHeight,"px"):"".concat(this.initHeight,"px");setTimeout((function(){t.widgetContent.style.height="".concat(t.widgetContent.scrollHeight,"px")}),400);return[2]}))}))};t.prototype.toggleWidget=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){this.isOpen=!this.isOpen;r.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(function(){return t.isOpen}));return[2]}))}))};t.prototype.renderFilterOption=function(t){var e=this;if(![a.VALUES,a.MINIMUM,a.VARIANTS].includes(t.type)){return""}return t.values.map((function(i,s){var o=typeof i=="number"?i:i.key||i.value;return n("label",{class:"s-filters-label",htmlFor:"".concat(t.key,"-option-").concat(o),key:"".concat(t.key,"-option-").concat(o)},n("input",{id:"".concat(t.key,"-option-").concat(o),name:t.key,type:"radio",checked:e.isSelectedOption(t,o),class:"s-filters-radio",onChange:function(i){return e.changed.emit({event:i,option:t,value:o})}}),e.getOptionLabel(t,i))}))};t.prototype.isSelectedOption=function(t,e){if(t.type===a.MINIMUM){return this.filtersData[t.key]==e}if(t.type===a.VARIANTS){return this.filtersData[t.type]&&this.filtersData[t.type][Object.keys(this.filtersData[t.type])[0]]==e}if(t.type===a.RANGE){return this.filtersData[t.key]&&this.filtersData[t.key].min==e.min&&this.filtersData[t.key].max==e.max}if(t.type===a.VALUES){return this.filtersData[t.key]&&Number(this.filtersData[t.key])==Number(e)}return false};t.prototype.getOptionLabel=function(t,e){if(t.key=="rating"){return n("salla-rating-stars",{size:"small",value:e})}var i=e.value||"null";return n("span",{class:"s-filters-option-name"},i)};t.prototype.render=function(){var t=this;return n(s,{class:"s-filters-widget-container"},n("h3",{class:"s-filters-widget-title",onClick:function(){return t.toggleWidget()}},n("span",null,this.option.label),n("span",{class:"s-filters-widget-plusminus ".concat(this.isOpen?"s-filters-widget-plusminus-active":"")})),n("div",{class:"s-filters-widget-content",ref:function(e){return t.widgetContent=e}},n("div",{class:"s-filters-widget-values",ref:function(e){return t.widgetValues=e}},n("slot",null),this.option.type!==a.RANGE?this.renderFilterOption(this.option):n("salla-price-range",{onChanged:function(e){t.changed.emit(e.detail)},ref:function(e){return t.priceRange=e},filtersData:this.filtersData,option:this.option})),this.withLoadMore&&n("a",{class:"s-filters-widget-more",onClick:function(){return t.showMore()}},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))};Object.defineProperty(t.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());u.style=l}}}));
5
+ //# sourceMappingURL=p-31f62211.system.entry.js.map