mealz-components 2.8.2 → 2.9.0
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-CvNNPrIM.js → OperatorSubscriber-BF1r9b3N.js} +1 -1
- package/dist/assets/{accordion-tsgdqQeQ.js → accordion-Ds4UMuL5.js} +1 -1
- package/dist/assets/{args-upHwW4Wh.js → args-DPeCFqiB.js} +1 -1
- package/dist/assets/{async-M7ziFu3t.js → async-Buq9Zuro.js} +1 -1
- package/dist/assets/{combineLatest-BB01Px-W.js → combineLatest-CRVESsJM.js} +1 -1
- package/dist/assets/{debounceTime-BeLayHXh.js → debounceTime-D6W3esj0.js} +1 -1
- package/dist/assets/delay-CUcLbxeL.js +1 -0
- package/dist/assets/{distinctUntilChanged-6bjT4iYO.js → distinctUntilChanged-FtASLz6t.js} +1 -1
- package/dist/assets/empty--gMS1asf.js +1 -0
- package/dist/assets/{filter-aZV_N5pj.js → filter-Dq4X88HC.js} +1 -1
- package/dist/assets/{firstValueFrom-CyoZXDwo.js → firstValueFrom-CMUHI5hL.js} +1 -1
- package/dist/assets/{from-uSPfq2sN.js → from-BxJrdzJs.js} +1 -1
- package/dist/assets/{guestObserver-PPbBwlOO.js → guestObserver-CSQi-6i9.js} +1 -1
- package/dist/assets/{http-Cm33xl_Z.js → http-B0u4sOhM.js} +1 -1
- package/dist/assets/{innerFrom-BldbX_fT.js → innerFrom-BZ8nxpLv.js} +1 -1
- package/dist/assets/isScheduler-B3orCs5Q.js +1 -0
- package/dist/assets/{map-ND1NsJPC.js → map-DdvZijlE.js} +1 -1
- package/dist/assets/mapOneOrManyArgs-BpqqmasF.js +1 -0
- package/dist/assets/{mealz-sdk-CnvUgy3V.js → mealz-sdk-CQtAGQGQ.js} +1 -1
- package/dist/assets/merge-rdVI6Z3B.js +1 -0
- package/dist/assets/mergeAll-BJfNWPb7.js +1 -0
- package/dist/assets/{mergeMap-C1wxIFhz.js → mergeMap-CObP_yRz.js} +1 -1
- package/dist/assets/{no-shadow-element-CXVMZH9n.js → no-shadow-element-DZc32M1D.js} +2 -2
- package/dist/assets/of-R1iMbYYX.js +1 -0
- package/dist/assets/{price-CTfOOyf1.js → price-Bfy_G-uC.js} +1 -1
- package/dist/assets/{product-card-ryOzsvSF.js → product-card-CcfAgVi3.js} +1 -1
- package/dist/assets/{promotion-badge-D63kIgUZ.js → promotion-badge-BusnHgIb.js} +1 -1
- package/dist/assets/{property-BXpY_hgs.js → property-CrS1c6lI.js} +1 -1
- package/dist/assets/{session-handler-D-8RsM2Q.js → session-handler-BJzEuN1g.js} +1 -1
- package/dist/assets/skip-CIS-pyI4.js +1 -0
- package/dist/assets/{skipWhile-DK5WsIpo.js → skipWhile-BrGaejAE.js} +1 -1
- package/dist/assets/{state-BjFDUoQX.js → state-1qy1JPQz.js} +1 -1
- package/dist/assets/{switchMap-DC1sJvd8.js → switchMap-C79NTzdm.js} +1 -1
- package/dist/assets/{take-BgFJXP4B.js → take-B0yyxfMB.js} +1 -1
- package/dist/assets/{tap-DT80gG87.js → tap-D0fB7oij.js} +1 -1
- package/dist/assets/{timer-W1DT7NsX.js → timer-CGijW-Af.js} +1 -1
- package/dist/assets/{unsafe-html-LLTnDXid.js → unsafe-html-DTarpZaV.js} +1 -1
- package/dist/assets/{viewport-listener-khw7cTjd.js → viewport-listener-073Dyp25.js} +1 -1
- package/dist/basket-transfer-modal/basket-transfer-modal.min.js +1 -1
- package/dist/catalog/_helpers/init-basket-preview-drawer.min.js +1 -1
- package/dist/catalog/basket-preview/basket-preview.min.js +15 -11
- 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.css +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.css +1 -1
- package/dist/drawer/drawer.min.js +1 -1
- package/dist/drawer-view-swapper/drawer-view-swapper.min.js +13 -13
- 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.css +1 -1
- package/dist/modal/modal.min.js +1 -1
- package/dist/no-supplier-add-to-cart-cta/no-supplier-add-to-cart-cta.min.js +2 -2
- 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/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.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 +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.min.js +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 +1 -1
- 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 +11 -3
- 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 +2 -2
- package/dist/store-locator/store-locator.min.js +1 -1
- package/dist/store-locator-drawer/store-locator-drawer.min.js +2 -2
- package/dist/supplier-selector/supplier-selector.min.js +11 -11
- package/package.json +1 -1
- package/dist/assets/delay-DJoNbXpK.js +0 -1
- package/dist/assets/empty-Dy0Wgz_B.js +0 -1
- package/dist/assets/isScheduler-fbUJB_yC.js +0 -1
- package/dist/assets/mapOneOrManyArgs-BPsgfFRx.js +0 -1
- package/dist/assets/merge-B0ddcNYl.js +0 -1
- package/dist/assets/mergeAll-BvxRfNLo.js +0 -1
- package/dist/assets/of-D0UErknW.js +0 -1
- package/dist/assets/skip-4iqvFhkz.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-DZc32M1D.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-DZc32M1D.js";import{n as i}from"./property-CrS1c6lI.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-DZc32M1D.js";import{i as t}from"./isScheduler-B3orCs5Q.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-DZc32M1D.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-DZc32M1D.js";import{f as v}from"./from-BxJrdzJs.js";import{m as b}from"./mapOneOrManyArgs-BpqqmasF.js";import{p as h,b as A}from"./args-DPeCFqiB.js";import{c as S}from"./OperatorSubscriber-BF1r9b3N.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-Buq9Zuro.js";import{o as m,c as v}from"./OperatorSubscriber-BF1r9b3N.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-Buq9Zuro.js";import{t as m}from"./take-B0yyxfMB.js";import{m as a}from"./map-DdvZijlE.js";import{m as e}from"./mergeMap-CObP_yRz.js";import{i as f}from"./innerFrom-BZ8nxpLv.js";import{t as p}from"./timer-CGijW-Af.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-DZc32M1D.js";import{o,c as a}from"./OperatorSubscriber-BF1r9b3N.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-DZc32M1D.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-BF1r9b3N.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-DZc32M1D.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-BZ8nxpLv.js";import{e as a}from"./executeSchedule-CEDvgTzM.js";import{o as l,c as y}from"./OperatorSubscriber-BF1r9b3N.js";import{O as i,i as g}from"./no-shadow-element-DZc32M1D.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-DZc32M1D.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-CQtAGQGQ.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-DZc32M1D.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-DZc32M1D.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-BF1r9b3N.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-DZc32M1D.js";import{m as o}from"./map-DdvZijlE.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&&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};
|
|
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,l as g,i,w as m,d as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as t}from"./mergeAll-BJfNWPb7.js";import{i as n}from"./innerFrom-BZ8nxpLv.js";import{E as s}from"./empty--gMS1asf.js";import{p,a as f}from"./args-DPeCFqiB.js";import{f as u}from"./from-BxJrdzJs.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-CObP_yRz.js";import{t}from"./no-shadow-element-DZc32M1D.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-DdvZijlE.js";import{i as x}from"./innerFrom-BZ8nxpLv.js";import{c as h,o as F}from"./OperatorSubscriber-BF1r9b3N.js";import"./executeSchedule-CEDvgTzM.js";import{i as I}from"./no-shadow-element-DZc32M1D.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as rt}from"./mealz-sdk-
|
|
1
|
+
import{m as rt}from"./mealz-sdk-CQtAGQGQ.js";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -18,4 +18,4 @@ import{m as rt}from"./mealz-sdk-CnvUgy3V.js";/**
|
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
19
|
*/class U extends A{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=Jt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return E}}var _t;U._$litElement$=!0,U.finalized=!0,(_t=globalThis.litElementHydrateSupport)==null||_t.call(globalThis,{LitElement:U});const W=globalThis.litElementPolyfillSupport;W==null||W({LitElement:U});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");var G=function(n,t){return G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},G(n,t)};function k(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");G(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ye(n,t,e,r){function i(s){return s instanceof e?s:new e(function(o){o(s)})}return new(e||(e=Promise))(function(s,o){function c(f){try{l(r.next(f))}catch(u){o(u)}}function a(f){try{l(r.throw(f))}catch(u){o(u)}}function l(f){f.done?s(f.value):i(f.value).then(c,a)}l((r=r.apply(n,t||[])).next())})}function ve(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(l){return function(f){return a([l,f])}}function a(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(e=0)),e;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(n,e)}catch(f){l=[6,f],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function M(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function K(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(o)throw o.error}}return s}function Z(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))}function J(n){return this instanceof J?(this.v=n,this):new J(n)}function be(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),c("next"),c("throw"),c("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(h){return function(v){return Promise.resolve(v).then(h,u)}}function c(h,v){r[h]&&(i[h]=function(y){return new Promise(function(Ut,Tt){s.push([h,y,Ut,Tt])>1||a(h,y)})},v&&(i[h]=v(i[h])))}function a(h,v){try{l(r[h](v))}catch(y){d(s[0][3],y)}}function l(h){h.value instanceof J?Promise.resolve(h.value.v).then(f,u):d(s[0][2],h)}function f(h){a("next",h)}function u(h){a("throw",h)}function d(h,v){h(v),s.shift(),s.length&&a(s[0][0],s[0][1])}}function _e(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof M=="function"?M(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(s){e[s]=n[s]&&function(o){return new Promise(function(c,a){o=n[s](o),i(c,a,o.done,o.value)})}}function i(s,o,c,a){Promise.resolve(a).then(function(l){s({value:l,done:c})},o)}}function b(n){return typeof n=="function"}function wt(n){var t=function(r){Error.call(r),r.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var F=wt(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
20
20
|
`+e.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
21
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function Q(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var B=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var c=M(o),a=c.next();!a.done;a=c.next()){var l=a.value;l.remove(this)}}catch(y){t={error:y}}finally{try{a&&!a.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(b(f))try{f()}catch(y){s=y instanceof F?y.errors:[y]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=M(u),h=d.next();!h.done;h=d.next()){var v=h.value;try{pt(v)}catch(y){s=s??[],y instanceof F?s=Z(Z([],K(s)),K(y.errors)):s.push(y)}}}catch(y){r={error:y}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(s)throw new F(s)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)pt(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Q(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&Q(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),xt=B.EMPTY;function Pt(n){return n instanceof B||n&&"closed"in n&&b(n.remove)&&b(n.add)&&b(n.unsubscribe)}function pt(n){b(n)?n():n.unsubscribe()}var Qt={Promise:void 0},Xt={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,Z([n,t],K(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function te(n){Xt.setTimeout(function(){throw n})}function dt(){}function L(n){n()}var Ot=function(n){k(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Pt(e)&&e.add(r)):r.destination=ne,r}return t.create=function(e,r,i){return new X(e,r,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(B),ee=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){j(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){j(r)}else j(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){j(e)}},n}(),X=function(n){k(t,n);function t(e,r,i){var s=n.call(this)||this,o;return b(e)||!e?o={next:e??void 0,error:r??void 0,complete:i??void 0}:o=e,s.destination=new ee(o),s}return t}(Ot);function j(n){te(n)}function re(n){throw n}var ne={closed:!0,next:dt,error:re,complete:dt},ie=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function se(n){return n}function oe(n){return n.length===0?se:n.length===1?n[0]:function(e){return n.reduce(function(r,i){return i(r)},e)}}var yt=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var i=this,s=le(t)?t:new X(t,e,r);return L(function(){var o=i,c=o.operator,a=o.source;s.add(c?c.call(s,a):a?i._subscribe(s):i._trySubscribe(s))}),s},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=vt(e),new e(function(i,s){var o=new X({next:function(c){try{t(c)}catch(a){s(a),o.unsubscribe()}},error:s,complete:i});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[ie]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return oe(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=vt(t),new t(function(r,i){var s;e.subscribe(function(o){return s=o},function(o){return i(o)},function(){return r(s)})})},n.create=function(t){return new n(t)},n}();function vt(n){var t;return(t=n??Qt.Promise)!==null&&t!==void 0?t:Promise}function ae(n){return n&&b(n.next)&&b(n.error)&&b(n.complete)}function le(n){return n&&n instanceof Ot||ae(n)&&Pt(n)}var ce=wt(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ct=function(n){k(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new bt(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new ce},t.prototype.next=function(e){var r=this;L(function(){var i,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=M(r.currentObservers),c=o.next();!c.done;c=o.next()){var a=c.value;a.next(e)}}catch(l){i={error:l}}finally{try{c&&!c.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var r=this;L(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var i=r.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;L(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,i=this,s=i.hasError,o=i.isStopped,c=i.observers;return s||o?xt:(this.currentObservers=null,c.push(e),new B(function(){r.currentObservers=null,Q(c,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,i=r.hasError,s=r.thrownError,o=r.isStopped;i?e.error(s):o&&e.complete()},t.prototype.asObservable=function(){var e=new yt;return e.source=this,e},t.create=function(e,r){return new bt(e,r)},t}(yt),bt=function(n){k(t,n);function t(e,r){var i=n.call(this)||this;return i.destination=e,i.source=r,i}return t.prototype.next=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)},t.prototype.error=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:xt},t}(Ct),he=function(n){k(t,n);function t(e){var r=n.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=n.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,i=e.thrownError,s=e._value;if(r)throw i;return this._throwIfClosed(),s},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(Ct);class me extends U{constructor(){super(...arguments),this.isMealzInternalReady$=new he(!1),this.elements={}}get selectors(){return{}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.checkMealzInternalStatus(),this.styleURL&&(this.styleURLs=Array.isArray(this.styleURL)?this.styleURL:[this.styleURL]),this.styleContainer=this.getStyleContainer(),this.addStyles()}disconnectedCallback(){super.disconnectedCallback(),this.removeStyles()}addStyles(){!this.styleURLs||this.styleURLs.length===0||this.styleURLs.forEach((t,e)=>{const r=`${this.tagName.toLowerCase()}-style-${e}`,i=this.styleContainer??this.getStyleContainer();if(!i.querySelector(`#${r}`)){const o=document.createElement("link");o.setAttribute("rel","stylesheet"),o.setAttribute("href",t.toString()),o.setAttribute("id",r),i.appendChild(o)}})}removeStyles(){!this.styleURLs||this.styleURLs.length===0||setTimeout(()=>{this.styleURLs.forEach((t,e)=>{const r=`${this.tagName.toLowerCase()}-style-${e}`,i=this.styleContainer??this.getStyleContainer(),s=i.querySelector(`#${r}`);if(!s)return;(i instanceof ShadowRoot?i.querySelectorAll(this.tagName.toLowerCase()).length>0:document.getElementsByTagName(this.tagName).length>0)||i.removeChild(s)})},100)}getStyleContainer(){const t=this.getRootNode();return t instanceof ShadowRoot?t:document.head}initSelectors(...t){t.length>0?t.forEach(e=>{this.selectors[e]&&(this.elements[e]=Array.isArray(this.selectors[e])?this.querySelectorAll(this.selectors[e][0]):this.querySelector(this.selectors[e]))}):Object.entries(this.selectors).forEach(([e,r])=>{this.elements[e]=Array.isArray(r)?this.querySelectorAll(r[0]):this.querySelector(r)})}addClickListener(t,e){const r=this.elements[t];r&&r.addEventListener("click",()=>{r.classList.contains("disabled")||r.hasAttribute("disabled")||e()})}checkMealzInternalStatus(t=0){var e,r,i,s;if((r=(e=rt)==null?void 0:e.supplier)!=null&&r.getToken()&&((s=(i=rt)==null?void 0:i.user)!=null&&s.getLanguage())){this.isMealzInternalReady$.next(!0);return}else{if(t>50){console.warn("[MealzInternal] Unable to find the supplier token or user language. Please verify the configuration.");return}setTimeout(()=>this.checkMealzInternalStatus(t+1),100)}if(t>=50){console.warn("Unable to find the supplier token or user language. Please verify the configuration.");return}setTimeout(()=>this.checkMealzInternalStatus(t+1),100)}getBaseURL(){return new URL("..",import.meta.url).toString()}}export{he as B,p as D,me as N,yt as O,Jt as Q,E as R,Ot as S,k as _,B as a,Z as b,K as c,Q as d,be as e,$t as f,ve as g,J as h,b as i,M as j,pe as k,ye as l,_e as m,Ct as n,ie as o,X as p,dt as q,te as r,de as s,se as t,Y as u,wt as v};
|
|
21
|
+
`):"",this.name="UnsubscriptionError",this.errors=e}});function Q(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var B=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,r,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var c=M(o),a=c.next();!a.done;a=c.next()){var l=a.value;l.remove(this)}}catch(y){t={error:y}}finally{try{a&&!a.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(b(f))try{f()}catch(y){s=y instanceof F?y.errors:[y]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var d=M(u),h=d.next();!h.done;h=d.next()){var v=h.value;try{pt(v)}catch(y){s=s??[],y instanceof F?s=Z(Z([],K(s)),K(y.errors)):s.push(y)}}}catch(y){r={error:y}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(s)throw new F(s)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)pt(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Q(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&Q(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),xt=B.EMPTY;function Pt(n){return n instanceof B||n&&"closed"in n&&b(n.remove)&&b(n.add)&&b(n.unsubscribe)}function pt(n){b(n)?n():n.unsubscribe()}var Qt={Promise:void 0},Xt={setTimeout:function(n,t){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,Z([n,t],K(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function te(n){Xt.setTimeout(function(){throw n})}function dt(){}function L(n){n()}var Ot=function(n){k(t,n);function t(e){var r=n.call(this)||this;return r.isStopped=!1,e?(r.destination=e,Pt(e)&&e.add(r)):r.destination=ne,r}return t.create=function(e,r,i){return new X(e,r,i)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(B),ee=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(r){j(r)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(r){j(r)}else j(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){j(e)}},n}(),X=function(n){k(t,n);function t(e,r,i){var s=n.call(this)||this,o;return b(e)||!e?o={next:e??void 0,error:r??void 0,complete:i??void 0}:o=e,s.destination=new ee(o),s}return t}(Ot);function j(n){te(n)}function re(n){throw n}var ne={closed:!0,next:dt,error:re,complete:dt},ie=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function se(n){return n}function oe(n){return n.length===0?se:n.length===1?n[0]:function(e){return n.reduce(function(r,i){return i(r)},e)}}var yt=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,r){var i=this,s=le(t)?t:new X(t,e,r);return L(function(){var o=i,c=o.operator,a=o.source;s.add(c?c.call(s,a):a?i._subscribe(s):i._trySubscribe(s))}),s},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var r=this;return e=vt(e),new e(function(i,s){var o=new X({next:function(c){try{t(c)}catch(a){s(a),o.unsubscribe()}},error:s,complete:i});r.subscribe(o)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[ie]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return oe(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=vt(t),new t(function(r,i){var s;e.subscribe(function(o){return s=o},function(o){return i(o)},function(){return r(s)})})},n.create=function(t){return new n(t)},n}();function vt(n){var t;return(t=n??Qt.Promise)!==null&&t!==void 0?t:Promise}function ae(n){return n&&b(n.next)&&b(n.error)&&b(n.complete)}function le(n){return n&&n instanceof Ot||ae(n)&&Pt(n)}var ce=wt(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Ct=function(n){k(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var r=new bt(this,this);return r.operator=e,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new ce},t.prototype.next=function(e){var r=this;L(function(){var i,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=M(r.currentObservers),c=o.next();!c.done;c=o.next()){var a=c.value;a.next(e)}}catch(l){i={error:l}}finally{try{c&&!c.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}}})},t.prototype.error=function(e){var r=this;L(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=e;for(var i=r.observers;i.length;)i.shift().error(e)}})},t.prototype.complete=function(){var e=this;L(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var r=e.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var r=this,i=this,s=i.hasError,o=i.isStopped,c=i.observers;return s||o?xt:(this.currentObservers=null,c.push(e),new B(function(){r.currentObservers=null,Q(c,e)}))},t.prototype._checkFinalizedStatuses=function(e){var r=this,i=r.hasError,s=r.thrownError,o=r.isStopped;i?e.error(s):o&&e.complete()},t.prototype.asObservable=function(){var e=new yt;return e.source=this,e},t.create=function(e,r){return new bt(e,r)},t}(yt),bt=function(n){k(t,n);function t(e,r){var i=n.call(this)||this;return i.destination=e,i.source=r,i}return t.prototype.next=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,e)},t.prototype.error=function(e){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,e)},t.prototype.complete=function(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)},t.prototype._subscribe=function(e){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&i!==void 0?i:xt},t}(Ct),he=function(n){k(t,n);function t(e){var r=n.call(this)||this;return r._value=e,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(e){var r=n.prototype._subscribe.call(this,e);return!r.closed&&e.next(this._value),r},t.prototype.getValue=function(){var e=this,r=e.hasError,i=e.thrownError,s=e._value;if(r)throw i;return this._throwIfClosed(),s},t.prototype.next=function(e){n.prototype.next.call(this,this._value=e)},t}(Ct);class me extends U{constructor(){super(...arguments),this.isMealzInternalReady$=new he(!1),this.elements={}}get selectors(){return{}}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.checkMealzInternalStatus(),this.styleURL&&(this.styleURLs=Array.isArray(this.styleURL)?this.styleURL:[this.styleURL]),this.styleContainer=this.getStyleContainer(),this.addStyles()}disconnectedCallback(){super.disconnectedCallback(),this.removeStyles()}addStyles(){!this.styleURLs||this.styleURLs.length===0||this.styleURLs.forEach((t,e)=>{const r=`${this.tagName.toLowerCase()}-style-${e}`,i=this.styleContainer??this.getStyleContainer();if(!i.querySelector(`#${r}`)){const o=document.createElement("link");o.setAttribute("rel","stylesheet"),o.setAttribute("href",t.toString()),o.setAttribute("id",r),i.appendChild(o)}})}removeStyles(){!this.styleURLs||this.styleURLs.length===0||setTimeout(()=>{this.styleURLs.forEach((t,e)=>{const r=`${this.tagName.toLowerCase()}-style-${e}`,i=this.styleContainer??this.getStyleContainer(),s=i.querySelector(`#${r}`);if(!s)return;!(i instanceof ShadowRoot?i.querySelectorAll(this.tagName.toLowerCase()).length>0:document.getElementsByTagName(this.tagName).length>0)&&i instanceof ShadowRoot&&i.removeChild(s)})},100)}getStyleContainer(){const t=this.getRootNode();return t instanceof ShadowRoot?t:document.head}initSelectors(...t){t.length>0?t.forEach(e=>{this.selectors[e]&&(this.elements[e]=Array.isArray(this.selectors[e])?this.querySelectorAll(this.selectors[e][0]):this.querySelector(this.selectors[e]))}):Object.entries(this.selectors).forEach(([e,r])=>{this.elements[e]=Array.isArray(r)?this.querySelectorAll(r[0]):this.querySelector(r)})}addClickListener(t,e){const r=this.elements[t];r&&r.addEventListener("click",()=>{r.classList.contains("disabled")||r.hasAttribute("disabled")||e()})}checkMealzInternalStatus(t=0){var e,r,i,s;if((r=(e=rt)==null?void 0:e.supplier)!=null&&r.getToken()&&((s=(i=rt)==null?void 0:i.user)!=null&&s.getLanguage())){this.isMealzInternalReady$.next(!0);return}else{if(t>50){console.warn("[MealzInternal] Unable to find the supplier token or user language. Please verify the configuration.");return}setTimeout(()=>this.checkMealzInternalStatus(t+1),100)}if(t>=50){console.warn("Unable to find the supplier token or user language. Please verify the configuration.");return}setTimeout(()=>this.checkMealzInternalStatus(t+1),100)}getBaseURL(){return new URL("..",import.meta.url).toString()}}export{he as B,p as D,me as N,yt as O,Jt as Q,E as R,Ot as S,k as _,B as a,Z as b,K as c,Q as d,be as e,$t as f,ve as g,J as h,b as i,M as j,pe as k,ye as l,_e as m,Ct as n,ie as o,X as p,dt as q,te as r,de as s,se as t,Y as u,wt as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e}from"./args-DPeCFqiB.js";import{f as t}from"./from-BxJrdzJs.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-DZc32M1D.js";import{S as i}from"./singleton-COF3iBbF.js";import{m as s}from"./mealz-sdk-CQtAGQGQ.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-BusnHgIb.js";import{N as m,k as i,D as _}from"./no-shadow-element-DZc32M1D.js";import{n as l}from"./property-CrS1c6lI.js";import{G as k}from"./guestObserver-CSQi-6i9.js";import{c as $}from"./capitalize-DUAqYmp4.js";import{m as c}from"./mealz-sdk-CQtAGQGQ.js";import{d as E}from"./delay-CUcLbxeL.js";import{P}from"./price-Bfy_G-uC.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`
|
|
@@ -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-DZc32M1D.js";import{n as p}from"./property-CrS1c6lI.js";import{P as d}from"./price-Bfy_G-uC.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">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as a,m as n}from"./mealz-sdk-
|
|
1
|
+
import{w as a,m as n}from"./mealz-sdk-CQtAGQGQ.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-Dq4X88HC.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-BF1r9b3N.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-BZ8nxpLv.js";import{o as l,c as a}from"./OperatorSubscriber-BF1r9b3N.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--gMS1asf.js";import{o as f,c as i}from"./OperatorSubscriber-BF1r9b3N.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-DZc32M1D.js";import{o as f,c as s}from"./OperatorSubscriber-BF1r9b3N.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-DZc32M1D.js";import{b as p}from"./async-Buq9Zuro.js";import{i as r}from"./isScheduler-B3orCs5Q.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-DZc32M1D.js";import{d as h}from"./debounceTime-D6W3esj0.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 f,i as c,N as h,k as l}from"../assets/no-shadow-element-
|
|
1
|
+
import{O as f,i as c,N as h,k as l}from"../assets/no-shadow-element-DZc32M1D.js";import{m as a,w as m}from"../assets/mealz-sdk-CQtAGQGQ.js";import{s as b}from"../assets/skip-CIS-pyI4.js";import{t as S}from"../assets/take-B0yyxfMB.js";import"../assets/filter-Dq4X88HC.js";import"../assets/OperatorSubscriber-BF1r9b3N.js";import"../assets/empty--gMS1asf.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()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{w as e,a as s}from"../../assets/mealz-sdk-CQtAGQGQ.js";async function o(){const a=new URL(globalThis.location.href).searchParams.get("myMeals")==="products"?1:0;await e(),s.basket.openPreview("",a)}o();
|
|
@@ -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
|
|
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 I,k as l,D as _,s as L,Q as F,R as V}from"../../assets/no-shadow-element-DZc32M1D.js";import{n as w}from"../../assets/property-CrS1c6lI.js";import{m as o,a as N,w as H}from"../../assets/mealz-sdk-CQtAGQGQ.js";import"../../counter/counter.min.js";import"../../price/price.min.js";import"../../modal/modal.min.js";import{P as U}from"../../assets/price-Bfy_G-uC.js";import{c as G}from"../../assets/capitalize-DUAqYmp4.js";import{e as M,i as D,t as j}from"../../assets/unsafe-html-DTarpZaV.js";import{d as Q}from"../../assets/debounceTime-D6W3esj0.js";import{d as W}from"../../assets/delay-CUcLbxeL.js";import{t as K}from"../../assets/take-B0yyxfMB.js";import{s as J}from"../../assets/switchMap-C79NTzdm.js";import"../../assets/state-1qy1JPQz.js";import"../../assets/query-BApjzB0v.js";import"../../onboarding/events.min.js";import"../../assets/singleton-COF3iBbF.js";import"../../assets/async-Buq9Zuro.js";import"../../assets/OperatorSubscriber-BF1r9b3N.js";import"../../assets/map-DdvZijlE.js";import"../../assets/mergeMap-CObP_yRz.js";import"../../assets/innerFrom-BZ8nxpLv.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/timer-CGijW-Af.js";import"../../assets/isScheduler-B3orCs5Q.js";import"../../assets/isDate-BwHtzZM4.js";import"../../assets/empty--gMS1asf.js";var Y=Object.defineProperty,Z=(t,e,i,r)=>{for(var s=void 0,a=t.length-1,n;a>=0;a--)(n=t[a])&&(s=n(e,i,s)||s);return s&&Y(e,i,s),s};class q extends I{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(),o.productAddition.open()}sendbasketEntryAddEvent(){o.analytics.sendEvent("basket.entry.add",this.analyticsPath,{})}}
|
|
9
|
+
`}openProductAdditionModal(){this.sendbasketEntryAddEvent(),o.productAddition.open()}sendbasketEntryAddEvent(){o.analytics.sendEvent("basket.entry.add",this.analyticsPath,{})}}Z([w({type:String})],q.prototype,"analyticsPath");customElements.get("mealz-product-addition")||customElements.define("mealz-product-addition",q);var X=Object.defineProperty,C=(t,e,i,r)=>{for(var s=void 0,a=t.length-1,n;a>=0;a--)(n=t[a])&&(s=n(e,i,s)||s);return s&&X(e,i,s),s};class y extends I{constructor(){super(),this.analyticsPath="",this.loading=!1,this.isRecipeModalDisplayed=!1,this.subscriptions=[],this.priceService=U.getInstance(),this.styleURL=new URL("./catalog/basket-preview/basket-preview-product/basket-preview-product.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.subscriptions.push(o.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>${G(this.basketEntry.selectedItem.attributes.name)}</span>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="mealz-basket-preview-product__badges">
|
|
50
50
|
<!-- SPONSORISED BADGE -->
|
|
@@ -105,15 +105,19 @@ 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(),o.products.removeProduct(this.basketEntry,this.analyticsPath),this.loading=!0,this.requestUpdate()}replaceProduct(){this.sendReplaceEvent(),o.productReplacement.open(this.basketEntry)}counterChanged(e){e.detail.value!==this.basketEntry.attributes.quantity&&(o.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(),o.products.removeProduct(this.basketEntry,this.analyticsPath),this.loading=!0,this.requestUpdate()}replaceProduct(){this.sendReplaceEvent(),o.productReplacement.open(this.basketEntry)}counterChanged(e){e.detail.value!==this.basketEntry.attributes.quantity&&(o.products.changeQuantity(this.basketEntry,e.detail.value,""),this.loading=!0,this.requestUpdate())}addDefaultProductImage(e){e.target.src=N.defaultIngredientPicture,e.target.onerror=null}displayRecipesFromProduct(){this.isRecipeModalDisplayed=!this.isRecipeModalDisplayed,this.requestUpdate()}sendReplaceEvent(){o.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(){o.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]})}}C([w({type:Object})],y.prototype,"basketEntry");C([w({type:Array})],y.prototype,"recipeNames");C([w({type:String})],y.prototype,"analyticsPath");customElements.get("mealz-basket-preview-product")||customElements.define("mealz-basket-preview-product",y);/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
|
-
*/const{I:
|
|
112
|
+
*/const{I:ee}=L,T=(t,e)=>(t==null?void 0:t._$litType$)!==void 0,te=t=>{var e;return((e=t==null?void 0:t._$litType$)==null?void 0:e.h)!=null},x=()=>document.createComment(""),f=(t,e,i)=>{var a;const r=t._$AA.parentNode,s=e===void 0?t._$AB:e._$AA;if(i===void 0){const n=r.insertBefore(x(),s),p=r.insertBefore(x(),s);i=new ee(n,p,t,t.options)}else{const n=i._$AB.nextSibling,p=i._$AM,u=p!==t;if(u){let h;(a=i._$AQ)==null||a.call(i,t),i._$AM=t,i._$AP!==void 0&&(h=t._$AU)!==p._$AU&&i._$AP(h)}if(n!==s||u){let h=i._$AA;for(;h!==n;){const v=h.nextSibling;r.insertBefore(h,s),h=v}}}return i},z=(t,e,i=t)=>(t._$AI(e,i),t),se={},$=(t,e=se)=>t._$AH=e,P=t=>t._$AH,E=t=>{var r;(r=t._$AP)==null||r.call(t,!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const s=e.nextSibling;e.remove(),e=s}},ie=t=>{t._$AR()};/**
|
|
113
113
|
* @license
|
|
114
114
|
* Copyright 2017 Google LLC
|
|
115
115
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
116
|
-
*/const
|
|
116
|
+
*/const A=t=>te(t)?t._$litType$.h:t.strings,ae=M(class extends D{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(t,[e]){const i=T(this.it)?A(this.it):null,r=T(e)?A(e):null;if(i!==null&&(r===null||i!==r)){const s=P(t).pop();let a=this.et.get(i);if(a===void 0){const n=document.createDocumentFragment();a=F(_,n),a.setConnected(!1),this.et.set(i,a)}$(a,[s]),f(a,void 0,s)}if(r!==null){if(i===null||i!==r){const s=this.et.get(r);if(s!==void 0){const a=P(s).pop();ie(t),f(t,void 0,a),$(t,[a])}}this.it=e}else this.it=void 0;return this.render(e)}});/**
|
|
117
|
+
* @license
|
|
118
|
+
* Copyright 2017 Google LLC
|
|
119
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
120
|
+
*/const B=(t,e,i)=>{const r=new Map;for(let s=e;s<=i;s++)r.set(t[s],s);return r},re=M(class extends D{constructor(t){if(super(t),t.type!==j.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let r;i===void 0?i=e:e!==void 0&&(r=e);const s=[],a=[];let n=0;for(const p of t)s[n]=r?r(p,n):n,a[n]=i(p,n),n++;return{values:a,keys:s}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,r]){const s=P(t),{values:a,keys:n}=this.dt(e,i,r);if(!Array.isArray(s))return this.ut=n,a;const p=this.ut??(this.ut=[]),u=[];let h,v,c=0,d=s.length-1,m=0,b=a.length-1;for(;c<=d&&m<=b;)if(s[c]===null)c++;else if(s[d]===null)d--;else if(p[c]===n[m])u[m]=z(s[c],a[m]),c++,m++;else if(p[d]===n[b])u[b]=z(s[d],a[b]),d--,b--;else if(p[c]===n[b])u[b]=z(s[c],a[b]),f(t,u[b+1],s[c]),c++,b--;else if(p[d]===n[m])u[m]=z(s[d],a[m]),f(t,s[c],s[d]),d--,m++;else if(h===void 0&&(h=B(n,m,b),v=B(p,c,d)),h.has(p[c]))if(h.has(p[d])){const k=v.get(n[m]),g=k!==void 0?s[k]:null;if(g===null){const R=f(t,s[c]);z(R,a[m]),u[m]=R}else u[m]=z(g,a[m]),f(t,s[c],g),s[k]=null;m++}else E(s[d]),d--;else E(s[c]),c++;for(;m<=b;){const k=f(t,u[b+1]);z(k,a[m]),u[m++]=k}for(;c<=d;){const k=s[c++];k!==null&&E(k)}return this.ut=n,$(t,u),V}}),S={isRecipeDetailsVisible:{paramName:"displayRecipe",getValue:()=>{var e;const t=o.recipes.displayedRecipe$.value;return((e=t==null?void 0:t.recipe)==null?void 0:e.id)||null},openDrawer:t=>{o.recipes.openDetails(t)}},isBasketPreviewVisible:{paramName:"myMeals",getValue:()=>{const{activeTabIndex:t}=o.basket.basketPreviewState$.getValue();return t===1?"products":"recipes"},openDrawer:t=>{o.basket.basketPreviewState$.next({isOpen:!0,activeTabIndex:t==="products"?1:0})}}};function ne(){return Object.values(S).map(t=>t.paramName)}function Oe(){const t=new URL(window.location.href);for(const e of Object.values(S)){const i=t.searchParams.get(e.paramName);if(i&&e.openDrawer){e.openDrawer(i);return}}}function Le(t){t.subscribe(e=>{const i=new URL(window.location.href);ne().forEach(s=>{i.searchParams.delete(s)});const r=S[e];if(r){const s=r.getValue();s&&i.searchParams.set(r.paramName,s)}window.history.replaceState({},"",i.toString())})}function le(t){const e=new URL(window.location.href);e.searchParams.delete("myMeals"),t===0?e.searchParams.append("myMeals","recipes"):t===1&&e.searchParams.append("myMeals","products"),window.history.replaceState({},"",e.toString())}var oe=Object.defineProperty,ce=(t,e,i,r)=>{for(var s=void 0,a=t.length-1,n;a>=0;a--)(n=t[a])&&(s=n(e,i,s)||s);return s&&oe(e,i,s),s};class O extends I{constructor(){super(),this.hideTabSelector=!1,this.priceService=U.getInstance(),this.subscriptions=[],this.recipePrices=[],this.recipePreviews=[],this.products=[],this.noSupplier=!1,this.tabs=["Recettes","Produits"],this.selectedTabIndex=0,this.analyticsPath="/basket/recipes",this.drawerStoreIndicator=null,this.isComponentConnected=!1,this.styleURL=new URL("./catalog/basket-preview/basket-preview.css",this.getBaseURL())}connectedCallback(){super.connectedCallback(),this.isComponentConnected=!0,this.pageview(),this.listenToActiveTab(),this.listenToCloseEvent(),this.priceService.initFormatter(),this.initializeNoSupplierState(),this.subscriptions.push(N.basket.recipeCount().subscribe(e=>{this.recipesCount=e,this.requestUpdate()}),o.basket.entries$().pipe(Q(200)).subscribe(e=>{this.products=e.filter(i=>i.attributes.status==="active"),this.updateRecipeView()}),o.productAddition.productAdded$.pipe(W(200)).subscribe(e=>{this.selectedTabIndex=1,setTimeout(()=>this.scrollToAddedProduct(e),0),this.requestUpdate()}),o.basket.recipePricesInBasket$().subscribe(e=>{this.recipePrices=e,this.requestUpdate()}))}disconnectedCallback(){this.isComponentConnected=!1,super.disconnectedCallback(),this.subscriptions.forEach(e=>e.unsubscribe())}updated(){this.drawerStoreIndicator&&this.drawerStoreIndicator.setAttribute("analyticsPath",this.analyticsPath)}render(){return l`
|
|
117
121
|
<div class="mealz-basket-preview">
|
|
118
122
|
${this.noSupplier?l`
|
|
119
123
|
<mealz-store-indicator .analyticsPath=${this.analyticsPath}></mealz-store-indicator>`:_}
|
|
@@ -133,15 +137,15 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
133
137
|
${this.renderContent()}
|
|
134
138
|
${this.noSupplier?l`${this.renderPlaceOrderFooter()}`:l`${this.renderSeeBasketFooter()}`}
|
|
135
139
|
</div>
|
|
136
|
-
`}renderContent(){return this.selectedTabIndex===0?l`
|
|
140
|
+
`}renderContent(){return ae(this.selectedTabIndex===0?l`
|
|
137
141
|
<div class="mealz-basket-preview__recipes">
|
|
138
142
|
${this.recipePreviews.map(e=>this.renderMealPreview(e))}
|
|
139
143
|
</div>
|
|
140
144
|
`:l`
|
|
141
145
|
<div class="mealz-basket-preview__products">
|
|
142
|
-
${
|
|
146
|
+
${re(this.products,e=>e.id,(e,i)=>this.renderProductCard(e,i===this.products.length-1))}
|
|
143
147
|
</div>
|
|
144
|
-
`}renderProductCard(e,i=!1){if(e.selectedItem){const r=this.recipePreviews.reduce((
|
|
148
|
+
`)}renderProductCard(e,i=!1){if(e.selectedItem){const r=this.recipePreviews.reduce((s,a)=>(e.recipesIds.includes(+a.id)&&s.push(a.title),s),[]);return l`
|
|
145
149
|
<mealz-basket-preview-product
|
|
146
150
|
.basketEntry=${e}
|
|
147
151
|
.recipeNames=${r}
|
|
@@ -198,7 +202,7 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
198
202
|
</div>
|
|
199
203
|
</div>
|
|
200
204
|
</div>
|
|
201
|
-
`}calculateTotalPrice(){var r;const e=((r=this.recipePrices)==null?void 0:r.reduce((
|
|
205
|
+
`}calculateTotalPrice(){var r;const e=((r=this.recipePrices)==null?void 0:r.reduce((s,a)=>s+ +a.price,0))||0,i=(this.products||[]).filter(s=>{var u,h,v,c,d;const a=!((v=(h=(u=s.relationships)==null?void 0:u.recipes)==null?void 0:h.data)!=null&&v.length),n=!((c=s==null?void 0:s.recipesIds)!=null&&c.length),p=!((d=s==null?void 0:s["recipe-ids"])!=null&&d.length);return a&&n&&p}).reduce((s,a)=>{var h,v,c,d;const n=((h=a.attributes)==null?void 0:h.quantity)??1,p=((v=a.attributes)==null?void 0:v.price)??((c=a.attributes)==null?void 0:c.discountedPrice)??((d=a.attributes)==null?void 0:d["unit-price"]),u=Number(p);return s+(Number.isFinite(u)?u*n:0)},0);return e+i}renderPlaceOrderFooter(){return l`
|
|
202
206
|
<div class="mealz-basket-preview__footer mealz-basket-preview__place-order-footer">
|
|
203
207
|
<div class="mealz-basket-preview__basket-price">
|
|
204
208
|
<span class="mealz-basket-preview__basket-price-label mealz-ds-text weight-xl size-l">
|
|
@@ -230,4 +234,4 @@ import"../../store-indicator/store-indicator.min.js";import"../../slider-tabs/sl
|
|
|
230
234
|
panier
|
|
231
235
|
</h2>
|
|
232
236
|
</div>
|
|
233
|
-
`}async initializeNoSupplierState(){try{if(await
|
|
237
|
+
`}async initializeNoSupplierState(){try{if(await H(),!this.isComponentConnected)return;this.subscriptions.push(o.supplier.noSupplier$.pipe(K(1)).subscribe({next:e=>{this.isComponentConnected&&this.applyNoSupplierState(e)},error:e=>{this.isComponentConnected&&console.warn("[mealz-basket-preview] Unable to resolve noSupplier state.",e)}}))}catch(e){if(!this.isComponentConnected)return;console.warn("[mealz-basket-preview] Unable to resolve noSupplier state.",e)}}applyNoSupplierState(e){this.isComponentConnected&&(this.noSupplier=e,this.noSupplier&&this.appendStoreIndicatorToDrawerHeader(),this.requestUpdate())}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(),o.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){o.recipes.openDetails(e.id,e.guests,this.analyticsPath)}removeRecipeClick(e){e.isGettingRemoved=!0,this.requestUpdate(),o.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,le(e),this.selectedTabIndex===0?(this.analyticsPath="/basket/recipes",this.pageview()):(this.analyticsPath="/basket/products",this.pageview()),this.requestUpdate()}updateRecipeView(){const e=o.basket,i=e.buildPreview(),r=typeof e.waitForBasketEntries=="function"?e.waitForBasketEntries().pipe(J(()=>i)):i;this.subscriptions.push(r.subscribe(s=>{s.map(a=>a.isGettingRemoved=!1),this.recipePreviews=s,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 s=this.getElementsByTagName("MEALZ-BASKET-PREVIEW-PRODUCT");(r=s.item(s.length-1))==null||r.scrollIntoView({block:"center",behavior:"smooth"})}}listenToActiveTab(){this.subscriptions.push(o.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()||o.analytics.sendEvent("pageview",this.analyticsPath,{})}sendCloseEvent(){this.isHidden()||o.analytics.sendEvent("basket.close",this.analyticsPath,{})}}ce([w({type:Boolean,attribute:"hide-tab-selector"})],O.prototype,"hideTabSelector");customElements.get("mealz-basket-preview")||customElements.define("mealz-basket-preview",O);export{Le as l,Oe 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-BJzEuN1g.js";import{w as g,m as a}from"../../assets/mealz-sdk-CQtAGQGQ.js";import"../../assets/no-shadow-element-DZc32M1D.js";import"../../assets/http-B0u4sOhM.js";import"../../assets/innerFrom-BZ8nxpLv.js";import"../../assets/mergeMap-CObP_yRz.js";import"../../assets/map-DdvZijlE.js";import"../../assets/OperatorSubscriber-BF1r9b3N.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/mapOneOrManyArgs-BpqqmasF.js";import"../../assets/async-Buq9Zuro.js";import"../../assets/timer-CGijW-Af.js";import"../../assets/isScheduler-B3orCs5Q.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-BJzEuN1g.js";import{m as s}from"../../assets/mealz-sdk-CQtAGQGQ.js";import{s as g}from"../../assets/skip-CIS-pyI4.js";import"../../assets/no-shadow-element-DZc32M1D.js";import"../../assets/http-B0u4sOhM.js";import"../../assets/innerFrom-BZ8nxpLv.js";import"../../assets/mergeMap-CObP_yRz.js";import"../../assets/map-DdvZijlE.js";import"../../assets/OperatorSubscriber-BF1r9b3N.js";import"../../assets/executeSchedule-CEDvgTzM.js";import"../../assets/mapOneOrManyArgs-BpqqmasF.js";import"../../assets/async-Buq9Zuro.js";import"../../assets/timer-CGijW-Af.js";import"../../assets/isScheduler-B3orCs5Q.js";import"../../assets/isDate-BwHtzZM4.js";import"../../assets/filter-Dq4X88HC.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
|
-
.mealz-drawer.with-header .mealz-drawer__content{margin-top:24px;margin-bottom:24px}.mealz-drawer .mealz-drawer__content{overflow-y:auto;overflow-x:hidden;scrollbar-color:var(--mealz-ds-color-primary-100),var(--mealz-ds-color-primary);padding:0 16px;display:grid;grid-template-columns:repeat(auto-fill,min(218px,calc((100% - 12px)/2)));box-sizing:border-box;justify-content:center;margin:-6px}.mealz-drawer .mealz-drawer__content>*{margin:6px}@media (min-width: 375px) and (max-width: 480px){.mealz-drawer{width:100%}.mealz-drawer .mealz-drawer__content{grid-template-columns:repeat(auto-fill,min(165px,calc((100% - 12px)/2)))}}@media (max-width: 375px){.mealz-drawer{width:100%}.mealz-drawer .mealz-drawer__content{grid-template-columns:repeat(auto-fill,100%)}}:root{--mealz-history-order-width: var(--mealz-catalog-card-width, 308px)
|
|
1
|
+
.mealz-drawer.with-header .mealz-drawer__content{margin-top:24px;margin-bottom:24px}.mealz-drawer .mealz-drawer__content{overflow-y:auto;overflow-x:hidden;scrollbar-color:var(--mealz-ds-color-primary-100),var(--mealz-ds-color-primary);padding:0 16px;display:grid;grid-template-columns:repeat(auto-fill,min(218px,calc((100% - 12px)/2)));box-sizing:border-box;justify-content:center;margin:-6px}.mealz-drawer .mealz-drawer__content>*{margin:6px}@media (min-width: 375px) and (max-width: 480px){.mealz-drawer{width:100%}.mealz-drawer .mealz-drawer__content{grid-template-columns:repeat(auto-fill,min(165px,calc((100% - 12px)/2)))}}@media (max-width: 375px){.mealz-drawer{width:100%}.mealz-drawer .mealz-drawer__content{grid-template-columns:repeat(auto-fill,100%)}}:root{--mealz-history-order-width: var(--mealz-catalog-card-width, 308px)}.mealz-catalog-history .hidden{display:none}.mealz-catalog-history .mealz-catalog__list,.mealz-catalog-history .mealz-catalog__content .mealz-catalog__list{grid-template-columns:repeat(auto-fill,var(--mealz-history-order-width, 308px))}@media (min-width: 375px) and (max-width: 712px){.mealz-catalog-history .mealz-catalog-history .mealz-catalog__list{grid-template-columns:repeat(auto-fill,var(--mealz-history-order-width, 308px))}}.mealz-catalog-history .mealz-catalog__list__row{display:grid;flex-direction:row;position:relative;width:100%;box-sizing:border-box;padding-bottom:16px}@media (max-width: 1023px){.mealz-catalog-history .mealz-catalog__list__row{display:block}}.mealz-catalog-history .mealz-catalog-toolbar:not(.sticking){flex-direction:row;gap:0px}
|