mealz-components 2.6.2 → 2.7.1
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.
- package/dist/assets/{OperatorSubscriber-DfCnFunn.js → OperatorSubscriber-CvNNPrIM.js} +1 -1
- package/dist/assets/{accordion-BGFgJnk1.js → accordion-tsgdqQeQ.js} +1 -1
- package/dist/assets/{args-DAL2bHut.js → args-upHwW4Wh.js} +1 -1
- package/dist/assets/{async-C5Kj_SqM.js → async-M7ziFu3t.js} +1 -1
- package/dist/assets/{combineLatest-Capvy1jI.js → combineLatest-BB01Px-W.js} +1 -1
- package/dist/assets/{debounceTime-Cf_7YmIn.js → debounceTime-BeLayHXh.js} +1 -1
- package/dist/assets/delay-DJoNbXpK.js +1 -0
- package/dist/assets/{distinctUntilChanged-kXqVrZ5h.js → distinctUntilChanged-6bjT4iYO.js} +1 -1
- package/dist/assets/empty-Dy0Wgz_B.js +1 -0
- package/dist/assets/{filter-q99GWcpD.js → filter-aZV_N5pj.js} +1 -1
- package/dist/assets/{firstValueFrom-Bcbk1SUg.js → firstValueFrom-CyoZXDwo.js} +1 -1
- package/dist/assets/{from-D8c5akO7.js → from-uSPfq2sN.js} +1 -1
- package/dist/assets/{guestObserver-C5qvv1Ll.js → guestObserver-PPbBwlOO.js} +1 -1
- package/dist/assets/{http-Bepz6wA4.js → http-Cm33xl_Z.js} +1 -1
- package/dist/assets/{innerFrom-DePszgj9.js → innerFrom-BldbX_fT.js} +1 -1
- package/dist/assets/isScheduler-fbUJB_yC.js +1 -0
- package/dist/assets/{map-DT-7dkaR.js → map-ND1NsJPC.js} +1 -1
- package/dist/assets/mapOneOrManyArgs-BPsgfFRx.js +1 -0
- package/dist/assets/{mealz-sdk-E_fNZM-c.js → mealz-sdk-CnvUgy3V.js} +1 -1
- package/dist/assets/merge-B0ddcNYl.js +1 -0
- package/dist/assets/mergeAll-BvxRfNLo.js +1 -0
- package/dist/assets/{mergeMap-D2yctTHQ.js → mergeMap-C1wxIFhz.js} +1 -1
- package/dist/assets/{no-shadow-element-D62BBu0I.js → no-shadow-element-CXVMZH9n.js} +1 -1
- package/dist/assets/of-D0UErknW.js +1 -0
- package/dist/assets/{price-D6RVRYHJ.js → price-CTfOOyf1.js} +1 -1
- package/dist/assets/{product-card-wIoU7Z_5.js → product-card-ryOzsvSF.js} +2 -2
- package/dist/assets/{promotion-badge-CDaL7Tqv.js → promotion-badge-D63kIgUZ.js} +1 -1
- package/dist/assets/{property-CoRN-Ln2.js → property-BXpY_hgs.js} +1 -1
- package/dist/assets/session-handler-D-8RsM2Q.js +1 -0
- package/dist/assets/skip-4iqvFhkz.js +1 -0
- package/dist/assets/{skipWhile-Beza3ws3.js → skipWhile-DK5WsIpo.js} +1 -1
- package/dist/assets/{state-DDIoBQp5.js → state-BjFDUoQX.js} +1 -1
- package/dist/assets/{switchMap-BAdE9Uzw.js → switchMap-DC1sJvd8.js} +1 -1
- package/dist/assets/{take-CpvJwza7.js → take-BgFJXP4B.js} +1 -1
- package/dist/assets/{tap-BN_fPb40.js → tap-DT80gG87.js} +1 -1
- package/dist/assets/{timer-3Kpx74mt.js → timer-W1DT7NsX.js} +1 -1
- package/dist/assets/{unsafe-html-DWUMaK1p.js → unsafe-html-LLTnDXid.js} +1 -1
- package/dist/assets/{viewport-listener-DsRHfwo4.js → viewport-listener-khw7cTjd.js} +1 -1
- package/dist/basket-transfer-modal/basket-transfer-modal.min.js +2 -2
- package/dist/catalog/_helpers/init-basket-preview-drawer.min.js +1 -0
- package/dist/catalog/basket-preview/basket-preview.min.js +9 -9
- package/dist/catalog/catalog-category/catalog-category.min.js +1 -1
- package/dist/catalog/catalog-favorites/catalog-favorites.min.js +1 -1
- package/dist/catalog/catalog-history/catalog-history.min.js +1 -1
- package/dist/catalog/catalog-home/catalog-home.min.js +1 -1
- package/dist/catalog/catalog-home-header/catalog-home-header.min.js +1 -1
- package/dist/catalog/catalog-list/catalog-list.min.js +1 -1
- package/dist/catalog/catalog-load-more.min.js +1 -1
- package/dist/catalog/catalog-tabs/catalog-tabs.min.js +1 -1
- package/dist/catalog/catalog-toolbar/catalog-toolbar.min.js +1 -1
- package/dist/catalog/my-meals-button/my-meals-button.min.js +1 -1
- package/dist/counter/counter.min.js +1 -1
- package/dist/drawer/drawer.min.js +1 -1
- package/dist/drawer-view-swapper/drawer-view-swapper.min.js +13 -12
- package/dist/history-drawer/history-drawer.min.js +1 -1
- package/dist/history-order/history-order.min.js +1 -1
- package/dist/history-order-expanded/history-order-expanded.min.js +1 -1
- package/dist/last-order-badge/last-order-badge.min.js +1 -1
- package/dist/last-order-modal/last-order-modal.min.js +1 -1
- package/dist/like-button/like-button.min.js +1 -1
- package/dist/modal/modal.min.js +3 -3
- package/dist/no-supplier-add-to-cart-cta/no-supplier-add-to-cart-cta.min.js +1 -1
- package/dist/onboarding/analytics/onboarding-analytics.min.js +1 -1
- package/dist/onboarding/onboarding.min.js +1 -1
- package/dist/order-again/order-again.min.js +1 -1
- package/dist/planner/helpers/get-planner-onboarding-modal-config.min.js +1 -1
- package/dist/planner/helpers/init-planner-onboarding-modal.min.js +1 -1
- package/dist/planner/helpers/menu-title.min.js +1 -1
- package/dist/planner/helpers/open-onboarding-modal.min.js +1 -1
- package/dist/planner/planner-abandon-modal/planner-abandon-modal.min.js +1 -1
- package/dist/planner/planner-budget-edit-modal/planner-budget-edit-modal.min.js +1 -1
- package/dist/planner/planner-budget-gauge/planner-budget-gauge.min.js +1 -1
- package/dist/planner/planner-catalog/planner-catalog.min.js +1 -1
- package/dist/planner/planner-current-menu/planner-current-menu.css +1 -1
- package/dist/planner/planner-current-menu/planner-current-menu.min.js +1 -1
- package/dist/planner/planner-current-menu-modal/planner-current-menu-modal.min.js +1 -1
- package/dist/planner/planner-form/planner-form.min.js +2 -2
- package/dist/planner/planner-menu-option/planner-menu-option.css +1 -1
- package/dist/planner/planner-menu-option/planner-menu-option.min.js +1 -1
- package/dist/planner/planner-onboarding/planner-onboarding.min.js +1 -1
- package/dist/planner/planner-onboarding-modal/planner-onboarding-modal.min.js +1 -1
- package/dist/planner/planner-open-catalog-modal/planner-open-catalog-modal.min.js +1 -1
- package/dist/planner/planner-quick-menu/planner-quick-menu.min.js +1 -1
- package/dist/planner/planner-recipe-card/planner-recipe-card.min.js +1 -1
- package/dist/planner/planner-recipe-list/planner-recipe-list.css +1 -1
- package/dist/planner/planner-recipe-list/planner-recipe-list.min.js +1 -1
- package/dist/planner/planner-recipe-suggestion/planner-recipe-suggestion.css +1 -1
- package/dist/planner/planner-recipe-suggestion/planner-recipe-suggestion.min.js +1 -1
- package/dist/planner/planner-welcome-modal/planner-welcome-modal.min.js +2 -2
- package/dist/planner/to-basket-loader/to-basket-loader.min.js +1 -1
- package/dist/planner-entry/planner-entry.min.js +1 -1
- package/dist/preferences/preferences.min.js +1 -1
- package/dist/price/price.min.js +1 -1
- package/dist/products-to-basket-cta/products-to-basket-cta.min.js +1 -1
- package/dist/recipe-card/recipe-card.min.js +1 -1
- package/dist/recipe-card-cta/recipe-card-cta.min.js +1 -1
- package/dist/recipe-details/recipe-details.min.js +1 -1
- package/dist/recipe-pricing/recipe-pricing.min.js +1 -1
- package/dist/recipe-to-basket/recipe-to-basket.min.js +1 -1
- package/dist/replace-item/replace-item-card/replace-item-card.min.js +1 -1
- package/dist/replace-item/replace-item.min.js +1 -1
- package/dist/replace-item-planner/replace-item-card-planner/replace-item-card-planner.min.js +1 -1
- package/dist/replace-item-planner/replace-item-planner.min.js +1 -1
- package/dist/select/select.min.js +1 -1
- package/dist/slider-tabs/slider-tabs.min.js +1 -1
- package/dist/store-indicator/store-indicator.min.js +1 -1
- package/dist/store-locator/store-locator.min.js +1 -1
- package/dist/store-locator-drawer/store-locator-drawer.min.js +1 -1
- package/dist/supplier-selector/supplier-selector.min.js +1 -1
- package/package.json +1 -1
- package/dist/assets/delay-DHNms76g.js +0 -1
- package/dist/assets/empty-qrpgDBbc.js +0 -1
- package/dist/assets/isScheduler-CqHuyMwD.js +0 -1
- package/dist/assets/mapOneOrManyArgs-CHGhEDCk.js +0 -1
- package/dist/assets/merge-DzIA6T0M.js +0 -1
- package/dist/assets/mergeAll-DpEYIxY3.js +0 -1
- package/dist/assets/of-DtJFltSl.js +0 -1
- package/dist/assets/session-handler-BZFnRy_K.js +0 -1
- package/dist/assets/skip-Bup0JB81.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as b,_ as h,S as f}from"./no-shadow-element-
|
|
1
|
+
import{i as b,_ as h,S as f}from"./no-shadow-element-CXVMZH9n.js";function p(r){return b(r==null?void 0:r.lift)}function d(r){return function(i){if(p(i))return i.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(r,i,t,n,c){return new y(r,i,t,n,c)}var y=function(r){h(i,r);function i(t,n,c,u,a,l){var e=r.call(this,t)||this;return e.onFinalize=a,e.shouldUnsubscribe=l,e._next=n?function(o){try{n(o)}catch(s){t.error(s)}}:r.prototype._next,e._error=u?function(o){try{u(o)}catch(s){t.error(s)}finally{this.unsubscribe()}}:r.prototype._error,e._complete=c?function(){try{c()}catch(o){t.error(o)}finally{this.unsubscribe()}}:r.prototype._complete,e}return i.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},i}(f);export{_ as c,d as o};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as p,D as l,k as h}from"./no-shadow-element-
|
|
1
|
+
import{N as p,D as l,k as h}from"./no-shadow-element-CXVMZH9n.js";import{n as i}from"./property-BXpY_hgs.js";var u=Object.defineProperty,n=(a,t,e,c)=>{for(var o=void 0,r=a.length-1,d;r>=0;r--)(d=a[r])&&(o=d(t,e,o)||o);return o&&u(t,e,o),o};class s extends p{constructor(){super(),this.titleSlot=l,this.contentSlot=l,this.noStyling=!1,this.isCollapsed=!0,this.hasInitializedSlots=!1,this.styleURL=new URL("./accordion/accordion.css",this.getBaseURL())}connectedCallback(){if(super.connectedCallback(),this.hasInitializedSlots)return;const t=this.querySelector('[slot="title"]'),e=this.querySelector('[slot="content"]'),c=!!(t||e);t&&(t.removeAttribute("slot"),this.titleSlot=t),e&&(e.removeAttribute("slot"),this.contentSlot=e),c&&(this.innerHTML="",this.hasInitializedSlots=!0)}disconnectedCallback(){super.disconnectedCallback()}toggleAccordion(){this.isCollapsed=!this.isCollapsed,this.dispatchEvent(new CustomEvent("isCollapsedChange",{detail:{isCollapsed:this.isCollapsed},bubbles:!0,composed:!0})),this.requestUpdate()}updated(){this.classList.toggle("opened",!this.isCollapsed)}renderSlotContent(t){return t===l?l:typeof t=="string"?h`${t}`:t}render(){return h`
|
|
2
2
|
<button
|
|
3
3
|
class="mealz-accordion__header${this.noStyling?"-no-styling":""}"
|
|
4
4
|
@click=${()=>this.toggleAccordion()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as p}from"./no-shadow-element-
|
|
1
|
+
import{i as p}from"./no-shadow-element-CXVMZH9n.js";import{i as t}from"./isScheduler-fbUJB_yC.js";function n(e){return e[e.length-1]}function r(e){return p(n(e))?e.pop():void 0}function f(e){return t(n(e))?e.pop():void 0}function c(e,o){return typeof n(e)=="number"?e.pop():o}export{c as a,r as b,f as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as u,a as l,b as d,c as f,d as v}from"./no-shadow-element-
|
|
1
|
+
import{_ as u,a as l,b as d,c as f,d as v}from"./no-shadow-element-CXVMZH9n.js";var a={now:function(){return(a.delegate||Date).now()},delegate:void 0},p=function(n){u(i,n);function i(e,t){return n.call(this)||this}return i.prototype.schedule=function(e,t){return this},i}(l),h={setInterval:function(n,i){for(var e=[],t=2;t<arguments.length;t++)e[t-2]=arguments[t];return setInterval.apply(void 0,d([n,i],f(e)))},clearInterval:function(n){return clearInterval(n)},delegate:void 0},y=function(n){u(i,n);function i(e,t){var r=n.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}return i.prototype.schedule=function(e,t){var r;if(t===void 0&&(t=0),this.closed)return this;this.state=e;var s=this.id,c=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(c,s,t)),this.pending=!0,this.delay=t,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(c,this.id,t),this},i.prototype.requestAsyncId=function(e,t,r){return r===void 0&&(r=0),h.setInterval(e.flush.bind(e,this),r)},i.prototype.recycleAsyncId=function(e,t,r){if(r===void 0&&(r=0),r!=null&&this.delay===r&&this.pending===!1)return t;t!=null&&h.clearInterval(t)},i.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},i.prototype._execute=function(e,t){var r=!1,s;try{this.work(e)}catch(c){r=!0,s=c||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),s},i.prototype.unsubscribe=function(){if(!this.closed){var e=this,t=e.id,r=e.scheduler,s=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,v(s,this),t!=null&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},i}(p),o=function(){function n(i,e){e===void 0&&(e=n.now),this.schedulerActionCtor=i,this.now=e}return n.prototype.schedule=function(i,e,t){return e===void 0&&(e=0),new this.schedulerActionCtor(this,i).schedule(t,e)},n.now=a.now,n}(),A=function(n){u(i,n);function i(e,t){t===void 0&&(t=o.now);var r=n.call(this,e,t)||this;return r.actions=[],r._active=!1,r}return i.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var r;this._active=!0;do if(r=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}},i}(o),g=new A(y),b=g;export{g as a,b,a as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O,t as m}from"./no-shadow-element-
|
|
1
|
+
import{O,t as m}from"./no-shadow-element-CXVMZH9n.js";import{f as v}from"./from-uSPfq2sN.js";import{m as b}from"./mapOneOrManyArgs-BPsgfFRx.js";import{p as h,b as A}from"./args-upHwW4Wh.js";import{c as S}from"./OperatorSubscriber-CvNNPrIM.js";import{e as j}from"./executeSchedule-CEDvgTzM.js";var k=Array.isArray,d=Object.getPrototypeOf,P=Object.prototype,w=Object.keys;function x(r){if(r.length===1){var e=r[0];if(k(e))return{args:e,keys:null};if(F(e)){var t=w(e);return{args:t.map(function(n){return e[n]}),keys:t}}}return{args:r,keys:null}}function F(r){return r&&typeof r=="object"&&d(r)===P}function L(r,e){return r.reduce(function(t,n,a){return t[n]=e[a],t},{})}function z(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=h(r),n=A(r),a=x(r),o=a.args,c=a.keys;if(o.length===0)return v([],t);var u=new O(V(o,t,c?function(i){return L(c,i)}:m));return n?u.pipe(b(n)):u}function V(r,e,t){return t===void 0&&(t=m),function(n){l(e,function(){for(var a=r.length,o=new Array(a),c=a,u=a,i=function(s){l(e,function(){var y=v(r[s],e),p=!1;y.subscribe(S(n,function(g){o[s]=g,p||(p=!0,u--),u||n.next(t(o.slice()))},function(){--c||n.complete()}))},n)},f=0;f<a;f++)i(f)},n)}}function l(r,e,t){r?j(t,r,e):e()}export{z as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d}from"./async-
|
|
1
|
+
import{a as d}from"./async-M7ziFu3t.js";import{o as m,c as v}from"./OperatorSubscriber-CvNNPrIM.js";function w(o,a){return a===void 0&&(a=d),m(function(r,e){var n=null,i=null,u=null,l=function(){if(n){n.unsubscribe(),n=null;var t=i;i=null,e.next(t)}};function c(){var t=u+o,f=a.now();if(f<t){n=this.schedule(void 0,t-f),e.add(n);return}l()}r.subscribe(v(e,function(t){i=t,u=a.now(),n||(n=a.schedule(c,o),e.add(n))},function(){l(),e.complete()},void 0,function(){i=n=null}))})}export{w as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./async-M7ziFu3t.js";import{t as m}from"./take-BgFJXP4B.js";import{m as a}from"./map-ND1NsJPC.js";import{m as e}from"./mergeMap-C1wxIFhz.js";import{i as f}from"./innerFrom-BldbX_fT.js";import{t as p}from"./timer-W1DT7NsX.js";function u(r){return a(function(){return r})}function s(r,t){return e(function(n,o){return f(r(n,o)).pipe(m(1),u(n))})}function l(r,t){t===void 0&&(t=i);var n=p(r,t);return s(function(){return n})}export{l as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d}from"./no-shadow-element-
|
|
1
|
+
import{t as d}from"./no-shadow-element-CXVMZH9n.js";import{o,c as a}from"./OperatorSubscriber-CvNNPrIM.js";function b(i,n){return n===void 0&&(n=d),i=i??v,o(function(s,t){var e,r=!0;s.subscribe(a(t,function(f){var u=n(f);(r||!i(e,u))&&(r=!1,e=u,t.next(f))}))})}function v(i,n){return i===n}export{b as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as r}from"./no-shadow-element-CXVMZH9n.js";var t=new r(function(e){return e.complete()});export{t as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as c,c as i}from"./OperatorSubscriber-
|
|
1
|
+
import{o as c,c as i}from"./OperatorSubscriber-CvNNPrIM.js";function u(e,n){return c(function(o,r){var a=0;o.subscribe(i(r,function(t){return e.call(n,t,a++)&&r.next(t)}))})}export{u as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v as i,p as u}from"./no-shadow-element-
|
|
1
|
+
import{v as i,p as u}from"./no-shadow-element-CXVMZH9n.js";var c=i(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}});function a(r,s){return new Promise(function(t,e){var n=new u({next:function(o){t(o),n.unsubscribe()},error:e,complete:function(){e(new c)}});r.subscribe(n)})}export{a as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as f,b as x,r as I,c as O,a as h,d as w,e as S,f as A,g as k,h as L}from"./innerFrom-
|
|
1
|
+
import{i as f,b as x,r as I,c as O,a as h,d as w,e as S,f as A,g as k,h as L}from"./innerFrom-BldbX_fT.js";import{e as a}from"./executeSchedule-CEDvgTzM.js";import{o as l,c as y}from"./OperatorSubscriber-CvNNPrIM.js";import{O as i,i as g}from"./no-shadow-element-CXVMZH9n.js";function m(e,n){return n===void 0&&(n=0),l(function(t,r){t.subscribe(y(r,function(o){return a(r,e,function(){return r.next(o)},n)},function(){return a(r,e,function(){return r.complete()},n)},function(o){return a(r,e,function(){return r.error(o)},n)}))})}function v(e,n){return n===void 0&&(n=0),l(function(t,r){r.add(e.schedule(function(){return t.subscribe(r)},n))})}function E(e,n){return f(e).pipe(v(n),m(n))}function F(e,n){return f(e).pipe(v(n),m(n))}function P(e,n){return new i(function(t){var r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}function R(e,n){return new i(function(t){var r;return a(t,n,function(){r=e[x](),a(t,n,function(){var o,u,c;try{o=r.next(),u=o.value,c=o.done}catch(d){t.error(d);return}c?t.complete():t.next(u)},0,!0)}),function(){return g(r==null?void 0:r.return)&&r.return()}})}function s(e,n){if(!e)throw new Error("Iterable cannot be null");return new i(function(t){a(t,n,function(){var r=e[Symbol.asyncIterator]();a(t,n,function(){r.next().then(function(o){o.done?t.complete():t.next(o.value)})},0,!0)})})}function T(e,n){return s(I(e),n)}function p(e,n){if(e!=null){if(O(e))return E(e,n);if(h(e))return P(e,n);if(w(e))return F(e,n);if(S(e))return s(e,n);if(A(e))return R(e,n);if(k(e))return T(e,n)}throw L(e)}function q(e,n){return n?p(e,n):f(e)}export{q as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as e}from"./singleton-COF3iBbF.js";import{n as t}from"./no-shadow-element-
|
|
1
|
+
import{S as e}from"./singleton-COF3iBbF.js";import{n as t}from"./no-shadow-element-CXVMZH9n.js";class o extends e{constructor(){super(...arguments),this.guests$=new t}updateGuests(s){this.guests$.next(s)}}export{o as G};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as s}from"./mealz-sdk-
|
|
1
|
+
import{m as s}from"./mealz-sdk-CnvUgy3V.js";function i(t){const e={"language-id":s.user.getLanguage()||"fr","supplier-token":s.supplier.getToken()||"","session-id":t},a=localStorage.getItem("_miam/userId");return a?e.authorization=`user_id ${a}`:e["authless-id"]=localStorage.getItem("_miam/authlessId"),e}export{i as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as l,o as d,e as m,g as v,h as f,O as u,r as h,j as w,l as I,m as S}from"./no-shadow-element-
|
|
1
|
+
import{i as l,o as d,e as m,g as v,h as f,O as u,r as h,j as w,l as I,m as S}from"./no-shadow-element-CXVMZH9n.js";var g=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function A(e){return l(e==null?void 0:e.then)}function k(e){return l(e[d])}function x(e){return Symbol.asyncIterator&&l(e==null?void 0:e[Symbol.asyncIterator])}function L(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function O(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var b=O();function p(e){return l(e==null?void 0:e[b])}function R(e){return m(this,arguments,function(){var r,a,o,s;return v(this,function(t){switch(t.label){case 0:r=e.getReader(),t.label=1;case 1:t.trys.push([1,,9,10]),t.label=2;case 2:return[4,f(r.read())];case 3:return a=t.sent(),o=a.value,s=a.done,s?[4,f(void 0)]:[3,5];case 4:return[2,t.sent()];case 5:return[4,f(o)];case 6:return[4,t.sent()];case 7:return t.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function T(e){return l(e==null?void 0:e.getReader)}function j(e){if(e instanceof u)return e;if(e!=null){if(k(e))return E(e);if(g(e))return P(e);if(A(e))return G(e);if(x(e))return y(e);if(p(e))return F(e);if(T(e))return Y(e)}throw L(e)}function E(e){return new u(function(n){var r=e[d]();if(l(r.subscribe))return r.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function P(e){return new u(function(n){for(var r=0;r<e.length&&!n.closed;r++)n.next(e[r]);n.complete()})}function G(e){return new u(function(n){e.then(function(r){n.closed||(n.next(r),n.complete())},function(r){return n.error(r)}).then(null,h)})}function F(e){return new u(function(n){var r,a;try{for(var o=w(e),s=o.next();!s.done;s=o.next()){var t=s.value;if(n.next(t),n.closed)return}}catch(i){r={error:i}}finally{try{s&&!s.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}n.complete()})}function y(e){return new u(function(n){U(e,n).catch(function(r){return n.error(r)})})}function Y(e){return y(R(e))}function U(e,n){var r,a,o,s;return I(this,void 0,void 0,function(){var t,i;return v(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=S(e),c.label=1;case 1:return[4,r.next()];case 2:if(a=c.sent(),!!a.done)return[3,4];if(t=a.value,n.next(t),n.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),o={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),a&&!a.done&&(s=r.return)?[4,s.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}export{g as a,b,k as c,A as d,x as e,p as f,T as g,L as h,j as i,R as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as r}from"./no-shadow-element-CXVMZH9n.js";function n(i){return i&&r(i.schedule)}export{n as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as c,c as i}from"./OperatorSubscriber-
|
|
1
|
+
import{o as c,c as i}from"./OperatorSubscriber-CvNNPrIM.js";function u(e,t){return c(function(a,r){var n=0;a.subscribe(i(r,function(o){r.next(e.call(t,o,n++))}))})}export{u as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as n,c as p}from"./no-shadow-element-CXVMZH9n.js";import{m as o}from"./map-ND1NsJPC.js";var t=Array.isArray;function i(a,r){return t(r)?a.apply(void 0,n([],p(r))):a(r)}function y(a){return o(function(r){return i(a,r)})}export{y as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=()=>typeof window<"u"?window.mealzV10?window.mealzV10:window.mealz?window.mealz:null:null,l=()=>typeof window<"u"?window.mealzInternalV10?window.mealzInternalV10:window.mealzInternal?window.mealzInternal:null:null,u=new Proxy({},{get(e,n){const t=o();return t?t[n]:void 0},set(e,n,t){const r=o();return r?(r[n]=t,!0):!1}}),w=new Proxy({},{get(e,n){const t=l();return t?t[n]:void 0},set(e,n,t){const r=l();return r?(r[n]=t,!0):!1}}),i=()=>{const e=l();return!!(e!=null&&e.pos&&e.supplier&&e.recipes&&e.replaceItem&&e.basket&&e.planner)},d=()=>new Promise((e,n)=>{let t=0;const r=200,a=50,s=()=>{t++,i()?e():t>=r?n(new Error(`MealzInternal SDK not available after ${r} attempts (${r*a}ms)`)):setTimeout(s,a)};s()});export{u as a,i,w as m,d as w};
|
|
1
|
+
const o=()=>typeof window<"u"?window.mealzV10?window.mealzV10:window.mealz?window.mealz:null:null,l=()=>typeof window<"u"?window.mealzInternalV10?window.mealzInternalV10:window.mealzInternal?window.mealzInternal:null:null,u=new Proxy({},{get(e,n){const t=o();return t?t[n]:void 0},set(e,n,t){const r=o();return r?(r[n]=t,!0):!1}}),w=new Proxy({},{get(e,n){const t=l();return t?t[n]:void 0},set(e,n,t){const r=l();return r?(r[n]=t,!0):!1}}),i=()=>{const e=l();return!!(e!=null&&e.pos&&e.supplier&&e.recipes&&e.replaceItem&&e.basket&&e.planner&&e.user)},d=()=>new Promise((e,n)=>{let t=0;const r=200,a=50,s=()=>{t++,i()?e():t>=r?n(new Error(`MealzInternal SDK not available after ${r} attempts (${r*a}ms)`)):setTimeout(s,a)};s()});export{u as a,i,w as m,d as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as t}from"./mergeAll-BvxRfNLo.js";import{i as n}from"./innerFrom-BldbX_fT.js";import{E as s}from"./empty-Dy0Wgz_B.js";import{p,a as f}from"./args-upHwW4Wh.js";import{f as u}from"./from-uSPfq2sN.js";function v(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var o=p(r),a=f(r,1/0),m=r;return m.length?m.length===1?n(m[0]):t(a)(u(m,o)):s}export{v as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m}from"./mergeMap-C1wxIFhz.js";import{t}from"./no-shadow-element-CXVMZH9n.js";function o(i){return i===void 0&&(i=1/0),m(t,i)}export{o as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as C}from"./map-
|
|
1
|
+
import{m as C}from"./map-ND1NsJPC.js";import{i as x}from"./innerFrom-BldbX_fT.js";import{c as h,o as F}from"./OperatorSubscriber-CvNNPrIM.js";import"./executeSchedule-CEDvgTzM.js";import{i as I}from"./no-shadow-element-CXVMZH9n.js";function b(f,e,n,i,t,v,u,k){var o=[],r=0,g=0,c=!1,d=function(){c&&!o.length&&!r&&e.complete()},y=function(a){return r<i?s(a):o.push(a)},s=function(a){r++;var l=!1;x(n(a,g++)).subscribe(h(e,function(m){e.next(m)},function(){l=!0},void 0,function(){if(l)try{r--;for(var m=function(){var p=o.shift();u||s(p)};o.length&&r<i;)m();d()}catch(p){e.error(p)}}))};return f.subscribe(h(e,y,function(){c=!0,d()})),function(){}}function N(f,e,n){return n===void 0&&(n=1/0),I(e)?N(function(i,t){return C(function(v,u){return e(i,v,t,u)})(x(f(i,t)))},n):(typeof e=="number"&&(n=e),F(function(i,t){return b(i,t,f,n)}))}export{N as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e}from"./args-upHwW4Wh.js";import{f as t}from"./from-uSPfq2sN.js";function s(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];var a=e(o);return t(o,a)}export{s as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as a}from"./no-shadow-element-
|
|
1
|
+
import{k as a}from"./no-shadow-element-CXVMZH9n.js";import{S as i}from"./singleton-COF3iBbF.js";import{m as s}from"./mealz-sdk-CnvUgy3V.js";const m={en:"USD","en-US":"USD","en-GB":"GBP",fr:"EUR","fr-FR":"EUR","fr-CA":"CAD"};class $ extends i{initFormatter(){const r=s.user.getLanguage()||"fr",t=m[r]||"EUR";this.formatter=new Intl.NumberFormat(r,{style:"currency",currency:t})}currencySymbol(){const r=s.user.getLanguage()||"fr",t=m[r]||"EUR";return new Intl.NumberFormat(r,{style:"currency",currency:t}).format(0).replace(/[\d.,\s]/g,"")}formatPrice(r){return this.formatter||this.initFormatter(),this.formatter.format(r)}priceTemplate(r,t="price"){let e="",n=a``,o=0;return this.formatter.formatToParts(r).forEach(({type:f,value:c},u)=>{f==="currency"?(o=u,n=a`<span class="mealz-${t}__currency">${c}</span>`):e+=c}),o>0?a`<span class="mealz-${t}__amount">${e}</span>${n}`:a`${n}<span class="mealz-${t}__amount">${e}</span>`}}export{$ as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../price/price.min.js";import"../counter/counter.min.js";import"./promotion-badge-
|
|
1
|
+
import"../price/price.min.js";import"../counter/counter.min.js";import"./promotion-badge-D63kIgUZ.js";import{N as m,k as i,D as _}from"./no-shadow-element-CXVMZH9n.js";import{n as l}from"./property-BXpY_hgs.js";import{G as k}from"./guestObserver-PPbBwlOO.js";import{c as $}from"./capitalize-DUAqYmp4.js";import{m as c}from"./mealz-sdk-CnvUgy3V.js";import{d as E}from"./delay-DJoNbXpK.js";import{P}from"./price-CTfOOyf1.js";var I=Object.defineProperty,y=(d,t,e,n)=>{for(var s=void 0,a=d.length-1,r;a>=0;a--)(r=d[a])&&(s=r(t,e,s)||s);return s&&I(t,e,s),s};class h extends m{constructor(){super(),this.isSponsored=!1,this.priceService=P.getInstance(),this.styleURL=new URL("./product-badges/product-badges.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.applyStartingDataFromAttribute()}formatNumber(t){const e=c.user.getLanguage()||"fr";return new Intl.NumberFormat(e,{minimumFractionDigits:1,maximumFractionDigits:2}).format(t)}render(){var t,e,n,s,a;return i`
|
|
2
2
|
<div class="mealz-product-badges">
|
|
3
3
|
<!-- SPONSORED BADGE -->
|
|
4
4
|
${this.isSponsored?i`
|
|
@@ -30,7 +30,7 @@ import"../price/price.min.js";import"../counter/counter.min.js";import"./promoti
|
|
|
30
30
|
${this.numberUnavailable?"":i`<span>Indisponible</span>`}
|
|
31
31
|
${this.numberUnavailable?i`<span>${this.numberUnavailable}</span>`:""}
|
|
32
32
|
${this.numberUnavailable&&this.numberUnavailable<=1?i`<span>produit indisponible</span>`:""}
|
|
33
|
-
${this.numberUnavailable&&this.numberUnavailable>1?i`<span>produits
|
|
33
|
+
${this.numberUnavailable&&this.numberUnavailable>1?i`<span>produits indisponibles</span>`:""}
|
|
34
34
|
</button>
|
|
35
35
|
`}}x([l({type:Number})],z.prototype,"numberUnavailable");customElements.get("mealz-unavailable-badge")||customElements.define("mealz-unavailable-badge",z);var R=Object.defineProperty,U=(d,t,e,n)=>{for(var s=void 0,a=d.length-1,r;a>=0;a--)(r=d[a])&&(s=r(t,e,s)||s);return s&&R(t,e,s),s};class f extends m{constructor(){super(),this.styleURL=new URL("./out-of-stock-overlay/out-of-stock-overlay.css",this.getBaseURL())}replacedClicked(){const t=new CustomEvent("replacedClicked",{bubbles:!0,composed:!0});this.dispatchEvent(t)}render(){return i`
|
|
36
36
|
<div class="mealz-out-of-stock-overlay">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as m,k as a}from"./no-shadow-element-
|
|
1
|
+
import{N as m,k as a}from"./no-shadow-element-CXVMZH9n.js";import{n as p}from"./property-BXpY_hgs.js";import{P as d}from"./price-CTfOOyf1.js";var c=Object.defineProperty,l=(o,e,r,u)=>{for(var t=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(t=s(e,r,t)||t);return t&&c(e,r,t),t};class n extends m{constructor(){super(),this.priceService=d.getInstance(),this.styleURL=new URL("./promotion-badge/promotion-badge.css",this.getBaseURL())}getPriceAmountSuffix(){var e;return(e=this.priceData.discountType)!=null&&e.endsWith("_perc")?"%":this.priceService.currencySymbol()}render(){var e;return a`
|
|
2
2
|
<div class="mealz-promotion-badge">
|
|
3
3
|
${((e=this.priceData)==null?void 0:e.discountAmount)>0?a`
|
|
4
4
|
<div class="mealz-ds-badge mealz-promotion-badge__promotion">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as a,m as n}from"./mealz-sdk-CnvUgy3V.js";function r(e){e&&a().then(()=>n.user.setSessionId(e)).catch(()=>{})}export{r as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as n}from"./filter-aZV_N5pj.js";function o(r){return n(function(f,t){return r<=t})}export{o as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o,c as s}from"./OperatorSubscriber-
|
|
1
|
+
import{o,c as s}from"./OperatorSubscriber-CvNNPrIM.js";function f(n){return o(function(a,r){var e=!1,i=0;a.subscribe(s(r,function(t){return(e||(e=!n(t,i++)))&&r.next(t)}))})}export{f as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as v}from"./innerFrom-
|
|
1
|
+
import{i as v}from"./innerFrom-BldbX_fT.js";import{o as l,c as a}from"./OperatorSubscriber-CvNNPrIM.js";function b(f,e){return l(function(p,r){var n=null,s=0,o=!1,t=function(){return o&&!n&&r.complete()};p.subscribe(a(r,function(i){n==null||n.unsubscribe();var m=0,u=s++;v(f(i,u)).subscribe(n=a(r,function(c){return r.next(e?e(i,c,u,m++):c)},function(){n=null,t()}))},function(){o=!0,t()}))})}export{b as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as a}from"./empty-
|
|
1
|
+
import{E as a}from"./empty-Dy0Wgz_B.js";import{o as f,c as i}from"./OperatorSubscriber-CvNNPrIM.js";function m(e){return e<=0?function(){return a}:f(function(o,t){var r=0;o.subscribe(i(t,function(n){++r<=e&&(t.next(n),e<=r&&t.complete())}))})}export{m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,i as d}from"./no-shadow-element-
|
|
1
|
+
import{t as e,i as d}from"./no-shadow-element-CXVMZH9n.js";import{o as f,c as s}from"./OperatorSubscriber-CvNNPrIM.js";function _(n,r,u){var a=d(n)||r||u?{next:n,error:r,complete:u}:n;return a?f(function(v,l){var t;(t=a.subscribe)===null||t===void 0||t.call(a);var c=!0;v.subscribe(s(l,function(i){var o;(o=a.next)===null||o===void 0||o.call(a,i),l.next(i)},function(){var i;c=!1,(i=a.complete)===null||i===void 0||i.call(a),l.complete()},function(i){var o;c=!1,(o=a.error)===null||o===void 0||o.call(a,i),l.error(i)},function(){var i,o;c&&((i=a.unsubscribe)===null||i===void 0||i.call(a)),(o=a.finalize)===null||o===void 0||o.call(a)}))}):e}export{_ as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as m}from"./no-shadow-element-
|
|
1
|
+
import{O as m}from"./no-shadow-element-CXVMZH9n.js";import{b as p}from"./async-M7ziFu3t.js";import{i as r}from"./isScheduler-fbUJB_yC.js";import{i as v}from"./isDate-BwHtzZM4.js";function y(o,f,i){o===void 0&&(o=0),i===void 0&&(i=p);var n=-1;return f!=null&&(r(f)?i=f:n=f),new m(function(t){var a=v(o)?+o-i.now():o;a<0&&(a=0);var s=0;return i.schedule(function(){t.closed||(t.next(s++),0<=n?this.schedule(void 0,n):t.complete())},a)})}export{y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as c}from"./no-shadow-element-
|
|
1
|
+
import{n as c}from"./no-shadow-element-CXVMZH9n.js";import{d as h}from"./debounceTime-BeLayHXh.js";class a{constructor(){this.condition=!0,this.threshold=0,this.debounce=0}}class p{constructor(t,i,s={}){this.element=t,this.callback=i,this.params=s,this.intersectionSubject=new c,this.subscriptions=[],this.params={...new a,...s};const n={root:null,rootMargin:"0px",threshold:this.params.threshold};this.observer=new IntersectionObserver(r=>{r.forEach(o=>this.intersectionSubject.next(o))},n),this.connect()}connect(){this.subscriptions.push(this.intersectionSubject.pipe(h(this.params.debounce)).subscribe(t=>this.handleIntersection(t))),this.observer.observe(this.element)}disconnect(){this.observer&&this.observer.disconnect(),this.intersectionSubject.complete(),this.subscriptions.forEach(t=>t.unsubscribe())}handleIntersection(t){this.params.condition&&t.isIntersecting&&this.callback()}}export{p as V};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{O as
|
|
1
|
+
import{O as f,i as c,N as h,k as l}from"../assets/no-shadow-element-CXVMZH9n.js";import{m as a,w as m}from"../assets/mealz-sdk-CnvUgy3V.js";import{s as b}from"../assets/skip-4iqvFhkz.js";import{t as S}from"../assets/take-BgFJXP4B.js";import"../assets/filter-aZV_N5pj.js";import"../assets/OperatorSubscriber-CvNNPrIM.js";import"../assets/empty-Dy0Wgz_B.js";function u(i){return!!i&&(i instanceof f||c(i.lift)&&c(i.subscribe))}class T extends h{constructor(){super(),this.supplierName=null,this.displayFirstStep=!1,this.displaySecondStep=!1,this.subscriptions=[],this.close=()=>{this.displayFirstStep=!1,this.displaySecondStep=!1,this.requestUpdate()},this.openFirstStep=()=>{this.displayFirstStep=!0,this.displaySecondStep=!1,this.requestUpdate()},this.goToSecondStep=()=>{var s,e;this.subscriptions.push((e=(s=a)==null?void 0:s.basket)==null?void 0:e.refreshCurrentBasket().pipe(b(1),S(1)).subscribe(t=>{var n;((n=t==null?void 0:t.attributes)==null?void 0:n.status)==="transferring"&&(this.displayFirstStep=!1,this.displaySecondStep=!0,this.requestUpdate())}))},this.cancelTransfer=()=>{var e;const s=(e=a)==null?void 0:e.basketTransfer.abortTransfer();if(u(s)){this.subscriptions.push(s.subscribe(()=>this.close()));return}this.close()},this.continueTransfer=()=>{var s,e,t,r;this.displayFirstStep=!0,this.displaySecondStep=!1,this.requestUpdate(),typeof((e=(s=a)==null?void 0:s.basket)==null?void 0:e.transfer)=="function"&&a.basketTransfer.transfer(),typeof((r=(t=a)==null?void 0:t.basketTransfer)==null?void 0:r.navigateToTransferUrl)=="function"&&a.basketTransfer.navigateToTransferUrl()},this.styleURL=new URL("./basket-transfer-modal/basket-transfer-modal.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),m().then(()=>{this.listenToPos(),this.listenToTransferState()}).catch(s=>console.error("[basket-transfer-modal] Mealz SDK unavailable",s))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(s=>s.unsubscribe())}render(){return!this.displayFirstStep&&!this.displaySecondStep?l``:l`
|
|
2
2
|
<mealz-modal
|
|
3
3
|
.titleSlot=${l`<span class="mealz-ds-text weight-xxl">Transfert du panier</span>`}
|
|
4
4
|
.contentSlot=${this.displaySecondStep?this.renderTransferModalConfirm():this.renderTransferModalInitial()}
|
|
@@ -37,4 +37,4 @@ import{O as h,i as d,N as f,k as l}from"../assets/no-shadow-element-D62BBu0I.js"
|
|
|
37
37
|
<span class="mealz-ds-text weight-l">Continuer</span>
|
|
38
38
|
</button>
|
|
39
39
|
</div>
|
|
40
|
-
`}listenToPos(){var e,t;const s=(t=(e=a.pos)==null?void 0:e.currentPos)==null?void 0:t.call(e);u(s)&&this.subscriptions.push(s.subscribe(r=>{var n,o,p,
|
|
40
|
+
`}listenToPos(){var e,t;const s=(t=(e=a.pos)==null?void 0:e.currentPos)==null?void 0:t.call(e);u(s)&&this.subscriptions.push(s.subscribe(r=>{var n,o,p,d;this.supplierName=((d=(p=(o=(n=r==null?void 0:r.relationships)==null?void 0:n.supplier)==null?void 0:o.data)==null?void 0:p.attributes)==null?void 0:d.name)??null,this.requestUpdate()}))}listenToTransferState(){this.subscriptions.push(a.basketTransfer.basketIsBeingTransferred.subscribe(s=>{if(!this.displayFirstStep&&!this.displaySecondStep&&s){this.displayFirstStep=!0,this.requestUpdate();return}s||this.close()}))}}customElements.get("mealz-basket-transfer-modal")||customElements.define("mealz-basket-transfer-modal",T);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(){const e=document.getElementById("__mealz-basket-preview-config__"),a=new URL(globalThis.location.href),l=(e==null?void 0:e.dataset.title)??a.searchParams.get("title")??"Mes repas",s=e==null?void 0:e.dataset.showTabSelector;let t;if(s===void 0){const o=a.searchParams.get("show_tab_selector");t=o!=="false"&&o!=="0"}else t=s!=="false";const r=document.querySelector("mealz-drawer-view-swapper");r&&r.displayBasketDrawer$.next({title:l,showTabSelector:t})}c();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/slider-tabs.min.js";import"../../store-locator/store-locator.min.js";import{N as $,k as l,D as _,s as
|
|
1
|
+
import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/slider-tabs.min.js";import"../../store-locator/store-locator.min.js";import{N as $,k as l,D as _,s as N,R as U}from"../../assets/no-shadow-element-CXVMZH9n.js";import{n as y}from"../../assets/property-BXpY_hgs.js";import{m as c,a as x}from"../../assets/mealz-sdk-CnvUgy3V.js";import"../../counter/counter.min.js";import"../../price/price.min.js";import"../../modal/modal.min.js";import{P as C}from"../../assets/price-CTfOOyf1.js";import{c as M}from"../../assets/capitalize-DUAqYmp4.js";import{e as D,i as O,t as q}from"../../assets/unsafe-html-LLTnDXid.js";import{d as L}from"../../assets/debounceTime-BeLayHXh.js";import{d as V}from"../../assets/delay-DJoNbXpK.js";import{s as F}from"../../assets/switchMap-DC1sJvd8.js";import"../../assets/state-BjFDUoQX.js";import"../../assets/query-BApjzB0v.js";import"../../onboarding/events.min.js";import"../../assets/singleton-COF3iBbF.js";import"../../assets/async-M7ziFu3t.js";import"../../assets/OperatorSubscriber-CvNNPrIM.js";import"../../assets/take-BgFJXP4B.js";import"../../assets/empty-Dy0Wgz_B.js";import"../../assets/map-ND1NsJPC.js";import"../../assets/mergeMap-C1wxIFhz.js";import"../../assets/innerFrom-BldbX_fT.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/timer-W1DT7NsX.js";import"../../assets/isScheduler-fbUJB_yC.js";import"../../assets/isDate-BwHtzZM4.js";var H=Object.defineProperty,G=(s,e,i,r)=>{for(var t=void 0,a=s.length-1,n;a>=0;a--)(n=s[a])&&(t=n(e,i,t)||t);return t&&H(e,i,t),t};class A extends ${constructor(){super(),this.analyticsPath="",this.styleURL=new URL("./product-addition/product-addition.css",this.getBaseURL())}render(){return l`
|
|
2
2
|
<div class="mealz-product-addition">
|
|
3
3
|
<span class="mealz-product-addition__title mealz-ds-text weight-l">Besoin de compléter votre panier ?</span>
|
|
4
4
|
<button @click=${()=>this.openProductAdditionModal()}
|
|
@@ -6,7 +6,7 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
6
6
|
Ajouter un produit
|
|
7
7
|
</button>
|
|
8
8
|
</div>
|
|
9
|
-
`}openProductAdditionModal(){this.sendbasketEntryAddEvent(),c.productAddition.open()}sendbasketEntryAddEvent(){c.analytics.sendEvent("basket.entry.add",this.analyticsPath,{})}}
|
|
9
|
+
`}openProductAdditionModal(){this.sendbasketEntryAddEvent(),c.productAddition.open()}sendbasketEntryAddEvent(){c.analytics.sendEvent("basket.entry.add",this.analyticsPath,{})}}G([y({type:String})],A.prototype,"analyticsPath");customElements.get("mealz-product-addition")||customElements.define("mealz-product-addition",A);var j=Object.defineProperty,P=(s,e,i,r)=>{for(var t=void 0,a=s.length-1,n;a>=0;a--)(n=s[a])&&(t=n(e,i,t)||t);return t&&j(e,i,t),t};class f extends ${constructor(){super(),this.analyticsPath="",this.loading=!1,this.isRecipeModalDisplayed=!1,this.subscriptions=[],this.priceService=C.getInstance(),this.styleURL=new URL("./catalog/basket-preview/basket-preview-product/basket-preview-product.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(c.products.entryIsBeingUpdated(this.basketEntry.id).subscribe(e=>this.loading=e))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}renderSponsorisedBadge(){return l`
|
|
10
10
|
<div class="mealz-basket-preview-product__sponsorised mealz-ds-badge mealz-ds-text size-s weight-l">
|
|
11
11
|
<span>Sponsorisé</span>
|
|
12
12
|
</div>
|
|
@@ -44,7 +44,7 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
44
44
|
</div>
|
|
45
45
|
<!-- TITLE -->
|
|
46
46
|
<div class="mealz-basket-preview-product__title mealz-ds-text size-xs">
|
|
47
|
-
<span>${
|
|
47
|
+
<span>${M(this.basketEntry.selectedItem.attributes.name)}</span>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="mealz-basket-preview-product__badges">
|
|
50
50
|
<!-- SPONSORISED BADGE -->
|
|
@@ -105,20 +105,20 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
105
105
|
</div>
|
|
106
106
|
`)}
|
|
107
107
|
</div>
|
|
108
|
-
`,document.body.appendChild(e),e.addEventListener("modalClosed",()=>this.displayRecipesFromProduct())}removeProduct(){this.sendDeleteEvent(),c.products.removeProduct(this.basketEntry,this.analyticsPath),this.loading=!0,this.requestUpdate()}replaceProduct(){this.sendReplaceEvent(),c.productReplacement.open(this.basketEntry)}counterChanged(e){e.detail.value!==this.basketEntry.attributes.quantity&&(c.products.changeQuantity(this.basketEntry,e.detail.value,""),this.loading=!0,this.requestUpdate())}addDefaultProductImage(e){e.target.src=
|
|
108
|
+
`,document.body.appendChild(e),e.addEventListener("modalClosed",()=>this.displayRecipesFromProduct())}removeProduct(){this.sendDeleteEvent(),c.products.removeProduct(this.basketEntry,this.analyticsPath),this.loading=!0,this.requestUpdate()}replaceProduct(){this.sendReplaceEvent(),c.productReplacement.open(this.basketEntry)}counterChanged(e){e.detail.value!==this.basketEntry.attributes.quantity&&(c.products.changeQuantity(this.basketEntry,e.detail.value,""),this.loading=!0,this.requestUpdate())}addDefaultProductImage(e){e.target.src=x.defaultIngredientPicture,e.target.onerror=null}displayRecipesFromProduct(){this.isRecipeModalDisplayed=!this.isRecipeModalDisplayed,this.requestUpdate()}sendReplaceEvent(){c.analytics.sendEvent("entry.replace",this.analyticsPath,{entry_name:this.basketEntry.attributes.name,product_quantity:this.basketEntry.attributes.quantity,item_id:this.basketEntry.selectedItem.id,ext_item_id:this.basketEntry.selectedItem.attributes["ext-id"],item_ean:this.basketEntry.selectedItem.attributes.ean,recipe_id:this.basketEntry.recipesIds[0],status:this.basketEntry.attributes.status})}sendDeleteEvent(){c.analytics.sendEvent("entry.delete",this.analyticsPath,{entry_name:this.basketEntry.attributes.name,product_quantity:this.basketEntry.attributes.quantity,item_id:this.basketEntry.selectedItem.id,ext_item_id:this.basketEntry.selectedItem.attributes["ext-id"],item_ean:this.basketEntry.selectedItem.attributes.ean,recipe_id:this.basketEntry.recipesIds[0]})}}P([y({type:Object})],f.prototype,"basketEntry");P([y({type:Array})],f.prototype,"recipeNames");P([y({type:String})],f.prototype,"analyticsPath");customElements.get("mealz-basket-preview-product")||customElements.define("mealz-basket-preview-product",f);/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
|
-
*/const{I:
|
|
112
|
+
*/const{I:K}=N,S=()=>document.createComment(""),w=(s,e,i)=>{var a;const r=s._$AA.parentNode,t=e===void 0?s._$AB:e._$AA;if(i===void 0){const n=r.insertBefore(S(),t),p=r.insertBefore(S(),t);i=new K(n,p,s,s.options)}else{const n=i._$AB.nextSibling,p=i._$AM,u=p!==s;if(u){let h;(a=i._$AQ)==null||a.call(i,s),i._$AM=s,i._$AP!==void 0&&(h=s._$AU)!==p._$AU&&i._$AP(h)}if(n!==t||u){let h=i._$AA;for(;h!==n;){const v=h.nextSibling;r.insertBefore(h,t),h=v}}}return i},z=(s,e,i=s)=>(s._$AI(e,i),s),Q={},W=(s,e=Q)=>s._$AH=e,J=s=>s._$AH,E=s=>{var r;(r=s._$AP)==null||r.call(s,!1,!0);let e=s._$AA;const i=s._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}};/**
|
|
113
113
|
* @license
|
|
114
114
|
* Copyright 2017 Google LLC
|
|
115
115
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
116
|
-
*/const
|
|
116
|
+
*/const T=(s,e,i)=>{const r=new Map;for(let t=e;t<=i;t++)r.set(s[t],t);return r},Y=D(class extends O{constructor(s){if(super(s),s.type!==q.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,e,i){let r;i===void 0?i=e:e!==void 0&&(r=e);const t=[],a=[];let n=0;for(const p of s)t[n]=r?r(p,n):n,a[n]=i(p,n),n++;return{values:a,keys:t}}render(s,e,i){return this.dt(s,e,i).values}update(s,[e,i,r]){const t=J(s),{values:a,keys:n}=this.dt(e,i,r);if(!Array.isArray(t))return this.ut=n,a;const p=this.ut??(this.ut=[]),u=[];let h,v,d=0,o=t.length-1,m=0,b=a.length-1;for(;d<=o&&m<=b;)if(t[d]===null)d++;else if(t[o]===null)o--;else if(p[d]===n[m])u[m]=z(t[d],a[m]),d++,m++;else if(p[o]===n[b])u[b]=z(t[o],a[b]),o--,b--;else if(p[d]===n[b])u[b]=z(t[d],a[b]),w(s,u[b+1],t[d]),d++,b--;else if(p[o]===n[m])u[m]=z(t[o],a[m]),w(s,t[d],t[o]),o--,m++;else if(h===void 0&&(h=T(n,m,b),v=T(p,d,o)),h.has(p[d]))if(h.has(p[o])){const k=v.get(n[m]),g=k!==void 0?t[k]:null;if(g===null){const R=w(s,t[d]);z(R,a[m]),u[m]=R}else u[m]=z(g,a[m]),w(s,t[d],g),t[k]=null;m++}else E(t[o]),o--;else E(t[d]),d++;for(;m<=b;){const k=w(s,u[b+1]);z(k,a[m]),u[m++]=k}for(;d<=o;){const k=t[d++];k!==null&&E(k)}return this.ut=n,W(s,u),U}}),I={isRecipeDetailsVisible:{paramName:"displayRecipe",getValue:()=>{var e;const s=c.recipes.displayedRecipe$.value;return((e=s==null?void 0:s.recipe)==null?void 0:e.id)||null},openDrawer:s=>{c.recipes.openDetails(s)}},isBasketPreviewVisible:{paramName:"myMeals",getValue:()=>{const{activeTabIndex:s}=c.basket.basketPreviewState$.getValue();return s===1?"products":"recipes"},openDrawer:s=>{c.basket.basketPreviewState$.next({isOpen:!0,activeTabIndex:s==="products"?1:0})}}};function Z(){return Object.values(I).map(s=>s.paramName)}function Ce(){const s=new URL(window.location.href);for(const e of Object.values(I)){const i=s.searchParams.get(e.paramName);if(i&&e.openDrawer){e.openDrawer(i);return}}}function Ae(s){s.subscribe(e=>{const i=new URL(window.location.href);Z().forEach(t=>{i.searchParams.delete(t)});const r=I[e];if(r){const t=r.getValue();t&&i.searchParams.set(r.paramName,t)}window.history.replaceState({},"",i.toString())})}function X(s){const e=new URL(window.location.href);e.searchParams.delete("myMeals"),s===0?e.searchParams.append("myMeals","recipes"):s===1&&e.searchParams.append("myMeals","products"),window.history.replaceState({},"",e.toString())}var ee=Object.defineProperty,te=(s,e,i,r)=>{for(var t=void 0,a=s.length-1,n;a>=0;a--)(n=s[a])&&(t=n(e,i,t)||t);return t&&ee(e,i,t),t};class B extends ${constructor(){super(),this.hideTabSelector=!1,this.priceService=C.getInstance(),this.subscriptions=[],this.recipePrices=[],this.recipePreviews=[],this.products=[],this.tabs=["Recettes","Produits"],this.selectedTabIndex=0,this.analyticsPath="/basket/recipes",this.drawerStoreIndicator=null,this.styleURL=new URL("./catalog/basket-preview/basket-preview.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.pageview(),this.listenToActiveTab(),this.listenToCloseEvent(),this.priceService.initFormatter(),this.noSupplier=c.supplier.isNoSupplier(),this.noSupplier&&this.appendStoreIndicatorToDrawerHeader(),this.subscriptions.push(x.basket.recipeCount().subscribe(e=>{this.recipesCount=e,this.requestUpdate()}),c.basket.entries$().pipe(L(200)).subscribe(e=>{this.products=e.filter(i=>i.attributes.status==="active"),this.updateRecipeView()}),c.productAddition.productAdded$.pipe(V(200)).subscribe(e=>{this.selectedTabIndex=1,setTimeout(()=>this.scrollToAddedProduct(e),0),this.requestUpdate()}),c.basket.recipePricesInBasket$().subscribe(e=>{this.recipePrices=e,this.requestUpdate()}))}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}updated(){this.drawerStoreIndicator&&this.drawerStoreIndicator.setAttribute("analyticsPath",this.analyticsPath)}render(){return l`
|
|
117
117
|
<div class="mealz-basket-preview">
|
|
118
118
|
${this.noSupplier?l`
|
|
119
119
|
<mealz-store-indicator .analyticsPath=${this.analyticsPath}></mealz-store-indicator>`:_}
|
|
120
120
|
${this.renderNbrMealsInBasket()}
|
|
121
|
-
${this.noSupplier||c.basket.displayProductsInBasket()?l`
|
|
121
|
+
${!this.hideTabSelector&&(this.noSupplier||c.basket.displayProductsInBasket())?l`
|
|
122
122
|
<div class="mealz-basket-preview__slider-tabs">
|
|
123
123
|
<mealz-slider-tabs
|
|
124
124
|
.tabs=${this.tabs}
|
|
@@ -139,7 +139,7 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
139
139
|
</div>
|
|
140
140
|
`:l`
|
|
141
141
|
<div class="mealz-basket-preview__products">
|
|
142
|
-
${
|
|
142
|
+
${Y(this.products,e=>e.id,(e,i)=>this.renderProductCard(e,i===this.products.length-1))}
|
|
143
143
|
</div>
|
|
144
144
|
`}renderProductCard(e,i=!1){if(e.selectedItem){const r=this.recipePreviews.reduce((t,a)=>(e.recipesIds.includes(+a.id)&&t.push(a.title),t),[]);return l`
|
|
145
145
|
<mealz-basket-preview-product
|
|
@@ -230,4 +230,4 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
230
230
|
panier
|
|
231
231
|
</h2>
|
|
232
232
|
</div>
|
|
233
|
-
`}appendStoreIndicatorToDrawerHeader(){const e=document.querySelector("mealz-drawer"),i=document.querySelector("mealz-store-indicator");if(!e||i)return;const r=e.getElementsByClassName("mealz-drawer__content-container")[0];r!=null&&r.querySelector("mealz-supplier-selector")||(this.drawerStoreIndicator=document.createElement("mealz-store-indicator"),this.drawerStoreIndicator.setAttribute("analyticsPath",this.analyticsPath),e.appendToHeaderComponent(this.drawerStoreIndicator))}placeOrder(){this.openBasketTransferModal(),c.basketTransfer.transfer()}openBasketTransferModal(){let e=document.querySelector("mealz-basket-transfer-modal");e||(e=document.createElement("mealz-basket-transfer-modal"),document.body.appendChild(e))}recipeCardClick(e){c.recipes.openDetails(e.id,e.guests,this.analyticsPath)}removeRecipeClick(e){e.isGettingRemoved=!0,this.requestUpdate(),c.basket.removeRecipe(e.id,this.analyticsPath).subscribe(()=>{e.isGettingRemoved=!1,this.recipePreviews=this.recipePreviews.filter(i=>i.id!==e.id),this.requestUpdate()})}updateTabIndex(e){this.selectedTabIndex=e,
|
|
233
|
+
`}appendStoreIndicatorToDrawerHeader(){const e=document.querySelector("mealz-drawer"),i=document.querySelector("mealz-store-indicator");if(!e||i)return;const r=e.getElementsByClassName("mealz-drawer__content-container")[0];r!=null&&r.querySelector("mealz-supplier-selector")||(this.drawerStoreIndicator=document.createElement("mealz-store-indicator"),this.drawerStoreIndicator.setAttribute("analyticsPath",this.analyticsPath),e.appendToHeaderComponent(this.drawerStoreIndicator))}placeOrder(){this.openBasketTransferModal(),c.basketTransfer.transfer()}openBasketTransferModal(){let e=document.querySelector("mealz-basket-transfer-modal");e||(e=document.createElement("mealz-basket-transfer-modal"),document.body.appendChild(e))}recipeCardClick(e){c.recipes.openDetails(e.id,e.guests,this.analyticsPath)}removeRecipeClick(e){e.isGettingRemoved=!0,this.requestUpdate(),c.basket.removeRecipe(e.id,this.analyticsPath).subscribe(()=>{e.isGettingRemoved=!1,this.recipePreviews=this.recipePreviews.filter(i=>i.id!==e.id),this.requestUpdate()})}updateTabIndex(e){this.selectedTabIndex=e,X(e),this.selectedTabIndex===0?(this.analyticsPath="/basket/recipes",this.pageview()):(this.analyticsPath="/basket/products",this.pageview()),this.requestUpdate()}updateRecipeView(){const e=c.basket,i=e.buildPreview(),r=typeof e.waitForBasketEntries=="function"?e.waitForBasketEntries().pipe(F(()=>i)):i;this.subscriptions.push(r.subscribe(t=>{t.map(a=>a.isGettingRemoved=!1),this.recipePreviews=t,this.requestUpdate()}))}scrollToAddedProduct(e){var r;const i=document.querySelector(`#mealz-basket-preview-product-${e}`);if(i)i.scrollIntoView({block:"center",behavior:"smooth"});else{const t=this.getElementsByTagName("MEALZ-BASKET-PREVIEW-PRODUCT");(r=t.item(t.length-1))==null||r.scrollIntoView({block:"center",behavior:"smooth"})}}listenToActiveTab(){this.subscriptions.push(c.basket.basketPreviewState$.subscribe(({activeTabIndex:e})=>{e!==void 0&&(this.selectedTabIndex=e)}))}listenToCloseEvent(){const e=document.querySelector("mealz-drawer");e&&e.addEventListener("drawerClosed",this.sendCloseEvent.bind(this))}isHidden(){return this.classList.contains("hidden")}pageview(){this.isHidden()||c.analytics.sendEvent("pageview",this.analyticsPath,{})}sendCloseEvent(){this.isHidden()||c.analytics.sendEvent("basket.close",this.analyticsPath,{})}}te([y({type:Boolean,attribute:"hide-tab-selector"})],B.prototype,"hideTabSelector");customElements.get("mealz-basket-preview")||customElements.define("mealz-basket-preview",B);export{Ae as l,Ce as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as h}from"../catalog-load-more.min.js";import{h as m}from"../../assets/session-handler-
|
|
1
|
+
import{C as h}from"../catalog-load-more.min.js";import{h as m}from"../../assets/session-handler-D-8RsM2Q.js";import{w as g,m as a}from"../../assets/mealz-sdk-CnvUgy3V.js";import"../../assets/no-shadow-element-CXVMZH9n.js";import"../../assets/http-Cm33xl_Z.js";import"../../assets/innerFrom-BldbX_fT.js";import"../../assets/mergeMap-C1wxIFhz.js";import"../../assets/map-ND1NsJPC.js";import"../../assets/OperatorSubscriber-CvNNPrIM.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/mapOneOrManyArgs-BPsgfFRx.js";import"../../assets/async-M7ziFu3t.js";import"../../assets/timer-W1DT7NsX.js";import"../../assets/isScheduler-fbUJB_yC.js";import"../../assets/isDate-BwHtzZM4.js";class u extends h{constructor(){super(...arguments),this.retryCount=0,this.maxRetries=30}connectedCallback(){super.connectedCallback(),g().then(()=>{var e,t;(t=(e=a)==null?void 0:e.preferences)!=null&&t.preferencesChanged$&&this.subscriptions.push(a.preferences.preferencesChanged$().subscribe(()=>this.reloadPage()))}).catch(e=>{console.warn("Failed to initialize preferences subscription:",e)})}disconnectedCallback(){super.disconnectedCallback()}render(){var s;const e=(s=this.attributes["starting-data"])==null?void 0:s.value;if(!e||(this.recipeCardListHTML=this.querySelector(".mealz-catalog__list"),!this.recipeCardListHTML))return;const{batchSize:t,packageId:r,posId:o,loadMoreURL:n,displayRecipeVariant:c,search:l,sessionId:i,path:p}=JSON.parse(e);m(i),this.analyticsPath=p;const d=window.location.search.includes("from=header");this.sendPageViewEvent(d),this.loadMoreRecipesOnScroll({displayRecipeVariant:c,loadMoreURL:n,sessionId:i,pageSize:t,storeId:o,packageId:r,search:l,listHTML:this.recipeCardListHTML}),this.removeAttribute("starting-data")}reloadPage(){location.reload()}sendPageViewEvent(e=!1){a?(a.analytics.sendEvent("pageview",this.analyticsPath,{},e?"meals-space-header":void 0),this.retryCount=0):this.retryCount<this.maxRetries&&(this.retryCount++,setTimeout(()=>this.sendPageViewEvent(e),10))}}customElements.get("mealz-catalog-category")||customElements.define("mealz-catalog-category",u);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as p}from"../catalog-load-more.min.js";import{h as m}from"../../assets/session-handler-
|
|
1
|
+
import{C as p}from"../catalog-load-more.min.js";import{h as m}from"../../assets/session-handler-D-8RsM2Q.js";import{m as s}from"../../assets/mealz-sdk-CnvUgy3V.js";import{s as g}from"../../assets/skip-4iqvFhkz.js";import"../../assets/no-shadow-element-CXVMZH9n.js";import"../../assets/http-Cm33xl_Z.js";import"../../assets/innerFrom-BldbX_fT.js";import"../../assets/mergeMap-C1wxIFhz.js";import"../../assets/map-ND1NsJPC.js";import"../../assets/OperatorSubscriber-CvNNPrIM.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/mapOneOrManyArgs-BPsgfFRx.js";import"../../assets/async-M7ziFu3t.js";import"../../assets/timer-W1DT7NsX.js";import"../../assets/isScheduler-fbUJB_yC.js";import"../../assets/isDate-BwHtzZM4.js";import"../../assets/filter-aZV_N5pj.js";class h extends p{constructor(){super(...arguments),this.retryCount=0,this.maxRetries=30}connectedCallback(){super.connectedCallback(),this.subscriptions.push(s.user.isAuthenticated().pipe(g(1)).subscribe(e=>{this.isLogged=e,this.updateDOM()}),this.handleLikedRecipe())}disconnectedCallback(){super.disconnectedCallback()}render(){var o;const e=(o=this.attributes["starting-data"])==null?void 0:o.value;if(!e)return;const{pageSize:t,storeId:i,loadMoreURL:l,displayRecipeVariant:n,search:c,sessionId:a,path:d}=JSON.parse(e);if(this.analyticsPath=d,this.sendPageViewEvent(),this.favorites=this.querySelector(".mealz-catalog-favorites__list"),!this.favorites)return;const r=this.querySelector(".mealz-catalog__list");r&&(m(a),this.loadMoreRecipesOnScroll({displayRecipeVariant:n,loadMoreURL:l,sessionId:a,pageSize:t,storeId:i,packageId:null,search:c,listHTML:r}),this.removeAttribute("starting-data"))}updateDOM(){const e=this.querySelector(".mealz-catalog-favorites__list__not-logged"),t=this.querySelector(".mealz-catalog-favorites__list__logged");!e||!t||(e.classList.toggle("hidden",this.isLogged),t.classList.toggle("hidden",!this.isLogged))}sendPageViewEvent(){var e;s?((e=s.analytics)==null||e.sendEvent("pageview",this.analyticsPath,{}),this.retryCount=0):this.retryCount<this.maxRetries&&(this.retryCount++,setTimeout(()=>this.sendPageViewEvent(),10))}handleLikedRecipe(){return s.recipes.recipeLikeUpdated().subscribe(({id:e,isPast:t})=>{const i=document.getElementById("mealz-recipe-card-"+e);i&&i.classList.toggle("hidden",t),this.requestUpdate()})}}customElements.get("mealz-catalog-favorites")||customElements.define("mealz-catalog-favorites",h);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as d}from"../catalog-load-more.min.js";import{h as y}from"../../assets/session-handler-
|
|
1
|
+
import{C as d}from"../catalog-load-more.min.js";import{h as y}from"../../assets/session-handler-D-8RsM2Q.js";import{m as n}from"../../assets/mealz-sdk-CnvUgy3V.js";import"../../assets/no-shadow-element-CXVMZH9n.js";import"../../assets/http-Cm33xl_Z.js";import"../../assets/innerFrom-BldbX_fT.js";import"../../assets/mergeMap-C1wxIFhz.js";import"../../assets/map-ND1NsJPC.js";import"../../assets/OperatorSubscriber-CvNNPrIM.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/mapOneOrManyArgs-BPsgfFRx.js";import"../../assets/async-M7ziFu3t.js";import"../../assets/timer-W1DT7NsX.js";import"../../assets/isScheduler-fbUJB_yC.js";import"../../assets/isDate-BwHtzZM4.js";class c extends d{constructor(){super(),this.retryCount=0,this.maxRetries=30,this.isHandlingHistory=!1,this.styleURL=new URL("./catalog/catalog-history/catalog-history.css",this.getBaseURL()),this.handleHistoryDrawer=this.handleHistoryDrawer.bind(this)}connectedCallback(){super.connectedCallback();const t=this.getAttribute("starting-data");if(!t)return;const{loadMoreURL:e,drawerDataURL:s,sessionId:i,pageSize:r,storeId:a,orders:o,path:h,historyStyle:l}=JSON.parse(t);this.historyDrawerData=JSON.stringify({storeId:a,sessionId:i,drawerDataURL:s}),this.loadMoreURL=e,this.sessionId=i,this.pageSize=r,this.storeId=a,this.orders=o,this.analyticsPath=h,this.historyStyle=l,y(this.sessionId),this.removeAttribute("starting-data"),this.sendPageViewEvent(),this.initURLListener(),this.handleHistoryDrawer()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this.handleHistoryDrawer)}render(){const t=this.querySelector(".mealz-catalog__list");t&&(this.historyOrderListHTML=t,this.loadMoreRecipesOnScroll({displayRecipeVariant:"",loadMoreURL:this.loadMoreURL,sessionId:this.sessionId,pageSize:+this.pageSize,storeId:this.storeId,packageId:void 0,search:"",listHTML:this.historyOrderListHTML,historyStyle:this.historyStyle}))}handleHistoryDrawer(){if(!this.isHandlingHistory){this.isHandlingHistory=!0;try{const t=new URL(window.location.href),e=t.searchParams.get("order"),s=t.searchParams.get("displayRecipe");if(!e||!this.orders||s)return;const i=document.querySelector("mealz-drawer-view-swapper"),r=this.orders.find(o=>o.id===e),a=(r==null?void 0:r.updatedAt)||"";i&&i.displayHistoryDrawer$.next({historyDrawerData:this.historyDrawerData,orderId:e,orderDate:a})}finally{setTimeout(()=>{this.isHandlingHistory=!1},0)}}}initURLListener(){window.addEventListener("popstate",this.handleHistoryDrawer);const t=history.pushState,e=history.replaceState;history.pushState=(...s)=>{t.apply(history,s),this.handleHistoryDrawer()},history.replaceState=(...s)=>{e.apply(history,s),this.handleHistoryDrawer()}}sendPageViewEvent(){n?(n.analytics.sendEvent("pageview",this.analyticsPath,{}),this.retryCount=0):this.retryCount<this.maxRetries&&(this.retryCount++,setTimeout(()=>this.sendPageViewEvent(),10))}}customElements.get("mealz-catalog-history")||customElements.define("mealz-catalog-history",c);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as n}from"../../assets/session-handler-
|
|
1
|
+
import{h as n}from"../../assets/session-handler-D-8RsM2Q.js";import{N as o}from"../../assets/no-shadow-element-CXVMZH9n.js";import{V as c}from"../../assets/viewport-listener-khw7cTjd.js";import{w as h,m as s}from"../../assets/mealz-sdk-CnvUgy3V.js";import"../../assets/debounceTime-BeLayHXh.js";import"../../assets/async-M7ziFu3t.js";import"../../assets/OperatorSubscriber-CvNNPrIM.js";class l extends o{constructor(){super(...arguments),this.categories=[],this.viewportListeners=[],this.subscriptions=[],this.retryCount=0,this.maxRetries=30}connectedCallback(){super.connectedCallback(),h().then(()=>{var e,t;(t=(e=s)==null?void 0:e.preferences)!=null&&t.preferencesChanged$&&this.subscriptions.push(s.preferences.preferencesChanged$().subscribe(()=>this.reloadPage()))}).catch(e=>{console.warn("Failed to initialize preferences subscription:",e)})}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe()),this.viewportListeners.forEach(e=>e.disconnect()),this.viewportListeners=[]}render(){var r;const e=(r=this.attributes["starting-data"])==null?void 0:r.value;if(!e)return;const{categories:t,path:a,sessionId:i}=JSON.parse(e);n(i),this.analyticsPath=a,this.categories=t,this.sendPageViewEvent(),this.addEventListeners(),this.listenCategoriesInView(),this.removeAttribute("starting-data")}addEventListeners(){Array.from(this.getElementsByClassName("mealz-catalog__link")).forEach((t,a)=>{t==null||t.addEventListener("click",()=>this.sendCategoryDisplay(a))})}listenCategoriesInView(){Array.from(this.getElementsByClassName("mealz-catalog-home__category")).forEach((t,a)=>{const i=new c(t,()=>this.sendCategoryShow(a),{threshold:.8,debounce:1e3});this.viewportListeners.push(i)})}reloadPage(){location.reload()}sendPageViewEvent(){s?(s.analytics.sendEvent("pageview",this.analyticsPath,{}),this.retryCount=0):this.retryCount<this.maxRetries&&(this.retryCount++,setTimeout(()=>this.sendPageViewEvent(),10))}sendCategoryDisplay(e){var t;s.analytics.sendEvent("category.display",this.analyticsPath,{category_id:(t=this.categories[Math.floor(e/2)])==null?void 0:t.id})}sendCategoryShow(e){var t;s.analytics.sendEvent("category.show",this.analyticsPath,{category_id:(t=this.categories[e])==null?void 0:t.id})}}customElements.get("mealz-catalog-home")||customElements.define("mealz-catalog-home",l);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as n}from"../../assets/no-shadow-element-
|
|
1
|
+
import{N as n}from"../../assets/no-shadow-element-CXVMZH9n.js";import{m as r}from"../../assets/mealz-sdk-CnvUgy3V.js";class o extends n{constructor(){super(...arguments),this.categoryId="",this.analyticsPath=""}render(){var e;const t=(e=this.attributes["starting-data"])==null?void 0:e.value;if(!t)return;const{categoryId:a,path:s}=JSON.parse(t);this.categoryId=a,this.analyticsPath=s,this.addBannerButtonListener(),this.removeAttribute("starting-data")}addBannerButtonListener(){const t=this.querySelector(".mealz-catalog-home-header__banner-button");t&&t.addEventListener("click",()=>{this.sendCategoryDisplayEvent()})}sendCategoryDisplayEvent(){r.analytics.sendEvent("category.display",this.analyticsPath,{category_id:this.categoryId},"meals-space-header")}}customElements.get("mealz-catalog-home-header")||customElements.define("mealz-catalog-home-header",o);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as a}from"../catalog-load-more.min.js";import{h as n}from"../../assets/session-handler-
|
|
1
|
+
import{C as a}from"../catalog-load-more.min.js";import{h as n}from"../../assets/session-handler-D-8RsM2Q.js";import{w as l,m as s}from"../../assets/mealz-sdk-CnvUgy3V.js";import"../../assets/no-shadow-element-CXVMZH9n.js";import"../../assets/http-Cm33xl_Z.js";import"../../assets/innerFrom-BldbX_fT.js";import"../../assets/mergeMap-C1wxIFhz.js";import"../../assets/map-ND1NsJPC.js";import"../../assets/OperatorSubscriber-CvNNPrIM.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/mapOneOrManyArgs-BPsgfFRx.js";import"../../assets/async-M7ziFu3t.js";import"../../assets/timer-W1DT7NsX.js";import"../../assets/isScheduler-fbUJB_yC.js";import"../../assets/isDate-BwHtzZM4.js";class p extends a{constructor(){super(...arguments),this.planner=!1,this.recipeTypeFilter=!1}connectedCallback(){super.connectedCallback(),l().then(()=>{var e,t;(t=(e=s)==null?void 0:e.preferences)!=null&&t.preferencesChanged$&&this.subscriptions.push(s.preferences.preferencesChanged$().subscribe(()=>this.reloadPage()))}).catch(e=>{console.warn("Failed to initialize preferences subscription:",e)})}disconnectedCallback(){super.disconnectedCallback()}render(){const e=this.getStartingData();if(!e||!this.initializeRecipeCardListElement())return;const t=this.parseStartingData(e);t&&this.validateAndHandleSession(t.sessionId)&&(this.setFilterFlags(t.planner,t.recipeTypeFilter,t.recipeTypeId),this.initDishTypeFilter(),this.initializeCatalog(t),this.removeAttribute("starting-data"))}getStartingData(){return this.getAttribute("starting-data")}initializeRecipeCardListElement(){const e=this.querySelector(".mealz-catalog__list");return e?(this.recipeCardListHTML=e,!0):!1}parseStartingData(e){try{return JSON.parse(e)}catch(t){return console.warn("Invalid catalog list starting-data:",t),null}}validateAndHandleSession(e){return e?(n(e),!0):!1}setFilterFlags(e,t,i){this.planner=e===!0||e==="true",this.recipeTypeFilter=t===!0||t==="true",this.recipeTypeId=i||void 0}initializeCatalog(e){this.loadMoreRecipesOnScroll({displayRecipeVariant:e.displayRecipeVariant,loadMoreURL:e.loadMoreURL,sessionId:e.sessionId,pageSize:e.pageSize,storeId:e.storeId,search:e.search,listHTML:this.recipeCardListHTML,promotions:e.promotions,planner:this.planner,recipeTypeFilter:this.recipeTypeFilter,recipeTypeId:e.recipeTypeId})}initDishTypeFilter(){const e=this.getDishTypeFilterChips();!e||e.length===0||(this.applyActiveStateToChips(e,this.recipeTypeId),this.attachChipClickHandlers(e))}getDishTypeFilterChips(){const e=this.querySelector(".mealz-catalog-list__dish-type-filter");return!e||!this.recipeTypeFilter?null:Array.from(e.querySelectorAll(".mealz-catalog-list__dish-type-filter__chip"))}applyActiveStateToChips(e,t){e.forEach(i=>{const r=(i.getAttribute("data-recipe-type-id")||"")===(t||"");i.classList.toggle("active",r),i.setAttribute("aria-selected",r?"true":"false")})}attachChipClickHandlers(e){e.forEach(t=>{t.addEventListener("click",()=>this.handleDishTypeChipClick(t,e),{passive:!0})})}handleDishTypeChipClick(e,t){const i=e.getAttribute("data-recipe-type-id")||"";i!==(this.recipeTypeId||"")&&(this.recipeTypeId=i||void 0,this.applyActiveStateToChips(t,this.recipeTypeId),this.showLoader(),this.planner?this.handlePlannerDishTypeChange(i):this.handleNonPlannerDishTypeChange())}showLoader(){const e=this.querySelector(".mealz-ds-loader");e&&(e.style.display="block")}handlePlannerDishTypeChange(e){const t=new CustomEvent("dishTypeEvent",{detail:{mealType:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}handleNonPlannerDishTypeChange(){const e=new URL(window.location.href);this.recipeTypeId?e.searchParams.set("recipe_type_id",this.recipeTypeId):e.searchParams.delete("recipe_type_id"),window.location.href=e.toString()}reloadPage(){location.reload()}}customElements.get("mealz-catalog-list")||customElements.define("mealz-catalog-list",p);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as R,O as T,i as h,N as _}from"../assets/no-shadow-element-
|
|
1
|
+
import{c as R,O as T,i as h,N as _}from"../assets/no-shadow-element-CXVMZH9n.js";import{b as S}from"../assets/http-Cm33xl_Z.js";import{a as C,i as b}from"../assets/innerFrom-BldbX_fT.js";import{m as H}from"../assets/mergeMap-C1wxIFhz.js";import{m as k}from"../assets/mapOneOrManyArgs-BPsgfFRx.js";import{a as O}from"../assets/async-M7ziFu3t.js";import{o as z,c as y}from"../assets/OperatorSubscriber-CvNNPrIM.js";import{t as I}from"../assets/timer-W1DT7NsX.js";import"../assets/mealz-sdk-CnvUgy3V.js";import"../assets/map-ND1NsJPC.js";import"../assets/executeSchedule-CEDvgTzM.js";import"../assets/isScheduler-fbUJB_yC.js";import"../assets/isDate-BwHtzZM4.js";var x=["addListener","removeListener"],V=["addEventListener","removeEventListener"],D=["on","off"];function E(i,e,t,r){if(h(t)&&(r=t,t=void 0),r)return E(i,e,t).pipe(k(r));var u=R(G(i)?V.map(function(s){return function(c){return i[s](e,c,t)}}):q(i)?x.map(M(i,e)):A(i)?D.map(M(i,e)):[],2),p=u[0],f=u[1];if(!p&&C(i))return H(function(s){return E(s,e,t)})(b(i));if(!p)throw new TypeError("Invalid event target");return new T(function(s){var c=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return s.next(1<a.length?a:a[0])};return p(c),function(){return f(c)}})}function M(i,e){return function(t){return function(r){return i[t](e,r)}}}function q(i){return h(i.addListener)&&h(i.removeListener)}function A(i){return h(i.on)&&h(i.off)}function G(i){return h(i.addEventListener)&&h(i.removeEventListener)}function F(i,e){return z(function(t,r){var u=e??{},p=u.leading,f=p===void 0?!0:p,s=u.trailing,c=s===void 0?!1:s,a=!1,l=null,o=null,m=!1,g=function(){o==null||o.unsubscribe(),o=null,c&&(v(),m&&r.complete())},L=function(){o=null,m&&r.complete()},n=function(d){return o=b(i(d)).subscribe(y(r,g,L))},v=function(){if(a){a=!1;var d=l;l=null,r.next(d),!m&&n(d)}};t.subscribe(y(r,function(d){a=!0,l=d,!(o&&!o.closed)&&(f?v():n(d))},function(){m=!0,!(c&&a&&o&&!o.closed)&&r.complete()}))})}function $(i,e,t){e===void 0&&(e=O);var r=I(i,e);return F(function(){return r},t)}const j=300;class re extends _{constructor(){super(...arguments),this.noMoreData=!1,this.isLoading=!1,this.page=2,this.loaderElement=null,this.subscriptions=[]}connectedCallback(){super.connectedCallback(),this.createLoader()}disconnectedCallback(){super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe()),this.removeLoader()}loadMoreRecipesOnScroll(e){this.addScrollListener(window,()=>{this.isListVisible(e.listHTML)&&this.shouldGetMoreRecipes(window.scrollY,window.innerHeight,document.body.offsetHeight)&&this.getMoreRecipes(e)});const t=document.querySelector(".mealz-drawer__content-container");t&&this.addScrollListener(t,()=>{this.isListVisible(e.listHTML)&&this.shouldGetMoreRecipes(t.scrollTop,t.clientHeight,t.scrollHeight)&&this.getMoreRecipes(e)})}addScrollListener(e,t){const r=E(e,"scroll").pipe($(100));this.subscriptions.push(r.subscribe(t))}isListVisible(e){return!!(e.offsetParent||e.getClientRects().length)}shouldGetMoreRecipes(e,t,r){return!this.noMoreData&&!this.isLoading&&e+t+j>=r}async getMoreRecipes(e){const{displayRecipeVariant:t,loadMoreURL:r,sessionId:u,pageSize:p,storeId:f,packageId:s,search:c,listHTML:a,promotions:l,planner:o,recipeTypeFilter:m,historyStyle:g,recipeTypeId:L}=e;this.isLoading=!0,this.toggleLoader(!0);const n=new URLSearchParams;n.append("size",p.toString()),n.append("page",this.page.toString()),t&&n.append("display_recipe_variant",t),s&&n.append("category_id",s),f&&n.append("store_id",f),c&&n.append("search",c),l&&n.append("promotions",l.toString()),o&&n.append("planner","true"),m&&n.append("recipe_type_filter","true"),g&&n.append("history_style",g),L&&n.append("recipe_type_id",L);try{const v=r.includes("?")?"&":"?",d=await fetch(r+v+n.toString(),{method:"GET",headers:S(u)});if(!d.ok)throw new Error(`Load more request failed with status: ${d.status}`);const w=await d.text();this.appendRecipesToList(w,a,p)}catch(v){console.error(v),this.isLoading=!1}}appendRecipesToList(e,t,r){this.checkIfMoreRecipes(e,r),t.insertAdjacentHTML("beforeend",e),this.isLoading=!1,this.toggleLoader(!1),this.page++}checkIfMoreRecipes(e,t){const r=e.match(/<mealz-recipe-card(?=\s|>)/gi)||e.match(/<mealz-history-order(?=\s|>)/gi)||e.match(/<mealz-history-order-expanded(?=\s|>)/gi);(r?r.length:0)<t&&(this.noMoreData=!0)}createLoader(){const e=this.querySelector(".mealz-catalog__content");!this.loaderElement&&e&&(this.loaderElement=document.createElement("div"),this.loaderElement.className="mealz-ds-loader",this.loaderElement.style.display="none",e.appendChild(this.loaderElement))}removeLoader(){this.loaderElement&&this.loaderElement.parentElement&&(this.loaderElement.parentElement.removeChild(this.loaderElement),this.loaderElement=null)}toggleLoader(e){this.loaderElement&&(this.loaderElement.style.display=e?"block":"none")}}export{re as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e}from"../../assets/no-shadow-element-
|
|
1
|
+
import{N as e}from"../../assets/no-shadow-element-CXVMZH9n.js";import"../../assets/mealz-sdk-CnvUgy3V.js";class a extends e{connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}render(){}}customElements.get("mealz-catalog-tabs")||customElements.define("mealz-catalog-tabs",a);
|