wineater-bot 5.1.1 → 5.1.2

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.
@@ -1,6 +1,6 @@
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&lt||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&lt&&(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&lt&&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&lt)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&lt&&(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&lt)===0&&!Et&&$!==null&&(Jr||($.f&lt)!==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&lt)&&(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:`
1
+ (function(ie,le){typeof exports=="object"&&typeof module<"u"?module.exports=le():typeof define=="function"&&define.amd?define(le):(ie=typeof globalThis<"u"?globalThis:ie||self,ie.WineaterChatbot=le())})(this,function(){"use strict";var of=Object.defineProperty;var Ts=ie=>{throw TypeError(ie)};var af=(ie,le,ye)=>le in ie?of(ie,le,{enumerable:!0,configurable:!0,writable:!0,value:ye}):ie[le]=ye;var _t=(ie,le,ye)=>af(ie,typeof le!="symbol"?le+"":le,ye),yo=(ie,le,ye)=>le.has(ie)||Ts("Cannot "+ye);var v=(ie,le,ye)=>(yo(ie,le,"read from private field"),ye?ye.call(ie):le.get(ie)),X=(ie,le,ye)=>le.has(ie)?Ts("Cannot add the same private member more than once"):le instanceof WeakSet?le.add(ie):le.set(ie,ye),G=(ie,le,ye,_r)=>(yo(ie,le,"write to private field"),_r?_r.call(ie,ye):le.set(ie,ye),ye),ee=(ie,le,ye)=>(yo(ie,le,"access private method"),ye);var bs,er,tr,Wn,nr,Wr,rr,dn,Bt,ir,Qe,xo,ko,So,Ps,gt,vo,Ot,Nn,Ve,qt,Je,At,Jt,Ln,fn,or,ar,sr,$t,ui,Se,sf,lf,cf,Co,mi,_i,Eo,ys,Dt,jt,$e,zn,Nr,Lr,di,lr,zr,pn,cr,ur,vn,pe,To,Ft,Po,Io,Is,xs,ks,Ss;const ie="5";typeof window<"u"&&((bs=window.__svelte??(window.__svelte={})).v??(bs.v=new Set)).add(ie);const le=1,ye=2,_r=4,As=8,Ds=16,Rs=1,Ms=2,Ws=4,Ns=8,Ls=16,Ao=1,zs=2,Pe=Symbol(),Do="http://www.w3.org/1999/xhtml",bi=!1;var yi=Array.isArray,Bs=Array.prototype.indexOf,jn=Array.prototype.includes,Vr=Array.from,Os=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,qs=Object.getOwnPropertyDescriptors,js=Object.prototype,Us=Array.prototype,Ro=Object.getPrototypeOf,Mo=Object.isExtensible;const xi=()=>{};function Fs(e){for(var t=0;t<e.length;t++)e[t]()}function Wo(){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 Ie=2,br=4,Kr=8,No=1<<24,Ht=16,bt=32,bn=64,ki=128,lt=512,Ee=1024,Ae=2048,yt=4096,Xe=8192,Gt=16384,yn=32768,xn=65536,Lo=1<<17,zo=1<<18,Fn=1<<19,Gs=1<<20,Vt=1<<25,kn=65536,Si=1<<21,Ci=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 Bo(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 Oo(e){return!ll(e,this.v)}let Hn=!1,cl=!1;function ul(){Hn=!0}let _e=null;function Gn(e){_e=e}function xt(e,t=!1,n){_e={p:_e,i:!1,c:null,e:null,s:e,x:null,l:Hn&&!t?{s:null,u:null,$:[]}:null}}function kt(e){var t=_e,n=t.e;if(n!==null){t.e=null;for(var r of n)la(r)}return e!==void 0&&(t.x=e),t.i=!0,_e=t.p,e??{}}function Vn(){return!Hn||_e!==null&&_e.l===null}let En=[];function qo(){var e=En;En=[],Fs(e)}function Kt(e){if(En.length===0&&!yr){var t=En;queueMicrotask(()=>{t===En&&qo()})}En.push(e)}function dl(){for(;En.length>0;)qo()}function jo(e){var t=te;if(t===null)return $.f|=nn,e;if(!(t.f&yn)&&!(t.f&br))throw e;rn(e,t)}function rn(e,t){for(;t!==null;){if(t.f&ki){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 ge(e,t){e.f=e.f&fl|t}function Ei(e){e.f&lt||e.deps===null?ge(e,Ee):ge(e,yt)}function Uo(e){if(e!==null)for(const t of e)!(t.f&Ie)||!(t.f&kn)||(t.f^=kn,Uo(t.deps))}function Fo(e,t,n){e.f&Ae?t.add(e):e.f&yt&&n.add(e),Uo(e.deps),ge(e,Ee)}const Yr=new Set;let Z=null,Ti=null,De=null,qe=[],Xr=null,Pi=!1,yr=!1;const po=class po{constructor(){X(this,Qe);_t(this,"current",new Map);_t(this,"previous",new Map);X(this,er,new Set);X(this,tr,new Set);X(this,Wn,0);X(this,nr,0);X(this,Wr,null);X(this,rr,new Set);X(this,dn,new Set);X(this,Bt,new Map);_t(this,"is_fork",!1);X(this,ir,!1)}skip_effect(t){v(this,Bt).has(t)||v(this,Bt).set(t,{d:[],m:[]})}unskip_effect(t){var n=v(this,Bt).get(t);if(n){v(this,Bt).delete(t);for(var r of n.d)ge(r,Ae),Ct(r);for(r of n.m)ge(r,yt),Ct(r)}}process(t){var i;qe=[],this.apply();var n=[],r=[];for(const a of t)ee(this,Qe,ko).call(this,a,n,r);if(ee(this,Qe,xo).call(this)){ee(this,Qe,So).call(this,r),ee(this,Qe,So).call(this,n);for(const[a,c]of v(this,Bt))Yo(a,c)}else{for(const a of v(this,er))a();v(this,er).clear(),v(this,Wn)===0&&ee(this,Qe,Ps).call(this),Ti=this,Z=null,Go(r),Go(n),v(this,rr).clear(),v(this,dn).clear(),Ti=null,(i=v(this,Wr))==null||i.resolve()}De=null}capture(t,n){n!==Pe&&!this.previous.has(t)&&this.previous.set(t,n),t.f&nn||(this.current.set(t,t.v),De==null||De.set(t,t.v))}activate(){Z=this,this.apply()}deactivate(){Z===this&&(Z=null,De=null)}flush(){if(this.activate(),qe.length>0){if(Ho(),Z!==null&&Z!==this)return}else v(this,Wn)===0&&this.process([]);this.deactivate()}discard(){for(const t of v(this,tr))t(this);v(this,tr).clear()}increment(t){G(this,Wn,v(this,Wn)+1),t&&G(this,nr,v(this,nr)+1)}decrement(t){G(this,Wn,v(this,Wn)-1),t&&G(this,nr,v(this,nr)-1),!v(this,ir)&&(G(this,ir,!0),Kt(()=>{G(this,ir,!1),ee(this,Qe,xo).call(this)?qe.length>0&&this.flush():this.revive()}))}revive(){for(const t of v(this,rr))v(this,dn).delete(t),ge(t,Ae),Ct(t);for(const t of v(this,dn))ge(t,yt),Ct(t);this.flush()}oncommit(t){v(this,er).add(t)}ondiscard(t){v(this,tr).add(t)}settled(){return(v(this,Wr)??G(this,Wr,Wo())).promise}static ensure(){if(Z===null){const t=Z=new po;Yr.add(Z),yr||Kt(()=>{Z===t&&t.flush()})}return Z}apply(){}};er=new WeakMap,tr=new WeakMap,Wn=new WeakMap,nr=new WeakMap,Wr=new WeakMap,rr=new WeakMap,dn=new WeakMap,Bt=new WeakMap,ir=new WeakMap,Qe=new WeakSet,xo=function(){return this.is_fork||v(this,nr)>0},ko=function(t,n,r){t.f^=Ee;for(var i=t.first;i!==null;){var a=i.f,c=(a&(bt|bn))!==0,u=c&&(a&Ee)!==0,l=u||(a&Xe)!==0||v(this,Bt).has(i);if(!l&&i.fn!==null){c?i.f^=Ee:a&br?n.push(i):Cr(i)&&(a&Ht&&v(this,dn).add(i),Yn(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}}},So=function(t){for(var n=0;n<t.length;n+=1)Fo(t[n],v(this,rr),v(this,dn))},Ps=function(){var i;if(Yr.size>1){this.previous.clear();var t=De,n=!0;for(const a of Yr){if(a===this){n=!1;continue}const c=[];for(const[l,f]of this.current){if(a.current.has(l))if(n&&f!==a.current.get(l))a.current.set(l,f);else continue;c.push(l)}if(c.length===0)continue;const u=[...a.current.keys()].filter(l=>!this.current.has(l));if(u.length>0){var r=qe;qe=[];const l=new Set,f=new Map;for(const h of c)Vo(h,u,l,f);if(qe.length>0){Z=a,a.apply();for(const h of qe)ee(i=a,Qe,ko).call(i,h,[],[]);a.deactivate()}qe=r}}Z=null,De=t}v(this,Bt).clear(),Yr.delete(this)};let on=po;function pl(e){var t=yr;yr=!0;try{for(var n;;){if(dl(),qe.length===0&&(Z==null||Z.flush(),qe.length===0))return Xr=null,n;Ho()}}finally{yr=t}}function Ho(){Pi=!0;var e=null;try{for(var t=0;qe.length>0;){var n=on.ensure();if(t++>1e3){var r,i;vl()}n.process(qe),an.clear()}}finally{qe=[],Pi=!1,Xr=null}}function vl(){try{el()}catch(e){rn(e,Xr)}}let St=null;function Go(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(Gt|Xe))&&Cr(r)&&(St=new Set,Yn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&ua(r),(St==null?void 0:St.size)>0)){an.clear();for(const i of St){if(i.f&(Gt|Xe))continue;const a=[i];let c=i.parent;for(;c!==null;)St.has(c)&&(St.delete(c),a.push(c)),c=c.parent;for(let u=a.length-1;u>=0;u--){const l=a[u];l.f&(Gt|Xe)||Yn(l)}}St.clear()}}St=null}}function Vo(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&Ie?Vo(i,t,n,r):a&(Ci|Ht)&&!(a&Ae)&&Ko(i,t,r)&&(ge(i,Ae),Ct(i))}}function Ko(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(jn.call(t,i))return!0;if(i.f&Ie&&Ko(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&(br|Kr|No)&&!(e.f&yn)){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Pi&&t===te&&r&Ht&&!(r&zo)&&r&yn)return;if(r&(bn|bt)){if(!(r&Ee))return;t.f^=Ee}}qe.push(t)}function Yo(e,t){if(!(e.f&bt&&e.f&Ee)){e.f&Ae?t.d.push(e):e.f&yt&&t.m.push(e),ge(e,Ee);for(var n=e.first;n!==null;)Yo(n,t),n=n.next}}function hl(e){let t=0,n=Tn(0),r;return()=>{Mi()&&(o(n),Li(()=>(t===0&&(r=Xn(()=>e(()=>xr(n)))),t+=1,()=>{Kt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,xr(n))})})))}}var gl=xn|Fn;function wl(e,t,n,r){new ml(e,t,n,r)}class ml{constructor(t,n,r,i){X(this,Se);_t(this,"parent");_t(this,"is_pending",!1);_t(this,"transform_error");X(this,gt);X(this,vo,null);X(this,Ot);X(this,Nn);X(this,Ve);X(this,qt,null);X(this,Je,null);X(this,At,null);X(this,Jt,null);X(this,Ln,0);X(this,fn,0);X(this,or,!1);X(this,ar,new Set);X(this,sr,new Set);X(this,$t,null);X(this,ui,hl(()=>(G(this,$t,Tn(v(this,Ln))),()=>{G(this,$t,null)})));var a;G(this,gt,t),G(this,Ot,n),G(this,Nn,c=>{var u=te;u.b=this,u.f|=ki,r(c)}),this.parent=te.b,this.transform_error=i??((a=this.parent)==null?void 0:a.transform_error)??(c=>c),G(this,Ve,Sr(()=>{ee(this,Se,Co).call(this)},gl))}defer_effect(t){Fo(t,v(this,ar),v(this,sr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!v(this,Ot).pending}update_pending_count(t){ee(this,Se,Eo).call(this,t),G(this,Ln,v(this,Ln)+t),!(!v(this,$t)||v(this,or))&&(G(this,or,!0),Kt(()=>{G(this,or,!1),v(this,$t)&&Kn(v(this,$t),v(this,Ln))}))}get_effect_pending(){return v(this,ui).call(this),o(v(this,$t))}error(t){var n=v(this,Ot).onerror;let r=v(this,Ot).failed;if(!n&&!r)throw t;v(this,qt)&&(Ue(v(this,qt)),G(this,qt,null)),v(this,Je)&&(Ue(v(this,Je)),G(this,Je,null)),v(this,At)&&(Ue(v(this,At)),G(this,At,null));var i=!1,a=!1;const c=()=>{if(i){sl();return}i=!0,a&&ol(),v(this,At)!==null&&Pn(v(this,At),()=>{G(this,At,null)}),ee(this,Se,_i).call(this,()=>{on.ensure(),ee(this,Se,Co).call(this)})},u=l=>{try{a=!0,n==null||n(l,c),a=!1}catch(f){rn(f,v(this,Ve)&&v(this,Ve).parent)}r&&G(this,At,ee(this,Se,_i).call(this,()=>{on.ensure();try{return ct(()=>{var f=te;f.b=this,f.f|=ki,r(v(this,gt),()=>l,()=>c)})}catch(f){return rn(f,v(this,Ve).parent),null}}))};Kt(()=>{var l;try{l=this.transform_error(t)}catch(f){rn(f,v(this,Ve)&&v(this,Ve).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(u,f=>rn(f,v(this,Ve)&&v(this,Ve).parent)):u(l)})}}gt=new WeakMap,vo=new WeakMap,Ot=new WeakMap,Nn=new WeakMap,Ve=new WeakMap,qt=new WeakMap,Je=new WeakMap,At=new WeakMap,Jt=new WeakMap,Ln=new WeakMap,fn=new WeakMap,or=new WeakMap,ar=new WeakMap,sr=new WeakMap,$t=new WeakMap,ui=new WeakMap,Se=new WeakSet,sf=function(){try{G(this,qt,ct(()=>v(this,Nn).call(this,v(this,gt))))}catch(t){this.error(t)}},lf=function(t){const n=v(this,Ot).failed;n&&G(this,At,ct(()=>{n(v(this,gt),()=>t,()=>()=>{})}))},cf=function(){const t=v(this,Ot).pending;t&&(this.is_pending=!0,G(this,Je,ct(()=>t(v(this,gt)))),Kt(()=>{var n=G(this,Jt,document.createDocumentFragment()),r=Yt();n.append(r),G(this,qt,ee(this,Se,_i).call(this,()=>(on.ensure(),ct(()=>v(this,Nn).call(this,r))))),v(this,fn)===0&&(v(this,gt).before(n),G(this,Jt,null),Pn(v(this,Je),()=>{G(this,Je,null)}),ee(this,Se,mi).call(this))}))},Co=function(){try{if(this.is_pending=this.has_pending_snippet(),G(this,fn,0),G(this,Ln,0),G(this,qt,ct(()=>{v(this,Nn).call(this,v(this,gt))})),v(this,fn)>0){var t=G(this,Jt,document.createDocumentFragment());pa(v(this,qt),t);const n=v(this,Ot).pending;G(this,Je,ct(()=>n(v(this,gt))))}else ee(this,Se,mi).call(this)}catch(n){this.error(n)}},mi=function(){this.is_pending=!1;for(const t of v(this,ar))ge(t,Ae),Ct(t);for(const t of v(this,sr))ge(t,yt),Ct(t);v(this,ar).clear(),v(this,sr).clear()},_i=function(t){var n=te,r=$,i=_e;Nt(v(this,Ve)),ut(v(this,Ve)),Gn(v(this,Ve).ctx);try{return t()}catch(a){return jo(a),null}finally{Nt(n),ut(r),Gn(i)}},Eo=function(t){var n;if(!this.has_pending_snippet()){this.parent&&ee(n=this.parent,Se,Eo).call(n,t);return}G(this,fn,v(this,fn)+t),v(this,fn)===0&&(ee(this,Se,mi).call(this),v(this,Je)&&Pn(v(this,Je),()=>{G(this,Je,null)}),v(this,Jt)&&(v(this,gt).before(v(this,Jt)),G(this,Jt,null)))};function _l(e,t,n,r){const i=Vn()?Zr:Ai;var a=e.filter(_=>!_.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var c=te,u=bl(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(_=>_.promise)):null;function f(_){u();try{r(_)}catch(w){c.f&Gt||rn(w,c)}Ii()}if(n.length===0){l.then(()=>f(t.map(i)));return}function h(){u(),Promise.all(n.map(_=>xl(_))).then(_=>f([...t.map(i),..._])).catch(_=>rn(_,c))}l?l.then(h):h()}function bl(){var e=te,t=$,n=_e,r=Z;return function(a=!0){Nt(e),ut(t),Gn(n),a&&(r==null||r.activate())}}function Ii(e=!0){Nt(null),ut(null),Gn(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=Ie|Ae,n=$!==null&&$.f&Ie?$:null;return te!==null&&(te.f|=Fn),{ctx:_e,deps:null,effects:null,equals:Bo,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:n??te,ac:null}}function xl(e,t,n){te===null&&Xs();var i=void 0,a=Tn(Pe),c=!$,u=new Map;return Ll(()=>{var w;var l=Wo();i=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).finally(Ii)}catch(p){l.reject(p),Ii()}var f=Z;if(c){var h=yl();(w=u.get(f))==null||w.reject(Cn),u.delete(f),u.set(f,l)}const _=(p,b=void 0)=>{if(f.activate(),b)b!==Cn&&(a.f|=nn,Kn(a,b));else{a.f&nn&&(a.f^=nn),Kn(a,p);for(const[x,d]of u){if(u.delete(x),x===f)break;d.reject(Cn)}}h&&h()};l.promise.then(_,p=>_(null,p||"unknown"))}),Wi(()=>{for(const l of u.values())l.reject(Cn)}),new Promise(l=>{function f(h){function _(){h===i?l(a):f(i)}h.then(_,_)}f(i)})}function F(e){const t=Zr(e);return ha(t),t}function Ai(e){const t=Zr(e);return t.equals=Oo,t}function kl(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ue(t[n])}}function Sl(e){for(var t=e.parent;t!==null;){if(!(t.f&Ie))return t.f&Gt?null:t;t=t.parent}return null}function Di(e){var t,n=te;Nt(Sl(e));try{e.f&=~kn,kl(e),t=ba(e)}finally{Nt(n)}return t}function Xo(e){var t=Di(e);if(!e.equals(t)&&(e.wv=ma(),(!(Z!=null&&Z.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){ge(e,Ee);return}ln||(De!==null?(Mi()||Z!=null&&Z.is_fork)&&De.set(e,t):Ei(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=xi,r.ac=null,Er(r,0),zi(r))}function Zo(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Yn(t)}let Ri=new Set;const an=new Map;let Qo=!1;function Tn(e,t){var n={f:0,v:e,reactions:null,equals:Bo,rv:0,wv:0};return n}function U(e,t){const n=Tn(e);return ha(n),n}function El(e,t=!1,n=!0){var i;const r=Tn(e);return t||(r.equals=Oo),Hn&&n&&_e!==null&&_e.l!==null&&((i=_e.l).s??(i.s=[])).push(r),r}function g(e,t,n=!1){$!==null&&(!Et||$.f&Lo)&&Vn()&&$.f&(Ie|Ht|Ci|Lo)&&(dt===null||!jn.call(dt,e))&&il();let r=n?Re(t):t;return Kn(e,r)}function Kn(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&Ie){const i=e;e.f&Ae&&Di(i),Ei(i)}e.wv=ma(),$o(e,Ae),Vn()&&te!==null&&te.f&Ee&&!(te.f&(bt|bn))&&(ft===null?Ol([e]):ft.push(e)),!r.is_fork&&Ri.size>0&&!Qo&&Tl()}return t}function Tl(){Qo=!1;for(const e of Ri)e.f&Ee&&ge(e,yt),Cr(e)&&Yn(e);Ri.clear()}function Jo(e,t=1){var n=o(e),r=t===1?n++:n--;return g(e,n),r}function xr(e){g(e,e.v+1)}function $o(e,t){var n=e.reactions;if(n!==null)for(var r=Vn(),i=n.length,a=0;a<i;a++){var c=n[a],u=c.f;if(!(!r&&c===te)){var l=(u&Ae)===0;if(l&&ge(c,t),u&Ie){var f=c;De==null||De.delete(f),u&kn||(u&lt&&(c.f|=kn),$o(f,yt))}else l&&(u&Ht&&St!==null&&St.add(c),Ct(c))}}}function Re(e){if(typeof e!="object"||e===null||Sn in e)return e;const t=Ro(e);if(t!==js&&t!==Us)return e;var n=new Map,r=yi(e),i=U(0),a=An,c=u=>{if(An===a)return u();var l=$,f=An;ut(null),wa(a);var h=u();return ut(l),wa(f),h};return r&&n.set("length",U(e.length)),new Proxy(e,{defineProperty(u,l,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&nl();var h=n.get(l);return h===void 0?c(()=>{var _=U(f.value);return n.set(l,_),_}):g(h,f.value,!0),!0},deleteProperty(u,l){var f=n.get(l);if(f===void 0){if(l in u){const h=c(()=>U(Pe));n.set(l,h),xr(i)}}else g(f,Pe),xr(i);return!0},get(u,l,f){var p;if(l===Sn)return e;var h=n.get(l),_=l in u;if(h===void 0&&(!_||(p=Un(u,l))!=null&&p.writable)&&(h=c(()=>{var b=Re(_?u[l]:Pe),x=U(b);return x}),n.set(l,h)),h!==void 0){var w=o(h);return w===Pe?void 0:w}return Reflect.get(u,l,f)},getOwnPropertyDescriptor(u,l){var f=Reflect.getOwnPropertyDescriptor(u,l);if(f&&"value"in f){var h=n.get(l);h&&(f.value=o(h))}else if(f===void 0){var _=n.get(l),w=_==null?void 0:_.v;if(_!==void 0&&w!==Pe)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return f},has(u,l){var w;if(l===Sn)return!0;var f=n.get(l),h=f!==void 0&&f.v!==Pe||Reflect.has(u,l);if(f!==void 0||te!==null&&(!h||(w=Un(u,l))!=null&&w.writable)){f===void 0&&(f=c(()=>{var p=h?Re(u[l]):Pe,b=U(p);return b}),n.set(l,f));var _=o(f);if(_===Pe)return!1}return h},set(u,l,f,h){var N;var _=n.get(l),w=l in u;if(r&&l==="length")for(var p=f;p<_.v;p+=1){var b=n.get(p+"");b!==void 0?g(b,Pe):p in u&&(b=c(()=>U(Pe)),n.set(p+"",b))}if(_===void 0)(!w||(N=Un(u,l))!=null&&N.writable)&&(_=c(()=>U(void 0)),g(_,Re(f)),n.set(l,_));else{w=_.v!==Pe;var x=c(()=>Re(f));g(_,x)}var d=Reflect.getOwnPropertyDescriptor(u,l);if(d!=null&&d.set&&d.set.call(h,f),!w){if(r&&typeof l=="string"){var k=n.get("length"),z=Number(l);Number.isInteger(z)&&z>=k.v&&g(k,z+1)}xr(i)}return!0},ownKeys(u){o(i);var l=Reflect.ownKeys(u).filter(_=>{var w=n.get(_);return w===void 0||w.v!==Pe});for(var[f,h]of n)h.v!==Pe&&!(f in u)&&l.push(f);return l},setPrototypeOf(){rl()}})}function ea(e){try{if(e!==null&&typeof e=="object"&&Sn in e)return e[Sn]}catch{}return e}function Pl(e,t){return Object.is(ea(e),ea(t))}var ta,na,ra,ia;function Il(){if(ta===void 0){ta=window,na=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;ra=Un(t,"firstChild").get,ia=Un(t,"nextSibling").get,Mo(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Mo(n)&&(n.__t=void 0)}}function Yt(e=""){return document.createTextNode(e)}function Xt(e){return ra.call(e)}function kr(e){return ia.call(e)}function y(e,t){return Xt(e)}function je(e,t=!1){{var n=Xt(e);return n instanceof Comment&&n.data===""?kr(n):n}}function E(e,t=1,n=!1){let r=e;for(;t--;)r=kr(r);return r}function Al(e){e.textContent=""}function oa(){return!1}function aa(e,t,n){return document.createElementNS(Do,e,void 0)}let sa=!1;function Dl(){sa||(sa=!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),Nt(null);try{return e()}finally{ut(t),Nt(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 Zt(e,t,n){var r=te;r!==null&&r.f&Xe&&(e|=Xe);var i={ctx:_e,deps:null,nodes:null,f:e|Ae|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{Yn(i)}catch(u){throw Ue(i),u}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&Fn)&&(a=a.first,e&Ht&&e&xn&&a!==null&&(a.f|=xn)),a!==null&&(a.parent=r,r!==null&&Wl(a,r),$!==null&&$.f&Ie&&!(e&bn))){var c=$;(c.effects??(c.effects=[])).push(a)}return i}function Mi(){return $!==null&&!Et}function Wi(e){const t=Zt(Kr,null,!1);return ge(t,Ee),t.teardown=e,t}function sn(e){Ml();var t=te.f,n=!$&&(t&bt)!==0&&(t&yn)===0;if(n){var r=_e;(r.e??(r.e=[])).push(e)}else return la(e)}function la(e){return Zt(br|Gs,e,!1)}function Nl(e){on.ensure();const t=Zt(bn|Fn,e,!0);return(n={})=>new Promise(r=>{n.outro?Pn(t,()=>{Ue(t),r(void 0)}):(Ue(t),r(void 0))})}function Ni(e){return Zt(br,e,!1)}function Ll(e){return Zt(Ci|Fn,e,!0)}function Li(e,t=0){return Zt(Kr|t,e,!0)}function R(e,t=[],n=[],r=[]){_l(r,t,n,i=>{Zt(Kr,()=>e(...i.map(o)),!0)})}function Sr(e,t=0){var n=Zt(Ht|t,e,!0);return n}function ct(e){return Zt(bt|Fn,e,!0)}function ca(e){var t=e.teardown;if(t!==null){const n=ln,r=$;va(!0),ut(null);try{t.call(null)}finally{va(n),ut(r)}}}function zi(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:Ue(n,t),n=r}}function zl(e){for(var t=e.first;t!==null;){var n=t.next;t.f&bt||Ue(t),t=n}}function Ue(e,t=!0){var n=!1;(t||e.f&zo)&&e.nodes!==null&&e.nodes.end!==null&&(Bl(e.nodes.start,e.nodes.end),n=!0),zi(e,t&&!n),Er(e,0),ge(e,Gt);var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)a.stop();ca(e);var i=e.parent;i!==null&&i.first!==null&&ua(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:kr(e);e.remove(),e=n}}function ua(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=[];da(e,r,!0);var i=()=>{n&&Ue(e),t&&t()},a=r.length;if(a>0){var c=()=>--a||i();for(var u of r)u.out(c)}else i()}function da(e,t,n){if(!(e.f&Xe)){e.f^=Xe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const u of r)(u.is_global||n)&&t.push(u);for(var i=e.first;i!==null;){var a=i.next,c=(i.f&xn)!==0||(i.f&bt)!==0&&(e.f&Ht)!==0;da(i,t,c?n:!1),i=a}}}function Bi(e){fa(e,!0)}function fa(e,t){if(e.f&Xe){e.f^=Xe,e.f&Ee||(ge(e,Ae),Ct(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&xn)!==0||(n.f&bt)!==0;fa(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(const c of a)(c.is_global||t)&&c.in()}}function pa(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:kr(n);t.append(n),n=i}}let Jr=!1,ln=!1;function va(e){ln=e}let $=null,Et=!1;function ut(e){$=e}let te=null;function Nt(e){te=e}let dt=null;function ha(e){$!==null&&(dt===null?dt=[e]:dt.push(e))}let Fe=null,Ze=0,ft=null;function Ol(e){ft=e}let ga=1,In=0,An=In;function wa(e){An=e}function ma(){return++ga}function Cr(e){var t=e.f;if(t&Ae)return!0;if(t&Ie&&(e.f&=~kn),t&yt){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Cr(a)&&Xo(a),a.wv>e.wv)return!0}t&lt&&De===null&&ge(e,Ee)}return!1}function _a(e,t,n=!0){var r=e.reactions;if(r!==null&&!(dt!==null&&jn.call(dt,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&Ie?_a(a,t,!1):t===a&&(n?ge(a,Ae):a.f&Ee&&ge(a,yt),Ct(a))}}function ba(e){var x;var t=Fe,n=Ze,r=ft,i=$,a=dt,c=_e,u=Et,l=An,f=e.f;Fe=null,Ze=0,ft=null,$=f&(bt|bn)?null:e,dt=null,Gn(e.ctx),Et=!1,An=++In,e.ac!==null&&(Qr(()=>{e.ac.abort(Cn)}),e.ac=null);try{e.f|=Si;var h=e.fn,_=h();e.f|=yn;var w=e.deps,p=Z==null?void 0:Z.is_fork;if(Fe!==null){var b;if(p||Er(e,Ze),w!==null&&Ze>0)for(w.length=Ze+Fe.length,b=0;b<Fe.length;b++)w[Ze+b]=Fe[b];else e.deps=w=Fe;if(Mi()&&e.f&lt)for(b=Ze;b<w.length;b++)((x=w[b]).reactions??(x.reactions=[])).push(e)}else!p&&w!==null&&Ze<w.length&&(Er(e,Ze),w.length=Ze);if(Vn()&&ft!==null&&!Et&&w!==null&&!(e.f&(Ie|yt|Ae)))for(b=0;b<ft.length;b++)_a(ft[b],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),_}catch(d){return jo(d)}finally{e.f^=Si,Fe=t,Ze=n,ft=r,$=i,dt=a,Gn(c),Et=u,An=l}}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&Ie&&(Fe===null||!jn.call(Fe,t))){var a=t;a.f&lt&&(a.f^=lt,a.f&=~kn),Ei(a),Cl(a),Er(a,0)}}function Er(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ql(e,n[r])}function Yn(e){var t=e.f;if(!(t&Gt)){ge(e,Ee);var n=te,r=Jr;te=e,Jr=!0;try{t&(Ht|No)?zl(e):zi(e),ca(e);var i=ba(e);e.teardown=typeof i=="function"?i:null,e.wv=ga;var a;bi&&cl&&e.f&Ae&&e.deps}finally{Jr=r,te=n}}}async function jl(){await Promise.resolve(),pl()}function o(e){var t=e.f,n=(t&Ie)!==0;if($!==null&&!Et){var r=te!==null&&(te.f&Gt)!==0;if(!r&&(dt===null||!jn.call(dt,e))){var i=$.deps;if($.f&Si)e.rv<In&&(e.rv=In,Fe===null&&i!==null&&i[Ze]===e?Ze++:Fe===null?Fe=[e]:Fe.push(e));else{($.deps??($.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[$]:jn.call(a,$)||a.push($)}}}if(ln&&an.has(e))return an.get(e);if(n){var c=e;if(ln){var u=c.v;return(!(c.f&Ee)&&c.reactions!==null||xa(c))&&(u=Di(c)),an.set(c,u),u}var l=(c.f&lt)===0&&!Et&&$!==null&&(Jr||($.f&lt)!==0),f=(c.f&yn)===0;Cr(c)&&(l&&(c.f|=lt),Xo(c)),l&&!f&&(Zo(c),ya(c))}if(De!=null&&De.has(e))return De.get(e);if(e.f&nn)throw e.v;return e.v}function ya(e){if(e.f|=lt,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&Ie&&!(t.f&lt)&&(Zo(t),ya(t))}function xa(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(an.has(t)||t.f&Ie&&xa(t))return!0;return!1}function Xn(e){var t=Et;try{return Et=!0,e()}finally{Et=t}}const Dn=Symbol("events"),ka=new Set,Oi=new Set;function Ul(e,t,n,r={}){function i(a){if(r.capture||qi.call(t,a),!a.cancelBubble)return Qr(()=>n==null?void 0:n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Kt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function pt(e,t,n,r,i){var a={capture:r,passive:i},c=Ul(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Wi(()=>{t.removeEventListener(e,c,a)})}function xe(e,t,n){(t[Dn]??(t[Dn]={}))[e]=n}function Tr(e){for(var t=0;t<e.length;t++)ka.add(e[t]);for(var n of Oi)n(e)}let Sa=null;function qi(e){var d,k;var t=this,n=t.ownerDocument,r=e.type,i=((d=e.composedPath)==null?void 0:d.call(e))||[],a=i[0]||e.target;Sa=e;var c=0,u=Sa===e&&e[Dn];if(u){var l=i.indexOf(u);if(l!==-1&&(t===document||t===window)){e[Dn]=t;return}var f=i.indexOf(t);if(f===-1)return;l<=f&&(c=l)}if(a=i[c]||e.target,a!==t){Os(e,"currentTarget",{configurable:!0,get(){return a||n}});var h=$,_=te;ut(null),Nt(null);try{for(var w,p=[];a!==null;){var b=a.assignedSlot||a.parentNode||a.host||null;try{var x=(k=a[Dn])==null?void 0:k[r];x!=null&&(!a.disabled||e.target===a)&&x.call(a,e)}catch(z){w?p.push(z):w=z}if(e.cancelBubble||b===t||b===null)break;a=b}if(w){for(let z of p)queueMicrotask(()=>{throw z});throw w}}finally{e[Dn]=t,delete e.currentTarget,ut(h),Nt(_)}}}const ji=((ys=globalThis==null?void 0:globalThis.window)==null?void 0:ys.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Fl(e){return(ji==null?void 0:ji.createHTML(e))??e}function Ca(e){var t=aa("template");return t.innerHTML=Fl(e.replaceAll("<!>","<!---->")),t.content}function Zn(e,t){var n=te;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var n=(t&Ao)!==0,r=(t&zs)!==0,i,a=!e.startsWith("<!>");return()=>{i===void 0&&(i=Ca(a?e:"<!>"+e),n||(i=Xt(i)));var c=r||na?document.importNode(i,!0):i.cloneNode(!0);if(n){var u=Xt(c),l=c.lastChild;Zn(u,l)}else Zn(c,c);return c}}function Hl(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&Ao)!==0,a=`<${n}>${r?e:"<!>"+e}</${n}>`,c;return()=>{if(!c){var u=Ca(a),l=Xt(u);if(i)for(c=document.createDocumentFragment();Xt(l);)c.appendChild(Xt(l));else c=Xt(l)}var f=c.cloneNode(!0);if(i){var h=Xt(f),_=f.lastChild;Zn(h,_)}else Zn(f,f);return f}}function Tt(e,t){return Hl(e,t,"svg")}function Qt(e=""){{var t=Yt(e+"");return Zn(t,t),t}}function Qn(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Yt();return e.append(t,n),Zn(t,n),e}function S(e,t){e!==null&&e.before(t)}const Gl=["touchstart","touchmove"];function Vl(e){return Gl.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 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:c=!0,transformError:u}){Il();var l=void 0,f=Nl(()=>{var h=n??t.appendChild(Yt());wl(h,{pending:()=>{}},p=>{xt({});var b=_e;a&&(b.c=a),i&&(r.$$events=i),l=e(p,r)||{},kt()},u);var _=new Set,w=p=>{for(var b=0;b<p.length;b++){var x=p[b];if(!_.has(x)){_.add(x);var d=Vl(x);for(const N of[t,document]){var k=$r.get(N);k===void 0&&(k=new Map,$r.set(N,k));var z=k.get(x);z===void 0?(N.addEventListener(x,qi,{passive:d}),k.set(x,1)):k.set(x,z+1)}}}};return w(Vr(ka)),Oi.add(w),()=>{var d;for(var p of _)for(const k of[t,document]){var b=$r.get(k),x=b.get(p);--x==0?(k.removeEventListener(p,qi),b.delete(p),b.size===0&&$r.delete(k)):b.set(p,x)}Oi.delete(w),h!==n&&((d=h.parentNode)==null||d.removeChild(h))}});return Xl.set(l,f),l}let Xl=new WeakMap;class Ui{constructor(t,n=!0){_t(this,"anchor");X(this,Dt,new Map);X(this,jt,new Map);X(this,$e,new Map);X(this,zn,new Set);X(this,Nr,!0);X(this,Lr,()=>{var t=Z;if(v(this,Dt).has(t)){var n=v(this,Dt).get(t),r=v(this,jt).get(n);if(r)Bi(r),v(this,zn).delete(n);else{var i=v(this,$e).get(n);i&&(v(this,jt).set(n,i.effect),v(this,$e).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[a,c]of v(this,Dt)){if(v(this,Dt).delete(a),a===t)break;const u=v(this,$e).get(c);u&&(Ue(u.effect),v(this,$e).delete(c))}for(const[a,c]of v(this,jt)){if(a===n||v(this,zn).has(a))continue;const u=()=>{if(Array.from(v(this,Dt).values()).includes(a)){var f=document.createDocumentFragment();pa(c,f),f.append(Yt()),v(this,$e).set(a,{effect:c,fragment:f})}else Ue(c);v(this,zn).delete(a),v(this,jt).delete(a)};v(this,Nr)||!r?(v(this,zn).add(a),Pn(c,u,!1)):u()}}});X(this,di,t=>{v(this,Dt).delete(t);const n=Array.from(v(this,Dt).values());for(const[r,i]of v(this,$e))n.includes(r)||(Ue(i.effect),v(this,$e).delete(r))});this.anchor=t,G(this,Nr,n)}ensure(t,n){var r=Z,i=oa();if(n&&!v(this,jt).has(t)&&!v(this,$e).has(t))if(i){var a=document.createDocumentFragment(),c=Yt();a.append(c),v(this,$e).set(t,{effect:ct(()=>n(c)),fragment:a})}else v(this,jt).set(t,ct(()=>n(this.anchor)));if(v(this,Dt).set(r,t),i){for(const[u,l]of v(this,jt))u===t?r.unskip_effect(l):r.skip_effect(l);for(const[u,l]of v(this,$e))u===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(v(this,Lr)),r.ondiscard(v(this,di))}else v(this,Lr).call(this)}}Dt=new WeakMap,jt=new WeakMap,$e=new WeakMap,zn=new WeakMap,Nr=new WeakMap,Lr=new WeakMap,di=new WeakMap;function ei(e){_e===null&&Ys(),Hn&&_e.l!==null?Zl(_e).m.push(e):sn(()=>{const t=Xn(e);if(typeof t=="function")return t})}function Zl(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function H(e,t,n=!1){var r=new Ui(e),i=n?xn:0;function a(c,u){r.ensure(c,u)}Sr(()=>{var c=!1;t((u,l=0)=>{c=!0,a(l,u)}),c||a(!1,null)},i)}const Ql=Symbol("NaN");function Ea(e,t,n){var r=new Ui(e),i=!Vn();Sr(()=>{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,c=t.length,u=0;u<i;u++){let _=t[u];Pn(_,()=>{if(a){if(a.pending.delete(_),a.done.add(_),a.pending.size===0){var w=e.outrogroups;Fi(Vr(a.done)),w.delete(a),w.size===0&&(e.outrogroups=null)}}else c-=1},!1)}if(c===0){var l=r.length===0&&n!==null;if(l){var f=n,h=f.parentNode;Al(h),h.append(f),e.items.clear()}Fi(t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function Fi(e,t=!0){for(var n=0;n<e.length;n++)Ue(e[n],t)}var Ta;function Lt(e,t,n,r,i,a=null){var c=e,u=new Map,l=(t&_r)!==0;if(l){var f=e;c=f.appendChild(Yt())}var h=null,_=Ai(()=>{var k=n();return yi(k)?k:k==null?[]:Vr(k)}),w,p=!0;function b(){d.fallback=h,$l(d,w,c,t,r),h!==null&&(w.length===0?h.f&Vt?(h.f^=Vt,Ir(h,null,c)):Bi(h):Pn(h,()=>{h=null}))}var x=Sr(()=>{w=o(_);for(var k=w.length,z=new Set,N=Z,T=oa(),D=0;D<k;D+=1){var I=w[D],C=r(I,D),A=p?null:u.get(C);A?(A.v&&Kn(A.v,I),A.i&&Kn(A.i,D),T&&N.unskip_effect(A.e)):(A=ec(u,p?c:Ta??(Ta=Yt()),I,C,D,i,t,n),p||(A.e.f|=Vt),u.set(C,A)),z.add(C)}if(k===0&&a&&!h&&(p?h=ct(()=>a(c)):(h=ct(()=>a(Ta??(Ta=Yt()))),h.f|=Vt)),k>z.size&&Zs(),!p)if(T){for(const[V,K]of u)z.has(V)||N.skip_effect(K.e);N.oncommit(b),N.ondiscard(()=>{})}else b();o(_)}),d={effect:x,items:u,outrogroups:null,fallback:h};p=!1}function Pr(e){for(;e!==null&&!(e.f&bt);)e=e.next;return e}function $l(e,t,n,r,i){var K,ne,ce,de,et,We,ve,tt,Rt;var a=(r&As)!==0,c=t.length,u=e.items,l=Pr(e.effect.first),f,h=null,_,w=[],p=[],b,x,d,k;if(a)for(k=0;k<c;k+=1)b=t[k],x=i(b,k),d=u.get(x).e,d.f&Vt||((ne=(K=d.nodes)==null?void 0:K.a)==null||ne.measure(),(_??(_=new Set)).add(d));for(k=0;k<c;k+=1){if(b=t[k],x=i(b,k),d=u.get(x).e,e.outrogroups!==null)for(const Ne of e.outrogroups)Ne.pending.delete(d),Ne.done.delete(d);if(d.f&Vt)if(d.f^=Vt,d===l)Ir(d,null,n);else{var z=h?h.next:l;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,z),Ir(d,z,n),h=d,w=[],p=[],l=Pr(h.next);continue}if(d.f&Xe&&(Bi(d),a&&((de=(ce=d.nodes)==null?void 0:ce.a)==null||de.unfix(),(_??(_=new Set)).delete(d))),d!==l){if(f!==void 0&&f.has(d)){if(w.length<p.length){var N=p[0],T;h=N.prev;var D=w[0],I=w[w.length-1];for(T=0;T<w.length;T+=1)Ir(w[T],N,n);for(T=0;T<p.length;T+=1)f.delete(p[T]);cn(e,D.prev,I.next),cn(e,h,D),cn(e,I,N),l=N,h=I,k-=1,w=[],p=[]}else f.delete(d),Ir(d,l,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=[];l!==null&&l!==d;)(f??(f=new Set)).add(l),p.push(l),l=Pr(l.next);if(l===null)continue}d.f&Vt||w.push(d),h=d,l=Pr(d.next)}if(e.outrogroups!==null){for(const Ne of e.outrogroups)Ne.pending.size===0&&(Fi(Vr(Ne.done)),(et=e.outrogroups)==null||et.delete(Ne));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||f!==void 0){var C=[];if(f!==void 0)for(d of f)d.f&Xe||C.push(d);for(;l!==null;)!(l.f&Xe)&&l!==e.fallback&&C.push(l),l=Pr(l.next);var A=C.length;if(A>0){var V=r&_r&&c===0?n:null;if(a){for(k=0;k<A;k+=1)(ve=(We=C[k].nodes)==null?void 0:We.a)==null||ve.measure();for(k=0;k<A;k+=1)(Rt=(tt=C[k].nodes)==null?void 0:tt.a)==null||Rt.fix()}Jl(e,C,V)}}a&&Kt(()=>{var Ne,nt;if(_!==void 0)for(d of _)(nt=(Ne=d.nodes)==null?void 0:Ne.a)==null||nt.apply()})}function ec(e,t,n,r,i,a,c,u){var l=c&le?c&Ds?Tn(n):El(n,!1,!1):null,f=c&ye?Tn(i):null;return{v:l,i:f,e:ct(()=>(a(t,l??n,f??i,u),()=>{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&Vt)?t.nodes.start:n;r!==null;){var c=kr(r);if(a.before(r),r===i)return;r=c}}function cn(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Pa(e,t,n,r,i){var u;var a=(u=t.$$slots)==null?void 0:u[n],c=!1;a===!0&&(a=t.children,c=!0),a===void 0||a(e,c?()=>r:r)}function Ia(e,t,n){var r=new Ui(e);Sr(()=>{var i=t()??null;r.ensure(i,i&&(a=>n(a,i)))},xn)}function Pt(e,t){Ni(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=aa("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function tc(e,t,n){Ni(()=>{var r=Xn(()=>t(e,n==null?void 0:n())||{});if(r!=null&&r.destroy)return()=>r.destroy()})}function Aa(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=Aa(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=Aa(e))&&(r&&(r+=" "),r+=t);return r}function Jn(e){return typeof e=="object"?nc(e):e??""}const Da=[...`
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,c=0;(c=r.indexOf(i,c))>=0;){var u=c+a;(c===0||Da.includes(r[c-1]))&&(u===r.length||Da.includes(r[u]))?r=(c===0?"":r.substring(0,c))+r.substring(u+1):c=u}}return r===""?null:r}function Ra(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+=Ra(r)),i&&(n+=Ra(i,!0)),n=n.trim(),n===""?null:n}return String(e)}function He(e,t,n,r,i,a){var c=e.__className;if(c!==n||c===void 0){var u=rc(n,r,a);u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u),e.__className=n}else if(a&&i!==a)for(var l in a){var f=!!a[l];(i==null||f!==!!i[l])&&e.classList.toggle(l,f)}return a}function Hi(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)?(Hi(e,n==null?void 0:n[0],r[0]),Hi(e,n==null?void 0:n[1],r[1],"important")):Hi(e,n,r));return r}function Ma(e,t,n=!1){if(e.multiple){if(t==null)return;if(!yi(t))return al();for(var r of e.options)r.selected=t.includes(Wa(r));return}for(r of e.options){var i=Wa(r);if(Pl(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function oc(e){var t=new MutationObserver(()=>{Ma(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Wi(()=>{t.disconnect()})}function Wa(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 M(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===Do})}var Na=new Map;function uc(e){var t=e.getAttribute("is")||e.nodeName,n=Na.get(t);if(n)return n;Na.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){r=qs(i);for(var c in r)r[c].set&&n.push(c);i=Ro(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=Gi(e)?Vi(a):a,n(a),Z!==null&&r.add(Z),await jl(),a!==(a=t())){var c=e.selectionStart,u=e.selectionEnd,l=e.value.length;if(e.value=a??"",u!==null){var f=e.value.length;c===u&&u===l&&f>l?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=c,e.selectionEnd=Math.min(u,f))}}}),Xn(t)==null&&e.value&&(n(Gi(e)?Vi(e.value):e.value),Z!==null&&r.add(Z)),Li(()=>{var i=t();if(e===document.activeElement){var a=Ti??Z;if(r.has(a))return}Gi(e)&&i===Vi(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function Gi(e){var t=e.type;return t==="number"||t==="range"}function Vi(e){return e===""?null:+e}function La(e,t){return e===t||(e==null?void 0:e[Sn])===t}function Ki(e={},t,n,r){return Ni(()=>{var i,a;return Li(()=>{i=a,a=[],Xn(()=>{e!==n(...a)&&(t(e,...a),i&&La(n(...i),e)&&t(null,...i))})}),()=>{Kt(()=>{a&&La(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 Ge(e,t,n,r){var N;var i=!Hn||(n&Ms)!==0,a=(n&Ns)!==0,c=(n&Ls)!==0,u=r,l=!0,f=()=>(l&&(l=!1,u=c?Xn(r):r),u),h;if(a){var _=Sn in e||Vs in e;h=((N=Un(e,t))==null?void 0:N.set)??(_&&t in e?T=>e[t]=T: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 b;if(i?b=()=>{var T=e[t];return T===void 0?f():(l=!0,T)}:b=()=>{var T=e[t];return T!==void 0&&(u=void 0),T===void 0?u:T},i&&!(n&Ws))return b;if(h){var x=e.$$legacy;return function(T,D){return arguments.length>0?((!i||!D||x||p)&&h(D?b():T),T):b()}}var d=!1,k=(n&Rs?Zr:Ai)(()=>(d=!1,b()));a&&o(k);var z=te;return function(T,D){if(arguments.length>0){const I=D?o(k):i&&a?Re(T):T;return g(k,I),d=!0,u!==void 0&&(u=I),T}return ln&&d||z.f&Gt?k.v:o(k)}}const za="wineater_consent",pc=["wineater_uid","uniqueUserID","sessionID"];function vc(){try{const e=window.localStorage.getItem(za);return e==="granted"||e==="denied"?e:null}catch{return null}}let Yi=U(Re(vc())),ri=U(null),ii=null;function hc(e){ii=e}function gc(e){g(ri,e,!0)}function Ba(){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&&Ba()&&o(Yi)===null}function Oa(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1?!1:ii?ii():o(ri)===null?!1:Ba()?o(Yi)==="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 Xi=new Set;function _c(e){return Xi.add(e),()=>Xi.delete(e)}function qa(e){g(Yi,e,!0);try{window.localStorage.setItem(za,e)}catch{}e==="denied"&&mc();for(const t of Xi)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 Zi;function vt(){var e;return Zi===void 0&&(Zi=typeof window>"u"?null:yc((e=window.wineaterData)==null?void 0:e.shopify)),Zi}function ja(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 Ua extends Error{constructor(){super("quota_exceeded"),this.name="QuotaExceededError"}}let Qi=null;function Fa(){var t,n;if(Qi)return Qi;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 Qi=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 Ha="5.1.2";function Ga(){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 Ji(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 $i(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=$i(e);return t||(t=Ga(),Ji(e,t,365)),t}function ke(e,t,n={},r={}){var b;const i=(b=vt())==null?void 0:b.shop,a=i?"https://api.wineater.com/shopify/storefront/events":"https://api.wineater.com/api/widget-events",c=i?{shop:i}:{},u=new Date().toISOString(),l=navigator.language.split("-")[1]||null,f=navigator.language.split("-")[0]||"en";if(!Oa()){const x={...c,event_type:e,store_id:t,event_time:u,data:n,meta:{...r,anonymous:!0,widget_version:Ha},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:l,language:f};return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x),keepalive:!0}).catch(d=>{console.debug("[wineater] anonymous event failed:",d==null?void 0:d.message)})}let h=$i("uniqueUserID");h||(h=Ec());const _={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let w=$i("sessionID");w||(w=Ga(),Ji("sessionID",w,1));const p={...c,event_type:e,store_id:t,session_id:w,event_time:u,data:n,meta:{...r,user_id:h,widget_version:Ha},device_info:_,region:l,language:f};return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),keepalive:!!i}).then(x=>x.ok?x.json():x.json().then(d=>{throw new Error(d.message||"Failed to track widget event")})).then(()=>{}).catch(x=>{console.error("Widget event tracking error:",x)})}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 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 Pc(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(Ar),hasMore:!!e.has_more}}const eo=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:eo(n.total),type:n.type??null,grape:n.grape??null,region:n.region??null,country:n.country??null,vintage:eo(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:eo(n.glass_price),priceLevel:n.predicted_price_level||null,rank:r})),queryId:(e==null?void 0:e.query_id)??null}}const Dr="wineater_uid",Ac=365;let oi=null;function Va(){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 Ka=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function Ya(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 Xa(){return Oa()}_c(e=>{e==="denied"&&(oi=null)});function to(){if(!Xa())return null;if(oi)return oi;let e=null;try{e=window.localStorage.getItem(Dr)}catch{}(!e||!Ka.test(e))&&(e=Ya(Dr)),(!e||!Ka.test(e))&&(e=Va());try{window.localStorage.setItem(Dr,e)}catch{}return Ya(Dr)!==e&&Dc(Dr,e),oi=e,e}function Za(){return Va()}const Rc=2e3,Qa=100;let ai=null,$n=[],Rr=null,Ja=!1;function Mc(e){ai=e,!(Ja||typeof document>"u")&&(Ja=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Mr()}),window.addEventListener("pagehide",()=>void Mr()))}function It(e){var t;if(!(!Xa()||!ai)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if($n.push(e),$n.length>=Qa){Mr();return}Rr||(Rr=setTimeout(()=>void Mr(),Rc))}}async function Mr(){if(Rr&&(clearTimeout(Rr),Rr=null),!ai||$n.length===0)return;const e=to();if(!e){$n=[];return}const t=$n.splice(0,Qa);try{await ai({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}$n.length>0&&Mr()}const $a=24;function es(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 c=i.tags.filter(u=>typeof u=="string"&&u.trim());c.length&&(a.tags=c)}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 c=0;c<r.length;c+=$a)try{const u=await e({ids:r.slice(c,c+$a),language:n});u&&typeof u.translations=="object"&&u.translations&&(Object.assign(i,u.translations),a=!0)}catch{}return a?{language:n,translations:i}:null}const Lc="X-Wineater-Uid";class ts 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,pe);X(this,lr,"https://api.wineater.com/");X(this,zr);X(this,pn);X(this,cr,!1);X(this,ur,null);X(this,vn,null);G(this,zr,t),G(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,pe,Po).call(this,r,n?ee(this,pe,Io).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,pe,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,pe,Ft).call(this,r,v(this,pn)==="2"?si(i,v(this,vn)):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(v(this,pn)!=="2"||vt())return i();let a;try{a=await fetch(`${v(this,lr)}dish/recommendations/search/v2/stream`,{method:"POST",headers:ee(this,pe,To).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 c=a.body.getReader(),u=new TextDecoder;let l="",f=null;const h=_=>(_??[]).filter(Boolean).map(Ar);try{for(;;){const{done:_,value:w}=await c.read();w&&(l+=u.decode(w,{stream:!0}));const p=l.split(`
3
+ `);l=_?"":p.pop()??"";for(const b of _?p.filter(Boolean):p){if(!b.trim())continue;const x=JSON.parse(b);if(x.type==="wines")f=h(x.recommendations).map(d=>({...d,reason:""})),r(f);else{if(x.type==="final")return h(x.recommendations);if(x.type==="error")return f||i()}}if(_)break}}catch{return f||i()}return f??i()}async getMoreWineRecommendations(t,n){try{const r=await ee(this,pe,Ft).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,pe,Ft).call(this,"dish/recommendations/search/v2/deck",si(i,v(this,vn)));return Ic(a)}async getSimilarWines(t){try{return(await ee(this,pe,Ft).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 ee(this,pe,Ft).call(this,"events",t,{keepalive:!0})}setVisitorLanguage(t){G(this,vn,t)}async getWineTranslations(t,n){return Nc(r=>ee(this,pe,Ft).call(this,"wines/translations",r).catch(()=>null),t,n)}setLanguage(t){G(this,ur,t)}async getShopifyConfig(){const t=vt().shop;return ee(this,pe,Ft).call(this,`shopify/storefront/config?shop=${encodeURIComponent(t)}`,void 0,{method:"GET"})}async getStoreConfig(){try{return await ee(this,pe,Ft).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}lr=new WeakMap,zr=new WeakMap,pn=new WeakMap,cr=new WeakMap,ur=new WeakMap,vn=new WeakMap,pe=new WeakSet,To=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${v(this,zr)}`};if(!v(this,cr)){const n=to();n&&(t[Lc]=n)}return t},Ft=async function(t,n,r={}){return(await ee(this,pe,Po).call(this,t,n,r)).data},Po=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:ee(this,pe,To).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let a;try{a=await fetch(`${v(this,lr)}${t}`,i())}catch(l){if(v(this,cr)||!to())throw l;G(this,cr,!0),a=await fetch(`${v(this,lr)}${t}`,i())}const c=await a.text();let u=null;try{u=c?JSON.parse(c):null}catch{if(a.ok)throw new Error("API returned invalid JSON")}if(!a.ok)throw new ts(a.status,u);return{data:u,headers:a.headers}},Io=function(t){const n=vt().shop;return v(this,ur)?{...t,shop:n,language:v(this,ur)}:{...t,shop:n}},Is=async function(t,n){try{const r=ee(this,pe,Io).call(this,{text:t,session_id:Fa(),...n?{query_id:n}:{}});return(await ee(this,pe,Ft).call(this,"shopify/storefront/search",r)??[]).filter(Boolean).map(Ar)}catch(r){throw r instanceof ts&&kc(r.status,r.data)?new Ua:new Error(`Error in getWineRecommendations: ${r.message}`)}};const ns=((xs=window==null?void 0:window.wineaterData)==null?void 0:xs.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",no=String(((ks=window==null?void 0:window.wineaterData)==null?void 0:ks.apiVersion)||"1"),ht=new zc(ns,no);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 ro=`${Bc(ns)}:${no}`,rs="wineater:v1:";function io(e,t){try{const n=window.localStorage.getItem(rs+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function oo(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(rs+e,JSON.stringify(n))}catch{}}const be={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"},is={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 zt="https://media.wineater.com/static-media",qc={0:{logoUrl:null,brandColor:"#7B2BEB"},29:{logoUrl:`${zt}/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('${Lt}/search.svg?x=1');
57
- mask-image: url('${Lt}/search.svg?x=1');
56
+ -webkit-mask-image: url('${zt}/search.svg?x=1');
57
+ mask-image: url('${zt}/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:`${Lt}/ryba_moya.png`,brandColor:"#de4e2a",wineaterColor:"#de4e2a",buttonUppercase:!0,customCss:`
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:`${zt}/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('${Lt}/search.svg?x=1');
70
- mask-image: url('${Lt}/search.svg?x=1');
69
+ -webkit-mask-image: url('${zt}/search.svg?x=1');
70
+ mask-image: url('${zt}/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('${Lt}/search.svg?x=1');
96
- mask-image: url('${Lt}/search.svg?x=1');
95
+ -webkit-mask-image: url('${zt}/search.svg?x=1');
96
+ mask-image: url('${zt}/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 as(e){const t={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
104
+ `}};function os(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=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;
107
+ `},n=qc[e]||{};return{...t,...n}}function jc(e){const t=e.color||"#7B2BEB";return{...os(""),brandColor:t,wineaterColor:t,customCss:""}}const Uc=24*60*60*1e3,oe=Re({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null,searchAvailable:!0}),ue={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}:os(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=`${ro}:store-config:v2`,n=async()=>{const r=await ht.getStoreConfig();return oo(t,r),r};try{const r=io(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(is),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 as(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=is,r=ue.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 ss(e,t){let n=Ge(t,"className",8,""),r=Ge(t,"size",8,20);var i=Hc();R(()=>{He(i,0,Jn(n())),M(i,"width",r()),M(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 ls(e,t){let n=Ge(t,"className",8,""),r=Ge(t,"size",8,20);var i=Gc();R(()=>{He(i,0,Jn(n())),M(i,"width",r()),M(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 ao(e,t){let n=Ge(t,"className",8,""),r=Ge(t,"size",8,20);var i=Vc();R(()=>{He(i,0,Jn(n())),M(i,"width",r()),M(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 cs(e,t){let n=Ge(t,"className",8,""),r=Ge(t,"size",8,20);var i=Kc();R(()=>{He(i,0,Jn(n())),M(i,"width",r()),M(i,"height",r())}),S(e,i)}var Yc=W('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Xc=W('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Zc=W('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),Qc=W('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),Jc=W('<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=W('<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 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;}
112
+ }`};function tu(e,t){xt(t,!0),Pt(e,eu);let n=F(()=>ue.getAppLanguage()),r=F(()=>ue.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(Re(ao));function c(w){return w.split(/(meal|mood|occasion)/gi).map(p=>({keyword:/^(meal|mood|occasion)$/i.test(p)?p.toLowerCase():null,text:p}))}let u=F(()=>o(i)?c(o(i)):null);var l=$c(),f=y(l);{var h=w=>{var p=Qc();Lt(p,21,()=>o(u),Rn,(b,x)=>{var d=Qn(),k=je(d);{var z=I=>{var C=Yc(),A=je(C),V=y(A);Ia(V,()=>o(a),(ce,de)=>{de(ce,{className:"wr-Header-icon",size:"28"})});var K=E(A),ne=y(K);R(()=>O(ne,o(x).text)),pt("mouseenter",A,()=>g(a,cs,!0)),pt("mouseleave",A,()=>g(a,ao,!0)),S(I,C)},N=I=>{var C=Xc(),A=je(C);ls(A,{className:"wr-Header-icon",size:"28"});var V=E(A),K=y(V);R(()=>O(K,o(x).text)),S(I,C)},T=I=>{var C=Zc(),A=je(C);ss(A,{className:"wr-Header-icon",size:"28"});var V=E(A),K=y(V);R(()=>O(K,o(x).text)),S(I,C)},D=I=>{var C=Qt();R(()=>O(C,o(x).text)),S(I,C)};H(k,I=>{o(x).keyword==="meal"?I(z):o(x).keyword==="mood"?I(N,1):o(x).keyword==="occasion"?I(T,2):I(D,!1)})}S(b,d)}),S(w,p)},_=w=>{var p=Jc(),b=y(p),x=E(b),d=y(x);Ia(d,()=>o(a),(ne,ce)=>{ce(ne,{className:"wr-Header-icon",size:"28"})});var k=E(x,2),z=y(k),N=E(k,2);ls(N,{className:"wr-Header-icon",size:"28"});var T=E(N,2),D=y(T),I=E(T,3),C=E(I);ss(C,{className:"wr-Header-icon",size:"28"});var A=E(C,2),V=y(A),K=E(A);R((ne,ce,de,et,We,ve)=>{O(b,`${ne??""} `),O(z,ce),O(D,de),O(I,` ${et??""} `),O(V,We),O(K,` ${ve??""}`)},[()=>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",x,()=>g(a,cs,!0)),pt("mouseleave",x,()=>g(a,ao,!0)),S(w,p)};H(f,w=>{o(u)?w(h):w(_,!1)})}S(e,l),kt()}var nu=W('<option class="wr-Footer-lang"> </option>'),ru=W('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),iu=W('<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 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,
115
+ }`};function au(e,t){xt(t,!0),Pt(e,ou);let n=Ge(t,"countryCode",3,null),r=F(()=>ue.getAppLanguage()),i=F(()=>ue.getSupportedLanguages()),a=F(()=>ue.getStoreId());function c(k){const N=k.target.value;ke(be.LANGUAGE_CHANGED,o(a),{from_language:o(r),to_language:N}),ue.setStoreLanguage(N)}var u=iu(),l=y(u),f=y(l),h=y(f),_=y(h),w=E(h,2),p=E(w,2),b=y(p),x=E(l,2);{var d=k=>{var z=ru();Lt(z,21,()=>o(i),Rn,(T,D)=>{var I=nu(),C=y(I),A={};R(V=>{lc(I,o(D)===o(r)),O(C,V),A!==(A=o(D))&&(I.value=(I.__value=o(D))??"")},[()=>o(D).toUpperCase()]),S(T,I)});var N;oc(z),R(()=>{N!==(N=o(r))&&(z.value=(z.__value=o(r))??"",Ma(z,o(r)))}),xe("change",z,c),S(k,z)};H(x,k=>{o(i).length>1&&k(d)})}R((k,z)=>{O(_,k),M(w,"src",n()==="ru"?`${zt}/divino_logo.svg?x=5`:`${zt}/logo_medium_gray.svg`),O(b,z)},[()=>fe({key:"poweredBy",lang:o(r)}),()=>fe({key:"ai_sommelier",lang:o(r)})]),S(e,u),kt()}Tr(["change"]);var su=W('<a rel="noopener noreferrer"><!></a>'),lu=W("<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 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%;
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=Ge(t,"type",3,"button"),r=Ge(t,"variant",3,"primary"),i=Ge(t,"target",3,"_self"),a=ue.getUiConfig(),c=`wr-Action ${r()} ${t.className||""} ${a.buttonUppercase?"wr-Action--uppercase":""}`.trim();var u=Qn(),l=je(u);{var f=_=>{var w=su(),p=y(w);Pa(p,t,"default",{}),R(()=>{He(w,1,Jn(c),"svelte-8cxv3l"),M(w,"href",t.href),M(w,"id",t.id),M(w,"target",i())}),xe("click",w,function(...b){var x;(x=t.handleClick)==null||x.apply(this,b)}),S(_,w)},h=_=>{var w=lu(),p=y(w);Pa(p,t,"default",{}),R(()=>{He(w,1,Jn(c),"svelte-8cxv3l"),M(w,"type",n()),M(w,"id",t.id)}),xe("click",w,function(...b){var x;(x=t.handleClick)==null||x.apply(this,b)}),S(_,w)};H(l,_=>{t.href?_(f):_(h,!1)})}S(e,u),kt()}Tr(["click"]);var uu=W('<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=Ge(t,"searchQuery",15),r,i=U(!1),a=U(0),c=U(0),u=U(!0),l=U(!1),f=F(()=>ue.getAppLanguage()),h=0;function _(){return r}function w(){const T=++h,D=fe({key:"placeholderSuggestions",lang:o(f)});if(!r||!D.length)return;g(l,!0);const I=()=>{if(T!==h||!r||!o(l)||o(i)||n().length)return;const C=D[o(a)];if(o(u)){if(r.placeholder=C.substring(0,Jo(c)),o(c)>C.length){g(u,!1),setTimeout(I,1600);return}setTimeout(I,90)}else{if(r.placeholder=C.substring(0,Jo(c,-1)),o(c)<0){g(u,!0),g(a,(o(a)+1)%D.length),setTimeout(I,450);return}setTimeout(I,45)}};I()}function p(){g(l,!1)}function b(){g(i,!0),p(),r&&(r.placeholder="")}function x(){g(i,!1),g(c,0),g(u,!0),g(l,!1)}sn(()=>{if(!r||n().length>0)return;h++,g(l,!1),g(a,0),g(c,0),g(u,!0);const T=fe({key:"placeholderSuggestions",lang:o(f)});T&&T.length?r.placeholder=T[0]:r.placeholder=fe({key:"searchPlaceholder",lang:o(f)})}),sn(()=>{r&&t.initialized&&!o(i)&&!n().length&&!o(l)&&w(),n().length>0&&o(l)&&(g(l,!1),h++)}),ei(()=>{});var d={getSearchElement:_},k=uu(),z=E(y(k),2);Ki(z,T=>r=T,()=>r);var N=E(z,2);return un(N,{className:"wr-Search-button",type:"submit",variant:"primary",children:(T,D)=>{var I=Qt();R(C=>O(I,C),[()=>fe({key:"searchButton",lang:o(f)})]),S(T,I)},$$slots:{default:!0}}),pt("submit",k,function(...T){var D;(D=t.onSubmit)==null||D.apply(this,T)}),pt("focus",z,b),pt("blur",z,x),dc(z,n),S(e,k),kt(d)}var pu=W('<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=W('<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 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">&times;</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">&times;</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),
135
+ }`};function us(e){Pt(e,hu);var t=vu();Lt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=pu();S(n,i)}),S(e,t)}var gu=W('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),wu=W('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),mu=W('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),_u=W('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),bu=W('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),yu=W('<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">&times;</button></div> <!> <!> <!></div></div></div>'),xu=W('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),ku=W('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Su=W('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Cu=W('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Eu=W('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Tu=W('<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">&times;</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=Qn(),i=je(r);{var a=u=>{var l=yu(),f=y(l),h=E(f,2),_=y(h),w=y(_),p=y(w),b=y(p),x=E(p,2),d=E(w,2);{var k=C=>{var A=gu(),V=y(A);R(()=>O(V,t.shortDescription)),S(C,A)};H(d,C=>{t.shortDescription&&C(k)})}var z=E(d,2);{var N=C=>{var A=wu(),V=y(A);R(()=>O(V,t.reason)),S(C,A)},T=C=>{var A=mu(),V=y(A);R(()=>O(V,t.pairing)),S(C,A)};H(z,C=>{t.reason?C(N):t.pairing&&C(T,1)})}var D=E(z,2);{var I=C=>{var A=bu();Lt(A,21,()=>t.tags,Rn,(V,K)=>{var ne=_u(),ce=y(ne);R(()=>O(ce,o(K))),S(V,ne)}),S(C,A)};H(D,C=>{t.tags&&t.tags.length&&C(I)})}R(()=>O(b,t.title)),xe("click",f,function(...C){var A;(A=t.onClose)==null||A.apply(this,C)}),xe("click",x,function(...C){var A;(A=t.onClose)==null||A.apply(this,C)}),S(u,l)},c=u=>{var l=Tu(),f=y(l),h=y(f),_=y(h),w=E(h,2),p=E(f,2);{var b=T=>{var D=xu(),I=y(D);R(()=>O(I,t.shortDescription)),S(T,D)};H(p,T=>{t.shortDescription&&T(b)})}var x=E(p,2);{var d=T=>{var D=ku(),I=y(D);R(()=>O(I,t.reason)),S(T,D)},k=T=>{var D=Su(),I=y(D);R(()=>O(I,t.pairing)),S(T,D)};H(x,T=>{t.reason?T(d):t.pairing&&T(k,1)})}var z=E(x,2);{var N=T=>{var D=Eu();Lt(D,21,()=>t.tags,Rn,(I,C)=>{var A=Cu(),V=y(A);R(()=>O(V,o(C))),S(I,A)}),S(T,D)};H(z,T=>{t.tags&&t.tags.length&&T(N)})}R(()=>O(_,t.title)),xe("click",w,function(...T){var D;(D=t.onClose)==null||D.apply(this,T)}),S(u,l)};H(i,u=>{n?u(a):u(c,!1)})}S(e,r),kt()}Tr(["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 ds(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 fs(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 c=zu(),u=y(c),l=y(u),f=y(l),h=E(f),_=E(h),w=E(u),p=E(w);{var b=D=>{var I=Nu(),C=je(I),A=E(C),V=E(A,4);Lt(V,21,()=>Ru,([K,ne,ce])=>`${K}-${ne}`,(K,ne)=>{var ce=F(()=>Hs(o(ne),3));let de=()=>o(ce)[0],et=()=>o(ce)[1],We=()=>o(ce)[2];var ve=Wu();R(()=>{M(ve,"cx",de()),M(ve,"cy",et()),M(ve,"r",We())}),S(K,ve)}),R(()=>{M(C,"fill",o(r).foil),M(A,"fill",o(r).foil)}),S(D,I)},x=D=>{var I=Lu(),C=je(I),A=E(C);R(()=>{M(C,"x",o(i).cap.x),M(C,"y",o(i).cap.y),M(C,"width",o(i).cap.w),M(C,"height",o(i).cap.h),M(C,"fill",o(r).foil),M(A,"x",o(i).cap.x),M(A,"y",o(i).cap.y+o(i).cap.h-3),M(A,"width",o(i).cap.w)}),S(D,I)};H(p,D=>{o(n)==="sparkling"?D(b):D(x,!1)})}var d=E(p),k=E(d),z=E(k),N=E(z),T=E(N);R(()=>{M(l,"id",a),M(f,"stop-color",o(r).glass),M(h,"stop-color",o(r).glass),M(_,"stop-color",o(r).glass),M(w,"d",o(i).body),M(w,"fill",`url(#${a})`),M(d,"x",o(i).label.x),M(d,"y",o(i).label.y),M(d,"width",o(i).label.w),M(d,"height",o(i).label.h),M(k,"x",o(i).label.x+o(i).label.w*.2),M(k,"y",o(i).label.y+8),M(k,"width",o(i).label.w*.6),M(k,"fill",o(r).accent),M(z,"x",o(i).label.x+o(i).label.w*.3),M(z,"y",o(i).label.y+14),M(z,"width",o(i).label.w*.4),M(z,"fill",o(r).accent),M(N,"x",o(i).label.x+o(i).label.w*.3),M(N,"y",o(i).label.y+19),M(N,"width",o(i).label.w*.4),M(N,"fill",o(r).accent),M(T,"d",o(i).shine)}),S(e,c),kt()}var Ou=W('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),qu=W('<div class="wr-WineTile-image wr-WineTile-bottle svelte-yk3emv"><!></div>'),ju=W('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Uu=W('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),Fu=W('<h3 class="wr-WineTile-title svelte-yk3emv"><a class="wr-WineTile-titleLink js-WineTileAction svelte-yk3emv"> </a></h3>'),Hu=W('<h3 class="wr-WineTile-title svelte-yk3emv"> </h3>'),Gu=W('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),Vu=W('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),Ku=W('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),Yu=W('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),Xu=W("<div><!> <!></div>"),Zu=W('<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,10 +156,18 @@
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 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;}
159
+ }`};function Ju(e,t){xt(t,!0),Pt(e,Qu);const n=4;let r=F(()=>ue.getAppLanguage()),i=U(!1),a=Ge(t,"addedToCart",3,!1);const c=(P,q)=>P[q]||P[q.charAt(0).toUpperCase()+q.slice(1)],u=(P,q)=>q.map(Q=>c(P,Q)).filter(Boolean).join(" • ");function l(P){var q;return as(P,((q=ue.getCurrency)==null?void 0:q.call(ue))||"USD",o(r))}function f(P){return t.selectedWineId===P}function h(P){return!!(P.reason||P.shortDescription||P.tags)}function _(P,q){let Q=(P==null?void 0:P.tags)||q.tags;return Q?(Array.isArray(Q)&&(Q=Q.join(",")),typeof Q!="string"?[]:Q.split(",").map(ae=>ae.trim()).filter(Boolean)):[]}let w=U(!1),p=F(()=>!!t.onAddToCart&&!!ja(t.wine)),b=U(!1);async function x(){var P;if(!(o(b)||a())){g(b,!0);try{await((P=t.onAddToCart)==null?void 0:P.call(t,t.wine,t.index))}finally{g(b,!1)}}}ei(()=>{const P=()=>{g(w,window.innerWidth<=768)};return P(),window.addEventListener("resize",P),()=>{window.removeEventListener("resize",P)}});var d=Zu(),k=y(d),z=y(k);{var N=P=>{var q=Ou();R(()=>{M(q,"src",t.wine.image),M(q,"alt",t.wine.title),M(q,"loading",t.index<n?"eager":"lazy"),M(q,"fetchpriority",t.index<n?"high":"auto")}),pt("error",q,()=>g(i,!0)),S(P,q)},T=F(()=>ds(t.wine.image)&&!o(i)),D=P=>{var q=qu(),Q=y(q);fs(Q,{get type(){return t.wine.type}}),S(P,q)};H(z,P=>{o(T)?P(N):P(D,!1)})}var I=E(z,2);{var C=P=>{var q=ju(),Q=y(q);R(ae=>O(Q,ae),[()=>l(t.wine.total)]),S(P,q)};H(I,P=>{t.wine.total&&P(C)})}var A=E(I,2);{var V=P=>{var q=Uu(),Q=y(q);R((ae,we)=>O(Q,`${ae??""}${we??""}`),[()=>fe({key:"byTheGlass",lang:o(r)}),()=>t.wine.glassPrice?` — ${l(t.wine.glassPrice)}`:""]),S(P,q)};H(A,P=>{t.wine.byTheGlass&&P(V)})}var K=E(A,2);{var ne=P=>{var q=Fu(),Q=y(q),ae=y(Q);R(()=>{M(Q,"href",t.wine.url),O(ae,t.wine.title)}),S(P,q)},ce=P=>{var q=Hu(),Q=y(q);R(()=>O(Q,t.wine.title)),S(P,q)};H(K,P=>{o(p)&&t.wine.url?P(ne):P(ce,!1)})}var de=E(k,2);{var et=P=>{var q=Gu(),Q=y(q);R(ae=>O(Q,ae),[()=>u(t.wine,["type","country","region","grape"])]),S(P,q)},We=F(()=>u(t.wine,["type","country","region","grape"]));H(de,P=>{o(We)&&P(et)})}var ve=E(de,2),tt=y(ve),Rt=y(tt);{var Ne=P=>{{let q=F(()=>a()?"outlined":"primary");un(P,{handleClick:x,get variant(){return o(q)},className:"wr-WineTile-action wr-WineTile-action--cart js-WineTileAction",children:(Q,ae)=>{var we=Qt();R(Le=>O(we,Le),[()=>fe({key:a()?"addedToCart":"addToCart",lang:o(r)})]),S(Q,we)},$$slots:{default:!0}})}},nt=P=>{un(P,{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:(q,Q)=>{var ae=Qt();R(we=>O(ae,we),[()=>fe({key:"wineDetails.buy",lang:o(r)})]),S(q,ae)},$$slots:{default:!0}})},hn=P=>{un(P,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(q,Q)=>{var ae=Qt();R(we=>O(ae,we),[()=>fe({key:"moreInfo",lang:o(r)})]),S(q,ae)},$$slots:{default:!0}})};H(Rt,P=>{o(p)?P(Ne):t.wine.url?P(nt,1):P(hn,!1)})}var rt=E(Rt,2);{var dr=P=>{un(P,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(q,Q)=>{var ae=Qt();R(we=>O(ae,we),[()=>fe({key:"similarWines",lang:o(r)})]),S(q,ae)},$$slots:{default:!0}})};H(rt,P=>{t.onSimilarClick&&P(dr)})}var Te=E(ve,2);{var fr=P=>{{let q=F(()=>{var Le;return((Le=t.translatedPopup)==null?void 0:Le.shortDescription)||t.wine.shortDescription}),Q=F(()=>{var Le;return((Le=t.translatedPopup)==null?void 0:Le.reason)||t.wine.reason}),ae=F(()=>{var Le;return((Le=t.translatedPopup)==null?void 0:Le.pairingRecommendation)||t.wine.pairingRecommendation}),we=F(()=>_(t.translatedPopup,t.wine));Iu(P,{get title(){return t.wine.title},get shortDescription(){return o(q)},get reason(){return o(Q)},get pairing(){return o(ae)},get tags(){return o(we)},get onClose(){return t.onPopupClose},isMobile:!1})}},wt=F(()=>f(t.wine.id)&&!o(w));H(Te,P=>{o(wt)&&P(fr)})}var Br=E(Te,2);{var Ut=P=>{var q=Xu(),Q=y(q);{var ae=it=>{var ze=Vu(),Ke=y(ze);R(()=>{var gn,en;return O(Ke,((gn=t.translatedPopup)==null?void 0:gn.reason)||((en=t.translatedPopup)==null?void 0:en.shortDescription)||t.wine.reason||t.wine.shortDescription)}),S(it,ze)};H(Q,it=>{var ze,Ke;((ze=t.translatedPopup)!=null&&ze.reason||(Ke=t.translatedPopup)!=null&&Ke.shortDescription||t.wine.reason||t.wine.shortDescription)&&it(ae)})}var we=E(Q,2);{var Le=it=>{var ze=Yu();Lt(ze,21,()=>_(t.translatedPopup,t.wine),Rn,(Ke,gn)=>{var en=Ku(),Or=y(en);R(()=>O(Or,o(gn))),S(Ke,en)}),S(it,ze)};H(we,it=>{var ze,Ke;((ze=t.translatedPopup)!=null&&ze.tags||(Ke=t.translatedPopup)!=null&&Ke.Tags||t.wine.tags)&&it(Le)})}R(()=>He(q,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),S(P,q)},Bn=F(()=>h(t.wine));H(Br,P=>{o(Bn)&&P(Ut)})}R(()=>He(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)),xe("click",d,P=>t.onTileClick(P,t.wine)),S(e,d),kt()}Tr(["click"]);var $u=W('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),ed=W('<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 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;}
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=y(i),c=y(a),u=E(c);{var l=p=>{var b=$u(),x=y(b);R(d=>{M(b,"href",n),O(x,d)},[()=>r("consentPrivacy")]),S(p,b)};H(u,p=>{n&&p(l)})}var f=E(a,2),h=y(f);un(h,{variant:"outlined",handleClick:()=>qa("denied"),children:(p,b)=>{var x=Qt();R(d=>O(x,d),[()=>r("consentDecline")]),S(p,x)},$$slots:{default:!0}});var _=E(h,2);un(_,{variant:"primary",handleClick:()=>qa("granted"),children:(p,b)=>{var x=Qt();R(d=>O(x,d),[()=>r("consentAccept")]),S(p,x)},$$slots:{default:!0}}),R(p=>O(c,`${p??""} `),[()=>r("consentText")]),S(e,i),kt()}const rd=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function so(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"]')||(so("preconnect","https://fonts.googleapis.com"),so("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)=>(so("stylesheet",a),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}const ps="_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:{[ps]: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[${ps}]=${encodeURIComponent(t.sessionId)}`,{ok:!1,via:"permalink"}}let vs=0,Mn=null;function pd(){if(typeof document>"u")return()=>{};if(vs++===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,!(--vs>0||!Mn)&&(document.documentElement.style.cssText=Mn.html,document.body.style.cssText=Mn.body,window.scrollTo(0,Mn.scrollY),Mn=null))}}function lo(e){return document.body.appendChild(e),{destroy:()=>e.remove()}}const co=4,vd=15,hd=4,li={type:3,grape:2,region:2,priceLevel:1},hs=e=>(e??"").trim().toLowerCase(),ci=(e,t)=>{const n=hs(e);return n!==""&&n===hs(t)};function gs(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+gs(e,i),0)-n.reduce((r,i)=>r+gs(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,c={...e,previous:null,canUndo:!1};return{queue:wd(r,i,a),liked:i,disliked:a,swiped:e.swiped+1,previous:c,canUndo:!0}}function bd(e){return e.previous??e}function yd(e){return e.liked.length>=co?"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 ws=e=>{var t=Sd();S(e,t)},uo=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=W('<img class="wr-Swipe-image svelte-1m6pw5v" alt="" draggable="false" decoding="async"/>'),Pd=W('<div class="wr-Swipe-bottle svelte-1m6pw5v"><!></div>'),Id=W('<p class="wr-Swipe-price svelte-1m6pw5v"> </p>'),Ad=W('<p class="wr-Swipe-params svelte-1m6pw5v"> </p>'),Dd=W('<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=W('<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=W('<div class="wr-Swipe-card wr-Swipe-card--next svelte-1m6pw5v" aria-hidden="true"><!></div>'),Wd=W('<span class="wr-Swipe-panelPrice svelte-1m6pw5v"> </span>'),Nd=W('<span class="wr-Swipe-glass svelte-1m6pw5v"> </span>'),Ld=W('<p class="wr-Swipe-origin svelte-1m6pw5v"> </p>'),zd=W('<p class="wr-Swipe-desc svelte-1m6pw5v"> </p>'),Bd=W('<li class="svelte-1m6pw5v"> </li>'),Od=W('<ul class="wr-Swipe-tags svelte-1m6pw5v"></ul>'),qd=W('<a class="wr-Swipe-buy svelte-1m6pw5v" target="_blank" rel="noopener"> </a>'),jd=W('<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=W("<i></i>"),Fd=W('<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(
163
+ --wineater-font-primary,
164
+ -apple-system,
165
+ BlinkMacSystemFont,
166
+ 'Segoe UI',
167
+ Roboto,
168
+ Arial,
169
+ sans-serif
170
+ );text-align:left;overscroll-behavior:contain;-webkit-tap-highlight-color:transparent;}
163
171
 
164
172
  /* 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
173
  .wr-Swipe.svelte-1m6pw5v p:where(.svelte-1m6pw5v),
@@ -167,7 +175,12 @@
167
175
  .wr-Swipe.svelte-1m6pw5v li:where(.svelte-1m6pw5v),
168
176
  .wr-Swipe.svelte-1m6pw5v a:where(.svelte-1m6pw5v),
169
177
  .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(
178
+ 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(
179
+ 120% 75% at 50% 38%,
180
+ var(--sw-tint) 0%,
181
+ var(--sw-tint) 35%,
182
+ var(--sw-tint-deep) 100%
183
+ );}.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
184
  to top,
172
185
  var(--sw-plate) 0%,
173
186
  color-mix(in srgb, var(--sw-ink) 62%, transparent) 55%,
@@ -181,11 +194,19 @@
181
194
  @media (prefers-reduced-motion: reduce) {.wr-Swipe-card.svelte-1m6pw5v,
182
195
  .wr-Swipe-card--top.is-flying.svelte-1m6pw5v,
183
196
  .wr-Swipe-panel.svelte-1m6pw5v {transition:none;}
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:`
197
+ }`};function Gd(e,t){xt(t,!0),Pt(e,Hd);const n=(s,m=xi,L=xi)=>{var B=Rd(),Y=je(B),Ce=y(Y);{var Oe=j=>{var se=Td();R(()=>M(se,"src",m().image)),pt("error",se,()=>g(Q,{...o(Q),[m().id]:!0},!0)),S(j,se)},ot=F(()=>ds(m().image)&&!o(Q)[m().id]),Mt=j=>{var se=Pd(),me=y(se);fs(me,{get type(){return m().type}}),S(j,se)};H(Ce,j=>{o(ot)?j(Oe):j(Mt,!1)})}var mt=E(Y,2),tn=y(mt);{var he=j=>{var se=Id(),me=y(se);R(Ye=>O(me,Ye),[()=>c(m().total)]),S(j,se)};H(tn,j=>{m().total!=null&&j(he)})}var Be=E(tn,2),Wt=y(Be),On=E(Be,2);{var gr=j=>{var se=Ad(),me=y(se);R(Ye=>O(me,Ye),[()=>u(m())]),S(j,se)},Fr=F(()=>u(m()));H(On,j=>{o(Fr)&&j(gr)})}var Hr=E(mt,2);{var Gr=j=>{var se=Dd(),me=je(se);let Ye;var qn=y(me);ws(qn);var wr=E(me,2);let mr;var at=y(wr);uo(at),R((J,re)=>{Ye=ti(me,"",Ye,J),mr=ti(wr,"",mr,re)},[()=>({opacity:Math.max(0,o(de))}),()=>({opacity:Math.max(0,-o(de))})]),S(j,se)};H(Hr,j=>{L()&&j(Gr)})}R(j=>O(Wt,j),[()=>l(m())]),S(s,B)},r=F(()=>ue.getAppLanguage()),i=F(()=>ue.getStoreId()),a=s=>fe({key:s,lang:o(r)}),c=s=>{var m;return s==null?"":as(s,((m=ue.getCurrency)==null?void 0:m.call(ue))||"USD",o(r))},u=s=>[s.type,s.country,s.region,s.grape].filter(Boolean).join(" • "),l=s=>s.vintage&&!String(s.title).includes(String(s.vintage))?`${s.title} ${s.vintage}`:s.title,f=F(()=>t.query.replace(/;\s*$/,""));let h=U(Re(md(t.cards))),_=!1,w=[];const p=F(()=>o(h).queue[0]??null),b=F(()=>o(h).queue[1]??null),x=F(()=>o(h).liked.length),d=10,k=.3,z=.5;let N=U(0),T=U(!1),D=U(null),I=U(!1),C=U(null),A=U(null),V=U(320),K=!1,ne=null,ce=!1;const de=F(()=>Math.max(-1,Math.min(1,o(N)/(o(V)*k)))),et=F(()=>o(de)*12);ei(()=>{var L,B;K=((L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)").matches)??!1,ke(be.SWIPE_MODE_OPENED,o(i),{query:t.query,cards:t.cards.length});const s=pd(),m=Y=>{Y.key==="Escape"&&Rt()};return window.addEventListener("keydown",m),(B=o(A))==null||B.focus({preventScroll:!0}),()=>{window.removeEventListener("keydown",m),s()}});let We=null;sn(()=>{!o(p)||o(p).id===We||(We=o(p).id,It({type:"shown",query_id:t.queryId??void 0,sku_ids:[o(p).id],position:o(h).swiped}))});function ve(s){ke(be.SWIPE_MODE_FINISHED,o(i),{likes:o(h).liked.length,swiped:o(h).swiped,reason:s,query:t.query})}function tt(s){_||(_=!0,ve(s),t.onFinish(xd(o(h),t.shownIds),w,s))}function Rt(){_||(_=!0,ve("closed"),t.onClose())}function Ne(s){const m=o(p);if(!m||_)return;const L=o(h).swiped;It({type:s,query_id:t.queryId??void 0,sku_ids:[m.id],position:L}),ke(s==="like"?be.WINE_LIKED:be.WINE_DISLIKED,o(i),{wine_id:m.id,wine_title:m.title,position:L,query:t.query}),w=[...w,m.id],g(h,_d(o(h),s),!0),g(N,0),g(D,null),g(I,!1);const B=yd(o(h));B&&tt(B)}function nt(s){if(!(!o(p)||o(D)||_)){if(K)return Ne(s);g(D,s,!0),g(N,(s==="like"?1:-1)*o(V)*1.6),setTimeout(()=>Ne(s),260)}}function hn(){!o(h).canUndo||o(D)||(w=w.slice(0,-1),g(h,bd(o(h)),!0),g(I,!1))}function rt(){g(I,!o(I)),o(I)&&o(p)&&(It({type:"click",query_id:t.queryId??void 0,sku_ids:[o(p).id],position:o(h).swiped}),ke(be.WINE_DETAILS_VIEWED,o(i),{wine_id:o(p).id,wine_title:o(p).title,is_mobile:!0,source:"swipe"}))}function dr(s){var m;o(D)||_||s.target.closest("a, button")||(ne={x:s.clientX,y:s.clientY,t:s.timeStamp,id:s.pointerId},ce=!1,g(V,((m=o(C))==null?void 0:m.offsetWidth)||o(V),!0))}function Te(s){var B,Y;if(!ne||s.pointerId!==ne.id)return;const m=s.clientX-ne.x,L=s.clientY-ne.y;if(!ce){if(Math.abs(m)<d&&Math.abs(L)<d)return;ce=!0,(Y=(B=o(C))==null?void 0:B.setPointerCapture)==null||Y.call(B,s.pointerId),g(T,!0)}g(N,m)}function fr(s){if(!ne||s.pointerId!==ne.id)return;const m=ce,L=Math.abs(o(N))/Math.max(1,s.timeStamp-ne.t);if(ne=null,ce=!1,g(T,!1),!m){rt();return}Math.abs(o(N))>o(V)*k||L>z&&Math.abs(o(N))>30?nt(o(N)>0?"like":"dislike"):g(N,0)}function wt(){ne=null,ce=!1,g(T,!1),g(N,0)}function Br(s){s.key==="ArrowRight"?(s.preventDefault(),nt("like")):s.key==="ArrowLeft"?(s.preventDefault(),nt("dislike")):(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),rt())}let Ut=null;function Bn(s){var m,L;s.stopPropagation(),Ut=s.clientY,(L=(m=s.currentTarget).setPointerCapture)==null||L.call(m,s.pointerId)}function P(s){s.stopPropagation(),Ut!==null&&s.clientY-Ut>-6&&g(I,!1),Ut=null}function q(s){It({type:"buy_click",query_id:t.queryId??void 0,sku_ids:[s.id],position:o(h).swiped}),ke(be.BUY_BUTTON_CLICKED,o(i),{wine_id:s.id,wine_title:s.title,wine_url:s.url,is_mobile:!0,source:"swipe"})}let Q=U(Re({}));var ae=Fd(),we=y(ae),Le=y(we),it=E(we,2),ze=y(it),Ke=y(ze),gn=y(Ke),en=E(Ke,2),Or=y(en),pr=E(ze,2),ho=y(pr);uo(ho),Ki(pr,s=>g(A,s),()=>o(A));var fi=E(it,2),pi=y(fi);{var go=s=>{var m=Qn(),L=je(m);Ea(L,()=>o(b).id,B=>{var Y=Md();let Ce;var Oe=y(Y);n(Oe,()=>o(b),()=>!1),R(ot=>Ce=ti(Y,"",Ce,ot),[()=>({transform:`translateY(${10-10*Math.abs(o(de))}px) scale(${.94+.06*Math.abs(o(de))})`})]),S(B,Y)}),S(s,m)};H(pi,s=>{o(b)&&s(go)})}var wo=E(pi,2);{var mo=s=>{var m=Qn(),L=je(m);Ea(L,()=>o(p).id,B=>{var Y=jd();let Ce,Oe;var ot=y(Y);n(ot,()=>o(p),()=>!0);var Mt=E(ot,2);let mt;var tn=y(Mt),he=E(tn,2),Be=y(he),Wt=y(Be),On=E(Be,2),gr=y(On);{var Fr=J=>{var re=Wd(),Me=y(re);R(st=>O(Me,st),[()=>c(o(p).total)]),S(J,re)};H(gr,J=>{o(p).total!=null&&J(Fr)})}var Hr=E(gr,2);{var Gr=J=>{var re=Nd(),Me=y(re);R((st,_n)=>O(Me,`${st??""}${_n??""}`),[()=>a("byTheGlass"),()=>o(p).glassPrice?` ${c(o(p).glassPrice)}`:""]),S(J,re)};H(Hr,J=>{o(p).byTheGlass&&J(Gr)})}var j=E(On,2);{var se=J=>{var re=Ld(),Me=y(re);R(st=>O(Me,st),[()=>[o(p).producer,o(p).appellation||o(p).region].filter(Boolean).join(", ")]),S(J,re)};H(j,J=>{(o(p).producer||o(p).appellation||o(p).region)&&J(se)})}var me=E(j,2);{var Ye=J=>{var re=zd(),Me=y(re);R(()=>O(Me,o(p).shortDescription)),S(J,re)};H(me,J=>{o(p).shortDescription&&J(Ye)})}var qn=E(me,2);{var wr=J=>{var re=Od();Lt(re,20,()=>o(p).tags,Me=>Me,(Me,st)=>{var _n=Bd(),Cs=y(_n);R(()=>O(Cs,st)),S(Me,_n)}),S(J,re)};H(qn,J=>{o(p).tags.length&&J(wr)})}var mr=E(qn,2);{var at=J=>{var re=qd(),Me=y(re);R(st=>{M(re,"href",o(p).url),M(re,"tabindex",o(I)?0:-1),O(Me,st)},[()=>a("wineDetails.buy")]),xe("click",re,()=>q(o(p))),S(J,re)};H(mr,J=>{o(p).url&&J(at)})}Ki(Y,J=>g(C,J),()=>o(C)),R((J,re)=>{Ce=He(Y,1,"wr-Swipe-card wr-Swipe-card--top svelte-1m6pw5v",null,Ce,{"is-dragging":o(T),"is-flying":!!o(D)}),M(Y,"aria-label",J),Oe=ti(Y,"",Oe,{transform:`translateX(${o(N)??""}px) rotate(${o(et)??""}deg)`}),mt=He(Mt,1,"wr-Swipe-panel svelte-1m6pw5v",null,mt,{"is-open":o(I)}),M(Mt,"aria-hidden",!o(I)),O(Wt,re)},[()=>l(o(p)),()=>l(o(p))]),xe("pointerdown",Y,dr),xe("pointermove",Y,Te),xe("pointerup",Y,fr),pt("pointercancel",Y,wt),xe("keydown",Y,Br),xe("pointerdown",tn,Bn),xe("pointerup",tn,P),S(B,Y)}),S(s,m)};H(wo,s=>{o(p)&&s(mo)})}var vi=E(fi,2),wn=y(vi),hi=y(wn);kd(hi);var mn=E(wn,2),_o=y(mn);uo(_o);var vr=E(mn,2),bo=y(vr);ws(bo);var gi=E(vi,2),qr=y(gi),jr=y(qr);Lt(jr,21,()=>Array(co),Rn,(s,m,L)=>{var B=Ud();let Y;R(()=>Y=He(B,1,"svelte-1m6pw5v",null,Y,{"is-on":L<o(x)})),S(s,B)});var hr=E(jr),Ur=E(qr,2),wi=y(Ur);tc(ae,s=>lo==null?void 0:lo(s)),R((s,m,L,B,Y,Ce,Oe,ot)=>{O(Le,s),O(gn,m),O(Or,o(f)),M(pr,"aria-label",L),wn.disabled=!o(h).canUndo,M(wn,"aria-label",B),mn.disabled=!o(p),M(mn,"aria-label",Y),vr.disabled=!o(p),M(vr,"aria-label",Ce),O(hr,` ${Oe??""}`),O(wi,ot)},[()=>a("swipe.hint"),()=>a("helpMeChoose"),()=>a("swipe.close"),()=>a("swipe.undo"),()=>a("swipe.dislike"),()=>a("swipe.like"),()=>a("swipe.progress").replace("{n}",String(o(x))).replace("{total}",String(co)),()=>a("swipe.showResults")]),xe("click",pr,Rt),xe("click",wn,hn),xe("click",mn,()=>nt("dislike")),xe("click",vr,()=>nt("like")),xe("click",Ur,()=>tt("manual")),S(e,ae),kt()}Tr(["click","pointerdown","pointermove","pointerup","keydown"]);const Vd=768,ms=()=>typeof window<"u"&&window.innerWidth<=Vd;let _s=U(Re(ms()));typeof window<"u"&&window.addEventListener("resize",()=>g(_s,ms(),!0));const fo={get isMobile(){return o(_s)}};var Kd=W('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),Yd=W('<p class="wr-App-resting svelte-1n46o8q" role="status"> </p>'),Xd=W('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),Zd=W("<div><!></div>"),Qd=W('<!> <div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),Jd=W('<div id="wr-Custom"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!> <!></div> <!> <!></div>'),$d=W('<div aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const ef={hash:"svelte-1n46o8q",code:`
185
198
  /* ===================== 1) CSS Variables ===================== */:root {--wineater-corp-color: #0044ff;
186
199
  /* --wr-brand-color is set dynamically from uiConfig.brandColor */--wr-brand-color: #7b2beb; /* fallback value */}
187
200
 
188
- /* ===================== 2) Global Styles ===================== */* {box-sizing:border-box;}.hidden {display:none;}body {margin:0;padding:0;font-family:var(--wineater-font-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);}
201
+ /* ===================== 2) Global Styles ===================== */* {box-sizing:border-box;}.hidden {display:none;}body {margin:0;padding:0;font-family:var(
202
+ --wineater-font-primary,
203
+ -apple-system,
204
+ BlinkMacSystemFont,
205
+ 'Segoe UI',
206
+ Roboto,
207
+ Arial,
208
+ sans-serif
209
+ );}
189
210
 
190
211
  /* ===================== 3) Widget Container ===================== */.wr-App.svelte-1n46o8q {padding:12px 12px 0px;border-radius:16px;background-color:#fff;box-shadow:0 4px 16px rgba(0, 0, 0, 0.1);max-width:1024px;min-width:1024px;min-height:500px;margin:40px auto;position:relative;}
191
212
 
@@ -204,4 +225,4 @@
204
225
 
205
226
  /* ===================== 13) Mobile Styles ===================== */
206
227
  @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);}
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})});
228
+ }`};function tf(e,t){var gi,qr,jr,hr,Ur,wi;xt(t,!0),Pt(e,ef);const n=vt();function r(){var s;Ji("chatbotToken",((s=window.wineaterData)==null?void 0:s.CLIENT_TOKEN)||i,365)}const i="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n||(r(),id());const a=6*60*60*1e3,c=60*60*1e3,u=`${ro}:instant-profile`,l=s=>`${ro}:instant${s?`:${s}`:""}`,f=((gi=window==null?void 0:window.wineaterData)==null?void 0:gi.WIDGET_TYPE)||"store",h=((qr=window==null?void 0:window.wineaterData)==null?void 0:qr.COUNTRY_CODE)||null;let _=U(!1),w=U(!1),p=!1,b=U(!1),x=U(!1),d=U(Re([])),k=U(null),z=U(""),N=U(null),T=U(!1),D=U(null),I=U(Re([])),C=U(""),A=U(!1),V=U(Re([])),K=null,ne=U(Re([])),ce=U(!1),de=U(null),et=U(Re([])),We=U(!1),ve=null,tt=U(!1);const Rt=()=>[...new Set([...o(V),...o(d).map(s=>s.id)])],Ne=s=>`${K??""}|${o(C)}|${s.join(",")}`;function nt(s){const m=Ne(s);if((ve==null?void 0:ve.key)!==m){const L=ht.getDeck(o(C),s,K).then(B=>B.cards).catch(B=>(console.debug("[wineater] swipe deck unavailable:",B==null?void 0:B.message),[]));ve={key:m,request:L}}return ve.request}function hn(s,m){s!=null&&s.length&&It({type:"shown",query_id:K??void 0,sku_ids:s.map(L=>L.id),text:m||void 0})}let rt=F(()=>ue.getAppLanguage()),dr=F(()=>ue.getStoreLanguage()),Te=F(()=>ue.getStoreId()),fr=F(()=>ue.isInitialized()),wt=F(()=>ue.getUiConfig()),Br=F(()=>ue.isSearchAvailable()),Ut=F(()=>o(A)&&!o(We)&&fo.isMobile&&ue.isSwipeModeEnabled());sn(()=>{!o(Ut)||o(b)||o(x)||o(de)||!o(d).length||nt(Rt())});function Bn(){g(N,fe({key:"errorMessage",lang:o(rt)}),!0)}const P=()=>g(N,null);async function q(s){const m=es(f,o(rt),o(dr));if(!m||!s.length)return s.map(()=>({}));const L=await ht.getWineTranslations(s.map(B=>B.id),m);return Wc(s,L)}sn(()=>{ht.setVisitorLanguage(es(f,o(rt),o(dr)))});async function Q(s){const m=io(u,2592e6),L=io(l(m),m?c:a),B=!!(L!=null&&L.length);B?g(d,L,!0):g(b,!0);try{const{wines:Y,profileHash:Ce}=await ht.getInstantRecommendations();Y.length>0&&(oo(l(Ce),Y),oo(u,Ce)),!B&&!p&&g(d,Y,!0)}catch(Y){console.error("[wineater] instant recommendations error:",Y),!B&&!p&&(await s,Bn())}finally{p||g(b,!1)}}async function ae(){g(ce,!0),ue.setSearchAvailable(!1);try{const{wines:s}=await ht.getInstantRecommendations();g(d,s,!0),g(I,[],!0),g(A,!1)}catch(s){console.error("[wineater] instant recommendations error:",s),g(d,[],!0)}}function we(s=220){return!o(d)||o(d).length===0?Promise.resolve():(g(T,!0),new Promise(m=>{setTimeout(()=>{m()},s)}))}async function Le(s){s.preventDefault(),p=!0;let m="",L;try{g(b,!0),P(),m=o(z).trim()+";",g(C,m,!0),K=Za(),L=K;try{ke(be.SEARCH_PERFORMED,o(Te),{query:m})}catch(he){console.error("Error tracking search event:",he)}let B=!1,Y=!1,Ce=null;const Oe=he=>{if(!he||he.length===0){g(d,[],!0),g(I,[],!0),g(N,fe({key:"noResultsMessage",lang:o(rt)}),!0),ke(be.NO_RESULTS_FOUND,o(Te),{query:m});return}g(d,he,!0),g(b,!1),!Y&&(Y=!0,g(A,no==="2"&&!n&&he.length>=4,!0),hn(he,m),ke(be.SEARCH_RESULTS_DISPLAYED,o(Te),{results_count:he.length,results:he,query:m}))},ot=he=>{L===K&&(B?Oe(he):Ce=he)},Mt=ht.searchStream(m,K,ot);Mt.catch(()=>{}),await we(220),g(d,[],!0),g(T,!1),g(A,!1),g(V,[],!0),g(de,null),g(We,!1),B=!0,Ce&&Oe(Ce);const mt=await Mt;if(L!==K)return;if(Y&&mt.length===o(d).length&&mt.every((he,Be)=>{var Wt;return he.id===((Wt=o(d)[Be])==null?void 0:Wt.id)})){const he=new Map(mt.map(Be=>[Be.id,Be]));g(d,o(d).map(Be=>{var Wt;return{...Be,reason:((Wt=he.get(Be.id))==null?void 0:Wt.reason)??Be.reason}}),!0)}else Oe(mt)}catch(B){if(L!==K)return;if(B instanceof Ua){await ae();return}g(d,[],!0),console.error("[wineater] search error:",B),ke(be.ERROR_OCCURRED,o(Te),{error_message:B==null?void 0:B.message,query:m}),Bn()}finally{L===K&&g(b,!1)}}async function it(){if(o(x)||!o(A))return;p=!0;const s=o(d);try{g(x,!0),g(b,!0),g(V,[...new Set([...o(V),...o(d).map(Y=>Y.id)])],!0);const m=ht.getMoreWineRecommendations(o(C),o(V));m.catch(()=>{}),await we(220),g(d,[],!0),g(T,!1);const{recommendations:L,hasMore:B}=await m;It({type:"more",query_id:K??void 0,text:o(C)||void 0}),hn(L,o(C)),ke(be.SHOW_MORE_CLICKED,o(Te),{query:o(C),results_count:L.length}),g(d,L.length>0?L:s,!0),g(A,B,!0)}catch(m){console.error("[wineater] try again error:",m),g(d,s,!0),g(A,!1)}finally{g(x,!1),g(b,!1)}}async function ze(){if(o(x)||o(tt)||!o(A))return;p=!0;const s=Rt();g(tt,!0);const m=await nt(s);if(g(tt,!1),ve=null,m.length===0)return it();g(V,s,!0),g(et,s,!0),g(k,null),g(We,!0),g(de,m,!0)}const Ke=s=>({id:s.id,title:s.title,price:s.total??0,total:s.total,type:s.type??"",region:s.region??"",grape:s.grape??"",appellation:s.appellation,url:s.url,store:"",storeId:null,image:s.image,producer:s.producer,country:s.country??"",vintage:s.vintage,tags:s.tags,pairingRecommendation:null,shortDescription:s.shortDescription??"",score:null,itemId:null,isPromote:null,stock:null,byTheGlass:s.byTheGlass,glassPrice:s.glassPrice});function gn(s,m,L){g(V,[...new Set([...o(V),...m,...s.map(B=>B.id)])],!0),g(de,null),g(A,!1),s.length!==0&&(g(d,s.map(Ke),!0),hn(o(d),o(C)))}function en(){g(de,null),g(We,!1)}async function Or(s){p=!0;try{g(b,!0),P(),ke(be.SIMILAR_WINES_CLICKED,o(Te),{wine_id:s.id,wine_title:s.title}),It({type:"similar",query_id:K??void 0,sku_ids:[s.id]}),K=Za();const m=ht.getSimilarWines(s.id);m.catch(()=>{}),await we(220),g(d,[],!0),g(T,!1),g(A,!1),g(de,null),g(k,null);const L=await m;g(z,s.title,!0),g(C,""),!L||L.length===0?(g(d,[],!0),g(I,[],!0),g(N,fe({key:"noResultsMessage",lang:o(rt)}),!0)):(g(d,L,!0),hn(L,""))}catch(m){g(d,[],!0),console.error("[wineater] similar wines error:",m),Bn()}finally{g(b,!1)}}sn(async()=>{if(!o(d)||o(d).length===0){g(I,[],!0);return}const s=o(d);try{const m=await q(o(d));o(d)===s&&o(d).length>0&&g(I,m,!0)}catch(m){console.error("translatePopupContent failed",m)}});function pr(s,m){fo.isMobile?(g(k,null),g(D,s.id,!0)):g(k,s.id,!0),It({type:"click",query_id:K??void 0,sku_ids:[s.id],position:m}),ke(be.WINE_DETAILS_VIEWED,o(Te),{wine_id:s.id,wine_title:s.title,is_mobile:window.innerWidth<=768})}function ho(s,m){It({type:"buy_click",query_id:K??void 0,sku_ids:[s.id],position:m}),ke(be.BUY_BUTTON_CLICKED,o(Te),{wine_id:s.id,wine_title:s.title,wine_url:s.url,is_mobile:window.innerWidth<=768})}async function fi(s,m){const L=ja(s);if(!n||!L)return;It({type:"add_to_cart",query_id:K??void 0,sku_ids:[s.id],position:m}),ke(be.BUY_BUTTON_CLICKED,o(Te),{action:"add_to_cart",wine_id:s.id,wine_title:s.title,wine_url:s.url,variant_id:L,query:o(C)||void 0,is_mobile:window.innerWidth<=768});const B=await fd(L,{root:n.root,sessionId:Fa()});B.ok&&(g(ne,[...o(ne),s.id],!0),window.dispatchEvent(new CustomEvent("wineater:added-to-cart",{detail:{variantId:L,via:B.via}})))}function pi(){const s=o(d).find(m=>m.id===o(k));ke(be.WINE_DETAILS_CLOSED,o(Te),{wine_id:o(k),wine_title:s.title}),g(k,null)}function go(s){return!!(s.reason||s.shortDescription||s.tags)}function wo(s){f==="store"&&go(s)&&(g(D,s.id,!0),ke(be.WINE_CARD_HOVER,o(Te),{wine_id:s.id,wine_title:s.title}))}function mo(s){f==="store"&&o(D)===s.id&&g(D,null)}function vi(s,m){s.target.closest(".js-WineTileAction")||s.target.closest(".js-WinePopupClose")||(It({type:"click",query_id:K??void 0,sku_ids:[m.id],position:o(d).findIndex(L=>L.id===m.id)}),ke(be.WINE_CARD_CLICK,o(Te),{wine_id:m.id,wine_title:m.title}))}function wn(s){var B;const m=((B=s.composedPath)==null?void 0:B.call(s)[0])??s.target;if(!(m!=null&&m.closest))return;m.closest(".js-WinePopup")||m.closest(".js-WineTileAction")||g(k,null),fo.isMobile&&!m.closest(".wr-WineTile")&&g(D,null)}const hi=((wi=(Ur=(hr=(jr=window==null?void 0:window.wineaterData)==null?void 0:jr.mountTarget)==null?void 0:hr.getRootNode)==null?void 0:Ur.call(hr))==null?void 0:wi.host)||document.documentElement;sn(()=>{var s,m;(s=o(wt))!=null&&s.brandColor&&hi.style.setProperty("--wr-brand-color",o(wt).brandColor),(m=o(wt))!=null&&m.wineaterColor&&hi.style.setProperty("--wr-wineater-color",o(wt).wineaterColor)}),ei(()=>(document.addEventListener("click",wn),(async()=>{const s=ue.initializeStore();if(Q(s),await s,!o(fr)){g(w,!0);return}o(wt).customCss&&od(o(wt).customCss),g(_,!0),n&&!o(Br)&&g(ce,!0),ke(be.WIDGET_INITIALIZED,o(Te))})(),()=>{document.removeEventListener("click",wn)}));var mn=Qn(),_o=je(mn);{var vr=s=>{var m=Jd();let L;var B=y(m);{var Y=j=>{var se=Kd(),me=y(se);R(()=>M(me,"src",o(wt).logoUrl)),S(j,se)};H(B,j=>{o(wt).logoUrl&&j(Y)})}var Ce=E(B,2);tu(Ce,{});var Oe=E(Ce,2);fu(Oe,{onSubmit:Le,get initialized(){return o(_)},get searchQuery(){return o(z)},set searchQuery(j){g(z,j,!0)}});var ot=E(Oe,2),Mt=y(ot);{var mt=j=>{var se=Yd(),me=y(se);R(Ye=>O(me,Ye),[()=>fe({key:"sommelierResting",lang:o(rt)})]),S(j,se)};H(Mt,j=>{o(ce)&&!o(N)&&j(mt)})}var tn=E(Mt,2);{var he=j=>{var se=Xd(),me=y(se),Ye=y(me);R(()=>O(Ye,o(N))),S(j,se)},Be=j=>{var se=Qd(),me=je(se);{var Ye=at=>{Gd(at,{get cards(){return o(de)},get shownIds(){return o(et)},get queryId(){return K},get query(){return o(C)},onFinish:gn,onClose:en})};H(me,at=>{o(de)&&at(Ye)})}var qn=E(me,2);Lt(qn,21,()=>o(d),Rn,(at,J,re)=>{{let Me=F(()=>n?fi:void 0),st=F(()=>o(ne).includes(o(J).id)),_n=F(()=>n?void 0:Or);Ju(at,{get wine(){return o(J)},index:re,get hoveredWineId(){return o(D)},get selectedWineId(){return o(k)},get isAnimating(){return o(T)},get translatedPopup(){return o(I)[re]},onBuyClick:pr,onBuyLinkClick:ho,get onAddToCart(){return o(Me)},get addedToCart(){return o(st)},onPopupClose:pi,get onSimilarClick(){return o(_n)},onTileEnter:wo,onTileLeave:mo,onTileClick:vi})}});var wr=E(qn,2);{var mr=at=>{var J=Zd();let re;var Me=y(J);{let st=F(()=>o(Ut)?ze:it);un(Me,{get handleClick(){return o(st)},variant:"outlined",children:(_n,Cs)=>{var Es=Qt();R(rf=>O(Es,rf),[()=>fe({key:o(Ut)?"helpMeChoose":"tryAgain",lang:o(rt)})]),S(_n,Es)},$$slots:{default:!0}})}R(()=>{re=He(J,1,"wr-App-showMore svelte-1n46o8q",null,re,{"is-pending":o(tt)}),M(J,"aria-busy",o(tt))}),S(at,J)};H(wr,at=>{o(A)&&at(mr)})}S(j,se)},Wt=j=>{us(j)};H(tn,j=>{o(N)?j(he):o(d)&&o(d).length>0?j(Be,1):o(b)&&j(Wt,2)})}var On=E(ot,2);{var gr=j=>{nd(j,{get lang(){return o(rt)}})},Fr=F(()=>wc());H(On,j=>{o(Fr)&&j(gr)})}var Hr=E(On,2);{var Gr=j=>{au(j,{get countryCode(){return h}})};H(Hr,j=>{n||j(Gr)})}R(()=>L=He(m,1,"wr-App svelte-1n46o8q",null,L,{"wr-App--embedded":!!n})),S(s,m)},bo=s=>{var m=$d();let L;var B=E(y(m),2);us(B),R(()=>L=He(m,1,"wr-App wr-App--loading svelte-1n46o8q",null,L,{"wr-App--embedded":!!n})),S(s,m)};H(_o,s=>{o(fr)?s(vr):o(w)||s(bo,1)})}S(e,mn),kt()}const nf=((Ss=window.wineaterData)==null?void 0:Ss.mountTarget)||document.getElementById("wineater-widget-conteiner");return Kl(tf,{target:nf})});