wineater-bot 5.0.0 → 5.1.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/wineater-chatbot.mjs +47 -25
- package/dist/wineater-chatbot.umd.js +47 -25
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(ae,le){typeof exports=="object"&&typeof module<"u"?module.exports=le():typeof define=="function"&&define.amd?define(le):(ae=typeof globalThis<"u"?globalThis:ae||self,ae.WineaterChatbot=le())})(this,function(){"use strict";var Vd=Object.defineProperty;var ms=ae=>{throw TypeError(ae)};var Kd=(ae,le,Te)=>le in ae?Vd(ae,le,{enumerable:!0,configurable:!0,writable:!0,value:Te}):ae[le]=Te;var gt=(ae,le,Te)=>Kd(ae,typeof le!="symbol"?le+"":le,Te),so=(ae,le,Te)=>le.has(ae)||ms("Cannot "+Te);var p=(ae,le,Te)=>(so(ae,le,"read from private field"),Te?Te.call(ae):le.get(ae)),X=(ae,le,Te)=>le.has(ae)?ms("Cannot add the same private member more than once"):le instanceof WeakSet?le.add(ae):le.set(ae,Te),Y=(ae,le,Te,mr)=>(so(ae,le,"write to private field"),mr?mr.call(ae,Te):le.set(ae,Te),Te),ne=(ae,le,Te)=>(so(ae,le,"access private method"),Te);var ds,Zn,Jn,Dn,$n,Wr,er,fn,Wt,tr,nt,lo,co,uo,_s,pt,no,Nt,Rn,Ze,Lt,rt,Tt,$t,Mn,pn,nr,rr,ir,en,li,Ie,Yd,Xd,Qd,fo,fi,pi,po,fs,Pt,zt,it,Wn,Nr,Lr,ci,or,zr,vn,ar,sr,hn,ge,vo,Ht,ho,go,bs,ps,vs,hs;const ae="5";typeof window<"u"&&((ds=window.__svelte??(window.__svelte={})).v??(ds.v=new Set)).add(ae);const le=1,Te=2,mr=4,ys=8,xs=16,ks=1,Ss=2,Cs=4,Es=8,Ts=16,wo=1,Ps=2,Re=Symbol(),mo="http://www.w3.org/1999/xhtml",vi=!1;var hi=Array.isArray,Is=Array.prototype.indexOf,On=Array.prototype.includes,Hr=Array.from,As=Object.defineProperty,qn=Object.getOwnPropertyDescriptor,Ds=Object.getOwnPropertyDescriptors,Rs=Object.prototype,Ms=Array.prototype,_o=Object.getPrototypeOf,bo=Object.isExtensible;const gi=()=>{};function Ws(e){for(var t=0;t<e.length;t++)e[t]()}function yo(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function Ns(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const Me=2,_r=4,Gr=8,xo=1<<24,Gt=16,wt=32,wn=64,wi=128,ot=512,Ae=1024,We=2048,mt=4096,$e=8192,Vt=16384,mn=32768,_n=65536,ko=1<<17,So=1<<18,jn=1<<19,Ls=1<<20,Kt=1<<25,bn=65536,mi=1<<21,_i=1<<22,on=1<<23,yn=Symbol("$state"),zs=Symbol("legacy props"),Bs=Symbol(""),xn=new class extends Error{constructor(){super(...arguments);gt(this,"name","StaleReactionError");gt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Os(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function qs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function js(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Us(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Fs(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Hs(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Gs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Vs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ks(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ys(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Qs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Zs(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Js(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Co(e){return e===this.v}function $s(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Eo(e){return!$s(e,this.v)}let Un=!1,el=!1;function tl(){Un=!0}let Se=null;function Fn(e){Se=e}function _t(e,t=!1,n){Se={p:Se,i:!1,c:null,e:null,s:e,x:null,l:Un&&!t?{s:null,u:null,$:[]}:null}}function bt(e){var t=Se,n=t.e;if(n!==null){t.e=null;for(var r of n)Xo(r)}return e!==void 0&&(t.x=e),t.i=!0,Se=t.p,e??{}}function Hn(){return!Un||Se!==null&&Se.l===null}let kn=[];function To(){var e=kn;kn=[],Ws(e)}function Yt(e){if(kn.length===0&&!br){var t=kn;queueMicrotask(()=>{t===kn&&To()})}kn.push(e)}function nl(){for(;kn.length>0;)To()}function Po(e){var t=re;if(t===null)return J.f|=on,e;if(!(t.f&mn)&&!(t.f&_r))throw e;an(e,t)}function an(e,t){for(;t!==null;){if(t.f&wi){if(!(t.f&mn))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const rl=-7169;function ke(e,t){e.f=e.f&rl|t}function bi(e){e.f&ot||e.deps===null?ke(e,Ae):ke(e,mt)}function Io(e){if(e!==null)for(const t of e)!(t.f&Me)||!(t.f&bn)||(t.f^=bn,Io(t.deps))}function Ao(e,t,n){e.f&We?t.add(e):e.f&mt&&n.add(e),Io(e.deps),ke(e,Ae)}const Vr=new Set;let Q=null,yi=null,Ne=null,Ke=[],Kr=null,xi=!1,br=!1;const to=class to{constructor(){X(this,nt);gt(this,"current",new Map);gt(this,"previous",new Map);X(this,Zn,new Set);X(this,Jn,new Set);X(this,Dn,0);X(this,$n,0);X(this,Wr,null);X(this,er,new Set);X(this,fn,new Set);X(this,Wt,new Map);gt(this,"is_fork",!1);X(this,tr,!1)}skip_effect(t){p(this,Wt).has(t)||p(this,Wt).set(t,{d:[],m:[]})}unskip_effect(t){var n=p(this,Wt).get(t);if(n){p(this,Wt).delete(t);for(var r of n.d)ke(r,We),xt(r);for(r of n.m)ke(r,mt),xt(r)}}process(t){var i;Ke=[],this.apply();var n=[],r=[];for(const a of t)ne(this,nt,co).call(this,a,n,r);if(ne(this,nt,lo).call(this)){ne(this,nt,uo).call(this,r),ne(this,nt,uo).call(this,n);for(const[a,l]of p(this,Wt))No(a,l)}else{for(const a of p(this,Zn))a();p(this,Zn).clear(),p(this,Dn)===0&&ne(this,nt,_s).call(this),yi=this,Q=null,Ro(r),Ro(n),p(this,er).clear(),p(this,fn).clear(),yi=null,(i=p(this,Wr))==null||i.resolve()}Ne=null}capture(t,n){n!==Re&&!this.previous.has(t)&&this.previous.set(t,n),t.f&on||(this.current.set(t,t.v),Ne==null||Ne.set(t,t.v))}activate(){Q=this,this.apply()}deactivate(){Q===this&&(Q=null,Ne=null)}flush(){if(this.activate(),Ke.length>0){if(Do(),Q!==null&&Q!==this)return}else p(this,Dn)===0&&this.process([]);this.deactivate()}discard(){for(const t of p(this,Jn))t(this);p(this,Jn).clear()}increment(t){Y(this,Dn,p(this,Dn)+1),t&&Y(this,$n,p(this,$n)+1)}decrement(t){Y(this,Dn,p(this,Dn)-1),t&&Y(this,$n,p(this,$n)-1),!p(this,tr)&&(Y(this,tr,!0),Yt(()=>{Y(this,tr,!1),ne(this,nt,lo).call(this)?Ke.length>0&&this.flush():this.revive()}))}revive(){for(const t of p(this,er))p(this,fn).delete(t),ke(t,We),xt(t);for(const t of p(this,fn))ke(t,mt),xt(t);this.flush()}oncommit(t){p(this,Zn).add(t)}ondiscard(t){p(this,Jn).add(t)}settled(){return(p(this,Wr)??Y(this,Wr,yo())).promise}static ensure(){if(Q===null){const t=Q=new to;Vr.add(Q),br||Yt(()=>{Q===t&&t.flush()})}return Q}apply(){}};Zn=new WeakMap,Jn=new WeakMap,Dn=new WeakMap,$n=new WeakMap,Wr=new WeakMap,er=new WeakMap,fn=new WeakMap,Wt=new WeakMap,tr=new WeakMap,nt=new WeakSet,lo=function(){return this.is_fork||p(this,$n)>0},co=function(t,n,r){t.f^=Ae;for(var i=t.first;i!==null;){var a=i.f,l=(a&(wt|wn))!==0,c=l&&(a&Ae)!==0,s=c||(a&$e)!==0||p(this,Wt).has(i);if(!s&&i.fn!==null){l?i.f^=Ae:a&_r?n.push(i):Sr(i)&&(a&Gt&&p(this,fn).add(i),Vn(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var h=i.next;if(h!==null){i=h;break}i=i.parent}}},uo=function(t){for(var n=0;n<t.length;n+=1)Ao(t[n],p(this,er),p(this,fn))},_s=function(){var i;if(Vr.size>1){this.previous.clear();var t=Ne,n=!0;for(const a of Vr){if(a===this){n=!1;continue}const l=[];for(const[s,u]of this.current){if(a.current.has(s))if(n&&u!==a.current.get(s))a.current.set(s,u);else continue;l.push(s)}if(l.length===0)continue;const c=[...a.current.keys()].filter(s=>!this.current.has(s));if(c.length>0){var r=Ke;Ke=[];const s=new Set,u=new Map;for(const h of l)Mo(h,c,s,u);if(Ke.length>0){Q=a,a.apply();for(const h of Ke)ne(i=a,nt,co).call(i,h,[],[]);a.deactivate()}Ke=r}}Q=null,Ne=t}p(this,Wt).clear(),Vr.delete(this)};let sn=to;function il(e){var t=br;br=!0;try{for(var n;;){if(nl(),Ke.length===0&&(Q==null||Q.flush(),Ke.length===0))return Kr=null,n;Do()}}finally{br=t}}function Do(){xi=!0;var e=null;try{for(var t=0;Ke.length>0;){var n=sn.ensure();if(t++>1e3){var r,i;ol()}n.process(Ke),ln.clear()}}finally{Ke=[],xi=!1,Kr=null}}function ol(){try{Gs()}catch(e){an(e,Kr)}}let yt=null;function Ro(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(Vt|$e))&&Sr(r)&&(yt=new Set,Vn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Jo(r),(yt==null?void 0:yt.size)>0)){ln.clear();for(const i of yt){if(i.f&(Vt|$e))continue;const a=[i];let l=i.parent;for(;l!==null;)yt.has(l)&&(yt.delete(l),a.push(l)),l=l.parent;for(let c=a.length-1;c>=0;c--){const s=a[c];s.f&(Vt|$e)||Vn(s)}}yt.clear()}}yt=null}}function Mo(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const a=i.f;a&Me?Mo(i,t,n,r):a&(_i|Gt)&&!(a&We)&&Wo(i,t,r)&&(ke(i,We),xt(i))}}function Wo(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(On.call(t,i))return!0;if(i.f&Me&&Wo(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function xt(e){var t=Kr=e,n=t.b;if(n!=null&&n.is_pending&&e.f&(_r|Gr|xo)&&!(e.f&mn)){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(xi&&t===re&&r&Gt&&!(r&So)&&r&mn)return;if(r&(wn|wt)){if(!(r&Ae))return;t.f^=Ae}}Ke.push(t)}function No(e,t){if(!(e.f&wt&&e.f&Ae)){e.f&We?t.d.push(e):e.f&mt&&t.m.push(e),ke(e,Ae);for(var n=e.first;n!==null;)No(n,t),n=n.next}}function al(e){let t=0,n=Sn(0),r;return()=>{Ti()&&(o(n),Ii(()=>(t===0&&(r=Er(()=>e(()=>yr(n)))),t+=1,()=>{Yt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,yr(n))})})))}}var sl=_n|jn;function ll(e,t,n,r){new cl(e,t,n,r)}class cl{constructor(t,n,r,i){X(this,Ie);gt(this,"parent");gt(this,"is_pending",!1);gt(this,"transform_error");X(this,pt);X(this,no,null);X(this,Nt);X(this,Rn);X(this,Ze);X(this,Lt,null);X(this,rt,null);X(this,Tt,null);X(this,$t,null);X(this,Mn,0);X(this,pn,0);X(this,nr,!1);X(this,rr,new Set);X(this,ir,new Set);X(this,en,null);X(this,li,al(()=>(Y(this,en,Sn(p(this,Mn))),()=>{Y(this,en,null)})));var a;Y(this,pt,t),Y(this,Nt,n),Y(this,Rn,l=>{var c=re;c.b=this,c.f|=wi,r(l)}),this.parent=re.b,this.transform_error=i??((a=this.parent)==null?void 0:a.transform_error)??(l=>l),Y(this,Ze,kr(()=>{ne(this,Ie,fo).call(this)},sl))}defer_effect(t){Ao(t,p(this,rr),p(this,ir))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!p(this,Nt).pending}update_pending_count(t){ne(this,Ie,po).call(this,t),Y(this,Mn,p(this,Mn)+t),!(!p(this,en)||p(this,nr))&&(Y(this,nr,!0),Yt(()=>{Y(this,nr,!1),p(this,en)&&Gn(p(this,en),p(this,Mn))}))}get_effect_pending(){return p(this,li).call(this),o(p(this,en))}error(t){var n=p(this,Nt).onerror;let r=p(this,Nt).failed;if(!n&&!r)throw t;p(this,Lt)&&(Ye(p(this,Lt)),Y(this,Lt,null)),p(this,rt)&&(Ye(p(this,rt)),Y(this,rt,null)),p(this,Tt)&&(Ye(p(this,Tt)),Y(this,Tt,null));var i=!1,a=!1;const l=()=>{if(i){Js();return}i=!0,a&&Qs(),p(this,Tt)!==null&&En(p(this,Tt),()=>{Y(this,Tt,null)}),ne(this,Ie,pi).call(this,()=>{sn.ensure(),ne(this,Ie,fo).call(this)})},c=s=>{try{a=!0,n==null||n(s,l),a=!1}catch(u){an(u,p(this,Ze)&&p(this,Ze).parent)}r&&Y(this,Tt,ne(this,Ie,pi).call(this,()=>{sn.ensure();try{return at(()=>{var u=re;u.b=this,u.f|=wi,r(p(this,pt),()=>s,()=>l)})}catch(u){return an(u,p(this,Ze).parent),null}}))};Yt(()=>{var s;try{s=this.transform_error(t)}catch(u){an(u,p(this,Ze)&&p(this,Ze).parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(c,u=>an(u,p(this,Ze)&&p(this,Ze).parent)):c(s)})}}pt=new WeakMap,no=new WeakMap,Nt=new WeakMap,Rn=new WeakMap,Ze=new WeakMap,Lt=new WeakMap,rt=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Mn=new WeakMap,pn=new WeakMap,nr=new WeakMap,rr=new WeakMap,ir=new WeakMap,en=new WeakMap,li=new WeakMap,Ie=new WeakSet,Yd=function(){try{Y(this,Lt,at(()=>p(this,Rn).call(this,p(this,pt))))}catch(t){this.error(t)}},Xd=function(t){const n=p(this,Nt).failed;n&&Y(this,Tt,at(()=>{n(p(this,pt),()=>t,()=>()=>{})}))},Qd=function(){const t=p(this,Nt).pending;t&&(this.is_pending=!0,Y(this,rt,at(()=>t(p(this,pt)))),Yt(()=>{var n=Y(this,$t,document.createDocumentFragment()),r=Xt();n.append(r),Y(this,Lt,ne(this,Ie,pi).call(this,()=>(sn.ensure(),at(()=>p(this,Rn).call(this,r))))),p(this,pn)===0&&(p(this,pt).before(n),Y(this,$t,null),En(p(this,rt),()=>{Y(this,rt,null)}),ne(this,Ie,fi).call(this))}))},fo=function(){try{if(this.is_pending=this.has_pending_snippet(),Y(this,pn,0),Y(this,Mn,0),Y(this,Lt,at(()=>{p(this,Rn).call(this,p(this,pt))})),p(this,pn)>0){var t=Y(this,$t,document.createDocumentFragment());ta(p(this,Lt),t);const n=p(this,Nt).pending;Y(this,rt,at(()=>n(p(this,pt))))}else ne(this,Ie,fi).call(this)}catch(n){this.error(n)}},fi=function(){this.is_pending=!1;for(const t of p(this,rr))ke(t,We),xt(t);for(const t of p(this,ir))ke(t,mt),xt(t);p(this,rr).clear(),p(this,ir).clear()},pi=function(t){var n=re,r=J,i=Se;Dt(p(this,Ze)),st(p(this,Ze)),Fn(p(this,Ze).ctx);try{return t()}catch(a){return Po(a),null}finally{Dt(n),st(r),Fn(i)}},po=function(t){var n;if(!this.has_pending_snippet()){this.parent&&ne(n=this.parent,Ie,po).call(n,t);return}Y(this,pn,p(this,pn)+t),p(this,pn)===0&&(ne(this,Ie,fi).call(this),p(this,rt)&&En(p(this,rt),()=>{Y(this,rt,null)}),p(this,$t)&&(p(this,pt).before(p(this,$t)),Y(this,$t,null)))};function ul(e,t,n,r){const i=Hn()?Yr:Si;var a=e.filter(m=>!m.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var l=re,c=dl(),s=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(m=>m.promise)):null;function u(m){c();try{r(m)}catch(d){l.f&Vt||an(d,l)}ki()}if(n.length===0){s.then(()=>u(t.map(i)));return}function h(){c(),Promise.all(n.map(m=>pl(m))).then(m=>u([...t.map(i),...m])).catch(m=>an(m,l))}s?s.then(h):h()}function dl(){var e=re,t=J,n=Se,r=Q;return function(a=!0){Dt(e),st(t),Fn(n),a&&(r==null||r.activate())}}function ki(e=!0){Dt(null),st(null),Fn(null),e&&(Q==null||Q.deactivate())}function fl(){var e=re.b,t=Q,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Yr(e){var t=Me|We,n=J!==null&&J.f&Me?J:null;return re!==null&&(re.f|=jn),{ctx:Se,deps:null,effects:null,equals:Co,f:t,fn:e,reactions:null,rv:0,v:Re,wv:0,parent:n??re,ac:null}}function pl(e,t,n){re===null&&qs();var i=void 0,a=Sn(Re),l=!J,c=new Map;return Tl(()=>{var d;var s=yo();i=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).finally(ki)}catch(w){s.reject(w),ki()}var u=Q;if(l){var h=fl();(d=c.get(u))==null||d.reject(xn),c.delete(u),c.set(u,s)}const m=(w,_=void 0)=>{if(u.activate(),_)_!==xn&&(a.f|=on,Gn(a,_));else{a.f&on&&(a.f^=on),Gn(a,w);for(const[y,f]of c){if(c.delete(y),y===u)break;f.reject(xn)}}h&&h()};s.promise.then(m,w=>m(null,w||"unknown"))}),Pi(()=>{for(const s of c.values())s.reject(xn)}),new Promise(s=>{function u(h){function m(){h===i?s(a):u(i)}h.then(m,m)}u(i)})}function U(e){const t=Yr(e);return ra(t),t}function Si(e){const t=Yr(e);return t.equals=Eo,t}function vl(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ye(t[n])}}function hl(e){for(var t=e.parent;t!==null;){if(!(t.f&Me))return t.f&Vt?null:t;t=t.parent}return null}function Ci(e){var t,n=re;Dt(hl(e));try{e.f&=~bn,vl(e),t=la(e)}finally{Dt(n)}return t}function Lo(e){var t=Ci(e);if(!e.equals(t)&&(e.wv=aa(),(!(Q!=null&&Q.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){ke(e,Ae);return}cn||(Ne!==null?(Ti()||Q!=null&&Q.is_fork)&&Ne.set(e,t):bi(e))}function gl(e){var t,n;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(n=r.ac)==null||n.abort(xn),r.teardown=gi,r.ac=null,Cr(r,0),Ai(r))}function zo(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Vn(t)}let Ei=new Set;const ln=new Map;let Bo=!1;function Sn(e,t){var n={f:0,v:e,reactions:null,equals:Co,rv:0,wv:0};return n}function H(e,t){const n=Sn(e);return ra(n),n}function wl(e,t=!1,n=!0){var i;const r=Sn(e);return t||(r.equals=Eo),Un&&n&&Se!==null&&Se.l!==null&&((i=Se.l).s??(i.s=[])).push(r),r}function v(e,t,n=!1){J!==null&&(!kt||J.f&ko)&&Hn()&&J.f&(Me|Gt|_i|ko)&&(lt===null||!On.call(lt,e))&&Xs();let r=n?Le(t):t;return Gn(e,r)}function Gn(e,t){if(!e.equals(t)){var n=e.v;cn?ln.set(e,t):ln.set(e,n),e.v=t;var r=sn.ensure();if(r.capture(e,n),e.f&Me){const i=e;e.f&We&&Ci(i),bi(i)}e.wv=aa(),qo(e,We),Hn()&&re!==null&&re.f&Ae&&!(re.f&(wt|wn))&&(ct===null?Al([e]):ct.push(e)),!r.is_fork&&Ei.size>0&&!Bo&&ml()}return t}function ml(){Bo=!1;for(const e of Ei)e.f&Ae&&ke(e,mt),Sr(e)&&Vn(e);Ei.clear()}function Oo(e,t=1){var n=o(e),r=t===1?n++:n--;return v(e,n),r}function yr(e){v(e,e.v+1)}function qo(e,t){var n=e.reactions;if(n!==null)for(var r=Hn(),i=n.length,a=0;a<i;a++){var l=n[a],c=l.f;if(!(!r&&l===re)){var s=(c&We)===0;if(s&&ke(l,t),c&Me){var u=l;Ne==null||Ne.delete(u),c&bn||(c&ot&&(l.f|=bn),qo(u,mt))}else s&&(c&Gt&&yt!==null&&yt.add(l),xt(l))}}}function Le(e){if(typeof e!="object"||e===null||yn in e)return e;const t=_o(e);if(t!==Rs&&t!==Ms)return e;var n=new Map,r=hi(e),i=H(0),a=Pn,l=c=>{if(Pn===a)return c();var s=J,u=Pn;st(null),oa(a);var h=c();return st(s),oa(u),h};return r&&n.set("length",H(e.length)),new Proxy(e,{defineProperty(c,s,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ks();var h=n.get(s);return h===void 0?l(()=>{var m=H(u.value);return n.set(s,m),m}):v(h,u.value,!0),!0},deleteProperty(c,s){var u=n.get(s);if(u===void 0){if(s in c){const h=l(()=>H(Re));n.set(s,h),yr(i)}}else v(u,Re),yr(i);return!0},get(c,s,u){var w;if(s===yn)return e;var h=n.get(s),m=s in c;if(h===void 0&&(!m||(w=qn(c,s))!=null&&w.writable)&&(h=l(()=>{var _=Le(m?c[s]:Re),y=H(_);return y}),n.set(s,h)),h!==void 0){var d=o(h);return d===Re?void 0:d}return Reflect.get(c,s,u)},getOwnPropertyDescriptor(c,s){var u=Reflect.getOwnPropertyDescriptor(c,s);if(u&&"value"in u){var h=n.get(s);h&&(u.value=o(h))}else if(u===void 0){var m=n.get(s),d=m==null?void 0:m.v;if(m!==void 0&&d!==Re)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(c,s){var d;if(s===yn)return!0;var u=n.get(s),h=u!==void 0&&u.v!==Re||Reflect.has(c,s);if(u!==void 0||re!==null&&(!h||(d=qn(c,s))!=null&&d.writable)){u===void 0&&(u=l(()=>{var w=h?Le(c[s]):Re,_=H(w);return _}),n.set(s,u));var m=o(u);if(m===Re)return!1}return h},set(c,s,u,h){var B;var m=n.get(s),d=s in c;if(r&&s==="length")for(var w=u;w<m.v;w+=1){var _=n.get(w+"");_!==void 0?v(_,Re):w in c&&(_=l(()=>H(Re)),n.set(w+"",_))}if(m===void 0)(!d||(B=qn(c,s))!=null&&B.writable)&&(m=l(()=>H(void 0)),v(m,Le(u)),n.set(s,m));else{d=m.v!==Re;var y=l(()=>Le(u));v(m,y)}var f=Reflect.getOwnPropertyDescriptor(c,s);if(f!=null&&f.set&&f.set.call(h,u),!d){if(r&&typeof s=="string"){var b=n.get("length"),D=Number(s);Number.isInteger(D)&&D>=b.v&&v(b,D+1)}yr(i)}return!0},ownKeys(c){o(i);var s=Reflect.ownKeys(c).filter(m=>{var d=n.get(m);return d===void 0||d.v!==Re});for(var[u,h]of n)h.v!==Re&&!(u in c)&&s.push(u);return s},setPrototypeOf(){Ys()}})}function jo(e){try{if(e!==null&&typeof e=="object"&&yn in e)return e[yn]}catch{}return e}function _l(e,t){return Object.is(jo(e),jo(t))}var Uo,Fo,Ho,Go;function bl(){if(Uo===void 0){Uo=window,Fo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ho=qn(t,"firstChild").get,Go=qn(t,"nextSibling").get,bo(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),bo(n)&&(n.__t=void 0)}}function Xt(e=""){return document.createTextNode(e)}function Qt(e){return Ho.call(e)}function xr(e){return Go.call(e)}function x(e,t){return Qt(e)}function qe(e,t=!1){{var n=Qt(e);return n instanceof Comment&&n.data===""?xr(n):n}}function P(e,t=1,n=!1){let r=e;for(;t--;)r=xr(r);return r}function yl(e){e.textContent=""}function Vo(){return!1}function Ko(e,t,n){return document.createElementNS(mo,e,void 0)}let Yo=!1;function xl(){Yo||(Yo=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function Xr(e){var t=J,n=re;st(null),Dt(null);try{return e()}finally{st(t),Dt(n)}}function kl(e,t,n,r=n){e.addEventListener(t,()=>Xr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),xl()}function Sl(e){re===null&&(J===null&&Hs(),Fs()),cn&&Us()}function Cl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Zt(e,t,n){var r=re;r!==null&&r.f&$e&&(e|=$e);var i={ctx:Se,deps:null,nodes:null,f:e|We|ot,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{Vn(i)}catch(c){throw Ye(i),c}else t!==null&&xt(i);var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&jn)&&(a=a.first,e&Gt&&e&_n&&a!==null&&(a.f|=_n)),a!==null&&(a.parent=r,r!==null&&Cl(a,r),J!==null&&J.f&Me&&!(e&wn))){var l=J;(l.effects??(l.effects=[])).push(a)}return i}function Ti(){return J!==null&&!kt}function Pi(e){const t=Zt(Gr,null,!1);return ke(t,Ae),t.teardown=e,t}function Cn(e){Sl();var t=re.f,n=!J&&(t&wt)!==0&&(t&mn)===0;if(n){var r=Se;(r.e??(r.e=[])).push(e)}else return Xo(e)}function Xo(e){return Zt(_r|Ls,e,!1)}function El(e){sn.ensure();const t=Zt(wn|jn,e,!0);return(n={})=>new Promise(r=>{n.outro?En(t,()=>{Ye(t),r(void 0)}):(Ye(t),r(void 0))})}function Qo(e){return Zt(_r,e,!1)}function Tl(e){return Zt(_i|jn,e,!0)}function Ii(e,t=0){return Zt(Gr|t,e,!0)}function W(e,t=[],n=[],r=[]){ul(r,t,n,i=>{Zt(Gr,()=>e(...i.map(o)),!0)})}function kr(e,t=0){var n=Zt(Gt|t,e,!0);return n}function at(e){return Zt(wt|jn,e,!0)}function Zo(e){var t=e.teardown;if(t!==null){const n=cn,r=J;na(!0),st(null);try{t.call(null)}finally{na(n),st(r)}}}function Ai(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Xr(()=>{i.abort(xn)});var r=n.next;n.f&wn?n.parent=null:Ye(n,t),n=r}}function Pl(e){for(var t=e.first;t!==null;){var n=t.next;t.f&wt||Ye(t),t=n}}function Ye(e,t=!0){var n=!1;(t||e.f&So)&&e.nodes!==null&&e.nodes.end!==null&&(Il(e.nodes.start,e.nodes.end),n=!0),Ai(e,t&&!n),Cr(e,0),ke(e,Vt);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();Zo(e);var i=e.parent;i!==null&&i.first!==null&&Jo(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Il(e,t){for(;e!==null;){var n=e===t?null:xr(e);e.remove(),e=n}}function Jo(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function En(e,t,n=!0){var r=[];$o(e,r,!0);var i=()=>{n&&Ye(e),t&&t()},a=r.length;if(a>0){var l=()=>--a||i();for(var c of r)c.out(l)}else i()}function $o(e,t,n){if(!(e.f&$e)){e.f^=$e;var r=e.nodes&&e.nodes.t;if(r!==null)for(const c of r)(c.is_global||n)&&t.push(c);for(var i=e.first;i!==null;){var a=i.next,l=(i.f&_n)!==0||(i.f&wt)!==0&&(e.f&Gt)!==0;$o(i,t,l?n:!1),i=a}}}function Di(e){ea(e,!0)}function ea(e,t){if(e.f&$e){e.f^=$e,e.f&Ae||(ke(e,We),xt(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&_n)!==0||(n.f&wt)!==0;ea(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||t)&&l.in()}}function ta(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:xr(n);t.append(n),n=i}}let Qr=!1,cn=!1;function na(e){cn=e}let J=null,kt=!1;function st(e){J=e}let re=null;function Dt(e){re=e}let lt=null;function ra(e){J!==null&&(lt===null?lt=[e]:lt.push(e))}let Xe=null,et=0,ct=null;function Al(e){ct=e}let ia=1,Tn=0,Pn=Tn;function oa(e){Pn=e}function aa(){return++ia}function Sr(e){var t=e.f;if(t&We)return!0;if(t&Me&&(e.f&=~bn),t&mt){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Sr(a)&&Lo(a),a.wv>e.wv)return!0}t&ot&&Ne===null&&ke(e,Ae)}return!1}function sa(e,t,n=!0){var r=e.reactions;if(r!==null&&!(lt!==null&&On.call(lt,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&Me?sa(a,t,!1):t===a&&(n?ke(a,We):a.f&Ae&&ke(a,mt),xt(a))}}function la(e){var y;var t=Xe,n=et,r=ct,i=J,a=lt,l=Se,c=kt,s=Pn,u=e.f;Xe=null,et=0,ct=null,J=u&(wt|wn)?null:e,lt=null,Fn(e.ctx),kt=!1,Pn=++Tn,e.ac!==null&&(Xr(()=>{e.ac.abort(xn)}),e.ac=null);try{e.f|=mi;var h=e.fn,m=h();e.f|=mn;var d=e.deps,w=Q==null?void 0:Q.is_fork;if(Xe!==null){var _;if(w||Cr(e,et),d!==null&&et>0)for(d.length=et+Xe.length,_=0;_<Xe.length;_++)d[et+_]=Xe[_];else e.deps=d=Xe;if(Ti()&&e.f&ot)for(_=et;_<d.length;_++)((y=d[_]).reactions??(y.reactions=[])).push(e)}else!w&&d!==null&&et<d.length&&(Cr(e,et),d.length=et);if(Hn()&&ct!==null&&!kt&&d!==null&&!(e.f&(Me|mt|We)))for(_=0;_<ct.length;_++)sa(ct[_],e);if(i!==null&&i!==e){if(Tn++,i.deps!==null)for(let f=0;f<n;f+=1)i.deps[f].rv=Tn;if(t!==null)for(const f of t)f.rv=Tn;ct!==null&&(r===null?r=ct:r.push(...ct))}return e.f&on&&(e.f^=on),m}catch(f){return Po(f)}finally{e.f^=mi,Xe=t,et=n,ct=r,J=i,lt=a,Fn(l),kt=c,Pn=s}}function Dl(e,t){let n=t.reactions;if(n!==null){var r=Is.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&Me&&(Xe===null||!On.call(Xe,t))){var a=t;a.f&ot&&(a.f^=ot,a.f&=~bn),bi(a),gl(a),Cr(a,0)}}function Cr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Dl(e,n[r])}function Vn(e){var t=e.f;if(!(t&Vt)){ke(e,Ae);var n=re,r=Qr;re=e,Qr=!0;try{t&(Gt|xo)?Pl(e):Ai(e),Zo(e);var i=la(e);e.teardown=typeof i=="function"?i:null,e.wv=ia;var a;vi&&el&&e.f&We&&e.deps}finally{Qr=r,re=n}}}async function Rl(){await Promise.resolve(),il()}function o(e){var t=e.f,n=(t&Me)!==0;if(J!==null&&!kt){var r=re!==null&&(re.f&Vt)!==0;if(!r&&(lt===null||!On.call(lt,e))){var i=J.deps;if(J.f&mi)e.rv<Tn&&(e.rv=Tn,Xe===null&&i!==null&&i[et]===e?et++:Xe===null?Xe=[e]:Xe.push(e));else{(J.deps??(J.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[J]:On.call(a,J)||a.push(J)}}}if(cn&&ln.has(e))return ln.get(e);if(n){var l=e;if(cn){var c=l.v;return(!(l.f&Ae)&&l.reactions!==null||ua(l))&&(c=Ci(l)),ln.set(l,c),c}var s=(l.f&ot)===0&&!kt&&J!==null&&(Qr||(J.f&ot)!==0),u=(l.f&mn)===0;Sr(l)&&(s&&(l.f|=ot),Lo(l)),s&&!u&&(zo(l),ca(l))}if(Ne!=null&&Ne.has(e))return Ne.get(e);if(e.f&on)throw e.v;return e.v}function ca(e){if(e.f|=ot,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&Me&&!(t.f&ot)&&(zo(t),ca(t))}function ua(e){if(e.v===Re)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ln.has(t)||t.f&Me&&ua(t))return!0;return!1}function Er(e){var t=kt;try{return kt=!0,e()}finally{kt=t}}const In=Symbol("events"),da=new Set,Ri=new Set;function Ml(e,t,n,r={}){function i(a){if(r.capture||Mi.call(t,a),!a.cancelBubble)return Xr(()=>n==null?void 0:n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Yt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ut(e,t,n,r,i){var a={capture:r,passive:i},l=Ml(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pi(()=>{t.removeEventListener(e,l,a)})}function De(e,t,n){(t[In]??(t[In]={}))[e]=n}function Tr(e){for(var t=0;t<e.length;t++)da.add(e[t]);for(var n of Ri)n(e)}let fa=null;function Mi(e){var f,b;var t=this,n=t.ownerDocument,r=e.type,i=((f=e.composedPath)==null?void 0:f.call(e))||[],a=i[0]||e.target;fa=e;var l=0,c=fa===e&&e[In];if(c){var s=i.indexOf(c);if(s!==-1&&(t===document||t===window)){e[In]=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(l=s)}if(a=i[l]||e.target,a!==t){As(e,"currentTarget",{configurable:!0,get(){return a||n}});var h=J,m=re;st(null),Dt(null);try{for(var d,w=[];a!==null;){var _=a.assignedSlot||a.parentNode||a.host||null;try{var y=(b=a[In])==null?void 0:b[r];y!=null&&(!a.disabled||e.target===a)&&y.call(a,e)}catch(D){d?w.push(D):d=D}if(e.cancelBubble||_===t||_===null)break;a=_}if(d){for(let D of w)queueMicrotask(()=>{throw D});throw d}}finally{e[In]=t,delete e.currentTarget,st(h),Dt(m)}}}const Wi=((fs=globalThis==null?void 0:globalThis.window)==null?void 0:fs.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Wl(e){return(Wi==null?void 0:Wi.createHTML(e))??e}function pa(e){var t=Ko("template");return t.innerHTML=Wl(e.replaceAll("<!>","<!---->")),t.content}function Kn(e,t){var n=re;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function L(e,t){var n=(t&wo)!==0,r=(t&Ps)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=pa(a?e:"<!>"+e),n||(i=Qt(i)));var l=r||Fo?document.importNode(i,!0):i.cloneNode(!0);if(n){var c=Qt(l),s=l.lastChild;Kn(c,s)}else Kn(l,l);return l}}function Nl(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&wo)!==0,a=`<${n}>${r?e:"<!>"+e}</${n}>`,l;return()=>{if(!l){var c=pa(a),s=Qt(c);if(i)for(l=document.createDocumentFragment();Qt(s);)l.appendChild(Qt(s));else l=Qt(s)}var u=l.cloneNode(!0);if(i){var h=Qt(u),m=u.lastChild;Kn(h,m)}else Kn(u,u);return u}}function St(e,t){return Nl(e,t,"svg")}function Jt(e=""){{var t=Xt(e+"");return Kn(t,t),t}}function Yn(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Xt();return e.append(t,n),Kn(t,n),e}function k(e,t){e!==null&&e.before(t)}const Ll=["touchstart","touchmove"];function zl(e){return Ll.includes(e)}function O(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=`${n}`)}function Bl(e,t){return Ol(e,t)}const Zr=new Map;function Ol(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:l=!0,transformError:c}){bl();var s=void 0,u=El(()=>{var h=n??t.appendChild(Xt());ll(h,{pending:()=>{}},w=>{_t({});var _=Se;a&&(_.c=a),i&&(r.$$events=i),s=e(w,r)||{},bt()},c);var m=new Set,d=w=>{for(var _=0;_<w.length;_++){var y=w[_];if(!m.has(y)){m.add(y);var f=zl(y);for(const B of[t,document]){var b=Zr.get(B);b===void 0&&(b=new Map,Zr.set(B,b));var D=b.get(y);D===void 0?(B.addEventListener(y,Mi,{passive:f}),b.set(y,1)):b.set(y,D+1)}}}};return d(Hr(da)),Ri.add(d),()=>{var f;for(var w of m)for(const b of[t,document]){var _=Zr.get(b),y=_.get(w);--y==0?(b.removeEventListener(w,Mi),_.delete(w),_.size===0&&Zr.delete(b)):_.set(w,y)}Ri.delete(d),h!==n&&((f=h.parentNode)==null||f.removeChild(h))}});return ql.set(s,u),s}let ql=new WeakMap;class Ni{constructor(t,n=!0){gt(this,"anchor");X(this,Pt,new Map);X(this,zt,new Map);X(this,it,new Map);X(this,Wn,new Set);X(this,Nr,!0);X(this,Lr,()=>{var t=Q;if(p(this,Pt).has(t)){var n=p(this,Pt).get(t),r=p(this,zt).get(n);if(r)Di(r),p(this,Wn).delete(n);else{var i=p(this,it).get(n);i&&(p(this,zt).set(n,i.effect),p(this,it).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[a,l]of p(this,Pt)){if(p(this,Pt).delete(a),a===t)break;const c=p(this,it).get(l);c&&(Ye(c.effect),p(this,it).delete(l))}for(const[a,l]of p(this,zt)){if(a===n||p(this,Wn).has(a))continue;const c=()=>{if(Array.from(p(this,Pt).values()).includes(a)){var u=document.createDocumentFragment();ta(l,u),u.append(Xt()),p(this,it).set(a,{effect:l,fragment:u})}else Ye(l);p(this,Wn).delete(a),p(this,zt).delete(a)};p(this,Nr)||!r?(p(this,Wn).add(a),En(l,c,!1)):c()}}});X(this,ci,t=>{p(this,Pt).delete(t);const n=Array.from(p(this,Pt).values());for(const[r,i]of p(this,it))n.includes(r)||(Ye(i.effect),p(this,it).delete(r))});this.anchor=t,Y(this,Nr,n)}ensure(t,n){var r=Q,i=Vo();if(n&&!p(this,zt).has(t)&&!p(this,it).has(t))if(i){var a=document.createDocumentFragment(),l=Xt();a.append(l),p(this,it).set(t,{effect:at(()=>n(l)),fragment:a})}else p(this,zt).set(t,at(()=>n(this.anchor)));if(p(this,Pt).set(r,t),i){for(const[c,s]of p(this,zt))c===t?r.unskip_effect(s):r.skip_effect(s);for(const[c,s]of p(this,it))c===t?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(p(this,Lr)),r.ondiscard(p(this,ci))}else p(this,Lr).call(this)}}Pt=new WeakMap,zt=new WeakMap,it=new WeakMap,Wn=new WeakMap,Nr=new WeakMap,Lr=new WeakMap,ci=new WeakMap;function Jr(e){Se===null&&Os(),Un&&Se.l!==null?jl(Se).m.push(e):Cn(()=>{const t=Er(e);if(typeof t=="function")return t})}function jl(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function V(e,t,n=!1){var r=new Ni(e),i=n?_n:0;function a(l,c){r.ensure(l,c)}kr(()=>{var l=!1;t((c,s=0)=>{l=!0,a(s,c)}),l||a(!1,null)},i)}const Ul=Symbol("NaN");function va(e,t,n){var r=new Ni(e),i=!Hn();kr(()=>{var a=t();a!==a&&(a=Ul),i&&a!==null&&typeof a=="object"&&(a={}),r.ensure(a,n)})}function An(e,t){return t}function Fl(e,t,n){for(var r=[],i=t.length,a,l=t.length,c=0;c<i;c++){let m=t[c];En(m,()=>{if(a){if(a.pending.delete(m),a.done.add(m),a.pending.size===0){var d=e.outrogroups;Li(Hr(a.done)),d.delete(a),d.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var s=r.length===0&&n!==null;if(s){var u=n,h=u.parentNode;yl(h),h.append(u),e.items.clear()}Li(t,!s)}else a={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function Li(e,t=!0){for(var n=0;n<e.length;n++)Ye(e[n],t)}var ha;function Rt(e,t,n,r,i,a=null){var l=e,c=new Map,s=(t&mr)!==0;if(s){var u=e;l=u.appendChild(Xt())}var h=null,m=Si(()=>{var b=n();return hi(b)?b:b==null?[]:Hr(b)}),d,w=!0;function _(){f.fallback=h,Hl(f,d,l,t,r),h!==null&&(d.length===0?h.f&Kt?(h.f^=Kt,Ir(h,null,l)):Di(h):En(h,()=>{h=null}))}var y=kr(()=>{d=o(m);for(var b=d.length,D=new Set,B=Q,E=Vo(),R=0;R<b;R+=1){var M=d[R],S=r(M,R),I=w?null:c.get(S);I?(I.v&&Gn(I.v,M),I.i&&Gn(I.i,R),E&&B.unskip_effect(I.e)):(I=Gl(c,w?l:ha??(ha=Xt()),M,S,R,i,t,n),w||(I.e.f|=Kt),c.set(S,I)),D.add(S)}if(b===0&&a&&!h&&(w?h=at(()=>a(l)):(h=at(()=>a(ha??(ha=Xt()))),h.f|=Kt)),b>D.size&&js(),!w)if(E){for(const[F,G]of c)D.has(F)||B.skip_effect(G.e);B.oncommit(_),B.ondiscard(()=>{})}else _();o(m)}),f={effect:y,items:c,outrogroups:null,fallback:h};w=!1}function Pr(e){for(;e!==null&&!(e.f&wt);)e=e.next;return e}function Hl(e,t,n,r,i){var G,de,we,Ee,je,Ue,_e,Be,Bt;var a=(r&ys)!==0,l=t.length,c=e.items,s=Pr(e.effect.first),u,h=null,m,d=[],w=[],_,y,f,b;if(a)for(b=0;b<l;b+=1)_=t[b],y=i(_,b),f=c.get(y).e,f.f&Kt||((de=(G=f.nodes)==null?void 0:G.a)==null||de.measure(),(m??(m=new Set)).add(f));for(b=0;b<l;b+=1){if(_=t[b],y=i(_,b),f=c.get(y).e,e.outrogroups!==null)for(const ce of e.outrogroups)ce.pending.delete(f),ce.done.delete(f);if(f.f&Kt)if(f.f^=Kt,f===s)Ir(f,null,n);else{var D=h?h.next:s;f===e.effect.last&&(e.effect.last=f.prev),f.prev&&(f.prev.next=f.next),f.next&&(f.next.prev=f.prev),un(e,h,f),un(e,f,D),Ir(f,D,n),h=f,d=[],w=[],s=Pr(h.next);continue}if(f.f&$e&&(Di(f),a&&((Ee=(we=f.nodes)==null?void 0:we.a)==null||Ee.unfix(),(m??(m=new Set)).delete(f))),f!==s){if(u!==void 0&&u.has(f)){if(d.length<w.length){var B=w[0],E;h=B.prev;var R=d[0],M=d[d.length-1];for(E=0;E<d.length;E+=1)Ir(d[E],B,n);for(E=0;E<w.length;E+=1)u.delete(w[E]);un(e,R.prev,M.next),un(e,h,R),un(e,M,B),s=B,h=M,b-=1,d=[],w=[]}else u.delete(f),Ir(f,s,n),un(e,f.prev,f.next),un(e,f,h===null?e.effect.first:h.next),un(e,h,f),h=f;continue}for(d=[],w=[];s!==null&&s!==f;)(u??(u=new Set)).add(s),w.push(s),s=Pr(s.next);if(s===null)continue}f.f&Kt||d.push(f),h=f,s=Pr(f.next)}if(e.outrogroups!==null){for(const ce of e.outrogroups)ce.pending.size===0&&(Li(Hr(ce.done)),(je=e.outrogroups)==null||je.delete(ce));e.outrogroups.size===0&&(e.outrogroups=null)}if(s!==null||u!==void 0){var S=[];if(u!==void 0)for(f of u)f.f&$e||S.push(f);for(;s!==null;)!(s.f&$e)&&s!==e.fallback&&S.push(s),s=Pr(s.next);var I=S.length;if(I>0){var F=r&mr&&l===0?n:null;if(a){for(b=0;b<I;b+=1)(_e=(Ue=S[b].nodes)==null?void 0:Ue.a)==null||_e.measure();for(b=0;b<I;b+=1)(Bt=(Be=S[b].nodes)==null?void 0:Be.a)==null||Bt.fix()}Fl(e,S,F)}}a&&Yt(()=>{var ce,tn;if(m!==void 0)for(f of m)(tn=(ce=f.nodes)==null?void 0:ce.a)==null||tn.apply()})}function Gl(e,t,n,r,i,a,l,c){var s=l&le?l&xs?Sn(n):wl(n,!1,!1):null,u=l&Te?Sn(i):null;return{v:s,i:u,e:at(()=>(a(t,s??n,u??i,c),()=>{e.delete(r)}))}}function Ir(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&Kt)?t.nodes.start:n;r!==null;){var l=xr(r);if(a.before(r),r===i)return;r=l}}function un(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function ga(e,t,n,r,i){var c;var a=(c=t.$$slots)==null?void 0:c[n],l=!1;a===!0&&(a=t.children,l=!0),a===void 0||a(e,l?()=>r:r)}function wa(e,t,n){var r=new Ni(e);kr(()=>{var i=t()??null;r.ensure(i,i&&(a=>n(a,i)))},_n)}function Ct(e,t){Qo(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=Ko("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function ma(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ma(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Vl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ma(e))&&(r&&(r+=" "),r+=t);return r}function Xn(e){return typeof e=="object"?Vl(e):e??""}const _a=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function Kl(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var a=i.length,l=0;(l=r.indexOf(i,l))>=0;){var c=l+a;(l===0||_a.includes(r[l-1]))&&(c===r.length||_a.includes(r[c]))?r=(l===0?"":r.substring(0,l))+r.substring(c+1):l=c}}return r===""?null:r}function ba(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==""&&(r+=" "+i+": "+a+n)}return r}function Yl(e,t){if(t){var n="",r,i;return Array.isArray(t)?(r=t[0],i=t[1]):r=t,r&&(n+=ba(r)),i&&(n+=ba(i,!0)),n=n.trim(),n===""?null:n}return String(e)}function tt(e,t,n,r,i,a){var l=e.__className;if(l!==n||l===void 0){var c=Kl(n,r,a);c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c),e.__className=n}else if(a&&i!==a)for(var s in a){var u=!!a[s];(i==null||u!==!!i[s])&&e.classList.toggle(s,u)}return a}function zi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function $r(e,t,n,r){var i=e.__style;if(i!==t){var a=Yl(t,r);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=t}else r&&(Array.isArray(r)?(zi(e,n==null?void 0:n[0],r[0]),zi(e,n==null?void 0:n[1],r[1],"important")):zi(e,n,r));return r}function ya(e,t,n=!1){if(e.multiple){if(t==null)return;if(!hi(t))return Zs();for(var r of e.options)r.selected=t.includes(xa(r));return}for(r of e.options){var i=xa(r);if(_l(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Xl(e){var t=new MutationObserver(()=>{ya(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Pi(()=>{t.disconnect()})}function xa(e){return"__value"in e?e.__value:e.value}const Ql=Symbol("is custom element"),Zl=Symbol("is html");function Jl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function N(e,t,n,r){var i=$l(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Bs]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ec(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $l(e){return e.__attributes??(e.__attributes={[Ql]:e.nodeName.includes("-"),[Zl]:e.namespaceURI===mo})}var ka=new Map;function ec(e){var t=e.getAttribute("is")||e.nodeName,n=ka.get(t);if(n)return n;ka.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=Ds(i);for(var l in r)r[l].set&&n.push(l);i=_o(i)}return n}function tc(e,t,n=t){var r=new WeakSet;kl(e,"input",async i=>{var a=i?e.defaultValue:e.value;if(a=Bi(e)?Oi(a):a,n(a),Q!==null&&r.add(Q),await Rl(),a!==(a=t())){var l=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=a??"",c!==null){var u=e.value.length;l===c&&c===s&&u>s?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=l,e.selectionEnd=Math.min(c,u))}}}),Er(t)==null&&e.value&&(n(Bi(e)?Oi(e.value):e.value),Q!==null&&r.add(Q)),Ii(()=>{var i=t();if(e===document.activeElement){var a=yi??Q;if(r.has(a))return}Bi(e)&&i===Oi(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Bi(e){var t=e.type;return t==="number"||t==="range"}function Oi(e){return e===""?null:+e}function Sa(e,t){return e===t||(e==null?void 0:e[yn])===t}function Ca(e={},t,n,r){return Qo(()=>{var i,a;return Ii(()=>{i=a,a=[],Er(()=>{e!==n(...a)&&(t(e,...a),i&&Sa(n(...i),e)&&t(null,...i))})}),()=>{Yt(()=>{a&&Sa(n(...a),e)&&t(null,...a)})}}),e}let ei=!1;function nc(e){var t=ei;try{return ei=!1,[e(),ei]}finally{ei=t}}function Qe(e,t,n,r){var B;var i=!Un||(n&Ss)!==0,a=(n&Es)!==0,l=(n&Ts)!==0,c=r,s=!0,u=()=>(s&&(s=!1,c=l?Er(r):r),c),h;if(a){var m=yn in e||zs in e;h=((B=qn(e,t))==null?void 0:B.set)??(m&&t in e?E=>e[t]=E:void 0)}var d,w=!1;a?[d,w]=nc(()=>e[t]):d=e[t],d===void 0&&r!==void 0&&(d=u(),h&&(i&&Vs(),h(d)));var _;if(i?_=()=>{var E=e[t];return E===void 0?u():(s=!0,E)}:_=()=>{var E=e[t];return E!==void 0&&(c=void 0),E===void 0?c:E},i&&!(n&Cs))return _;if(h){var y=e.$$legacy;return function(E,R){return arguments.length>0?((!i||!R||y||w)&&h(R?_():E),E):_()}}var f=!1,b=(n&ks?Yr:Si)(()=>(f=!1,_()));a&&o(b);var D=re;return function(E,R){if(arguments.length>0){const M=R?o(b):i&&a?Le(E):E;return v(b,M),f=!0,c!==void 0&&(c=M),E}return cn&&f||D.f&Vt?b.v:o(b)}}const Ea="wineater_consent",rc=["wineater_uid","uniqueUserID","sessionID"];function ic(){try{const e=window.localStorage.getItem(Ea);return e==="granted"||e==="denied"?e:null}catch{return null}}let qi=H(Le(ic())),ti=H(null),ni=null;function oc(e){ni=e}function ac(e){v(ti,e,!0)}function Ta(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:o(ti)===!0}function sc(){return ni?!1:o(ti)!==null&&Ta()&&o(qi)===null}function Pa(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1?!1:ni?ni():o(ti)===null?!1:Ta()?o(qi)==="granted":!0}function lc(){for(const e of rc){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const ji=new Set;function cc(e){return ji.add(e),()=>ji.delete(e)}function Ia(e){v(qi,e,!0);try{window.localStorage.setItem(Ea,e)}catch{}e==="denied"&&lc();for(const t of ji)t(e)}const uc=/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/;function dc(e){if(!e||typeof e!="object")return null;const t=e,n=String(t.shop??"").trim().toLowerCase();if(!uc.test(n))return null;const r=typeof t.root=="string"&&t.root.startsWith("/")?t.root:"/";return{shop:n,locale:typeof t.locale=="string"&&t.locale?t.locale:null,currency:typeof t.currency=="string"&&t.currency?t.currency:null,root:r.endsWith("/")?r:`${r}/`,config:t.config&&typeof t.config=="object"?t.config:null,color:typeof t.color=="string"&&/^#[0-9a-f]{3,8}$/i.test(t.color)?t.color:null}}let Ui;function dt(){var e;return Ui===void 0&&(Ui=typeof window>"u"?null:dc((e=window.wineaterData)==null?void 0:e.shopify)),Ui}function Aa(e){var r;const t=(r=/[?&]variant=(\d+)/.exec(e.url??""))==null?void 0:r[1];if(t)return t;const n=String(e.itemId??"").trim();return/^\d+$/.test(n)?n:null}function fc(e,t,n){const r=i=>(i??"").toLowerCase().split("-")[0];for(const i of[r(e),r(t)])if(i&&n.includes(i))return i;return"en"}function pc(e,t){return e===429&&(t==null?void 0:t.code)==="quota_exceeded"}class Da extends Error{constructor(){super("quota_exceeded"),this.name="QuotaExceededError"}}let Fi=null;function Ra(){var t,n;if(Fi)return Fi;let e=null;try{e=window.sessionStorage.getItem("wineater_sf_session")}catch{}if(!e){e=((n=(t=globalThis.crypto)==null?void 0:t.randomUUID)==null?void 0:n.call(t))??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;try{window.sessionStorage.setItem("wineater_sf_session",e)}catch{}}return Fi=e,e}function vc(){var e;try{const t=(e=window.Shopify)==null?void 0:e.customerPrivacy;if(t&&typeof t.analyticsProcessingAllowed=="function")return t.analyticsProcessingAllowed()===!0}catch{}return!1}function hc(){try{const e=window.Shopify;if(e!=null&&e.customerPrivacy||typeof(e==null?void 0:e.loadFeatures)!="function")return;e.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],()=>{})}catch{}}const Ma="5.0.0";function Wa(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Hi(e,t,n){let r="";if(n){const i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),r="; expires="+i.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/; secure; samesite=strict"}function Gi(e){const t=e+"=",n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function gc(){const e="uniqueUserID";let t=Gi(e);return t||(t=Wa(),Hi(e,t,365)),t}function Pe(e,t,n={},r={}){var _;const i=(_=dt())==null?void 0:_.shop,a=i?"https://api.wineater.com/shopify/storefront/events":"https://api.wineater.com/api/widget-events",l=i?{shop:i}:{},c=new Date().toISOString(),s=navigator.language.split("-")[1]||null,u=navigator.language.split("-")[0]||"en";if(!Pa()){const y={...l,event_type:e,store_id:t,event_time:c,data:n,meta:{...r,anonymous:!0,widget_version:Ma},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:u};return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y),keepalive:!0}).catch(f=>{console.debug("[wineater] anonymous event failed:",f==null?void 0:f.message)})}let h=Gi("uniqueUserID");h||(h=gc());const m={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let d=Gi("sessionID");d||(d=Wa(),Hi("sessionID",d,1));const w={...l,event_type:e,store_id:t,session_id:d,event_time:c,data:n,meta:{...r,user_id:h,widget_version:Ma},device_info:m,region:s,language:u};return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w),keepalive:!!i}).then(y=>y.ok?y.json():y.json().then(f=>{throw new Error(f.message||"Failed to track widget event")})).catch(y=>{throw console.error("Widget event tracking error:",y),y})}function wc(e){return{id:String(e.ID),appellation:e.Appellation||null,country:e.Country||null,grape:e.Grape,image:e.Image,price:Number(e.Price),producer:e.Producer||null,region:e.Region,score:e.Score?Number(e.Score):null,shortDescription:e["Short Description"]||null,store:e.Store,storeId:e.Store_id||null,tags:Array.isArray(e.Tags)?e.Tags.map(String):[],title:e.Title,type:e.Type,url:e.Url||null,vintage:e.Vintage?Number(e.Vintage):null,pairingRecommendation:e.pairing_recommendation||null,total:e.Total?Number(e.Total):null,itemId:e.item_id||null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function Ar(e){return{id:String(e.id),title:String(e.title),description:String(e.description),region:String(e.region),price:Number(e.price),grape:String(e.grape),appellation:e.appellation?String(e.appellation):null,url:e.url?String(e.url):null,store:String(e.store),storeId:e.storeId?String(e.storeId):null,image:String(e.image),country:e.country?String(e.country):null,vintage:e.vintage?Number(e.vintage):null,tags:Array.isArray(e.tags)?e.tags.map(String):[],score:e.score?Number(e.score):null,total:e.total?Number(e.total):null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,distance:Number(e.distance),reason:String(e.reason),type:String(e.type),byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function mc(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(Ar),hasMore:!!e.has_more}}const Vi=e=>{if(e==null||e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null};function _c(e){return{cards:((e==null?void 0:e.cards)??[]).filter(n=>n&&n.id!=null).map((n,r)=>({id:String(n.id),title:n.title?String(n.title):"",total:Vi(n.total),type:n.type??null,grape:n.grape??null,region:n.region??null,country:n.country??null,vintage:Vi(n.vintage),image:n.image?String(n.image):"",url:n.url||null,tags:Array.isArray(n.tags)?n.tags.map(String).filter(Boolean):typeof n.tags=="string"?n.tags.split(",").map(i=>i.trim()).filter(Boolean):[],shortDescription:n.short_description||null,producer:n.producer||null,appellation:n.appellation||null,byTheGlass:!!n.by_the_glass,glassPrice:Vi(n.glass_price),priceLevel:n.predicted_price_level||null,rank:r})),queryId:(e==null?void 0:e.query_id)??null}}const Dr="wineater_uid",bc=365;let ri=null;function Na(){const e=globalThis.crypto;if(e!=null&&e.randomUUID)return e.randomUUID();const t=new Uint8Array(16);if(e!=null&&e.getRandomValues)e.getRandomValues(t);else for(let r=0;r<16;r++)t[r]=Math.random()*256|0;t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const La=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function za(e){try{const t=e+"=";for(const n of document.cookie.split(";")){const r=n.trim();if(r.startsWith(t))return decodeURIComponent(r.slice(t.length))}}catch{}return null}function yc(e,t){try{const n=new Date(Date.now()+bc*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function Ba(){return Pa()}cc(e=>{e==="denied"&&(ri=null)});function Ki(){if(!Ba())return null;if(ri)return ri;let e=null;try{e=window.localStorage.getItem(Dr)}catch{}(!e||!La.test(e))&&(e=za(Dr)),(!e||!La.test(e))&&(e=Na());try{window.localStorage.setItem(Dr,e)}catch{}return za(Dr)!==e&&yc(Dr,e),ri=e,e}function Oa(){return Na()}const xc=2e3,qa=100;let ii=null,Qn=[],Rr=null,ja=!1;function kc(e){ii=e,!(ja||typeof document>"u")&&(ja=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Mr()}),window.addEventListener("pagehide",()=>void Mr()))}function Et(e){var t;if(!(!Ba()||!ii)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(Qn.push(e),Qn.length>=qa){Mr();return}Rr||(Rr=setTimeout(()=>void Mr(),xc))}}async function Mr(){if(Rr&&(clearTimeout(Rr),Rr=null),!ii||Qn.length===0)return;const e=Ki();if(!e){Qn=[];return}const t=Qn.splice(0,qa);try{await ii({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}Qn.length>0&&Mr()}const Ua=24;function Fa(e,t,n){return e!=="bar"||!t||!n||t===n?null:t}function oi(e,t){return t?{...e,language:t}:e}function Sc(e,t){const n=t==null?void 0:t.translations;return e.map(r=>{const i=n&&typeof n=="object"?n[r.id]:null,a={};if(i&&typeof i.shortDescription=="string"&&i.shortDescription.trim()&&(a.shortDescription=i.shortDescription),i&&Array.isArray(i.tags)){const l=i.tags.filter(c=>typeof c=="string"&&c.trim());l.length&&(a.tags=l)}return a})}async function Cc(e,t,n){const r=[...new Set(t.filter(Boolean))];if(!r.length||!n)return null;const i={};let a=!1;for(let l=0;l<r.length;l+=Ua)try{const c=await e({ids:r.slice(l,l+Ua),language:n});c&&typeof c.translations=="object"&&c.translations&&(Object.assign(i,c.translations),a=!0)}catch{}return a?{language:n,translations:i}:null}const Ec="X-Wineater-Uid";class Ha extends Error{constructor(n,r){super(`API call failed with status ${n}: ${(r==null?void 0:r.message)||"No additional error information"}`);gt(this,"status");gt(this,"data");this.status=n,this.data=r}}class Tc{constructor(t,n="1"){X(this,ge);X(this,or,"https://api.wineater.com/");X(this,zr);X(this,vn);X(this,ar,!1);X(this,sr,null);X(this,hn,null);Y(this,zr,t),Y(this,vn,n)}async getInstantRecommendations(){var t;try{const n=(t=dt())==null?void 0:t.shop,r=n?"shopify/storefront/instant":p(this,vn)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant",{data:i,headers:a}=await ne(this,ge,ho).call(this,r,n?ne(this,ge,go).call(this,{}):{});return{wines:i.filter(Boolean).map(wc),profileHash:a.get("X-Wineater-Profile")||null}}catch(n){throw new Error(`Error in getInstantRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(t,n){if(dt())return ne(this,ge,bs).call(this,t,n);try{const r=p(this,vn)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search",i=n?{text:t,query_id:n}:{text:t};return(await ne(this,ge,Ht).call(this,r,p(this,vn)==="2"?oi(i,p(this,hn)):i)).filter(Boolean).map(Ar)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async searchStream(t,n,r){const i=()=>this.getWineRecommendationsSearch(t,n);if(p(this,vn)!=="2"||dt())return i();let a;try{a=await fetch(`${p(this,or)}dish/recommendations/search/v2/stream`,{method:"POST",headers:ne(this,ge,vo).call(this),body:JSON.stringify(oi(n?{text:t,query_id:n}:{text:t},p(this,hn)))})}catch{return i()}if(!a.ok||!a.body)return i();const l=a.body.getReader(),c=new TextDecoder;let s="",u=null;const h=m=>(m??[]).filter(Boolean).map(Ar);try{for(;;){const{done:m,value:d}=await l.read();d&&(s+=c.decode(d,{stream:!0}));const w=s.split(`
|
|
3
|
-
`);s=m?"":w.pop()??"";for(const _ of m?w.filter(Boolean):w){if(!_.trim())continue;const y=JSON.parse(_);if(y.type==="wines")u=h(y.recommendations).map(f=>({...f,reason:""})),r(u);else{if(y.type==="final")return h(y.recommendations);if(y.type==="error")return u||i()}}if(m)break}}catch{return u||i()}return u??i()}async getMoreWineRecommendations(t,n){try{const r=await ne(this,ge,Ht).call(this,"dish/recommendations/search/v2/more",oi({text:t,exclude_ids:n},p(this,hn)));return mc(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getDeck(t,n,r){const i={text:t,exclude_ids:n,...r?{query_id:r}:{}},a=await ne(this,ge,Ht).call(this,"dish/recommendations/search/v2/deck",oi(i,p(this,hn)));return _c(a)}async getSimilarWines(t){try{return(await ne(this,ge,Ht).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map(Ar)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await ne(this,ge,Ht).call(this,"events",t,{keepalive:!0})}setVisitorLanguage(t){Y(this,hn,t)}async getWineTranslations(t,n){return Cc(r=>ne(this,ge,Ht).call(this,"wines/translations",r).catch(()=>null),t,n)}setLanguage(t){Y(this,sr,t)}async getShopifyConfig(){const t=dt().shop;return ne(this,ge,Ht).call(this,`shopify/storefront/config?shop=${encodeURIComponent(t)}`,void 0,{method:"GET"})}async getStoreConfig(){try{return await ne(this,ge,Ht).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}or=new WeakMap,zr=new WeakMap,vn=new WeakMap,ar=new WeakMap,sr=new WeakMap,hn=new WeakMap,ge=new WeakSet,vo=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${p(this,zr)}`};if(!p(this,ar)){const n=Ki();n&&(t[Ec]=n)}return t},Ht=async function(t,n,r={}){return(await ne(this,ge,ho).call(this,t,n,r)).data},ho=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:ne(this,ge,vo).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let a;try{a=await fetch(`${p(this,or)}${t}`,i())}catch(s){if(p(this,ar)||!Ki())throw s;Y(this,ar,!0),a=await fetch(`${p(this,or)}${t}`,i())}const l=await a.text();let c=null;try{c=l?JSON.parse(l):null}catch{if(a.ok)throw new Error("API returned invalid JSON")}if(!a.ok)throw new Ha(a.status,c);return{data:c,headers:a.headers}},go=function(t){const n=dt().shop;return p(this,sr)?{...t,shop:n,language:p(this,sr)}:{...t,shop:n}},bs=async function(t,n){try{const r=ne(this,ge,go).call(this,{text:t,session_id:Ra(),...n?{query_id:n}:{}});return(await ne(this,ge,Ht).call(this,"shopify/storefront/search",r)??[]).filter(Boolean).map(Ar)}catch(r){throw r instanceof Ha&&pc(r.status,r.data)?new Da:new Error(`Error in getWineRecommendations: ${r.message}`)}};const Ga=((ps=window==null?void 0:window.wineaterData)==null?void 0:ps.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",Yi=String(((vs=window==null?void 0:window.wineaterData)==null?void 0:vs.apiVersion)||"1"),ft=new Tc(Ga,Yi);kc(e=>ft.postEvents(e));function Pc(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}const Xi=`${Pc(Ga)}:${Yi}`,Va="wineater:v1:";function Qi(e,t){try{const n=window.localStorage.getItem(Va+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function Zi(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(Va+e,JSON.stringify(n))}catch{}}const Ce={WIDGET_INITIALIZED:"widget_initialized",WIDGET_LOADED:"widget_loaded",SEARCH_PERFORMED:"search_performed",SEARCH_RESULTS_DISPLAYED:"search_results_displayed",NO_RESULTS_FOUND:"no_results_found",WINE_CARD_HOVER:"wine_card_hover",WINE_CARD_CLICK:"wine_card_click",WINE_DETAILS_VIEWED:"wine_details_viewed",WINE_DETAILS_CLOSED:"wine_details_closed",BUY_BUTTON_CLICKED:"buy_button_clicked",SHOW_MORE_CLICKED:"show_more_clicked",SIMILAR_WINES_CLICKED:"similar_wines_clicked",FILTER_APPLIED:"filter_applied",LANGUAGE_CHANGED:"language_changed",ERROR_OCCURRED:"error_occurred",MOBILE_VIEW_ACTIVATED:"mobile_view_activated",SWIPE_MODE_OPENED:"swipe_mode_opened",WINE_LIKED:"wine_liked",WINE_DISLIKED:"wine_disliked",SWIPE_MODE_FINISHED:"swipe_mode_finished"},Ka={fr:{lang:"fr",welcomeMessage:"Quel plat allez-vous déguster ? Décrivez-le-moi et je vous proposerai le vin qui l'accompagnera parfaitement.",noResultsFound:"Aucun résultat trouvé.",somethingWentWrong:"Désolé, quelque chose a mal tourné.",chatButton1:"Trouvez l'accord parfait",chatButton2:"Associez le vin",chatButton3:"Obtenez des conseils",chatTitle:"Accord Mets & Vins 🍷",chatSubtitle:"Décrivez votre plat et obtenez une recommandation en 30 secondes",inputPlaceholder:"ex., Salade de thon",sendButton:"Accorder",poweredBy:"Propulsé par",price:"Prix",region:"Région",type:"Type",reason:"Suggestion",moreInfo:"Plus d'infos",tryAgain:"Réessayer",similarWines:"Vins similaires",byTheGlass:"Au verre",winePairingIntro:"Pour ce vin, voici quelques suggestions de plats :",askForDinner:"Que voulez-vous manger ce soir?",clearChatButton:"Effacer le chat",widgetTitle:"TROUVEZ VOTRE VIN PARFAIT",widgetSubtitle:"Partagez tout ce que vous avez en tête—votre repas, humeur, budget ou occasion—et notre sommelier IA vous recommandera le vin parfait en quelques secondes",searchPlaceholder:"Entrez un mot-clé ou une description","wineDetails.reason":"Raison","wineDetails.price":"Prix","wineDetails.region":"Région","wineDetails.type":"Type","wineDetails.moreInfo":"Plus d'infos","wineDetails.code":"Code","wineDetails.buy":"Acheter",searchButton:"Rechercher",priceRange:"Gamme de prix",wineColor:"Couleur du vin",intensity:"Intensité",red:"Rouge",white:"Blanc",rose:"Rosé",light:"Léger",medium:"Moyen",full:"Puissant",barTitle:"Sélection du bar",barSubtitle:"Choisissez vos plats ci-dessous et cliquez sur «Envoyer»",barSendButton:"Envoyer",barResetButton:"Réinitialiser",barName:"Nom du bar",barNotesPlaceholder:"Entrez vos souhaits ici...",placeholderSuggestions:["Vin pour les pâtes","Parfait avec du poisson","Recommandé pour une soirée"],headerLine1:"Partagez tout ce qui vous passe par la tête —",headerLine2:"— et obtenez des recommandations de vin parfait en quelques secondes",headerMeal:"repas",headerMood:"humeur",headerBudget:"budget",headerOccasion:"occasion",headerOr:"ou",errorMessage:"Une erreur est survenue. Veuillez réessayer plus tard.",noResultsMessage:"Aucun résultat trouvé pour votre recherche. Veuillez essayer une autre requête.",ai_sommelier:"AI sommelier",consentText:"L'assistant vin enregistre un identifiant anonyme sur cet appareil pour apprendre vos goûts et améliorer ses recommandations. Vous pouvez l'utiliser sans accepter.",consentAccept:"Accepter",consentDecline:"Refuser",consentPrivacy:"Politique de confidentialité",addToCart:"Ajouter au panier",addedToCart:"Ajouté",sommelierResting:"Notre sommelier se repose. Découvrez notre sélection ci-dessous.",helpMeChoose:"Choisir ensemble","swipe.progress":"{n} sur {total} aimés","swipe.showResults":"Voir les résultats","swipe.like":"J’aime","swipe.dislike":"Pas pour moi","swipe.undo":"Annuler","swipe.hint":"Glissez à droite si vous aimez, à gauche sinon. Touchez pour en savoir plus."},es:{lang:"es",welcomeMessage:"¿Qué vas a comer? Cuéntame tu plato y te recomendaré el maridaje perfecto.",noResultsFound:"No se encontraron resultados.",somethingWentWrong:"Lo sentimos, algo salió mal.",chatButton1:"Encuentra tu maridaje",chatButton2:"Combina vino ya",chatButton3:"Recibe asesoría ahora",chatTitle:"Maridaje de Vinos 🍷",chatSubtitle:"Describe tu comida y obtén una recomendación en 30 segundos",inputPlaceholder:"ej., Ensalada de atún",sendButton:"Combinar",poweredBy:"Desarrollado por",price:"Precio",region:"Región",type:"Tipo",reason:"Sugerencia",moreInfo:"Más info",tryAgain:"Probar otra vez",similarWines:"Vinos similares",byTheGlass:"Por copa",winePairingIntro:"Para este vino, aquí tienes algunas sugerencias de platos:",askForDinner:"¿Qué te gustaría cenar?",clearChatButton:"Limpiar el chat",widgetTitle:"ENCUENTRA TU VINO PERFECTO",widgetSubtitle:"Comparte cualquier cosa que tengas en mente—tu comida, estado de ánimo, presupuesto o evento—y nuestro sommelier de IA te recomendará el vino perfecto en segundos",searchPlaceholder:"Escribe una palabra clave o descripción","wineDetails.reason":"Razón","wineDetails.price":"Precio","wineDetails.region":"Región","wineDetails.type":"Tipo","wineDetails.code":"Código","wineDetails.moreInfo":"Más información","wineDetails.buy":"Comprar",searchButton:"Buscar",priceRange:"Rango de precios",wineColor:"Color del vino",intensity:"Intensidad",red:"Tinto",white:"Blanco",rose:"Rosado",light:"Ligero",medium:"Medio",full:"Intenso",barTitle:"Platos de Bar",barSubtitle:"Selecciona de la lista y presiona «Enviar»",barSendButton:"Enviar",barResetButton:"Reiniciar",barName:"Nombre del bar",barNotesPlaceholder:"Agrega tus comentarios aquí...",placeholderSuggestions:["Vino para pasta","Perfecto con pescado","Recomendado para una fiesta"],headerLine1:"Comparte cualquier cosa que tengas en mente —",headerLine2:"— y obtén recomendaciones del vino perfecto en cuestión de segundos",headerMeal:"comida",headerMood:"estado de ánimo",headerBudget:"presupuesto",headerOccasion:"ocasión",headerOr:"o",errorMessage:"Algo salió mal. Por favor, inténtalo de nuevo más tarde.",noResultsMessage:"No se encontraron resultados para tu búsqueda. Por favor, intenta con otra consulta.",ai_sommelier:"AI sommelier",consentText:"El asistente de vinos guarda un identificador anónimo en este dispositivo para conocer tus gustos y mejorar las recomendaciones. Puedes usarlo sin aceptar.",consentAccept:"Aceptar",consentDecline:"Rechazar",consentPrivacy:"Política de privacidad",addToCart:"Añadir al carrito",addedToCart:"Añadido",sommelierResting:"Nuestro sumiller está descansando. Descubre nuestra selección.",helpMeChoose:"Elegir juntos","swipe.progress":"Te gustan {n} de {total}","swipe.showResults":"Ver resultados ya","swipe.like":"Me gusta","swipe.dislike":"No es para mí","swipe.undo":"Deshacer","swipe.hint":"Desliza a la derecha si te gusta, a la izquierda si no. Toca para ver más."},en:{lang:"en",welcomeMessage:"What are you planning to eat? Share your dish and I'll recommend the perfect wine pairing for your meal.",noResultsFound:"No results found.",somethingWentWrong:"Sorry, something went wrong.",chatButton1:"Find Your Pairing",chatButton2:"Pair Wine Now",chatButton3:"Get Wine Advice",chatTitle:"Wine Pairing Assistant 🍷",chatSubtitle:"Describe your meal and get a recommendation in 30 seconds",inputPlaceholder:"e.g., Tuna salad",sendButton:"Match",poweredBy:"Powered by",price:"Price",region:"Region",type:"Type",reason:"Suggestion",moreInfo:"More info",tryAgain:"Try again",similarWines:"Similar wines",byTheGlass:"By the glass",winePairingIntro:"For this wine, here are some suggested dishes:",askForDinner:"What would you like to have for dinner?",clearChatButton:"Clear Chat",widgetTitle:"FIND YOUR PERFECT WINE",widgetSubtitle:"Share anything on your mind—your meal, mood, budget, or occasion—and our AI sommelier will recommend the perfect wine in seconds",searchPlaceholder:"Enter a keyword or description","wineDetails.price":"Price","wineDetails.region":"Region","wineDetails.type":"Type","wineDetails.moreInfo":"More info","wineDetails.reason":"Reason","wineDetails.code":"Code","wineDetails.buy":"Buy",searchButton:"Search",priceRange:"Price Range",wineColor:"Wine Color",intensity:"Intensity",red:"Red",white:"White",rose:"Rosé",light:"Light",medium:"Medium",full:"Full",barTitle:"Bar Dishes",barSubtitle:"Select dishes below and click 'Send'",barSendButton:"Send",barResetButton:"Reset",barName:"Bar Name",barNotesPlaceholder:"Add your wishes here...",placeholderSuggestions:["Wine for pasta","Perfect with fish","Recommended for a party"],headerLine1:"Share anything on your mind —",headerLine2:"— and get recommendations of the perfect wine in seconds",headerMeal:"meal",headerMood:"mood",headerBudget:"budget",headerOccasion:"occasion",headerOr:"or",errorMessage:"Something went wrong. Please try again later.",noResultsMessage:"No results found for your search. Please try a different query.",ai_sommelier:"AI sommelier",consentText:"The wine assistant stores an anonymous identifier on this device to learn your taste and improve recommendations. You can use it without accepting.",consentAccept:"Accept",consentDecline:"Decline",consentPrivacy:"Privacy policy",addToCart:"Add to cart",addedToCart:"Added",sommelierResting:"Our sommelier is resting. Browse our picks below.",helpMeChoose:"Help me choose","swipe.progress":"{n} of {total} liked","swipe.showResults":"Show results now","swipe.like":"Like","swipe.dislike":"Not for me","swipe.undo":"Undo","swipe.hint":"Swipe right if you like it, left if not. Tap for details."},sr:{lang:"sr",welcomeMessage:"Šta planirate da jedete? Podelite svoje jelo i preporučiću vam savršeno vino uz obrok.",noResultsFound:"Nema rezultata.",somethingWentWrong:"Izvinite, nešto je pošlo po zlu.",chatButton1:"Pronađi vino",chatButton2:"Upari vino sada",chatButton3:"Zatraži preporuku",chatTitle:"Asistent za uparivanje vina 🍷",chatSubtitle:"Opišite svoj obrok i dobijte preporuku za 30 sekundi",inputPlaceholder:"npr. Tuna salata",sendButton:"Upari",poweredBy:"Pokreće",price:"Cena",region:"Regija",type:"Tip",reason:"Preporuka",moreInfo:"Više informacija",tryAgain:"Pokušaj ponovo",similarWines:"Slična vina",byTheGlass:"Na čašu",winePairingIntro:"Za ovo vino, preporučuju se sledeća jela:",askForDinner:"Šta biste želeli za večeru?",clearChatButton:"Obriši razgovor",widgetTitle:"PRONAĐITE SAVRŠENO VINO",widgetSubtitle:"Podelite bilo šta — obrok, raspoloženje, budžet ili priliku — i naš AI somelijer će vam za par sekundi preporučiti vino",searchPlaceholder:"Unesite ključnu reč ili opis","wineDetails.price":"Cena","wineDetails.region":"Regija","wineDetails.type":"Tip","wineDetails.moreInfo":"Više informacija","wineDetails.reason":"Razlog","wineDetails.code":"Šifra","wineDetails.buy":"Kupi",searchButton:"Pretraga",priceRange:"Cenovni raspon",wineColor:"Boja vina",intensity:"Intenzitet",red:"Crveno",white:"Belo",rose:"Roze",light:"Lako",medium:"Srednje",full:"Puno",barTitle:"Jela iz bara",barSubtitle:"Izaberite jela ispod i kliknite 'Pošalji'",barSendButton:"Pošalji",barResetButton:"Resetuj",barName:"Naziv bara",barNotesPlaceholder:"Dodajte svoje želje ovde...",placeholderSuggestions:["Vino uz pastu","Savršeno uz ribu","Preporuka za žurku"],headerLine1:"Podelite bilo šta što vam je na umu —",headerLine2:"— i dobijte preporuke za savršeno vino za par sekundi",headerMeal:"obrok",headerMood:"raspoloženje",headerBudget:"budžet",headerOccasion:"prilika",headerOr:"ili",errorMessage:"Nešto je pošlo po zlu. Molimo pokušajte ponovo kasnije.",noResultsMessage:"Nema rezultata za vašu pretragu. Molimo pokušajte sa drugačijim upitom.",ai_sommelier:"AI sommelier",consentText:"Vinski asistent čuva anonimni identifikator na ovom uređaju kako bi upoznao vaš ukus i poboljšao preporuke. Možete ga koristiti i bez prihvatanja.",consentAccept:"Prihvati",consentDecline:"Odbij",consentPrivacy:"Politika privatnosti",addToCart:"Dodaj u korpu",addedToCart:"Dodato",sommelierResting:"Naš somelijer se odmara. Pogledajte naš izbor ispod.",helpMeChoose:"Izaberimo zajedno","swipe.progress":"Sviđa vam se {n} od {total}","swipe.showResults":"Prikaži rezultate","swipe.like":"Sviđa mi se","swipe.dislike":"Nije za mene","swipe.undo":"Poništi","swipe.hint":"Prevucite desno ako vam se sviđa, levo ako ne. Dodirnite za detalje."},de:{lang:"de",welcomeMessage:"Was möchten Sie essen? Beschreiben Sie Ihr Gericht und ich empfehle Ihnen den perfekten Wein dazu.",noResultsFound:"Keine Ergebnisse gefunden.",somethingWentWrong:"Entschuldigung, etwas ist schief gelaufen.",chatButton1:"Finde Dein Pairing",chatButton2:"Wein jetzt wählen",chatButton3:"Erhalte Weinberatung",chatTitle:"Wein & Speisen 🍷",chatSubtitle:"Beschreiben Sie Ihr Gericht und erhalten Sie in 30 Sekunden eine Empfehlung",inputPlaceholder:"z.B., Thunfischsalat",sendButton:"Kombinieren",poweredBy:"Unterstützt von",price:"Preis",region:"Region",type:"Typ",reason:"Anregung",moreInfo:"Mehr Info",tryAgain:"Nochmal versuchen",similarWines:"Ähnliche Weine",byTheGlass:"Glasweise",winePairingIntro:"Für diesen Wein gibt es folgende Essensvorschläge:",askForDinner:"Was möchten Sie zum Abendessen essen?",clearChatButton:"Chat löschen",widgetTitle:"FINDEN SIE IHREN PERFEKTEN WEIN",widgetSubtitle:"Teilen Sie alles, was Ihnen in den Sinn kommt—Ihre Mahlzeit, Stimmung, Ihr Budget oder Anlass—und unser KI-Sommelier empfiehlt Ihnen in Sekunden den perfekten Wein",placeholderSuggestions:["Wein für Pasta","Perfekt zu Fisch","Empfohlen für eine Party"],searchPlaceholder:"Geben Sie ein Stichwort oder eine Beschreibung ein","wineDetails.price":"Preis","wineDetails.region":"Region","wineDetails.type":"Typ","wineDetails.moreInfo":"Mehr Info","wineDetails.reason":"Grund","wineDetails.code":"Code","wineDetails.buy":"Kaufen",searchButton:"Suche",priceRange:"Preisspanne",wineColor:"Weinfarbe",intensity:"Intensität",red:"Rot",white:"Weiß",rose:"Rosé",light:"Leicht",medium:"Mittel",full:"Voll",barTitle:"Bar-Auswahl",barSubtitle:"Wählen Sie Ihre Gerichte und klicken Sie auf 'Senden'",barSendButton:"Senden",barResetButton:"Zurücksetzen",barName:"Name der Bar",headerLine1:"Teilen Sie alles, was Ihnen durch den Kopf geht —",headerLine2:"— und erhalten Sie in Sekundenschnelle Empfehlungen für den perfekten Wein",headerMeal:"Mahlzeit",headerMood:"Stimmung",headerBudget:"Budget",headerOccasion:"Anlass",headerOr:"oder",errorMessage:"Etwas ist schief gelaufen. Bitte versuchen Sie es später erneut.",noResultsMessage:"Keine Ergebnisse für Ihre Suche gefunden. Bitte versuchen Sie es mit einer anderen Anfrage.",ai_sommelier:"AI sommelier",consentText:"Der Weinassistent speichert eine anonyme Kennung auf diesem Gerät, um Ihren Geschmack kennenzulernen und Empfehlungen zu verbessern. Sie können ihn auch ohne Zustimmung nutzen.",consentAccept:"Akzeptieren",consentDecline:"Ablehnen",consentPrivacy:"Datenschutzerklärung",addToCart:"In den Warenkorb",addedToCart:"Hinzugefügt",sommelierResting:"Unser Sommelier macht gerade Pause. Entdecken Sie unsere Auswahl.",helpMeChoose:"Gemeinsam auswählen","swipe.progress":"{n} von {total} gefallen","swipe.showResults":"Ergebnisse jetzt zeigen","swipe.like":"Gefällt mir","swipe.dislike":"Nicht für mich","swipe.undo":"Rückgängig","swipe.hint":"Nach rechts, wenn er Ihnen gefällt, nach links, wenn nicht. Tippen für Details."},ukr:{lang:"ukr",welcomeMessage:"Що ви збираєтесь їсти? Опишіть свою страву, і я порекомендую вам ідеальне вино.",noResultsFound:"Результатів не знайдено.",somethingWentWrong:"Вибачте, щось пішло не так.",chatButton1:"Знайти ідеальне поєднання",chatButton2:"Підібрати вино",chatButton3:"Отримати пораду",chatTitle:"Сомельє-помічник 🍷",chatSubtitle:"Опишіть свою страву і отримайте рекомендацію за 30 секунд",inputPlaceholder:"наприклад, Тунець із салатом",sendButton:"Підібрати",poweredBy:"Розроблено на основі",price:"Ціна",region:"Регіон",type:"Тип",reason:"Рекомендація",moreInfo:"Докладніше",tryAgain:"Спробувати ще",similarWines:"Схожі вина",byTheGlass:"На келих",winePairingIntro:"До цього вина підходять такі страви:",askForDinner:"Що ви хочете на вечерю?",clearChatButton:"Очистити чат",widgetTitle:"ЗНАЙДІТЬ ІДЕАЛЬНЕ ВИНО",widgetSubtitle:"Поділіться тим, що у вас на думці—їжа, настрій, бюджет чи подія—і наш AI-сомельє порекомендує вам ідеальне вино за секунди",searchPlaceholder:"Введіть ключове слово або опис","wineDetails.reason":"Причина","wineDetails.price":"Ціна","wineDetails.region":"Регіон","wineDetails.type":"Тип","wineDetails.moreInfo":"Докладніше","wineDetails.code":"Код","wineDetails.buy":"Купити",searchButton:"Пошук",priceRange:"Діапазон цін",wineColor:"Колір вина",intensity:"Інтенсивність",red:"Червоне",white:"Біле",rose:"Рожеве",light:"Легке",medium:"Середнє",full:"Повне",barTitle:"Закуски до вина",barSubtitle:"Виберіть страви нижче та натисніть «Надіслати»",barSendButton:"Надіслати",barResetButton:"Скинути",barName:"Назва бару",barNotesPlaceholder:"Додайте ваші побажання тут...",placeholderSuggestions:["Вино до пасти","Ідеально до риби","Рекомендуємо для вечірки"],headerLine1:"Поділіться будь-якими вашими думками —",headerLine2:"— і отримайте рекомендації щодо ідеального вина за секунди",headerMeal:"страва",headerMood:"настрій",headerBudget:"бюджет",headerOccasion:"подія",headerOr:"або",errorMessage:"Щось пішло не так. Будь ласка, спробуйте пізніше.",noResultsMessage:"За вашим запитом не знайдено результатів. Спробуйте інший запит.",ai_sommelier:"AI sommelier",consentText:"Винний помічник зберігає на цьому пристрої анонімний ідентифікатор, щоб враховувати ваш смак і покращувати рекомендації. Користуватися можна й без згоди.",consentAccept:"Прийняти",consentDecline:"Відхилити",consentPrivacy:"Політика конфіденційності",addToCart:"Додати в кошик",addedToCart:"Додано",sommelierResting:"Наш сомельє відпочиває. Перегляньте нашу добірку нижче.",helpMeChoose:"Підібрати разом","swipe.progress":"Подобається: {n} з {total}","swipe.showResults":"Показати результат","swipe.like":"Подобається","swipe.dislike":"Не моє","swipe.undo":"Повернути","swipe.hint":"Вправо — подобається, вліво — ні. Натисніть, щоб дізнатися більше."},ru:{lang:"ru",welcomeMessage:"Что вы планируете поесть? Напишите ваше блюдо, и я подберу идеальное вино к нему.",noResultsFound:"Результаты не найдены.",somethingWentWrong:"Извините, что-то пошло не так.",chatButton1:"Найти сочетание",chatButton2:"Подобрать вино",chatButton3:"Получить совет",chatTitle:"Ассистент по подбору вина 🍷",chatSubtitle:"Опишите ваше блюдо и получите рекомендацию за 30 секунд",inputPlaceholder:"например, Тунец с салатом",sendButton:"Подобрать",poweredBy:"Powered by",price:"Цена",region:"Регион",type:"Тип",reason:"Рекомендация",moreInfo:"Подробнее",tryAgain:"Попробовать ещё",similarWines:"Похожие вина",byTheGlass:"По бокалам",winePairingIntro:"К этому вину подходят следующие блюда:",askForDinner:"Что бы вы хотели на ужин?",clearChatButton:"Очистить чат",widgetTitle:"НАЙДИТЬ ИДЕАЛЬНОЕ ВИНО",widgetSubtitle:"Поделитесь вашими предпочтениями — блюдом, настроением, бюджетом или случаем — и наш AI-сомелье подберёт идеальное вино за секунды",searchPlaceholder:"Введите ключевое слово или описание","wineDetails.price":"Цена","wineDetails.region":"Регион","wineDetails.type":"Тип","wineDetails.moreInfo":"Подробнее","wineDetails.reason":"Причина","wineDetails.code":"Код","wineDetails.buy":"Купить",searchButton:"Поиск",priceRange:"Диапазон цен",wineColor:"Цвет вина",intensity:"Интенсивность",red:"Красное",white:"Белое",rose:"Розовое",light:"Лёгкое",medium:"Среднее",full:"Полное",barTitle:"Закуски к вину",barSubtitle:"Выберите блюда ниже и нажмите 'Отправить'",barSendButton:"Отправить",barResetButton:"Сбросить",barName:"Название бара",barNotesPlaceholder:"Добавьте ваши пожелания здесь...",placeholderSuggestions:["Вино для пасты","Идеально к рыбе","Рекомендуем для вечеринки"],headerLine1:"Поделитесь любыми вашими мыслями —",headerLine2:"— и получите рекомендации по идеальному вину за считанные секунды",headerMeal:"блюдо",headerMood:"настроение",headerBudget:"бюджет",headerOccasion:"случай",headerOr:"или",errorMessage:"Что-то пошло не так. Пожалуйста, попробуйте позже.",noResultsMessage:"По вашему запросу не найдено результатов. Попробуйте другой запрос.",ai_sommelier:"AI sommelier",consentText:"Винный помощник сохраняет на этом устройстве анонимный идентификатор, чтобы учитывать ваш вкус и улучшать рекомендации. Пользоваться можно и без согласия.",consentAccept:"Принять",consentDecline:"Отклонить",consentPrivacy:"Политика конфиденциальности",addToCart:"В корзину",addedToCart:"Добавлено",sommelierResting:"Наш сомелье отдыхает. Посмотрите нашу подборку ниже.",helpMeChoose:"Подобрать вместе","swipe.progress":"Нравится: {n} из {total}","swipe.showResults":"Показать результат","swipe.like":"Нравится","swipe.dislike":"Не моё","swipe.undo":"Вернуть","swipe.hint":"Вправо — нравится, влево — нет. Нажмите, чтобы узнать больше."},kk:{lang:"kk",welcomeMessage:"Сіз не жегіңіз келеді? Тағамыңызды сипаттаңыз, мен оған керемет шарап ұсынамын.",noResultsFound:"Нәтижелер табылмады.",somethingWentWrong:"Кешіріңіз, бірдеңе дұрыс болмады.",chatButton1:"Сәйкестік табу",chatButton2:"Шарап таңдау",chatButton3:"Кеңес алу",chatTitle:"Шарап таңдаушы көмекші 🍷",chatSubtitle:"Тағамыңызды сипаттаңыз — 30 секундта ұсыныс алыңыз",inputPlaceholder:"мысалы, тунец салатымен",sendButton:"Таңдау",poweredBy:"Powered by",price:"Бағасы",region:"Өңір",type:"Түрі",reason:"Ұсыныс",moreInfo:"Толығырақ",tryAgain:"Қайта көру",similarWines:"Ұқсас шараптар",byTheGlass:"Бокалмен",winePairingIntro:"Бұл шарапқа келесі тағамдар сәйкес келеді:",askForDinner:"Кешкі асқа не қалайсыз?",clearChatButton:"Чатты тазалау",widgetTitle:"КЕРЕМЕТ ШАРАПТЫ ТАБЫҢЫЗ",widgetSubtitle:"Таңдауларыңызды бөлісіңіз — тағам, көңіл-күй, бюджет немесе жағдай — және біздің AI-сомелье сізге бірнеше секундта шарап ұсынады",searchPlaceholder:"Кілт сөзді немесе сипаттаманы енгізіңіз","wineDetails.price":"Бағасы","wineDetails.region":"Өңір","wineDetails.type":"Түрі","wineDetails.moreInfo":"Толығырақ","wineDetails.reason":"Себебі","wineDetails.code":"Код","wineDetails.buy":"Сатып алу",searchButton:"Іздеу",priceRange:"Баға диапазоны",wineColor:"Шарап түсі",intensity:"Қанықтылық",red:"Қызыл",white:"Ақ",rose:"Розалық",light:"Жеңіл",medium:"Орташа",full:"Толық",barTitle:"Шарапқа арналған тіскебасарлар",barSubtitle:"Төмендегі тағамдарды таңдаңыз және 'Жіберу' батырмасын басыңыз",barSendButton:"Жіберу",barResetButton:"Қалпына келтіру",barName:"Бар атауы",barNotesPlaceholder:"Мұнда өз тілектеріңізді жазыңыз...",placeholderSuggestions:["Пастаға арналған шарап","Балыққа тамаша үйлеседі","Кешке ұсынуға болады"],headerLine1:"Ойларыңызбен бөлісіңіз —",headerLine2:"— және бірнеше секундта мінсіз шарап ұсынысын алыңыз",headerMeal:"тағам",headerMood:"көңіл-күй",headerBudget:"бюджет",headerOccasion:"жағдай",headerOr:"немесе",errorMessage:"Бірдеңе дұрыс болмады. Кейінірек қайта көріңіз.",noResultsMessage:"Іздеуіңізге сәйкес нәтиже табылмады. Басқа сұрау қолданып көріңіз.",ai_sommelier:"AI sommelier",consentText:"Шарап көмекшісі сіздің талғамыңызды ескеріп, ұсыныстарды жақсарту үшін осы құрылғыда анонимді идентификатор сақтайды. Келісімсіз де пайдалана аласыз.",consentAccept:"Қабылдау",consentDecline:"Бас тарту",consentPrivacy:"Құпиялылық саясаты",addToCart:"Себетке қосу",addedToCart:"Қосылды",sommelierResting:"Біздің сомелье демалып жатыр. Төмендегі таңдауымызды қараңыз.",helpMeChoose:"Бірге таңдайық","swipe.progress":"Ұнады: {n} / {total}","swipe.showResults":"Нәтижені көрсету","swipe.like":"Ұнайды","swipe.dislike":"Маған емес","swipe.undo":"Қайтару","swipe.hint":"Ұнаса — оңға, ұнамаса — солға. Толығырақ үшін басыңыз."},pt:{lang:"pt",welcomeMessage:"O que você planeja comer? Descreva seu prato e eu recomendarei a harmonização perfeita.",noResultsFound:"Nenhum resultado encontrado.",somethingWentWrong:"Desculpe, algo deu errado.",chatButton1:"Encontre sua harmonização",chatButton2:"Harmonizar vinho agora",chatButton3:"Receber conselho de vinho",chatTitle:"Assistente de Harmonização de Vinhos 🍷",chatSubtitle:"Descreva sua refeição e receba uma recomendação em 30 segundos",inputPlaceholder:"ex., Salada de atum",sendButton:"Harmonizar",poweredBy:"Desenvolvido por",price:"Preço",region:"Região",type:"Tipo",reason:"Sugestão",moreInfo:"Mais informações",tryAgain:"Tentar de novo",similarWines:"Vinhos semelhantes",byTheGlass:"Por taça",winePairingIntro:"Para este vinho, aqui estão algumas sugestões de pratos:",askForDinner:"O que você gostaria de jantar?",clearChatButton:"Limpar chat",widgetTitle:"ENCONTRE SEU VINHO PERFEITO",widgetSubtitle:"Compartilhe o que tiver em mente — sua refeição, humor, orçamento ou ocasião — e nosso sommelier de IA recomendará o vinho perfeito em segundos",searchPlaceholder:"Digite uma palavra-chave ou descrição","wineDetails.reason":"Motivo","wineDetails.price":"Preço","wineDetails.region":"Região","wineDetails.type":"Tipo","wineDetails.moreInfo":"Mais informações","wineDetails.code":"Código","wineDetails.buy":"Comprar",searchButton:"Pesquisar",priceRange:"Faixa de preço",wineColor:"Cor do vinho",intensity:"Intensidade",red:"Tinto",white:"Branco",rose:"Rosé",light:"Leve",medium:"Médio",full:"Encorpado",barTitle:"Pratos do bar",barSubtitle:"Selecione os pratos abaixo e clique em 'Enviar'",barSendButton:"Enviar",barResetButton:"Resetar",barName:"Nome do bar",barNotesPlaceholder:"Adicione seus desejos aqui...",placeholderSuggestions:["Vinho para massa","Perfeito com peixe","Recomendado para uma festa"],headerLine1:"Compartilhe o que tiver em mente —",headerLine2:"— e receba recomendações do vinho perfeito em segundos",headerMeal:"refeição",headerMood:"humor",headerBudget:"orçamento",headerOccasion:"ocasião",headerOr:"ou",errorMessage:"Algo deu errado. Por favor, tente novamente mais tarde.",noResultsMessage:"Nenhum resultado encontrado para sua pesquisa. Por favor, tente uma consulta diferente.",ai_sommelier:"AI sommelier",consentText:"O assistente de vinhos guarda um identificador anónimo neste dispositivo para conhecer o seu gosto e melhorar as recomendações. Pode usá-lo sem aceitar.",consentAccept:"Aceitar",consentDecline:"Recusar",consentPrivacy:"Política de privacidade",addToCart:"Adicionar ao carrinho",addedToCart:"Adicionado",sommelierResting:"Nosso sommelier está descansando. Veja nossas sugestões abaixo.",helpMeChoose:"Escolher juntos","swipe.progress":"Gostou de {n} de {total}","swipe.showResults":"Ver resultados já","swipe.like":"Gosto","swipe.dislike":"Não é para mim","swipe.undo":"Desfazer","swipe.hint":"Deslize para a direita se gostar, para a esquerda se não. Toque para ver mais."}};function Ic(e){return{id:String(e.id),lang:e.lang,available_languages:e.available_languages?e.available_languages:[e.lang],currency:e.currency,title:e.title,requires_cookie_consent:e.requires_cookie_consent===!0,swipe_mode_enabled:e.swipe_mode_enabled===!0}}const Mt="https://media.wineater.com/static-media",Ac={0:{logoUrl:null,brandColor:"#7B2BEB"},29:{logoUrl:`${Mt}/plou_logo.jpg`,brandColor:"#e6c6bb"},25:{logoUrl:null,brandColor:"#000000",wineaterColor:"#000000",buttonUppercase:!0,customCss:`
|
|
1
|
+
(function(ie,se){typeof exports=="object"&&typeof module<"u"?module.exports=se():typeof define=="function"&&define.amd?define(se):(ie=typeof globalThis<"u"?globalThis:ie||self,ie.WineaterChatbot=se())})(this,function(){"use strict";var of=Object.defineProperty;var Ts=ie=>{throw TypeError(ie)};var af=(ie,se,xe)=>se in ie?of(ie,se,{enumerable:!0,configurable:!0,writable:!0,value:xe}):ie[se]=xe;var _t=(ie,se,xe)=>af(ie,typeof se!="symbol"?se+"":se,xe),xo=(ie,se,xe)=>se.has(ie)||Ts("Cannot "+xe);var v=(ie,se,xe)=>(xo(ie,se,"read from private field"),xe?xe.call(ie):se.get(ie)),X=(ie,se,xe)=>se.has(ie)?Ts("Cannot add the same private member more than once"):se instanceof WeakSet?se.add(ie):se.set(ie,xe),V=(ie,se,xe,mr)=>(xo(ie,se,"write to private field"),mr?mr.call(ie,xe):se.set(ie,xe),xe),ee=(ie,se,xe)=>(xo(ie,se,"access private method"),xe);var ys,tr,nr,Wn,rr,Mr,ir,dn,zt,or,Je,ko,So,Co,Ps,gt,ho,Bt,Nn,Ke,Ot,$e,At,$t,Ln,fn,ar,sr,lr,en,ui,Ce,sf,lf,cf,Eo,_i,bi,To,xs,Dt,qt,et,zn,Wr,Nr,di,cr,Lr,pn,ur,dr,vn,he,Po,Ht,Io,Ao,Is,ks,Ss,Cs;const ie="5";typeof window<"u"&&((ys=window.__svelte??(window.__svelte={})).v??(ys.v=new Set)).add(ie);const se=1,xe=2,mr=4,As=8,Ds=16,Rs=1,Ms=2,Ws=4,Ns=8,Ls=16,Do=1,zs=2,Ae=Symbol(),Ro="http://www.w3.org/1999/xhtml",yi=!1;var xi=Array.isArray,Bs=Array.prototype.indexOf,Un=Array.prototype.includes,Vr=Array.from,Os=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,qs=Object.getOwnPropertyDescriptors,js=Object.prototype,Us=Array.prototype,Mo=Object.getPrototypeOf,Wo=Object.isExtensible;const ki=()=>{};function Fs(e){for(var t=0;t<e.length;t++)e[t]()}function No(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function Hs(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const De=2,_r=4,Kr=8,Lo=1<<24,Gt=16,bt=32,bn=64,Si=128,lt=512,Te=1024,Re=2048,yt=4096,Ze=8192,Vt=16384,yn=32768,xn=65536,zo=1<<17,Bo=1<<18,Hn=1<<19,Gs=1<<20,Kt=1<<25,kn=65536,Ci=1<<21,Ei=1<<22,nn=1<<23,Sn=Symbol("$state"),Vs=Symbol("legacy props"),Ks=Symbol(""),Cn=new class extends Error{constructor(){super(...arguments);_t(this,"name","StaleReactionError");_t(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ys(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Xs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Zs(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Qs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Js(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function $s(e){throw new Error("https://svelte.dev/e/effect_orphan")}function el(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function tl(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function nl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function rl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function il(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ol(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function al(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function sl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Oo(e){return e===this.v}function ll(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function qo(e){return!ll(e,this.v)}let Gn=!1,cl=!1;function ul(){Gn=!0}let be=null;function Vn(e){be=e}function xt(e,t=!1,n){be={p:be,i:!1,c:null,e:null,s:e,x:null,l:Gn&&!t?{s:null,u:null,$:[]}:null}}function kt(e){var t=be,n=t.e;if(n!==null){t.e=null;for(var r of n)ca(r)}return e!==void 0&&(t.x=e),t.i=!0,be=t.p,e??{}}function Kn(){return!Gn||be!==null&&be.l===null}let En=[];function jo(){var e=En;En=[],Fs(e)}function Yt(e){if(En.length===0&&!br){var t=En;queueMicrotask(()=>{t===En&&jo()})}En.push(e)}function dl(){for(;En.length>0;)jo()}function Uo(e){var t=te;if(t===null)return $.f|=nn,e;if(!(t.f&yn)&&!(t.f&_r))throw e;rn(e,t)}function rn(e,t){for(;t!==null;){if(t.f&Si){if(!(t.f&yn))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const fl=-7169;function me(e,t){e.f=e.f&fl|t}function Ti(e){e.f<||e.deps===null?me(e,Te):me(e,yt)}function Fo(e){if(e!==null)for(const t of e)!(t.f&De)||!(t.f&kn)||(t.f^=kn,Fo(t.deps))}function Ho(e,t,n){e.f&Re?t.add(e):e.f&yt&&n.add(e),Fo(e.deps),me(e,Te)}const Yr=new Set;let Z=null,Pi=null,Me=null,je=[],Xr=null,Ii=!1,br=!1;const vo=class vo{constructor(){X(this,Je);_t(this,"current",new Map);_t(this,"previous",new Map);X(this,tr,new Set);X(this,nr,new Set);X(this,Wn,0);X(this,rr,0);X(this,Mr,null);X(this,ir,new Set);X(this,dn,new Set);X(this,zt,new Map);_t(this,"is_fork",!1);X(this,or,!1)}skip_effect(t){v(this,zt).has(t)||v(this,zt).set(t,{d:[],m:[]})}unskip_effect(t){var n=v(this,zt).get(t);if(n){v(this,zt).delete(t);for(var r of n.d)me(r,Re),Ct(r);for(r of n.m)me(r,yt),Ct(r)}}process(t){var i;je=[],this.apply();var n=[],r=[];for(const a of t)ee(this,Je,So).call(this,a,n,r);if(ee(this,Je,ko).call(this)){ee(this,Je,Co).call(this,r),ee(this,Je,Co).call(this,n);for(const[a,l]of v(this,zt))Xo(a,l)}else{for(const a of v(this,tr))a();v(this,tr).clear(),v(this,Wn)===0&&ee(this,Je,Ps).call(this),Pi=this,Z=null,Vo(r),Vo(n),v(this,ir).clear(),v(this,dn).clear(),Pi=null,(i=v(this,Mr))==null||i.resolve()}Me=null}capture(t,n){n!==Ae&&!this.previous.has(t)&&this.previous.set(t,n),t.f&nn||(this.current.set(t,t.v),Me==null||Me.set(t,t.v))}activate(){Z=this,this.apply()}deactivate(){Z===this&&(Z=null,Me=null)}flush(){if(this.activate(),je.length>0){if(Go(),Z!==null&&Z!==this)return}else v(this,Wn)===0&&this.process([]);this.deactivate()}discard(){for(const t of v(this,nr))t(this);v(this,nr).clear()}increment(t){V(this,Wn,v(this,Wn)+1),t&&V(this,rr,v(this,rr)+1)}decrement(t){V(this,Wn,v(this,Wn)-1),t&&V(this,rr,v(this,rr)-1),!v(this,or)&&(V(this,or,!0),Yt(()=>{V(this,or,!1),ee(this,Je,ko).call(this)?je.length>0&&this.flush():this.revive()}))}revive(){for(const t of v(this,ir))v(this,dn).delete(t),me(t,Re),Ct(t);for(const t of v(this,dn))me(t,yt),Ct(t);this.flush()}oncommit(t){v(this,tr).add(t)}ondiscard(t){v(this,nr).add(t)}settled(){return(v(this,Mr)??V(this,Mr,No())).promise}static ensure(){if(Z===null){const t=Z=new vo;Yr.add(Z),br||Yt(()=>{Z===t&&t.flush()})}return Z}apply(){}};tr=new WeakMap,nr=new WeakMap,Wn=new WeakMap,rr=new WeakMap,Mr=new WeakMap,ir=new WeakMap,dn=new WeakMap,zt=new WeakMap,or=new WeakMap,Je=new WeakSet,ko=function(){return this.is_fork||v(this,rr)>0},So=function(t,n,r){t.f^=Te;for(var i=t.first;i!==null;){var a=i.f,l=(a&(bt|bn))!==0,c=l&&(a&Te)!==0,s=c||(a&Ze)!==0||v(this,zt).has(i);if(!s&&i.fn!==null){l?i.f^=Te:a&_r?n.push(i):Sr(i)&&(a&Gt&&v(this,dn).add(i),Xn(i));var f=i.first;if(f!==null){i=f;continue}}for(;i!==null;){var h=i.next;if(h!==null){i=h;break}i=i.parent}}},Co=function(t){for(var n=0;n<t.length;n+=1)Ho(t[n],v(this,ir),v(this,dn))},Ps=function(){var i;if(Yr.size>1){this.previous.clear();var t=Me,n=!0;for(const a of Yr){if(a===this){n=!1;continue}const l=[];for(const[s,f]of this.current){if(a.current.has(s))if(n&&f!==a.current.get(s))a.current.set(s,f);else continue;l.push(s)}if(l.length===0)continue;const c=[...a.current.keys()].filter(s=>!this.current.has(s));if(c.length>0){var r=je;je=[];const s=new Set,f=new Map;for(const h of l)Ko(h,c,s,f);if(je.length>0){Z=a,a.apply();for(const h of je)ee(i=a,Je,So).call(i,h,[],[]);a.deactivate()}je=r}}Z=null,Me=t}v(this,zt).clear(),Yr.delete(this)};let on=vo;function pl(e){var t=br;br=!0;try{for(var n;;){if(dl(),je.length===0&&(Z==null||Z.flush(),je.length===0))return Xr=null,n;Go()}}finally{br=t}}function Go(){Ii=!0;var e=null;try{for(var t=0;je.length>0;){var n=on.ensure();if(t++>1e3){var r,i;vl()}n.process(je),an.clear()}}finally{je=[],Ii=!1,Xr=null}}function vl(){try{el()}catch(e){rn(e,Xr)}}let St=null;function Vo(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(Vt|Ze))&&Sr(r)&&(St=new Set,Xn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&da(r),(St==null?void 0:St.size)>0)){an.clear();for(const i of St){if(i.f&(Vt|Ze))continue;const a=[i];let l=i.parent;for(;l!==null;)St.has(l)&&(St.delete(l),a.push(l)),l=l.parent;for(let c=a.length-1;c>=0;c--){const s=a[c];s.f&(Vt|Ze)||Xn(s)}}St.clear()}}St=null}}function Ko(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const a=i.f;a&De?Ko(i,t,n,r):a&(Ei|Gt)&&!(a&Re)&&Yo(i,t,r)&&(me(i,Re),Ct(i))}}function Yo(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Un.call(t,i))return!0;if(i.f&De&&Yo(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Ct(e){var t=Xr=e,n=t.b;if(n!=null&&n.is_pending&&e.f&(_r|Kr|Lo)&&!(e.f&yn)){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Ii&&t===te&&r&Gt&&!(r&Bo)&&r&yn)return;if(r&(bn|bt)){if(!(r&Te))return;t.f^=Te}}je.push(t)}function Xo(e,t){if(!(e.f&bt&&e.f&Te)){e.f&Re?t.d.push(e):e.f&yt&&t.m.push(e),me(e,Te);for(var n=e.first;n!==null;)Xo(n,t),n=n.next}}function hl(e){let t=0,n=Tn(0),r;return()=>{Wi()&&(o(n),zi(()=>(t===0&&(r=Zn(()=>e(()=>yr(n)))),t+=1,()=>{Yt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,yr(n))})})))}}var gl=xn|Hn;function wl(e,t,n,r){new ml(e,t,n,r)}class ml{constructor(t,n,r,i){X(this,Ce);_t(this,"parent");_t(this,"is_pending",!1);_t(this,"transform_error");X(this,gt);X(this,ho,null);X(this,Bt);X(this,Nn);X(this,Ke);X(this,Ot,null);X(this,$e,null);X(this,At,null);X(this,$t,null);X(this,Ln,0);X(this,fn,0);X(this,ar,!1);X(this,sr,new Set);X(this,lr,new Set);X(this,en,null);X(this,ui,hl(()=>(V(this,en,Tn(v(this,Ln))),()=>{V(this,en,null)})));var a;V(this,gt,t),V(this,Bt,n),V(this,Nn,l=>{var c=te;c.b=this,c.f|=Si,r(l)}),this.parent=te.b,this.transform_error=i??((a=this.parent)==null?void 0:a.transform_error)??(l=>l),V(this,Ke,kr(()=>{ee(this,Ce,Eo).call(this)},gl))}defer_effect(t){Ho(t,v(this,sr),v(this,lr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!v(this,Bt).pending}update_pending_count(t){ee(this,Ce,To).call(this,t),V(this,Ln,v(this,Ln)+t),!(!v(this,en)||v(this,ar))&&(V(this,ar,!0),Yt(()=>{V(this,ar,!1),v(this,en)&&Yn(v(this,en),v(this,Ln))}))}get_effect_pending(){return v(this,ui).call(this),o(v(this,en))}error(t){var n=v(this,Bt).onerror;let r=v(this,Bt).failed;if(!n&&!r)throw t;v(this,Ot)&&(Fe(v(this,Ot)),V(this,Ot,null)),v(this,$e)&&(Fe(v(this,$e)),V(this,$e,null)),v(this,At)&&(Fe(v(this,At)),V(this,At,null));var i=!1,a=!1;const l=()=>{if(i){sl();return}i=!0,a&&ol(),v(this,At)!==null&&Pn(v(this,At),()=>{V(this,At,null)}),ee(this,Ce,bi).call(this,()=>{on.ensure(),ee(this,Ce,Eo).call(this)})},c=s=>{try{a=!0,n==null||n(s,l),a=!1}catch(f){rn(f,v(this,Ke)&&v(this,Ke).parent)}r&&V(this,At,ee(this,Ce,bi).call(this,()=>{on.ensure();try{return ct(()=>{var f=te;f.b=this,f.f|=Si,r(v(this,gt),()=>s,()=>l)})}catch(f){return rn(f,v(this,Ke).parent),null}}))};Yt(()=>{var s;try{s=this.transform_error(t)}catch(f){rn(f,v(this,Ke)&&v(this,Ke).parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(c,f=>rn(f,v(this,Ke)&&v(this,Ke).parent)):c(s)})}}gt=new WeakMap,ho=new WeakMap,Bt=new WeakMap,Nn=new WeakMap,Ke=new WeakMap,Ot=new WeakMap,$e=new WeakMap,At=new WeakMap,$t=new WeakMap,Ln=new WeakMap,fn=new WeakMap,ar=new WeakMap,sr=new WeakMap,lr=new WeakMap,en=new WeakMap,ui=new WeakMap,Ce=new WeakSet,sf=function(){try{V(this,Ot,ct(()=>v(this,Nn).call(this,v(this,gt))))}catch(t){this.error(t)}},lf=function(t){const n=v(this,Bt).failed;n&&V(this,At,ct(()=>{n(v(this,gt),()=>t,()=>()=>{})}))},cf=function(){const t=v(this,Bt).pending;t&&(this.is_pending=!0,V(this,$e,ct(()=>t(v(this,gt)))),Yt(()=>{var n=V(this,$t,document.createDocumentFragment()),r=Xt();n.append(r),V(this,Ot,ee(this,Ce,bi).call(this,()=>(on.ensure(),ct(()=>v(this,Nn).call(this,r))))),v(this,fn)===0&&(v(this,gt).before(n),V(this,$t,null),Pn(v(this,$e),()=>{V(this,$e,null)}),ee(this,Ce,_i).call(this))}))},Eo=function(){try{if(this.is_pending=this.has_pending_snippet(),V(this,fn,0),V(this,Ln,0),V(this,Ot,ct(()=>{v(this,Nn).call(this,v(this,gt))})),v(this,fn)>0){var t=V(this,$t,document.createDocumentFragment());va(v(this,Ot),t);const n=v(this,Bt).pending;V(this,$e,ct(()=>n(v(this,gt))))}else ee(this,Ce,_i).call(this)}catch(n){this.error(n)}},_i=function(){this.is_pending=!1;for(const t of v(this,sr))me(t,Re),Ct(t);for(const t of v(this,lr))me(t,yt),Ct(t);v(this,sr).clear(),v(this,lr).clear()},bi=function(t){var n=te,r=$,i=be;Wt(v(this,Ke)),ut(v(this,Ke)),Vn(v(this,Ke).ctx);try{return t()}catch(a){return Uo(a),null}finally{Wt(n),ut(r),Vn(i)}},To=function(t){var n;if(!this.has_pending_snippet()){this.parent&&ee(n=this.parent,Ce,To).call(n,t);return}V(this,fn,v(this,fn)+t),v(this,fn)===0&&(ee(this,Ce,_i).call(this),v(this,$e)&&Pn(v(this,$e),()=>{V(this,$e,null)}),v(this,$t)&&(v(this,gt).before(v(this,$t)),V(this,$t,null)))};function _l(e,t,n,r){const i=Kn()?Zr:Di;var a=e.filter(m=>!m.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var l=te,c=bl(),s=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(m=>m.promise)):null;function f(m){c();try{r(m)}catch(w){l.f&Vt||rn(w,l)}Ai()}if(n.length===0){s.then(()=>f(t.map(i)));return}function h(){c(),Promise.all(n.map(m=>xl(m))).then(m=>f([...t.map(i),...m])).catch(m=>rn(m,l))}s?s.then(h):h()}function bl(){var e=te,t=$,n=be,r=Z;return function(a=!0){Wt(e),ut(t),Vn(n),a&&(r==null||r.activate())}}function Ai(e=!0){Wt(null),ut(null),Vn(null),e&&(Z==null||Z.deactivate())}function yl(){var e=te.b,t=Z,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function Zr(e){var t=De|Re,n=$!==null&&$.f&De?$:null;return te!==null&&(te.f|=Hn),{ctx:be,deps:null,effects:null,equals:Oo,f:t,fn:e,reactions:null,rv:0,v:Ae,wv:0,parent:n??te,ac:null}}function xl(e,t,n){te===null&&Xs();var i=void 0,a=Tn(Ae),l=!$,c=new Map;return Ll(()=>{var w;var s=No();i=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).finally(Ai)}catch(p){s.reject(p),Ai()}var f=Z;if(l){var h=yl();(w=c.get(f))==null||w.reject(Cn),c.delete(f),c.set(f,s)}const m=(p,_=void 0)=>{if(f.activate(),_)_!==Cn&&(a.f|=nn,Yn(a,_));else{a.f&nn&&(a.f^=nn),Yn(a,p);for(const[y,d]of c){if(c.delete(y),y===f)break;d.reject(Cn)}}h&&h()};s.promise.then(m,p=>m(null,p||"unknown"))}),Ni(()=>{for(const s of c.values())s.reject(Cn)}),new Promise(s=>{function f(h){function m(){h===i?s(a):f(i)}h.then(m,m)}f(i)})}function F(e){const t=Zr(e);return ga(t),t}function Di(e){const t=Zr(e);return t.equals=qo,t}function kl(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Fe(t[n])}}function Sl(e){for(var t=e.parent;t!==null;){if(!(t.f&De))return t.f&Vt?null:t;t=t.parent}return null}function Ri(e){var t,n=te;Wt(Sl(e));try{e.f&=~kn,kl(e),t=ya(e)}finally{Wt(n)}return t}function Zo(e){var t=Ri(e);if(!e.equals(t)&&(e.wv=_a(),(!(Z!=null&&Z.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){me(e,Te);return}ln||(Me!==null?(Wi()||Z!=null&&Z.is_fork)&&Me.set(e,t):Ti(e))}function Cl(e){var t,n;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(n=r.ac)==null||n.abort(Cn),r.teardown=ki,r.ac=null,Cr(r,0),Bi(r))}function Qo(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Xn(t)}let Mi=new Set;const an=new Map;let Jo=!1;function Tn(e,t){var n={f:0,v:e,reactions:null,equals:Oo,rv:0,wv:0};return n}function U(e,t){const n=Tn(e);return ga(n),n}function El(e,t=!1,n=!0){var i;const r=Tn(e);return t||(r.equals=qo),Gn&&n&&be!==null&&be.l!==null&&((i=be.l).s??(i.s=[])).push(r),r}function g(e,t,n=!1){$!==null&&(!Et||$.f&zo)&&Kn()&&$.f&(De|Gt|Ei|zo)&&(dt===null||!Un.call(dt,e))&&il();let r=n?We(t):t;return Yn(e,r)}function Yn(e,t){if(!e.equals(t)){var n=e.v;ln?an.set(e,t):an.set(e,n),e.v=t;var r=on.ensure();if(r.capture(e,n),e.f&De){const i=e;e.f&Re&&Ri(i),Ti(i)}e.wv=_a(),ea(e,Re),Kn()&&te!==null&&te.f&Te&&!(te.f&(bt|bn))&&(ft===null?Ol([e]):ft.push(e)),!r.is_fork&&Mi.size>0&&!Jo&&Tl()}return t}function Tl(){Jo=!1;for(const e of Mi)e.f&Te&&me(e,yt),Sr(e)&&Xn(e);Mi.clear()}function $o(e,t=1){var n=o(e),r=t===1?n++:n--;return g(e,n),r}function yr(e){g(e,e.v+1)}function ea(e,t){var n=e.reactions;if(n!==null)for(var r=Kn(),i=n.length,a=0;a<i;a++){var l=n[a],c=l.f;if(!(!r&&l===te)){var s=(c&Re)===0;if(s&&me(l,t),c&De){var f=l;Me==null||Me.delete(f),c&kn||(c<&&(l.f|=kn),ea(f,yt))}else s&&(c&Gt&&St!==null&&St.add(l),Ct(l))}}}function We(e){if(typeof e!="object"||e===null||Sn in e)return e;const t=Mo(e);if(t!==js&&t!==Us)return e;var n=new Map,r=xi(e),i=U(0),a=An,l=c=>{if(An===a)return c();var s=$,f=An;ut(null),ma(a);var h=c();return ut(s),ma(f),h};return r&&n.set("length",U(e.length)),new Proxy(e,{defineProperty(c,s,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&nl();var h=n.get(s);return h===void 0?l(()=>{var m=U(f.value);return n.set(s,m),m}):g(h,f.value,!0),!0},deleteProperty(c,s){var f=n.get(s);if(f===void 0){if(s in c){const h=l(()=>U(Ae));n.set(s,h),yr(i)}}else g(f,Ae),yr(i);return!0},get(c,s,f){var p;if(s===Sn)return e;var h=n.get(s),m=s in c;if(h===void 0&&(!m||(p=Fn(c,s))!=null&&p.writable)&&(h=l(()=>{var _=We(m?c[s]:Ae),y=U(_);return y}),n.set(s,h)),h!==void 0){var w=o(h);return w===Ae?void 0:w}return Reflect.get(c,s,f)},getOwnPropertyDescriptor(c,s){var f=Reflect.getOwnPropertyDescriptor(c,s);if(f&&"value"in f){var h=n.get(s);h&&(f.value=o(h))}else if(f===void 0){var m=n.get(s),w=m==null?void 0:m.v;if(m!==void 0&&w!==Ae)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return f},has(c,s){var w;if(s===Sn)return!0;var f=n.get(s),h=f!==void 0&&f.v!==Ae||Reflect.has(c,s);if(f!==void 0||te!==null&&(!h||(w=Fn(c,s))!=null&&w.writable)){f===void 0&&(f=l(()=>{var p=h?We(c[s]):Ae,_=U(p);return _}),n.set(s,f));var m=o(f);if(m===Ae)return!1}return h},set(c,s,f,h){var L;var m=n.get(s),w=s in c;if(r&&s==="length")for(var p=f;p<m.v;p+=1){var _=n.get(p+"");_!==void 0?g(_,Ae):p in c&&(_=l(()=>U(Ae)),n.set(p+"",_))}if(m===void 0)(!w||(L=Fn(c,s))!=null&&L.writable)&&(m=l(()=>U(void 0)),g(m,We(f)),n.set(s,m));else{w=m.v!==Ae;var y=l(()=>We(f));g(m,y)}var d=Reflect.getOwnPropertyDescriptor(c,s);if(d!=null&&d.set&&d.set.call(h,f),!w){if(r&&typeof s=="string"){var x=n.get("length"),O=Number(s);Number.isInteger(O)&&O>=x.v&&g(x,O+1)}yr(i)}return!0},ownKeys(c){o(i);var s=Reflect.ownKeys(c).filter(m=>{var w=n.get(m);return w===void 0||w.v!==Ae});for(var[f,h]of n)h.v!==Ae&&!(f in c)&&s.push(f);return s},setPrototypeOf(){rl()}})}function ta(e){try{if(e!==null&&typeof e=="object"&&Sn in e)return e[Sn]}catch{}return e}function Pl(e,t){return Object.is(ta(e),ta(t))}var na,ra,ia,oa;function Il(){if(na===void 0){na=window,ra=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;ia=Fn(t,"firstChild").get,oa=Fn(t,"nextSibling").get,Wo(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Wo(n)&&(n.__t=void 0)}}function Xt(e=""){return document.createTextNode(e)}function Zt(e){return ia.call(e)}function xr(e){return oa.call(e)}function b(e,t){return Zt(e)}function Ue(e,t=!1){{var n=Zt(e);return n instanceof Comment&&n.data===""?xr(n):n}}function T(e,t=1,n=!1){let r=e;for(;t--;)r=xr(r);return r}function Al(e){e.textContent=""}function aa(){return!1}function sa(e,t,n){return document.createElementNS(Ro,e,void 0)}let la=!1;function Dl(){la||(la=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)(t=n.__on_r)==null||t.call(n)})},{capture:!0}))}function Qr(e){var t=$,n=te;ut(null),Wt(null);try{return e()}finally{ut(t),Wt(n)}}function Rl(e,t,n,r=n){e.addEventListener(t,()=>Qr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Dl()}function Ml(e){te===null&&($===null&&$s(),Js()),ln&&Qs()}function Wl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Qt(e,t,n){var r=te;r!==null&&r.f&Ze&&(e|=Ze);var i={ctx:be,deps:null,nodes:null,f:e|Re|lt,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{Xn(i)}catch(c){throw Fe(i),c}else t!==null&&Ct(i);var a=i;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&Hn)&&(a=a.first,e&Gt&&e&xn&&a!==null&&(a.f|=xn)),a!==null&&(a.parent=r,r!==null&&Wl(a,r),$!==null&&$.f&De&&!(e&bn))){var l=$;(l.effects??(l.effects=[])).push(a)}return i}function Wi(){return $!==null&&!Et}function Ni(e){const t=Qt(Kr,null,!1);return me(t,Te),t.teardown=e,t}function sn(e){Ml();var t=te.f,n=!$&&(t&bt)!==0&&(t&yn)===0;if(n){var r=be;(r.e??(r.e=[])).push(e)}else return ca(e)}function ca(e){return Qt(_r|Gs,e,!1)}function Nl(e){on.ensure();const t=Qt(bn|Hn,e,!0);return(n={})=>new Promise(r=>{n.outro?Pn(t,()=>{Fe(t),r(void 0)}):(Fe(t),r(void 0))})}function Li(e){return Qt(_r,e,!1)}function Ll(e){return Qt(Ei|Hn,e,!0)}function zi(e,t=0){return Qt(Kr|t,e,!0)}function M(e,t=[],n=[],r=[]){_l(r,t,n,i=>{Qt(Kr,()=>e(...i.map(o)),!0)})}function kr(e,t=0){var n=Qt(Gt|t,e,!0);return n}function ct(e){return Qt(bt|Hn,e,!0)}function ua(e){var t=e.teardown;if(t!==null){const n=ln,r=$;ha(!0),ut(null);try{t.call(null)}finally{ha(n),ut(r)}}}function Bi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Qr(()=>{i.abort(Cn)});var r=n.next;n.f&bn?n.parent=null:Fe(n,t),n=r}}function zl(e){for(var t=e.first;t!==null;){var n=t.next;t.f&bt||Fe(t),t=n}}function Fe(e,t=!0){var n=!1;(t||e.f&Bo)&&e.nodes!==null&&e.nodes.end!==null&&(Bl(e.nodes.start,e.nodes.end),n=!0),Bi(e,t&&!n),Cr(e,0),me(e,Vt);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();ua(e);var i=e.parent;i!==null&&i.first!==null&&da(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Bl(e,t){for(;e!==null;){var n=e===t?null:xr(e);e.remove(),e=n}}function da(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Pn(e,t,n=!0){var r=[];fa(e,r,!0);var i=()=>{n&&Fe(e),t&&t()},a=r.length;if(a>0){var l=()=>--a||i();for(var c of r)c.out(l)}else i()}function fa(e,t,n){if(!(e.f&Ze)){e.f^=Ze;var r=e.nodes&&e.nodes.t;if(r!==null)for(const c of r)(c.is_global||n)&&t.push(c);for(var i=e.first;i!==null;){var a=i.next,l=(i.f&xn)!==0||(i.f&bt)!==0&&(e.f&Gt)!==0;fa(i,t,l?n:!1),i=a}}}function Oi(e){pa(e,!0)}function pa(e,t){if(e.f&Ze){e.f^=Ze,e.f&Te||(me(e,Re),Ct(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&xn)!==0||(n.f&bt)!==0;pa(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||t)&&l.in()}}function va(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:xr(n);t.append(n),n=i}}let Jr=!1,ln=!1;function ha(e){ln=e}let $=null,Et=!1;function ut(e){$=e}let te=null;function Wt(e){te=e}let dt=null;function ga(e){$!==null&&(dt===null?dt=[e]:dt.push(e))}let He=null,Qe=0,ft=null;function Ol(e){ft=e}let wa=1,In=0,An=In;function ma(e){An=e}function _a(){return++wa}function Sr(e){var t=e.f;if(t&Re)return!0;if(t&De&&(e.f&=~kn),t&yt){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Sr(a)&&Zo(a),a.wv>e.wv)return!0}t<&&Me===null&&me(e,Te)}return!1}function ba(e,t,n=!0){var r=e.reactions;if(r!==null&&!(dt!==null&&Un.call(dt,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&De?ba(a,t,!1):t===a&&(n?me(a,Re):a.f&Te&&me(a,yt),Ct(a))}}function ya(e){var y;var t=He,n=Qe,r=ft,i=$,a=dt,l=be,c=Et,s=An,f=e.f;He=null,Qe=0,ft=null,$=f&(bt|bn)?null:e,dt=null,Vn(e.ctx),Et=!1,An=++In,e.ac!==null&&(Qr(()=>{e.ac.abort(Cn)}),e.ac=null);try{e.f|=Ci;var h=e.fn,m=h();e.f|=yn;var w=e.deps,p=Z==null?void 0:Z.is_fork;if(He!==null){var _;if(p||Cr(e,Qe),w!==null&&Qe>0)for(w.length=Qe+He.length,_=0;_<He.length;_++)w[Qe+_]=He[_];else e.deps=w=He;if(Wi()&&e.f<)for(_=Qe;_<w.length;_++)((y=w[_]).reactions??(y.reactions=[])).push(e)}else!p&&w!==null&&Qe<w.length&&(Cr(e,Qe),w.length=Qe);if(Kn()&&ft!==null&&!Et&&w!==null&&!(e.f&(De|yt|Re)))for(_=0;_<ft.length;_++)ba(ft[_],e);if(i!==null&&i!==e){if(In++,i.deps!==null)for(let d=0;d<n;d+=1)i.deps[d].rv=In;if(t!==null)for(const d of t)d.rv=In;ft!==null&&(r===null?r=ft:r.push(...ft))}return e.f&nn&&(e.f^=nn),m}catch(d){return Uo(d)}finally{e.f^=Ci,He=t,Qe=n,ft=r,$=i,dt=a,Vn(l),Et=c,An=s}}function ql(e,t){let n=t.reactions;if(n!==null){var r=Bs.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&De&&(He===null||!Un.call(He,t))){var a=t;a.f<&&(a.f^=lt,a.f&=~kn),Ti(a),Cl(a),Cr(a,0)}}function Cr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ql(e,n[r])}function Xn(e){var t=e.f;if(!(t&Vt)){me(e,Te);var n=te,r=Jr;te=e,Jr=!0;try{t&(Gt|Lo)?zl(e):Bi(e),ua(e);var i=ya(e);e.teardown=typeof i=="function"?i:null,e.wv=wa;var a;yi&&cl&&e.f&Re&&e.deps}finally{Jr=r,te=n}}}async function jl(){await Promise.resolve(),pl()}function o(e){var t=e.f,n=(t&De)!==0;if($!==null&&!Et){var r=te!==null&&(te.f&Vt)!==0;if(!r&&(dt===null||!Un.call(dt,e))){var i=$.deps;if($.f&Ci)e.rv<In&&(e.rv=In,He===null&&i!==null&&i[Qe]===e?Qe++:He===null?He=[e]:He.push(e));else{($.deps??($.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[$]:Un.call(a,$)||a.push($)}}}if(ln&&an.has(e))return an.get(e);if(n){var l=e;if(ln){var c=l.v;return(!(l.f&Te)&&l.reactions!==null||ka(l))&&(c=Ri(l)),an.set(l,c),c}var s=(l.f<)===0&&!Et&&$!==null&&(Jr||($.f<)!==0),f=(l.f&yn)===0;Sr(l)&&(s&&(l.f|=lt),Zo(l)),s&&!f&&(Qo(l),xa(l))}if(Me!=null&&Me.has(e))return Me.get(e);if(e.f&nn)throw e.v;return e.v}function xa(e){if(e.f|=lt,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&De&&!(t.f<)&&(Qo(t),xa(t))}function ka(e){if(e.v===Ae)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(an.has(t)||t.f&De&&ka(t))return!0;return!1}function Zn(e){var t=Et;try{return Et=!0,e()}finally{Et=t}}const Dn=Symbol("events"),Sa=new Set,qi=new Set;function Ul(e,t,n,r={}){function i(a){if(r.capture||ji.call(t,a),!a.cancelBubble)return Qr(()=>n==null?void 0:n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Yt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function pt(e,t,n,r,i){var a={capture:r,passive:i},l=Ul(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ni(()=>{t.removeEventListener(e,l,a)})}function ke(e,t,n){(t[Dn]??(t[Dn]={}))[e]=n}function Er(e){for(var t=0;t<e.length;t++)Sa.add(e[t]);for(var n of qi)n(e)}let Ca=null;function ji(e){var d,x;var t=this,n=t.ownerDocument,r=e.type,i=((d=e.composedPath)==null?void 0:d.call(e))||[],a=i[0]||e.target;Ca=e;var l=0,c=Ca===e&&e[Dn];if(c){var s=i.indexOf(c);if(s!==-1&&(t===document||t===window)){e[Dn]=t;return}var f=i.indexOf(t);if(f===-1)return;s<=f&&(l=s)}if(a=i[l]||e.target,a!==t){Os(e,"currentTarget",{configurable:!0,get(){return a||n}});var h=$,m=te;ut(null),Wt(null);try{for(var w,p=[];a!==null;){var _=a.assignedSlot||a.parentNode||a.host||null;try{var y=(x=a[Dn])==null?void 0:x[r];y!=null&&(!a.disabled||e.target===a)&&y.call(a,e)}catch(O){w?p.push(O):w=O}if(e.cancelBubble||_===t||_===null)break;a=_}if(w){for(let O of p)queueMicrotask(()=>{throw O});throw w}}finally{e[Dn]=t,delete e.currentTarget,ut(h),Wt(m)}}}const Ui=((xs=globalThis==null?void 0:globalThis.window)==null?void 0:xs.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Fl(e){return(Ui==null?void 0:Ui.createHTML(e))??e}function Ea(e){var t=sa("template");return t.innerHTML=Fl(e.replaceAll("<!>","<!---->")),t.content}function Qn(e,t){var n=te;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function N(e,t){var n=(t&Do)!==0,r=(t&zs)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Ea(a?e:"<!>"+e),n||(i=Zt(i)));var l=r||ra?document.importNode(i,!0):i.cloneNode(!0);if(n){var c=Zt(l),s=l.lastChild;Qn(c,s)}else Qn(l,l);return l}}function Hl(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&Do)!==0,a=`<${n}>${r?e:"<!>"+e}</${n}>`,l;return()=>{if(!l){var c=Ea(a),s=Zt(c);if(i)for(l=document.createDocumentFragment();Zt(s);)l.appendChild(Zt(s));else l=Zt(s)}var f=l.cloneNode(!0);if(i){var h=Zt(f),m=f.lastChild;Qn(h,m)}else Qn(f,f);return f}}function Tt(e,t){return Hl(e,t,"svg")}function Jt(e=""){{var t=Xt(e+"");return Qn(t,t),t}}function Jn(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Xt();return e.append(t,n),Qn(t,n),e}function S(e,t){e!==null&&e.before(t)}const Gl=["touchstart","touchmove"];function Vl(e){return Gl.includes(e)}function q(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=`${n}`)}function Kl(e,t){return Yl(e,t)}const $r=new Map;function Yl(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:l=!0,transformError:c}){Il();var s=void 0,f=Nl(()=>{var h=n??t.appendChild(Xt());wl(h,{pending:()=>{}},p=>{xt({});var _=be;a&&(_.c=a),i&&(r.$$events=i),s=e(p,r)||{},kt()},c);var m=new Set,w=p=>{for(var _=0;_<p.length;_++){var y=p[_];if(!m.has(y)){m.add(y);var d=Vl(y);for(const L of[t,document]){var x=$r.get(L);x===void 0&&(x=new Map,$r.set(L,x));var O=x.get(y);O===void 0?(L.addEventListener(y,ji,{passive:d}),x.set(y,1)):x.set(y,O+1)}}}};return w(Vr(Sa)),qi.add(w),()=>{var d;for(var p of m)for(const x of[t,document]){var _=$r.get(x),y=_.get(p);--y==0?(x.removeEventListener(p,ji),_.delete(p),_.size===0&&$r.delete(x)):_.set(p,y)}qi.delete(w),h!==n&&((d=h.parentNode)==null||d.removeChild(h))}});return Xl.set(s,f),s}let Xl=new WeakMap;class Fi{constructor(t,n=!0){_t(this,"anchor");X(this,Dt,new Map);X(this,qt,new Map);X(this,et,new Map);X(this,zn,new Set);X(this,Wr,!0);X(this,Nr,()=>{var t=Z;if(v(this,Dt).has(t)){var n=v(this,Dt).get(t),r=v(this,qt).get(n);if(r)Oi(r),v(this,zn).delete(n);else{var i=v(this,et).get(n);i&&(v(this,qt).set(n,i.effect),v(this,et).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[a,l]of v(this,Dt)){if(v(this,Dt).delete(a),a===t)break;const c=v(this,et).get(l);c&&(Fe(c.effect),v(this,et).delete(l))}for(const[a,l]of v(this,qt)){if(a===n||v(this,zn).has(a))continue;const c=()=>{if(Array.from(v(this,Dt).values()).includes(a)){var f=document.createDocumentFragment();va(l,f),f.append(Xt()),v(this,et).set(a,{effect:l,fragment:f})}else Fe(l);v(this,zn).delete(a),v(this,qt).delete(a)};v(this,Wr)||!r?(v(this,zn).add(a),Pn(l,c,!1)):c()}}});X(this,di,t=>{v(this,Dt).delete(t);const n=Array.from(v(this,Dt).values());for(const[r,i]of v(this,et))n.includes(r)||(Fe(i.effect),v(this,et).delete(r))});this.anchor=t,V(this,Wr,n)}ensure(t,n){var r=Z,i=aa();if(n&&!v(this,qt).has(t)&&!v(this,et).has(t))if(i){var a=document.createDocumentFragment(),l=Xt();a.append(l),v(this,et).set(t,{effect:ct(()=>n(l)),fragment:a})}else v(this,qt).set(t,ct(()=>n(this.anchor)));if(v(this,Dt).set(r,t),i){for(const[c,s]of v(this,qt))c===t?r.unskip_effect(s):r.skip_effect(s);for(const[c,s]of v(this,et))c===t?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(v(this,Nr)),r.ondiscard(v(this,di))}else v(this,Nr).call(this)}}Dt=new WeakMap,qt=new WeakMap,et=new WeakMap,zn=new WeakMap,Wr=new WeakMap,Nr=new WeakMap,di=new WeakMap;function ei(e){be===null&&Ys(),Gn&&be.l!==null?Zl(be).m.push(e):sn(()=>{const t=Zn(e);if(typeof t=="function")return t})}function Zl(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function G(e,t,n=!1){var r=new Fi(e),i=n?xn:0;function a(l,c){r.ensure(l,c)}kr(()=>{var l=!1;t((c,s=0)=>{l=!0,a(s,c)}),l||a(!1,null)},i)}const Ql=Symbol("NaN");function Ta(e,t,n){var r=new Fi(e),i=!Kn();kr(()=>{var a=t();a!==a&&(a=Ql),i&&a!==null&&typeof a=="object"&&(a={}),r.ensure(a,n)})}function Rn(e,t){return t}function Jl(e,t,n){for(var r=[],i=t.length,a,l=t.length,c=0;c<i;c++){let m=t[c];Pn(m,()=>{if(a){if(a.pending.delete(m),a.done.add(m),a.pending.size===0){var w=e.outrogroups;Hi(Vr(a.done)),w.delete(a),w.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var s=r.length===0&&n!==null;if(s){var f=n,h=f.parentNode;Al(h),h.append(f),e.items.clear()}Hi(t,!s)}else a={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function Hi(e,t=!0){for(var n=0;n<e.length;n++)Fe(e[n],t)}var Pa;function Nt(e,t,n,r,i,a=null){var l=e,c=new Map,s=(t&mr)!==0;if(s){var f=e;l=f.appendChild(Xt())}var h=null,m=Di(()=>{var x=n();return xi(x)?x:x==null?[]:Vr(x)}),w,p=!0;function _(){d.fallback=h,$l(d,w,l,t,r),h!==null&&(w.length===0?h.f&Kt?(h.f^=Kt,Pr(h,null,l)):Oi(h):Pn(h,()=>{h=null}))}var y=kr(()=>{w=o(m);for(var x=w.length,O=new Set,L=Z,P=aa(),R=0;R<x;R+=1){var A=w[R],E=r(A,R),D=p?null:c.get(E);D?(D.v&&Yn(D.v,A),D.i&&Yn(D.i,R),P&&L.unskip_effect(D.e)):(D=ec(c,p?l:Pa??(Pa=Xt()),A,E,R,i,t,n),p||(D.e.f|=Kt),c.set(E,D)),O.add(E)}if(x===0&&a&&!h&&(p?h=ct(()=>a(l)):(h=ct(()=>a(Pa??(Pa=Xt()))),h.f|=Kt)),x>O.size&&Zs(),!p)if(P){for(const[K,Y]of c)O.has(K)||L.skip_effect(Y.e);L.oncommit(_),L.ondiscard(()=>{})}else _();o(m)}),d={effect:y,items:c,outrogroups:null,fallback:h};p=!1}function Tr(e){for(;e!==null&&!(e.f&bt);)e=e.next;return e}function $l(e,t,n,r,i){var Y,ne,le,ue,tt,Le,we,nt,Rt;var a=(r&As)!==0,l=t.length,c=e.items,s=Tr(e.effect.first),f,h=null,m,w=[],p=[],_,y,d,x;if(a)for(x=0;x<l;x+=1)_=t[x],y=i(_,x),d=c.get(y).e,d.f&Kt||((ne=(Y=d.nodes)==null?void 0:Y.a)==null||ne.measure(),(m??(m=new Set)).add(d));for(x=0;x<l;x+=1){if(_=t[x],y=i(_,x),d=c.get(y).e,e.outrogroups!==null)for(const ze of e.outrogroups)ze.pending.delete(d),ze.done.delete(d);if(d.f&Kt)if(d.f^=Kt,d===s)Pr(d,null,n);else{var O=h?h.next:s;d===e.effect.last&&(e.effect.last=d.prev),d.prev&&(d.prev.next=d.next),d.next&&(d.next.prev=d.prev),cn(e,h,d),cn(e,d,O),Pr(d,O,n),h=d,w=[],p=[],s=Tr(h.next);continue}if(d.f&Ze&&(Oi(d),a&&((ue=(le=d.nodes)==null?void 0:le.a)==null||ue.unfix(),(m??(m=new Set)).delete(d))),d!==s){if(f!==void 0&&f.has(d)){if(w.length<p.length){var L=p[0],P;h=L.prev;var R=w[0],A=w[w.length-1];for(P=0;P<w.length;P+=1)Pr(w[P],L,n);for(P=0;P<p.length;P+=1)f.delete(p[P]);cn(e,R.prev,A.next),cn(e,h,R),cn(e,A,L),s=L,h=A,x-=1,w=[],p=[]}else f.delete(d),Pr(d,s,n),cn(e,d.prev,d.next),cn(e,d,h===null?e.effect.first:h.next),cn(e,h,d),h=d;continue}for(w=[],p=[];s!==null&&s!==d;)(f??(f=new Set)).add(s),p.push(s),s=Tr(s.next);if(s===null)continue}d.f&Kt||w.push(d),h=d,s=Tr(d.next)}if(e.outrogroups!==null){for(const ze of e.outrogroups)ze.pending.size===0&&(Hi(Vr(ze.done)),(tt=e.outrogroups)==null||tt.delete(ze));e.outrogroups.size===0&&(e.outrogroups=null)}if(s!==null||f!==void 0){var E=[];if(f!==void 0)for(d of f)d.f&Ze||E.push(d);for(;s!==null;)!(s.f&Ze)&&s!==e.fallback&&E.push(s),s=Tr(s.next);var D=E.length;if(D>0){var K=r&mr&&l===0?n:null;if(a){for(x=0;x<D;x+=1)(we=(Le=E[x].nodes)==null?void 0:Le.a)==null||we.measure();for(x=0;x<D;x+=1)(Rt=(nt=E[x].nodes)==null?void 0:nt.a)==null||Rt.fix()}Jl(e,E,K)}}a&&Yt(()=>{var ze,rt;if(m!==void 0)for(d of m)(rt=(ze=d.nodes)==null?void 0:ze.a)==null||rt.apply()})}function ec(e,t,n,r,i,a,l,c){var s=l&se?l&Ds?Tn(n):El(n,!1,!1):null,f=l&xe?Tn(i):null;return{v:s,i:f,e:ct(()=>(a(t,s??n,f??i,c),()=>{e.delete(r)}))}}function Pr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&Kt)?t.nodes.start:n;r!==null;){var l=xr(r);if(a.before(r),r===i)return;r=l}}function cn(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ia(e,t,n,r,i){var c;var a=(c=t.$$slots)==null?void 0:c[n],l=!1;a===!0&&(a=t.children,l=!0),a===void 0||a(e,l?()=>r:r)}function Aa(e,t,n){var r=new Fi(e);kr(()=>{var i=t()??null;r.ensure(i,i&&(a=>n(a,i)))},xn)}function Pt(e,t){Li(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=sa("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function tc(e,t,n){Li(()=>{var r=Zn(()=>t(e,n==null?void 0:n())||{});if(r!=null&&r.destroy)return()=>r.destroy()})}function Da(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Da(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function nc(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Da(e))&&(r&&(r+=" "),r+=t);return r}function $n(e){return typeof e=="object"?nc(e):e??""}const Ra=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function rc(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var a=i.length,l=0;(l=r.indexOf(i,l))>=0;){var c=l+a;(l===0||Ra.includes(r[l-1]))&&(c===r.length||Ra.includes(r[c]))?r=(l===0?"":r.substring(0,l))+r.substring(c+1):l=c}}return r===""?null:r}function Ma(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==""&&(r+=" "+i+": "+a+n)}return r}function ic(e,t){if(t){var n="",r,i;return Array.isArray(t)?(r=t[0],i=t[1]):r=t,r&&(n+=Ma(r)),i&&(n+=Ma(i,!0)),n=n.trim(),n===""?null:n}return String(e)}function Ge(e,t,n,r,i,a){var l=e.__className;if(l!==n||l===void 0){var c=rc(n,r,a);c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c),e.__className=n}else if(a&&i!==a)for(var s in a){var f=!!a[s];(i==null||f!==!!i[s])&&e.classList.toggle(s,f)}return a}function Gi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ti(e,t,n,r){var i=e.__style;if(i!==t){var a=ic(t,r);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=t}else r&&(Array.isArray(r)?(Gi(e,n==null?void 0:n[0],r[0]),Gi(e,n==null?void 0:n[1],r[1],"important")):Gi(e,n,r));return r}function Wa(e,t,n=!1){if(e.multiple){if(t==null)return;if(!xi(t))return al();for(var r of e.options)r.selected=t.includes(Na(r));return}for(r of e.options){var i=Na(r);if(Pl(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function oc(e){var t=new MutationObserver(()=>{Wa(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ni(()=>{t.disconnect()})}function Na(e){return"__value"in e?e.__value:e.value}const ac=Symbol("is custom element"),sc=Symbol("is html");function lc(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function W(e,t,n,r){var i=cc(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[Ks]=n),n==null?e.removeAttribute(t):typeof n!="string"&&uc(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function cc(e){return e.__attributes??(e.__attributes={[ac]:e.nodeName.includes("-"),[sc]:e.namespaceURI===Ro})}var La=new Map;function uc(e){var t=e.getAttribute("is")||e.nodeName,n=La.get(t);if(n)return n;La.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=qs(i);for(var l in r)r[l].set&&n.push(l);i=Mo(i)}return n}function dc(e,t,n=t){var r=new WeakSet;Rl(e,"input",async i=>{var a=i?e.defaultValue:e.value;if(a=Vi(e)?Ki(a):a,n(a),Z!==null&&r.add(Z),await jl(),a!==(a=t())){var l=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=a??"",c!==null){var f=e.value.length;l===c&&c===s&&f>s?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=l,e.selectionEnd=Math.min(c,f))}}}),Zn(t)==null&&e.value&&(n(Vi(e)?Ki(e.value):e.value),Z!==null&&r.add(Z)),zi(()=>{var i=t();if(e===document.activeElement){var a=Pi??Z;if(r.has(a))return}Vi(e)&&i===Ki(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Vi(e){var t=e.type;return t==="number"||t==="range"}function Ki(e){return e===""?null:+e}function za(e,t){return e===t||(e==null?void 0:e[Sn])===t}function Yi(e={},t,n,r){return Li(()=>{var i,a;return zi(()=>{i=a,a=[],Zn(()=>{e!==n(...a)&&(t(e,...a),i&&za(n(...i),e)&&t(null,...i))})}),()=>{Yt(()=>{a&&za(n(...a),e)&&t(null,...a)})}}),e}let ni=!1;function fc(e){var t=ni;try{return ni=!1,[e(),ni]}finally{ni=t}}function Ve(e,t,n,r){var L;var i=!Gn||(n&Ms)!==0,a=(n&Ns)!==0,l=(n&Ls)!==0,c=r,s=!0,f=()=>(s&&(s=!1,c=l?Zn(r):r),c),h;if(a){var m=Sn in e||Vs in e;h=((L=Fn(e,t))==null?void 0:L.set)??(m&&t in e?P=>e[t]=P:void 0)}var w,p=!1;a?[w,p]=fc(()=>e[t]):w=e[t],w===void 0&&r!==void 0&&(w=f(),h&&(i&&tl(),h(w)));var _;if(i?_=()=>{var P=e[t];return P===void 0?f():(s=!0,P)}:_=()=>{var P=e[t];return P!==void 0&&(c=void 0),P===void 0?c:P},i&&!(n&Ws))return _;if(h){var y=e.$$legacy;return function(P,R){return arguments.length>0?((!i||!R||y||p)&&h(R?_():P),P):_()}}var d=!1,x=(n&Rs?Zr:Di)(()=>(d=!1,_()));a&&o(x);var O=te;return function(P,R){if(arguments.length>0){const A=R?o(x):i&&a?We(P):P;return g(x,A),d=!0,c!==void 0&&(c=A),P}return ln&&d||O.f&Vt?x.v:o(x)}}const Ba="wineater_consent",pc=["wineater_uid","uniqueUserID","sessionID"];function vc(){try{const e=window.localStorage.getItem(Ba);return e==="granted"||e==="denied"?e:null}catch{return null}}let Xi=U(We(vc())),ri=U(null),ii=null;function hc(e){ii=e}function gc(e){g(ri,e,!0)}function Oa(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:o(ri)===!0}function wc(){return ii?!1:o(ri)!==null&&Oa()&&o(Xi)===null}function qa(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1?!1:ii?ii():o(ri)===null?!1:Oa()?o(Xi)==="granted":!0}function mc(){for(const e of pc){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const Zi=new Set;function _c(e){return Zi.add(e),()=>Zi.delete(e)}function ja(e){g(Xi,e,!0);try{window.localStorage.setItem(Ba,e)}catch{}e==="denied"&&mc();for(const t of Zi)t(e)}const bc=/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/;function yc(e){if(!e||typeof e!="object")return null;const t=e,n=String(t.shop??"").trim().toLowerCase();if(!bc.test(n))return null;const r=typeof t.root=="string"&&t.root.startsWith("/")?t.root:"/";return{shop:n,locale:typeof t.locale=="string"&&t.locale?t.locale:null,currency:typeof t.currency=="string"&&t.currency?t.currency:null,root:r.endsWith("/")?r:`${r}/`,config:t.config&&typeof t.config=="object"?t.config:null,color:typeof t.color=="string"&&/^#[0-9a-f]{3,8}$/i.test(t.color)?t.color:null}}let Qi;function vt(){var e;return Qi===void 0&&(Qi=typeof window>"u"?null:yc((e=window.wineaterData)==null?void 0:e.shopify)),Qi}function Ua(e){var r;const t=(r=/[?&]variant=(\d+)/.exec(e.url??""))==null?void 0:r[1];if(t)return t;const n=String(e.itemId??"").trim();return/^\d+$/.test(n)?n:null}function xc(e,t,n){const r=i=>(i??"").toLowerCase().split("-")[0];for(const i of[r(e),r(t)])if(i&&n.includes(i))return i;return"en"}function kc(e,t){return e===429&&(t==null?void 0:t.code)==="quota_exceeded"}class Fa extends Error{constructor(){super("quota_exceeded"),this.name="QuotaExceededError"}}let Ji=null;function Ha(){var t,n;if(Ji)return Ji;let e=null;try{e=window.sessionStorage.getItem("wineater_sf_session")}catch{}if(!e){e=((n=(t=globalThis.crypto)==null?void 0:t.randomUUID)==null?void 0:n.call(t))??`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;try{window.sessionStorage.setItem("wineater_sf_session",e)}catch{}}return Ji=e,e}function Sc(){var e;try{const t=(e=window.Shopify)==null?void 0:e.customerPrivacy;if(t&&typeof t.analyticsProcessingAllowed=="function")return t.analyticsProcessingAllowed()===!0}catch{}return!1}function Cc(){try{const e=window.Shopify;if(e!=null&&e.customerPrivacy||typeof(e==null?void 0:e.loadFeatures)!="function")return;e.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],()=>{})}catch{}}const Ga="5.1.1";function Va(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function $i(e,t,n){let r="";if(n){const i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),r="; expires="+i.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/; secure; samesite=strict"}function eo(e){const t=e+"=",n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function Ec(){const e="uniqueUserID";let t=eo(e);return t||(t=Va(),$i(e,t,365)),t}function Se(e,t,n={},r={}){var _;const i=(_=vt())==null?void 0:_.shop,a=i?"https://api.wineater.com/shopify/storefront/events":"https://api.wineater.com/api/widget-events",l=i?{shop:i}:{},c=new Date().toISOString(),s=navigator.language.split("-")[1]||null,f=navigator.language.split("-")[0]||"en";if(!qa()){const y={...l,event_type:e,store_id:t,event_time:c,data:n,meta:{...r,anonymous:!0,widget_version:Ga},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:f};return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y),keepalive:!0}).catch(d=>{console.debug("[wineater] anonymous event failed:",d==null?void 0:d.message)})}let h=eo("uniqueUserID");h||(h=Ec());const m={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let w=eo("sessionID");w||(w=Va(),$i("sessionID",w,1));const p={...l,event_type:e,store_id:t,session_id:w,event_time:c,data:n,meta:{...r,user_id:h,widget_version:Ga},device_info:m,region:s,language:f};return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),keepalive:!!i}).then(y=>y.ok?y.json():y.json().then(d=>{throw new Error(d.message||"Failed to track widget event")})).catch(y=>{throw console.error("Widget event tracking error:",y),y})}function Tc(e){return{id:String(e.ID),appellation:e.Appellation||null,country:e.Country||null,grape:e.Grape,image:e.Image,price:Number(e.Price),producer:e.Producer||null,region:e.Region,score:e.Score?Number(e.Score):null,shortDescription:e["Short Description"]||null,store:e.Store,storeId:e.Store_id||null,tags:Array.isArray(e.Tags)?e.Tags.map(String):[],title:e.Title,type:e.Type,url:e.Url||null,vintage:e.Vintage?Number(e.Vintage):null,pairingRecommendation:e.pairing_recommendation||null,total:e.Total?Number(e.Total):null,itemId:e.item_id||null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function Ir(e){return{id:String(e.id),title:String(e.title),description:String(e.description),region:String(e.region),price:Number(e.price),grape:String(e.grape),appellation:e.appellation?String(e.appellation):null,url:e.url?String(e.url):null,store:String(e.store),storeId:e.storeId?String(e.storeId):null,image:String(e.image),country:e.country?String(e.country):null,vintage:e.vintage?Number(e.vintage):null,tags:Array.isArray(e.tags)?e.tags.map(String):[],score:e.score?Number(e.score):null,total:e.total?Number(e.total):null,isPromote:e.is_promote?!!e.is_promote:null,stock:e.stock?Number(e.stock):null,distance:Number(e.distance),reason:String(e.reason),type:String(e.type),byTheGlass:!!e.by_the_glass,glassPrice:e.glass_price!=null?Number(e.glass_price):null}}function Pc(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(Ir),hasMore:!!e.has_more}}const to=e=>{if(e==null||e==="")return null;const t=Number(e);return Number.isFinite(t)?t:null};function Ic(e){return{cards:((e==null?void 0:e.cards)??[]).filter(n=>n&&n.id!=null).map((n,r)=>({id:String(n.id),title:n.title?String(n.title):"",total:to(n.total),type:n.type??null,grape:n.grape??null,region:n.region??null,country:n.country??null,vintage:to(n.vintage),image:n.image?String(n.image):"",url:n.url||null,tags:Array.isArray(n.tags)?n.tags.map(String).filter(Boolean):typeof n.tags=="string"?n.tags.split(",").map(i=>i.trim()).filter(Boolean):[],shortDescription:n.short_description||null,producer:n.producer||null,appellation:n.appellation||null,byTheGlass:!!n.by_the_glass,glassPrice:to(n.glass_price),priceLevel:n.predicted_price_level||null,rank:r})),queryId:(e==null?void 0:e.query_id)??null}}const Ar="wineater_uid",Ac=365;let oi=null;function Ka(){const e=globalThis.crypto;if(e!=null&&e.randomUUID)return e.randomUUID();const t=new Uint8Array(16);if(e!=null&&e.getRandomValues)e.getRandomValues(t);else for(let r=0;r<16;r++)t[r]=Math.random()*256|0;t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const Ya=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function Xa(e){try{const t=e+"=";for(const n of document.cookie.split(";")){const r=n.trim();if(r.startsWith(t))return decodeURIComponent(r.slice(t.length))}}catch{}return null}function Dc(e,t){try{const n=new Date(Date.now()+Ac*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function Za(){return qa()}_c(e=>{e==="denied"&&(oi=null)});function no(){if(!Za())return null;if(oi)return oi;let e=null;try{e=window.localStorage.getItem(Ar)}catch{}(!e||!Ya.test(e))&&(e=Xa(Ar)),(!e||!Ya.test(e))&&(e=Ka());try{window.localStorage.setItem(Ar,e)}catch{}return Xa(Ar)!==e&&Dc(Ar,e),oi=e,e}function Qa(){return Ka()}const Rc=2e3,Ja=100;let ai=null,er=[],Dr=null,$a=!1;function Mc(e){ai=e,!($a||typeof document>"u")&&($a=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Rr()}),window.addEventListener("pagehide",()=>void Rr()))}function It(e){var t;if(!(!Za()||!ai)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(er.push(e),er.length>=Ja){Rr();return}Dr||(Dr=setTimeout(()=>void Rr(),Rc))}}async function Rr(){if(Dr&&(clearTimeout(Dr),Dr=null),!ai||er.length===0)return;const e=no();if(!e){er=[];return}const t=er.splice(0,Ja);try{await ai({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}er.length>0&&Rr()}const es=24;function ts(e,t,n){return e!=="bar"||!t||!n||t===n?null:t}function si(e,t){return t?{...e,language:t}:e}function Wc(e,t){const n=t==null?void 0:t.translations;return e.map(r=>{const i=n&&typeof n=="object"?n[r.id]:null,a={};if(i&&typeof i.shortDescription=="string"&&i.shortDescription.trim()&&(a.shortDescription=i.shortDescription),i&&Array.isArray(i.tags)){const l=i.tags.filter(c=>typeof c=="string"&&c.trim());l.length&&(a.tags=l)}return a})}async function Nc(e,t,n){const r=[...new Set(t.filter(Boolean))];if(!r.length||!n)return null;const i={};let a=!1;for(let l=0;l<r.length;l+=es)try{const c=await e({ids:r.slice(l,l+es),language:n});c&&typeof c.translations=="object"&&c.translations&&(Object.assign(i,c.translations),a=!0)}catch{}return a?{language:n,translations:i}:null}const Lc="X-Wineater-Uid";class ns extends Error{constructor(n,r){super(`API call failed with status ${n}: ${(r==null?void 0:r.message)||"No additional error information"}`);_t(this,"status");_t(this,"data");this.status=n,this.data=r}}class zc{constructor(t,n="1"){X(this,he);X(this,cr,"https://api.wineater.com/");X(this,Lr);X(this,pn);X(this,ur,!1);X(this,dr,null);X(this,vn,null);V(this,Lr,t),V(this,pn,n)}async getInstantRecommendations(){var t;try{const n=(t=vt())==null?void 0:t.shop,r=n?"shopify/storefront/instant":v(this,pn)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant",{data:i,headers:a}=await ee(this,he,Io).call(this,r,n?ee(this,he,Ao).call(this,{}):{});return{wines:i.filter(Boolean).map(Tc),profileHash:a.get("X-Wineater-Profile")||null}}catch(n){throw new Error(`Error in getInstantRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(t,n){if(vt())return ee(this,he,Is).call(this,t,n);try{const r=v(this,pn)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search",i=n?{text:t,query_id:n}:{text:t};return(await ee(this,he,Ht).call(this,r,v(this,pn)==="2"?si(i,v(this,vn)):i)).filter(Boolean).map(Ir)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async searchStream(t,n,r){const i=()=>this.getWineRecommendationsSearch(t,n);if(v(this,pn)!=="2"||vt())return i();let a;try{a=await fetch(`${v(this,cr)}dish/recommendations/search/v2/stream`,{method:"POST",headers:ee(this,he,Po).call(this),body:JSON.stringify(si(n?{text:t,query_id:n}:{text:t},v(this,vn)))})}catch{return i()}if(!a.ok||!a.body)return i();const l=a.body.getReader(),c=new TextDecoder;let s="",f=null;const h=m=>(m??[]).filter(Boolean).map(Ir);try{for(;;){const{done:m,value:w}=await l.read();w&&(s+=c.decode(w,{stream:!0}));const p=s.split(`
|
|
3
|
+
`);s=m?"":p.pop()??"";for(const _ of m?p.filter(Boolean):p){if(!_.trim())continue;const y=JSON.parse(_);if(y.type==="wines")f=h(y.recommendations).map(d=>({...d,reason:""})),r(f);else{if(y.type==="final")return h(y.recommendations);if(y.type==="error")return f||i()}}if(m)break}}catch{return f||i()}return f??i()}async getMoreWineRecommendations(t,n){try{const r=await ee(this,he,Ht).call(this,"dish/recommendations/search/v2/more",si({text:t,exclude_ids:n},v(this,vn)));return Pc(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getDeck(t,n,r){const i={text:t,exclude_ids:n,...r?{query_id:r}:{}},a=await ee(this,he,Ht).call(this,"dish/recommendations/search/v2/deck",si(i,v(this,vn)));return Ic(a)}async getSimilarWines(t){try{return(await ee(this,he,Ht).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map(Ir)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await ee(this,he,Ht).call(this,"events",t,{keepalive:!0})}setVisitorLanguage(t){V(this,vn,t)}async getWineTranslations(t,n){return Nc(r=>ee(this,he,Ht).call(this,"wines/translations",r).catch(()=>null),t,n)}setLanguage(t){V(this,dr,t)}async getShopifyConfig(){const t=vt().shop;return ee(this,he,Ht).call(this,`shopify/storefront/config?shop=${encodeURIComponent(t)}`,void 0,{method:"GET"})}async getStoreConfig(){try{return await ee(this,he,Ht).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}cr=new WeakMap,Lr=new WeakMap,pn=new WeakMap,ur=new WeakMap,dr=new WeakMap,vn=new WeakMap,he=new WeakSet,Po=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${v(this,Lr)}`};if(!v(this,ur)){const n=no();n&&(t[Lc]=n)}return t},Ht=async function(t,n,r={}){return(await ee(this,he,Io).call(this,t,n,r)).data},Io=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:ee(this,he,Po).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let a;try{a=await fetch(`${v(this,cr)}${t}`,i())}catch(s){if(v(this,ur)||!no())throw s;V(this,ur,!0),a=await fetch(`${v(this,cr)}${t}`,i())}const l=await a.text();let c=null;try{c=l?JSON.parse(l):null}catch{if(a.ok)throw new Error("API returned invalid JSON")}if(!a.ok)throw new ns(a.status,c);return{data:c,headers:a.headers}},Ao=function(t){const n=vt().shop;return v(this,dr)?{...t,shop:n,language:v(this,dr)}:{...t,shop:n}},Is=async function(t,n){try{const r=ee(this,he,Ao).call(this,{text:t,session_id:Ha(),...n?{query_id:n}:{}});return(await ee(this,he,Ht).call(this,"shopify/storefront/search",r)??[]).filter(Boolean).map(Ir)}catch(r){throw r instanceof ns&&kc(r.status,r.data)?new Fa:new Error(`Error in getWineRecommendations: ${r.message}`)}};const rs=((ks=window==null?void 0:window.wineaterData)==null?void 0:ks.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",ro=String(((Ss=window==null?void 0:window.wineaterData)==null?void 0:Ss.apiVersion)||"1"),ht=new zc(rs,ro);Mc(e=>ht.postEvents(e));function Bc(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}const io=`${Bc(rs)}:${ro}`,is="wineater:v1:";function oo(e,t){try{const n=window.localStorage.getItem(is+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function ao(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(is+e,JSON.stringify(n))}catch{}}const ye={WIDGET_INITIALIZED:"widget_initialized",WIDGET_LOADED:"widget_loaded",SEARCH_PERFORMED:"search_performed",SEARCH_RESULTS_DISPLAYED:"search_results_displayed",NO_RESULTS_FOUND:"no_results_found",WINE_CARD_HOVER:"wine_card_hover",WINE_CARD_CLICK:"wine_card_click",WINE_DETAILS_VIEWED:"wine_details_viewed",WINE_DETAILS_CLOSED:"wine_details_closed",BUY_BUTTON_CLICKED:"buy_button_clicked",SHOW_MORE_CLICKED:"show_more_clicked",SIMILAR_WINES_CLICKED:"similar_wines_clicked",FILTER_APPLIED:"filter_applied",LANGUAGE_CHANGED:"language_changed",ERROR_OCCURRED:"error_occurred",MOBILE_VIEW_ACTIVATED:"mobile_view_activated",SWIPE_MODE_OPENED:"swipe_mode_opened",WINE_LIKED:"wine_liked",WINE_DISLIKED:"wine_disliked",SWIPE_MODE_FINISHED:"swipe_mode_finished"},os={fr:{lang:"fr",welcomeMessage:"Quel plat allez-vous déguster ? Décrivez-le-moi et je vous proposerai le vin qui l'accompagnera parfaitement.",noResultsFound:"Aucun résultat trouvé.",somethingWentWrong:"Désolé, quelque chose a mal tourné.",chatButton1:"Trouvez l'accord parfait",chatButton2:"Associez le vin",chatButton3:"Obtenez des conseils",chatTitle:"Accord Mets & Vins 🍷",chatSubtitle:"Décrivez votre plat et obtenez une recommandation en 30 secondes",inputPlaceholder:"ex., Salade de thon",sendButton:"Accorder",poweredBy:"Propulsé par",price:"Prix",region:"Région",type:"Type",reason:"Suggestion",moreInfo:"Plus d'infos",tryAgain:"Réessayer",similarWines:"Vins similaires",byTheGlass:"Au verre",winePairingIntro:"Pour ce vin, voici quelques suggestions de plats :",askForDinner:"Que voulez-vous manger ce soir?",clearChatButton:"Effacer le chat",widgetTitle:"TROUVEZ VOTRE VIN PARFAIT",widgetSubtitle:"Partagez tout ce que vous avez en tête—votre repas, humeur, budget ou occasion—et notre sommelier IA vous recommandera le vin parfait en quelques secondes",searchPlaceholder:"Entrez un mot-clé ou une description","wineDetails.reason":"Raison","wineDetails.price":"Prix","wineDetails.region":"Région","wineDetails.type":"Type","wineDetails.moreInfo":"Plus d'infos","wineDetails.code":"Code","wineDetails.buy":"Acheter",searchButton:"Rechercher",priceRange:"Gamme de prix",wineColor:"Couleur du vin",intensity:"Intensité",red:"Rouge",white:"Blanc",rose:"Rosé",light:"Léger",medium:"Moyen",full:"Puissant",barTitle:"Sélection du bar",barSubtitle:"Choisissez vos plats ci-dessous et cliquez sur «Envoyer»",barSendButton:"Envoyer",barResetButton:"Réinitialiser",barName:"Nom du bar",barNotesPlaceholder:"Entrez vos souhaits ici...",placeholderSuggestions:["Vin pour les pâtes","Parfait avec du poisson","Recommandé pour une soirée"],headerLine1:"Partagez tout ce qui vous passe par la tête —",headerLine2:"— et obtenez des recommandations de vin parfait en quelques secondes",headerMeal:"repas",headerMood:"humeur",headerBudget:"budget",headerOccasion:"occasion",headerOr:"ou",errorMessage:"Une erreur est survenue. Veuillez réessayer plus tard.",noResultsMessage:"Aucun résultat trouvé pour votre recherche. Veuillez essayer une autre requête.",ai_sommelier:"AI sommelier",consentText:"L'assistant vin enregistre un identifiant anonyme sur cet appareil pour apprendre vos goûts et améliorer ses recommandations. Vous pouvez l'utiliser sans accepter.",consentAccept:"Accepter",consentDecline:"Refuser",consentPrivacy:"Politique de confidentialité",addToCart:"Ajouter au panier",addedToCart:"Ajouté",sommelierResting:"Notre sommelier se repose. Découvrez notre sélection ci-dessous.",helpMeChoose:"Choisir ensemble","swipe.progress":"{n} sur {total} aimés","swipe.showResults":"Voir les résultats","swipe.like":"J’aime","swipe.dislike":"Pas pour moi","swipe.undo":"Annuler","swipe.hint":"Glissez à droite si vous aimez, à gauche sinon. Touchez pour en savoir plus.","swipe.close":"Fermer"},es:{lang:"es",welcomeMessage:"¿Qué vas a comer? Cuéntame tu plato y te recomendaré el maridaje perfecto.",noResultsFound:"No se encontraron resultados.",somethingWentWrong:"Lo sentimos, algo salió mal.",chatButton1:"Encuentra tu maridaje",chatButton2:"Combina vino ya",chatButton3:"Recibe asesoría ahora",chatTitle:"Maridaje de Vinos 🍷",chatSubtitle:"Describe tu comida y obtén una recomendación en 30 segundos",inputPlaceholder:"ej., Ensalada de atún",sendButton:"Combinar",poweredBy:"Desarrollado por",price:"Precio",region:"Región",type:"Tipo",reason:"Sugerencia",moreInfo:"Más info",tryAgain:"Probar otra vez",similarWines:"Vinos similares",byTheGlass:"Por copa",winePairingIntro:"Para este vino, aquí tienes algunas sugerencias de platos:",askForDinner:"¿Qué te gustaría cenar?",clearChatButton:"Limpiar el chat",widgetTitle:"ENCUENTRA TU VINO PERFECTO",widgetSubtitle:"Comparte cualquier cosa que tengas en mente—tu comida, estado de ánimo, presupuesto o evento—y nuestro sommelier de IA te recomendará el vino perfecto en segundos",searchPlaceholder:"Escribe una palabra clave o descripción","wineDetails.reason":"Razón","wineDetails.price":"Precio","wineDetails.region":"Región","wineDetails.type":"Tipo","wineDetails.code":"Código","wineDetails.moreInfo":"Más información","wineDetails.buy":"Comprar",searchButton:"Buscar",priceRange:"Rango de precios",wineColor:"Color del vino",intensity:"Intensidad",red:"Tinto",white:"Blanco",rose:"Rosado",light:"Ligero",medium:"Medio",full:"Intenso",barTitle:"Platos de Bar",barSubtitle:"Selecciona de la lista y presiona «Enviar»",barSendButton:"Enviar",barResetButton:"Reiniciar",barName:"Nombre del bar",barNotesPlaceholder:"Agrega tus comentarios aquí...",placeholderSuggestions:["Vino para pasta","Perfecto con pescado","Recomendado para una fiesta"],headerLine1:"Comparte cualquier cosa que tengas en mente —",headerLine2:"— y obtén recomendaciones del vino perfecto en cuestión de segundos",headerMeal:"comida",headerMood:"estado de ánimo",headerBudget:"presupuesto",headerOccasion:"ocasión",headerOr:"o",errorMessage:"Algo salió mal. Por favor, inténtalo de nuevo más tarde.",noResultsMessage:"No se encontraron resultados para tu búsqueda. Por favor, intenta con otra consulta.",ai_sommelier:"AI sommelier",consentText:"El asistente de vinos guarda un identificador anónimo en este dispositivo para conocer tus gustos y mejorar las recomendaciones. Puedes usarlo sin aceptar.",consentAccept:"Aceptar",consentDecline:"Rechazar",consentPrivacy:"Política de privacidad",addToCart:"Añadir al carrito",addedToCart:"Añadido",sommelierResting:"Nuestro sumiller está descansando. Descubre nuestra selección.",helpMeChoose:"Elegir juntos","swipe.progress":"Te gustan {n} de {total}","swipe.showResults":"Ver resultados ya","swipe.like":"Me gusta","swipe.dislike":"No es para mí","swipe.undo":"Deshacer","swipe.hint":"Desliza a la derecha si te gusta, a la izquierda si no. Toca para ver más.","swipe.close":"Cerrar"},en:{lang:"en",welcomeMessage:"What are you planning to eat? Share your dish and I'll recommend the perfect wine pairing for your meal.",noResultsFound:"No results found.",somethingWentWrong:"Sorry, something went wrong.",chatButton1:"Find Your Pairing",chatButton2:"Pair Wine Now",chatButton3:"Get Wine Advice",chatTitle:"Wine Pairing Assistant 🍷",chatSubtitle:"Describe your meal and get a recommendation in 30 seconds",inputPlaceholder:"e.g., Tuna salad",sendButton:"Match",poweredBy:"Powered by",price:"Price",region:"Region",type:"Type",reason:"Suggestion",moreInfo:"More info",tryAgain:"Try again",similarWines:"Similar wines",byTheGlass:"By the glass",winePairingIntro:"For this wine, here are some suggested dishes:",askForDinner:"What would you like to have for dinner?",clearChatButton:"Clear Chat",widgetTitle:"FIND YOUR PERFECT WINE",widgetSubtitle:"Share anything on your mind—your meal, mood, budget, or occasion—and our AI sommelier will recommend the perfect wine in seconds",searchPlaceholder:"Enter a keyword or description","wineDetails.price":"Price","wineDetails.region":"Region","wineDetails.type":"Type","wineDetails.moreInfo":"More info","wineDetails.reason":"Reason","wineDetails.code":"Code","wineDetails.buy":"Buy",searchButton:"Search",priceRange:"Price Range",wineColor:"Wine Color",intensity:"Intensity",red:"Red",white:"White",rose:"Rosé",light:"Light",medium:"Medium",full:"Full",barTitle:"Bar Dishes",barSubtitle:"Select dishes below and click 'Send'",barSendButton:"Send",barResetButton:"Reset",barName:"Bar Name",barNotesPlaceholder:"Add your wishes here...",placeholderSuggestions:["Wine for pasta","Perfect with fish","Recommended for a party"],headerLine1:"Share anything on your mind —",headerLine2:"— and get recommendations of the perfect wine in seconds",headerMeal:"meal",headerMood:"mood",headerBudget:"budget",headerOccasion:"occasion",headerOr:"or",errorMessage:"Something went wrong. Please try again later.",noResultsMessage:"No results found for your search. Please try a different query.",ai_sommelier:"AI sommelier",consentText:"The wine assistant stores an anonymous identifier on this device to learn your taste and improve recommendations. You can use it without accepting.",consentAccept:"Accept",consentDecline:"Decline",consentPrivacy:"Privacy policy",addToCart:"Add to cart",addedToCart:"Added",sommelierResting:"Our sommelier is resting. Browse our picks below.",helpMeChoose:"Help me choose","swipe.progress":"{n} of {total} liked","swipe.showResults":"Show results now","swipe.like":"Like","swipe.dislike":"Not for me","swipe.undo":"Undo","swipe.hint":"Swipe right if you like it, left if not. Tap for details.","swipe.close":"Close"},sr:{lang:"sr",welcomeMessage:"Šta planirate da jedete? Podelite svoje jelo i preporučiću vam savršeno vino uz obrok.",noResultsFound:"Nema rezultata.",somethingWentWrong:"Izvinite, nešto je pošlo po zlu.",chatButton1:"Pronađi vino",chatButton2:"Upari vino sada",chatButton3:"Zatraži preporuku",chatTitle:"Asistent za uparivanje vina 🍷",chatSubtitle:"Opišite svoj obrok i dobijte preporuku za 30 sekundi",inputPlaceholder:"npr. Tuna salata",sendButton:"Upari",poweredBy:"Pokreće",price:"Cena",region:"Regija",type:"Tip",reason:"Preporuka",moreInfo:"Više informacija",tryAgain:"Pokušaj ponovo",similarWines:"Slična vina",byTheGlass:"Na čašu",winePairingIntro:"Za ovo vino, preporučuju se sledeća jela:",askForDinner:"Šta biste želeli za večeru?",clearChatButton:"Obriši razgovor",widgetTitle:"PRONAĐITE SAVRŠENO VINO",widgetSubtitle:"Podelite bilo šta — obrok, raspoloženje, budžet ili priliku — i naš AI somelijer će vam za par sekundi preporučiti vino",searchPlaceholder:"Unesite ključnu reč ili opis","wineDetails.price":"Cena","wineDetails.region":"Regija","wineDetails.type":"Tip","wineDetails.moreInfo":"Više informacija","wineDetails.reason":"Razlog","wineDetails.code":"Šifra","wineDetails.buy":"Kupi",searchButton:"Pretraga",priceRange:"Cenovni raspon",wineColor:"Boja vina",intensity:"Intenzitet",red:"Crveno",white:"Belo",rose:"Roze",light:"Lako",medium:"Srednje",full:"Puno",barTitle:"Jela iz bara",barSubtitle:"Izaberite jela ispod i kliknite 'Pošalji'",barSendButton:"Pošalji",barResetButton:"Resetuj",barName:"Naziv bara",barNotesPlaceholder:"Dodajte svoje želje ovde...",placeholderSuggestions:["Vino uz pastu","Savršeno uz ribu","Preporuka za žurku"],headerLine1:"Podelite bilo šta što vam je na umu —",headerLine2:"— i dobijte preporuke za savršeno vino za par sekundi",headerMeal:"obrok",headerMood:"raspoloženje",headerBudget:"budžet",headerOccasion:"prilika",headerOr:"ili",errorMessage:"Nešto je pošlo po zlu. Molimo pokušajte ponovo kasnije.",noResultsMessage:"Nema rezultata za vašu pretragu. Molimo pokušajte sa drugačijim upitom.",ai_sommelier:"AI sommelier",consentText:"Vinski asistent čuva anonimni identifikator na ovom uređaju kako bi upoznao vaš ukus i poboljšao preporuke. Možete ga koristiti i bez prihvatanja.",consentAccept:"Prihvati",consentDecline:"Odbij",consentPrivacy:"Politika privatnosti",addToCart:"Dodaj u korpu",addedToCart:"Dodato",sommelierResting:"Naš somelijer se odmara. Pogledajte naš izbor ispod.",helpMeChoose:"Izaberimo zajedno","swipe.progress":"Sviđa vam se {n} od {total}","swipe.showResults":"Prikaži rezultate","swipe.like":"Sviđa mi se","swipe.dislike":"Nije za mene","swipe.undo":"Poništi","swipe.hint":"Prevucite desno ako vam se sviđa, levo ako ne. Dodirnite za detalje.","swipe.close":"Zatvori"},de:{lang:"de",welcomeMessage:"Was möchten Sie essen? Beschreiben Sie Ihr Gericht und ich empfehle Ihnen den perfekten Wein dazu.",noResultsFound:"Keine Ergebnisse gefunden.",somethingWentWrong:"Entschuldigung, etwas ist schief gelaufen.",chatButton1:"Finde Dein Pairing",chatButton2:"Wein jetzt wählen",chatButton3:"Erhalte Weinberatung",chatTitle:"Wein & Speisen 🍷",chatSubtitle:"Beschreiben Sie Ihr Gericht und erhalten Sie in 30 Sekunden eine Empfehlung",inputPlaceholder:"z.B., Thunfischsalat",sendButton:"Kombinieren",poweredBy:"Unterstützt von",price:"Preis",region:"Region",type:"Typ",reason:"Anregung",moreInfo:"Mehr Info",tryAgain:"Nochmal versuchen",similarWines:"Ähnliche Weine",byTheGlass:"Glasweise",winePairingIntro:"Für diesen Wein gibt es folgende Essensvorschläge:",askForDinner:"Was möchten Sie zum Abendessen essen?",clearChatButton:"Chat löschen",widgetTitle:"FINDEN SIE IHREN PERFEKTEN WEIN",widgetSubtitle:"Teilen Sie alles, was Ihnen in den Sinn kommt—Ihre Mahlzeit, Stimmung, Ihr Budget oder Anlass—und unser KI-Sommelier empfiehlt Ihnen in Sekunden den perfekten Wein",placeholderSuggestions:["Wein für Pasta","Perfekt zu Fisch","Empfohlen für eine Party"],searchPlaceholder:"Geben Sie ein Stichwort oder eine Beschreibung ein","wineDetails.price":"Preis","wineDetails.region":"Region","wineDetails.type":"Typ","wineDetails.moreInfo":"Mehr Info","wineDetails.reason":"Grund","wineDetails.code":"Code","wineDetails.buy":"Kaufen",searchButton:"Suche",priceRange:"Preisspanne",wineColor:"Weinfarbe",intensity:"Intensität",red:"Rot",white:"Weiß",rose:"Rosé",light:"Leicht",medium:"Mittel",full:"Voll",barTitle:"Bar-Auswahl",barSubtitle:"Wählen Sie Ihre Gerichte und klicken Sie auf 'Senden'",barSendButton:"Senden",barResetButton:"Zurücksetzen",barName:"Name der Bar",headerLine1:"Teilen Sie alles, was Ihnen durch den Kopf geht —",headerLine2:"— und erhalten Sie in Sekundenschnelle Empfehlungen für den perfekten Wein",headerMeal:"Mahlzeit",headerMood:"Stimmung",headerBudget:"Budget",headerOccasion:"Anlass",headerOr:"oder",errorMessage:"Etwas ist schief gelaufen. Bitte versuchen Sie es später erneut.",noResultsMessage:"Keine Ergebnisse für Ihre Suche gefunden. Bitte versuchen Sie es mit einer anderen Anfrage.",ai_sommelier:"AI sommelier",consentText:"Der Weinassistent speichert eine anonyme Kennung auf diesem Gerät, um Ihren Geschmack kennenzulernen und Empfehlungen zu verbessern. Sie können ihn auch ohne Zustimmung nutzen.",consentAccept:"Akzeptieren",consentDecline:"Ablehnen",consentPrivacy:"Datenschutzerklärung",addToCart:"In den Warenkorb",addedToCart:"Hinzugefügt",sommelierResting:"Unser Sommelier macht gerade Pause. Entdecken Sie unsere Auswahl.",helpMeChoose:"Gemeinsam auswählen","swipe.progress":"{n} von {total} gefallen","swipe.showResults":"Ergebnisse jetzt zeigen","swipe.like":"Gefällt mir","swipe.dislike":"Nicht für mich","swipe.undo":"Rückgängig","swipe.hint":"Nach rechts, wenn er Ihnen gefällt, nach links, wenn nicht. Tippen für Details.","swipe.close":"Schließen"},ukr:{lang:"ukr",welcomeMessage:"Що ви збираєтесь їсти? Опишіть свою страву, і я порекомендую вам ідеальне вино.",noResultsFound:"Результатів не знайдено.",somethingWentWrong:"Вибачте, щось пішло не так.",chatButton1:"Знайти ідеальне поєднання",chatButton2:"Підібрати вино",chatButton3:"Отримати пораду",chatTitle:"Сомельє-помічник 🍷",chatSubtitle:"Опишіть свою страву і отримайте рекомендацію за 30 секунд",inputPlaceholder:"наприклад, Тунець із салатом",sendButton:"Підібрати",poweredBy:"Розроблено на основі",price:"Ціна",region:"Регіон",type:"Тип",reason:"Рекомендація",moreInfo:"Докладніше",tryAgain:"Спробувати ще",similarWines:"Схожі вина",byTheGlass:"На келих",winePairingIntro:"До цього вина підходять такі страви:",askForDinner:"Що ви хочете на вечерю?",clearChatButton:"Очистити чат",widgetTitle:"ЗНАЙДІТЬ ІДЕАЛЬНЕ ВИНО",widgetSubtitle:"Поділіться тим, що у вас на думці—їжа, настрій, бюджет чи подія—і наш AI-сомельє порекомендує вам ідеальне вино за секунди",searchPlaceholder:"Введіть ключове слово або опис","wineDetails.reason":"Причина","wineDetails.price":"Ціна","wineDetails.region":"Регіон","wineDetails.type":"Тип","wineDetails.moreInfo":"Докладніше","wineDetails.code":"Код","wineDetails.buy":"Купити",searchButton:"Пошук",priceRange:"Діапазон цін",wineColor:"Колір вина",intensity:"Інтенсивність",red:"Червоне",white:"Біле",rose:"Рожеве",light:"Легке",medium:"Середнє",full:"Повне",barTitle:"Закуски до вина",barSubtitle:"Виберіть страви нижче та натисніть «Надіслати»",barSendButton:"Надіслати",barResetButton:"Скинути",barName:"Назва бару",barNotesPlaceholder:"Додайте ваші побажання тут...",placeholderSuggestions:["Вино до пасти","Ідеально до риби","Рекомендуємо для вечірки"],headerLine1:"Поділіться будь-якими вашими думками —",headerLine2:"— і отримайте рекомендації щодо ідеального вина за секунди",headerMeal:"страва",headerMood:"настрій",headerBudget:"бюджет",headerOccasion:"подія",headerOr:"або",errorMessage:"Щось пішло не так. Будь ласка, спробуйте пізніше.",noResultsMessage:"За вашим запитом не знайдено результатів. Спробуйте інший запит.",ai_sommelier:"AI sommelier",consentText:"Винний помічник зберігає на цьому пристрої анонімний ідентифікатор, щоб враховувати ваш смак і покращувати рекомендації. Користуватися можна й без згоди.",consentAccept:"Прийняти",consentDecline:"Відхилити",consentPrivacy:"Політика конфіденційності",addToCart:"Додати в кошик",addedToCart:"Додано",sommelierResting:"Наш сомельє відпочиває. Перегляньте нашу добірку нижче.",helpMeChoose:"Підібрати разом","swipe.progress":"Подобається: {n} з {total}","swipe.showResults":"Показати результат","swipe.like":"Подобається","swipe.dislike":"Не моє","swipe.undo":"Повернути","swipe.hint":"Вправо — подобається, вліво — ні. Натисніть, щоб дізнатися більше.","swipe.close":"Закрити"},ru:{lang:"ru",welcomeMessage:"Что вы планируете поесть? Напишите ваше блюдо, и я подберу идеальное вино к нему.",noResultsFound:"Результаты не найдены.",somethingWentWrong:"Извините, что-то пошло не так.",chatButton1:"Найти сочетание",chatButton2:"Подобрать вино",chatButton3:"Получить совет",chatTitle:"Ассистент по подбору вина 🍷",chatSubtitle:"Опишите ваше блюдо и получите рекомендацию за 30 секунд",inputPlaceholder:"например, Тунец с салатом",sendButton:"Подобрать",poweredBy:"Powered by",price:"Цена",region:"Регион",type:"Тип",reason:"Рекомендация",moreInfo:"Подробнее",tryAgain:"Попробовать ещё",similarWines:"Похожие вина",byTheGlass:"По бокалам",winePairingIntro:"К этому вину подходят следующие блюда:",askForDinner:"Что бы вы хотели на ужин?",clearChatButton:"Очистить чат",widgetTitle:"НАЙДИТЬ ИДЕАЛЬНОЕ ВИНО",widgetSubtitle:"Поделитесь вашими предпочтениями — блюдом, настроением, бюджетом или случаем — и наш AI-сомелье подберёт идеальное вино за секунды",searchPlaceholder:"Введите ключевое слово или описание","wineDetails.price":"Цена","wineDetails.region":"Регион","wineDetails.type":"Тип","wineDetails.moreInfo":"Подробнее","wineDetails.reason":"Причина","wineDetails.code":"Код","wineDetails.buy":"Купить",searchButton:"Поиск",priceRange:"Диапазон цен",wineColor:"Цвет вина",intensity:"Интенсивность",red:"Красное",white:"Белое",rose:"Розовое",light:"Лёгкое",medium:"Среднее",full:"Полное",barTitle:"Закуски к вину",barSubtitle:"Выберите блюда ниже и нажмите 'Отправить'",barSendButton:"Отправить",barResetButton:"Сбросить",barName:"Название бара",barNotesPlaceholder:"Добавьте ваши пожелания здесь...",placeholderSuggestions:["Вино для пасты","Идеально к рыбе","Рекомендуем для вечеринки"],headerLine1:"Поделитесь любыми вашими мыслями —",headerLine2:"— и получите рекомендации по идеальному вину за считанные секунды",headerMeal:"блюдо",headerMood:"настроение",headerBudget:"бюджет",headerOccasion:"случай",headerOr:"или",errorMessage:"Что-то пошло не так. Пожалуйста, попробуйте позже.",noResultsMessage:"По вашему запросу не найдено результатов. Попробуйте другой запрос.",ai_sommelier:"AI sommelier",consentText:"Винный помощник сохраняет на этом устройстве анонимный идентификатор, чтобы учитывать ваш вкус и улучшать рекомендации. Пользоваться можно и без согласия.",consentAccept:"Принять",consentDecline:"Отклонить",consentPrivacy:"Политика конфиденциальности",addToCart:"В корзину",addedToCart:"Добавлено",sommelierResting:"Наш сомелье отдыхает. Посмотрите нашу подборку ниже.",helpMeChoose:"Подобрать вместе","swipe.progress":"Нравится: {n} из {total}","swipe.showResults":"Показать результат","swipe.like":"Нравится","swipe.dislike":"Не моё","swipe.undo":"Вернуть","swipe.hint":"Вправо — нравится, влево — нет. Нажмите, чтобы узнать больше.","swipe.close":"Закрыть"},kk:{lang:"kk",welcomeMessage:"Сіз не жегіңіз келеді? Тағамыңызды сипаттаңыз, мен оған керемет шарап ұсынамын.",noResultsFound:"Нәтижелер табылмады.",somethingWentWrong:"Кешіріңіз, бірдеңе дұрыс болмады.",chatButton1:"Сәйкестік табу",chatButton2:"Шарап таңдау",chatButton3:"Кеңес алу",chatTitle:"Шарап таңдаушы көмекші 🍷",chatSubtitle:"Тағамыңызды сипаттаңыз — 30 секундта ұсыныс алыңыз",inputPlaceholder:"мысалы, тунец салатымен",sendButton:"Таңдау",poweredBy:"Powered by",price:"Бағасы",region:"Өңір",type:"Түрі",reason:"Ұсыныс",moreInfo:"Толығырақ",tryAgain:"Қайта көру",similarWines:"Ұқсас шараптар",byTheGlass:"Бокалмен",winePairingIntro:"Бұл шарапқа келесі тағамдар сәйкес келеді:",askForDinner:"Кешкі асқа не қалайсыз?",clearChatButton:"Чатты тазалау",widgetTitle:"КЕРЕМЕТ ШАРАПТЫ ТАБЫҢЫЗ",widgetSubtitle:"Таңдауларыңызды бөлісіңіз — тағам, көңіл-күй, бюджет немесе жағдай — және біздің AI-сомелье сізге бірнеше секундта шарап ұсынады",searchPlaceholder:"Кілт сөзді немесе сипаттаманы енгізіңіз","wineDetails.price":"Бағасы","wineDetails.region":"Өңір","wineDetails.type":"Түрі","wineDetails.moreInfo":"Толығырақ","wineDetails.reason":"Себебі","wineDetails.code":"Код","wineDetails.buy":"Сатып алу",searchButton:"Іздеу",priceRange:"Баға диапазоны",wineColor:"Шарап түсі",intensity:"Қанықтылық",red:"Қызыл",white:"Ақ",rose:"Розалық",light:"Жеңіл",medium:"Орташа",full:"Толық",barTitle:"Шарапқа арналған тіскебасарлар",barSubtitle:"Төмендегі тағамдарды таңдаңыз және 'Жіберу' батырмасын басыңыз",barSendButton:"Жіберу",barResetButton:"Қалпына келтіру",barName:"Бар атауы",barNotesPlaceholder:"Мұнда өз тілектеріңізді жазыңыз...",placeholderSuggestions:["Пастаға арналған шарап","Балыққа тамаша үйлеседі","Кешке ұсынуға болады"],headerLine1:"Ойларыңызбен бөлісіңіз —",headerLine2:"— және бірнеше секундта мінсіз шарап ұсынысын алыңыз",headerMeal:"тағам",headerMood:"көңіл-күй",headerBudget:"бюджет",headerOccasion:"жағдай",headerOr:"немесе",errorMessage:"Бірдеңе дұрыс болмады. Кейінірек қайта көріңіз.",noResultsMessage:"Іздеуіңізге сәйкес нәтиже табылмады. Басқа сұрау қолданып көріңіз.",ai_sommelier:"AI sommelier",consentText:"Шарап көмекшісі сіздің талғамыңызды ескеріп, ұсыныстарды жақсарту үшін осы құрылғыда анонимді идентификатор сақтайды. Келісімсіз де пайдалана аласыз.",consentAccept:"Қабылдау",consentDecline:"Бас тарту",consentPrivacy:"Құпиялылық саясаты",addToCart:"Себетке қосу",addedToCart:"Қосылды",sommelierResting:"Біздің сомелье демалып жатыр. Төмендегі таңдауымызды қараңыз.",helpMeChoose:"Бірге таңдайық","swipe.progress":"Ұнады: {n} / {total}","swipe.showResults":"Нәтижені көрсету","swipe.like":"Ұнайды","swipe.dislike":"Маған емес","swipe.undo":"Қайтару","swipe.hint":"Ұнаса — оңға, ұнамаса — солға. Толығырақ үшін басыңыз.","swipe.close":"Жабу"},pt:{lang:"pt",welcomeMessage:"O que você planeja comer? Descreva seu prato e eu recomendarei a harmonização perfeita.",noResultsFound:"Nenhum resultado encontrado.",somethingWentWrong:"Desculpe, algo deu errado.",chatButton1:"Encontre sua harmonização",chatButton2:"Harmonizar vinho agora",chatButton3:"Receber conselho de vinho",chatTitle:"Assistente de Harmonização de Vinhos 🍷",chatSubtitle:"Descreva sua refeição e receba uma recomendação em 30 segundos",inputPlaceholder:"ex., Salada de atum",sendButton:"Harmonizar",poweredBy:"Desenvolvido por",price:"Preço",region:"Região",type:"Tipo",reason:"Sugestão",moreInfo:"Mais informações",tryAgain:"Tentar de novo",similarWines:"Vinhos semelhantes",byTheGlass:"Por taça",winePairingIntro:"Para este vinho, aqui estão algumas sugestões de pratos:",askForDinner:"O que você gostaria de jantar?",clearChatButton:"Limpar chat",widgetTitle:"ENCONTRE SEU VINHO PERFEITO",widgetSubtitle:"Compartilhe o que tiver em mente — sua refeição, humor, orçamento ou ocasião — e nosso sommelier de IA recomendará o vinho perfeito em segundos",searchPlaceholder:"Digite uma palavra-chave ou descrição","wineDetails.reason":"Motivo","wineDetails.price":"Preço","wineDetails.region":"Região","wineDetails.type":"Tipo","wineDetails.moreInfo":"Mais informações","wineDetails.code":"Código","wineDetails.buy":"Comprar",searchButton:"Pesquisar",priceRange:"Faixa de preço",wineColor:"Cor do vinho",intensity:"Intensidade",red:"Tinto",white:"Branco",rose:"Rosé",light:"Leve",medium:"Médio",full:"Encorpado",barTitle:"Pratos do bar",barSubtitle:"Selecione os pratos abaixo e clique em 'Enviar'",barSendButton:"Enviar",barResetButton:"Resetar",barName:"Nome do bar",barNotesPlaceholder:"Adicione seus desejos aqui...",placeholderSuggestions:["Vinho para massa","Perfeito com peixe","Recomendado para uma festa"],headerLine1:"Compartilhe o que tiver em mente —",headerLine2:"— e receba recomendações do vinho perfeito em segundos",headerMeal:"refeição",headerMood:"humor",headerBudget:"orçamento",headerOccasion:"ocasião",headerOr:"ou",errorMessage:"Algo deu errado. Por favor, tente novamente mais tarde.",noResultsMessage:"Nenhum resultado encontrado para sua pesquisa. Por favor, tente uma consulta diferente.",ai_sommelier:"AI sommelier",consentText:"O assistente de vinhos guarda um identificador anónimo neste dispositivo para conhecer o seu gosto e melhorar as recomendações. Pode usá-lo sem aceitar.",consentAccept:"Aceitar",consentDecline:"Recusar",consentPrivacy:"Política de privacidade",addToCart:"Adicionar ao carrinho",addedToCart:"Adicionado",sommelierResting:"Nosso sommelier está descansando. Veja nossas sugestões abaixo.",helpMeChoose:"Escolher juntos","swipe.progress":"Gostou de {n} de {total}","swipe.showResults":"Ver resultados já","swipe.like":"Gosto","swipe.dislike":"Não é para mim","swipe.undo":"Desfazer","swipe.hint":"Deslize para a direita se gostar, para a esquerda se não. Toque para ver mais.","swipe.close":"Fechar"}};function Oc(e){return{id:String(e.id),lang:e.lang,available_languages:e.available_languages?e.available_languages:[e.lang],currency:e.currency,title:e.title,requires_cookie_consent:e.requires_cookie_consent===!0,swipe_mode_enabled:e.swipe_mode_enabled===!0}}const Lt="https://media.wineater.com/static-media",qc={0:{logoUrl:null,brandColor:"#7B2BEB"},29:{logoUrl:`${Lt}/plou_logo.jpg`,brandColor:"#e6c6bb"},25:{logoUrl:null,brandColor:"#000000",wineaterColor:"#000000",buttonUppercase:!0,customCss:`
|
|
4
4
|
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;600;700&display=swap');
|
|
5
5
|
:root { --wineater-font-primary: 'Roboto', sans-serif; }
|
|
6
6
|
#wr-Custom {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
#wr-Custom {
|
|
54
54
|
.wr-Search-icon {
|
|
55
55
|
background-image: none;
|
|
56
|
-
-webkit-mask-image: url('${
|
|
57
|
-
mask-image: url('${
|
|
56
|
+
-webkit-mask-image: url('${Lt}/search.svg?x=1');
|
|
57
|
+
mask-image: url('${Lt}/search.svg?x=1');
|
|
58
58
|
-webkit-mask-repeat: no-repeat;
|
|
59
59
|
mask-repeat: no-repeat;
|
|
60
60
|
-webkit-mask-size: contain;
|
|
@@ -62,12 +62,12 @@
|
|
|
62
62
|
background-color: #B81242;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
`,translations:{}},26:{logoUrl:"https://paladarlondon.com/wp-content/uploads/2021/05/cropped-cropped-Paladar-Logo-1473x464-min-768x219.png",brandColor:"#B81242",wineaterColor:"#7B2BEB",buttonUppercase:!0,customCss:"",translations:{}},28:{logoUrl:`${
|
|
65
|
+
`,translations:{}},26:{logoUrl:"https://paladarlondon.com/wp-content/uploads/2021/05/cropped-cropped-Paladar-Logo-1473x464-min-768x219.png",brandColor:"#B81242",wineaterColor:"#7B2BEB",buttonUppercase:!0,customCss:"",translations:{}},28:{logoUrl:`${Lt}/ryba_moya.png`,brandColor:"#de4e2a",wineaterColor:"#de4e2a",buttonUppercase:!0,customCss:`
|
|
66
66
|
#wr-Custom {
|
|
67
67
|
.wr-Search-icon {
|
|
68
68
|
background-image: none;
|
|
69
|
-
-webkit-mask-image: url('${
|
|
70
|
-
mask-image: url('${
|
|
69
|
+
-webkit-mask-image: url('${Lt}/search.svg?x=1');
|
|
70
|
+
mask-image: url('${Lt}/search.svg?x=1');
|
|
71
71
|
-webkit-mask-repeat: no-repeat;
|
|
72
72
|
mask-repeat: no-repeat;
|
|
73
73
|
-webkit-mask-size: contain;
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
|
|
93
93
|
.wr-Search-icon {
|
|
94
94
|
background-image: none;
|
|
95
|
-
-webkit-mask-image: url('${
|
|
96
|
-
mask-image: url('${
|
|
95
|
+
-webkit-mask-image: url('${Lt}/search.svg?x=1');
|
|
96
|
+
mask-image: url('${Lt}/search.svg?x=1');
|
|
97
97
|
-webkit-mask-repeat: no-repeat;
|
|
98
98
|
mask-repeat: no-repeat;
|
|
99
99
|
-webkit-mask-size: contain;
|
|
@@ -101,21 +101,21 @@
|
|
|
101
101
|
background-color: #8bae98;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
`}};function
|
|
104
|
+
`}};function as(e){const t={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
|
|
105
105
|
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');
|
|
106
106
|
:root { --wineater-font-primary: 'Bricolage Grotesque', serif; }
|
|
107
|
-
`},n=
|
|
107
|
+
`},n=qc[e]||{};return{...t,...n}}function jc(e){const t=e.color||"#7B2BEB";return{...as(""),brandColor:t,wineaterColor:t,customCss:""}}const Uc=24*60*60*1e3;let oe=We({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null,searchAvailable:!0});const ce={getLanguageFromURL(){return vt()?null:new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return(oe==null?void 0:oe.currentLanguage)??"en"},getStoreLanguage(){var e;return((e=oe.storeConfig)==null?void 0:e.lang)??null},getStoreId(){var e;return((e=oe.storeConfig)==null?void 0:e.id)??null},setStoreLanguage(e){if(oe.storeConfig&&oe.storeConfig.available_languages.includes(e)){if(oe.currentLanguage=e,vt()){ht.setLanguage(e);return}const t=new URLSearchParams(window.location.search);t.set("lang",e);const n=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",n)}else throw new Error(`Language ${e} is not available in store configuration.`)},getSupportedLanguages(){var e;return((e=oe.storeConfig)==null?void 0:e.available_languages)??["en"]},getConsentRequired(){var e;return((e=oe.storeConfig)==null?void 0:e.requires_cookie_consent)===!0},isSwipeModeEnabled(){var e;return!vt()&&((e=oe.storeConfig)==null?void 0:e.swipe_mode_enabled)===!0},getCurrency(){var e;return((e=oe.storeConfig)==null?void 0:e.currency)??"USD"},applyStoreConfig(e){oe.storeConfig=Oc(e),oe.currentLanguage=oe.storeConfig.lang;const t=this.getLanguageFromURL();t&&oe.storeConfig.available_languages.includes(t)?this.setStoreLanguage(t):this.setStoreLanguage(oe.storeConfig.lang);const n=vt();this.setUiConfig(n?{...jc(n),titleText:oe.storeConfig.title||null}:as(oe.storeConfig.id)),gc(oe.storeConfig.requires_cookie_consent),oe.isConfigLoaded=!0},async initializeStore(){const e=vt();if(e)return this.initializeShopify(e);const t=`${io}:store-config:v2`,n=async()=>{const r=await ht.getStoreConfig();return ao(t,r),r};try{const r=oo(t,Uc);if(r)try{this.applyStoreConfig(r),n().catch(()=>{});return}catch(i){console.warn("Ignoring invalid cached store config:",i)}this.applyStoreConfig(await n())}catch(r){console.error("Failed to initialize store:",r),oe.isConfigLoaded=!1}},async initializeShopify(e){var t;hc(Sc),Cc();try{const n=(t=e.config)!=null&&t.lang?e.config:await ht.getShopifyConfig(),r=Object.keys(os),i=xc(e.locale,n==null?void 0:n.lang,r);this.applyStoreConfig({id:`shopify:${e.shop}`,type:(n==null?void 0:n.widget_type)??"store",lang:i,available_languages:[i],currency:e.currency||(n==null?void 0:n.currency)||"USD",title:(n==null?void 0:n.title)??"",requires_cookie_consent:!0}),oe.searchAvailable=(n==null?void 0:n.search_available)!==!1}catch(n){console.error("Failed to initialize store:",n),oe.isConfigLoaded=!1}},isSearchAvailable(){return oe.searchAvailable},setSearchAvailable(e){oe.searchAvailable=e},isInitialized(){return oe.isConfigLoaded},getUiConfig(){return oe.uiConfig},setUiConfig(e){oe.uiConfig=e}},Fc={en:"en-US",de:"de-DE",fr:"fr-FR",es:"es-ES",it:"it-IT",ja:"ja-JP",zh:"zh-CN",ru:"ru-RU",kk:"kk-KZ",pt:"pt-PT"};function ss(e,t,n="en"){if(!t)return e.toString();try{return new Intl.NumberFormat(Fc[n]||"en-US",{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}catch{return e.toString()}}function fe({key:e,lang:t}){const n=os,r=ce.getUiConfig(),i=(r==null?void 0:r.translations)||{};if(i[t]&&i[t][e])return i[t][e];if(n[t]&&n[t][e])return n[t][e];throw new Error(`Translation for key "${e}" not found in language "${t}".`)}ul();var Hc=Tt('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" fill="none"><path d="M10.036 4.96326H28.2826L34.3648 14.0865L19.1593 33.8537L3.95381 14.0865L10.036 4.96326Z" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.6388 4.96326L13.0771 14.0865L19.1593 33.8537L25.2415 14.0865L20.6799 4.96326" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.95381 14.0867H34.3648" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function ls(e,t){let n=Ve(t,"className",8,""),r=Ve(t,"size",8,20);var i=Hc();M(()=>{Ge(i,0,$n(n())),W(i,"width",r()),W(i,"height",r())}),S(e,i)}var Gc=Tt('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 38" fill="none"><path d="M29.533 21.4034C31.7986 19.1834 34.0946 16.5224 34.0946 13.0404C34.0946 10.8224 33.2135 8.69521 31.6451 7.12684C30.0768 5.55847 27.9496 4.67737 25.7316 4.67737C23.0554 4.67737 21.1699 5.43764 18.8891 7.71847C16.6083 5.43764 14.7228 4.67737 12.0467 4.67737C9.82865 4.67737 7.70148 5.55847 6.13311 7.12684C4.56474 8.69521 3.68364 10.8224 3.68364 13.0404C3.68364 16.5376 5.96446 19.1986 8.24528 21.4034L18.8891 32.0472L29.533 21.4034Z" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.8891 19.8829L17.3686 18.3623L20.4097 15.3212L15.848 10.7596L18.8891 7.71851" stroke="currentColor" stroke-width="3.0411" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function cs(e,t){let n=Ve(t,"className",8,""),r=Ve(t,"size",8,20);var i=Gc();M(()=>{Ge(i,0,$n(n())),W(i,"width",r()),W(i,"height",r())}),S(e,i)}var Vc=Tt('<svg viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="M19.57 17.655a3.801 3.801 0 1 0 0-7.602 3.801 3.801 0 0 0 0 7.602Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="M19.57 3.97a9.884 9.884 0 0 0-9.458 6.995c-1.673 4.76-1.186 5.93-4.835 9.245a4.562 4.562 0 0 0 2.889 8.09c6.082 0 12.772-2.738 17.334-6.54a9.885 9.885 0 0 0-5.93-17.79Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.041" d="m28.693 10.053 3.33 6.842c.316.983.475 2.009.471 3.041a9.867 9.867 0 0 1-3.953 7.907c-4.562 3.801-11.252 6.538-17.334 6.538a4.562 4.562 0 0 1-4.075-2.524l-2.92-5.839"></path></svg>');function so(e,t){let n=Ve(t,"className",8,""),r=Ve(t,"size",8,20);var i=Vc();M(()=>{Ge(i,0,$n(n())),W(i,"width",r()),W(i,"height",r())}),S(e,i)}var Kc=Tt('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34" fill="none"><path d="M9.03846 17.0001C10.3456 12.1888 15.9077 8.65686 20.858 8.65686C25.8083 8.65686 29.2846 12.1888 30.5917 17.0001C29.2846 21.8252 25.8083 25.3432 20.858 25.3432C15.9077 25.3432 10.3456 21.8252 9.03846 17.0001Z" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M25.0296 17V17.6953" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.2485 25.2457C20.4397 22.8774 19.4599 19.98 19.4599 16.9999C19.4599 14.0198 20.4397 11.1224 22.2485 8.75403" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.73372 15.1506C9.73372 11.4379 7.75916 8.6151 3.79615 7.96155C2.40562 10.0473 2.40562 14.9142 4.11597 17C2.39171 19.0858 2.39171 23.9527 3.79615 26.0385C7.75916 25.3849 9.73372 22.5621 9.73372 18.8494" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.545 10.4089C14.1834 8.48998 12.7512 6.20951 11.1243 4.48525H19.1893C19.8491 4.4828 20.4883 4.71502 20.9927 5.14042C21.497 5.56582 21.8337 6.15668 21.9426 6.80744L22.2624 8.75418" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.2624 25.2459L21.9426 27.1926C21.8337 27.8434 21.497 28.4342 20.9927 28.8596C20.4883 29.285 19.8491 29.5172 19.1893 29.5148H13.2101C14.5573 27.9873 15.2948 26.0172 15.2819 23.9805" stroke="currentColor" stroke-width="2.78106" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function us(e,t){let n=Ve(t,"className",8,""),r=Ve(t,"size",8,20);var i=Kc();M(()=>{Ge(i,0,$n(n())),W(i,"width",r()),W(i,"height",r())}),S(e,i)}var Yc=N('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Xc=N('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Zc=N('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Qc=N('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),Jc=N('<h1 class="wr-Header-title svelte-oiwvqb"> <span><!></span> <span class="wr-Header-label svelte-oiwvqb"> </span>, <!> <span class="wr-Header-label svelte-oiwvqb"> </span> <br/> <!> <span class="wr-Header-label svelte-oiwvqb"> </span> </h1>'),$c=N('<div class="wr-Header"><!></div>');const eu={hash:"svelte-oiwvqb",code:`.wr-Header-title.svelte-oiwvqb {font-weight:600;font-size:24px;margin:0 auto;line-height:1.3;color:#333;text-align:center;
|
|
108
108
|
|
|
109
109
|
/* TODO: add wineater-color to svg */}.wr-Header-icon {display:inline-block;vertical-align:middle;color:var(--wr-wineater-color);}.wr-Header-label.svelte-oiwvqb {color:var(--wr-wineater-color);font-weight:500;}
|
|
110
110
|
|
|
111
111
|
@media screen and (max-width: 768px) {.wr-Header-title.svelte-oiwvqb {display:none;}
|
|
112
|
-
}`};function
|
|
112
|
+
}`};function tu(e,t){xt(t,!0),Pt(e,eu);let n=F(()=>ce.getAppLanguage()),r=F(()=>ce.getUiConfig()),i=F(()=>{var w,p;return((w=window==null?void 0:window.wineaterData)==null?void 0:w.TITLE_TEXT)||((p=o(r))==null?void 0:p.titleText)||null}),a=U(We(so));function l(w){return w.split(/(meal|mood|occasion)/gi).map(p=>({keyword:/^(meal|mood|occasion)$/i.test(p)?p.toLowerCase():null,text:p}))}let c=F(()=>o(i)?l(o(i)):null);var s=$c(),f=b(s);{var h=w=>{var p=Qc();Nt(p,21,()=>o(c),Rn,(_,y)=>{var d=Jn(),x=Ue(d);{var O=A=>{var E=Yc(),D=Ue(E),K=b(D);Aa(K,()=>o(a),(le,ue)=>{ue(le,{className:"wr-Header-icon",size:"28"})});var Y=T(D),ne=b(Y);M(()=>q(ne,o(y).text)),pt("mouseenter",D,()=>g(a,us,!0)),pt("mouseleave",D,()=>g(a,so,!0)),S(A,E)},L=A=>{var E=Xc(),D=Ue(E);cs(D,{className:"wr-Header-icon",size:"28"});var K=T(D),Y=b(K);M(()=>q(Y,o(y).text)),S(A,E)},P=A=>{var E=Zc(),D=Ue(E);ls(D,{className:"wr-Header-icon",size:"28"});var K=T(D),Y=b(K);M(()=>q(Y,o(y).text)),S(A,E)},R=A=>{var E=Jt();M(()=>q(E,o(y).text)),S(A,E)};G(x,A=>{o(y).keyword==="meal"?A(O):o(y).keyword==="mood"?A(L,1):o(y).keyword==="occasion"?A(P,2):A(R,!1)})}S(_,d)}),S(w,p)},m=w=>{var p=Jc(),_=b(p),y=T(_),d=b(y);Aa(d,()=>o(a),(ne,le)=>{le(ne,{className:"wr-Header-icon",size:"28"})});var x=T(y,2),O=b(x),L=T(x,2);cs(L,{className:"wr-Header-icon",size:"28"});var P=T(L,2),R=b(P),A=T(P,3),E=T(A);ls(E,{className:"wr-Header-icon",size:"28"});var D=T(E,2),K=b(D),Y=T(D);M((ne,le,ue,tt,Le,we)=>{q(_,`${ne??""} `),q(O,le),q(R,ue),q(A,` ${tt??""} `),q(K,Le),q(Y,` ${we??""}`)},[()=>fe({key:"headerLine1",lang:o(n)}),()=>fe({key:"headerMeal",lang:o(n)}),()=>fe({key:"headerMood",lang:o(n)}),()=>fe({key:"headerOr",lang:o(n)}),()=>fe({key:"headerOccasion",lang:o(n)}),()=>fe({key:"headerLine2",lang:o(n)})]),pt("mouseenter",y,()=>g(a,us,!0)),pt("mouseleave",y,()=>g(a,so,!0)),S(w,p)};G(f,w=>{o(c)?w(h):w(m,!1)})}S(e,s),kt()}var nu=N('<option class="wr-Footer-lang"> </option>'),ru=N('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),iu=N('<footer class="wr-Footer svelte-1sr6y3t"><div class="wr-Footer-center svelte-1sr6y3t"><a href="https://wineater.com" class="wr-Footer-link svelte-1sr6y3t" target="_blank"><span class="wr-Footer-text"> </span> <img class="wr-Footer-logo svelte-1sr6y3t" alt="Wineater Logo" loading="lazy" decoding="async"/> <span class="wr-Footer-text wr-Footer-text--sommelier svelte-1sr6y3t"> </span></a></div> <!></footer>');const ou={hash:"svelte-1sr6y3t",code:`.wr-Footer.svelte-1sr6y3t {position:relative;border-top:2px solid #f6f7fd;font-weight:200;padding:12px 24px;min-height:40px;}.wr-Footer-center.svelte-1sr6y3t {position:absolute;left:50%;transform:translateX(-50%);text-align:center;}.wr-Footer-dropdown.svelte-1sr6y3t {position:absolute;right:0px;top:50%;transform:translateY(-50%);padding:4px;border-radius:6px;border:2px solid var(--wr-brand-color);background-color:white;color:var(--wr-brand-color);font-weight:500;font-size:12px;cursor:pointer;transition:all 0.2s ease;}.wr-Footer-dropdown.svelte-1sr6y3t:hover {box-shadow:0 4px 8px rgba(123, 43, 235, 0.2);}.wr-Footer-link.svelte-1sr6y3t {text-decoration:none;display:flex;align-items:center;white-space:nowrap;gap:8px;color:#a8a8a8;font-size:12px;line-height:16px;transition:opacity 0.2s ease;}.wr-Footer-link.svelte-1sr6y3t:hover {opacity:0.8;}.wr-Footer-logo.svelte-1sr6y3t {height:16px;width:auto;color:#a8a8a8;}
|
|
113
113
|
|
|
114
114
|
@media screen and (max-width: 768px) {.wr-Footer-text--sommelier.svelte-1sr6y3t {display:none;}
|
|
115
|
-
}`};function
|
|
115
|
+
}`};function au(e,t){xt(t,!0),Pt(e,ou);let n=Ve(t,"countryCode",3,null),r=F(()=>ce.getAppLanguage()),i=F(()=>ce.getSupportedLanguages()),a=F(()=>ce.getStoreId());function l(x){const L=x.target.value;Se(ye.LANGUAGE_CHANGED,o(a),{from_language:o(r),to_language:L}),ce.setStoreLanguage(L)}var c=iu(),s=b(c),f=b(s),h=b(f),m=b(h),w=T(h,2),p=T(w,2),_=b(p),y=T(s,2);{var d=x=>{var O=ru();Nt(O,21,()=>o(i),Rn,(P,R)=>{var A=nu(),E=b(A),D={};M(K=>{lc(A,o(R)===o(r)),q(E,K),D!==(D=o(R))&&(A.value=(A.__value=o(R))??"")},[()=>o(R).toUpperCase()]),S(P,A)});var L;oc(O),M(()=>{L!==(L=o(r))&&(O.value=(O.__value=o(r))??"",Wa(O,o(r)))}),ke("change",O,l),S(x,O)};G(y,x=>{o(i).length>1&&x(d)})}M((x,O)=>{q(m,x),W(w,"src",n()==="ru"?`${Lt}/divino_logo.svg?x=5`:`${Lt}/logo_medium_gray.svg`),q(_,O)},[()=>fe({key:"poweredBy",lang:o(r)}),()=>fe({key:"ai_sommelier",lang:o(r)})]),S(e,c),kt()}Er(["change"]);var su=N('<a rel="noopener noreferrer"><!></a>'),lu=N("<button><!></button>");const cu={hash:"svelte-8cxv3l",code:`.wr-Action.svelte-8cxv3l {background:transparent;border:none;font-family:inherit;cursor:pointer;display:block;text-decoration:none;transition:background 0.2s,
|
|
116
116
|
color 0.2s,
|
|
117
|
-
box-shadow 0.2s;}.wr-Action.primary.svelte-8cxv3l {background:var(--wr-brand-color);color:#fff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {opacity:0.8;}}.wr-Action.outlined.svelte-8cxv3l {background:transparent;color:var(--wr-brand-color);border:2px solid var(--wr-brand-color);border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {box-shadow:0 4px 8px rgba(123, 43, 235, 0.25);background-color:var(--wr-brand-color);color:#fff;}}.wr-Action--uppercase.svelte-8cxv3l {text-transform:uppercase;}`};function
|
|
118
|
-
opacity 0.3s ease-in-out;}.wr-Search-input.svelte-1wah7ro:focus {border-color:var(--wr-brand-color);}.wr-Search-input.svelte-1wah7ro:focus::placeholder {opacity:0.5;}`};function
|
|
117
|
+
box-shadow 0.2s;}.wr-Action.primary.svelte-8cxv3l {background:var(--wr-brand-color);color:#fff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {opacity:0.8;}}.wr-Action.outlined.svelte-8cxv3l {background:transparent;color:var(--wr-brand-color);border:2px solid var(--wr-brand-color);border-radius:6px;padding:8px 16px;font-size:14px;font-weight:500;&:hover {box-shadow:0 4px 8px rgba(123, 43, 235, 0.25);background-color:var(--wr-brand-color);color:#fff;}}.wr-Action--uppercase.svelte-8cxv3l {text-transform:uppercase;}`};function un(e,t){xt(t,!0),Pt(e,cu);let n=Ve(t,"type",3,"button"),r=Ve(t,"variant",3,"primary"),i=Ve(t,"target",3,"_self"),a=ce.getUiConfig(),l=`wr-Action ${r()} ${t.className||""} ${a.buttonUppercase?"wr-Action--uppercase":""}`.trim();var c=Jn(),s=Ue(c);{var f=m=>{var w=su(),p=b(w);Ia(p,t,"default",{}),M(()=>{Ge(w,1,$n(l),"svelte-8cxv3l"),W(w,"href",t.href),W(w,"id",t.id),W(w,"target",i())}),ke("click",w,function(..._){var y;(y=t.handleClick)==null||y.apply(this,_)}),S(m,w)},h=m=>{var w=lu(),p=b(w);Ia(p,t,"default",{}),M(()=>{Ge(w,1,$n(l),"svelte-8cxv3l"),W(w,"type",n()),W(w,"id",t.id)}),ke("click",w,function(..._){var y;(y=t.handleClick)==null||y.apply(this,_)}),S(m,w)};G(s,m=>{t.href?m(f):m(h,!1)})}S(e,c),kt()}Er(["click"]);var uu=N('<form class="wr-Search svelte-1wah7ro"><span class="wr-Search-icon svelte-1wah7ro"></span> <input class="wr-Search-input svelte-1wah7ro" type="text"/> <!></form>');const du={hash:"svelte-1wah7ro",code:`.wr-Search.svelte-1wah7ro {position:relative;margin:12px auto;padding:0 6px;display:flex;align-items:center;border:2px solid #d5d9ee;border-radius:10px;}.wr-Search-icon.svelte-1wah7ro {left:12px;width:24px;height:24px;flex:0 0 auto;background-image:url("data:image/svg+xml,%3Csvg%20width=%2224%22%20height=%2225%22%20viewBox=%220%200%2024%2025%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M11%2019.3884C15.4183%2019.3884%2019%2015.8067%2019%2011.3884C19%206.97015%2015.4183%203.38843%2011%203.38843C6.58172%203.38843%203%206.97015%203%2011.3884C3%2015.8067%206.58172%2019.3884%2011%2019.3884Z%22%20stroke=%22%238250D2%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3Cpath%20d=%22M21%2021.3884L16.7%2017.0884%22%20stroke=%22%238250D2%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;z-index:2;}.wr-Search-input.svelte-1wah7ro {flex:1 1 0%;min-width:0;padding:12px;font-size:16px;border:none;border-radius:10px;outline:none;transition:border 0.2s ease;}.wr-Search-input.svelte-1wah7ro::placeholder {color:var(--wr-wineater-color);opacity:1;transition:color 0.3s ease,
|
|
118
|
+
opacity 0.3s ease-in-out;}.wr-Search-input.svelte-1wah7ro:focus {border-color:var(--wr-brand-color);}.wr-Search-input.svelte-1wah7ro:focus::placeholder {opacity:0.5;}`};function fu(e,t){xt(t,!0),Pt(e,du);let n=Ve(t,"searchQuery",15),r,i=U(!1),a=U(0),l=U(0),c=U(!0),s=U(!1),f=F(()=>ce.getAppLanguage()),h=0;function m(){return r}function w(){const P=++h,R=fe({key:"placeholderSuggestions",lang:o(f)});if(!r||!R.length)return;g(s,!0);const A=()=>{if(P!==h||!r||!o(s)||o(i)||n().length)return;const E=R[o(a)];if(o(c)){if(r.placeholder=E.substring(0,$o(l)),o(l)>E.length){g(c,!1),setTimeout(A,1600);return}setTimeout(A,90)}else{if(r.placeholder=E.substring(0,$o(l,-1)),o(l)<0){g(c,!0),g(a,(o(a)+1)%R.length),setTimeout(A,450);return}setTimeout(A,45)}};A()}function p(){g(s,!1)}function _(){g(i,!0),p(),r&&(r.placeholder="")}function y(){g(i,!1),g(l,0),g(c,!0),g(s,!1)}sn(()=>{if(!r||n().length>0)return;h++,g(s,!1),g(a,0),g(l,0),g(c,!0);const P=fe({key:"placeholderSuggestions",lang:o(f)});P&&P.length?r.placeholder=P[0]:r.placeholder=fe({key:"searchPlaceholder",lang:o(f)})}),sn(()=>{r&&t.initialized&&!o(i)&&!n().length&&!o(s)&&w(),n().length>0&&o(s)&&(g(s,!1),h++)}),ei(()=>{});var d={getSearchElement:m},x=uu(),O=T(b(x),2);Yi(O,P=>r=P,()=>r);var L=T(O,2);return un(L,{className:"wr-Search-button",type:"submit",variant:"primary",children:(P,R)=>{var A=Jt();M(E=>q(A,E),[()=>fe({key:"searchButton",lang:o(f)})]),S(P,A)},$$slots:{default:!0}}),pt("submit",x,function(...P){var R;(R=t.onSubmit)==null||R.apply(this,P)}),pt("focus",O,_),pt("blur",O,y),dc(O,n),S(e,x),kt(d)}var pu=N('<div class="wr-Skeleton-tile svelte-f6xbvk"><div class="wr-Skeleton-block wr-Skeleton-image svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-price svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-title svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-title wr-Skeleton-title--short svelte-f6xbvk"></div> <div class="wr-Skeleton-block wr-Skeleton-button svelte-f6xbvk"></div></div>'),vu=N('<div class="wr-Skeleton svelte-f6xbvk" aria-hidden="true"></div>');const hu={hash:"svelte-f6xbvk",code:`.wr-Skeleton.svelte-f6xbvk {display:grid;grid-template-columns:repeat(4, 1fr);}.wr-Skeleton-tile.svelte-f6xbvk {display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 8px;border-right:2px solid #f6f7fd;}.wr-Skeleton-tile.svelte-f6xbvk:last-child {border-right:none;}.wr-Skeleton-block.svelte-f6xbvk {border-radius:6px;background:linear-gradient(90deg, #f1f2f8 25%, #f8f9fc 50%, #f1f2f8 75%);background-size:200% 100%;
|
|
119
119
|
animation: svelte-f6xbvk-wr-shimmer 1.2s linear infinite;}.wr-Skeleton-image.svelte-f6xbvk {width:60%;height:200px;margin-bottom:6px;}.wr-Skeleton-price.svelte-f6xbvk {width:40px;height:16px;}.wr-Skeleton-title.svelte-f6xbvk {width:80%;height:14px;}.wr-Skeleton-title--short.svelte-f6xbvk {width:55%;}.wr-Skeleton-button.svelte-f6xbvk {width:96px;height:36px;margin-top:14px;border-radius:10px;}
|
|
120
120
|
|
|
121
121
|
@keyframes svelte-f6xbvk-wr-shimmer {
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
@media screen and (max-width: 768px) {.wr-Skeleton.svelte-f6xbvk {display:flex;gap:8px;overflow:hidden;padding:8px 0;}.wr-Skeleton-tile.svelte-f6xbvk {flex:0 0 240px;}
|
|
135
|
-
}`};function $a(e){Ct(e,ou);var t=iu();Rt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=ru();k(n,i)}),k(e,t)}var au=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),su=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),lu=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),cu=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),uu=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),du=L('<div class="wr-WinePopupMobile svelte-17gehox"><div class="wr-WinePopupMobile-overlay svelte-17gehox"></div> <div class="wr-WinePopupMobile-wrapper svelte-17gehox"><div class="wr-WinePopup js-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close js-WinePopupClose svelte-17gehox">×</button></div> <!> <!> <!></div></div></div>'),fu=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),pu=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),vu=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),hu=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),gu=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),wu=L('<div class="wr-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close svelte-17gehox">×</button></div> <!> <!> <!></div>');const mu={hash:"svelte-17gehox",code:".wr-WinePopup.svelte-17gehox {position:absolute;width:100%;background-color:white;padding:16px;border-radius:16px;box-shadow:0 6px 30px rgba(0, 0, 0, 0.2);text-align:left;font-size:14px;box-sizing:border-box;display:flex;flex-direction:column;}.wr-WinePopup-text.svelte-17gehox {margin:5px 0;}.wr-WinePopup-header.svelte-17gehox {display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}.wr-WinePopup-title.svelte-17gehox {font-size:16px;font-weight:600;margin:0;flex:1;line-height:1.3;}.wr-WinePopup-close.svelte-17gehox {font-size:20px;font-weight:bold;cursor:pointer;color:#999;border:none;background:transparent;line-height:1;}.wr-WinePopup-close.svelte-17gehox:hover {color:#000;}.wr-WinePopup-desc.svelte-17gehox {margin-top:8px;}.wr-WinePopup-reason.svelte-17gehox {font-size:14px;font-weight:400;color:#333;margin-top:8px;}.wr-WinePopup-pairing.svelte-17gehox {margin-top:8px;}.wr-WinePopup-tags.svelte-17gehox {display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;justify-content:center;}.wr-WinePopup-tag.svelte-17gehox {display:inline-block;padding:4px 8px;border-radius:12px;background-color:#f5f0ff;border:1px solid #ddd;font-size:13px;color:#333;text-transform:capitalize;}.wr-WinePopupMobile.svelte-17gehox {position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;}.wr-WinePopupMobile-overlay.svelte-17gehox {position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.5);}.wr-WinePopupMobile-wrapper.svelte-17gehox {position:absolute;width:100%;height:100%;top:50%;left:50%;transform:translate(-50%, -50%);max-width:90%;max-height:80%;overflow-y:auto;background:transparent;}"};function es(e,t){_t(t,!0),Ct(e,mu);const n=!!t.isMobile;var r=Yn(),i=qe(r);{var a=c=>{var s=du(),u=x(s),h=P(u,2),m=x(h),d=x(m),w=x(d),_=x(w),y=P(w,2),f=P(d,2);{var b=S=>{var I=au(),F=x(I);W(()=>O(F,t.shortDescription)),k(S,I)};V(f,S=>{t.shortDescription&&S(b)})}var D=P(f,2);{var B=S=>{var I=su(),F=x(I);W(()=>O(F,t.reason)),k(S,I)},E=S=>{var I=lu(),F=x(I);W(()=>O(F,t.pairing)),k(S,I)};V(D,S=>{t.reason?S(B):t.pairing&&S(E,1)})}var R=P(D,2);{var M=S=>{var I=uu();Rt(I,21,()=>t.tags,An,(F,G)=>{var de=cu(),we=x(de);W(()=>O(we,o(G))),k(F,de)}),k(S,I)};V(R,S=>{t.tags&&t.tags.length&&S(M)})}W(()=>O(_,t.title)),De("click",u,function(...S){var I;(I=t.onClose)==null||I.apply(this,S)}),De("click",y,function(...S){var I;(I=t.onClose)==null||I.apply(this,S)}),k(c,s)},l=c=>{var s=wu(),u=x(s),h=x(u),m=x(h),d=P(h,2),w=P(u,2);{var _=E=>{var R=fu(),M=x(R);W(()=>O(M,t.shortDescription)),k(E,R)};V(w,E=>{t.shortDescription&&E(_)})}var y=P(w,2);{var f=E=>{var R=pu(),M=x(R);W(()=>O(M,t.reason)),k(E,R)},b=E=>{var R=vu(),M=x(R);W(()=>O(M,t.pairing)),k(E,R)};V(y,E=>{t.reason?E(f):t.pairing&&E(b,1)})}var D=P(y,2);{var B=E=>{var R=gu();Rt(R,21,()=>t.tags,An,(M,S)=>{var I=hu(),F=x(I);W(()=>O(F,o(S))),k(M,I)}),k(E,R)};V(D,E=>{t.tags&&t.tags.length&&E(B)})}W(()=>O(m,t.title)),De("click",d,function(...E){var R;(R=t.onClose)==null||R.apply(this,E)}),k(c,s)};V(i,c=>{n?c(a):c(l,!1)})}k(e,r),bt()}Tr(["click"]);const _u={red:{glass:"#3b1230",foil:"#7a1f3d",accent:"#7a1f3d",shoulder:"bordeaux"},white:{glass:"#a9b568",foil:"#c9b458",accent:"#8a8f3c",shoulder:"flute"},rose:{glass:"#d98a9d",foil:"#e8a3b4",accent:"#b8566f",shoulder:"burgundy"},sparkling:{glass:"#5f6b3a",foil:"#d9c26a",accent:"#b89b2e",shoulder:"champagne"},sweet:{glass:"#b8862e",foil:"#d9a441",accent:"#9a6a1c",shoulder:"flute"},fortified:{glass:"#4a2a1a",foil:"#8a5a2b",accent:"#8a5a2b",shoulder:"port"}},bu={flute:{body:"M17 4h10v34c0 6 8 10 8 24v56c0 3-2 5-5 5H14c-3 0-5-2-5-5V62c0-14 8-18 8-24z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 66c0 18 0 40 0 52"},burgundy:{body:"M17 4h10v30c0 10 11 14 11 30v54c0 3-2 5-5 5H11c-3 0-5-2-5-5V64c0-16 11-20 11-30z",cap:{x:16,y:2,w:12,h:20},label:{x:8,y:72,w:28,h:34},shine:"M11 68c0 18 0 38 0 50"},bordeaux:{body:"M17 4h10v32c0 4 1 6 4 9 4 4 6 7 6 14v59c0 3-2 5-5 5H12c-3 0-5-2-5-5V59c0-7 2-10 6-14 3-3 4-5 4-9z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 64c0 18 0 40 0 54"},champagne:{body:"M17 4h10v34c0 12 15 18 15 42v35c0 5-3 8-7 8H9c-4 0-7-3-7-8V80c0-24 15-30 15-42z",cap:{x:15,y:2,w:14,h:34},label:{x:6,y:78,w:32,h:36},shine:"M8 82c0 14 0 28 0 36"},port:{body:"M16 4h12v16c0 3-2 4-2 7s3 4 3 8c0 6 9 6 9 18v65c0 3-2 5-5 5H11c-3 0-5-2-5-5V53c0-12 9-12 9-18 0-4 3-5 3-8s-2-4-2-7z",cap:{x:15,y:2,w:14,h:15},label:{x:8,y:66,w:28,h:42},shine:"M11 60c0 20 0 40 0 56"}},yu=[[20,58,1.5],[26,50,1.1],[23,44,.8],[14,66,1.2],[30,63,1.7],[9,86,1.1],[34,92,1.3],[8,106,1.6],[35,112,1],[25,70,.9],[17,73,.7]];function ts(e){const t=(e??"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"");return/(spark|champ|cava|prosecco|cremant|brut|pet.?nat|espum|petillant)/.test(t)?"sparkling":/(rose|pink|rosado)/.test(t)?"rose":/(fortif|port|sherry|madeira|marsala)/.test(t)?"fortified":/(sweet|dessert|late|sauternes|ice|moelleux|dulce)/.test(t)?"sweet":/(red|rouge|tinto|rosso|krasn)/.test(t)?"red":"white"}function ns(e){const t=(e??"").trim();return!!t&&t!=="null"&&t!=="undefined"}var xu=St("<circle></circle>"),ku=St('<path d="M16.5 10h11l1.5 26h-14z"></path><rect x="14" y="2" width="16" height="9" rx="3.5"></rect><rect x="14" y="8" width="16" height="2.4" fill="#000" opacity="0.12"></rect><path d="M16 15h12M15.6 20h12.8M15.2 25h13.6M14.8 30h14.4M22 11v21" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9" fill="none"></path><circle cx="22" cy="33" r="1.6" fill="none" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9"></circle><g fill="#fff" opacity="0.4"></g>',1),Su=St('<rect rx="2.5"></rect><rect height="2.5" fill="#000" opacity="0.12"></rect>',1),Cu=St('<svg class="wr-WineBottle svelte-1duzdpv" viewBox="0 0 44 130" aria-hidden="true" focusable="false"><defs><linearGradient x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-opacity="0.78"></stop><stop offset="0.45"></stop><stop offset="1" stop-opacity="0.88"></stop></linearGradient></defs><path></path><!><rect rx="2.5" fill="#fffdf8" opacity="0.94"></rect><rect height="2.4" rx="1.2"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><path stroke="#fff" stroke-opacity="0.22" stroke-width="2.2" stroke-linecap="round" fill="none"></path></svg>');const Eu={hash:"svelte-1duzdpv",code:".wr-WineBottle.svelte-1duzdpv {display:block;height:100%;width:auto;margin:0 auto;}"};function rs(e,t){_t(t,!0),Ct(e,Eu);const n=U(()=>ts(t.type)),r=U(()=>_u[o(n)]),i=U(()=>bu[o(r).shoulder]),a=`wr-bottle-${Math.random().toString(36).slice(2,8)}`;var l=Cu(),c=x(l),s=x(c),u=x(s),h=P(u),m=P(h),d=P(c),w=P(d);{var _=R=>{var M=ku(),S=qe(M),I=P(S),F=P(I,4);Rt(F,21,()=>yu,([G,de,we])=>`${G}-${de}`,(G,de)=>{var we=U(()=>Ns(o(de),3));let Ee=()=>o(we)[0],je=()=>o(we)[1],Ue=()=>o(we)[2];var _e=xu();W(()=>{N(_e,"cx",Ee()),N(_e,"cy",je()),N(_e,"r",Ue())}),k(G,_e)}),W(()=>{N(S,"fill",o(r).foil),N(I,"fill",o(r).foil)}),k(R,M)},y=R=>{var M=Su(),S=qe(M),I=P(S);W(()=>{N(S,"x",o(i).cap.x),N(S,"y",o(i).cap.y),N(S,"width",o(i).cap.w),N(S,"height",o(i).cap.h),N(S,"fill",o(r).foil),N(I,"x",o(i).cap.x),N(I,"y",o(i).cap.y+o(i).cap.h-3),N(I,"width",o(i).cap.w)}),k(R,M)};V(w,R=>{o(n)==="sparkling"?R(_):R(y,!1)})}var f=P(w),b=P(f),D=P(b),B=P(D),E=P(B);W(()=>{N(s,"id",a),N(u,"stop-color",o(r).glass),N(h,"stop-color",o(r).glass),N(m,"stop-color",o(r).glass),N(d,"d",o(i).body),N(d,"fill",`url(#${a})`),N(f,"x",o(i).label.x),N(f,"y",o(i).label.y),N(f,"width",o(i).label.w),N(f,"height",o(i).label.h),N(b,"x",o(i).label.x+o(i).label.w*.2),N(b,"y",o(i).label.y+8),N(b,"width",o(i).label.w*.6),N(b,"fill",o(r).accent),N(D,"x",o(i).label.x+o(i).label.w*.3),N(D,"y",o(i).label.y+14),N(D,"width",o(i).label.w*.4),N(D,"fill",o(r).accent),N(B,"x",o(i).label.x+o(i).label.w*.3),N(B,"y",o(i).label.y+19),N(B,"width",o(i).label.w*.4),N(B,"fill",o(r).accent),N(E,"d",o(i).shine)}),k(e,l),bt()}var Tu=L('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),Pu=L('<div class="wr-WineTile-image wr-WineTile-bottle svelte-yk3emv"><!></div>'),Iu=L('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Au=L('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),Du=L('<h3 class="wr-WineTile-title svelte-yk3emv"><a class="wr-WineTile-titleLink js-WineTileAction svelte-yk3emv"> </a></h3>'),Ru=L('<h3 class="wr-WineTile-title svelte-yk3emv"> </h3>'),Mu=L('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),Wu=L('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),Nu=L('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),Lu=L('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),zu=L("<div><!> <!></div>"),Bu=L('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <!></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article> <!>',1);const Ou={hash:"svelte-yk3emv",code:`.wr-WineTile.svelte-yk3emv {display:flex;flex-direction:column;align-items:center;text-align:center;box-sizing:border-box;padding:16px 8px;border-right:2px solid #f6f7fd;position:relative;transform:translateY(0);opacity:1;transition:transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
|
|
135
|
+
}`};function ds(e){Pt(e,hu);var t=vu();Nt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=pu();S(n,i)}),S(e,t)}var gu=N('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),wu=N('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),mu=N('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),_u=N('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),bu=N('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),yu=N('<div class="wr-WinePopupMobile svelte-17gehox"><div class="wr-WinePopupMobile-overlay svelte-17gehox"></div> <div class="wr-WinePopupMobile-wrapper svelte-17gehox"><div class="wr-WinePopup js-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close js-WinePopupClose svelte-17gehox">×</button></div> <!> <!> <!></div></div></div>'),xu=N('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),ku=N('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Su=N('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Cu=N('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Eu=N('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Tu=N('<div class="wr-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close svelte-17gehox">×</button></div> <!> <!> <!></div>');const Pu={hash:"svelte-17gehox",code:".wr-WinePopup.svelte-17gehox {position:absolute;width:100%;background-color:white;padding:16px;border-radius:16px;box-shadow:0 6px 30px rgba(0, 0, 0, 0.2);text-align:left;font-size:14px;box-sizing:border-box;display:flex;flex-direction:column;}.wr-WinePopup-text.svelte-17gehox {margin:5px 0;}.wr-WinePopup-header.svelte-17gehox {display:flex;justify-content:space-between;align-items:flex-start;gap:12px;}.wr-WinePopup-title.svelte-17gehox {font-size:16px;font-weight:600;margin:0;flex:1;line-height:1.3;}.wr-WinePopup-close.svelte-17gehox {font-size:20px;font-weight:bold;cursor:pointer;color:#999;border:none;background:transparent;line-height:1;}.wr-WinePopup-close.svelte-17gehox:hover {color:#000;}.wr-WinePopup-desc.svelte-17gehox {margin-top:8px;}.wr-WinePopup-reason.svelte-17gehox {font-size:14px;font-weight:400;color:#333;margin-top:8px;}.wr-WinePopup-pairing.svelte-17gehox {margin-top:8px;}.wr-WinePopup-tags.svelte-17gehox {display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;justify-content:center;}.wr-WinePopup-tag.svelte-17gehox {display:inline-block;padding:4px 8px;border-radius:12px;background-color:#f5f0ff;border:1px solid #ddd;font-size:13px;color:#333;text-transform:capitalize;}.wr-WinePopupMobile.svelte-17gehox {position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;}.wr-WinePopupMobile-overlay.svelte-17gehox {position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.5);}.wr-WinePopupMobile-wrapper.svelte-17gehox {position:absolute;width:100%;height:100%;top:50%;left:50%;transform:translate(-50%, -50%);max-width:90%;max-height:80%;overflow-y:auto;background:transparent;}"};function Iu(e,t){xt(t,!0),Pt(e,Pu);const n=!!t.isMobile;var r=Jn(),i=Ue(r);{var a=c=>{var s=yu(),f=b(s),h=T(f,2),m=b(h),w=b(m),p=b(w),_=b(p),y=T(p,2),d=T(w,2);{var x=E=>{var D=gu(),K=b(D);M(()=>q(K,t.shortDescription)),S(E,D)};G(d,E=>{t.shortDescription&&E(x)})}var O=T(d,2);{var L=E=>{var D=wu(),K=b(D);M(()=>q(K,t.reason)),S(E,D)},P=E=>{var D=mu(),K=b(D);M(()=>q(K,t.pairing)),S(E,D)};G(O,E=>{t.reason?E(L):t.pairing&&E(P,1)})}var R=T(O,2);{var A=E=>{var D=bu();Nt(D,21,()=>t.tags,Rn,(K,Y)=>{var ne=_u(),le=b(ne);M(()=>q(le,o(Y))),S(K,ne)}),S(E,D)};G(R,E=>{t.tags&&t.tags.length&&E(A)})}M(()=>q(_,t.title)),ke("click",f,function(...E){var D;(D=t.onClose)==null||D.apply(this,E)}),ke("click",y,function(...E){var D;(D=t.onClose)==null||D.apply(this,E)}),S(c,s)},l=c=>{var s=Tu(),f=b(s),h=b(f),m=b(h),w=T(h,2),p=T(f,2);{var _=P=>{var R=xu(),A=b(R);M(()=>q(A,t.shortDescription)),S(P,R)};G(p,P=>{t.shortDescription&&P(_)})}var y=T(p,2);{var d=P=>{var R=ku(),A=b(R);M(()=>q(A,t.reason)),S(P,R)},x=P=>{var R=Su(),A=b(R);M(()=>q(A,t.pairing)),S(P,R)};G(y,P=>{t.reason?P(d):t.pairing&&P(x,1)})}var O=T(y,2);{var L=P=>{var R=Eu();Nt(R,21,()=>t.tags,Rn,(A,E)=>{var D=Cu(),K=b(D);M(()=>q(K,o(E))),S(A,D)}),S(P,R)};G(O,P=>{t.tags&&t.tags.length&&P(L)})}M(()=>q(m,t.title)),ke("click",w,function(...P){var R;(R=t.onClose)==null||R.apply(this,P)}),S(c,s)};G(i,c=>{n?c(a):c(l,!1)})}S(e,r),kt()}Er(["click"]);const Au={red:{glass:"#3b1230",foil:"#7a1f3d",accent:"#7a1f3d",shoulder:"bordeaux"},white:{glass:"#a9b568",foil:"#c9b458",accent:"#8a8f3c",shoulder:"flute"},rose:{glass:"#d98a9d",foil:"#e8a3b4",accent:"#b8566f",shoulder:"burgundy"},sparkling:{glass:"#5f6b3a",foil:"#d9c26a",accent:"#b89b2e",shoulder:"champagne"},sweet:{glass:"#b8862e",foil:"#d9a441",accent:"#9a6a1c",shoulder:"flute"},fortified:{glass:"#4a2a1a",foil:"#8a5a2b",accent:"#8a5a2b",shoulder:"port"}},Du={flute:{body:"M17 4h10v34c0 6 8 10 8 24v56c0 3-2 5-5 5H14c-3 0-5-2-5-5V62c0-14 8-18 8-24z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 66c0 18 0 40 0 52"},burgundy:{body:"M17 4h10v30c0 10 11 14 11 30v54c0 3-2 5-5 5H11c-3 0-5-2-5-5V64c0-16 11-20 11-30z",cap:{x:16,y:2,w:12,h:20},label:{x:8,y:72,w:28,h:34},shine:"M11 68c0 18 0 38 0 50"},bordeaux:{body:"M17 4h10v32c0 4 1 6 4 9 4 4 6 7 6 14v59c0 3-2 5-5 5H12c-3 0-5-2-5-5V59c0-7 2-10 6-14 3-3 4-5 4-9z",cap:{x:16,y:2,w:12,h:20},label:{x:9,y:72,w:26,h:34},shine:"M12 64c0 18 0 40 0 54"},champagne:{body:"M17 4h10v34c0 12 15 18 15 42v35c0 5-3 8-7 8H9c-4 0-7-3-7-8V80c0-24 15-30 15-42z",cap:{x:15,y:2,w:14,h:34},label:{x:6,y:78,w:32,h:36},shine:"M8 82c0 14 0 28 0 36"},port:{body:"M16 4h12v16c0 3-2 4-2 7s3 4 3 8c0 6 9 6 9 18v65c0 3-2 5-5 5H11c-3 0-5-2-5-5V53c0-12 9-12 9-18 0-4 3-5 3-8s-2-4-2-7z",cap:{x:15,y:2,w:14,h:15},label:{x:8,y:66,w:28,h:42},shine:"M11 60c0 20 0 40 0 56"}},Ru=[[20,58,1.5],[26,50,1.1],[23,44,.8],[14,66,1.2],[30,63,1.7],[9,86,1.1],[34,92,1.3],[8,106,1.6],[35,112,1],[25,70,.9],[17,73,.7]];function Mu(e){const t=(e??"").toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"");return/(spark|champ|cava|prosecco|cremant|brut|pet.?nat|espum|petillant)/.test(t)?"sparkling":/(rose|pink|rosado)/.test(t)?"rose":/(fortif|port|sherry|madeira|marsala)/.test(t)?"fortified":/(sweet|dessert|late|sauternes|ice|moelleux|dulce)/.test(t)?"sweet":/(red|rouge|tinto|rosso|krasn)/.test(t)?"red":"white"}function fs(e){const t=(e??"").trim();return!!t&&t!=="null"&&t!=="undefined"}var Wu=Tt("<circle></circle>"),Nu=Tt('<path d="M16.5 10h11l1.5 26h-14z"></path><rect x="14" y="2" width="16" height="9" rx="3.5"></rect><rect x="14" y="8" width="16" height="2.4" fill="#000" opacity="0.12"></rect><path d="M16 15h12M15.6 20h12.8M15.2 25h13.6M14.8 30h14.4M22 11v21" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9" fill="none"></path><circle cx="22" cy="33" r="1.6" fill="none" stroke="#8a6d12" stroke-opacity="0.55" stroke-width="0.9"></circle><g fill="#fff" opacity="0.4"></g>',1),Lu=Tt('<rect rx="2.5"></rect><rect height="2.5" fill="#000" opacity="0.12"></rect>',1),zu=Tt('<svg class="wr-WineBottle svelte-1duzdpv" viewBox="0 0 44 130" aria-hidden="true" focusable="false"><defs><linearGradient x1="0" x2="1" y1="0" y2="0"><stop offset="0" stop-opacity="0.78"></stop><stop offset="0.45"></stop><stop offset="1" stop-opacity="0.88"></stop></linearGradient></defs><path></path><!><rect rx="2.5" fill="#fffdf8" opacity="0.94"></rect><rect height="2.4" rx="1.2"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><rect height="1.8" rx="0.9" opacity="0.5"></rect><path stroke="#fff" stroke-opacity="0.22" stroke-width="2.2" stroke-linecap="round" fill="none"></path></svg>');const Bu={hash:"svelte-1duzdpv",code:".wr-WineBottle.svelte-1duzdpv {display:block;height:100%;width:auto;margin:0 auto;}"};function ps(e,t){xt(t,!0),Pt(e,Bu);const n=F(()=>Mu(t.type)),r=F(()=>Au[o(n)]),i=F(()=>Du[o(r).shoulder]),a=`wr-bottle-${Math.random().toString(36).slice(2,8)}`;var l=zu(),c=b(l),s=b(c),f=b(s),h=T(f),m=T(h),w=T(c),p=T(w);{var _=R=>{var A=Nu(),E=Ue(A),D=T(E),K=T(D,4);Nt(K,21,()=>Ru,([Y,ne,le])=>`${Y}-${ne}`,(Y,ne)=>{var le=F(()=>Hs(o(ne),3));let ue=()=>o(le)[0],tt=()=>o(le)[1],Le=()=>o(le)[2];var we=Wu();M(()=>{W(we,"cx",ue()),W(we,"cy",tt()),W(we,"r",Le())}),S(Y,we)}),M(()=>{W(E,"fill",o(r).foil),W(D,"fill",o(r).foil)}),S(R,A)},y=R=>{var A=Lu(),E=Ue(A),D=T(E);M(()=>{W(E,"x",o(i).cap.x),W(E,"y",o(i).cap.y),W(E,"width",o(i).cap.w),W(E,"height",o(i).cap.h),W(E,"fill",o(r).foil),W(D,"x",o(i).cap.x),W(D,"y",o(i).cap.y+o(i).cap.h-3),W(D,"width",o(i).cap.w)}),S(R,A)};G(p,R=>{o(n)==="sparkling"?R(_):R(y,!1)})}var d=T(p),x=T(d),O=T(x),L=T(O),P=T(L);M(()=>{W(s,"id",a),W(f,"stop-color",o(r).glass),W(h,"stop-color",o(r).glass),W(m,"stop-color",o(r).glass),W(w,"d",o(i).body),W(w,"fill",`url(#${a})`),W(d,"x",o(i).label.x),W(d,"y",o(i).label.y),W(d,"width",o(i).label.w),W(d,"height",o(i).label.h),W(x,"x",o(i).label.x+o(i).label.w*.2),W(x,"y",o(i).label.y+8),W(x,"width",o(i).label.w*.6),W(x,"fill",o(r).accent),W(O,"x",o(i).label.x+o(i).label.w*.3),W(O,"y",o(i).label.y+14),W(O,"width",o(i).label.w*.4),W(O,"fill",o(r).accent),W(L,"x",o(i).label.x+o(i).label.w*.3),W(L,"y",o(i).label.y+19),W(L,"width",o(i).label.w*.4),W(L,"fill",o(r).accent),W(P,"d",o(i).shine)}),S(e,l),kt()}var Ou=N('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),qu=N('<div class="wr-WineTile-image wr-WineTile-bottle svelte-yk3emv"><!></div>'),ju=N('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Uu=N('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),Fu=N('<h3 class="wr-WineTile-title svelte-yk3emv"><a class="wr-WineTile-titleLink js-WineTileAction svelte-yk3emv"> </a></h3>'),Hu=N('<h3 class="wr-WineTile-title svelte-yk3emv"> </h3>'),Gu=N('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),Vu=N('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),Ku=N('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),Yu=N('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),Xu=N("<div><!> <!></div>"),Zu=N('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <!></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article>');const Qu={hash:"svelte-yk3emv",code:`.wr-WineTile.svelte-yk3emv {display:flex;flex-direction:column;align-items:center;text-align:center;box-sizing:border-box;padding:16px 8px;border-right:2px solid #f6f7fd;position:relative;transform:translateY(0);opacity:1;transition:transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
|
|
136
136
|
opacity 180ms cubic-bezier(0.22, 0.61, 0.36, 1);will-change:transform, opacity;}.wr-WineTile.svelte-yk3emv:last-child {border-right:none;}.wr-WineTile.ww-slide-up.svelte-yk3emv {transform:translateY(-28px);opacity:0;}.wr-WineTile-header.svelte-yk3emv {display:flex;flex-direction:column;align-items:center;justify-content:flex-start;}.wr-WineTile-image.svelte-yk3emv {height:200px;width:100%;max-width:100%;object-fit:contain;margin:0 auto 16px;display:block;}.wr-WineTile-bottle.svelte-yk3emv {padding:4px 0;box-sizing:border-box;}.wr-WineTile-title.svelte-yk3emv {font-size:15px;font-weight:500;margin:0 0 8px;min-height:3rem;line-height:1.2;text-align:center;color:#000;}.wr-WineTile-titleLink.svelte-yk3emv {color:inherit;text-decoration:none;}.wr-WineTile-titleLink.svelte-yk3emv:hover {text-decoration:underline;}.wr-WineTile-params.svelte-yk3emv {font-size:14px;color:#666;white-space:normal;text-align:center;}.wr-WineTile-footer.svelte-yk3emv {margin-top:auto;display:flex;align-items:center;gap:12px;justify-content:center;}.wr-WineTile-price.svelte-yk3emv {font-size:16px;font-weight:400;margin-bottom:8px;color:#333;}.wr-WineTile-glass.svelte-yk3emv {font-size:12px;font-weight:500;color:var(--wr-brand-color, #7b2beb);margin-bottom:8px;}.wr-WineTile-actions.svelte-yk3emv {margin:16px auto 0;display:flex;flex-direction:column;align-items:center;gap:8px;}
|
|
137
137
|
|
|
138
138
|
/* :global обязателен — класс уезжает внутрь <Action>, а скоуп Svelte
|
|
@@ -156,18 +156,32 @@
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
@media screen and (max-width: 768px) {.wr-WineTile.svelte-yk3emv {flex:0 0 auto;scroll-snap-align:center;width:240px;text-align:center;}
|
|
159
|
-
}`};function
|
|
159
|
+
}`};function Ju(e,t){xt(t,!0),Pt(e,Qu);const n=4;let r=F(()=>ce.getAppLanguage()),i=U(!1),a=Ve(t,"addedToCart",3,!1);const l=(I,j)=>I[j]||I[j.charAt(0).toUpperCase()+j.slice(1)],c=(I,j)=>j.map(J=>l(I,J)).filter(Boolean).join(" • ");function s(I){var j;return ss(I,((j=ce.getCurrency)==null?void 0:j.call(ce))||"USD",o(r))}function f(I){return t.selectedWineId===I}function h(I){return!!(I.reason||I.shortDescription||I.tags)}function m(I,j){let J=(I==null?void 0:I.tags)||j.tags;return J?(Array.isArray(J)&&(J=J.join(",")),typeof J!="string"?[]:J.split(",").map(ae=>ae.trim()).filter(Boolean)):[]}let w=U(!1),p=F(()=>!!t.onAddToCart&&!!Ua(t.wine)),_=U(!1);async function y(){var I;if(!(o(_)||a())){g(_,!0);try{await((I=t.onAddToCart)==null?void 0:I.call(t,t.wine,t.index))}finally{g(_,!1)}}}ei(()=>{const I=()=>{g(w,window.innerWidth<=768)};return I(),window.addEventListener("resize",I),()=>{window.removeEventListener("resize",I)}});var d=Zu(),x=b(d),O=b(x);{var L=I=>{var j=Ou();M(()=>{W(j,"src",t.wine.image),W(j,"alt",t.wine.title),W(j,"loading",t.index<n?"eager":"lazy"),W(j,"fetchpriority",t.index<n?"high":"auto")}),pt("error",j,()=>g(i,!0)),S(I,j)},P=F(()=>fs(t.wine.image)&&!o(i)),R=I=>{var j=qu(),J=b(j);ps(J,{get type(){return t.wine.type}}),S(I,j)};G(O,I=>{o(P)?I(L):I(R,!1)})}var A=T(O,2);{var E=I=>{var j=ju(),J=b(j);M(ae=>q(J,ae),[()=>s(t.wine.total)]),S(I,j)};G(A,I=>{t.wine.total&&I(E)})}var D=T(A,2);{var K=I=>{var j=Uu(),J=b(j);M((ae,_e)=>q(J,`${ae??""}${_e??""}`),[()=>fe({key:"byTheGlass",lang:o(r)}),()=>t.wine.glassPrice?` — ${s(t.wine.glassPrice)}`:""]),S(I,j)};G(D,I=>{t.wine.byTheGlass&&I(K)})}var Y=T(D,2);{var ne=I=>{var j=Fu(),J=b(j),ae=b(J);M(()=>{W(J,"href",t.wine.url),q(ae,t.wine.title)}),S(I,j)},le=I=>{var j=Hu(),J=b(j);M(()=>q(J,t.wine.title)),S(I,j)};G(Y,I=>{o(p)&&t.wine.url?I(ne):I(le,!1)})}var ue=T(x,2);{var tt=I=>{var j=Gu(),J=b(j);M(ae=>q(J,ae),[()=>c(t.wine,["type","country","region","grape"])]),S(I,j)},Le=F(()=>c(t.wine,["type","country","region","grape"]));G(ue,I=>{o(Le)&&I(tt)})}var we=T(ue,2),nt=b(we),Rt=b(nt);{var ze=I=>{{let j=F(()=>a()?"outlined":"primary");un(I,{handleClick:y,get variant(){return o(j)},className:"wr-WineTile-action wr-WineTile-action--cart js-WineTileAction",children:(J,ae)=>{var _e=Jt();M(Be=>q(_e,Be),[()=>fe({key:a()?"addedToCart":"addToCart",lang:o(r)})]),S(J,_e)},$$slots:{default:!0}})}},rt=I=>{un(I,{get href(){return t.wine.url},handleClick:()=>t.onBuyLinkClick(t.wine,t.index),className:"wr-WineTile-action wr-WineTile-action--link js-WineTileAction",target:"_blank",variant:"outlined",children:(j,J)=>{var ae=Jt();M(_e=>q(ae,_e),[()=>fe({key:"wineDetails.buy",lang:o(r)})]),S(j,ae)},$$slots:{default:!0}})},hn=I=>{un(I,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(j,J)=>{var ae=Jt();M(_e=>q(ae,_e),[()=>fe({key:"moreInfo",lang:o(r)})]),S(j,ae)},$$slots:{default:!0}})};G(Rt,I=>{o(p)?I(ze):t.wine.url?I(rt,1):I(hn,!1)})}var it=T(Rt,2);{var fr=I=>{un(I,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(j,J)=>{var ae=Jt();M(_e=>q(ae,_e),[()=>fe({key:"similarWines",lang:o(r)})]),S(j,ae)},$$slots:{default:!0}})};G(it,I=>{t.onSimilarClick&&I(fr)})}var Pe=T(we,2);{var pr=I=>{{let j=F(()=>{var Be;return((Be=t.translatedPopup)==null?void 0:Be.shortDescription)||t.wine.shortDescription}),J=F(()=>{var Be;return((Be=t.translatedPopup)==null?void 0:Be.reason)||t.wine.reason}),ae=F(()=>{var Be;return((Be=t.translatedPopup)==null?void 0:Be.pairingRecommendation)||t.wine.pairingRecommendation}),_e=F(()=>m(t.translatedPopup,t.wine));Iu(I,{get title(){return t.wine.title},get shortDescription(){return o(j)},get reason(){return o(J)},get pairing(){return o(ae)},get tags(){return o(_e)},get onClose(){return t.onPopupClose},isMobile:!1})}},wt=F(()=>f(t.wine.id)&&!o(w));G(Pe,I=>{o(wt)&&I(pr)})}var zr=T(Pe,2);{var jt=I=>{var j=Xu(),J=b(j);{var ae=ot=>{var Oe=Vu(),Ye=b(Oe);M(()=>{var gn,tn;return q(Ye,((gn=t.translatedPopup)==null?void 0:gn.reason)||((tn=t.translatedPopup)==null?void 0:tn.shortDescription)||t.wine.reason||t.wine.shortDescription)}),S(ot,Oe)};G(J,ot=>{var Oe,Ye;((Oe=t.translatedPopup)!=null&&Oe.reason||(Ye=t.translatedPopup)!=null&&Ye.shortDescription||t.wine.reason||t.wine.shortDescription)&&ot(ae)})}var _e=T(J,2);{var Be=ot=>{var Oe=Yu();Nt(Oe,21,()=>m(t.translatedPopup,t.wine),Rn,(Ye,gn)=>{var tn=Ku(),Br=b(tn);M(()=>q(Br,o(gn))),S(Ye,tn)}),S(ot,Oe)};G(_e,ot=>{var Oe,Ye;((Oe=t.translatedPopup)!=null&&Oe.tags||(Ye=t.translatedPopup)!=null&&Ye.Tags||t.wine.tags)&&ot(Be)})}M(()=>Ge(j,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),S(I,j)},Bn=F(()=>h(t.wine));G(zr,I=>{o(Bn)&&I(jt)})}M(()=>Ge(d,1,`wr-WineTile ${t.isAnimating?"ww-slide-up":""}`,"svelte-yk3emv")),pt("mouseenter",d,()=>t.onTileEnter(t.wine)),pt("mouseleave",d,()=>t.onTileLeave(t.wine)),ke("click",d,I=>t.onTileClick(I,t.wine)),S(e,d),kt()}Er(["click"]);var $u=N('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),ed=N('<div class="wr-Consent svelte-dqnzo8" role="region" aria-label="Cookies"><p class="wr-Consent-text svelte-dqnzo8"> <!></p> <div class="wr-Consent-actions svelte-dqnzo8"><!> <!></div></div>');const td={hash:"svelte-dqnzo8",code:`.wr-Consent.svelte-dqnzo8 {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 0;padding:12px 16px;border-radius:12px;background:#f6f4f2;font-size:13px;line-height:1.4;color:#333;}.wr-Consent-text.svelte-dqnzo8 {margin:0;flex:1;}.wr-Consent-link.svelte-dqnzo8 {color:inherit;text-decoration:underline;margin-left:4px;}.wr-Consent-actions.svelte-dqnzo8 {display:flex;gap:8px;flex-shrink:0;}
|
|
160
160
|
@media (max-width: 640px) {.wr-Consent.svelte-dqnzo8 {flex-direction:column;align-items:stretch;}.wr-Consent-actions.svelte-dqnzo8 {justify-content:flex-end;}
|
|
161
|
-
}`};function
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
}`};function nd(e,t){var w;xt(t,!0),Pt(e,td);const n=(w=window==null?void 0:window.wineaterData)==null?void 0:w.PRIVACY_URL,r=p=>fe({key:p,lang:t.lang});var i=ed(),a=b(i),l=b(a),c=T(l);{var s=p=>{var _=$u(),y=b(_);M(d=>{W(_,"href",n),q(y,d)},[()=>r("consentPrivacy")]),S(p,_)};G(c,p=>{n&&p(s)})}var f=T(a,2),h=b(f);un(h,{variant:"outlined",handleClick:()=>ja("denied"),children:(p,_)=>{var y=Jt();M(d=>q(y,d),[()=>r("consentDecline")]),S(p,y)},$$slots:{default:!0}});var m=T(h,2);un(m,{variant:"primary",handleClick:()=>ja("granted"),children:(p,_)=>{var y=Jt();M(d=>q(y,d),[()=>r("consentAccept")]),S(p,y)},$$slots:{default:!0}}),M(p=>q(l,`${p??""} `),[()=>r("consentText")]),S(e,i),kt()}const rd=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function lo(e,t,n=!1){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}function id(){document.querySelector('link[rel="preconnect"][href="https://fonts.googleapis.com"]')||(lo("preconnect","https://fonts.googleapis.com"),lo("preconnect","https://fonts.gstatic.com",!0))}function od(e){if(!e)return"";const t="custom-ui-config-style";if(document.getElementById(t))return;const n=e.replace(rd,(i,a)=>(lo("stylesheet",a),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}const vs="_wineater_session";function ad(e,t){fetch(`${e}cart/update.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({attributes:{[vs]:t}}),keepalive:!0}).catch(()=>{})}function sd(){return["cart-drawer","cart-icon-bubble","cart-notification-product","cart-notification-button","cart-live-region-text"].filter(t=>t==="cart-drawer"||t==="cart-icon-bubble"||document.getElementById(t))}function ld(e){var i;const t=document.querySelector("cart-drawer");if(t&&typeof t.renderContents=="function"){t.classList.remove("is-empty"),t.renderContents(e);return}const n=document.querySelector("cart-notification");if(n&&typeof n.renderContents=="function"){n.renderContents(e);return}const r=document.getElementById("cart-icon-bubble");if(r&&((i=e==null?void 0:e.sections)!=null&&i["cart-icon-bubble"])){const a=new DOMParser().parseFromString(e.sections["cart-icon-bubble"],"text/html");r.innerHTML=(a.querySelector(".shopify-section")||a.body).innerHTML}document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}async function cd(e){var r,i,a;const t=(r=window.Shopify)==null?void 0:r.actions;if(!t||typeof t.updateCart!="function")return!1;const n=await t.updateCart({lines:[{merchandiseId:`gid://shopify/ProductVariant/${e}`,quantity:1}]});if((i=n==null?void 0:n.userErrors)!=null&&i.length)throw new Error(((a=n.userErrors[0])==null?void 0:a.message)||"cart rejected the line");if(typeof t.openCart=="function")try{await t.openCart()}catch{}return!0}async function ud(e,t){const n=await fetch(`${t}cart/add.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({items:[{id:Number(e),quantity:1}],sections:sd(),sections_url:window.location.pathname})});return n.ok?(ld(await n.json().catch(()=>null)),!0):!1}function dd(){const e=document.querySelector("cart-drawer, cart-notification");return!!e&&typeof e.renderContents=="function"}async function fd(e,t){const n=[["actions",()=>cd(e)],["ajax",()=>ud(e,t.root)]];dd()&&n.reverse();for(const[r,i]of n)try{if(await i())return ad(t.root,t.sessionId),{ok:!0,via:r}}catch(a){console.debug(`[wineater] cart ${r} failed:`,a==null?void 0:a.message)}return window.location.href=`${t.root}cart/${e}:1?storefront=true&attributes[${vs}]=${encodeURIComponent(t.sessionId)}`,{ok:!1,via:"permalink"}}let hs=0,Mn=null;function pd(){if(typeof document>"u")return()=>{};if(hs++===0){const{documentElement:t,body:n}=document;Mn={scrollY:window.scrollY,html:t.style.cssText,body:n.style.cssText},t.style.overflow="hidden",Object.assign(n.style,{position:"fixed",top:`-${Mn.scrollY}px`,left:"0",right:"0",width:"100%",overflow:"hidden"})}let e=!1;return()=>{e||(e=!0,!(--hs>0||!Mn)&&(document.documentElement.style.cssText=Mn.html,document.body.style.cssText=Mn.body,window.scrollTo(0,Mn.scrollY),Mn=null))}}function co(e){return document.body.appendChild(e),{destroy:()=>e.remove()}}const uo=4,vd=15,hd=4,li={type:3,grape:2,region:2,priceLevel:1},gs=e=>(e??"").trim().toLowerCase(),ci=(e,t)=>{const n=gs(e);return n!==""&&n===gs(t)};function ws(e,t){return(ci(e.type,t.type)?li.type:0)+(ci(e.grape,t.grape)?li.grape:0)+(ci(e.region,t.region)?li.region:0)+(ci(e.priceLevel,t.priceLevel)?li.priceLevel:0)}const gd=(e,t,n)=>t.reduce((r,i)=>r+ws(e,i),0)-n.reduce((r,i)=>r+ws(e,i),0);function wd(e,t,n){return e.map(r=>({c:r,s:gd(r,t,n)})).sort((r,i)=>i.s-r.s||r.c.rank-i.c.rank).map(r=>r.c)}function md(e){return{queue:[...e],liked:[],disliked:[],swiped:0,previous:null,canUndo:!1}}function _d(e,t){const[n,...r]=e.queue;if(!n)return e;const i=t==="like"?[...e.liked,n]:e.liked,a=t==="dislike"?[...e.disliked,n]:e.disliked,l={...e,previous:null,canUndo:!1};return{queue:wd(r,i,a),liked:i,disliked:a,swiped:e.swiped+1,previous:l,canUndo:!0}}function bd(e){return e.previous??e}function yd(e){return e.liked.length>=uo?"likes":e.swiped>=vd?"limit":e.queue.length===0?"empty":null}function xd(e,t){const n=new Set([...t,...e.disliked.map(i=>i.id)]),r=[];for(const i of[...e.liked,...e.queue]){if(r.length>=hd)break;n.has(i.id)||(n.add(i.id),r.push(i))}return r}const ms=e=>{var t=Sd();S(e,t)},fo=e=>{var t=Cd();S(e,t)},kd=e=>{var t=Ed();S(e,t)};var Sd=Tt('<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 20.5s-7.5-4.6-9.3-9.2C1.4 8 3.4 4.5 7 4.5c2 0 3.6 1.1 5 2.9 1.4-1.8 3-2.9 5-2.9 3.6 0 5.6 3.5 4.3 6.8-1.8 4.6-9.3 9.2-9.3 9.2z" fill="currentColor"></path></svg>'),Cd=Tt('<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6L6 18" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" fill="none"></path></svg>'),Ed=Tt('<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 7H5V3M5.6 7.2A8 8 0 1 1 4 13" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none"></path></svg>'),Td=N('<img class="wr-Swipe-image svelte-1m6pw5v" alt="" draggable="false" decoding="async"/>'),Pd=N('<div class="wr-Swipe-bottle svelte-1m6pw5v"><!></div>'),Id=N('<p class="wr-Swipe-price svelte-1m6pw5v"> </p>'),Ad=N('<p class="wr-Swipe-params svelte-1m6pw5v"> </p>'),Dd=N('<span class="wr-Swipe-stamp wr-Swipe-stamp--like svelte-1m6pw5v" aria-hidden="true"><!></span> <span class="wr-Swipe-stamp wr-Swipe-stamp--nope svelte-1m6pw5v" aria-hidden="true"><!></span>',1),Rd=N('<div class="wr-Swipe-art svelte-1m6pw5v"><!></div> <div class="wr-Swipe-plate svelte-1m6pw5v"><!> <p class="wr-Swipe-title svelte-1m6pw5v"> </p> <!></div> <!>',1),Md=N('<div class="wr-Swipe-card wr-Swipe-card--next svelte-1m6pw5v" aria-hidden="true"><!></div>'),Wd=N('<span class="wr-Swipe-panelPrice svelte-1m6pw5v"> </span>'),Nd=N('<span class="wr-Swipe-glass svelte-1m6pw5v"> </span>'),Ld=N('<p class="wr-Swipe-origin svelte-1m6pw5v"> </p>'),zd=N('<p class="wr-Swipe-desc svelte-1m6pw5v"> </p>'),Bd=N('<li class="svelte-1m6pw5v"> </li>'),Od=N('<ul class="wr-Swipe-tags svelte-1m6pw5v"></ul>'),qd=N('<a class="wr-Swipe-buy svelte-1m6pw5v" target="_blank" rel="noopener"> </a>'),jd=N('<article tabindex="0" aria-roledescription="card" aria-describedby="wr-Swipe-hint"><!> <div><div class="wr-Swipe-handle svelte-1m6pw5v" role="presentation"></div> <div class="wr-Swipe-panelBody svelte-1m6pw5v"><p class="wr-Swipe-panelTitle svelte-1m6pw5v"> </p> <div class="wr-Swipe-panelHead svelte-1m6pw5v"><!> <!></div> <!> <!> <!> <!></div></div></article>'),Ud=N("<i></i>"),Fd=N('<div class="wr-Swipe svelte-1m6pw5v" role="dialog" aria-modal="true" aria-labelledby="wr-Swipe-query"><p id="wr-Swipe-hint" class="wr-Swipe-sr svelte-1m6pw5v"> </p> <header class="wr-Swipe-head svelte-1m6pw5v"><div class="wr-Swipe-headText svelte-1m6pw5v"><p class="wr-Swipe-kicker svelte-1m6pw5v"> </p> <h2 id="wr-Swipe-query" class="wr-Swipe-query svelte-1m6pw5v"> </h2></div> <button type="button" class="wr-Swipe-close svelte-1m6pw5v"><!></button></header> <div class="wr-Swipe-stage svelte-1m6pw5v"><!> <!></div> <div class="wr-Swipe-controls svelte-1m6pw5v"><button type="button" class="wr-Swipe-btn wr-Swipe-btn--undo svelte-1m6pw5v"><!></button> <button type="button" class="wr-Swipe-btn wr-Swipe-btn--nope svelte-1m6pw5v"><!></button> <button type="button" class="wr-Swipe-btn wr-Swipe-btn--like svelte-1m6pw5v"><!></button></div> <div class="wr-Swipe-footer svelte-1m6pw5v"><span class="wr-Swipe-progress svelte-1m6pw5v" aria-live="polite"><span class="wr-Swipe-pips svelte-1m6pw5v" aria-hidden="true"></span> </span> <button type="button" class="wr-Swipe-done svelte-1m6pw5v"> </button></div></div>');const Hd={hash:"svelte-1m6pw5v",code:`
|
|
162
|
+
/* Palette: the brand colour from the widget variables, everything else mixed from it. */.wr-Swipe.svelte-1m6pw5v {--sw-brand: var(--wr-brand-color, #7b2beb);--sw-ink: color-mix(in srgb, var(--sw-brand) 14%, #14121a);--sw-muted: color-mix(in srgb, var(--sw-brand) 18%, #6b6870);--sw-soft: color-mix(in srgb, var(--sw-brand) 7%, #fff);--sw-line: color-mix(in srgb, var(--sw-brand) 16%, #fff);--sw-tint: color-mix(in srgb, var(--sw-brand) 10%, #fff);--sw-tint-deep: color-mix(in srgb, var(--sw-brand) 22%, #fff);--sw-plate: color-mix(in srgb, var(--sw-ink) 88%, transparent);position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;height:100vh;height:100dvh;padding:max(10px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));background:#fff;color:var(--sw-ink);font-family:var(--wineater-font-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);text-align:left;overscroll-behavior:contain;-webkit-tap-highlight-color:transparent;}
|
|
163
|
+
|
|
164
|
+
/* Host pages style bare elements (e.g. \`h1…h6 { color }\` on wineater.com): our elements set their own. */.wr-Swipe.svelte-1m6pw5v h2:where(.svelte-1m6pw5v),
|
|
165
|
+
.wr-Swipe.svelte-1m6pw5v p:where(.svelte-1m6pw5v),
|
|
166
|
+
.wr-Swipe.svelte-1m6pw5v ul:where(.svelte-1m6pw5v),
|
|
167
|
+
.wr-Swipe.svelte-1m6pw5v li:where(.svelte-1m6pw5v),
|
|
168
|
+
.wr-Swipe.svelte-1m6pw5v a:where(.svelte-1m6pw5v),
|
|
169
|
+
.wr-Swipe.svelte-1m6pw5v button:where(.svelte-1m6pw5v) {margin:0;font-family:inherit;letter-spacing:normal;text-transform:none;text-wrap:wrap;}.wr-Swipe-sr.svelte-1m6pw5v {position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}.wr-Swipe-head.svelte-1m6pw5v {display:flex;align-items:flex-start;gap:12px;padding:4px 2px 12px;}.wr-Swipe-headText.svelte-1m6pw5v {flex:1;min-width:0;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-kicker:where(.svelte-1m6pw5v) {font-size:13px;line-height:1.3;color:var(--sw-muted);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-query:where(.svelte-1m6pw5v) {margin-top:2px;font-size:20px;font-weight:650;line-height:1.25;color:var(--sw-ink);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-close:where(.svelte-1m6pw5v) {flex:none;display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:var(--sw-soft);color:var(--sw-ink);cursor:pointer;}.wr-Swipe-close.svelte-1m6pw5v svg {width:20px;height:20px;}.wr-Swipe-stage.svelte-1m6pw5v {position:relative;flex:1;min-height:0;}.wr-Swipe-card.svelte-1m6pw5v {position:absolute;inset:0;border-radius:22px;overflow:hidden;background:#fff;box-shadow:0 1px 2px color-mix(in srgb, var(--sw-ink) 10%, transparent),
|
|
170
|
+
0 12px 32px -12px color-mix(in srgb, var(--sw-ink) 40%, transparent);user-select:none;-webkit-user-select:none;transition:transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);}.wr-Swipe-card--next.svelte-1m6pw5v {pointer-events:none;}.wr-Swipe-card--top.svelte-1m6pw5v {touch-action:none;cursor:grab;will-change:transform;}.wr-Swipe-card--top.is-dragging.svelte-1m6pw5v {transition:none;cursor:grabbing;}.wr-Swipe-card--top.is-flying.svelte-1m6pw5v {transition:transform 0.26s ease-in;}.wr-Swipe-card--top.svelte-1m6pw5v:focus-visible {outline:3px solid var(--sw-brand);outline-offset:3px;}.wr-Swipe-art.svelte-1m6pw5v {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:22px 22px 128px;background:radial-gradient(120% 75% at 50% 38%, var(--sw-tint) 0%, var(--sw-tint) 35%, var(--sw-tint-deep) 100%);}.wr-Swipe-image.svelte-1m6pw5v {max-width:100%;max-height:100%;object-fit:contain;mix-blend-mode:multiply; /* white photo backgrounds melt into the tint */pointer-events:none;}.wr-Swipe-bottle.svelte-1m6pw5v {height:82%;}.wr-Swipe-plate.svelte-1m6pw5v {position:absolute;left:0;right:0;bottom:0;padding:64px 20px 18px;color:#fff;background:linear-gradient(
|
|
171
|
+
to top,
|
|
172
|
+
var(--sw-plate) 0%,
|
|
173
|
+
color-mix(in srgb, var(--sw-ink) 62%, transparent) 55%,
|
|
174
|
+
transparent 100%
|
|
175
|
+
);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-price:where(.svelte-1m6pw5v) {font-size:30px;font-weight:700;line-height:1;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;color:#fff;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-title:where(.svelte-1m6pw5v) {margin-top:8px;font-size:19px;font-weight:600;line-height:1.2;color:#fff;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-params:where(.svelte-1m6pw5v) {margin-top:6px;font-size:13px;line-height:1.3;color:rgba(255, 255, 255, 0.86);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.wr-Swipe-stamp.svelte-1m6pw5v {position:absolute;top:26px;display:grid;place-items:center;width:72px;height:72px;border-radius:50%;border:4px solid currentColor;background:rgba(255, 255, 255, 0.88);pointer-events:none;}.wr-Swipe-stamp.svelte-1m6pw5v svg {width:34px;height:34px;}.wr-Swipe-stamp--like.svelte-1m6pw5v {left:22px;color:var(--sw-brand);transform:rotate(-14deg);}.wr-Swipe-stamp--nope.svelte-1m6pw5v {right:22px;color:var(--sw-muted);transform:rotate(14deg);}
|
|
176
|
+
|
|
177
|
+
/* info panel: slides up inside the card */.wr-Swipe-panel.svelte-1m6pw5v {position:absolute;left:0;right:0;bottom:0;max-height:64%;background:#fff;color:var(--sw-ink);border-radius:20px 20px 0 0;box-shadow:0 -8px 24px -12px color-mix(in srgb, var(--sw-ink) 45%, transparent);transform:translateY(102%);transition:transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);display:flex;flex-direction:column;}.wr-Swipe-panel.is-open.svelte-1m6pw5v {transform:translateY(0);}.wr-Swipe-handle.svelte-1m6pw5v {flex:none;height:22px;touch-action:none;cursor:grab;position:relative;}.wr-Swipe-handle.svelte-1m6pw5v::after {content:'';position:absolute;top:9px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:var(--sw-line);}.wr-Swipe-panelBody.svelte-1m6pw5v {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 20px 18px;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-panelTitle:where(.svelte-1m6pw5v) {margin-bottom:6px;font-size:15px;font-weight:600;line-height:1.3;color:var(--sw-ink);}.wr-Swipe-panelHead.svelte-1m6pw5v {display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;}.wr-Swipe-panelPrice.svelte-1m6pw5v {font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--sw-ink);}.wr-Swipe-glass.svelte-1m6pw5v {font-size:13px;color:var(--sw-muted);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-origin:where(.svelte-1m6pw5v) {margin-top:4px;font-size:13px;color:var(--sw-muted);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-desc:where(.svelte-1m6pw5v) {margin-top:10px;font-size:14px;line-height:1.5;color:var(--sw-ink);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-tags:where(.svelte-1m6pw5v) {display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;padding:0;list-style:none;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-tags:where(.svelte-1m6pw5v) li:where(.svelte-1m6pw5v) {padding:4px 10px;border-radius:999px;font-size:12px;color:var(--sw-ink);background:var(--sw-soft);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-buy:where(.svelte-1m6pw5v) {display:block;margin-top:14px;padding:11px 16px;border-radius:999px;text-align:center;text-decoration:none;font-weight:600;font-size:14px;color:var(--sw-brand);border:1.5px solid var(--sw-brand);}.wr-Swipe-controls.svelte-1m6pw5v {display:flex;align-items:center;justify-content:center;gap:22px;margin-top:16px;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-btn:where(.svelte-1m6pw5v) {display:grid;place-items:center;border-radius:50%;border:0;padding:0;cursor:pointer;line-height:1;transition:transform 0.12s ease;}.wr-Swipe-btn.svelte-1m6pw5v:active:not(:disabled) {transform:scale(0.92);}.wr-Swipe-btn.svelte-1m6pw5v:focus-visible,
|
|
178
|
+
.wr-Swipe-close.svelte-1m6pw5v:focus-visible,
|
|
179
|
+
.wr-Swipe-done.svelte-1m6pw5v:focus-visible {outline:3px solid var(--sw-brand);outline-offset:2px;}.wr-Swipe-btn.svelte-1m6pw5v:disabled {opacity:0.35;cursor:default;}.wr-Swipe-btn.svelte-1m6pw5v svg {width:46%;height:46%;}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-btn--undo:where(.svelte-1m6pw5v) {width:44px;height:44px;color:var(--sw-muted);background:var(--sw-soft);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-btn--nope:where(.svelte-1m6pw5v) {width:60px;height:60px;color:var(--sw-ink);background:#fff;box-shadow:inset 0 0 0 2px var(--sw-line);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-btn--like:where(.svelte-1m6pw5v) {width:60px;height:60px;color:#fff;background:var(--sw-brand);box-shadow:0 6px 16px -6px var(--sw-brand);}.wr-Swipe-footer.svelte-1m6pw5v {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 2px 0;font-size:13px;color:var(--sw-muted);}.wr-Swipe-progress.svelte-1m6pw5v {display:inline-flex;align-items:center;gap:8px;}.wr-Swipe-pips.svelte-1m6pw5v {display:inline-flex;gap:4px;}.wr-Swipe-pips.svelte-1m6pw5v i:where(.svelte-1m6pw5v) {width:8px;height:8px;border-radius:50%;background:var(--sw-line);}.wr-Swipe-pips.svelte-1m6pw5v i.is-on:where(.svelte-1m6pw5v) {background:var(--sw-brand);}.wr-Swipe.svelte-1m6pw5v .wr-Swipe-done:where(.svelte-1m6pw5v) {padding:6px 0;border:0;background:none;font-size:13px;font-weight:600;color:var(--sw-brand);text-decoration:underline;text-underline-offset:3px;cursor:pointer;}
|
|
166
180
|
|
|
167
181
|
@media (prefers-reduced-motion: reduce) {.wr-Swipe-card.svelte-1m6pw5v,
|
|
168
182
|
.wr-Swipe-card--top.is-flying.svelte-1m6pw5v,
|
|
169
183
|
.wr-Swipe-panel.svelte-1m6pw5v {transition:none;}
|
|
170
|
-
}`};function
|
|
184
|
+
}`};function Gd(e,t){xt(t,!0),Pt(e,Hd);const n=(C,u=ki,k=ki)=>{var z=Rd(),B=Ue(z),ge=b(B);{var Ie=de=>{var H=Td();M(()=>W(H,"src",u().image)),pt("error",H,()=>g(J,{...o(J),[u().id]:!0},!0)),S(de,H)},qe=F(()=>fs(u().image)&&!o(J)[u().id]),Ut=de=>{var H=Pd(),ve=b(H);ps(ve,{get type(){return u().type}}),S(de,H)};G(ge,de=>{o(qe)?de(Ie):de(Ut,!1)})}var Mt=T(B,2),at=b(Mt);{var gr=de=>{var H=Id(),ve=b(H);M(Ne=>q(ve,Ne),[()=>l(u().total)]),S(de,H)};G(at,de=>{u().total!=null&&de(gr)})}var pe=T(at,2),Xe=b(pe),mt=T(pe,2);{var qn=de=>{var H=Ad(),ve=b(H);M(Ne=>q(ve,Ne),[()=>c(u())]),S(de,H)},jr=F(()=>c(u()));G(mt,de=>{o(jr)&&de(qn)})}var Ur=T(Mt,2);{var Fr=de=>{var H=Dd(),ve=Ue(H);let Ne;var Ft=b(ve);ms(Ft);var jn=T(ve,2);let wr;var Hr=b(jn);fo(Hr),M((Q,re)=>{Ne=ti(ve,"",Ne,Q),wr=ti(jn,"",wr,re)},[()=>({opacity:Math.max(0,o(ue))}),()=>({opacity:Math.max(0,-o(ue))})]),S(de,H)};G(Ur,de=>{k()&&de(Fr)})}M(de=>q(Xe,de),[()=>s(u())]),S(C,z)},r=F(()=>ce.getAppLanguage()),i=F(()=>ce.getStoreId()),a=C=>fe({key:C,lang:o(r)}),l=C=>{var u;return C==null?"":ss(C,((u=ce.getCurrency)==null?void 0:u.call(ce))||"USD",o(r))},c=C=>[C.type,C.country,C.region,C.grape].filter(Boolean).join(" • "),s=C=>C.vintage&&!String(C.title).includes(String(C.vintage))?`${C.title} ${C.vintage}`:C.title,f=F(()=>t.query.replace(/;\s*$/,""));let h=U(We(md(t.cards))),m=!1,w=[];const p=F(()=>o(h).queue[0]??null),_=F(()=>o(h).queue[1]??null),y=F(()=>o(h).liked.length),d=10,x=.3,O=.5;let L=U(0),P=U(!1),R=U(null),A=U(!1),E=U(null),D=U(null),K=U(320),Y=!1,ne=null,le=!1;const ue=F(()=>Math.max(-1,Math.min(1,o(L)/(o(K)*x)))),tt=F(()=>o(ue)*12);ei(()=>{var k,z;Y=((k=window.matchMedia)==null?void 0:k.call(window,"(prefers-reduced-motion: reduce)").matches)??!1,Se(ye.SWIPE_MODE_OPENED,o(i),{query:t.query,cards:t.cards.length});const C=pd(),u=B=>{B.key==="Escape"&&Rt()};return window.addEventListener("keydown",u),(z=o(D))==null||z.focus({preventScroll:!0}),()=>{window.removeEventListener("keydown",u),C()}});let Le=null;sn(()=>{!o(p)||o(p).id===Le||(Le=o(p).id,It({type:"shown",query_id:t.queryId??void 0,sku_ids:[o(p).id],position:o(h).swiped}))});function we(C){Se(ye.SWIPE_MODE_FINISHED,o(i),{likes:o(h).liked.length,swiped:o(h).swiped,reason:C,query:t.query})}function nt(C){m||(m=!0,we(C),t.onFinish(xd(o(h),t.shownIds),w,C))}function Rt(){m||(m=!0,we("closed"),t.onClose())}function ze(C){const u=o(p);if(!u||m)return;const k=o(h).swiped;It({type:C,query_id:t.queryId??void 0,sku_ids:[u.id],position:k}),Se(C==="like"?ye.WINE_LIKED:ye.WINE_DISLIKED,o(i),{wine_id:u.id,wine_title:u.title,position:k,query:t.query}),w=[...w,u.id],g(h,_d(o(h),C),!0),g(L,0),g(R,null),g(A,!1);const z=yd(o(h));z&&nt(z)}function rt(C){if(!(!o(p)||o(R)||m)){if(Y)return ze(C);g(R,C,!0),g(L,(C==="like"?1:-1)*o(K)*1.6),setTimeout(()=>ze(C),260)}}function hn(){!o(h).canUndo||o(R)||(w=w.slice(0,-1),g(h,bd(o(h)),!0),g(A,!1))}function it(){g(A,!o(A)),o(A)&&o(p)&&(It({type:"click",query_id:t.queryId??void 0,sku_ids:[o(p).id],position:o(h).swiped}),Se(ye.WINE_DETAILS_VIEWED,o(i),{wine_id:o(p).id,wine_title:o(p).title,is_mobile:!0,source:"swipe"}))}function fr(C){var u;o(R)||m||C.target.closest("a, button")||(ne={x:C.clientX,y:C.clientY,t:C.timeStamp,id:C.pointerId},le=!1,g(K,((u=o(E))==null?void 0:u.offsetWidth)||o(K),!0))}function Pe(C){var z,B;if(!ne||C.pointerId!==ne.id)return;const u=C.clientX-ne.x,k=C.clientY-ne.y;if(!le){if(Math.abs(u)<d&&Math.abs(k)<d)return;le=!0,(B=(z=o(E))==null?void 0:z.setPointerCapture)==null||B.call(z,C.pointerId),g(P,!0)}g(L,u)}function pr(C){if(!ne||C.pointerId!==ne.id)return;const u=le,k=Math.abs(o(L))/Math.max(1,C.timeStamp-ne.t);if(ne=null,le=!1,g(P,!1),!u){it();return}Math.abs(o(L))>o(K)*x||k>O&&Math.abs(o(L))>30?rt(o(L)>0?"like":"dislike"):g(L,0)}function wt(){ne=null,le=!1,g(P,!1),g(L,0)}function zr(C){C.key==="ArrowRight"?(C.preventDefault(),rt("like")):C.key==="ArrowLeft"?(C.preventDefault(),rt("dislike")):(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),it())}let jt=null;function Bn(C){var u,k;C.stopPropagation(),jt=C.clientY,(k=(u=C.currentTarget).setPointerCapture)==null||k.call(u,C.pointerId)}function I(C){C.stopPropagation(),jt!==null&&C.clientY-jt>-6&&g(A,!1),jt=null}function j(C){It({type:"buy_click",query_id:t.queryId??void 0,sku_ids:[C.id],position:o(h).swiped}),Se(ye.BUY_BUTTON_CLICKED,o(i),{wine_id:C.id,wine_title:C.title,wine_url:C.url,is_mobile:!0,source:"swipe"})}let J=U(We({}));var ae=Fd(),_e=b(ae),Be=b(_e),ot=T(_e,2),Oe=b(ot),Ye=b(Oe),gn=b(Ye),tn=T(Ye,2),Br=b(tn),vr=T(Oe,2),go=b(vr);fo(go),Yi(vr,C=>g(D,C),()=>o(D));var fi=T(ot,2),pi=b(fi);{var wo=C=>{var u=Jn(),k=Ue(u);Ta(k,()=>o(_).id,z=>{var B=Md();let ge;var Ie=b(B);n(Ie,()=>o(_),()=>!1),M(qe=>ge=ti(B,"",ge,qe),[()=>({transform:`translateY(${10-10*Math.abs(o(ue))}px) scale(${.94+.06*Math.abs(o(ue))})`})]),S(z,B)}),S(C,u)};G(pi,C=>{o(_)&&C(wo)})}var mo=T(pi,2);{var _o=C=>{var u=Jn(),k=Ue(u);Ta(k,()=>o(p).id,z=>{var B=jd();let ge,Ie;var qe=b(B);n(qe,()=>o(p),()=>!0);var Ut=T(qe,2);let Mt;var at=b(Ut),gr=T(at,2),pe=b(gr),Xe=b(pe),mt=T(pe,2),qn=b(mt);{var jr=Q=>{var re=Wd(),Ee=b(re);M(st=>q(Ee,st),[()=>l(o(p).total)]),S(Q,re)};G(qn,Q=>{o(p).total!=null&&Q(jr)})}var Ur=T(qn,2);{var Fr=Q=>{var re=Nd(),Ee=b(re);M((st,_n)=>q(Ee,`${st??""}${_n??""}`),[()=>a("byTheGlass"),()=>o(p).glassPrice?` ${l(o(p).glassPrice)}`:""]),S(Q,re)};G(Ur,Q=>{o(p).byTheGlass&&Q(Fr)})}var de=T(mt,2);{var H=Q=>{var re=Ld(),Ee=b(re);M(st=>q(Ee,st),[()=>[o(p).producer,o(p).appellation||o(p).region].filter(Boolean).join(", ")]),S(Q,re)};G(de,Q=>{(o(p).producer||o(p).appellation||o(p).region)&&Q(H)})}var ve=T(de,2);{var Ne=Q=>{var re=zd(),Ee=b(re);M(()=>q(Ee,o(p).shortDescription)),S(Q,re)};G(ve,Q=>{o(p).shortDescription&&Q(Ne)})}var Ft=T(ve,2);{var jn=Q=>{var re=Od();Nt(re,20,()=>o(p).tags,Ee=>Ee,(Ee,st)=>{var _n=Bd(),Gr=b(_n);M(()=>q(Gr,st)),S(Ee,_n)}),S(Q,re)};G(Ft,Q=>{o(p).tags.length&&Q(jn)})}var wr=T(Ft,2);{var Hr=Q=>{var re=qd(),Ee=b(re);M(st=>{W(re,"href",o(p).url),W(re,"tabindex",o(A)?0:-1),q(Ee,st)},[()=>a("wineDetails.buy")]),ke("click",re,()=>j(o(p))),S(Q,re)};G(wr,Q=>{o(p).url&&Q(Hr)})}Yi(B,Q=>g(E,Q),()=>o(E)),M((Q,re)=>{ge=Ge(B,1,"wr-Swipe-card wr-Swipe-card--top svelte-1m6pw5v",null,ge,{"is-dragging":o(P),"is-flying":!!o(R)}),W(B,"aria-label",Q),Ie=ti(B,"",Ie,{transform:`translateX(${o(L)??""}px) rotate(${o(tt)??""}deg)`}),Mt=Ge(Ut,1,"wr-Swipe-panel svelte-1m6pw5v",null,Mt,{"is-open":o(A)}),W(Ut,"aria-hidden",!o(A)),q(Xe,re)},[()=>s(o(p)),()=>s(o(p))]),ke("pointerdown",B,fr),ke("pointermove",B,Pe),ke("pointerup",B,pr),pt("pointercancel",B,wt),ke("keydown",B,zr),ke("pointerdown",at,Bn),ke("pointerup",at,I),S(z,B)}),S(C,u)};G(mo,C=>{o(p)&&C(_o)})}var vi=T(fi,2),wn=b(vi),hi=b(wn);kd(hi);var mn=T(wn,2),bo=b(mn);fo(bo);var hr=T(mn,2),yo=b(hr);ms(yo);var gi=T(vi,2),Or=b(gi),qr=b(Or);Nt(qr,21,()=>Array(uo),Rn,(C,u,k)=>{var z=Ud();let B;M(()=>B=Ge(z,1,"svelte-1m6pw5v",null,B,{"is-on":k<o(y)})),S(C,z)});var wi=T(qr),On=T(Or,2),mi=b(On);tc(ae,C=>co==null?void 0:co(C)),M((C,u,k,z,B,ge,Ie,qe)=>{q(Be,C),q(gn,u),q(Br,o(f)),W(vr,"aria-label",k),wn.disabled=!o(h).canUndo,W(wn,"aria-label",z),mn.disabled=!o(p),W(mn,"aria-label",B),hr.disabled=!o(p),W(hr,"aria-label",ge),q(wi,` ${Ie??""}`),q(mi,qe)},[()=>a("swipe.hint"),()=>a("helpMeChoose"),()=>a("swipe.close"),()=>a("swipe.undo"),()=>a("swipe.dislike"),()=>a("swipe.like"),()=>a("swipe.progress").replace("{n}",String(o(y))).replace("{total}",String(uo)),()=>a("swipe.showResults")]),ke("click",vr,Rt),ke("click",wn,hn),ke("click",mn,()=>rt("dislike")),ke("click",hr,()=>rt("like")),ke("click",On,()=>nt("manual")),S(e,ae),kt()}Er(["click","pointerdown","pointermove","pointerup","keydown"]);const Vd=768,_s=()=>typeof window<"u"&&window.innerWidth<=Vd;let bs=U(We(_s()));typeof window<"u"&&window.addEventListener("resize",()=>g(bs,_s(),!0));const po={get isMobile(){return o(bs)}};var Kd=N('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),Yd=N('<p class="wr-App-resting svelte-1n46o8q" role="status"> </p>'),Xd=N('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),Zd=N("<div><!></div>"),Qd=N('<!> <div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),Jd=N('<div id="wr-Custom"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!> <!></div> <!> <!></div>'),$d=N('<div aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const ef={hash:"svelte-1n46o8q",code:`
|
|
171
185
|
/* ===================== 1) CSS Variables ===================== */:root {--wineater-corp-color: #0044ff;
|
|
172
186
|
/* --wr-brand-color is set dynamically from uiConfig.brandColor */--wr-brand-color: #7b2beb; /* fallback value */}
|
|
173
187
|
|
|
@@ -178,8 +192,16 @@
|
|
|
178
192
|
/* Shopify: the embed's panel is the frame — fill it, no card of our own */.wr-App.wr-App--embedded.svelte-1n46o8q {min-width:0;max-width:none;width:100%;margin:0;box-shadow:none;border-radius:0;min-height:0;padding-bottom:12px;}.wr-App-resting.svelte-1n46o8q {margin:0 0 8px;padding:10px 14px;border-radius:10px;background:#f6f7fd;color:#444;font-size:14px;text-align:center;}.wr-App-loadingTop.svelte-1n46o8q {
|
|
179
193
|
/* roughly the height of Header + Search, so tiles do not jump once they render */height:150px;}.wr-App-picture.svelte-1n46o8q {display:flex;justify-content:center;align-items:center;margin-bottom:12px;}.wr-App-logo.svelte-1n46o8q {max-width:100%;height:auto;width:auto;max-height:60px;}.wr-App-content.svelte-1n46o8q {position:relative;min-height:300px;}.wr-App-placeholder.svelte-1n46o8q {display:grid;grid-template-columns:repeat(4, 1fr);gap:0;align-items:stretch;margin-bottom:0;}.wr-App-showMore.svelte-1n46o8q {display:flex;justify-content:center;padding:16px 0 24px;}
|
|
180
194
|
|
|
195
|
+
/* WIN-52: the tap is answered at once while the deck is still loading */.wr-App-showMore.is-pending.svelte-1n46o8q .wr-Action {opacity:0.6;cursor:progress;pointer-events:none;}.wr-App-showMore.is-pending.svelte-1n46o8q .wr-Action::after {content:'';display:inline-block;width:0.9em;height:0.9em;margin-left:0.5em;vertical-align:-0.1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;
|
|
196
|
+
animation: svelte-1n46o8q-wr-spin 0.7s linear infinite;}
|
|
197
|
+
@keyframes svelte-1n46o8q-wr-spin {
|
|
198
|
+
to {
|
|
199
|
+
transform: rotate(360deg);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
181
203
|
/* ===================== 12) Error Message ===================== */.wr-App-error.svelte-1n46o8q {text-align:center;padding:24px;color:#666;}
|
|
182
204
|
|
|
183
205
|
/* ===================== 13) Mobile Styles ===================== */
|
|
184
206
|
@media screen and (max-width: 768px) {.wr-App.svelte-1n46o8q {flex-direction:column;padding:0px 16px;min-width:100vw;}.wr-App.wr-App--embedded.svelte-1n46o8q {min-width:0;padding:0 12px 12px;}.wr-App-placeholder.svelte-1n46o8q {display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;padding:8px 0;width:calc(100vw - 32px);min-width:calc(100vw - 32px);}
|
|
185
|
-
}`};function Fd(e,t){var C,K,me,be,ie,ht,It;_t(t,!0),Ct(e,Ud);const n=dt();function r(){var g;Hi("chatbotToken",((g=window.wineaterData)==null?void 0:g.CLIENT_TOKEN)||i,365)}const i="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n||(r(),Vu());const a=6*60*60*1e3,l=60*60*1e3,c=`${Xi}:instant-profile`,s=g=>`${Xi}:instant${g?`:${g}`:""}`,u=((C=window==null?void 0:window.wineaterData)==null?void 0:C.WIDGET_TYPE)||"store",h=((K=window==null?void 0:window.wineaterData)==null?void 0:K.COUNTRY_CODE)||null;(me=window==null?void 0:window.wineaterData)!=null&&me.WIDGET_WRAPPER;let m=H(!1),d=H(!1),w=!1,_=H(!1),y=H(!1),f=H(Le([])),b=H(null),D=H(""),B=H(null),E=H(!1),R=H(null),M=H(Le([])),S=H(""),I=H(!1),F=H(Le([])),G=null,de=H(Le([])),we=H(!1),Ee=H(null),je=H(Le([])),Ue=H(!1);function _e(g,A){g!=null&&g.length&&Et({type:"shown",query_id:G??void 0,sku_ids:g.map(j=>j.id),text:A||void 0})}let Be=U(()=>ue.getAppLanguage()),Bt=U(()=>ue.getStoreLanguage()),ce=U(()=>ue.getStoreId()),tn=U(()=>ue.isInitialized()),vt=U(()=>ue.getUiConfig()),Br=U(()=>ue.isSearchAvailable()),lr=U(()=>o(I)&&!o(Ue)&&Wd.isMobile&&ue.isSwipeModeEnabled());function Ot(){v(B,ve({key:"errorMessage",lang:o(Be)}),!0)}const Nn=()=>v(B,null);async function Or(g){const A=Fa(u,o(Be),o(Bt));if(!A||!g.length)return g.map(()=>({}));const j=await ft.getWineTranslations(g.map($=>$.id),A);return Sc(g,j)}Cn(()=>{ft.setVisitorLanguage(Fa(u,o(Be),o(Bt)))});async function qr(g){const A=Qi(c,2592e6),j=Qi(s(A),A?l:a),$=!!(j!=null&&j.length);$?v(f,j,!0):v(_,!0);try{const{wines:ze,profileHash:Ge}=await ft.getInstantRecommendations();ze.length>0&&(Zi(s(Ge),ze),Zi(c,Ge)),!$&&!w&&v(f,ze,!0)}catch(ze){console.error("[wineater] instant recommendations error:",ze),!$&&!w&&(await g,Ot())}finally{w||v(_,!1)}}async function Ln(){v(we,!0),ue.setSearchAvailable(!1);try{const{wines:g}=await ft.getInstantRecommendations();v(f,g,!0),v(M,[],!0),v(I,!1)}catch(g){console.error("[wineater] instant recommendations error:",g),v(f,[],!0)}}function nn(g=220){return!o(f)||o(f).length===0?Promise.resolve():(v(E,!0),new Promise(A=>{setTimeout(()=>{A()},g)}))}async function cr(g){g.preventDefault(),w=!0;let A="",j;try{v(_,!0),Nn(),A=o(D).trim()+";",v(S,A,!0),G=Oa(),j=G;try{Pe(Ce.SEARCH_PERFORMED,o(ce),{query:A})}catch(ye){console.error("Error tracking search event:",ye)}let $=!1,ze=!1,Ge=null;const jt=ye=>{if(!ye||ye.length===0){v(f,[],!0),v(M,[],!0),v(B,ve({key:"noResultsMessage",lang:o(Be)}),!0),Pe(Ce.NO_RESULTS_FOUND,o(ce),{query:A});return}v(f,ye,!0),v(_,!1),!ze&&(ze=!0,v(I,Yi==="2"&&!n&&ye.length>=4,!0),_e(ye,A),Pe(Ce.SEARCH_RESULTS_DISPLAYED,o(ce),{results_count:ye.length,results:ye,query:A}))},rn=ye=>{j===G&&($?jt(ye):Ge=ye)},Ut=ft.searchStream(A,G,rn);Ut.catch(()=>{}),await nn(220),v(f,[],!0),v(E,!1),v(I,!1),v(F,[],!0),v(Ee,null),v(Ue,!1),$=!0,Ge&&jt(Ge);const Ft=await Ut;if(j!==G)return;if(ze&&Ft.length===o(f).length&&Ft.every((ye,te)=>{var fe;return ye.id===((fe=o(f)[te])==null?void 0:fe.id)})){const ye=new Map(Ft.map(te=>[te.id,te]));v(f,o(f).map(te=>{var fe;return{...te,reason:((fe=ye.get(te.id))==null?void 0:fe.reason)??te.reason}}),!0)}else jt(Ft)}catch($){if(j!==G)return;if($ instanceof Da){await Ln();return}v(f,[],!0),console.error("[wineater] search error:",$),Pe(Ce.ERROR_OCCURRED,o(ce),{error_message:$==null?void 0:$.message,query:A}),Ot()}finally{j===G&&v(_,!1)}}async function ur(){if(o(y)||!o(I))return;w=!0;const g=o(f);try{v(y,!0),v(_,!0),v(F,[...new Set([...o(F),...o(f).map(ze=>ze.id)])],!0);const A=ft.getMoreWineRecommendations(o(S),o(F));A.catch(()=>{}),await nn(220),v(f,[],!0),v(E,!1);const{recommendations:j,hasMore:$}=await A;Et({type:"more",query_id:G??void 0,text:o(S)||void 0}),_e(j,o(S)),Pe(Ce.SHOW_MORE_CLICKED,o(ce),{query:o(S),results_count:j.length}),v(f,j.length>0?j:g,!0),v(I,$,!0)}catch(A){console.error("[wineater] try again error:",A),v(f,g,!0),v(I,!1)}finally{v(y,!1),v(_,!1)}}async function dr(){if(o(y)||!o(I))return;w=!0,v(y,!0);const g=[...new Set([...o(F),...o(f).map(j=>j.id)])];let A=[];try{({cards:A}=await ft.getDeck(o(S),g,G))}catch(j){console.debug("[wineater] swipe deck unavailable:",j==null?void 0:j.message)}finally{v(y,!1)}if(A.length===0)return ur();v(F,g,!0),v(je,g,!0),v(b,null),v(Ue,!0),v(Ee,A,!0)}const fr=g=>({id:g.id,title:g.title,price:g.total??0,total:g.total,type:g.type??"",region:g.region??"",grape:g.grape??"",appellation:g.appellation,url:g.url,store:"",storeId:null,image:g.image,producer:g.producer,country:g.country??"",vintage:g.vintage,tags:g.tags,pairingRecommendation:null,shortDescription:g.shortDescription??"",score:null,itemId:null,isPromote:null,stock:null,byTheGlass:g.byTheGlass,glassPrice:g.glassPrice});function T(g,A,j){v(F,[...new Set([...o(F),...A,...g.map($=>$.id)])],!0),v(Ee,null),g.length!==0&&(v(f,g.map(fr),!0),_e(o(f),o(S)))}async function q(g){w=!0;try{v(_,!0),Nn(),Pe(Ce.SIMILAR_WINES_CLICKED,o(ce),{wine_id:g.id,wine_title:g.title}),Et({type:"similar",query_id:G??void 0,sku_ids:[g.id]}),G=Oa();const A=ft.getSimilarWines(g.id);A.catch(()=>{}),await nn(220),v(f,[],!0),v(E,!1),v(I,!1),v(Ee,null),v(b,null);const j=await A;v(D,g.title,!0),v(S,""),!j||j.length===0?(v(f,[],!0),v(M,[],!0),v(B,ve({key:"noResultsMessage",lang:o(Be)}),!0)):(v(f,j,!0),_e(j,""))}catch(A){v(f,[],!0),console.error("[wineater] similar wines error:",A),Ot()}finally{v(_,!1)}}Cn(async()=>{if(!o(f)||o(f).length===0){v(M,[],!0);return}const g=o(f);try{const A=await Or(o(f));o(f)===g&&o(f).length>0&&v(M,A,!0)}catch(A){console.error("translatePopupContent failed",A)}});function Z(g,A){o(b)&&o(b)!==g.id&&v(b,null),v(b,g.id,!0),Et({type:"click",query_id:G??void 0,sku_ids:[g.id],position:A}),Pe(Ce.WINE_DETAILS_VIEWED,o(ce),{wine_id:g.id,wine_title:g.title,is_mobile:window.innerWidth<=768})}function oe(g,A){Et({type:"buy_click",query_id:G??void 0,sku_ids:[g.id],position:A}),Pe(Ce.BUY_BUTTON_CLICKED,o(ce),{wine_id:g.id,wine_title:g.title,wine_url:g.url,is_mobile:window.innerWidth<=768})}async function he(g,A){const j=Aa(g);if(!n||!j)return;Et({type:"add_to_cart",query_id:G??void 0,sku_ids:[g.id],position:A}),Pe(Ce.BUY_BUTTON_CLICKED,o(ce),{action:"add_to_cart",wine_id:g.id,wine_title:g.title,wine_url:g.url,variant_id:j,query:o(S)||void 0,is_mobile:window.innerWidth<=768});const $=await ed(j,{root:n.root,sessionId:Ra()});$.ok&&(v(de,[...o(de),g.id],!0),window.dispatchEvent(new CustomEvent("wineater:added-to-cart",{detail:{variantId:j,via:$.via}})))}function pe(){const g=o(f).find(A=>A.id===o(b));Pe(Ce.WINE_DETAILS_CLOSED,o(ce),{wine_id:o(b),wine_title:g.title}),v(b,null)}function Fe(g){return!!(g.reason||g.shortDescription||g.tags)}function He(g){u==="store"&&Fe(g)&&(v(R,g.id,!0),Pe(Ce.WINE_CARD_HOVER,o(ce),{wine_id:g.id,wine_title:g.title}))}function Oe(g){u==="store"&&o(R)===g.id&&v(R,null)}function gn(g,A){g.target.closest(".js-WineTileAction")||g.target.closest(".js-WinePopupClose")||(Et({type:"click",query_id:G??void 0,sku_ids:[A.id],position:o(f).findIndex(j=>j.id===A.id)}),Pe(Ce.WINE_CARD_CLICK,o(ce),{wine_id:A.id,wine_title:A.title}))}function qt(g){var $;const A=(($=g.composedPath)==null?void 0:$.call(g)[0])??g.target;if(!(A!=null&&A.closest))return;A.closest(".js-WinePopup")||A.closest(".js-WineTileAction")||v(b,null)}const zn=((It=(ht=(ie=(be=window==null?void 0:window.wineaterData)==null?void 0:be.mountTarget)==null?void 0:ie.getRootNode)==null?void 0:ht.call(ie))==null?void 0:It.host)||document.documentElement;Cn(()=>{var g,A;(g=o(vt))!=null&&g.brandColor&&zn.style.setProperty("--wr-brand-color",o(vt).brandColor),(A=o(vt))!=null&&A.wineaterColor&&zn.style.setProperty("--wr-wineater-color",o(vt).wineaterColor)}),Jr(()=>(document.addEventListener("click",qt),(async()=>{const g=ue.initializeStore();if(qr(g),await g,!o(tn)){v(d,!0);return}o(vt).customCss&&Ku(o(vt).customCss),v(m,!0),n&&!o(Br)&&v(we,!0),Pe(Ce.WIDGET_INITIALIZED,o(ce))})(),()=>{document.removeEventListener("click",qt)}));var jr=Yn(),ro=qe(jr);{var ui=g=>{var A=qd();let j;var $=x(A);{var ze=z=>{var ee=Nd(),xe=x(ee);W(()=>N(xe,"src",o(vt).logoUrl)),k(z,ee)};V($,z=>{o(vt).logoUrl&&z(ze)})}var Ge=P($,2);Gc(Ge,{});var jt=P(Ge,2);nu(jt,{onSubmit:cr,get initialized(){return o(m)},get searchQuery(){return o(D)},set searchQuery(z){v(D,z,!0)}});var rn=P(jt,2),Ut=x(rn);{var Ft=z=>{var ee=Ld(),xe=x(ee);W(Ve=>O(xe,Ve),[()=>ve({key:"sommelierResting",lang:o(Be)})]),k(z,ee)};V(Ut,z=>{o(we)&&!o(B)&&z(Ft)})}var pr=P(Ut,2);{var ye=z=>{var ee=zd(),xe=x(ee),Ve=x(xe);W(()=>O(Ve,o(B))),k(z,ee)},te=z=>{Rd(z,{get cards(){return o(Ee)},get shownIds(){return o(je)},get queryId(){return G},get query(){return o(S)},onFinish:T})},fe=z=>{var ee=Od(),xe=qe(ee);Rt(xe,21,()=>o(f),An,(Bn,Fr,di)=>{{let oo=U(()=>n?he:void 0),ao=U(()=>o(de).includes(o(Fr).id)),gs=U(()=>n?void 0:q);qu(Bn,{get wine(){return o(Fr)},index:di,get hoveredWineId(){return o(R)},get selectedWineId(){return o(b)},get isAnimating(){return o(E)},get translatedPopup(){return o(M)[di]},onBuyClick:Z,onBuyLinkClick:oe,get onAddToCart(){return o(oo)},get addedToCart(){return o(ao)},onPopupClose:pe,get onSimilarClick(){return o(gs)},onTileEnter:He,onTileLeave:Oe,onTileClick:gn})}});var Ve=P(xe,2);{var wr=Bn=>{var Fr=Bd(),di=x(Fr);{let oo=U(()=>o(lr)?dr:ur);dn(di,{get handleClick(){return o(oo)},variant:"outlined",children:(ao,gs)=>{var ws=Jt();W(Gd=>O(ws,Gd),[()=>ve({key:o(lr)?"helpMeChoose":"tryAgain",lang:o(Be)})]),k(ao,ws)},$$slots:{default:!0}})}k(Bn,Fr)};V(Ve,Bn=>{o(I)&&Bn(wr)})}k(z,ee)},Je=z=>{$a(z)};V(pr,z=>{o(B)?z(ye):o(Ee)?z(te,1):o(f)&&o(f).length>0?z(fe,2):o(_)&&z(Je,3)})}var At=P(rn,2);{var vr=z=>{Hu(z,{get lang(){return o(Be)}})},hr=U(()=>sc());V(At,z=>{o(hr)&&z(vr)})}var gr=P(At,2);{var Ur=z=>{Qc(z,{get countryCode(){return h}})};V(gr,z=>{n||z(Ur)})}W(()=>j=tt(A,1,"wr-App svelte-1n46o8q",null,j,{"wr-App--embedded":!!n})),k(g,A)},io=g=>{var A=jd();let j;var $=P(x(A),2);$a($),W(()=>j=tt(A,1,"wr-App wr-App--loading svelte-1n46o8q",null,j,{"wr-App--embedded":!!n})),k(g,A)};V(ro,g=>{o(tn)?g(ui):o(d)||g(io,1)})}k(e,jr),bt()}const Hd=((hs=window.wineaterData)==null?void 0:hs.mountTarget)||document.getElementById("wineater-widget-conteiner");return Bl(Fd,{target:Hd})});
|
|
207
|
+
}`};function tf(e,t){var gi,Or,qr,wi,On,mi,C;xt(t,!0),Pt(e,ef);const n=vt();function r(){var u;$i("chatbotToken",((u=window.wineaterData)==null?void 0:u.CLIENT_TOKEN)||i,365)}const i="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n||(r(),id());const a=6*60*60*1e3,l=60*60*1e3,c=`${io}:instant-profile`,s=u=>`${io}:instant${u?`:${u}`:""}`,f=((gi=window==null?void 0:window.wineaterData)==null?void 0:gi.WIDGET_TYPE)||"store",h=((Or=window==null?void 0:window.wineaterData)==null?void 0:Or.COUNTRY_CODE)||null;(qr=window==null?void 0:window.wineaterData)!=null&&qr.WIDGET_WRAPPER;let m=U(!1),w=U(!1),p=!1,_=U(!1),y=U(!1),d=U(We([])),x=U(null),O=U(""),L=U(null),P=U(!1),R=U(null),A=U(We([])),E=U(""),D=U(!1),K=U(We([])),Y=null,ne=U(We([])),le=U(!1),ue=U(null),tt=U(We([])),Le=U(!1),we=null,nt=U(!1);const Rt=()=>[...new Set([...o(K),...o(d).map(u=>u.id)])],ze=u=>`${Y??""}|${o(E)}|${u.join(",")}`;function rt(u){const k=ze(u);if((we==null?void 0:we.key)!==k){const z=ht.getDeck(o(E),u,Y).then(B=>B.cards).catch(B=>(console.debug("[wineater] swipe deck unavailable:",B==null?void 0:B.message),[]));we={key:k,request:z}}return we.request}function hn(u,k){u!=null&&u.length&&It({type:"shown",query_id:Y??void 0,sku_ids:u.map(z=>z.id),text:k||void 0})}let it=F(()=>ce.getAppLanguage()),fr=F(()=>ce.getStoreLanguage()),Pe=F(()=>ce.getStoreId()),pr=F(()=>ce.isInitialized()),wt=F(()=>ce.getUiConfig()),zr=F(()=>ce.isSearchAvailable()),jt=F(()=>o(D)&&!o(Le)&&po.isMobile&&ce.isSwipeModeEnabled());sn(()=>{!o(jt)||o(_)||o(y)||o(ue)||!o(d).length||rt(Rt())});function Bn(){g(L,fe({key:"errorMessage",lang:o(it)}),!0)}const I=()=>g(L,null);async function j(u){const k=ts(f,o(it),o(fr));if(!k||!u.length)return u.map(()=>({}));const z=await ht.getWineTranslations(u.map(B=>B.id),k);return Wc(u,z)}sn(()=>{ht.setVisitorLanguage(ts(f,o(it),o(fr)))});async function J(u){const k=oo(c,2592e6),z=oo(s(k),k?l:a),B=!!(z!=null&&z.length);B?g(d,z,!0):g(_,!0);try{const{wines:ge,profileHash:Ie}=await ht.getInstantRecommendations();ge.length>0&&(ao(s(Ie),ge),ao(c,Ie)),!B&&!p&&g(d,ge,!0)}catch(ge){console.error("[wineater] instant recommendations error:",ge),!B&&!p&&(await u,Bn())}finally{p||g(_,!1)}}async function ae(){g(le,!0),ce.setSearchAvailable(!1);try{const{wines:u}=await ht.getInstantRecommendations();g(d,u,!0),g(A,[],!0),g(D,!1)}catch(u){console.error("[wineater] instant recommendations error:",u),g(d,[],!0)}}function _e(u=220){return!o(d)||o(d).length===0?Promise.resolve():(g(P,!0),new Promise(k=>{setTimeout(()=>{k()},u)}))}async function Be(u){u.preventDefault(),p=!0;let k="",z;try{g(_,!0),I(),k=o(O).trim()+";",g(E,k,!0),Y=Qa(),z=Y;try{Se(ye.SEARCH_PERFORMED,o(Pe),{query:k})}catch(pe){console.error("Error tracking search event:",pe)}let B=!1,ge=!1,Ie=null;const qe=pe=>{if(!pe||pe.length===0){g(d,[],!0),g(A,[],!0),g(L,fe({key:"noResultsMessage",lang:o(it)}),!0),Se(ye.NO_RESULTS_FOUND,o(Pe),{query:k});return}g(d,pe,!0),g(_,!1),!ge&&(ge=!0,g(D,ro==="2"&&!n&&pe.length>=4,!0),hn(pe,k),Se(ye.SEARCH_RESULTS_DISPLAYED,o(Pe),{results_count:pe.length,results:pe,query:k}))},Ut=pe=>{z===Y&&(B?qe(pe):Ie=pe)},Mt=ht.searchStream(k,Y,Ut);Mt.catch(()=>{}),await _e(220),g(d,[],!0),g(P,!1),g(D,!1),g(K,[],!0),g(ue,null),g(Le,!1),B=!0,Ie&&qe(Ie);const at=await Mt;if(z!==Y)return;if(ge&&at.length===o(d).length&&at.every((pe,Xe)=>{var mt;return pe.id===((mt=o(d)[Xe])==null?void 0:mt.id)})){const pe=new Map(at.map(Xe=>[Xe.id,Xe]));g(d,o(d).map(Xe=>{var mt;return{...Xe,reason:((mt=pe.get(Xe.id))==null?void 0:mt.reason)??Xe.reason}}),!0)}else qe(at)}catch(B){if(z!==Y)return;if(B instanceof Fa){await ae();return}g(d,[],!0),console.error("[wineater] search error:",B),Se(ye.ERROR_OCCURRED,o(Pe),{error_message:B==null?void 0:B.message,query:k}),Bn()}finally{z===Y&&g(_,!1)}}async function ot(){if(o(y)||!o(D))return;p=!0;const u=o(d);try{g(y,!0),g(_,!0),g(K,[...new Set([...o(K),...o(d).map(ge=>ge.id)])],!0);const k=ht.getMoreWineRecommendations(o(E),o(K));k.catch(()=>{}),await _e(220),g(d,[],!0),g(P,!1);const{recommendations:z,hasMore:B}=await k;It({type:"more",query_id:Y??void 0,text:o(E)||void 0}),hn(z,o(E)),Se(ye.SHOW_MORE_CLICKED,o(Pe),{query:o(E),results_count:z.length}),g(d,z.length>0?z:u,!0),g(D,B,!0)}catch(k){console.error("[wineater] try again error:",k),g(d,u,!0),g(D,!1)}finally{g(y,!1),g(_,!1)}}async function Oe(){if(o(y)||o(nt)||!o(D))return;p=!0;const u=Rt();g(nt,!0);const k=await rt(u);if(g(nt,!1),we=null,k.length===0)return ot();g(K,u,!0),g(tt,u,!0),g(x,null),g(Le,!0),g(ue,k,!0)}const Ye=u=>({id:u.id,title:u.title,price:u.total??0,total:u.total,type:u.type??"",region:u.region??"",grape:u.grape??"",appellation:u.appellation,url:u.url,store:"",storeId:null,image:u.image,producer:u.producer,country:u.country??"",vintage:u.vintage,tags:u.tags,pairingRecommendation:null,shortDescription:u.shortDescription??"",score:null,itemId:null,isPromote:null,stock:null,byTheGlass:u.byTheGlass,glassPrice:u.glassPrice});function gn(u,k,z){g(K,[...new Set([...o(K),...k,...u.map(B=>B.id)])],!0),g(ue,null),g(D,!1),u.length!==0&&(g(d,u.map(Ye),!0),hn(o(d),o(E)))}function tn(){g(ue,null),g(Le,!1)}async function Br(u){p=!0;try{g(_,!0),I(),Se(ye.SIMILAR_WINES_CLICKED,o(Pe),{wine_id:u.id,wine_title:u.title}),It({type:"similar",query_id:Y??void 0,sku_ids:[u.id]}),Y=Qa();const k=ht.getSimilarWines(u.id);k.catch(()=>{}),await _e(220),g(d,[],!0),g(P,!1),g(D,!1),g(ue,null),g(x,null);const z=await k;g(O,u.title,!0),g(E,""),!z||z.length===0?(g(d,[],!0),g(A,[],!0),g(L,fe({key:"noResultsMessage",lang:o(it)}),!0)):(g(d,z,!0),hn(z,""))}catch(k){g(d,[],!0),console.error("[wineater] similar wines error:",k),Bn()}finally{g(_,!1)}}sn(async()=>{if(!o(d)||o(d).length===0){g(A,[],!0);return}const u=o(d);try{const k=await j(o(d));o(d)===u&&o(d).length>0&&g(A,k,!0)}catch(k){console.error("translatePopupContent failed",k)}});function vr(u,k){po.isMobile?(g(x,null),g(R,u.id,!0)):g(x,u.id,!0),It({type:"click",query_id:Y??void 0,sku_ids:[u.id],position:k}),Se(ye.WINE_DETAILS_VIEWED,o(Pe),{wine_id:u.id,wine_title:u.title,is_mobile:window.innerWidth<=768})}function go(u,k){It({type:"buy_click",query_id:Y??void 0,sku_ids:[u.id],position:k}),Se(ye.BUY_BUTTON_CLICKED,o(Pe),{wine_id:u.id,wine_title:u.title,wine_url:u.url,is_mobile:window.innerWidth<=768})}async function fi(u,k){const z=Ua(u);if(!n||!z)return;It({type:"add_to_cart",query_id:Y??void 0,sku_ids:[u.id],position:k}),Se(ye.BUY_BUTTON_CLICKED,o(Pe),{action:"add_to_cart",wine_id:u.id,wine_title:u.title,wine_url:u.url,variant_id:z,query:o(E)||void 0,is_mobile:window.innerWidth<=768});const B=await fd(z,{root:n.root,sessionId:Ha()});B.ok&&(g(ne,[...o(ne),u.id],!0),window.dispatchEvent(new CustomEvent("wineater:added-to-cart",{detail:{variantId:z,via:B.via}})))}function pi(){const u=o(d).find(k=>k.id===o(x));Se(ye.WINE_DETAILS_CLOSED,o(Pe),{wine_id:o(x),wine_title:u.title}),g(x,null)}function wo(u){return!!(u.reason||u.shortDescription||u.tags)}function mo(u){f==="store"&&wo(u)&&(g(R,u.id,!0),Se(ye.WINE_CARD_HOVER,o(Pe),{wine_id:u.id,wine_title:u.title}))}function _o(u){f==="store"&&o(R)===u.id&&g(R,null)}function vi(u,k){u.target.closest(".js-WineTileAction")||u.target.closest(".js-WinePopupClose")||(It({type:"click",query_id:Y??void 0,sku_ids:[k.id],position:o(d).findIndex(z=>z.id===k.id)}),Se(ye.WINE_CARD_CLICK,o(Pe),{wine_id:k.id,wine_title:k.title}))}function wn(u){var B;const k=((B=u.composedPath)==null?void 0:B.call(u)[0])??u.target;if(!(k!=null&&k.closest))return;k.closest(".js-WinePopup")||k.closest(".js-WineTileAction")||g(x,null),po.isMobile&&!k.closest(".wr-WineTile")&&g(R,null)}const hi=((C=(mi=(On=(wi=window==null?void 0:window.wineaterData)==null?void 0:wi.mountTarget)==null?void 0:On.getRootNode)==null?void 0:mi.call(On))==null?void 0:C.host)||document.documentElement;sn(()=>{var u,k;(u=o(wt))!=null&&u.brandColor&&hi.style.setProperty("--wr-brand-color",o(wt).brandColor),(k=o(wt))!=null&&k.wineaterColor&&hi.style.setProperty("--wr-wineater-color",o(wt).wineaterColor)}),ei(()=>(document.addEventListener("click",wn),(async()=>{const u=ce.initializeStore();if(J(u),await u,!o(pr)){g(w,!0);return}o(wt).customCss&&od(o(wt).customCss),g(m,!0),n&&!o(zr)&&g(le,!0),Se(ye.WIDGET_INITIALIZED,o(Pe))})(),()=>{document.removeEventListener("click",wn)}));var mn=Jn(),bo=Ue(mn);{var hr=u=>{var k=Jd();let z;var B=b(k);{var ge=H=>{var ve=Kd(),Ne=b(ve);M(()=>W(Ne,"src",o(wt).logoUrl)),S(H,ve)};G(B,H=>{o(wt).logoUrl&&H(ge)})}var Ie=T(B,2);tu(Ie,{});var qe=T(Ie,2);fu(qe,{onSubmit:Be,get initialized(){return o(m)},get searchQuery(){return o(O)},set searchQuery(H){g(O,H,!0)}});var Ut=T(qe,2),Mt=b(Ut);{var at=H=>{var ve=Yd(),Ne=b(ve);M(Ft=>q(Ne,Ft),[()=>fe({key:"sommelierResting",lang:o(it)})]),S(H,ve)};G(Mt,H=>{o(le)&&!o(L)&&H(at)})}var gr=T(Mt,2);{var pe=H=>{var ve=Xd(),Ne=b(ve),Ft=b(Ne);M(()=>q(Ft,o(L))),S(H,ve)},Xe=H=>{var ve=Qd(),Ne=Ue(ve);{var Ft=Q=>{Gd(Q,{get cards(){return o(ue)},get shownIds(){return o(tt)},get queryId(){return Y},get query(){return o(E)},onFinish:gn,onClose:tn})};G(Ne,Q=>{o(ue)&&Q(Ft)})}var jn=T(Ne,2);Nt(jn,21,()=>o(d),Rn,(Q,re,Ee)=>{{let st=F(()=>n?fi:void 0),_n=F(()=>o(ne).includes(o(re).id)),Gr=F(()=>n?void 0:Br);Ju(Q,{get wine(){return o(re)},index:Ee,get hoveredWineId(){return o(R)},get selectedWineId(){return o(x)},get isAnimating(){return o(P)},get translatedPopup(){return o(A)[Ee]},onBuyClick:vr,onBuyLinkClick:go,get onAddToCart(){return o(st)},get addedToCart(){return o(_n)},onPopupClose:pi,get onSimilarClick(){return o(Gr)},onTileEnter:mo,onTileLeave:_o,onTileClick:vi})}});var wr=T(jn,2);{var Hr=Q=>{var re=Zd();let Ee;var st=b(re);{let _n=F(()=>o(jt)?Oe:ot);un(st,{get handleClick(){return o(_n)},variant:"outlined",children:(Gr,xf)=>{var Es=Jt();M(rf=>q(Es,rf),[()=>fe({key:o(jt)?"helpMeChoose":"tryAgain",lang:o(it)})]),S(Gr,Es)},$$slots:{default:!0}})}M(()=>{Ee=Ge(re,1,"wr-App-showMore svelte-1n46o8q",null,Ee,{"is-pending":o(nt)}),W(re,"aria-busy",o(nt))}),S(Q,re)};G(wr,Q=>{o(D)&&Q(Hr)})}S(H,ve)},mt=H=>{ds(H)};G(gr,H=>{o(L)?H(pe):o(d)&&o(d).length>0?H(Xe,1):o(_)&&H(mt,2)})}var qn=T(Ut,2);{var jr=H=>{nd(H,{get lang(){return o(it)}})},Ur=F(()=>wc());G(qn,H=>{o(Ur)&&H(jr)})}var Fr=T(qn,2);{var de=H=>{au(H,{get countryCode(){return h}})};G(Fr,H=>{n||H(de)})}M(()=>z=Ge(k,1,"wr-App svelte-1n46o8q",null,z,{"wr-App--embedded":!!n})),S(u,k)},yo=u=>{var k=$d();let z;var B=T(b(k),2);ds(B),M(()=>z=Ge(k,1,"wr-App wr-App--loading svelte-1n46o8q",null,z,{"wr-App--embedded":!!n})),S(u,k)};G(bo,u=>{o(pr)?u(hr):o(w)||u(yo,1)})}S(e,mn),kt()}const nf=((Cs=window.wineaterData)==null?void 0:Cs.mountTarget)||document.getElementById("wineater-widget-conteiner");return Kl(tf,{target:nf})});
|