wineater-bot 4.25.0 → 4.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- (function(J,$){typeof exports=="object"&&typeof module<"u"?module.exports=$():typeof define=="function"&&define.amd?define($):(J=typeof globalThis<"u"?globalThis:J||self,J.WineaterChatbot=$())})(this,function(){"use strict";var Ou=Object.defineProperty;var La=J=>{throw TypeError(J)};var ju=(J,$,he)=>$ in J?Ou(J,$,{enumerable:!0,configurable:!0,writable:!0,value:he}):J[$]=he;var Ke=(J,$,he)=>ju(J,typeof $!="symbol"?$+"":$,he),Mi=(J,$,he)=>$.has(J)||La("Cannot "+he);var f=(J,$,he)=>(Mi(J,$,"read from private field"),he?he.call(J):$.get(J)),j=(J,$,he)=>$.has(J)?La("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(J):$.set(J,he),z=(J,$,he,qn)=>(Mi(J,$,"write to private field"),qn?qn.call(J,he):$.set(J,he),he),Q=(J,$,he)=>(Mi(J,$,"access private method"),he);var Ta,En,Pn,ln,An,nr,In,jt,ht,Dn,Be,Bi,Ni,Li,za,Ge,bi,vt,cn,Ae,pt,Ne,nt,Tt,un,qt,Rn,Wn,Mn,Et,Tr,ve,qu,Fu,Uu,zi,Mr,Br,Oi,Ea,rt,gt,Le,dn,rr,ir,Er,Bn,or,Ft,Nn,Ln,fn,se,ji,It,qi,Fi,Oa,Pa,Aa,Ia;const J="5";typeof window<"u"&&((Ta=window.__svelte??(window.__svelte={})).v??(Ta.v=new Set)).add(J);const $=1,he=2,qn=4,ja=8,qa=16,Fa=1,Ua=2,Ha=4,Va=8,Ga=16,Ui=1,Ka=2,_e=Symbol(),Hi="http://www.w3.org/1999/xhtml",Nr=!1;var Lr=Array.isArray,Ya=Array.prototype.indexOf,pn=Array.prototype.includes,ur=Array.from,Qa=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,Za=Object.getOwnPropertyDescriptors,Xa=Object.prototype,Ja=Array.prototype,Vi=Object.getPrototypeOf,Gi=Object.isExtensible;const $a=()=>{};function es(e){for(var t=0;t<e.length;t++)e[t]()}function Ki(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function ts(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 ye=2,Fn=4,dr=8,Yi=1<<24,wt=16,Ye=32,Kt=64,zr=128,qe=512,ge=1024,be=2048,Qe=4096,Re=8192,_t=16384,Yt=32768,Qt=65536,Qi=1<<17,Zi=1<<18,mn=1<<19,ns=1<<20,yt=1<<25,Zt=65536,Or=1<<21,jr=1<<22,Dt=1<<23,Xt=Symbol("$state"),rs=Symbol("legacy props"),is=Symbol(""),Jt=new class extends Error{constructor(){super(...arguments);Ke(this,"name","StaleReactionError");Ke(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function os(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function as(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ss(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ls(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function cs(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function us(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ds(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function fs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function hs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function vs(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ps(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function gs(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ms(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ws(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Xi(e){return e===this.v}function _s(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ji(e){return!_s(e,this.v)}let wn=!1,ys=!1;function bs(){wn=!0}let fe=null;function _n(e){fe=e}function st(e,t=!1,n){fe={p:fe,i:!1,c:null,e:null,s:e,x:null,l:wn&&!t?{s:null,u:null,$:[]}:null}}function lt(e){var t=fe,n=t.e;if(n!==null){t.e=null;for(var r of n)xo(r)}return e!==void 0&&(t.x=e),t.i=!0,fe=t.p,e??{}}function Un(){return!wn||fe!==null&&fe.l===null}let $t=[];function $i(){var e=$t;$t=[],es(e)}function bt(e){if($t.length===0&&!Hn){var t=$t;queueMicrotask(()=>{t===$t&&$i()})}$t.push(e)}function xs(){for(;$t.length>0;)$i()}function eo(e){var t=Z;if(t===null)return H.f|=Dt,e;if(!(t.f&Yt)&&!(t.f&Fn))throw e;Rt(e,t)}function Rt(e,t){for(;t!==null;){if(t.f&zr){if(!(t.f&Yt))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const ks=-7169;function le(e,t){e.f=e.f&ks|t}function qr(e){e.f&qe||e.deps===null?le(e,ge):le(e,Qe)}function to(e){if(e!==null)for(const t of e)!(t.f&ye)||!(t.f&Zt)||(t.f^=Zt,to(t.deps))}function no(e,t,n){e.f&be?t.add(e):e.f&Qe&&n.add(e),to(e.deps),le(e,ge)}const fr=new Set;let q=null,Fr=null,xe=null,ke=[],hr=null,Ur=!1,Hn=!1;const yi=class yi{constructor(){j(this,Be);Ke(this,"current",new Map);Ke(this,"previous",new Map);j(this,En,new Set);j(this,Pn,new Set);j(this,ln,0);j(this,An,0);j(this,nr,null);j(this,In,new Set);j(this,jt,new Set);j(this,ht,new Map);Ke(this,"is_fork",!1);j(this,Dn,!1)}skip_effect(t){f(this,ht).has(t)||f(this,ht).set(t,{d:[],m:[]})}unskip_effect(t){var n=f(this,ht).get(t);if(n){f(this,ht).delete(t);for(var r of n.d)le(r,be),Xe(r);for(r of n.m)le(r,Qe),Xe(r)}}process(t){var i;ke=[],this.apply();var n=[],r=[];for(const o of t)Q(this,Be,Ni).call(this,o,n,r);if(Q(this,Be,Bi).call(this)){Q(this,Be,Li).call(this,r),Q(this,Be,Li).call(this,n);for(const[o,l]of f(this,ht))so(o,l)}else{for(const o of f(this,En))o();f(this,En).clear(),f(this,ln)===0&&Q(this,Be,za).call(this),Fr=this,q=null,io(r),io(n),f(this,In).clear(),f(this,jt).clear(),Fr=null,(i=f(this,nr))==null||i.resolve()}xe=null}capture(t,n){n!==_e&&!this.previous.has(t)&&this.previous.set(t,n),t.f&Dt||(this.current.set(t,t.v),xe==null||xe.set(t,t.v))}activate(){q=this,this.apply()}deactivate(){q===this&&(q=null,xe=null)}flush(){if(this.activate(),ke.length>0){if(ro(),q!==null&&q!==this)return}else f(this,ln)===0&&this.process([]);this.deactivate()}discard(){for(const t of f(this,Pn))t(this);f(this,Pn).clear()}increment(t){z(this,ln,f(this,ln)+1),t&&z(this,An,f(this,An)+1)}decrement(t){z(this,ln,f(this,ln)-1),t&&z(this,An,f(this,An)-1),!f(this,Dn)&&(z(this,Dn,!0),bt(()=>{z(this,Dn,!1),Q(this,Be,Bi).call(this)?ke.length>0&&this.flush():this.revive()}))}revive(){for(const t of f(this,In))f(this,jt).delete(t),le(t,be),Xe(t);for(const t of f(this,jt))le(t,Qe),Xe(t);this.flush()}oncommit(t){f(this,En).add(t)}ondiscard(t){f(this,Pn).add(t)}settled(){return(f(this,nr)??z(this,nr,Ki())).promise}static ensure(){if(q===null){const t=q=new yi;fr.add(q),Hn||bt(()=>{q===t&&t.flush()})}return q}apply(){}};En=new WeakMap,Pn=new WeakMap,ln=new WeakMap,An=new WeakMap,nr=new WeakMap,In=new WeakMap,jt=new WeakMap,ht=new WeakMap,Dn=new WeakMap,Be=new WeakSet,Bi=function(){return this.is_fork||f(this,An)>0},Ni=function(t,n,r){t.f^=ge;for(var i=t.first;i!==null;){var o=i.f,l=(o&(Ye|Kt))!==0,c=l&&(o&ge)!==0,s=c||(o&Re)!==0||f(this,ht).has(i);if(!s&&i.fn!==null){l?i.f^=ge:o&Fn?n.push(i):Kn(i)&&(o&wt&&f(this,jt).add(i),xn(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var v=i.next;if(v!==null){i=v;break}i=i.parent}}},Li=function(t){for(var n=0;n<t.length;n+=1)no(t[n],f(this,In),f(this,jt))},za=function(){var i;if(fr.size>1){this.previous.clear();var t=xe,n=!0;for(const o of fr){if(o===this){n=!1;continue}const l=[];for(const[s,u]of this.current){if(o.current.has(s))if(n&&u!==o.current.get(s))o.current.set(s,u);else continue;l.push(s)}if(l.length===0)continue;const c=[...o.current.keys()].filter(s=>!this.current.has(s));if(c.length>0){var r=ke;ke=[];const s=new Set,u=new Map;for(const v of l)oo(v,c,s,u);if(ke.length>0){q=o,o.apply();for(const v of ke)Q(i=o,Be,Ni).call(i,v,[],[]);o.deactivate()}ke=r}}q=null,xe=t}f(this,ht).clear(),fr.delete(this)};let Wt=yi;function Ss(e){var t=Hn;Hn=!0;try{for(var n;;){if(xs(),ke.length===0&&(q==null||q.flush(),ke.length===0))return hr=null,n;ro()}}finally{Hn=t}}function ro(){Ur=!0;var e=null;try{for(var t=0;ke.length>0;){var n=Wt.ensure();if(t++>1e3){var r,i;Cs()}n.process(ke),Mt.clear()}}finally{ke=[],Ur=!1,hr=null}}function Cs(){try{ds()}catch(e){Rt(e,hr)}}let Ze=null;function io(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(_t|Re))&&Kn(r)&&(Ze=new Set,xn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Co(r),(Ze==null?void 0:Ze.size)>0)){Mt.clear();for(const i of Ze){if(i.f&(_t|Re))continue;const o=[i];let l=i.parent;for(;l!==null;)Ze.has(l)&&(Ze.delete(l),o.push(l)),l=l.parent;for(let c=o.length-1;c>=0;c--){const s=o[c];s.f&(_t|Re)||xn(s)}}Ze.clear()}}Ze=null}}function oo(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;o&ye?oo(i,t,n,r):o&(jr|wt)&&!(o&be)&&ao(i,t,r)&&(le(i,be),Xe(i))}}function ao(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(pn.call(t,i))return!0;if(i.f&ye&&ao(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Xe(e){var t=hr=e,n=t.b;if(n!=null&&n.is_pending&&e.f&(Fn|dr|Yi)&&!(e.f&Yt)){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Ur&&t===Z&&r&wt&&!(r&Zi)&&r&Yt)return;if(r&(Kt|Ye)){if(!(r&ge))return;t.f^=ge}}ke.push(t)}function so(e,t){if(!(e.f&Ye&&e.f&ge)){e.f&be?t.d.push(e):e.f&Qe&&t.m.push(e),le(e,ge);for(var n=e.first;n!==null;)so(n,t),n=n.next}}function Ts(e){let t=0,n=en(0),r;return()=>{Yr()&&(a(n),Zr(()=>(t===0&&(r=Qn(()=>e(()=>Vn(n)))),t+=1,()=>{bt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,Vn(n))})})))}}var Es=Qt|mn;function Ps(e,t,n,r){new As(e,t,n,r)}class As{constructor(t,n,r,i){j(this,ve);Ke(this,"parent");Ke(this,"is_pending",!1);Ke(this,"transform_error");j(this,Ge);j(this,bi,null);j(this,vt);j(this,cn);j(this,Ae);j(this,pt,null);j(this,Ne,null);j(this,nt,null);j(this,Tt,null);j(this,un,0);j(this,qt,0);j(this,Rn,!1);j(this,Wn,new Set);j(this,Mn,new Set);j(this,Et,null);j(this,Tr,Ts(()=>(z(this,Et,en(f(this,un))),()=>{z(this,Et,null)})));var o;z(this,Ge,t),z(this,vt,n),z(this,cn,l=>{var c=Z;c.b=this,c.f|=zr,r(l)}),this.parent=Z.b,this.transform_error=i??((o=this.parent)==null?void 0:o.transform_error)??(l=>l),z(this,Ae,gr(()=>{Q(this,ve,zi).call(this)},Es))}defer_effect(t){no(t,f(this,Wn),f(this,Mn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,vt).pending}update_pending_count(t){Q(this,ve,Oi).call(this,t),z(this,un,f(this,un)+t),!(!f(this,Et)||f(this,Rn))&&(z(this,Rn,!0),bt(()=>{z(this,Rn,!1),f(this,Et)&&yn(f(this,Et),f(this,un))}))}get_effect_pending(){return f(this,Tr).call(this),a(f(this,Et))}error(t){var n=f(this,vt).onerror;let r=f(this,vt).failed;if(!n&&!r)throw t;f(this,pt)&&(Se(f(this,pt)),z(this,pt,null)),f(this,Ne)&&(Se(f(this,Ne)),z(this,Ne,null)),f(this,nt)&&(Se(f(this,nt)),z(this,nt,null));var i=!1,o=!1;const l=()=>{if(i){ws();return}i=!0,o&&gs(),f(this,nt)!==null&&tn(f(this,nt),()=>{z(this,nt,null)}),Q(this,ve,Br).call(this,()=>{Wt.ensure(),Q(this,ve,zi).call(this)})},c=s=>{try{o=!0,n==null||n(s,l),o=!1}catch(u){Rt(u,f(this,Ae)&&f(this,Ae).parent)}r&&z(this,nt,Q(this,ve,Br).call(this,()=>{Wt.ensure();try{return Fe(()=>{var u=Z;u.b=this,u.f|=zr,r(f(this,Ge),()=>s,()=>l)})}catch(u){return Rt(u,f(this,Ae).parent),null}}))};bt(()=>{var s;try{s=this.transform_error(t)}catch(u){Rt(u,f(this,Ae)&&f(this,Ae).parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(c,u=>Rt(u,f(this,Ae)&&f(this,Ae).parent)):c(s)})}}Ge=new WeakMap,bi=new WeakMap,vt=new WeakMap,cn=new WeakMap,Ae=new WeakMap,pt=new WeakMap,Ne=new WeakMap,nt=new WeakMap,Tt=new WeakMap,un=new WeakMap,qt=new WeakMap,Rn=new WeakMap,Wn=new WeakMap,Mn=new WeakMap,Et=new WeakMap,Tr=new WeakMap,ve=new WeakSet,qu=function(){try{z(this,pt,Fe(()=>f(this,cn).call(this,f(this,Ge))))}catch(t){this.error(t)}},Fu=function(t){const n=f(this,vt).failed;n&&z(this,nt,Fe(()=>{n(f(this,Ge),()=>t,()=>()=>{})}))},Uu=function(){const t=f(this,vt).pending;t&&(this.is_pending=!0,z(this,Ne,Fe(()=>t(f(this,Ge)))),bt(()=>{var n=z(this,Tt,document.createDocumentFragment()),r=xt();n.append(r),z(this,pt,Q(this,ve,Br).call(this,()=>(Wt.ensure(),Fe(()=>f(this,cn).call(this,r))))),f(this,qt)===0&&(f(this,Ge).before(n),z(this,Tt,null),tn(f(this,Ne),()=>{z(this,Ne,null)}),Q(this,ve,Mr).call(this))}))},zi=function(){try{if(this.is_pending=this.has_pending_snippet(),z(this,qt,0),z(this,un,0),z(this,pt,Fe(()=>{f(this,cn).call(this,f(this,Ge))})),f(this,qt)>0){var t=z(this,Tt,document.createDocumentFragment());Po(f(this,pt),t);const n=f(this,vt).pending;z(this,Ne,Fe(()=>n(f(this,Ge))))}else Q(this,ve,Mr).call(this)}catch(n){this.error(n)}},Mr=function(){this.is_pending=!1;for(const t of f(this,Wn))le(t,be),Xe(t);for(const t of f(this,Mn))le(t,Qe),Xe(t);f(this,Wn).clear(),f(this,Mn).clear()},Br=function(t){var n=Z,r=H,i=fe;ct(f(this,Ae)),Ue(f(this,Ae)),_n(f(this,Ae).ctx);try{return t()}catch(o){return eo(o),null}finally{ct(n),Ue(r),_n(i)}},Oi=function(t){var n;if(!this.has_pending_snippet()){this.parent&&Q(n=this.parent,ve,Oi).call(n,t);return}z(this,qt,f(this,qt)+t),f(this,qt)===0&&(Q(this,ve,Mr).call(this),f(this,Ne)&&tn(f(this,Ne),()=>{z(this,Ne,null)}),f(this,Tt)&&(f(this,Ge).before(f(this,Tt)),z(this,Tt,null)))};function Is(e,t,n,r){const i=Un()?vr:Vr;var o=e.filter(m=>!m.settled);if(n.length===0&&o.length===0){r(t.map(i));return}var l=Z,c=Ds(),s=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(m=>m.promise)):null;function u(m){c();try{r(m)}catch(h){l.f&_t||Rt(h,l)}Hr()}if(n.length===0){s.then(()=>u(t.map(i)));return}function v(){c(),Promise.all(n.map(m=>Ws(m))).then(m=>u([...t.map(i),...m])).catch(m=>Rt(m,l))}s?s.then(v):v()}function Ds(){var e=Z,t=H,n=fe,r=q;return function(o=!0){ct(e),Ue(t),_n(n),o&&(r==null||r.activate())}}function Hr(e=!0){ct(null),Ue(null),_n(null),e&&(q==null||q.deactivate())}function Rs(){var e=Z.b,t=q,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function vr(e){var t=ye|be,n=H!==null&&H.f&ye?H:null;return Z!==null&&(Z.f|=mn),{ctx:fe,deps:null,effects:null,equals:Xi,f:t,fn:e,reactions:null,rv:0,v:_e,wv:0,parent:n??Z,ac:null}}function Ws(e,t,n){Z===null&&as();var i=void 0,o=en(_e),l=!H,c=new Map;return Ks(()=>{var h;var s=Ki();i=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).finally(Hr)}catch(p){s.reject(p),Hr()}var u=q;if(l){var v=Rs();(h=c.get(u))==null||h.reject(Jt),c.delete(u),c.set(u,s)}const m=(p,g=void 0)=>{if(u.activate(),g)g!==Jt&&(o.f|=Dt,yn(o,g));else{o.f&Dt&&(o.f^=Dt),yn(o,p);for(const[y,d]of c){if(c.delete(y),y===u)break;d.reject(Jt)}}v&&v()};s.promise.then(m,p=>m(null,p||"unknown"))}),Qr(()=>{for(const s of c.values())s.reject(Jt)}),new Promise(s=>{function u(v){function m(){v===i?s(o):u(i)}v.then(m,m)}u(i)})}function F(e){const t=vr(e);return Io(t),t}function Vr(e){const t=vr(e);return t.equals=Ji,t}function Ms(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Se(t[n])}}function Bs(e){for(var t=e.parent;t!==null;){if(!(t.f&ye))return t.f&_t?null:t;t=t.parent}return null}function Gr(e){var t,n=Z;ct(Bs(e));try{e.f&=~Zt,Ms(e),t=Bo(e)}finally{ct(n)}return t}function lo(e){var t=Gr(e);if(!e.equals(t)&&(e.wv=Wo(),(!(q!=null&&q.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){le(e,ge);return}Bt||(xe!==null?(Yr()||q!=null&&q.is_fork)&&xe.set(e,t):qr(e))}function Ns(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(Jt),r.teardown=$a,r.ac=null,Yn(r,0),Xr(r))}function co(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&xn(t)}let Kr=new Set;const Mt=new Map;let uo=!1;function en(e,t){var n={f:0,v:e,reactions:null,equals:Xi,rv:0,wv:0};return n}function G(e,t){const n=en(e);return Io(n),n}function Ls(e,t=!1,n=!0){var i;const r=en(e);return t||(r.equals=Ji),wn&&n&&fe!==null&&fe.l!==null&&((i=fe.l).s??(i.s=[])).push(r),r}function w(e,t,n=!1){H!==null&&(!$e||H.f&Qi)&&Un()&&H.f&(ye|wt|jr|Qi)&&(He===null||!pn.call(He,e))&&ps();let r=n?We(t):t;return yn(e,r)}function yn(e,t){if(!e.equals(t)){var n=e.v;Bt?Mt.set(e,t):Mt.set(e,n),e.v=t;var r=Wt.ensure();if(r.capture(e,n),e.f&ye){const i=e;e.f&be&&Gr(i),qr(i)}e.wv=Wo(),ho(e,be),Un()&&Z!==null&&Z.f&ge&&!(Z.f&(Ye|Kt))&&(Ve===null?Zs([e]):Ve.push(e)),!r.is_fork&&Kr.size>0&&!uo&&zs()}return t}function zs(){uo=!1;for(const e of Kr)e.f&ge&&le(e,Qe),Kn(e)&&xn(e);Kr.clear()}function fo(e,t=1){var n=a(e),r=t===1?n++:n--;return w(e,n),r}function Vn(e){w(e,e.v+1)}function ho(e,t){var n=e.reactions;if(n!==null)for(var r=Un(),i=n.length,o=0;o<i;o++){var l=n[o],c=l.f;if(!(!r&&l===Z)){var s=(c&be)===0;if(s&&le(l,t),c&ye){var u=l;xe==null||xe.delete(u),c&Zt||(c&qe&&(l.f|=Zt),ho(u,Qe))}else s&&(c&wt&&Ze!==null&&Ze.add(l),Xe(l))}}}function We(e){if(typeof e!="object"||e===null||Xt in e)return e;const t=Vi(e);if(t!==Xa&&t!==Ja)return e;var n=new Map,r=Lr(e),i=G(0),o=rn,l=c=>{if(rn===o)return c();var s=H,u=rn;Ue(null),Ro(o);var v=c();return Ue(s),Ro(u),v};return r&&n.set("length",G(e.length)),new Proxy(e,{defineProperty(c,s,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&hs();var v=n.get(s);return v===void 0?l(()=>{var m=G(u.value);return n.set(s,m),m}):w(v,u.value,!0),!0},deleteProperty(c,s){var u=n.get(s);if(u===void 0){if(s in c){const v=l(()=>G(_e));n.set(s,v),Vn(i)}}else w(u,_e),Vn(i);return!0},get(c,s,u){var p;if(s===Xt)return e;var v=n.get(s),m=s in c;if(v===void 0&&(!m||(p=gn(c,s))!=null&&p.writable)&&(v=l(()=>{var g=We(m?c[s]:_e),y=G(g);return y}),n.set(s,v)),v!==void 0){var h=a(v);return h===_e?void 0:h}return Reflect.get(c,s,u)},getOwnPropertyDescriptor(c,s){var u=Reflect.getOwnPropertyDescriptor(c,s);if(u&&"value"in u){var v=n.get(s);v&&(u.value=a(v))}else if(u===void 0){var m=n.get(s),h=m==null?void 0:m.v;if(m!==void 0&&h!==_e)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(c,s){var h;if(s===Xt)return!0;var u=n.get(s),v=u!==void 0&&u.v!==_e||Reflect.has(c,s);if(u!==void 0||Z!==null&&(!v||(h=gn(c,s))!=null&&h.writable)){u===void 0&&(u=l(()=>{var p=v?We(c[s]):_e,g=G(p);return g}),n.set(s,u));var m=a(u);if(m===_e)return!1}return v},set(c,s,u,v){var B;var m=n.get(s),h=s in c;if(r&&s==="length")for(var p=u;p<m.v;p+=1){var g=n.get(p+"");g!==void 0?w(g,_e):p in c&&(g=l(()=>G(_e)),n.set(p+"",g))}if(m===void 0)(!h||(B=gn(c,s))!=null&&B.writable)&&(m=l(()=>G(void 0)),w(m,We(u)),n.set(s,m));else{h=m.v!==_e;var y=l(()=>We(u));w(m,y)}var d=Reflect.getOwnPropertyDescriptor(c,s);if(d!=null&&d.set&&d.set.call(v,u),!h){if(r&&typeof s=="string"){var _=n.get("length"),D=Number(s);Number.isInteger(D)&&D>=_.v&&w(_,D+1)}Vn(i)}return!0},ownKeys(c){a(i);var s=Reflect.ownKeys(c).filter(m=>{var h=n.get(m);return h===void 0||h.v!==_e});for(var[u,v]of n)v.v!==_e&&!(u in c)&&s.push(u);return s},setPrototypeOf(){vs()}})}function vo(e){try{if(e!==null&&typeof e=="object"&&Xt in e)return e[Xt]}catch{}return e}function Os(e,t){return Object.is(vo(e),vo(t))}var po,go,mo,wo;function js(){if(po===void 0){po=window,go=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;mo=gn(t,"firstChild").get,wo=gn(t,"nextSibling").get,Gi(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Gi(n)&&(n.__t=void 0)}}function xt(e=""){return document.createTextNode(e)}function kt(e){return mo.call(e)}function Gn(e){return wo.call(e)}function P(e,t){return kt(e)}function Je(e,t=!1){{var n=kt(e);return n instanceof Comment&&n.data===""?Gn(n):n}}function R(e,t=1,n=!1){let r=e;for(;t--;)r=Gn(r);return r}function qs(e){e.textContent=""}function _o(){return!1}function yo(e,t,n){return document.createElementNS(Hi,e,void 0)}let bo=!1;function Fs(){bo||(bo=!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 pr(e){var t=H,n=Z;Ue(null),ct(null);try{return e()}finally{Ue(t),ct(n)}}function Us(e,t,n,r=n){e.addEventListener(t,()=>pr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Fs()}function Hs(e){Z===null&&(H===null&&us(),cs()),Bt&&ls()}function Vs(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function St(e,t,n){var r=Z;r!==null&&r.f&Re&&(e|=Re);var i={ctx:fe,deps:null,nodes:null,f:e|be|qe,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 Se(i),c}else t!==null&&Xe(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&!(o.f&mn)&&(o=o.first,e&wt&&e&Qt&&o!==null&&(o.f|=Qt)),o!==null&&(o.parent=r,r!==null&&Vs(o,r),H!==null&&H.f&ye&&!(e&Kt))){var l=H;(l.effects??(l.effects=[])).push(o)}return i}function Yr(){return H!==null&&!$e}function Qr(e){const t=St(dr,null,!1);return le(t,ge),t.teardown=e,t}function bn(e){Hs();var t=Z.f,n=!H&&(t&Ye)!==0&&(t&Yt)===0;if(n){var r=fe;(r.e??(r.e=[])).push(e)}else return xo(e)}function xo(e){return St(Fn|ns,e,!1)}function Gs(e){Wt.ensure();const t=St(Kt|mn,e,!0);return(n={})=>new Promise(r=>{n.outro?tn(t,()=>{Se(t),r(void 0)}):(Se(t),r(void 0))})}function ko(e){return St(Fn,e,!1)}function Ks(e){return St(jr|mn,e,!0)}function Zr(e,t=0){return St(dr|t,e,!0)}function M(e,t=[],n=[],r=[]){Is(r,t,n,i=>{St(dr,()=>e(...i.map(a)),!0)})}function gr(e,t=0){var n=St(wt|t,e,!0);return n}function Fe(e){return St(Ye|mn,e,!0)}function So(e){var t=e.teardown;if(t!==null){const n=Bt,r=H;Ao(!0),Ue(null);try{t.call(null)}finally{Ao(n),Ue(r)}}}function Xr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&pr(()=>{i.abort(Jt)});var r=n.next;n.f&Kt?n.parent=null:Se(n,t),n=r}}function Ys(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ye||Se(t),t=n}}function Se(e,t=!0){var n=!1;(t||e.f&Zi)&&e.nodes!==null&&e.nodes.end!==null&&(Qs(e.nodes.start,e.nodes.end),n=!0),Xr(e,t&&!n),Yn(e,0),le(e,_t);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();So(e);var i=e.parent;i!==null&&i.first!==null&&Co(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Qs(e,t){for(;e!==null;){var n=e===t?null:Gn(e);e.remove(),e=n}}function Co(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 tn(e,t,n=!0){var r=[];To(e,r,!0);var i=()=>{n&&Se(e),t&&t()},o=r.length;if(o>0){var l=()=>--o||i();for(var c of r)c.out(l)}else i()}function To(e,t,n){if(!(e.f&Re)){e.f^=Re;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 o=i.next,l=(i.f&Qt)!==0||(i.f&Ye)!==0&&(e.f&wt)!==0;To(i,t,l?n:!1),i=o}}}function Jr(e){Eo(e,!0)}function Eo(e,t){if(e.f&Re){e.f^=Re,e.f&ge||(le(e,be),Xe(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Qt)!==0||(n.f&Ye)!==0;Eo(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const l of o)(l.is_global||t)&&l.in()}}function Po(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Gn(n);t.append(n),n=i}}let mr=!1,Bt=!1;function Ao(e){Bt=e}let H=null,$e=!1;function Ue(e){H=e}let Z=null;function ct(e){Z=e}let He=null;function Io(e){H!==null&&(He===null?He=[e]:He.push(e))}let Ce=null,Me=0,Ve=null;function Zs(e){Ve=e}let Do=1,nn=0,rn=nn;function Ro(e){rn=e}function Wo(){return++Do}function Kn(e){var t=e.f;if(t&be)return!0;if(t&ye&&(e.f&=~Zt),t&Qe){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Kn(o)&&lo(o),o.wv>e.wv)return!0}t&qe&&xe===null&&le(e,ge)}return!1}function Mo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(He!==null&&pn.call(He,e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&ye?Mo(o,t,!1):t===o&&(n?le(o,be):o.f&ge&&le(o,Qe),Xe(o))}}function Bo(e){var y;var t=Ce,n=Me,r=Ve,i=H,o=He,l=fe,c=$e,s=rn,u=e.f;Ce=null,Me=0,Ve=null,H=u&(Ye|Kt)?null:e,He=null,_n(e.ctx),$e=!1,rn=++nn,e.ac!==null&&(pr(()=>{e.ac.abort(Jt)}),e.ac=null);try{e.f|=Or;var v=e.fn,m=v();e.f|=Yt;var h=e.deps,p=q==null?void 0:q.is_fork;if(Ce!==null){var g;if(p||Yn(e,Me),h!==null&&Me>0)for(h.length=Me+Ce.length,g=0;g<Ce.length;g++)h[Me+g]=Ce[g];else e.deps=h=Ce;if(Yr()&&e.f&qe)for(g=Me;g<h.length;g++)((y=h[g]).reactions??(y.reactions=[])).push(e)}else!p&&h!==null&&Me<h.length&&(Yn(e,Me),h.length=Me);if(Un()&&Ve!==null&&!$e&&h!==null&&!(e.f&(ye|Qe|be)))for(g=0;g<Ve.length;g++)Mo(Ve[g],e);if(i!==null&&i!==e){if(nn++,i.deps!==null)for(let d=0;d<n;d+=1)i.deps[d].rv=nn;if(t!==null)for(const d of t)d.rv=nn;Ve!==null&&(r===null?r=Ve:r.push(...Ve))}return e.f&Dt&&(e.f^=Dt),m}catch(d){return eo(d)}finally{e.f^=Or,Ce=t,Me=n,Ve=r,H=i,He=o,_n(l),$e=c,rn=s}}function Xs(e,t){let n=t.reactions;if(n!==null){var r=Ya.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&ye&&(Ce===null||!pn.call(Ce,t))){var o=t;o.f&qe&&(o.f^=qe,o.f&=~Zt),qr(o),Ns(o),Yn(o,0)}}function Yn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Xs(e,n[r])}function xn(e){var t=e.f;if(!(t&_t)){le(e,ge);var n=Z,r=mr;Z=e,mr=!0;try{t&(wt|Yi)?Ys(e):Xr(e),So(e);var i=Bo(e);e.teardown=typeof i=="function"?i:null,e.wv=Do;var o;Nr&&ys&&e.f&be&&e.deps}finally{mr=r,Z=n}}}async function Js(){await Promise.resolve(),Ss()}function a(e){var t=e.f,n=(t&ye)!==0;if(H!==null&&!$e){var r=Z!==null&&(Z.f&_t)!==0;if(!r&&(He===null||!pn.call(He,e))){var i=H.deps;if(H.f&Or)e.rv<nn&&(e.rv=nn,Ce===null&&i!==null&&i[Me]===e?Me++:Ce===null?Ce=[e]:Ce.push(e));else{(H.deps??(H.deps=[])).push(e);var o=e.reactions;o===null?e.reactions=[H]:pn.call(o,H)||o.push(H)}}}if(Bt&&Mt.has(e))return Mt.get(e);if(n){var l=e;if(Bt){var c=l.v;return(!(l.f&ge)&&l.reactions!==null||Lo(l))&&(c=Gr(l)),Mt.set(l,c),c}var s=(l.f&qe)===0&&!$e&&H!==null&&(mr||(H.f&qe)!==0),u=(l.f&Yt)===0;Kn(l)&&(s&&(l.f|=qe),lo(l)),s&&!u&&(co(l),No(l))}if(xe!=null&&xe.has(e))return xe.get(e);if(e.f&Dt)throw e.v;return e.v}function No(e){if(e.f|=qe,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&ye&&!(t.f&qe)&&(co(t),No(t))}function Lo(e){if(e.v===_e)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Mt.has(t)||t.f&ye&&Lo(t))return!0;return!1}function Qn(e){var t=$e;try{return $e=!0,e()}finally{$e=t}}const on=Symbol("events"),zo=new Set,$r=new Set;function $s(e,t,n,r={}){function i(o){if(r.capture||ei.call(t,o),!o.cancelBubble)return pr(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?bt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ut(e,t,n,r,i){var o={capture:r,passive:i},l=$s(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Qr(()=>{t.removeEventListener(e,l,o)})}function an(e,t,n){(t[on]??(t[on]={}))[e]=n}function wr(e){for(var t=0;t<e.length;t++)zo.add(e[t]);for(var n of $r)n(e)}let Oo=null;function ei(e){var d,_;var t=this,n=t.ownerDocument,r=e.type,i=((d=e.composedPath)==null?void 0:d.call(e))||[],o=i[0]||e.target;Oo=e;var l=0,c=Oo===e&&e[on];if(c){var s=i.indexOf(c);if(s!==-1&&(t===document||t===window)){e[on]=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(l=s)}if(o=i[l]||e.target,o!==t){Qa(e,"currentTarget",{configurable:!0,get(){return o||n}});var v=H,m=Z;Ue(null),ct(null);try{for(var h,p=[];o!==null;){var g=o.assignedSlot||o.parentNode||o.host||null;try{var y=(_=o[on])==null?void 0:_[r];y!=null&&(!o.disabled||e.target===o)&&y.call(o,e)}catch(D){h?p.push(D):h=D}if(e.cancelBubble||g===t||g===null)break;o=g}if(h){for(let D of p)queueMicrotask(()=>{throw D});throw h}}finally{e[on]=t,delete e.currentTarget,Ue(v),ct(m)}}}const ti=((Ea=globalThis==null?void 0:globalThis.window)==null?void 0:Ea.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function el(e){return(ti==null?void 0:ti.createHTML(e))??e}function jo(e){var t=yo("template");return t.innerHTML=el(e.replaceAll("<!>","<!---->")),t.content}function kn(e,t){var n=Z;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function L(e,t){var n=(t&Ui)!==0,r=(t&Ka)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=jo(o?e:"<!>"+e),n||(i=kt(i)));var l=r||go?document.importNode(i,!0):i.cloneNode(!0);if(n){var c=kt(l),s=l.lastChild;kn(c,s)}else kn(l,l);return l}}function tl(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&Ui)!==0,o=`<${n}>${r?e:"<!>"+e}</${n}>`,l;return()=>{if(!l){var c=jo(o),s=kt(c);if(i)for(l=document.createDocumentFragment();kt(s);)l.appendChild(kt(s));else l=kt(s)}var u=l.cloneNode(!0);if(i){var v=kt(u),m=u.lastChild;kn(v,m)}else kn(u,u);return u}}function Nt(e,t){return tl(e,t,"svg")}function Ct(e=""){{var t=xt(e+"");return kn(t,t),t}}function _r(){var e=document.createDocumentFragment(),t=document.createComment(""),n=xt();return e.append(t,n),kn(t,n),e}function T(e,t){e!==null&&e.before(t)}const nl=["touchstart","touchmove"];function rl(e){return nl.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 il(e,t){return ol(e,t)}const yr=new Map;function ol(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:l=!0,transformError:c}){js();var s=void 0,u=Gs(()=>{var v=n??t.appendChild(xt());Ps(v,{pending:()=>{}},p=>{st({});var g=fe;o&&(g.c=o),i&&(r.$$events=i),s=e(p,r)||{},lt()},c);var m=new Set,h=p=>{for(var g=0;g<p.length;g++){var y=p[g];if(!m.has(y)){m.add(y);var d=rl(y);for(const B of[t,document]){var _=yr.get(B);_===void 0&&(_=new Map,yr.set(B,_));var D=_.get(y);D===void 0?(B.addEventListener(y,ei,{passive:d}),_.set(y,1)):_.set(y,D+1)}}}};return h(ur(zo)),$r.add(h),()=>{var d;for(var p of m)for(const _ of[t,document]){var g=yr.get(_),y=g.get(p);--y==0?(_.removeEventListener(p,ei),g.delete(p),g.size===0&&yr.delete(_)):g.set(p,y)}$r.delete(h),v!==n&&((d=v.parentNode)==null||d.removeChild(v))}});return al.set(s,u),s}let al=new WeakMap;class qo{constructor(t,n=!0){Ke(this,"anchor");j(this,rt,new Map);j(this,gt,new Map);j(this,Le,new Map);j(this,dn,new Set);j(this,rr,!0);j(this,ir,()=>{var t=q;if(f(this,rt).has(t)){var n=f(this,rt).get(t),r=f(this,gt).get(n);if(r)Jr(r),f(this,dn).delete(n);else{var i=f(this,Le).get(n);i&&(f(this,gt).set(n,i.effect),f(this,Le).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,l]of f(this,rt)){if(f(this,rt).delete(o),o===t)break;const c=f(this,Le).get(l);c&&(Se(c.effect),f(this,Le).delete(l))}for(const[o,l]of f(this,gt)){if(o===n||f(this,dn).has(o))continue;const c=()=>{if(Array.from(f(this,rt).values()).includes(o)){var u=document.createDocumentFragment();Po(l,u),u.append(xt()),f(this,Le).set(o,{effect:l,fragment:u})}else Se(l);f(this,dn).delete(o),f(this,gt).delete(o)};f(this,rr)||!r?(f(this,dn).add(o),tn(l,c,!1)):c()}}});j(this,Er,t=>{f(this,rt).delete(t);const n=Array.from(f(this,rt).values());for(const[r,i]of f(this,Le))n.includes(r)||(Se(i.effect),f(this,Le).delete(r))});this.anchor=t,z(this,rr,n)}ensure(t,n){var r=q,i=_o();if(n&&!f(this,gt).has(t)&&!f(this,Le).has(t))if(i){var o=document.createDocumentFragment(),l=xt();o.append(l),f(this,Le).set(t,{effect:Fe(()=>n(l)),fragment:o})}else f(this,gt).set(t,Fe(()=>n(this.anchor)));if(f(this,rt).set(r,t),i){for(const[c,s]of f(this,gt))c===t?r.unskip_effect(s):r.skip_effect(s);for(const[c,s]of f(this,Le))c===t?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(f(this,ir)),r.ondiscard(f(this,Er))}else f(this,ir).call(this)}}rt=new WeakMap,gt=new WeakMap,Le=new WeakMap,dn=new WeakMap,rr=new WeakMap,ir=new WeakMap,Er=new WeakMap;function ni(e){fe===null&&os(),wn&&fe.l!==null?sl(fe).m.push(e):bn(()=>{const t=Qn(e);if(typeof t=="function")return t})}function sl(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function X(e,t,n=!1){var r=new qo(e),i=n?Qt:0;function o(l,c){r.ensure(l,c)}gr(()=>{var l=!1;t((c,s=0)=>{l=!0,o(s,c)}),l||o(!1,null)},i)}function Sn(e,t){return t}function ll(e,t,n){for(var r=[],i=t.length,o,l=t.length,c=0;c<i;c++){let m=t[c];tn(m,()=>{if(o){if(o.pending.delete(m),o.done.add(m),o.pending.size===0){var h=e.outrogroups;ri(ur(o.done)),h.delete(o),h.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var s=r.length===0&&n!==null;if(s){var u=n,v=u.parentNode;qs(v),v.append(u),e.items.clear()}ri(t,!s)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function ri(e,t=!0){for(var n=0;n<e.length;n++)Se(e[n],t)}var Fo;function Lt(e,t,n,r,i,o=null){var l=e,c=new Map,s=(t&qn)!==0;if(s){var u=e;l=u.appendChild(xt())}var v=null,m=Vr(()=>{var _=n();return Lr(_)?_:_==null?[]:ur(_)}),h,p=!0;function g(){d.fallback=v,cl(d,h,l,t,r),v!==null&&(h.length===0?v.f&yt?(v.f^=yt,Xn(v,null,l)):Jr(v):tn(v,()=>{v=null}))}var y=gr(()=>{h=a(m);for(var _=h.length,D=new Set,B=q,S=_o(),A=0;A<_;A+=1){var E=h[A],k=r(E,A),C=p?null:c.get(k);C?(C.v&&yn(C.v,E),C.i&&yn(C.i,A),S&&B.unskip_effect(C.e)):(C=ul(c,p?l:Fo??(Fo=xt()),E,k,A,i,t,n),p||(C.e.f|=yt),c.set(k,C)),D.add(k)}if(_===0&&o&&!v&&(p?v=Fe(()=>o(l)):(v=Fe(()=>o(Fo??(Fo=xt()))),v.f|=yt)),_>D.size&&ss(),!p)if(S){for(const[Y,V]of c)D.has(Y)||B.skip_effect(V.e);B.oncommit(g),B.ondiscard(()=>{})}else g();a(m)}),d={effect:y,items:c,outrogroups:null,fallback:v};p=!1}function Zn(e){for(;e!==null&&!(e.f&Ye);)e=e.next;return e}function cl(e,t,n,r,i){var V,ue,de,Ie,me,it,ie,Ut,ze;var o=(r&ja)!==0,l=t.length,c=e.items,s=Zn(e.effect.first),u,v=null,m,h=[],p=[],g,y,d,_;if(o)for(_=0;_<l;_+=1)g=t[_],y=i(g,_),d=c.get(y).e,d.f&yt||((ue=(V=d.nodes)==null?void 0:V.a)==null||ue.measure(),(m??(m=new Set)).add(d));for(_=0;_<l;_+=1){if(g=t[_],y=i(g,_),d=c.get(y).e,e.outrogroups!==null)for(const De of e.outrogroups)De.pending.delete(d),De.done.delete(d);if(d.f&yt)if(d.f^=yt,d===s)Xn(d,null,n);else{var D=v?v.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),zt(e,v,d),zt(e,d,D),Xn(d,D,n),v=d,h=[],p=[],s=Zn(v.next);continue}if(d.f&Re&&(Jr(d),o&&((Ie=(de=d.nodes)==null?void 0:de.a)==null||Ie.unfix(),(m??(m=new Set)).delete(d))),d!==s){if(u!==void 0&&u.has(d)){if(h.length<p.length){var B=p[0],S;v=B.prev;var A=h[0],E=h[h.length-1];for(S=0;S<h.length;S+=1)Xn(h[S],B,n);for(S=0;S<p.length;S+=1)u.delete(p[S]);zt(e,A.prev,E.next),zt(e,v,A),zt(e,E,B),s=B,v=E,_-=1,h=[],p=[]}else u.delete(d),Xn(d,s,n),zt(e,d.prev,d.next),zt(e,d,v===null?e.effect.first:v.next),zt(e,v,d),v=d;continue}for(h=[],p=[];s!==null&&s!==d;)(u??(u=new Set)).add(s),p.push(s),s=Zn(s.next);if(s===null)continue}d.f&yt||h.push(d),v=d,s=Zn(d.next)}if(e.outrogroups!==null){for(const De of e.outrogroups)De.pending.size===0&&(ri(ur(De.done)),(me=e.outrogroups)==null||me.delete(De));e.outrogroups.size===0&&(e.outrogroups=null)}if(s!==null||u!==void 0){var k=[];if(u!==void 0)for(d of u)d.f&Re||k.push(d);for(;s!==null;)!(s.f&Re)&&s!==e.fallback&&k.push(s),s=Zn(s.next);var C=k.length;if(C>0){var Y=r&qn&&l===0?n:null;if(o){for(_=0;_<C;_+=1)(ie=(it=k[_].nodes)==null?void 0:it.a)==null||ie.measure();for(_=0;_<C;_+=1)(ze=(Ut=k[_].nodes)==null?void 0:Ut.a)==null||ze.fix()}ll(e,k,Y)}}o&&bt(()=>{var De,Ht;if(m!==void 0)for(d of m)(Ht=(De=d.nodes)==null?void 0:De.a)==null||Ht.apply()})}function ul(e,t,n,r,i,o,l,c){var s=l&$?l&qa?en(n):Ls(n,!1,!1):null,u=l&he?en(i):null;return{v:s,i:u,e:Fe(()=>(o(t,s??n,u??i,c),()=>{e.delete(r)}))}}function Xn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&!(t.f&yt)?t.nodes.start:n;r!==null;){var l=Gn(r);if(o.before(r),r===i)return;r=l}}function zt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Uo(e,t,n,r,i){var c;var o=(c=t.$$slots)==null?void 0:c[n],l=!1;o===!0&&(o=t.children,l=!0),o===void 0||o(e,l?()=>r:r)}function Ho(e,t,n){var r=new qo(e);gr(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Qt)}function dt(e,t){ko(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=yo("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Vo(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=Vo(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Vo(e))&&(r&&(r+=" "),r+=t);return r}function Cn(e){return typeof e=="object"?dl(e):e??""}const Go=[...`
2
- \r\f \v\uFEFF`];function fl(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 o=i.length,l=0;(l=r.indexOf(i,l))>=0;){var c=l+o;(l===0||Go.includes(r[l-1]))&&(c===r.length||Go.includes(r[c]))?r=(l===0?"":r.substring(0,l))+r.substring(c+1):l=c}}return r===""?null:r}function ft(e,t,n,r,i,o){var l=e.__className;if(l!==n||l===void 0){var c=fl(n,r,o);c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c),e.__className=n}else if(o&&i!==o)for(var s in o){var u=!!o[s];(i==null||u!==!!i[s])&&e.classList.toggle(s,u)}return o}function Ko(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Lr(t))return ms();for(var r of e.options)r.selected=t.includes(Yo(r));return}for(r of e.options){var i=Yo(r);if(Os(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function hl(e){var t=new MutationObserver(()=>{Ko(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Qr(()=>{t.disconnect()})}function Yo(e){return"__value"in e?e.__value:e.value}const vl=Symbol("is custom element"),pl=Symbol("is html");function gl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function W(e,t,n,r){var i=ml(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[is]=n),n==null?e.removeAttribute(t):typeof n!="string"&&wl(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ml(e){return e.__attributes??(e.__attributes={[vl]:e.nodeName.includes("-"),[pl]:e.namespaceURI===Hi})}var Qo=new Map;function wl(e){var t=e.getAttribute("is")||e.nodeName,n=Qo.get(t);if(n)return n;Qo.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=Za(i);for(var l in r)r[l].set&&n.push(l);i=Vi(i)}return n}function _l(e,t,n=t){var r=new WeakSet;Us(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=ii(e)?oi(o):o,n(o),q!==null&&r.add(q),await Js(),o!==(o=t())){var l=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=o??"",c!==null){var u=e.value.length;l===c&&c===s&&u>s?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=l,e.selectionEnd=Math.min(c,u))}}}),Qn(t)==null&&e.value&&(n(ii(e)?oi(e.value):e.value),q!==null&&r.add(q)),Zr(()=>{var i=t();if(e===document.activeElement){var o=Fr??q;if(r.has(o))return}ii(e)&&i===oi(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function ii(e){var t=e.type;return t==="number"||t==="range"}function oi(e){return e===""?null:+e}function Zo(e,t){return e===t||(e==null?void 0:e[Xt])===t}function yl(e={},t,n,r){return ko(()=>{var i,o;return Zr(()=>{i=o,o=[],Qn(()=>{e!==n(...o)&&(t(e,...o),i&&Zo(n(...i),e)&&t(null,...i))})}),()=>{bt(()=>{o&&Zo(n(...o),e)&&t(null,...o)})}}),e}let br=!1;function bl(e){var t=br;try{return br=!1,[e(),br]}finally{br=t}}function Te(e,t,n,r){var B;var i=!wn||(n&Ua)!==0,o=(n&Va)!==0,l=(n&Ga)!==0,c=r,s=!0,u=()=>(s&&(s=!1,c=l?Qn(r):r),c),v;if(o){var m=Xt in e||rs in e;v=((B=gn(e,t))==null?void 0:B.set)??(m&&t in e?S=>e[t]=S:void 0)}var h,p=!1;o?[h,p]=bl(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=u(),v&&(i&&fs(),v(h)));var g;if(i?g=()=>{var S=e[t];return S===void 0?u():(s=!0,S)}:g=()=>{var S=e[t];return S!==void 0&&(c=void 0),S===void 0?c:S},i&&!(n&Ha))return g;if(v){var y=e.$$legacy;return function(S,A){return arguments.length>0?((!i||!A||y||p)&&v(A?g():S),S):g()}}var d=!1,_=(n&Fa?vr:Vr)(()=>(d=!1,g()));o&&a(_);var D=Z;return function(S,A){if(arguments.length>0){const E=A?a(_):i&&o?We(S):S;return w(_,E),d=!0,c!==void 0&&(c=E),S}return Bt&&d||D.f&_t?_.v:a(_)}}const Xo="wineater_consent",xl=["wineater_uid","uniqueUserID","sessionID"];function kl(){try{const e=window.localStorage.getItem(Xo);return e==="granted"||e==="denied"?e:null}catch{return null}}let ai=G(We(kl())),xr=G(null),kr=null;function Sl(e){kr=e}function Cl(e){w(xr,e,!0)}function Jo(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:a(xr)===!0}function Tl(){return kr?!1:a(xr)!==null&&Jo()&&a(ai)===null}function $o(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1?!1:kr?kr():a(xr)===null?!1:Jo()?a(ai)==="granted":!0}function El(){for(const e of xl){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const si=new Set;function Pl(e){return si.add(e),()=>si.delete(e)}function ea(e){w(ai,e,!0);try{window.localStorage.setItem(Xo,e)}catch{}e==="denied"&&El();for(const t of si)t(e)}const Al=/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/;function Il(e){if(!e||typeof e!="object")return null;const t=e,n=String(t.shop??"").trim().toLowerCase();if(!Al.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 li;function et(){var e;return li===void 0&&(li=typeof window>"u"?null:Il((e=window.wineaterData)==null?void 0:e.shopify)),li}function ta(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 Dl(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 Rl(e,t){return e===429&&(t==null?void 0:t.code)==="quota_exceeded"}class na extends Error{constructor(){super("quota_exceeded"),this.name="QuotaExceededError"}}let ci=null;function ra(){var t,n;if(ci)return ci;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 ci=e,e}function Wl(){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 Ml(){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 ia="4.25.0";function oa(){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 ui(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 di(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 Bl(){const e="uniqueUserID";let t=di(e);return t||(t=oa(),ui(e,t,365)),t}function Ee(e,t,n={},r={}){var g;const i=(g=et())==null?void 0:g.shop,o=i?"https://api.wineater.com/shopify/storefront/events":"https://api.wineater.com/api/widget-events",l=i?{shop:i}:{},c=new Date().toISOString(),s=navigator.language.split("-")[1]||null,u=navigator.language.split("-")[0]||"en";if(!$o()){const y={...l,event_type:e,store_id:t,event_time:c,data:n,meta:{...r,anonymous:!0,widget_version:ia},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:u};return fetch(o,{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 v=di("uniqueUserID");v||(v=Bl());const m={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let h=di("sessionID");h||(h=oa(),ui("sessionID",h,1));const p={...l,event_type:e,store_id:t,session_id:h,event_time:c,data:n,meta:{...r,user_id:v,widget_version:ia},device_info:m,region:s,language:u};return fetch(o,{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 Nl(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 Jn(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 Ll(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map(Jn),hasMore:!!e.has_more}}const $n="wineater_uid",zl=365;let Sr=null;function aa(){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 sa=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function la(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 Ol(e,t){try{const n=new Date(Date.now()+zl*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function ca(){return $o()}Pl(e=>{e==="denied"&&(Sr=null)});function fi(){if(!ca())return null;if(Sr)return Sr;let e=null;try{e=window.localStorage.getItem($n)}catch{}(!e||!sa.test(e))&&(e=la($n)),(!e||!sa.test(e))&&(e=aa());try{window.localStorage.setItem($n,e)}catch{}return la($n)!==e&&Ol($n,e),Sr=e,e}function ua(){return aa()}const jl=2e3,da=100;let Cr=null,Tn=[],er=null,fa=!1;function ql(e){Cr=e,!(fa||typeof document>"u")&&(fa=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&tr()}),window.addEventListener("pagehide",()=>void tr()))}function sn(e){var t;if(!(!ca()||!Cr)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(Tn.push(e),Tn.length>=da){tr();return}er||(er=setTimeout(()=>void tr(),jl))}}async function tr(){if(er&&(clearTimeout(er),er=null),!Cr||Tn.length===0)return;const e=fi();if(!e){Tn=[];return}const t=Tn.splice(0,da);try{await Cr({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}Tn.length>0&&tr()}const ha=24;function va(e,t,n){return e!=="bar"||!t||!n||t===n?null:t}function hi(e,t){return t?{...e,language:t}:e}function Fl(e,t){const n=t==null?void 0:t.translations;return e.map(r=>{const i=n&&typeof n=="object"?n[r.id]:null,o={};if(i&&typeof i.shortDescription=="string"&&i.shortDescription.trim()&&(o.shortDescription=i.shortDescription),i&&Array.isArray(i.tags)){const l=i.tags.filter(c=>typeof c=="string"&&c.trim());l.length&&(o.tags=l)}return o})}async function Ul(e,t,n){const r=[...new Set(t.filter(Boolean))];if(!r.length||!n)return null;const i={};let o=!1;for(let l=0;l<r.length;l+=ha)try{const c=await e({ids:r.slice(l,l+ha),language:n});c&&typeof c.translations=="object"&&c.translations&&(Object.assign(i,c.translations),o=!0)}catch{}return o?{language:n,translations:i}:null}const Hl="X-Wineater-Uid";class pa extends Error{constructor(n,r){super(`API call failed with status ${n}: ${(r==null?void 0:r.message)||"No additional error information"}`);Ke(this,"status");Ke(this,"data");this.status=n,this.data=r}}class Vl{constructor(t,n="1"){j(this,se);j(this,Bn,"https://api.wineater.com/");j(this,or);j(this,Ft);j(this,Nn,!1);j(this,Ln,null);j(this,fn,null);z(this,or,t),z(this,Ft,n)}async getInstantRecommendations(){var t;try{const n=(t=et())==null?void 0:t.shop,r=n?"shopify/storefront/instant":f(this,Ft)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant",{data:i,headers:o}=await Q(this,se,qi).call(this,r,n?Q(this,se,Fi).call(this,{}):{});return{wines:i.filter(Boolean).map(Nl),profileHash:o.get("X-Wineater-Profile")||null}}catch(n){throw new Error(`Error in getInstantRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(t,n){if(et())return Q(this,se,Oa).call(this,t,n);try{const r=f(this,Ft)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search",i=n?{text:t,query_id:n}:{text:t};return(await Q(this,se,It).call(this,r,f(this,Ft)==="2"?hi(i,f(this,fn)):i)).filter(Boolean).map(Jn)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async searchStream(t,n,r){const i=()=>this.getWineRecommendationsSearch(t,n);if(f(this,Ft)!=="2"||et())return i();let o;try{o=await fetch(`${f(this,Bn)}dish/recommendations/search/v2/stream`,{method:"POST",headers:Q(this,se,ji).call(this),body:JSON.stringify(hi(n?{text:t,query_id:n}:{text:t},f(this,fn)))})}catch{return i()}if(!o.ok||!o.body)return i();const l=o.body.getReader(),c=new TextDecoder;let s="",u=null;const v=m=>(m??[]).filter(Boolean).map(Jn);try{for(;;){const{done:m,value:h}=await l.read();h&&(s+=c.decode(h,{stream:!0}));const p=s.split(`
3
- `);s=m?"":p.pop()??"";for(const g of m?p.filter(Boolean):p){if(!g.trim())continue;const y=JSON.parse(g);if(y.type==="wines")u=v(y.recommendations).map(d=>({...d,reason:""})),r(u);else{if(y.type==="final")return v(y.recommendations);if(y.type==="error")return u||i()}}if(m)break}}catch{return u||i()}return u??i()}async getMoreWineRecommendations(t,n){try{const r=await Q(this,se,It).call(this,"dish/recommendations/search/v2/more",hi({text:t,exclude_ids:n},f(this,fn)));return Ll(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getSimilarWines(t){try{return(await Q(this,se,It).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map(Jn)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await Q(this,se,It).call(this,"events",t,{keepalive:!0})}setVisitorLanguage(t){z(this,fn,t)}async getWineTranslations(t,n){return Ul(r=>Q(this,se,It).call(this,"wines/translations",r).catch(()=>null),t,n)}setLanguage(t){z(this,Ln,t)}async getShopifyConfig(){const t=et().shop;return Q(this,se,It).call(this,`shopify/storefront/config?shop=${encodeURIComponent(t)}`,void 0,{method:"GET"})}async getStoreConfig(){try{return await Q(this,se,It).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}Bn=new WeakMap,or=new WeakMap,Ft=new WeakMap,Nn=new WeakMap,Ln=new WeakMap,fn=new WeakMap,se=new WeakSet,ji=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${f(this,or)}`};if(!f(this,Nn)){const n=fi();n&&(t[Hl]=n)}return t},It=async function(t,n,r={}){return(await Q(this,se,qi).call(this,t,n,r)).data},qi=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:Q(this,se,ji).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let o;try{o=await fetch(`${f(this,Bn)}${t}`,i())}catch(s){if(f(this,Nn)||!fi())throw s;z(this,Nn,!0),o=await fetch(`${f(this,Bn)}${t}`,i())}const l=await o.text();let c=null;try{c=l?JSON.parse(l):null}catch{if(o.ok)throw new Error("API returned invalid JSON")}if(!o.ok)throw new pa(o.status,c);return{data:c,headers:o.headers}},Fi=function(t){const n=et().shop;return f(this,Ln)?{...t,shop:n,language:f(this,Ln)}:{...t,shop:n}},Oa=async function(t,n){try{const r=Q(this,se,Fi).call(this,{text:t,session_id:ra(),...n?{query_id:n}:{}});return(await Q(this,se,It).call(this,"shopify/storefront/search",r)??[]).filter(Boolean).map(Jn)}catch(r){throw r instanceof pa&&Rl(r.status,r.data)?new na:new Error(`Error in getWineRecommendations: ${r.message}`)}};const ga=((Pa=window==null?void 0:window.wineaterData)==null?void 0:Pa.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",vi=String(((Aa=window==null?void 0:window.wineaterData)==null?void 0:Aa.apiVersion)||"1"),tt=new Vl(ga,vi);ql(e=>tt.postEvents(e));function Gl(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 pi=`${Gl(ga)}:${vi}`,ma="wineater:v1:";function gi(e,t){try{const n=window.localStorage.getItem(ma+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function mi(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(ma+e,JSON.stringify(n))}catch{}}const Pe={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"},wa={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."},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."},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."},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."},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."},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:"Наш сомельє відпочиває. Перегляньте нашу добірку нижче."},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:"Наш сомелье отдыхает. Посмотрите нашу подборку ниже."},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:"Біздің сомелье демалып жатыр. Төмендегі таңдауымызды қараңыз."},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."}};function Kl(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}}const Yl={0:{logoUrl:null,brandColor:"#7B2BEB"},29:{logoUrl:"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/plou_logo.jpg",brandColor:"#e6c6bb"},25:{logoUrl:null,brandColor:"#000000",wineaterColor:"#000000",buttonUppercase:!0,customCss:`
1
+ (function(J,$){typeof exports=="object"&&typeof module<"u"?module.exports=$():typeof define=="function"&&define.amd?define($):(J=typeof globalThis<"u"?globalThis:J||self,J.WineaterChatbot=$())})(this,function(){"use strict";var ju=Object.defineProperty;var za=J=>{throw TypeError(J)};var qu=(J,$,he)=>$ in J?ju(J,$,{enumerable:!0,configurable:!0,writable:!0,value:he}):J[$]=he;var Ke=(J,$,he)=>qu(J,typeof $!="symbol"?$+"":$,he),Bi=(J,$,he)=>$.has(J)||za("Cannot "+he);var f=(J,$,he)=>(Bi(J,$,"read from private field"),he?he.call(J):$.get(J)),j=(J,$,he)=>$.has(J)?za("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(J):$.set(J,he),z=(J,$,he,Un)=>(Bi(J,$,"write to private field"),Un?Un.call(J,he):$.set(J,he),he),Q=(J,$,he)=>(Bi(J,$,"access private method"),he);var Ea,Pn,An,cn,In,rr,Dn,qt,vt,Rn,Be,Ni,Li,zi,Oa,Ge,xi,pt,un,Ae,gt,Ne,nt,Et,dn,Ut,Wn,Mn,Bn,Pt,Er,ve,Uu,Fu,Hu,Oi,Br,Nr,ji,Pa,rt,mt,Le,fn,ir,or,Pr,Nn,ar,Ft,Ln,zn,hn,se,qi,Dt,Ui,Fi,ja,Aa,Ia,Da;const J="5";typeof window<"u"&&((Ea=window.__svelte??(window.__svelte={})).v??(Ea.v=new Set)).add(J);const $=1,he=2,Un=4,qa=8,Ua=16,Fa=1,Ha=2,Va=4,Ga=8,Ka=16,Hi=1,Ya=2,_e=Symbol(),Vi="http://www.w3.org/1999/xhtml",Lr=!1;var zr=Array.isArray,Qa=Array.prototype.indexOf,gn=Array.prototype.includes,dr=Array.from,Za=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,Xa=Object.getOwnPropertyDescriptors,Ja=Object.prototype,$a=Array.prototype,Gi=Object.getPrototypeOf,Ki=Object.isExtensible;const es=()=>{};function ts(e){for(var t=0;t<e.length;t++)e[t]()}function Yi(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function ns(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const ye=2,Fn=4,fr=8,Qi=1<<24,_t=16,Ye=32,Yt=64,Or=128,qe=512,ge=1024,be=2048,Qe=4096,Re=8192,yt=16384,Qt=32768,Zt=65536,Zi=1<<17,Xi=1<<18,wn=1<<19,rs=1<<20,bt=1<<25,Xt=65536,jr=1<<21,qr=1<<22,Rt=1<<23,Jt=Symbol("$state"),is=Symbol("legacy props"),os=Symbol(""),$t=new class extends Error{constructor(){super(...arguments);Ke(this,"name","StaleReactionError");Ke(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function as(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ss(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ls(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function cs(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function us(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ds(e){throw new Error("https://svelte.dev/e/effect_orphan")}function fs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function hs(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function vs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ps(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function gs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ms(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ws(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function _s(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Ji(e){return e===this.v}function ys(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function $i(e){return!ys(e,this.v)}let _n=!1,bs=!1;function xs(){_n=!0}let fe=null;function yn(e){fe=e}function st(e,t=!1,n){fe={p:fe,i:!1,c:null,e:null,s:e,x:null,l:_n&&!t?{s:null,u:null,$:[]}:null}}function lt(e){var t=fe,n=t.e;if(n!==null){t.e=null;for(var r of n)ko(r)}return e!==void 0&&(t.x=e),t.i=!0,fe=t.p,e??{}}function Hn(){return!_n||fe!==null&&fe.l===null}let en=[];function eo(){var e=en;en=[],ts(e)}function xt(e){if(en.length===0&&!Vn){var t=en;queueMicrotask(()=>{t===en&&eo()})}en.push(e)}function ks(){for(;en.length>0;)eo()}function to(e){var t=Z;if(t===null)return H.f|=Rt,e;if(!(t.f&Qt)&&!(t.f&Fn))throw e;Wt(e,t)}function Wt(e,t){for(;t!==null;){if(t.f&Or){if(!(t.f&Qt))throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Ss=-7169;function le(e,t){e.f=e.f&Ss|t}function Ur(e){e.f&qe||e.deps===null?le(e,ge):le(e,Qe)}function no(e){if(e!==null)for(const t of e)!(t.f&ye)||!(t.f&Xt)||(t.f^=Xt,no(t.deps))}function ro(e,t,n){e.f&be?t.add(e):e.f&Qe&&n.add(e),no(e.deps),le(e,ge)}const hr=new Set;let q=null,Fr=null,xe=null,ke=[],vr=null,Hr=!1,Vn=!1;const bi=class bi{constructor(){j(this,Be);Ke(this,"current",new Map);Ke(this,"previous",new Map);j(this,Pn,new Set);j(this,An,new Set);j(this,cn,0);j(this,In,0);j(this,rr,null);j(this,Dn,new Set);j(this,qt,new Set);j(this,vt,new Map);Ke(this,"is_fork",!1);j(this,Rn,!1)}skip_effect(t){f(this,vt).has(t)||f(this,vt).set(t,{d:[],m:[]})}unskip_effect(t){var n=f(this,vt).get(t);if(n){f(this,vt).delete(t);for(var r of n.d)le(r,be),Xe(r);for(r of n.m)le(r,Qe),Xe(r)}}process(t){var i;ke=[],this.apply();var n=[],r=[];for(const o of t)Q(this,Be,Li).call(this,o,n,r);if(Q(this,Be,Ni).call(this)){Q(this,Be,zi).call(this,r),Q(this,Be,zi).call(this,n);for(const[o,l]of f(this,vt))lo(o,l)}else{for(const o of f(this,Pn))o();f(this,Pn).clear(),f(this,cn)===0&&Q(this,Be,Oa).call(this),Fr=this,q=null,oo(r),oo(n),f(this,Dn).clear(),f(this,qt).clear(),Fr=null,(i=f(this,rr))==null||i.resolve()}xe=null}capture(t,n){n!==_e&&!this.previous.has(t)&&this.previous.set(t,n),t.f&Rt||(this.current.set(t,t.v),xe==null||xe.set(t,t.v))}activate(){q=this,this.apply()}deactivate(){q===this&&(q=null,xe=null)}flush(){if(this.activate(),ke.length>0){if(io(),q!==null&&q!==this)return}else f(this,cn)===0&&this.process([]);this.deactivate()}discard(){for(const t of f(this,An))t(this);f(this,An).clear()}increment(t){z(this,cn,f(this,cn)+1),t&&z(this,In,f(this,In)+1)}decrement(t){z(this,cn,f(this,cn)-1),t&&z(this,In,f(this,In)-1),!f(this,Rn)&&(z(this,Rn,!0),xt(()=>{z(this,Rn,!1),Q(this,Be,Ni).call(this)?ke.length>0&&this.flush():this.revive()}))}revive(){for(const t of f(this,Dn))f(this,qt).delete(t),le(t,be),Xe(t);for(const t of f(this,qt))le(t,Qe),Xe(t);this.flush()}oncommit(t){f(this,Pn).add(t)}ondiscard(t){f(this,An).add(t)}settled(){return(f(this,rr)??z(this,rr,Yi())).promise}static ensure(){if(q===null){const t=q=new bi;hr.add(q),Vn||xt(()=>{q===t&&t.flush()})}return q}apply(){}};Pn=new WeakMap,An=new WeakMap,cn=new WeakMap,In=new WeakMap,rr=new WeakMap,Dn=new WeakMap,qt=new WeakMap,vt=new WeakMap,Rn=new WeakMap,Be=new WeakSet,Ni=function(){return this.is_fork||f(this,In)>0},Li=function(t,n,r){t.f^=ge;for(var i=t.first;i!==null;){var o=i.f,l=(o&(Ye|Yt))!==0,c=l&&(o&ge)!==0,s=c||(o&Re)!==0||f(this,vt).has(i);if(!s&&i.fn!==null){l?i.f^=ge:o&Fn?n.push(i):Yn(i)&&(o&_t&&f(this,qt).add(i),kn(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var v=i.next;if(v!==null){i=v;break}i=i.parent}}},zi=function(t){for(var n=0;n<t.length;n+=1)ro(t[n],f(this,Dn),f(this,qt))},Oa=function(){var i;if(hr.size>1){this.previous.clear();var t=xe,n=!0;for(const o of hr){if(o===this){n=!1;continue}const l=[];for(const[s,u]of this.current){if(o.current.has(s))if(n&&u!==o.current.get(s))o.current.set(s,u);else continue;l.push(s)}if(l.length===0)continue;const c=[...o.current.keys()].filter(s=>!this.current.has(s));if(c.length>0){var r=ke;ke=[];const s=new Set,u=new Map;for(const v of l)ao(v,c,s,u);if(ke.length>0){q=o,o.apply();for(const v of ke)Q(i=o,Be,Li).call(i,v,[],[]);o.deactivate()}ke=r}}q=null,xe=t}f(this,vt).clear(),hr.delete(this)};let Mt=bi;function Cs(e){var t=Vn;Vn=!0;try{for(var n;;){if(ks(),ke.length===0&&(q==null||q.flush(),ke.length===0))return vr=null,n;io()}}finally{Vn=t}}function io(){Hr=!0;var e=null;try{for(var t=0;ke.length>0;){var n=Mt.ensure();if(t++>1e3){var r,i;Ts()}n.process(ke),Bt.clear()}}finally{ke=[],Hr=!1,vr=null}}function Ts(){try{fs()}catch(e){Wt(e,vr)}}let Ze=null;function oo(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(yt|Re))&&Yn(r)&&(Ze=new Set,kn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&To(r),(Ze==null?void 0:Ze.size)>0)){Bt.clear();for(const i of Ze){if(i.f&(yt|Re))continue;const o=[i];let l=i.parent;for(;l!==null;)Ze.has(l)&&(Ze.delete(l),o.push(l)),l=l.parent;for(let c=o.length-1;c>=0;c--){const s=o[c];s.f&(yt|Re)||kn(s)}}Ze.clear()}}Ze=null}}function ao(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const o=i.f;o&ye?ao(i,t,n,r):o&(qr|_t)&&!(o&be)&&so(i,t,r)&&(le(i,be),Xe(i))}}function so(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(gn.call(t,i))return!0;if(i.f&ye&&so(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Xe(e){var t=vr=e,n=t.b;if(n!=null&&n.is_pending&&e.f&(Fn|fr|Qi)&&!(e.f&Qt)){n.defer_effect(e);return}for(;t.parent!==null;){t=t.parent;var r=t.f;if(Hr&&t===Z&&r&_t&&!(r&Xi)&&r&Qt)return;if(r&(Yt|Ye)){if(!(r&ge))return;t.f^=ge}}ke.push(t)}function lo(e,t){if(!(e.f&Ye&&e.f&ge)){e.f&be?t.d.push(e):e.f&Qe&&t.m.push(e),le(e,ge);for(var n=e.first;n!==null;)lo(n,t),n=n.next}}function Es(e){let t=0,n=tn(0),r;return()=>{Qr()&&(a(n),Xr(()=>(t===0&&(r=Zn(()=>e(()=>Gn(n)))),t+=1,()=>{xt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,Gn(n))})})))}}var Ps=Zt|wn;function As(e,t,n,r){new Is(e,t,n,r)}class Is{constructor(t,n,r,i){j(this,ve);Ke(this,"parent");Ke(this,"is_pending",!1);Ke(this,"transform_error");j(this,Ge);j(this,xi,null);j(this,pt);j(this,un);j(this,Ae);j(this,gt,null);j(this,Ne,null);j(this,nt,null);j(this,Et,null);j(this,dn,0);j(this,Ut,0);j(this,Wn,!1);j(this,Mn,new Set);j(this,Bn,new Set);j(this,Pt,null);j(this,Er,Es(()=>(z(this,Pt,tn(f(this,dn))),()=>{z(this,Pt,null)})));var o;z(this,Ge,t),z(this,pt,n),z(this,un,l=>{var c=Z;c.b=this,c.f|=Or,r(l)}),this.parent=Z.b,this.transform_error=i??((o=this.parent)==null?void 0:o.transform_error)??(l=>l),z(this,Ae,mr(()=>{Q(this,ve,Oi).call(this)},Ps))}defer_effect(t){ro(t,f(this,Mn),f(this,Bn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!f(this,pt).pending}update_pending_count(t){Q(this,ve,ji).call(this,t),z(this,dn,f(this,dn)+t),!(!f(this,Pt)||f(this,Wn))&&(z(this,Wn,!0),xt(()=>{z(this,Wn,!1),f(this,Pt)&&bn(f(this,Pt),f(this,dn))}))}get_effect_pending(){return f(this,Er).call(this),a(f(this,Pt))}error(t){var n=f(this,pt).onerror;let r=f(this,pt).failed;if(!n&&!r)throw t;f(this,gt)&&(Se(f(this,gt)),z(this,gt,null)),f(this,Ne)&&(Se(f(this,Ne)),z(this,Ne,null)),f(this,nt)&&(Se(f(this,nt)),z(this,nt,null));var i=!1,o=!1;const l=()=>{if(i){_s();return}i=!0,o&&ms(),f(this,nt)!==null&&nn(f(this,nt),()=>{z(this,nt,null)}),Q(this,ve,Nr).call(this,()=>{Mt.ensure(),Q(this,ve,Oi).call(this)})},c=s=>{try{o=!0,n==null||n(s,l),o=!1}catch(u){Wt(u,f(this,Ae)&&f(this,Ae).parent)}r&&z(this,nt,Q(this,ve,Nr).call(this,()=>{Mt.ensure();try{return Ue(()=>{var u=Z;u.b=this,u.f|=Or,r(f(this,Ge),()=>s,()=>l)})}catch(u){return Wt(u,f(this,Ae).parent),null}}))};xt(()=>{var s;try{s=this.transform_error(t)}catch(u){Wt(u,f(this,Ae)&&f(this,Ae).parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(c,u=>Wt(u,f(this,Ae)&&f(this,Ae).parent)):c(s)})}}Ge=new WeakMap,xi=new WeakMap,pt=new WeakMap,un=new WeakMap,Ae=new WeakMap,gt=new WeakMap,Ne=new WeakMap,nt=new WeakMap,Et=new WeakMap,dn=new WeakMap,Ut=new WeakMap,Wn=new WeakMap,Mn=new WeakMap,Bn=new WeakMap,Pt=new WeakMap,Er=new WeakMap,ve=new WeakSet,Uu=function(){try{z(this,gt,Ue(()=>f(this,un).call(this,f(this,Ge))))}catch(t){this.error(t)}},Fu=function(t){const n=f(this,pt).failed;n&&z(this,nt,Ue(()=>{n(f(this,Ge),()=>t,()=>()=>{})}))},Hu=function(){const t=f(this,pt).pending;t&&(this.is_pending=!0,z(this,Ne,Ue(()=>t(f(this,Ge)))),xt(()=>{var n=z(this,Et,document.createDocumentFragment()),r=kt();n.append(r),z(this,gt,Q(this,ve,Nr).call(this,()=>(Mt.ensure(),Ue(()=>f(this,un).call(this,r))))),f(this,Ut)===0&&(f(this,Ge).before(n),z(this,Et,null),nn(f(this,Ne),()=>{z(this,Ne,null)}),Q(this,ve,Br).call(this))}))},Oi=function(){try{if(this.is_pending=this.has_pending_snippet(),z(this,Ut,0),z(this,dn,0),z(this,gt,Ue(()=>{f(this,un).call(this,f(this,Ge))})),f(this,Ut)>0){var t=z(this,Et,document.createDocumentFragment());Ao(f(this,gt),t);const n=f(this,pt).pending;z(this,Ne,Ue(()=>n(f(this,Ge))))}else Q(this,ve,Br).call(this)}catch(n){this.error(n)}},Br=function(){this.is_pending=!1;for(const t of f(this,Mn))le(t,be),Xe(t);for(const t of f(this,Bn))le(t,Qe),Xe(t);f(this,Mn).clear(),f(this,Bn).clear()},Nr=function(t){var n=Z,r=H,i=fe;ct(f(this,Ae)),Fe(f(this,Ae)),yn(f(this,Ae).ctx);try{return t()}catch(o){return to(o),null}finally{ct(n),Fe(r),yn(i)}},ji=function(t){var n;if(!this.has_pending_snippet()){this.parent&&Q(n=this.parent,ve,ji).call(n,t);return}z(this,Ut,f(this,Ut)+t),f(this,Ut)===0&&(Q(this,ve,Br).call(this),f(this,Ne)&&nn(f(this,Ne),()=>{z(this,Ne,null)}),f(this,Et)&&(f(this,Ge).before(f(this,Et)),z(this,Et,null)))};function Ds(e,t,n,r){const i=Hn()?pr:Gr;var o=e.filter(m=>!m.settled);if(n.length===0&&o.length===0){r(t.map(i));return}var l=Z,c=Rs(),s=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(m=>m.promise)):null;function u(m){c();try{r(m)}catch(h){l.f&yt||Wt(h,l)}Vr()}if(n.length===0){s.then(()=>u(t.map(i)));return}function v(){c(),Promise.all(n.map(m=>Ms(m))).then(m=>u([...t.map(i),...m])).catch(m=>Wt(m,l))}s?s.then(v):v()}function Rs(){var e=Z,t=H,n=fe,r=q;return function(o=!0){ct(e),Fe(t),yn(n),o&&(r==null||r.activate())}}function Vr(e=!0){ct(null),Fe(null),yn(null),e&&(q==null||q.deactivate())}function Ws(){var e=Z.b,t=q,n=e.is_rendered();return e.update_pending_count(1),t.increment(n),()=>{e.update_pending_count(-1),t.decrement(n)}}function pr(e){var t=ye|be,n=H!==null&&H.f&ye?H:null;return Z!==null&&(Z.f|=wn),{ctx:fe,deps:null,effects:null,equals:Ji,f:t,fn:e,reactions:null,rv:0,v:_e,wv:0,parent:n??Z,ac:null}}function Ms(e,t,n){Z===null&&ss();var i=void 0,o=tn(_e),l=!H,c=new Map;return Ys(()=>{var h;var s=Yi();i=s.promise;try{Promise.resolve(e()).then(s.resolve,s.reject).finally(Vr)}catch(p){s.reject(p),Vr()}var u=q;if(l){var v=Ws();(h=c.get(u))==null||h.reject($t),c.delete(u),c.set(u,s)}const m=(p,g=void 0)=>{if(u.activate(),g)g!==$t&&(o.f|=Rt,bn(o,g));else{o.f&Rt&&(o.f^=Rt),bn(o,p);for(const[y,d]of c){if(c.delete(y),y===u)break;d.reject($t)}}v&&v()};s.promise.then(m,p=>m(null,p||"unknown"))}),Zr(()=>{for(const s of c.values())s.reject($t)}),new Promise(s=>{function u(v){function m(){v===i?s(o):u(i)}v.then(m,m)}u(i)})}function U(e){const t=pr(e);return Do(t),t}function Gr(e){const t=pr(e);return t.equals=$i,t}function Bs(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Se(t[n])}}function Ns(e){for(var t=e.parent;t!==null;){if(!(t.f&ye))return t.f&yt?null:t;t=t.parent}return null}function Kr(e){var t,n=Z;ct(Ns(e));try{e.f&=~Xt,Bs(e),t=No(e)}finally{ct(n)}return t}function co(e){var t=Kr(e);if(!e.equals(t)&&(e.wv=Mo(),(!(q!=null&&q.is_fork)||e.deps===null)&&(e.v=t,e.deps===null))){le(e,ge);return}Nt||(xe!==null?(Qr()||q!=null&&q.is_fork)&&xe.set(e,t):Ur(e))}function Ls(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($t),r.teardown=es,r.ac=null,Qn(r,0),Jr(r))}function uo(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&kn(t)}let Yr=new Set;const Bt=new Map;let fo=!1;function tn(e,t){var n={f:0,v:e,reactions:null,equals:Ji,rv:0,wv:0};return n}function G(e,t){const n=tn(e);return Do(n),n}function zs(e,t=!1,n=!0){var i;const r=tn(e);return t||(r.equals=$i),_n&&n&&fe!==null&&fe.l!==null&&((i=fe.l).s??(i.s=[])).push(r),r}function w(e,t,n=!1){H!==null&&(!$e||H.f&Zi)&&Hn()&&H.f&(ye|_t|qr|Zi)&&(He===null||!gn.call(He,e))&&gs();let r=n?We(t):t;return bn(e,r)}function bn(e,t){if(!e.equals(t)){var n=e.v;Nt?Bt.set(e,t):Bt.set(e,n),e.v=t;var r=Mt.ensure();if(r.capture(e,n),e.f&ye){const i=e;e.f&be&&Kr(i),Ur(i)}e.wv=Mo(),vo(e,be),Hn()&&Z!==null&&Z.f&ge&&!(Z.f&(Ye|Yt))&&(Ve===null?Xs([e]):Ve.push(e)),!r.is_fork&&Yr.size>0&&!fo&&Os()}return t}function Os(){fo=!1;for(const e of Yr)e.f&ge&&le(e,Qe),Yn(e)&&kn(e);Yr.clear()}function ho(e,t=1){var n=a(e),r=t===1?n++:n--;return w(e,n),r}function Gn(e){w(e,e.v+1)}function vo(e,t){var n=e.reactions;if(n!==null)for(var r=Hn(),i=n.length,o=0;o<i;o++){var l=n[o],c=l.f;if(!(!r&&l===Z)){var s=(c&be)===0;if(s&&le(l,t),c&ye){var u=l;xe==null||xe.delete(u),c&Xt||(c&qe&&(l.f|=Xt),vo(u,Qe))}else s&&(c&_t&&Ze!==null&&Ze.add(l),Xe(l))}}}function We(e){if(typeof e!="object"||e===null||Jt in e)return e;const t=Gi(e);if(t!==Ja&&t!==$a)return e;var n=new Map,r=zr(e),i=G(0),o=on,l=c=>{if(on===o)return c();var s=H,u=on;Fe(null),Wo(o);var v=c();return Fe(s),Wo(u),v};return r&&n.set("length",G(e.length)),new Proxy(e,{defineProperty(c,s,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&vs();var v=n.get(s);return v===void 0?l(()=>{var m=G(u.value);return n.set(s,m),m}):w(v,u.value,!0),!0},deleteProperty(c,s){var u=n.get(s);if(u===void 0){if(s in c){const v=l(()=>G(_e));n.set(s,v),Gn(i)}}else w(u,_e),Gn(i);return!0},get(c,s,u){var p;if(s===Jt)return e;var v=n.get(s),m=s in c;if(v===void 0&&(!m||(p=mn(c,s))!=null&&p.writable)&&(v=l(()=>{var g=We(m?c[s]:_e),y=G(g);return y}),n.set(s,v)),v!==void 0){var h=a(v);return h===_e?void 0:h}return Reflect.get(c,s,u)},getOwnPropertyDescriptor(c,s){var u=Reflect.getOwnPropertyDescriptor(c,s);if(u&&"value"in u){var v=n.get(s);v&&(u.value=a(v))}else if(u===void 0){var m=n.get(s),h=m==null?void 0:m.v;if(m!==void 0&&h!==_e)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(c,s){var h;if(s===Jt)return!0;var u=n.get(s),v=u!==void 0&&u.v!==_e||Reflect.has(c,s);if(u!==void 0||Z!==null&&(!v||(h=mn(c,s))!=null&&h.writable)){u===void 0&&(u=l(()=>{var p=v?We(c[s]):_e,g=G(p);return g}),n.set(s,u));var m=a(u);if(m===_e)return!1}return v},set(c,s,u,v){var B;var m=n.get(s),h=s in c;if(r&&s==="length")for(var p=u;p<m.v;p+=1){var g=n.get(p+"");g!==void 0?w(g,_e):p in c&&(g=l(()=>G(_e)),n.set(p+"",g))}if(m===void 0)(!h||(B=mn(c,s))!=null&&B.writable)&&(m=l(()=>G(void 0)),w(m,We(u)),n.set(s,m));else{h=m.v!==_e;var y=l(()=>We(u));w(m,y)}var d=Reflect.getOwnPropertyDescriptor(c,s);if(d!=null&&d.set&&d.set.call(v,u),!h){if(r&&typeof s=="string"){var _=n.get("length"),D=Number(s);Number.isInteger(D)&&D>=_.v&&w(_,D+1)}Gn(i)}return!0},ownKeys(c){a(i);var s=Reflect.ownKeys(c).filter(m=>{var h=n.get(m);return h===void 0||h.v!==_e});for(var[u,v]of n)v.v!==_e&&!(u in c)&&s.push(u);return s},setPrototypeOf(){ps()}})}function po(e){try{if(e!==null&&typeof e=="object"&&Jt in e)return e[Jt]}catch{}return e}function js(e,t){return Object.is(po(e),po(t))}var go,mo,wo,_o;function qs(){if(go===void 0){go=window,mo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;wo=mn(t,"firstChild").get,_o=mn(t,"nextSibling").get,Ki(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Ki(n)&&(n.__t=void 0)}}function kt(e=""){return document.createTextNode(e)}function St(e){return wo.call(e)}function Kn(e){return _o.call(e)}function P(e,t){return St(e)}function Je(e,t=!1){{var n=St(e);return n instanceof Comment&&n.data===""?Kn(n):n}}function R(e,t=1,n=!1){let r=e;for(;t--;)r=Kn(r);return r}function Us(e){e.textContent=""}function yo(){return!1}function bo(e,t,n){return document.createElementNS(Vi,e,void 0)}let xo=!1;function Fs(){xo||(xo=!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 gr(e){var t=H,n=Z;Fe(null),ct(null);try{return e()}finally{Fe(t),ct(n)}}function Hs(e,t,n,r=n){e.addEventListener(t,()=>gr(n));const i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),Fs()}function Vs(e){Z===null&&(H===null&&ds(),us()),Nt&&cs()}function Gs(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Ct(e,t,n){var r=Z;r!==null&&r.f&Re&&(e|=Re);var i={ctx:fe,deps:null,nodes:null,f:e|be|qe,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{kn(i)}catch(c){throw Se(i),c}else t!==null&&Xe(i);var o=i;if(n&&o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&!(o.f&wn)&&(o=o.first,e&_t&&e&Zt&&o!==null&&(o.f|=Zt)),o!==null&&(o.parent=r,r!==null&&Gs(o,r),H!==null&&H.f&ye&&!(e&Yt))){var l=H;(l.effects??(l.effects=[])).push(o)}return i}function Qr(){return H!==null&&!$e}function Zr(e){const t=Ct(fr,null,!1);return le(t,ge),t.teardown=e,t}function xn(e){Vs();var t=Z.f,n=!H&&(t&Ye)!==0&&(t&Qt)===0;if(n){var r=fe;(r.e??(r.e=[])).push(e)}else return ko(e)}function ko(e){return Ct(Fn|rs,e,!1)}function Ks(e){Mt.ensure();const t=Ct(Yt|wn,e,!0);return(n={})=>new Promise(r=>{n.outro?nn(t,()=>{Se(t),r(void 0)}):(Se(t),r(void 0))})}function So(e){return Ct(Fn,e,!1)}function Ys(e){return Ct(qr|wn,e,!0)}function Xr(e,t=0){return Ct(fr|t,e,!0)}function M(e,t=[],n=[],r=[]){Ds(r,t,n,i=>{Ct(fr,()=>e(...i.map(a)),!0)})}function mr(e,t=0){var n=Ct(_t|t,e,!0);return n}function Ue(e){return Ct(Ye|wn,e,!0)}function Co(e){var t=e.teardown;if(t!==null){const n=Nt,r=H;Io(!0),Fe(null);try{t.call(null)}finally{Io(n),Fe(r)}}}function Jr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&gr(()=>{i.abort($t)});var r=n.next;n.f&Yt?n.parent=null:Se(n,t),n=r}}function Qs(e){for(var t=e.first;t!==null;){var n=t.next;t.f&Ye||Se(t),t=n}}function Se(e,t=!0){var n=!1;(t||e.f&Xi)&&e.nodes!==null&&e.nodes.end!==null&&(Zs(e.nodes.start,e.nodes.end),n=!0),Jr(e,t&&!n),Qn(e,0),le(e,yt);var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)o.stop();Co(e);var i=e.parent;i!==null&&i.first!==null&&To(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Zs(e,t){for(;e!==null;){var n=e===t?null:Kn(e);e.remove(),e=n}}function To(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 nn(e,t,n=!0){var r=[];Eo(e,r,!0);var i=()=>{n&&Se(e),t&&t()},o=r.length;if(o>0){var l=()=>--o||i();for(var c of r)c.out(l)}else i()}function Eo(e,t,n){if(!(e.f&Re)){e.f^=Re;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 o=i.next,l=(i.f&Zt)!==0||(i.f&Ye)!==0&&(e.f&_t)!==0;Eo(i,t,l?n:!1),i=o}}}function $r(e){Po(e,!0)}function Po(e,t){if(e.f&Re){e.f^=Re,e.f&ge||(le(e,be),Xe(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&Zt)!==0||(n.f&Ye)!==0;Po(n,i?t:!1),n=r}var o=e.nodes&&e.nodes.t;if(o!==null)for(const l of o)(l.is_global||t)&&l.in()}}function Ao(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Kn(n);t.append(n),n=i}}let wr=!1,Nt=!1;function Io(e){Nt=e}let H=null,$e=!1;function Fe(e){H=e}let Z=null;function ct(e){Z=e}let He=null;function Do(e){H!==null&&(He===null?He=[e]:He.push(e))}let Ce=null,Me=0,Ve=null;function Xs(e){Ve=e}let Ro=1,rn=0,on=rn;function Wo(e){on=e}function Mo(){return++Ro}function Yn(e){var t=e.f;if(t&be)return!0;if(t&ye&&(e.f&=~Xt),t&Qe){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Yn(o)&&co(o),o.wv>e.wv)return!0}t&qe&&xe===null&&le(e,ge)}return!1}function Bo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(He!==null&&gn.call(He,e)))for(var i=0;i<r.length;i++){var o=r[i];o.f&ye?Bo(o,t,!1):t===o&&(n?le(o,be):o.f&ge&&le(o,Qe),Xe(o))}}function No(e){var y;var t=Ce,n=Me,r=Ve,i=H,o=He,l=fe,c=$e,s=on,u=e.f;Ce=null,Me=0,Ve=null,H=u&(Ye|Yt)?null:e,He=null,yn(e.ctx),$e=!1,on=++rn,e.ac!==null&&(gr(()=>{e.ac.abort($t)}),e.ac=null);try{e.f|=jr;var v=e.fn,m=v();e.f|=Qt;var h=e.deps,p=q==null?void 0:q.is_fork;if(Ce!==null){var g;if(p||Qn(e,Me),h!==null&&Me>0)for(h.length=Me+Ce.length,g=0;g<Ce.length;g++)h[Me+g]=Ce[g];else e.deps=h=Ce;if(Qr()&&e.f&qe)for(g=Me;g<h.length;g++)((y=h[g]).reactions??(y.reactions=[])).push(e)}else!p&&h!==null&&Me<h.length&&(Qn(e,Me),h.length=Me);if(Hn()&&Ve!==null&&!$e&&h!==null&&!(e.f&(ye|Qe|be)))for(g=0;g<Ve.length;g++)Bo(Ve[g],e);if(i!==null&&i!==e){if(rn++,i.deps!==null)for(let d=0;d<n;d+=1)i.deps[d].rv=rn;if(t!==null)for(const d of t)d.rv=rn;Ve!==null&&(r===null?r=Ve:r.push(...Ve))}return e.f&Rt&&(e.f^=Rt),m}catch(d){return to(d)}finally{e.f^=jr,Ce=t,Me=n,Ve=r,H=i,He=o,yn(l),$e=c,on=s}}function Js(e,t){let n=t.reactions;if(n!==null){var r=Qa.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&ye&&(Ce===null||!gn.call(Ce,t))){var o=t;o.f&qe&&(o.f^=qe,o.f&=~Xt),Ur(o),Ls(o),Qn(o,0)}}function Qn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Js(e,n[r])}function kn(e){var t=e.f;if(!(t&yt)){le(e,ge);var n=Z,r=wr;Z=e,wr=!0;try{t&(_t|Qi)?Qs(e):Jr(e),Co(e);var i=No(e);e.teardown=typeof i=="function"?i:null,e.wv=Ro;var o;Lr&&bs&&e.f&be&&e.deps}finally{wr=r,Z=n}}}async function $s(){await Promise.resolve(),Cs()}function a(e){var t=e.f,n=(t&ye)!==0;if(H!==null&&!$e){var r=Z!==null&&(Z.f&yt)!==0;if(!r&&(He===null||!gn.call(He,e))){var i=H.deps;if(H.f&jr)e.rv<rn&&(e.rv=rn,Ce===null&&i!==null&&i[Me]===e?Me++:Ce===null?Ce=[e]:Ce.push(e));else{(H.deps??(H.deps=[])).push(e);var o=e.reactions;o===null?e.reactions=[H]:gn.call(o,H)||o.push(H)}}}if(Nt&&Bt.has(e))return Bt.get(e);if(n){var l=e;if(Nt){var c=l.v;return(!(l.f&ge)&&l.reactions!==null||zo(l))&&(c=Kr(l)),Bt.set(l,c),c}var s=(l.f&qe)===0&&!$e&&H!==null&&(wr||(H.f&qe)!==0),u=(l.f&Qt)===0;Yn(l)&&(s&&(l.f|=qe),co(l)),s&&!u&&(uo(l),Lo(l))}if(xe!=null&&xe.has(e))return xe.get(e);if(e.f&Rt)throw e.v;return e.v}function Lo(e){if(e.f|=qe,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&ye&&!(t.f&qe)&&(uo(t),Lo(t))}function zo(e){if(e.v===_e)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Bt.has(t)||t.f&ye&&zo(t))return!0;return!1}function Zn(e){var t=$e;try{return $e=!0,e()}finally{$e=t}}const an=Symbol("events"),Oo=new Set,ei=new Set;function el(e,t,n,r={}){function i(o){if(r.capture||ti.call(t,o),!o.cancelBubble)return gr(()=>n==null?void 0:n.call(this,o))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?xt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ut(e,t,n,r,i){var o={capture:r,passive:i},l=el(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Zr(()=>{t.removeEventListener(e,l,o)})}function sn(e,t,n){(t[an]??(t[an]={}))[e]=n}function _r(e){for(var t=0;t<e.length;t++)Oo.add(e[t]);for(var n of ei)n(e)}let jo=null;function ti(e){var d,_;var t=this,n=t.ownerDocument,r=e.type,i=((d=e.composedPath)==null?void 0:d.call(e))||[],o=i[0]||e.target;jo=e;var l=0,c=jo===e&&e[an];if(c){var s=i.indexOf(c);if(s!==-1&&(t===document||t===window)){e[an]=t;return}var u=i.indexOf(t);if(u===-1)return;s<=u&&(l=s)}if(o=i[l]||e.target,o!==t){Za(e,"currentTarget",{configurable:!0,get(){return o||n}});var v=H,m=Z;Fe(null),ct(null);try{for(var h,p=[];o!==null;){var g=o.assignedSlot||o.parentNode||o.host||null;try{var y=(_=o[an])==null?void 0:_[r];y!=null&&(!o.disabled||e.target===o)&&y.call(o,e)}catch(D){h?p.push(D):h=D}if(e.cancelBubble||g===t||g===null)break;o=g}if(h){for(let D of p)queueMicrotask(()=>{throw D});throw h}}finally{e[an]=t,delete e.currentTarget,Fe(v),ct(m)}}}const ni=((Pa=globalThis==null?void 0:globalThis.window)==null?void 0:Pa.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function tl(e){return(ni==null?void 0:ni.createHTML(e))??e}function qo(e){var t=bo("template");return t.innerHTML=tl(e.replaceAll("<!>","<!---->")),t.content}function Sn(e,t){var n=Z;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function L(e,t){var n=(t&Hi)!==0,r=(t&Ya)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=qo(o?e:"<!>"+e),n||(i=St(i)));var l=r||mo?document.importNode(i,!0):i.cloneNode(!0);if(n){var c=St(l),s=l.lastChild;Sn(c,s)}else Sn(l,l);return l}}function nl(e,t,n="svg"){var r=!e.startsWith("<!>"),i=(t&Hi)!==0,o=`<${n}>${r?e:"<!>"+e}</${n}>`,l;return()=>{if(!l){var c=qo(o),s=St(c);if(i)for(l=document.createDocumentFragment();St(s);)l.appendChild(St(s));else l=St(s)}var u=l.cloneNode(!0);if(i){var v=St(u),m=u.lastChild;Sn(v,m)}else Sn(u,u);return u}}function Lt(e,t){return nl(e,t,"svg")}function Tt(e=""){{var t=kt(e+"");return Sn(t,t),t}}function yr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=kt();return e.append(t,n),Sn(t,n),e}function T(e,t){e!==null&&e.before(t)}const rl=["touchstart","touchmove"];function il(e){return rl.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 ol(e,t){return al(e,t)}const br=new Map;function al(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:l=!0,transformError:c}){qs();var s=void 0,u=Ks(()=>{var v=n??t.appendChild(kt());As(v,{pending:()=>{}},p=>{st({});var g=fe;o&&(g.c=o),i&&(r.$$events=i),s=e(p,r)||{},lt()},c);var m=new Set,h=p=>{for(var g=0;g<p.length;g++){var y=p[g];if(!m.has(y)){m.add(y);var d=il(y);for(const B of[t,document]){var _=br.get(B);_===void 0&&(_=new Map,br.set(B,_));var D=_.get(y);D===void 0?(B.addEventListener(y,ti,{passive:d}),_.set(y,1)):_.set(y,D+1)}}}};return h(dr(Oo)),ei.add(h),()=>{var d;for(var p of m)for(const _ of[t,document]){var g=br.get(_),y=g.get(p);--y==0?(_.removeEventListener(p,ti),g.delete(p),g.size===0&&br.delete(_)):g.set(p,y)}ei.delete(h),v!==n&&((d=v.parentNode)==null||d.removeChild(v))}});return sl.set(s,u),s}let sl=new WeakMap;class Uo{constructor(t,n=!0){Ke(this,"anchor");j(this,rt,new Map);j(this,mt,new Map);j(this,Le,new Map);j(this,fn,new Set);j(this,ir,!0);j(this,or,()=>{var t=q;if(f(this,rt).has(t)){var n=f(this,rt).get(t),r=f(this,mt).get(n);if(r)$r(r),f(this,fn).delete(n);else{var i=f(this,Le).get(n);i&&(f(this,mt).set(n,i.effect),f(this,Le).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[o,l]of f(this,rt)){if(f(this,rt).delete(o),o===t)break;const c=f(this,Le).get(l);c&&(Se(c.effect),f(this,Le).delete(l))}for(const[o,l]of f(this,mt)){if(o===n||f(this,fn).has(o))continue;const c=()=>{if(Array.from(f(this,rt).values()).includes(o)){var u=document.createDocumentFragment();Ao(l,u),u.append(kt()),f(this,Le).set(o,{effect:l,fragment:u})}else Se(l);f(this,fn).delete(o),f(this,mt).delete(o)};f(this,ir)||!r?(f(this,fn).add(o),nn(l,c,!1)):c()}}});j(this,Pr,t=>{f(this,rt).delete(t);const n=Array.from(f(this,rt).values());for(const[r,i]of f(this,Le))n.includes(r)||(Se(i.effect),f(this,Le).delete(r))});this.anchor=t,z(this,ir,n)}ensure(t,n){var r=q,i=yo();if(n&&!f(this,mt).has(t)&&!f(this,Le).has(t))if(i){var o=document.createDocumentFragment(),l=kt();o.append(l),f(this,Le).set(t,{effect:Ue(()=>n(l)),fragment:o})}else f(this,mt).set(t,Ue(()=>n(this.anchor)));if(f(this,rt).set(r,t),i){for(const[c,s]of f(this,mt))c===t?r.unskip_effect(s):r.skip_effect(s);for(const[c,s]of f(this,Le))c===t?r.unskip_effect(s.effect):r.skip_effect(s.effect);r.oncommit(f(this,or)),r.ondiscard(f(this,Pr))}else f(this,or).call(this)}}rt=new WeakMap,mt=new WeakMap,Le=new WeakMap,fn=new WeakMap,ir=new WeakMap,or=new WeakMap,Pr=new WeakMap;function ri(e){fe===null&&as(),_n&&fe.l!==null?ll(fe).m.push(e):xn(()=>{const t=Zn(e);if(typeof t=="function")return t})}function ll(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}function X(e,t,n=!1){var r=new Uo(e),i=n?Zt:0;function o(l,c){r.ensure(l,c)}mr(()=>{var l=!1;t((c,s=0)=>{l=!0,o(s,c)}),l||o(!1,null)},i)}function Cn(e,t){return t}function cl(e,t,n){for(var r=[],i=t.length,o,l=t.length,c=0;c<i;c++){let m=t[c];nn(m,()=>{if(o){if(o.pending.delete(m),o.done.add(m),o.pending.size===0){var h=e.outrogroups;ii(dr(o.done)),h.delete(o),h.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var s=r.length===0&&n!==null;if(s){var u=n,v=u.parentNode;Us(v),v.append(u),e.items.clear()}ii(t,!s)}else o={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(o)}function ii(e,t=!0){for(var n=0;n<e.length;n++)Se(e[n],t)}var Fo;function zt(e,t,n,r,i,o=null){var l=e,c=new Map,s=(t&Un)!==0;if(s){var u=e;l=u.appendChild(kt())}var v=null,m=Gr(()=>{var _=n();return zr(_)?_:_==null?[]:dr(_)}),h,p=!0;function g(){d.fallback=v,ul(d,h,l,t,r),v!==null&&(h.length===0?v.f&bt?(v.f^=bt,Jn(v,null,l)):$r(v):nn(v,()=>{v=null}))}var y=mr(()=>{h=a(m);for(var _=h.length,D=new Set,B=q,S=yo(),A=0;A<_;A+=1){var E=h[A],k=r(E,A),C=p?null:c.get(k);C?(C.v&&bn(C.v,E),C.i&&bn(C.i,A),S&&B.unskip_effect(C.e)):(C=dl(c,p?l:Fo??(Fo=kt()),E,k,A,i,t,n),p||(C.e.f|=bt),c.set(k,C)),D.add(k)}if(_===0&&o&&!v&&(p?v=Ue(()=>o(l)):(v=Ue(()=>o(Fo??(Fo=kt()))),v.f|=bt)),_>D.size&&ls(),!p)if(S){for(const[Y,V]of c)D.has(Y)||B.skip_effect(V.e);B.oncommit(g),B.ondiscard(()=>{})}else g();a(m)}),d={effect:y,items:c,outrogroups:null,fallback:v};p=!1}function Xn(e){for(;e!==null&&!(e.f&Ye);)e=e.next;return e}function ul(e,t,n,r,i){var V,ue,de,Ie,me,it,ie,Ht,ze;var o=(r&qa)!==0,l=t.length,c=e.items,s=Xn(e.effect.first),u,v=null,m,h=[],p=[],g,y,d,_;if(o)for(_=0;_<l;_+=1)g=t[_],y=i(g,_),d=c.get(y).e,d.f&bt||((ue=(V=d.nodes)==null?void 0:V.a)==null||ue.measure(),(m??(m=new Set)).add(d));for(_=0;_<l;_+=1){if(g=t[_],y=i(g,_),d=c.get(y).e,e.outrogroups!==null)for(const De of e.outrogroups)De.pending.delete(d),De.done.delete(d);if(d.f&bt)if(d.f^=bt,d===s)Jn(d,null,n);else{var D=v?v.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),Ot(e,v,d),Ot(e,d,D),Jn(d,D,n),v=d,h=[],p=[],s=Xn(v.next);continue}if(d.f&Re&&($r(d),o&&((Ie=(de=d.nodes)==null?void 0:de.a)==null||Ie.unfix(),(m??(m=new Set)).delete(d))),d!==s){if(u!==void 0&&u.has(d)){if(h.length<p.length){var B=p[0],S;v=B.prev;var A=h[0],E=h[h.length-1];for(S=0;S<h.length;S+=1)Jn(h[S],B,n);for(S=0;S<p.length;S+=1)u.delete(p[S]);Ot(e,A.prev,E.next),Ot(e,v,A),Ot(e,E,B),s=B,v=E,_-=1,h=[],p=[]}else u.delete(d),Jn(d,s,n),Ot(e,d.prev,d.next),Ot(e,d,v===null?e.effect.first:v.next),Ot(e,v,d),v=d;continue}for(h=[],p=[];s!==null&&s!==d;)(u??(u=new Set)).add(s),p.push(s),s=Xn(s.next);if(s===null)continue}d.f&bt||h.push(d),v=d,s=Xn(d.next)}if(e.outrogroups!==null){for(const De of e.outrogroups)De.pending.size===0&&(ii(dr(De.done)),(me=e.outrogroups)==null||me.delete(De));e.outrogroups.size===0&&(e.outrogroups=null)}if(s!==null||u!==void 0){var k=[];if(u!==void 0)for(d of u)d.f&Re||k.push(d);for(;s!==null;)!(s.f&Re)&&s!==e.fallback&&k.push(s),s=Xn(s.next);var C=k.length;if(C>0){var Y=r&Un&&l===0?n:null;if(o){for(_=0;_<C;_+=1)(ie=(it=k[_].nodes)==null?void 0:it.a)==null||ie.measure();for(_=0;_<C;_+=1)(ze=(Ht=k[_].nodes)==null?void 0:Ht.a)==null||ze.fix()}cl(e,k,Y)}}o&&xt(()=>{var De,Vt;if(m!==void 0)for(d of m)(Vt=(De=d.nodes)==null?void 0:De.a)==null||Vt.apply()})}function dl(e,t,n,r,i,o,l,c){var s=l&$?l&Ua?tn(n):zs(n,!1,!1):null,u=l&he?tn(i):null;return{v:s,i:u,e:Ue(()=>(o(t,s??n,u??i,c),()=>{e.delete(r)}))}}function Jn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&!(t.f&bt)?t.nodes.start:n;r!==null;){var l=Kn(r);if(o.before(r),r===i)return;r=l}}function Ot(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ho(e,t,n,r,i){var c;var o=(c=t.$$slots)==null?void 0:c[n],l=!1;o===!0&&(o=t.children,l=!0),o===void 0||o(e,l?()=>r:r)}function Vo(e,t,n){var r=new Uo(e);mr(()=>{var i=t()??null;r.ensure(i,i&&(o=>n(o,i)))},Zt)}function dt(e,t){So(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=bo("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function Go(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=Go(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Go(e))&&(r&&(r+=" "),r+=t);return r}function Tn(e){return typeof e=="object"?fl(e):e??""}const Ko=[...`
2
+ \r\f \v\uFEFF`];function hl(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 o=i.length,l=0;(l=r.indexOf(i,l))>=0;){var c=l+o;(l===0||Ko.includes(r[l-1]))&&(c===r.length||Ko.includes(r[c]))?r=(l===0?"":r.substring(0,l))+r.substring(c+1):l=c}}return r===""?null:r}function ft(e,t,n,r,i,o){var l=e.__className;if(l!==n||l===void 0){var c=hl(n,r,o);c==null?e.removeAttribute("class"):t?e.className=c:e.setAttribute("class",c),e.__className=n}else if(o&&i!==o)for(var s in o){var u=!!o[s];(i==null||u!==!!i[s])&&e.classList.toggle(s,u)}return o}function Yo(e,t,n=!1){if(e.multiple){if(t==null)return;if(!zr(t))return ws();for(var r of e.options)r.selected=t.includes(Qo(r));return}for(r of e.options){var i=Qo(r);if(js(i,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function vl(e){var t=new MutationObserver(()=>{Yo(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Zr(()=>{t.disconnect()})}function Qo(e){return"__value"in e?e.__value:e.value}const pl=Symbol("is custom element"),gl=Symbol("is html");function ml(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function W(e,t,n,r){var i=wl(e);i[t]!==(i[t]=n)&&(t==="loading"&&(e[os]=n),n==null?e.removeAttribute(t):typeof n!="string"&&_l(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function wl(e){return e.__attributes??(e.__attributes={[pl]:e.nodeName.includes("-"),[gl]:e.namespaceURI===Vi})}var Zo=new Map;function _l(e){var t=e.getAttribute("is")||e.nodeName,n=Zo.get(t);if(n)return n;Zo.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){r=Xa(i);for(var l in r)r[l].set&&n.push(l);i=Gi(i)}return n}function yl(e,t,n=t){var r=new WeakSet;Hs(e,"input",async i=>{var o=i?e.defaultValue:e.value;if(o=oi(e)?ai(o):o,n(o),q!==null&&r.add(q),await $s(),o!==(o=t())){var l=e.selectionStart,c=e.selectionEnd,s=e.value.length;if(e.value=o??"",c!==null){var u=e.value.length;l===c&&c===s&&u>s?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=l,e.selectionEnd=Math.min(c,u))}}}),Zn(t)==null&&e.value&&(n(oi(e)?ai(e.value):e.value),q!==null&&r.add(q)),Xr(()=>{var i=t();if(e===document.activeElement){var o=Fr??q;if(r.has(o))return}oi(e)&&i===ai(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i??"")})}function oi(e){var t=e.type;return t==="number"||t==="range"}function ai(e){return e===""?null:+e}function Xo(e,t){return e===t||(e==null?void 0:e[Jt])===t}function bl(e={},t,n,r){return So(()=>{var i,o;return Xr(()=>{i=o,o=[],Zn(()=>{e!==n(...o)&&(t(e,...o),i&&Xo(n(...i),e)&&t(null,...i))})}),()=>{xt(()=>{o&&Xo(n(...o),e)&&t(null,...o)})}}),e}let xr=!1;function xl(e){var t=xr;try{return xr=!1,[e(),xr]}finally{xr=t}}function Te(e,t,n,r){var B;var i=!_n||(n&Ha)!==0,o=(n&Ga)!==0,l=(n&Ka)!==0,c=r,s=!0,u=()=>(s&&(s=!1,c=l?Zn(r):r),c),v;if(o){var m=Jt in e||is in e;v=((B=mn(e,t))==null?void 0:B.set)??(m&&t in e?S=>e[t]=S:void 0)}var h,p=!1;o?[h,p]=xl(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=u(),v&&(i&&hs(),v(h)));var g;if(i?g=()=>{var S=e[t];return S===void 0?u():(s=!0,S)}:g=()=>{var S=e[t];return S!==void 0&&(c=void 0),S===void 0?c:S},i&&!(n&Va))return g;if(v){var y=e.$$legacy;return function(S,A){return arguments.length>0?((!i||!A||y||p)&&v(A?g():S),S):g()}}var d=!1,_=(n&Fa?pr:Gr)(()=>(d=!1,g()));o&&a(_);var D=Z;return function(S,A){if(arguments.length>0){const E=A?a(_):i&&o?We(S):S;return w(_,E),d=!0,c!==void 0&&(c=E),S}return Nt&&d||D.f&yt?_.v:a(_)}}const Jo="wineater_consent",kl=["wineater_uid","uniqueUserID","sessionID"];function Sl(){try{const e=window.localStorage.getItem(Jo);return e==="granted"||e==="denied"?e:null}catch{return null}}let si=G(We(Sl())),kr=G(null),Sr=null;function Cl(e){Sr=e}function Tl(e){w(kr,e,!0)}function $o(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.requireConsent)===!0?!0:a(kr)===!0}function El(){return Sr?!1:a(kr)!==null&&$o()&&a(si)===null}function ea(){var e;return((e=window==null?void 0:window.wineaterData)==null?void 0:e.tracking)===!1?!1:Sr?Sr():a(kr)===null?!1:$o()?a(si)==="granted":!0}function Pl(){for(const e of kl){try{window.localStorage.removeItem(e)}catch{}try{document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`}catch{}}}const li=new Set;function Al(e){return li.add(e),()=>li.delete(e)}function ta(e){w(si,e,!0);try{window.localStorage.setItem(Jo,e)}catch{}e==="denied"&&Pl();for(const t of li)t(e)}const Il=/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/;function Dl(e){if(!e||typeof e!="object")return null;const t=e,n=String(t.shop??"").trim().toLowerCase();if(!Il.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 ci;function et(){var e;return ci===void 0&&(ci=typeof window>"u"?null:Dl((e=window.wineaterData)==null?void 0:e.shopify)),ci}function na(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 Rl(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 Wl(e,t){return e===429&&(t==null?void 0:t.code)==="quota_exceeded"}class ra extends Error{constructor(){super("quota_exceeded"),this.name="QuotaExceededError"}}let ui=null;function ia(){var t,n;if(ui)return ui;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 ui=e,e}function Ml(){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 Bl(){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 oa="4.25.1";function aa(){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 di(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 fi(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 Nl(){const e="uniqueUserID";let t=fi(e);return t||(t=aa(),di(e,t,365)),t}function Ee(e,t,n={},r={}){var g;const i=(g=et())==null?void 0:g.shop,o=i?"https://api.wineater.com/shopify/storefront/events":"https://api.wineater.com/api/widget-events",l=i?{shop:i}:{},c=new Date().toISOString(),s=navigator.language.split("-")[1]||null,u=navigator.language.split("-")[0]||"en";if(!ea()){const y={...l,event_type:e,store_id:t,event_time:c,data:n,meta:{...r,anonymous:!0,widget_version:oa},device_info:{device:window.innerWidth<768?"mobile":"desktop"},region:s,language:u};return fetch(o,{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 v=fi("uniqueUserID");v||(v=Nl());const m={user_agent:navigator.userAgent,screen_width:window.screen.width,screen_height:window.screen.height,language:navigator.language,platform:navigator.platform};let h=fi("sessionID");h||(h=aa(),di("sessionID",h,1));const p={...l,event_type:e,store_id:t,session_id:h,event_time:c,data:n,meta:{...r,user_id:v,widget_version:oa},device_info:m,region:s,language:u};return fetch(o,{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 Ll(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 $n(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 zl(e){return{recommendations:(e.recommendations||[]).filter(Boolean).map($n),hasMore:!!e.has_more}}const er="wineater_uid",Ol=365;let Cr=null;function sa(){const e=globalThis.crypto;if(e!=null&&e.randomUUID)return e.randomUUID();const t=new Uint8Array(16);if(e!=null&&e.getRandomValues)e.getRandomValues(t);else for(let r=0;r<16;r++)t[r]=Math.random()*256|0;t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}const la=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function ca(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 jl(e,t){try{const n=new Date(Date.now()+Ol*864e5).toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; expires=${n}; path=/; SameSite=Lax; Secure`}catch{}}function ua(){return ea()}Al(e=>{e==="denied"&&(Cr=null)});function hi(){if(!ua())return null;if(Cr)return Cr;let e=null;try{e=window.localStorage.getItem(er)}catch{}(!e||!la.test(e))&&(e=ca(er)),(!e||!la.test(e))&&(e=sa());try{window.localStorage.setItem(er,e)}catch{}return ca(er)!==e&&jl(er,e),Cr=e,e}function da(){return sa()}const ql=2e3,fa=100;let Tr=null,En=[],tr=null,ha=!1;function Ul(e){Tr=e,!(ha||typeof document>"u")&&(ha=!0,document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&nr()}),window.addEventListener("pagehide",()=>void nr()))}function ln(e){var t;if(!(!ua()||!Tr)&&!(!((t=e.sku_ids)!=null&&t.length)&&e.type!=="more")){if(En.push(e),En.length>=fa){nr();return}tr||(tr=setTimeout(()=>void nr(),ql))}}async function nr(){if(tr&&(clearTimeout(tr),tr=null),!Tr||En.length===0)return;const e=hi();if(!e){En=[];return}const t=En.splice(0,fa);try{await Tr({uid:e,events:t})}catch(n){console.debug("[wineater] feedback flush failed:",n==null?void 0:n.message)}En.length>0&&nr()}const va=24;function pa(e,t,n){return e!=="bar"||!t||!n||t===n?null:t}function vi(e,t){return t?{...e,language:t}:e}function Fl(e,t){const n=t==null?void 0:t.translations;return e.map(r=>{const i=n&&typeof n=="object"?n[r.id]:null,o={};if(i&&typeof i.shortDescription=="string"&&i.shortDescription.trim()&&(o.shortDescription=i.shortDescription),i&&Array.isArray(i.tags)){const l=i.tags.filter(c=>typeof c=="string"&&c.trim());l.length&&(o.tags=l)}return o})}async function Hl(e,t,n){const r=[...new Set(t.filter(Boolean))];if(!r.length||!n)return null;const i={};let o=!1;for(let l=0;l<r.length;l+=va)try{const c=await e({ids:r.slice(l,l+va),language:n});c&&typeof c.translations=="object"&&c.translations&&(Object.assign(i,c.translations),o=!0)}catch{}return o?{language:n,translations:i}:null}const Vl="X-Wineater-Uid";class ga extends Error{constructor(n,r){super(`API call failed with status ${n}: ${(r==null?void 0:r.message)||"No additional error information"}`);Ke(this,"status");Ke(this,"data");this.status=n,this.data=r}}class Gl{constructor(t,n="1"){j(this,se);j(this,Nn,"https://api.wineater.com/");j(this,ar);j(this,Ft);j(this,Ln,!1);j(this,zn,null);j(this,hn,null);z(this,ar,t),z(this,Ft,n)}async getInstantRecommendations(){var t;try{const n=(t=et())==null?void 0:t.shop,r=n?"shopify/storefront/instant":f(this,Ft)==="2"?"dish/recommendations/instant/v2":"dish/recommendations/instant",{data:i,headers:o}=await Q(this,se,Ui).call(this,r,n?Q(this,se,Fi).call(this,{}):{});return{wines:i.filter(Boolean).map(Ll),profileHash:o.get("X-Wineater-Profile")||null}}catch(n){throw new Error(`Error in getInstantRecommendations: ${n.message}`)}}async getWineRecommendationsSearch(t,n){if(et())return Q(this,se,ja).call(this,t,n);try{const r=f(this,Ft)==="2"?"dish/recommendations/search/v2":"dish/recommendations/search",i=n?{text:t,query_id:n}:{text:t};return(await Q(this,se,Dt).call(this,r,f(this,Ft)==="2"?vi(i,f(this,hn)):i)).filter(Boolean).map($n)}catch(r){throw new Error(`Error in getWineRecommendations: ${r.message}`)}}async searchStream(t,n,r){const i=()=>this.getWineRecommendationsSearch(t,n);if(f(this,Ft)!=="2"||et())return i();let o;try{o=await fetch(`${f(this,Nn)}dish/recommendations/search/v2/stream`,{method:"POST",headers:Q(this,se,qi).call(this),body:JSON.stringify(vi(n?{text:t,query_id:n}:{text:t},f(this,hn)))})}catch{return i()}if(!o.ok||!o.body)return i();const l=o.body.getReader(),c=new TextDecoder;let s="",u=null;const v=m=>(m??[]).filter(Boolean).map($n);try{for(;;){const{done:m,value:h}=await l.read();h&&(s+=c.decode(h,{stream:!0}));const p=s.split(`
3
+ `);s=m?"":p.pop()??"";for(const g of m?p.filter(Boolean):p){if(!g.trim())continue;const y=JSON.parse(g);if(y.type==="wines")u=v(y.recommendations).map(d=>({...d,reason:""})),r(u);else{if(y.type==="final")return v(y.recommendations);if(y.type==="error")return u||i()}}if(m)break}}catch{return u||i()}return u??i()}async getMoreWineRecommendations(t,n){try{const r=await Q(this,se,Dt).call(this,"dish/recommendations/search/v2/more",vi({text:t,exclude_ids:n},f(this,hn)));return zl(r)}catch(r){throw new Error(`Error in getMoreWineRecommendations: ${r.message}`)}}async getSimilarWines(t){try{return(await Q(this,se,Dt).call(this,"dish/recommendations/similar",{id:t})).filter(Boolean).map($n)}catch(n){throw new Error(`Error in getSimilarWines: ${n.message}`)}}async postEvents(t){await Q(this,se,Dt).call(this,"events",t,{keepalive:!0})}setVisitorLanguage(t){z(this,hn,t)}async getWineTranslations(t,n){return Hl(r=>Q(this,se,Dt).call(this,"wines/translations",r).catch(()=>null),t,n)}setLanguage(t){z(this,zn,t)}async getShopifyConfig(){const t=et().shop;return Q(this,se,Dt).call(this,`shopify/storefront/config?shop=${encodeURIComponent(t)}`,void 0,{method:"GET"})}async getStoreConfig(){try{return await Q(this,se,Dt).call(this,"stores/store",{})}catch(t){throw console.error("Error fetching store configuration:",t),t}}}Nn=new WeakMap,ar=new WeakMap,Ft=new WeakMap,Ln=new WeakMap,zn=new WeakMap,hn=new WeakMap,se=new WeakSet,qi=function(){const t={"Content-Type":"application/json",Authorization:`Bearer ${f(this,ar)}`};if(!f(this,Ln)){const n=hi();n&&(t[Vl]=n)}return t},Dt=async function(t,n,r={}){return(await Q(this,se,Ui).call(this,t,n,r)).data},Ui=async function(t,n,r={}){const i=()=>({method:r.method??"POST",headers:Q(this,se,qi).call(this),body:n===void 0?void 0:JSON.stringify(n),keepalive:r.keepalive});let o;try{o=await fetch(`${f(this,Nn)}${t}`,i())}catch(s){if(f(this,Ln)||!hi())throw s;z(this,Ln,!0),o=await fetch(`${f(this,Nn)}${t}`,i())}const l=await o.text();let c=null;try{c=l?JSON.parse(l):null}catch{if(o.ok)throw new Error("API returned invalid JSON")}if(!o.ok)throw new ga(o.status,c);return{data:c,headers:o.headers}},Fi=function(t){const n=et().shop;return f(this,zn)?{...t,shop:n,language:f(this,zn)}:{...t,shop:n}},ja=async function(t,n){try{const r=Q(this,se,Fi).call(this,{text:t,session_id:ia(),...n?{query_id:n}:{}});return(await Q(this,se,Dt).call(this,"shopify/storefront/search",r)??[]).filter(Boolean).map($n)}catch(r){throw r instanceof ga&&Wl(r.status,r.data)?new ra:new Error(`Error in getWineRecommendations: ${r.message}`)}};const ma=((Aa=window==null?void 0:window.wineaterData)==null?void 0:Aa.CLIENT_TOKEN)||"HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG",pi=String(((Ia=window==null?void 0:window.wineaterData)==null?void 0:Ia.apiVersion)||"1"),tt=new Gl(ma,pi);Ul(e=>tt.postEvents(e));function Kl(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 gi=`${Kl(ma)}:${pi}`,wa="wineater:v1:";function mi(e,t){try{const n=window.localStorage.getItem(wa+e);if(!n)return null;const r=JSON.parse(n);return Date.now()-r.savedAt>t?null:r.value}catch{return null}}function wi(e,t){try{const n={savedAt:Date.now(),value:t};window.localStorage.setItem(wa+e,JSON.stringify(n))}catch{}}const Pe={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"},_a={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."},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."},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."},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."},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."},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:"Наш сомельє відпочиває. Перегляньте нашу добірку нижче."},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:"Наш сомелье отдыхает. Посмотрите нашу подборку ниже."},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:"Біздің сомелье демалып жатыр. Төмендегі таңдауымызды қараңыз."},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."}};function Yl(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}}const ht="https://media.wineater.com/static-media",Ql={0:{logoUrl:null,brandColor:"#7B2BEB"},29:{logoUrl:`${ht}/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('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
57
- mask-image: url('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
56
+ -webkit-mask-image: url('${ht}/search.svg?x=1');
57
+ mask-image: url('${ht}/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:"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/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:`${ht}/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('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
70
- mask-image: url('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
69
+ -webkit-mask-image: url('${ht}/search.svg?x=1');
70
+ mask-image: url('${ht}/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('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
96
- mask-image: url('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
95
+ -webkit-mask-image: url('${ht}/search.svg?x=1');
96
+ mask-image: url('${ht}/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 _a(e){const t={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
104
+ `}};function ya(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=Yl[e]||{};return{...t,...n}}function Ql(e){const t=e.color||"#7B2BEB";return{..._a(""),brandColor:t,wineaterColor:t,customCss:""}}const Zl=24*60*60*1e3;let ee=We({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null,searchAvailable:!0});const ce={getLanguageFromURL(){return et()?null:new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return(ee==null?void 0:ee.currentLanguage)??"en"},getStoreLanguage(){var e;return((e=ee.storeConfig)==null?void 0:e.lang)??null},getStoreId(){var e;return((e=ee.storeConfig)==null?void 0:e.id)??null},setStoreLanguage(e){if(ee.storeConfig&&ee.storeConfig.available_languages.includes(e)){if(ee.currentLanguage=e,et()){tt.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=ee.storeConfig)==null?void 0:e.available_languages)??["en"]},getConsentRequired(){var e;return((e=ee.storeConfig)==null?void 0:e.requires_cookie_consent)===!0},getCurrency(){var e;return((e=ee.storeConfig)==null?void 0:e.currency)??"USD"},applyStoreConfig(e){ee.storeConfig=Kl(e),ee.currentLanguage=ee.storeConfig.lang;const t=this.getLanguageFromURL();t&&ee.storeConfig.available_languages.includes(t)?this.setStoreLanguage(t):this.setStoreLanguage(ee.storeConfig.lang);const n=et();this.setUiConfig(n?{...Ql(n),titleText:ee.storeConfig.title||null}:_a(ee.storeConfig.id)),Cl(ee.storeConfig.requires_cookie_consent),ee.isConfigLoaded=!0},async initializeStore(){const e=et();if(e)return this.initializeShopify(e);const t=`${pi}:store-config:v2`,n=async()=>{const r=await tt.getStoreConfig();return mi(t,r),r};try{const r=gi(t,Zl);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),ee.isConfigLoaded=!1}},async initializeShopify(e){var t;Sl(Wl),Ml();try{const n=(t=e.config)!=null&&t.lang?e.config:await tt.getShopifyConfig(),r=Object.keys(wa),i=Dl(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}),ee.searchAvailable=(n==null?void 0:n.search_available)!==!1}catch(n){console.error("Failed to initialize store:",n),ee.isConfigLoaded=!1}},isSearchAvailable(){return ee.searchAvailable},setSearchAvailable(e){ee.searchAvailable=e},isInitialized(){return ee.isConfigLoaded},getUiConfig(){return ee.uiConfig},setUiConfig(e){ee.uiConfig=e}},Xl={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 Jl(e,t,n="en"){try{return new Intl.NumberFormat(Xl[n]||"en-US",{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}catch{return e.toString()}}function ae({key:e,lang:t}){const n=wa,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}".`)}bs();var $l=Nt('<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 ya(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=$l();M(()=>{ft(i,0,Cn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var ec=Nt('<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 ba(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=ec();M(()=>{ft(i,0,Cn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var tc=Nt('<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 wi(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=tc();M(()=>{ft(i,0,Cn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var nc=Nt('<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 xa(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=nc();M(()=>{ft(i,0,Cn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var rc=L('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),ic=L('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),oc=L('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),ac=L('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),sc=L('<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>'),lc=L('<div class="wr-Header"><!></div>');const cc={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=Ql[e]||{};return{...t,...n}}function Zl(e){const t=e.color||"#7B2BEB";return{...ya(""),brandColor:t,wineaterColor:t,customCss:""}}const Xl=24*60*60*1e3;let ee=We({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null,searchAvailable:!0});const ce={getLanguageFromURL(){return et()?null:new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return(ee==null?void 0:ee.currentLanguage)??"en"},getStoreLanguage(){var e;return((e=ee.storeConfig)==null?void 0:e.lang)??null},getStoreId(){var e;return((e=ee.storeConfig)==null?void 0:e.id)??null},setStoreLanguage(e){if(ee.storeConfig&&ee.storeConfig.available_languages.includes(e)){if(ee.currentLanguage=e,et()){tt.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=ee.storeConfig)==null?void 0:e.available_languages)??["en"]},getConsentRequired(){var e;return((e=ee.storeConfig)==null?void 0:e.requires_cookie_consent)===!0},getCurrency(){var e;return((e=ee.storeConfig)==null?void 0:e.currency)??"USD"},applyStoreConfig(e){ee.storeConfig=Yl(e),ee.currentLanguage=ee.storeConfig.lang;const t=this.getLanguageFromURL();t&&ee.storeConfig.available_languages.includes(t)?this.setStoreLanguage(t):this.setStoreLanguage(ee.storeConfig.lang);const n=et();this.setUiConfig(n?{...Zl(n),titleText:ee.storeConfig.title||null}:ya(ee.storeConfig.id)),Tl(ee.storeConfig.requires_cookie_consent),ee.isConfigLoaded=!0},async initializeStore(){const e=et();if(e)return this.initializeShopify(e);const t=`${gi}:store-config:v2`,n=async()=>{const r=await tt.getStoreConfig();return wi(t,r),r};try{const r=mi(t,Xl);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),ee.isConfigLoaded=!1}},async initializeShopify(e){var t;Cl(Ml),Bl();try{const n=(t=e.config)!=null&&t.lang?e.config:await tt.getShopifyConfig(),r=Object.keys(_a),i=Rl(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}),ee.searchAvailable=(n==null?void 0:n.search_available)!==!1}catch(n){console.error("Failed to initialize store:",n),ee.isConfigLoaded=!1}},isSearchAvailable(){return ee.searchAvailable},setSearchAvailable(e){ee.searchAvailable=e},isInitialized(){return ee.isConfigLoaded},getUiConfig(){return ee.uiConfig},setUiConfig(e){ee.uiConfig=e}},Jl={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 $l(e,t,n="en"){try{return new Intl.NumberFormat(Jl[n]||"en-US",{style:"currency",currency:t,currencyDisplay:"narrowSymbol"}).format(e)}catch{return e.toString()}}function ae({key:e,lang:t}){const n=_a,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}".`)}xs();var ec=Lt('<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 ba(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=ec();M(()=>{ft(i,0,Tn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var tc=Lt('<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 xa(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=tc();M(()=>{ft(i,0,Tn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var nc=Lt('<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 _i(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=nc();M(()=>{ft(i,0,Tn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var rc=Lt('<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 ka(e,t){let n=Te(t,"className",8,""),r=Te(t,"size",8,20);var i=rc();M(()=>{ft(i,0,Tn(n())),W(i,"width",r()),W(i,"height",r())}),T(e,i)}var ic=L('<span><!></span><span class="wr-Header-label svelte-oiwvqb"> </span>',1),oc=L('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),ac=L('<!><span class="wr-Header-label svelte-oiwvqb"> </span>',1),sc=L('<h1 class="wr-Header-title svelte-oiwvqb"></h1>'),lc=L('<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>'),cc=L('<div class="wr-Header"><!></div>');const uc={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 uc(e,t){st(t,!0),dt(e,cc);let n=F(()=>ce.getAppLanguage()),r=F(()=>ce.getUiConfig()),i=F(()=>{var h,p;return((h=window==null?void 0:window.wineaterData)==null?void 0:h.TITLE_TEXT)||((p=a(r))==null?void 0:p.titleText)||null}),o=G(We(wi));function l(h){return h.split(/(meal|mood|occasion)/gi).map(p=>({keyword:/^(meal|mood|occasion)$/i.test(p)?p.toLowerCase():null,text:p}))}let c=F(()=>a(i)?l(a(i)):null);var s=lc(),u=P(s);{var v=h=>{var p=ac();Lt(p,21,()=>a(c),Sn,(g,y)=>{var d=_r(),_=Je(d);{var D=E=>{var k=rc(),C=Je(k),Y=P(C);Ho(Y,()=>a(o),(de,Ie)=>{Ie(de,{className:"wr-Header-icon",size:"28"})});var V=R(C),ue=P(V);M(()=>O(ue,a(y).text)),ut("mouseenter",C,()=>w(o,xa,!0)),ut("mouseleave",C,()=>w(o,wi,!0)),T(E,k)},B=E=>{var k=ic(),C=Je(k);ba(C,{className:"wr-Header-icon",size:"28"});var Y=R(C),V=P(Y);M(()=>O(V,a(y).text)),T(E,k)},S=E=>{var k=oc(),C=Je(k);ya(C,{className:"wr-Header-icon",size:"28"});var Y=R(C),V=P(Y);M(()=>O(V,a(y).text)),T(E,k)},A=E=>{var k=Ct();M(()=>O(k,a(y).text)),T(E,k)};X(_,E=>{a(y).keyword==="meal"?E(D):a(y).keyword==="mood"?E(B,1):a(y).keyword==="occasion"?E(S,2):E(A,!1)})}T(g,d)}),T(h,p)},m=h=>{var p=sc(),g=P(p),y=R(g),d=P(y);Ho(d,()=>a(o),(ue,de)=>{de(ue,{className:"wr-Header-icon",size:"28"})});var _=R(y,2),D=P(_),B=R(_,2);ba(B,{className:"wr-Header-icon",size:"28"});var S=R(B,2),A=P(S),E=R(S,3),k=R(E);ya(k,{className:"wr-Header-icon",size:"28"});var C=R(k,2),Y=P(C),V=R(C);M((ue,de,Ie,me,it,ie)=>{O(g,`${ue??""} `),O(D,de),O(A,Ie),O(E,` ${me??""} `),O(Y,it),O(V,` ${ie??""}`)},[()=>ae({key:"headerLine1",lang:a(n)}),()=>ae({key:"headerMeal",lang:a(n)}),()=>ae({key:"headerMood",lang:a(n)}),()=>ae({key:"headerOr",lang:a(n)}),()=>ae({key:"headerOccasion",lang:a(n)}),()=>ae({key:"headerLine2",lang:a(n)})]),ut("mouseenter",y,()=>w(o,xa,!0)),ut("mouseleave",y,()=>w(o,wi,!0)),T(h,p)};X(u,h=>{a(c)?h(v):h(m,!1)})}T(e,s),lt()}var dc=L('<option class="wr-Footer-lang"> </option>'),fc=L('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),hc=L('<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 vc={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 dc(e,t){st(t,!0),dt(e,uc);let n=U(()=>ce.getAppLanguage()),r=U(()=>ce.getUiConfig()),i=U(()=>{var h,p;return((h=window==null?void 0:window.wineaterData)==null?void 0:h.TITLE_TEXT)||((p=a(r))==null?void 0:p.titleText)||null}),o=G(We(_i));function l(h){return h.split(/(meal|mood|occasion)/gi).map(p=>({keyword:/^(meal|mood|occasion)$/i.test(p)?p.toLowerCase():null,text:p}))}let c=U(()=>a(i)?l(a(i)):null);var s=cc(),u=P(s);{var v=h=>{var p=sc();zt(p,21,()=>a(c),Cn,(g,y)=>{var d=yr(),_=Je(d);{var D=E=>{var k=ic(),C=Je(k),Y=P(C);Vo(Y,()=>a(o),(de,Ie)=>{Ie(de,{className:"wr-Header-icon",size:"28"})});var V=R(C),ue=P(V);M(()=>O(ue,a(y).text)),ut("mouseenter",C,()=>w(o,ka,!0)),ut("mouseleave",C,()=>w(o,_i,!0)),T(E,k)},B=E=>{var k=oc(),C=Je(k);xa(C,{className:"wr-Header-icon",size:"28"});var Y=R(C),V=P(Y);M(()=>O(V,a(y).text)),T(E,k)},S=E=>{var k=ac(),C=Je(k);ba(C,{className:"wr-Header-icon",size:"28"});var Y=R(C),V=P(Y);M(()=>O(V,a(y).text)),T(E,k)},A=E=>{var k=Tt();M(()=>O(k,a(y).text)),T(E,k)};X(_,E=>{a(y).keyword==="meal"?E(D):a(y).keyword==="mood"?E(B,1):a(y).keyword==="occasion"?E(S,2):E(A,!1)})}T(g,d)}),T(h,p)},m=h=>{var p=lc(),g=P(p),y=R(g),d=P(y);Vo(d,()=>a(o),(ue,de)=>{de(ue,{className:"wr-Header-icon",size:"28"})});var _=R(y,2),D=P(_),B=R(_,2);xa(B,{className:"wr-Header-icon",size:"28"});var S=R(B,2),A=P(S),E=R(S,3),k=R(E);ba(k,{className:"wr-Header-icon",size:"28"});var C=R(k,2),Y=P(C),V=R(C);M((ue,de,Ie,me,it,ie)=>{O(g,`${ue??""} `),O(D,de),O(A,Ie),O(E,` ${me??""} `),O(Y,it),O(V,` ${ie??""}`)},[()=>ae({key:"headerLine1",lang:a(n)}),()=>ae({key:"headerMeal",lang:a(n)}),()=>ae({key:"headerMood",lang:a(n)}),()=>ae({key:"headerOr",lang:a(n)}),()=>ae({key:"headerOccasion",lang:a(n)}),()=>ae({key:"headerLine2",lang:a(n)})]),ut("mouseenter",y,()=>w(o,ka,!0)),ut("mouseleave",y,()=>w(o,_i,!0)),T(h,p)};X(u,h=>{a(c)?h(v):h(m,!1)})}T(e,s),lt()}var fc=L('<option class="wr-Footer-lang"> </option>'),hc=L('<select class="wr-Footer-dropdown svelte-1sr6y3t"></select>'),vc=L('<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 pc={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 pc(e,t){st(t,!0),dt(e,vc);let n=Te(t,"countryCode",3,null),r=F(()=>ce.getAppLanguage()),i=F(()=>ce.getSupportedLanguages()),o=F(()=>ce.getStoreId());function l(_){const B=_.target.value;Ee(Pe.LANGUAGE_CHANGED,a(o),{from_language:a(r),to_language:B}),ce.setStoreLanguage(B)}var c=hc(),s=P(c),u=P(s),v=P(u),m=P(v),h=R(v,2),p=R(h,2),g=P(p),y=R(s,2);{var d=_=>{var D=fc();Lt(D,21,()=>a(i),Sn,(S,A)=>{var E=dc(),k=P(E),C={};M(Y=>{gl(E,a(A)===a(r)),O(k,Y),C!==(C=a(A))&&(E.value=(E.__value=a(A))??"")},[()=>a(A).toUpperCase()]),T(S,E)});var B;hl(D),M(()=>{B!==(B=a(r))&&(D.value=(D.__value=a(r))??"",Ko(D,a(r)))}),an("change",D,l),T(_,D)};X(y,_=>{a(i).length>1&&_(d)})}M((_,D)=>{O(m,_),W(h,"src",n()==="ru"?"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/divino_logo.svg?x=5":"https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/logo_medium_gray.svg"),O(g,D)},[()=>ae({key:"poweredBy",lang:a(r)}),()=>ae({key:"ai_sommelier",lang:a(r)})]),T(e,c),lt()}wr(["change"]);var gc=L('<a rel="noopener noreferrer"><!></a>'),mc=L("<button><!></button>");const wc={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 gc(e,t){st(t,!0),dt(e,pc);let n=Te(t,"countryCode",3,null),r=U(()=>ce.getAppLanguage()),i=U(()=>ce.getSupportedLanguages()),o=U(()=>ce.getStoreId());function l(_){const B=_.target.value;Ee(Pe.LANGUAGE_CHANGED,a(o),{from_language:a(r),to_language:B}),ce.setStoreLanguage(B)}var c=vc(),s=P(c),u=P(s),v=P(u),m=P(v),h=R(v,2),p=R(h,2),g=P(p),y=R(s,2);{var d=_=>{var D=hc();zt(D,21,()=>a(i),Cn,(S,A)=>{var E=fc(),k=P(E),C={};M(Y=>{ml(E,a(A)===a(r)),O(k,Y),C!==(C=a(A))&&(E.value=(E.__value=a(A))??"")},[()=>a(A).toUpperCase()]),T(S,E)});var B;vl(D),M(()=>{B!==(B=a(r))&&(D.value=(D.__value=a(r))??"",Yo(D,a(r)))}),sn("change",D,l),T(_,D)};X(y,_=>{a(i).length>1&&_(d)})}M((_,D)=>{O(m,_),W(h,"src",n()==="ru"?`${ht}/divino_logo.svg?x=5`:`${ht}/logo_medium_gray.svg`),O(g,D)},[()=>ae({key:"poweredBy",lang:a(r)}),()=>ae({key:"ai_sommelier",lang:a(r)})]),T(e,c),lt()}_r(["change"]);var mc=L('<a rel="noopener noreferrer"><!></a>'),wc=L("<button><!></button>");const _c={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 Ot(e,t){st(t,!0),dt(e,wc);let n=Te(t,"type",3,"button"),r=Te(t,"variant",3,"primary"),i=Te(t,"target",3,"_self"),o=ce.getUiConfig(),l=`wr-Action ${r()} ${t.className||""} ${o.buttonUppercase?"wr-Action--uppercase":""}`.trim();var c=_r(),s=Je(c);{var u=m=>{var h=gc(),p=P(h);Uo(p,t,"default",{}),M(()=>{ft(h,1,Cn(l),"svelte-8cxv3l"),W(h,"href",t.href),W(h,"id",t.id),W(h,"target",i())}),an("click",h,function(...g){var y;(y=t.handleClick)==null||y.apply(this,g)}),T(m,h)},v=m=>{var h=mc(),p=P(h);Uo(p,t,"default",{}),M(()=>{ft(h,1,Cn(l),"svelte-8cxv3l"),W(h,"type",n()),W(h,"id",t.id)}),an("click",h,function(...g){var y;(y=t.handleClick)==null||y.apply(this,g)}),T(m,h)};X(s,m=>{t.href?m(u):m(v,!1)})}T(e,c),lt()}wr(["click"]);var _c=L('<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 yc={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 bc(e,t){st(t,!0),dt(e,yc);let n=Te(t,"searchQuery",15),r,i=G(!1),o=G(0),l=G(0),c=G(!0),s=G(!1),u=F(()=>ce.getAppLanguage()),v=0;function m(){return r}function h(){const S=++v,A=ae({key:"placeholderSuggestions",lang:a(u)});if(!r||!A.length)return;w(s,!0);const E=()=>{if(S!==v||!r||!a(s)||a(i)||n().length)return;const k=A[a(o)];if(a(c)){if(r.placeholder=k.substring(0,fo(l)),a(l)>k.length){w(c,!1),setTimeout(E,1600);return}setTimeout(E,90)}else{if(r.placeholder=k.substring(0,fo(l,-1)),a(l)<0){w(c,!0),w(o,(a(o)+1)%A.length),setTimeout(E,450);return}setTimeout(E,45)}};E()}function p(){w(s,!1)}function g(){w(i,!0),p(),r&&(r.placeholder="")}function y(){w(i,!1),w(l,0),w(c,!0),w(s,!1)}bn(()=>{if(!r||n().length>0)return;v++,w(s,!1),w(o,0),w(l,0),w(c,!0);const S=ae({key:"placeholderSuggestions",lang:a(u)});S&&S.length?r.placeholder=S[0]:r.placeholder=ae({key:"searchPlaceholder",lang:a(u)})}),bn(()=>{r&&t.initialized&&!a(i)&&!n().length&&!a(s)&&h(),n().length>0&&a(s)&&(w(s,!1),v++)}),ni(()=>{});var d={getSearchElement:m},_=_c(),D=R(P(_),2);yl(D,S=>r=S,()=>r);var B=R(D,2);return Ot(B,{className:"wr-Search-button",type:"submit",variant:"primary",children:(S,A)=>{var E=Ct();M(k=>O(E,k),[()=>ae({key:"searchButton",lang:a(u)})]),T(S,E)},$$slots:{default:!0}}),ut("submit",_,function(...S){var A;(A=t.onSubmit)==null||A.apply(this,S)}),ut("focus",D,g),ut("blur",D,y),_l(D,n),T(e,_),lt(d)}var xc=L('<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>'),kc=L('<div class="wr-Skeleton svelte-f6xbvk" aria-hidden="true"></div>');const Sc={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 jt(e,t){st(t,!0),dt(e,_c);let n=Te(t,"type",3,"button"),r=Te(t,"variant",3,"primary"),i=Te(t,"target",3,"_self"),o=ce.getUiConfig(),l=`wr-Action ${r()} ${t.className||""} ${o.buttonUppercase?"wr-Action--uppercase":""}`.trim();var c=yr(),s=Je(c);{var u=m=>{var h=mc(),p=P(h);Ho(p,t,"default",{}),M(()=>{ft(h,1,Tn(l),"svelte-8cxv3l"),W(h,"href",t.href),W(h,"id",t.id),W(h,"target",i())}),sn("click",h,function(...g){var y;(y=t.handleClick)==null||y.apply(this,g)}),T(m,h)},v=m=>{var h=wc(),p=P(h);Ho(p,t,"default",{}),M(()=>{ft(h,1,Tn(l),"svelte-8cxv3l"),W(h,"type",n()),W(h,"id",t.id)}),sn("click",h,function(...g){var y;(y=t.handleClick)==null||y.apply(this,g)}),T(m,h)};X(s,m=>{t.href?m(u):m(v,!1)})}T(e,c),lt()}_r(["click"]);var yc=L('<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 bc={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 xc(e,t){st(t,!0),dt(e,bc);let n=Te(t,"searchQuery",15),r,i=G(!1),o=G(0),l=G(0),c=G(!0),s=G(!1),u=U(()=>ce.getAppLanguage()),v=0;function m(){return r}function h(){const S=++v,A=ae({key:"placeholderSuggestions",lang:a(u)});if(!r||!A.length)return;w(s,!0);const E=()=>{if(S!==v||!r||!a(s)||a(i)||n().length)return;const k=A[a(o)];if(a(c)){if(r.placeholder=k.substring(0,ho(l)),a(l)>k.length){w(c,!1),setTimeout(E,1600);return}setTimeout(E,90)}else{if(r.placeholder=k.substring(0,ho(l,-1)),a(l)<0){w(c,!0),w(o,(a(o)+1)%A.length),setTimeout(E,450);return}setTimeout(E,45)}};E()}function p(){w(s,!1)}function g(){w(i,!0),p(),r&&(r.placeholder="")}function y(){w(i,!1),w(l,0),w(c,!0),w(s,!1)}xn(()=>{if(!r||n().length>0)return;v++,w(s,!1),w(o,0),w(l,0),w(c,!0);const S=ae({key:"placeholderSuggestions",lang:a(u)});S&&S.length?r.placeholder=S[0]:r.placeholder=ae({key:"searchPlaceholder",lang:a(u)})}),xn(()=>{r&&t.initialized&&!a(i)&&!n().length&&!a(s)&&h(),n().length>0&&a(s)&&(w(s,!1),v++)}),ri(()=>{});var d={getSearchElement:m},_=yc(),D=R(P(_),2);bl(D,S=>r=S,()=>r);var B=R(D,2);return jt(B,{className:"wr-Search-button",type:"submit",variant:"primary",children:(S,A)=>{var E=Tt();M(k=>O(E,k),[()=>ae({key:"searchButton",lang:a(u)})]),T(S,E)},$$slots:{default:!0}}),ut("submit",_,function(...S){var A;(A=t.onSubmit)==null||A.apply(this,S)}),ut("focus",D,g),ut("blur",D,y),yl(D,n),T(e,_),lt(d)}var kc=L('<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>'),Sc=L('<div class="wr-Skeleton svelte-f6xbvk" aria-hidden="true"></div>');const Cc={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 ka(e){dt(e,Sc);var t=kc();Lt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=xc();T(n,i)}),T(e,t)}var Cc=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),Tc=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Ec=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Pc=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Ac=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Ic=L('<div class="wr-WinePopupMobile svelte-17gehox"><div class="wr-WinePopupMobile-overlay svelte-17gehox"></div> <div class="wr-WinePopupMobile-wrapper svelte-17gehox"><div class="wr-WinePopup js-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close js-WinePopupClose svelte-17gehox">&times;</button></div> <!> <!> <!></div></div></div>'),Dc=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),Rc=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Wc=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Mc=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Bc=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Nc=L('<div class="wr-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close svelte-17gehox">&times;</button></div> <!> <!> <!></div>');const Lc={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 Sa(e,t){st(t,!0),dt(e,Lc);const n=!!t.isMobile;var r=_r(),i=Je(r);{var o=c=>{var s=Ic(),u=P(s),v=R(u,2),m=P(v),h=P(m),p=P(h),g=P(p),y=R(p,2),d=R(h,2);{var _=k=>{var C=Cc(),Y=P(C);M(()=>O(Y,t.shortDescription)),T(k,C)};X(d,k=>{t.shortDescription&&k(_)})}var D=R(d,2);{var B=k=>{var C=Tc(),Y=P(C);M(()=>O(Y,t.reason)),T(k,C)},S=k=>{var C=Ec(),Y=P(C);M(()=>O(Y,t.pairing)),T(k,C)};X(D,k=>{t.reason?k(B):t.pairing&&k(S,1)})}var A=R(D,2);{var E=k=>{var C=Ac();Lt(C,21,()=>t.tags,Sn,(Y,V)=>{var ue=Pc(),de=P(ue);M(()=>O(de,a(V))),T(Y,ue)}),T(k,C)};X(A,k=>{t.tags&&t.tags.length&&k(E)})}M(()=>O(g,t.title)),an("click",u,function(...k){var C;(C=t.onClose)==null||C.apply(this,k)}),an("click",y,function(...k){var C;(C=t.onClose)==null||C.apply(this,k)}),T(c,s)},l=c=>{var s=Nc(),u=P(s),v=P(u),m=P(v),h=R(v,2),p=R(u,2);{var g=S=>{var A=Dc(),E=P(A);M(()=>O(E,t.shortDescription)),T(S,A)};X(p,S=>{t.shortDescription&&S(g)})}var y=R(p,2);{var d=S=>{var A=Rc(),E=P(A);M(()=>O(E,t.reason)),T(S,A)},_=S=>{var A=Wc(),E=P(A);M(()=>O(E,t.pairing)),T(S,A)};X(y,S=>{t.reason?S(d):t.pairing&&S(_,1)})}var D=R(y,2);{var B=S=>{var A=Bc();Lt(A,21,()=>t.tags,Sn,(E,k)=>{var C=Mc(),Y=P(C);M(()=>O(Y,a(k))),T(E,C)}),T(S,A)};X(D,S=>{t.tags&&t.tags.length&&S(B)})}M(()=>O(m,t.title)),an("click",h,function(...S){var A;(A=t.onClose)==null||A.apply(this,S)}),T(c,s)};X(i,c=>{n?c(o):c(l,!1)})}T(e,r),lt()}wr(["click"]);const zc={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"}},Oc={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"}},jc=[[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 qc(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 Fc(e){const t=(e??"").trim();return!!t&&t!=="null"&&t!=="undefined"}var Uc=Nt("<circle></circle>"),Hc=Nt('<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),Vc=Nt('<rect rx="2.5"></rect><rect height="2.5" fill="#000" opacity="0.12"></rect>',1),Gc=Nt('<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 Kc={hash:"svelte-1duzdpv",code:".wr-WineBottle.svelte-1duzdpv {display:block;height:100%;width:auto;margin:0 auto;}"};function Yc(e,t){st(t,!0),dt(e,Kc);const n=F(()=>qc(t.type)),r=F(()=>zc[a(n)]),i=F(()=>Oc[a(r).shoulder]),o=`wr-bottle-${Math.random().toString(36).slice(2,8)}`;var l=Gc(),c=P(l),s=P(c),u=P(s),v=R(u),m=R(v),h=R(c),p=R(h);{var g=A=>{var E=Hc(),k=Je(E),C=R(k),Y=R(C,4);Lt(Y,21,()=>jc,([V,ue,de])=>`${V}-${ue}`,(V,ue)=>{var de=F(()=>ts(a(ue),3));let Ie=()=>a(de)[0],me=()=>a(de)[1],it=()=>a(de)[2];var ie=Uc();M(()=>{W(ie,"cx",Ie()),W(ie,"cy",me()),W(ie,"r",it())}),T(V,ie)}),M(()=>{W(k,"fill",a(r).foil),W(C,"fill",a(r).foil)}),T(A,E)},y=A=>{var E=Vc(),k=Je(E),C=R(k);M(()=>{W(k,"x",a(i).cap.x),W(k,"y",a(i).cap.y),W(k,"width",a(i).cap.w),W(k,"height",a(i).cap.h),W(k,"fill",a(r).foil),W(C,"x",a(i).cap.x),W(C,"y",a(i).cap.y+a(i).cap.h-3),W(C,"width",a(i).cap.w)}),T(A,E)};X(p,A=>{a(n)==="sparkling"?A(g):A(y,!1)})}var d=R(p),_=R(d),D=R(_),B=R(D),S=R(B);M(()=>{W(s,"id",o),W(u,"stop-color",a(r).glass),W(v,"stop-color",a(r).glass),W(m,"stop-color",a(r).glass),W(h,"d",a(i).body),W(h,"fill",`url(#${o})`),W(d,"x",a(i).label.x),W(d,"y",a(i).label.y),W(d,"width",a(i).label.w),W(d,"height",a(i).label.h),W(_,"x",a(i).label.x+a(i).label.w*.2),W(_,"y",a(i).label.y+8),W(_,"width",a(i).label.w*.6),W(_,"fill",a(r).accent),W(D,"x",a(i).label.x+a(i).label.w*.3),W(D,"y",a(i).label.y+14),W(D,"width",a(i).label.w*.4),W(D,"fill",a(r).accent),W(B,"x",a(i).label.x+a(i).label.w*.3),W(B,"y",a(i).label.y+19),W(B,"width",a(i).label.w*.4),W(B,"fill",a(r).accent),W(S,"d",a(i).shine)}),T(e,l),lt()}var Qc=L('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),Zc=L('<div class="wr-WineTile-image wr-WineTile-bottle svelte-yk3emv"><!></div>'),Xc=L('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),Jc=L('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),$c=L('<h3 class="wr-WineTile-title svelte-yk3emv"><a class="wr-WineTile-titleLink js-WineTileAction svelte-yk3emv"> </a></h3>'),eu=L('<h3 class="wr-WineTile-title svelte-yk3emv"> </h3>'),tu=L('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),nu=L('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),ru=L('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),iu=L('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),ou=L("<div><!> <!></div>"),au=L('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <!></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article> <!>',1);const su={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 Sa(e){dt(e,Cc);var t=Sc();zt(t,4,()=>[0,1,2,3],n=>n,(n,r)=>{var i=kc();T(n,i)}),T(e,t)}var Tc=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),Ec=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Pc=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Ac=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Ic=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Dc=L('<div class="wr-WinePopupMobile svelte-17gehox"><div class="wr-WinePopupMobile-overlay svelte-17gehox"></div> <div class="wr-WinePopupMobile-wrapper svelte-17gehox"><div class="wr-WinePopup js-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close js-WinePopupClose svelte-17gehox">&times;</button></div> <!> <!> <!></div></div></div>'),Rc=L('<p class="wr-WinePopup-desc wr-WinePopup-text svelte-17gehox"> </p>'),Wc=L('<div class="wr-WinePopup-reason svelte-17gehox"> </div>'),Mc=L('<p class="wr-WinePopup-pairing wr-WinePopup-text svelte-17gehox"> </p>'),Bc=L('<span class="wr-WinePopup-tag svelte-17gehox"> </span>'),Nc=L('<div class="wr-WinePopup-tags svelte-17gehox"></div>'),Lc=L('<div class="wr-WinePopup svelte-17gehox"><div class="wr-WinePopup-header svelte-17gehox"><h2 class="wr-WinePopup-title svelte-17gehox"> </h2> <button class="wr-WinePopup-close svelte-17gehox">&times;</button></div> <!> <!> <!></div>');const zc={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 Ca(e,t){st(t,!0),dt(e,zc);const n=!!t.isMobile;var r=yr(),i=Je(r);{var o=c=>{var s=Dc(),u=P(s),v=R(u,2),m=P(v),h=P(m),p=P(h),g=P(p),y=R(p,2),d=R(h,2);{var _=k=>{var C=Tc(),Y=P(C);M(()=>O(Y,t.shortDescription)),T(k,C)};X(d,k=>{t.shortDescription&&k(_)})}var D=R(d,2);{var B=k=>{var C=Ec(),Y=P(C);M(()=>O(Y,t.reason)),T(k,C)},S=k=>{var C=Pc(),Y=P(C);M(()=>O(Y,t.pairing)),T(k,C)};X(D,k=>{t.reason?k(B):t.pairing&&k(S,1)})}var A=R(D,2);{var E=k=>{var C=Ic();zt(C,21,()=>t.tags,Cn,(Y,V)=>{var ue=Ac(),de=P(ue);M(()=>O(de,a(V))),T(Y,ue)}),T(k,C)};X(A,k=>{t.tags&&t.tags.length&&k(E)})}M(()=>O(g,t.title)),sn("click",u,function(...k){var C;(C=t.onClose)==null||C.apply(this,k)}),sn("click",y,function(...k){var C;(C=t.onClose)==null||C.apply(this,k)}),T(c,s)},l=c=>{var s=Lc(),u=P(s),v=P(u),m=P(v),h=R(v,2),p=R(u,2);{var g=S=>{var A=Rc(),E=P(A);M(()=>O(E,t.shortDescription)),T(S,A)};X(p,S=>{t.shortDescription&&S(g)})}var y=R(p,2);{var d=S=>{var A=Wc(),E=P(A);M(()=>O(E,t.reason)),T(S,A)},_=S=>{var A=Mc(),E=P(A);M(()=>O(E,t.pairing)),T(S,A)};X(y,S=>{t.reason?S(d):t.pairing&&S(_,1)})}var D=R(y,2);{var B=S=>{var A=Nc();zt(A,21,()=>t.tags,Cn,(E,k)=>{var C=Bc(),Y=P(C);M(()=>O(Y,a(k))),T(E,C)}),T(S,A)};X(D,S=>{t.tags&&t.tags.length&&S(B)})}M(()=>O(m,t.title)),sn("click",h,function(...S){var A;(A=t.onClose)==null||A.apply(this,S)}),T(c,s)};X(i,c=>{n?c(o):c(l,!1)})}T(e,r),lt()}_r(["click"]);const Oc={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"}},jc={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"}},qc=[[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 Uc(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 Fc(e){const t=(e??"").trim();return!!t&&t!=="null"&&t!=="undefined"}var Hc=Lt("<circle></circle>"),Vc=Lt('<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),Gc=Lt('<rect rx="2.5"></rect><rect height="2.5" fill="#000" opacity="0.12"></rect>',1),Kc=Lt('<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 Yc={hash:"svelte-1duzdpv",code:".wr-WineBottle.svelte-1duzdpv {display:block;height:100%;width:auto;margin:0 auto;}"};function Qc(e,t){st(t,!0),dt(e,Yc);const n=U(()=>Uc(t.type)),r=U(()=>Oc[a(n)]),i=U(()=>jc[a(r).shoulder]),o=`wr-bottle-${Math.random().toString(36).slice(2,8)}`;var l=Kc(),c=P(l),s=P(c),u=P(s),v=R(u),m=R(v),h=R(c),p=R(h);{var g=A=>{var E=Vc(),k=Je(E),C=R(k),Y=R(C,4);zt(Y,21,()=>qc,([V,ue,de])=>`${V}-${ue}`,(V,ue)=>{var de=U(()=>ns(a(ue),3));let Ie=()=>a(de)[0],me=()=>a(de)[1],it=()=>a(de)[2];var ie=Hc();M(()=>{W(ie,"cx",Ie()),W(ie,"cy",me()),W(ie,"r",it())}),T(V,ie)}),M(()=>{W(k,"fill",a(r).foil),W(C,"fill",a(r).foil)}),T(A,E)},y=A=>{var E=Gc(),k=Je(E),C=R(k);M(()=>{W(k,"x",a(i).cap.x),W(k,"y",a(i).cap.y),W(k,"width",a(i).cap.w),W(k,"height",a(i).cap.h),W(k,"fill",a(r).foil),W(C,"x",a(i).cap.x),W(C,"y",a(i).cap.y+a(i).cap.h-3),W(C,"width",a(i).cap.w)}),T(A,E)};X(p,A=>{a(n)==="sparkling"?A(g):A(y,!1)})}var d=R(p),_=R(d),D=R(_),B=R(D),S=R(B);M(()=>{W(s,"id",o),W(u,"stop-color",a(r).glass),W(v,"stop-color",a(r).glass),W(m,"stop-color",a(r).glass),W(h,"d",a(i).body),W(h,"fill",`url(#${o})`),W(d,"x",a(i).label.x),W(d,"y",a(i).label.y),W(d,"width",a(i).label.w),W(d,"height",a(i).label.h),W(_,"x",a(i).label.x+a(i).label.w*.2),W(_,"y",a(i).label.y+8),W(_,"width",a(i).label.w*.6),W(_,"fill",a(r).accent),W(D,"x",a(i).label.x+a(i).label.w*.3),W(D,"y",a(i).label.y+14),W(D,"width",a(i).label.w*.4),W(D,"fill",a(r).accent),W(B,"x",a(i).label.x+a(i).label.w*.3),W(B,"y",a(i).label.y+19),W(B,"width",a(i).label.w*.4),W(B,"fill",a(r).accent),W(S,"d",a(i).shine)}),T(e,l),lt()}var Zc=L('<img class="wr-WineTile-image svelte-yk3emv" decoding="async"/>'),Xc=L('<div class="wr-WineTile-image wr-WineTile-bottle svelte-yk3emv"><!></div>'),Jc=L('<div class="wr-WineTile-price svelte-yk3emv"> </div>'),$c=L('<div class="wr-WineTile-glass svelte-yk3emv"> </div>'),eu=L('<h3 class="wr-WineTile-title svelte-yk3emv"><a class="wr-WineTile-titleLink js-WineTileAction svelte-yk3emv"> </a></h3>'),tu=L('<h3 class="wr-WineTile-title svelte-yk3emv"> </h3>'),nu=L('<div class="wr-WineTile-params svelte-yk3emv"> </div>'),ru=L('<div class="wr-WineTilePopup-reason svelte-yk3emv"> </div>'),iu=L('<span class="wr-WineTilePopup-tag svelte-yk3emv"> </span>'),ou=L('<div class="wr-WineTilePopup-tags svelte-yk3emv"></div>'),au=L("<div><!> <!></div>"),su=L('<article><header class="wr-WineTile-header svelte-yk3emv"><!> <!> <!> <!></header> <!> <footer class="wr-WineTile-footer svelte-yk3emv"><div class="wr-WineTile-actions svelte-yk3emv"><!> <!></div></footer> <!> <!></article> <!>',1);const lu={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,9 +156,9 @@
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 lu(e,t){st(t,!0),dt(e,su);const n=4;let r=F(()=>ce.getAppLanguage()),i=G(!1),o=Te(t,"addedToCart",3,!1);const l=(x,N)=>x[N]||x[N.charAt(0).toUpperCase()+N.slice(1)],c=(x,N)=>N.map(K=>l(x,K)).filter(Boolean).join(" • ");function s(x){var N;return Jl(x,((N=ce.getCurrency)==null?void 0:N.call(ce))||"USD",a(r))}function u(x){return t.selectedWineId===x}function v(x){return!!(x.reason||x.shortDescription||x.tags)}function m(x,N){let K=(x==null?void 0:x.tags)||N.tags;return K?(Array.isArray(K)&&(K=K.join(",")),typeof K!="string"?[]:K.split(",").map(te=>te.trim()).filter(Boolean)):[]}let h=G(!1),p=F(()=>!!t.onAddToCart&&!!ta(t.wine)),g=G(!1);async function y(){var x;if(!(a(g)||o())){w(g,!0);try{await((x=t.onAddToCart)==null?void 0:x.call(t,t.wine,t.index))}finally{w(g,!1)}}}ni(()=>{const x=()=>{w(h,window.innerWidth<=768)};return x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}});var d=au(),_=Je(d),D=P(_),B=P(D);{var S=x=>{var N=Qc();M(()=>{W(N,"src",t.wine.image),W(N,"alt",t.wine.title),W(N,"loading",t.index<n?"eager":"lazy"),W(N,"fetchpriority",t.index<n?"high":"auto")}),ut("error",N,()=>w(i,!0)),T(x,N)},A=F(()=>Fc(t.wine.image)&&!a(i)),E=x=>{var N=Zc(),K=P(N);Yc(K,{get type(){return t.wine.type}}),T(x,N)};X(B,x=>{a(A)?x(S):x(E,!1)})}var k=R(B,2);{var C=x=>{var N=Xc(),K=P(N);M(te=>O(K,te),[()=>s(t.wine.total)]),T(x,N)};X(k,x=>{t.wine.total&&x(C)})}var Y=R(k,2);{var V=x=>{var N=Jc(),K=P(N);M((te,pe)=>O(K,`${te??""}${pe??""}`),[()=>ae({key:"byTheGlass",lang:a(r)}),()=>t.wine.glassPrice?` — ${s(t.wine.glassPrice)}`:""]),T(x,N)};X(Y,x=>{t.wine.byTheGlass&&x(V)})}var ue=R(Y,2);{var de=x=>{var N=$c(),K=P(N),te=P(K);M(()=>{W(K,"href",t.wine.url),O(te,t.wine.title)}),T(x,N)},Ie=x=>{var N=eu(),K=P(N);M(()=>O(K,t.wine.title)),T(x,N)};X(ue,x=>{a(p)&&t.wine.url?x(de):x(Ie,!1)})}var me=R(D,2);{var it=x=>{var N=tu(),K=P(N);M(te=>O(K,te),[()=>c(t.wine,["type","country","region","grape"])]),T(x,N)},ie=F(()=>c(t.wine,["type","country","region","grape"]));X(me,x=>{a(ie)&&x(it)})}var Ut=R(me,2),ze=P(Ut),De=P(ze);{var Ht=x=>{{let N=F(()=>o()?"outlined":"primary");Ot(x,{handleClick:y,get variant(){return a(N)},className:"wr-WineTile-action wr-WineTile-action--cart js-WineTileAction",children:(K,te)=>{var pe=Ct();M(oe=>O(pe,oe),[()=>ae({key:o()?"addedToCart":"addToCart",lang:a(r)})]),T(K,pe)},$$slots:{default:!0}})}},Pr=x=>{Ot(x,{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:(N,K)=>{var te=Ct();M(pe=>O(te,pe),[()=>ae({key:"wineDetails.buy",lang:a(r)})]),T(N,te)},$$slots:{default:!0}})},xi=x=>{Ot(x,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(N,K)=>{var te=Ct();M(pe=>O(te,pe),[()=>ae({key:"moreInfo",lang:a(r)})]),T(N,te)},$$slots:{default:!0}})};X(De,x=>{a(p)?x(Ht):t.wine.url?x(Pr,1):x(xi,!1)})}var ki=R(De,2);{var Si=x=>{Ot(x,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(N,K)=>{var te=Ct();M(pe=>O(te,pe),[()=>ae({key:"similarWines",lang:a(r)})]),T(N,te)},$$slots:{default:!0}})};X(ki,x=>{t.onSimilarClick&&x(Si)})}var zn=R(Ut,2);{var Ci=x=>{{let N=F(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.shortDescription)||t.wine.shortDescription}),K=F(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.reason)||t.wine.reason}),te=F(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.pairingRecommendation)||t.wine.pairingRecommendation}),pe=F(()=>m(t.translatedPopup,t.wine));Sa(x,{get title(){return t.wine.title},get shortDescription(){return a(N)},get reason(){return a(K)},get pairing(){return a(te)},get tags(){return a(pe)},get onClose(){return t.onPopupClose},isMobile:!1})}},Ti=F(()=>u(t.wine.id)&&!a(h));X(zn,x=>{a(Ti)&&x(Ci)})}var Ei=R(zn,2);{var Pi=x=>{var N=ou(),K=P(N);{var te=Pt=>{var Oe=nu(),ot=P(Oe);M(()=>{var hn,Vt;return O(ot,((hn=t.translatedPopup)==null?void 0:hn.reason)||((Vt=t.translatedPopup)==null?void 0:Vt.shortDescription)||t.wine.reason||t.wine.shortDescription)}),T(Pt,Oe)};X(K,Pt=>{var Oe,ot;((Oe=t.translatedPopup)!=null&&Oe.reason||(ot=t.translatedPopup)!=null&&ot.shortDescription||t.wine.reason||t.wine.shortDescription)&&Pt(te)})}var pe=R(K,2);{var oe=Pt=>{var Oe=iu();Lt(Oe,21,()=>m(t.translatedPopup,t.wine),Sn,(ot,hn)=>{var Vt=ru(),Ar=P(Vt);M(()=>O(Ar,a(hn))),T(ot,Vt)}),T(Pt,Oe)};X(pe,Pt=>{var Oe,ot;((Oe=t.translatedPopup)!=null&&Oe.tags||(ot=t.translatedPopup)!=null&&ot.Tags||t.wine.tags)&&Pt(oe)})}M(()=>ft(N,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),T(x,N)},Ai=F(()=>v(t.wine));X(Ei,x=>{a(Ai)&&x(Pi)})}var Ii=R(_,2);{var Di=x=>{{let N=F(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.shortDescription)||t.wine.shortDescription}),K=F(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.reason)||t.wine.reason}),te=F(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.pairingRecommendation)||t.wine.pairingRecommendation}),pe=F(()=>m(t.translatedPopup,t.wine));Sa(x,{get title(){return t.wine.title},get shortDescription(){return a(N)},get reason(){return a(K)},get pairing(){return a(te)},get tags(){return a(pe)},get onClose(){return t.onPopupClose},isMobile:!0})}},Ri=F(()=>u(t.wine.id)&&a(h));X(Ii,x=>{a(Ri)&&x(Di)})}M(()=>ft(_,1,`wr-WineTile ${t.isAnimating?"ww-slide-up":""}`,"svelte-yk3emv")),ut("mouseenter",_,()=>t.onTileEnter(t.wine)),ut("mouseleave",_,()=>t.onTileLeave(t.wine)),an("click",_,x=>t.onTileClick(x,t.wine)),T(e,d),lt()}wr(["click"]);var cu=L('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),uu=L('<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 du={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 cu(e,t){st(t,!0),dt(e,lu);const n=4;let r=U(()=>ce.getAppLanguage()),i=G(!1),o=Te(t,"addedToCart",3,!1);const l=(x,N)=>x[N]||x[N.charAt(0).toUpperCase()+N.slice(1)],c=(x,N)=>N.map(K=>l(x,K)).filter(Boolean).join(" • ");function s(x){var N;return $l(x,((N=ce.getCurrency)==null?void 0:N.call(ce))||"USD",a(r))}function u(x){return t.selectedWineId===x}function v(x){return!!(x.reason||x.shortDescription||x.tags)}function m(x,N){let K=(x==null?void 0:x.tags)||N.tags;return K?(Array.isArray(K)&&(K=K.join(",")),typeof K!="string"?[]:K.split(",").map(te=>te.trim()).filter(Boolean)):[]}let h=G(!1),p=U(()=>!!t.onAddToCart&&!!na(t.wine)),g=G(!1);async function y(){var x;if(!(a(g)||o())){w(g,!0);try{await((x=t.onAddToCart)==null?void 0:x.call(t,t.wine,t.index))}finally{w(g,!1)}}}ri(()=>{const x=()=>{w(h,window.innerWidth<=768)};return x(),window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}});var d=su(),_=Je(d),D=P(_),B=P(D);{var S=x=>{var N=Zc();M(()=>{W(N,"src",t.wine.image),W(N,"alt",t.wine.title),W(N,"loading",t.index<n?"eager":"lazy"),W(N,"fetchpriority",t.index<n?"high":"auto")}),ut("error",N,()=>w(i,!0)),T(x,N)},A=U(()=>Fc(t.wine.image)&&!a(i)),E=x=>{var N=Xc(),K=P(N);Qc(K,{get type(){return t.wine.type}}),T(x,N)};X(B,x=>{a(A)?x(S):x(E,!1)})}var k=R(B,2);{var C=x=>{var N=Jc(),K=P(N);M(te=>O(K,te),[()=>s(t.wine.total)]),T(x,N)};X(k,x=>{t.wine.total&&x(C)})}var Y=R(k,2);{var V=x=>{var N=$c(),K=P(N);M((te,pe)=>O(K,`${te??""}${pe??""}`),[()=>ae({key:"byTheGlass",lang:a(r)}),()=>t.wine.glassPrice?` — ${s(t.wine.glassPrice)}`:""]),T(x,N)};X(Y,x=>{t.wine.byTheGlass&&x(V)})}var ue=R(Y,2);{var de=x=>{var N=eu(),K=P(N),te=P(K);M(()=>{W(K,"href",t.wine.url),O(te,t.wine.title)}),T(x,N)},Ie=x=>{var N=tu(),K=P(N);M(()=>O(K,t.wine.title)),T(x,N)};X(ue,x=>{a(p)&&t.wine.url?x(de):x(Ie,!1)})}var me=R(D,2);{var it=x=>{var N=nu(),K=P(N);M(te=>O(K,te),[()=>c(t.wine,["type","country","region","grape"])]),T(x,N)},ie=U(()=>c(t.wine,["type","country","region","grape"]));X(me,x=>{a(ie)&&x(it)})}var Ht=R(me,2),ze=P(Ht),De=P(ze);{var Vt=x=>{{let N=U(()=>o()?"outlined":"primary");jt(x,{handleClick:y,get variant(){return a(N)},className:"wr-WineTile-action wr-WineTile-action--cart js-WineTileAction",children:(K,te)=>{var pe=Tt();M(oe=>O(pe,oe),[()=>ae({key:o()?"addedToCart":"addToCart",lang:a(r)})]),T(K,pe)},$$slots:{default:!0}})}},Ar=x=>{jt(x,{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:(N,K)=>{var te=Tt();M(pe=>O(te,pe),[()=>ae({key:"wineDetails.buy",lang:a(r)})]),T(N,te)},$$slots:{default:!0}})},ki=x=>{jt(x,{handleClick:()=>t.onBuyClick(t.wine,t.index),variant:"outlined",className:"wr-WineTile-action wr-WineTile-action--button js-WineTileAction",children:(N,K)=>{var te=Tt();M(pe=>O(te,pe),[()=>ae({key:"moreInfo",lang:a(r)})]),T(N,te)},$$slots:{default:!0}})};X(De,x=>{a(p)?x(Vt):t.wine.url?x(Ar,1):x(ki,!1)})}var Si=R(De,2);{var Ci=x=>{jt(x,{handleClick:()=>t.onSimilarClick(t.wine),variant:"text",className:"wr-WineTile-action wr-WineTile-action--similar js-WineTileAction",children:(N,K)=>{var te=Tt();M(pe=>O(te,pe),[()=>ae({key:"similarWines",lang:a(r)})]),T(N,te)},$$slots:{default:!0}})};X(Si,x=>{t.onSimilarClick&&x(Ci)})}var On=R(Ht,2);{var Ti=x=>{{let N=U(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.shortDescription)||t.wine.shortDescription}),K=U(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.reason)||t.wine.reason}),te=U(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.pairingRecommendation)||t.wine.pairingRecommendation}),pe=U(()=>m(t.translatedPopup,t.wine));Ca(x,{get title(){return t.wine.title},get shortDescription(){return a(N)},get reason(){return a(K)},get pairing(){return a(te)},get tags(){return a(pe)},get onClose(){return t.onPopupClose},isMobile:!1})}},Ei=U(()=>u(t.wine.id)&&!a(h));X(On,x=>{a(Ei)&&x(Ti)})}var Pi=R(On,2);{var Ai=x=>{var N=au(),K=P(N);{var te=At=>{var Oe=ru(),ot=P(Oe);M(()=>{var vn,Gt;return O(ot,((vn=t.translatedPopup)==null?void 0:vn.reason)||((Gt=t.translatedPopup)==null?void 0:Gt.shortDescription)||t.wine.reason||t.wine.shortDescription)}),T(At,Oe)};X(K,At=>{var Oe,ot;((Oe=t.translatedPopup)!=null&&Oe.reason||(ot=t.translatedPopup)!=null&&ot.shortDescription||t.wine.reason||t.wine.shortDescription)&&At(te)})}var pe=R(K,2);{var oe=At=>{var Oe=ou();zt(Oe,21,()=>m(t.translatedPopup,t.wine),Cn,(ot,vn)=>{var Gt=iu(),Ir=P(Gt);M(()=>O(Ir,a(vn))),T(ot,Gt)}),T(At,Oe)};X(pe,At=>{var Oe,ot;((Oe=t.translatedPopup)!=null&&Oe.tags||(ot=t.translatedPopup)!=null&&ot.Tags||t.wine.tags)&&At(oe)})}M(()=>ft(N,1,`wr-WineTilePopup ${t.hoveredWineId===t.wine.id?"slide-in visible":""}`,"svelte-yk3emv")),T(x,N)},Ii=U(()=>v(t.wine));X(Pi,x=>{a(Ii)&&x(Ai)})}var Di=R(_,2);{var Ri=x=>{{let N=U(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.shortDescription)||t.wine.shortDescription}),K=U(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.reason)||t.wine.reason}),te=U(()=>{var oe;return((oe=t.translatedPopup)==null?void 0:oe.pairingRecommendation)||t.wine.pairingRecommendation}),pe=U(()=>m(t.translatedPopup,t.wine));Ca(x,{get title(){return t.wine.title},get shortDescription(){return a(N)},get reason(){return a(K)},get pairing(){return a(te)},get tags(){return a(pe)},get onClose(){return t.onPopupClose},isMobile:!0})}},Wi=U(()=>u(t.wine.id)&&a(h));X(Di,x=>{a(Wi)&&x(Ri)})}M(()=>ft(_,1,`wr-WineTile ${t.isAnimating?"ww-slide-up":""}`,"svelte-yk3emv")),ut("mouseenter",_,()=>t.onTileEnter(t.wine)),ut("mouseleave",_,()=>t.onTileLeave(t.wine)),sn("click",_,x=>t.onTileClick(x,t.wine)),T(e,d),lt()}_r(["click"]);var uu=L('<a class="wr-Consent-link svelte-dqnzo8" target="_blank" rel="noopener noreferrer"> </a>'),du=L('<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 fu={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 fu(e,t){var h;st(t,!0),dt(e,du);const n=(h=window==null?void 0:window.wineaterData)==null?void 0:h.PRIVACY_URL,r=p=>ae({key:p,lang:t.lang});var i=uu(),o=P(i),l=P(o),c=R(l);{var s=p=>{var g=cu(),y=P(g);M(d=>{W(g,"href",n),O(y,d)},[()=>r("consentPrivacy")]),T(p,g)};X(c,p=>{n&&p(s)})}var u=R(o,2),v=P(u);Ot(v,{variant:"outlined",handleClick:()=>ea("denied"),children:(p,g)=>{var y=Ct();M(d=>O(y,d),[()=>r("consentDecline")]),T(p,y)},$$slots:{default:!0}});var m=R(v,2);Ot(m,{variant:"primary",handleClick:()=>ea("granted"),children:(p,g)=>{var y=Ct();M(d=>O(y,d),[()=>r("consentAccept")]),T(p,y)},$$slots:{default:!0}}),M(p=>O(l,`${p??""} `),[()=>r("consentText")]),T(e,i),lt()}const hu=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function _i(e,t,n=!1){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}function vu(){document.querySelector('link[rel="preconnect"][href="https://fonts.googleapis.com"]')||(_i("preconnect","https://fonts.googleapis.com"),_i("preconnect","https://fonts.gstatic.com",!0))}function pu(e){if(!e)return"";const t="custom-ui-config-style";if(document.getElementById(t))return;const n=e.replace(hu,(i,o)=>(_i("stylesheet",o),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}const Ca="_wineater_session";function gu(e,t){fetch(`${e}cart/update.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({attributes:{[Ca]:t}}),keepalive:!0}).catch(()=>{})}function mu(){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 wu(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 o=new DOMParser().parseFromString(e.sections["cart-icon-bubble"],"text/html");r.innerHTML=(o.querySelector(".shopify-section")||o.body).innerHTML}document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}async function _u(e){var r,i,o;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(((o=n.userErrors[0])==null?void 0:o.message)||"cart rejected the line");if(typeof t.openCart=="function")try{await t.openCart()}catch{}return!0}async function yu(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:mu(),sections_url:window.location.pathname})});return n.ok?(wu(await n.json().catch(()=>null)),!0):!1}function bu(){const e=document.querySelector("cart-drawer, cart-notification");return!!e&&typeof e.renderContents=="function"}async function xu(e,t){const n=[["actions",()=>_u(e)],["ajax",()=>yu(e,t.root)]];bu()&&n.reverse();for(const[r,i]of n)try{if(await i())return gu(t.root,t.sessionId),{ok:!0,via:r}}catch(o){console.debug(`[wineater] cart ${r} failed:`,o==null?void 0:o.message)}return window.location.href=`${t.root}cart/${e}:1?storefront=true&attributes[${Ca}]=${encodeURIComponent(t.sessionId)}`,{ok:!1,via:"permalink"}}var ku=L('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),Su=L('<p class="wr-App-resting svelte-1n46o8q" role="status"> </p>'),Cu=L('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),Tu=L('<div class="wr-App-showMore svelte-1n46o8q"><!></div>'),Eu=L('<div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),Pu=L('<div id="wr-Custom"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!> <!></div> <!> <!></div>'),Au=L('<div aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const Iu={hash:"svelte-1n46o8q",code:`
161
+ }`};function hu(e,t){var h;st(t,!0),dt(e,fu);const n=(h=window==null?void 0:window.wineaterData)==null?void 0:h.PRIVACY_URL,r=p=>ae({key:p,lang:t.lang});var i=du(),o=P(i),l=P(o),c=R(l);{var s=p=>{var g=uu(),y=P(g);M(d=>{W(g,"href",n),O(y,d)},[()=>r("consentPrivacy")]),T(p,g)};X(c,p=>{n&&p(s)})}var u=R(o,2),v=P(u);jt(v,{variant:"outlined",handleClick:()=>ta("denied"),children:(p,g)=>{var y=Tt();M(d=>O(y,d),[()=>r("consentDecline")]),T(p,y)},$$slots:{default:!0}});var m=R(v,2);jt(m,{variant:"primary",handleClick:()=>ta("granted"),children:(p,g)=>{var y=Tt();M(d=>O(y,d),[()=>r("consentAccept")]),T(p,y)},$$slots:{default:!0}}),M(p=>O(l,`${p??""} `),[()=>r("consentText")]),T(e,i),lt()}const vu=/@import\s+url\(\s*['"]?([^'")]+)['"]?\s*\)\s*;?/g;function yi(e,t,n=!1){const r=document.createElement("link");r.rel=e,r.href=t,n&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}function pu(){document.querySelector('link[rel="preconnect"][href="https://fonts.googleapis.com"]')||(yi("preconnect","https://fonts.googleapis.com"),yi("preconnect","https://fonts.gstatic.com",!0))}function gu(e){if(!e)return"";const t="custom-ui-config-style";if(document.getElementById(t))return;const n=e.replace(vu,(i,o)=>(yi("stylesheet",o),"")),r=document.createElement("style");return r.id=t,r.innerHTML=n,document.head.appendChild(r),t}const Ta="_wineater_session";function mu(e,t){fetch(`${e}cart/update.js`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({attributes:{[Ta]:t}}),keepalive:!0}).catch(()=>{})}function wu(){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 _u(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 o=new DOMParser().parseFromString(e.sections["cart-icon-bubble"],"text/html");r.innerHTML=(o.querySelector(".shopify-section")||o.body).innerHTML}document.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0}))}async function yu(e){var r,i,o;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(((o=n.userErrors[0])==null?void 0:o.message)||"cart rejected the line");if(typeof t.openCart=="function")try{await t.openCart()}catch{}return!0}async function bu(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:wu(),sections_url:window.location.pathname})});return n.ok?(_u(await n.json().catch(()=>null)),!0):!1}function xu(){const e=document.querySelector("cart-drawer, cart-notification");return!!e&&typeof e.renderContents=="function"}async function ku(e,t){const n=[["actions",()=>yu(e)],["ajax",()=>bu(e,t.root)]];xu()&&n.reverse();for(const[r,i]of n)try{if(await i())return mu(t.root,t.sessionId),{ok:!0,via:r}}catch(o){console.debug(`[wineater] cart ${r} failed:`,o==null?void 0:o.message)}return window.location.href=`${t.root}cart/${e}:1?storefront=true&attributes[${Ta}]=${encodeURIComponent(t.sessionId)}`,{ok:!1,via:"permalink"}}var Su=L('<div class="wr-App-picture svelte-1n46o8q"><img class="wr-App-logo svelte-1n46o8q" alt=""/></div>'),Cu=L('<p class="wr-App-resting svelte-1n46o8q" role="status"> </p>'),Tu=L('<div class="wr-App-error svelte-1n46o8q"><p> </p></div>'),Eu=L('<div class="wr-App-showMore svelte-1n46o8q"><!></div>'),Pu=L('<div class="wr-App-placeholder svelte-1n46o8q"></div> <!>',1),Au=L('<div id="wr-Custom"><!> <!> <!> <div class="wr-App-content svelte-1n46o8q"><!> <!></div> <!> <!></div>'),Iu=L('<div aria-busy="true"><div class="wr-App-loadingTop svelte-1n46o8q"></div> <!></div>');const Du={hash:"svelte-1n46o8q",code:`
162
162
  /* ===================== 1) CSS Variables ===================== */:root {--wineater-corp-color: #0044ff;
163
163
  /* --wr-brand-color is set dynamically from uiConfig.brandColor */--wr-brand-color: #7b2beb; /* fallback value */}
164
164
 
@@ -173,4 +173,4 @@
173
173
 
174
174
  /* ===================== 13) Mobile Styles ===================== */
175
175
  @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);}
176
- }`};function Du(e,t){var hn,Vt,Ar,Da,Ir,Ra,Wa;st(t,!0),dt(e,Iu);const n=et();function r(){var b;ui("chatbotToken",((b=window.wineaterData)==null?void 0:b.CLIENT_TOKEN)||i,365)}const i="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n||(r(),vu());const o=6*60*60*1e3,l=60*60*1e3,c=`${pi}:instant-profile`,s=b=>`${pi}:instant${b?`:${b}`:""}`,u=((hn=window==null?void 0:window.wineaterData)==null?void 0:hn.WIDGET_TYPE)||"store",v=((Vt=window==null?void 0:window.wineaterData)==null?void 0:Vt.COUNTRY_CODE)||null;(Ar=window==null?void 0:window.wineaterData)!=null&&Ar.WIDGET_WRAPPER;let m=G(!1),h=G(!1),p=!1,g=G(!1),y=G(!1),d=G(We([])),_=G(null),D=G(""),B=G(null),S=G(!1),A=G(null),E=G(We([])),k=G(""),C=G(!1),Y=G(We([])),V=null,ue=G(We([])),de=G(!1);function Ie(b,I){b!=null&&b.length&&sn({type:"shown",query_id:V??void 0,sku_ids:b.map(U=>U.id),text:I||void 0})}let me=F(()=>ce.getAppLanguage()),it=F(()=>ce.getStoreLanguage()),ie=F(()=>ce.getStoreId()),Ut=F(()=>ce.isInitialized()),ze=F(()=>ce.getUiConfig()),De=F(()=>ce.isSearchAvailable());function Ht(){w(B,ae({key:"errorMessage",lang:a(me)}),!0)}const Pr=()=>w(B,null);async function xi(b){const I=va(u,a(me),a(it));if(!I||!b.length)return b.map(()=>({}));const U=await tt.getWineTranslations(b.map(ne=>ne.id),I);return Fl(b,U)}bn(()=>{tt.setVisitorLanguage(va(u,a(me),a(it)))});async function ki(b){const I=gi(c,2592e6),U=gi(s(I),I?l:o),ne=!!(U!=null&&U.length);ne?w(d,U,!0):w(g,!0);try{const{wines:je,profileHash:At}=await tt.getInstantRecommendations();je.length>0&&(mi(s(At),je),mi(c,At)),!ne&&!p&&w(d,je,!0)}catch(je){console.error("[wineater] instant recommendations error:",je),!ne&&!p&&(await b,Ht())}finally{p||w(g,!1)}}async function Si(){w(de,!0),ce.setSearchAvailable(!1);try{const{wines:b}=await tt.getInstantRecommendations();w(d,b,!0),w(E,[],!0),w(C,!1)}catch(b){console.error("[wineater] instant recommendations error:",b),w(d,[],!0)}}function zn(b=220){return!a(d)||a(d).length===0?Promise.resolve():(w(S,!0),new Promise(I=>{setTimeout(()=>{I()},b)}))}async function Ci(b){b.preventDefault(),p=!0;let I="",U;try{w(g,!0),Pr(),I=a(D).trim()+";",w(k,I,!0),V=ua(),U=V;try{Ee(Pe.SEARCH_PERFORMED,a(ie),{query:I})}catch(we){console.error("Error tracking search event:",we)}let ne=!1,je=!1,At=null;const On=we=>{if(!we||we.length===0){w(d,[],!0),w(E,[],!0),w(B,ae({key:"noResultsMessage",lang:a(me)}),!0),Ee(Pe.NO_RESULTS_FOUND,a(ie),{query:I});return}w(d,we,!0),w(g,!1),!je&&(je=!0,w(C,vi==="2"&&!n&&we.length>=4,!0),Ie(we,I),Ee(Pe.SEARCH_RESULTS_DISPLAYED,a(ie),{results_count:we.length,results:we,query:I}))},Dr=we=>{U===V&&(ne?On(we):At=we)},ar=tt.searchStream(I,V,Dr);ar.catch(()=>{}),await zn(220),w(d,[],!0),w(S,!1),w(C,!1),w(Y,[],!0),ne=!0,At&&On(At);const jn=await ar;if(U!==V)return;if(je&&jn.length===a(d).length&&jn.every((we,mt)=>{var vn;return we.id===((vn=a(d)[mt])==null?void 0:vn.id)})){const we=new Map(jn.map(mt=>[mt.id,mt]));w(d,a(d).map(mt=>{var vn;return{...mt,reason:((vn=we.get(mt.id))==null?void 0:vn.reason)??mt.reason}}),!0)}else On(jn)}catch(ne){if(U!==V)return;if(ne instanceof na){await Si();return}w(d,[],!0),console.error("[wineater] search error:",ne),Ee(Pe.ERROR_OCCURRED,a(ie),{error_message:ne==null?void 0:ne.message,query:I}),Ht()}finally{U===V&&w(g,!1)}}async function Ti(){if(a(y)||!a(C))return;p=!0;const b=a(d);try{w(y,!0),w(g,!0),w(Y,[...new Set([...a(Y),...a(d).map(je=>je.id)])],!0);const I=tt.getMoreWineRecommendations(a(k),a(Y));I.catch(()=>{}),await zn(220),w(d,[],!0),w(S,!1);const{recommendations:U,hasMore:ne}=await I;sn({type:"more",query_id:V??void 0,text:a(k)||void 0}),Ie(U,a(k)),Ee(Pe.SHOW_MORE_CLICKED,a(ie),{query:a(k),results_count:U.length}),w(d,U.length>0?U:b,!0),w(C,ne,!0)}catch(I){console.error("[wineater] try again error:",I),w(d,b,!0),w(C,!1)}finally{w(y,!1),w(g,!1)}}async function Ei(b){p=!0;try{w(g,!0),Pr(),Ee(Pe.SIMILAR_WINES_CLICKED,a(ie),{wine_id:b.id,wine_title:b.title}),sn({type:"similar",query_id:V??void 0,sku_ids:[b.id]}),V=ua();const I=tt.getSimilarWines(b.id);I.catch(()=>{}),await zn(220),w(d,[],!0),w(S,!1),w(C,!1),w(_,null);const U=await I;w(D,b.title,!0),w(k,""),!U||U.length===0?(w(d,[],!0),w(E,[],!0),w(B,ae({key:"noResultsMessage",lang:a(me)}),!0)):(w(d,U,!0),Ie(U,""))}catch(I){w(d,[],!0),console.error("[wineater] similar wines error:",I),Ht()}finally{w(g,!1)}}bn(async()=>{if(!a(d)||a(d).length===0){w(E,[],!0);return}const b=a(d);try{const I=await xi(a(d));a(d)===b&&a(d).length>0&&w(E,I,!0)}catch(I){console.error("translatePopupContent failed",I)}});function Pi(b,I){a(_)&&a(_)!==b.id&&w(_,null),w(_,b.id,!0),sn({type:"click",query_id:V??void 0,sku_ids:[b.id],position:I}),Ee(Pe.WINE_DETAILS_VIEWED,a(ie),{wine_id:b.id,wine_title:b.title,is_mobile:window.innerWidth<=768})}function Ai(b,I){sn({type:"buy_click",query_id:V??void 0,sku_ids:[b.id],position:I}),Ee(Pe.BUY_BUTTON_CLICKED,a(ie),{wine_id:b.id,wine_title:b.title,wine_url:b.url,is_mobile:window.innerWidth<=768})}async function Ii(b,I){const U=ta(b);if(!n||!U)return;sn({type:"add_to_cart",query_id:V??void 0,sku_ids:[b.id],position:I}),Ee(Pe.BUY_BUTTON_CLICKED,a(ie),{action:"add_to_cart",wine_id:b.id,wine_title:b.title,wine_url:b.url,variant_id:U,query:a(k)||void 0,is_mobile:window.innerWidth<=768});const ne=await xu(U,{root:n.root,sessionId:ra()});ne.ok&&(w(ue,[...a(ue),b.id],!0),window.dispatchEvent(new CustomEvent("wineater:added-to-cart",{detail:{variantId:U,via:ne.via}})))}function Di(){const b=a(d).find(I=>I.id===a(_));Ee(Pe.WINE_DETAILS_CLOSED,a(ie),{wine_id:a(_),wine_title:b.title}),w(_,null)}function Ri(b){return!!(b.reason||b.shortDescription||b.tags)}function x(b){u==="store"&&Ri(b)&&(w(A,b.id,!0),Ee(Pe.WINE_CARD_HOVER,a(ie),{wine_id:b.id,wine_title:b.title}))}function N(b){u==="store"&&a(A)===b.id&&w(A,null)}function K(b,I){b.target.closest(".js-WineTileAction")||b.target.closest(".js-WinePopupClose")||(sn({type:"click",query_id:V??void 0,sku_ids:[I.id],position:a(d).findIndex(U=>U.id===I.id)}),Ee(Pe.WINE_CARD_CLICK,a(ie),{wine_id:I.id,wine_title:I.title}))}function te(b){var ne;const I=((ne=b.composedPath)==null?void 0:ne.call(b)[0])??b.target;if(!(I!=null&&I.closest))return;I.closest(".js-WinePopup")||I.closest(".js-WineTileAction")||w(_,null)}const pe=((Wa=(Ra=(Ir=(Da=window==null?void 0:window.wineaterData)==null?void 0:Da.mountTarget)==null?void 0:Ir.getRootNode)==null?void 0:Ra.call(Ir))==null?void 0:Wa.host)||document.documentElement;bn(()=>{var b,I;(b=a(ze))!=null&&b.brandColor&&pe.style.setProperty("--wr-brand-color",a(ze).brandColor),(I=a(ze))!=null&&I.wineaterColor&&pe.style.setProperty("--wr-wineater-color",a(ze).wineaterColor)}),ni(()=>(document.addEventListener("click",te),(async()=>{const b=ce.initializeStore();if(ki(b),await b,!a(Ut)){w(h,!0);return}a(ze).customCss&&pu(a(ze).customCss),w(m,!0),n&&!a(De)&&w(de,!0),Ee(Pe.WIDGET_INITIALIZED,a(ie))})(),()=>{document.removeEventListener("click",te)}));var oe=_r(),Pt=Je(oe);{var Oe=b=>{var I=Pu();let U;var ne=P(I);{var je=re=>{var at=ku(),Gt=P(at);M(()=>W(Gt,"src",a(ze).logoUrl)),T(re,at)};X(ne,re=>{a(ze).logoUrl&&re(je)})}var At=R(ne,2);uc(At,{});var On=R(At,2);bc(On,{onSubmit:Ci,get initialized(){return a(m)},get searchQuery(){return a(D)},set searchQuery(re){w(D,re,!0)}});var Dr=R(On,2),ar=P(Dr);{var jn=re=>{var at=Su(),Gt=P(at);M(sr=>O(Gt,sr),[()=>ae({key:"sommelierResting",lang:a(me)})]),T(re,at)};X(ar,re=>{a(de)&&!a(B)&&re(jn)})}var Ma=R(ar,2);{var we=re=>{var at=Cu(),Gt=P(at),sr=P(Gt);M(()=>O(sr,a(B))),T(re,at)},mt=re=>{var at=Eu(),Gt=Je(at);Lt(Gt,21,()=>a(d),Sn,(lr,cr,Rr)=>{{let Wi=F(()=>n?Ii:void 0),Na=F(()=>a(ue).includes(a(cr).id)),Wr=F(()=>n?void 0:Ei);lu(lr,{get wine(){return a(cr)},index:Rr,get hoveredWineId(){return a(A)},get selectedWineId(){return a(_)},get isAnimating(){return a(S)},get translatedPopup(){return a(E)[Rr]},onBuyClick:Pi,onBuyLinkClick:Ai,get onAddToCart(){return a(Wi)},get addedToCart(){return a(Na)},onPopupClose:Di,get onSimilarClick(){return a(Wr)},onTileEnter:x,onTileLeave:N,onTileClick:K})}});var sr=R(Gt,2);{var Lu=lr=>{var cr=Tu(),Rr=P(cr);Ot(Rr,{handleClick:Ti,variant:"outlined",children:(Wi,Na)=>{var Wr=Ct();M(zu=>O(Wr,zu),[()=>ae({key:"tryAgain",lang:a(me)})]),T(Wi,Wr)},$$slots:{default:!0}}),T(lr,cr)};X(sr,lr=>{a(C)&&lr(Lu)})}T(re,at)},vn=re=>{ka(re)};X(Ma,re=>{a(B)?re(we):a(d)&&a(d).length>0?re(mt,1):a(g)&&re(vn,2)})}var Ba=R(Dr,2);{var Wu=re=>{fu(re,{get lang(){return a(me)}})},Mu=F(()=>Tl());X(Ba,re=>{a(Mu)&&re(Wu)})}var Bu=R(Ba,2);{var Nu=re=>{pc(re,{get countryCode(){return v}})};X(Bu,re=>{n||re(Nu)})}M(()=>U=ft(I,1,"wr-App svelte-1n46o8q",null,U,{"wr-App--embedded":!!n})),T(b,I)},ot=b=>{var I=Au();let U;var ne=R(P(I),2);ka(ne),M(()=>U=ft(I,1,"wr-App wr-App--loading svelte-1n46o8q",null,U,{"wr-App--embedded":!!n})),T(b,I)};X(Pt,b=>{a(Ut)?b(Oe):a(h)||b(ot,1)})}T(e,oe),lt()}const Ru=((Ia=window.wineaterData)==null?void 0:Ia.mountTarget)||document.getElementById("wineater-widget-conteiner");return il(Du,{target:Ru})});
176
+ }`};function Ru(e,t){var vn,Gt,Ir,Ra,Dr,Wa,Ma;st(t,!0),dt(e,Du);const n=et();function r(){var b;di("chatbotToken",((b=window.wineaterData)==null?void 0:b.CLIENT_TOKEN)||i,365)}const i="HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";n||(r(),pu());const o=6*60*60*1e3,l=60*60*1e3,c=`${gi}:instant-profile`,s=b=>`${gi}:instant${b?`:${b}`:""}`,u=((vn=window==null?void 0:window.wineaterData)==null?void 0:vn.WIDGET_TYPE)||"store",v=((Gt=window==null?void 0:window.wineaterData)==null?void 0:Gt.COUNTRY_CODE)||null;(Ir=window==null?void 0:window.wineaterData)!=null&&Ir.WIDGET_WRAPPER;let m=G(!1),h=G(!1),p=!1,g=G(!1),y=G(!1),d=G(We([])),_=G(null),D=G(""),B=G(null),S=G(!1),A=G(null),E=G(We([])),k=G(""),C=G(!1),Y=G(We([])),V=null,ue=G(We([])),de=G(!1);function Ie(b,I){b!=null&&b.length&&ln({type:"shown",query_id:V??void 0,sku_ids:b.map(F=>F.id),text:I||void 0})}let me=U(()=>ce.getAppLanguage()),it=U(()=>ce.getStoreLanguage()),ie=U(()=>ce.getStoreId()),Ht=U(()=>ce.isInitialized()),ze=U(()=>ce.getUiConfig()),De=U(()=>ce.isSearchAvailable());function Vt(){w(B,ae({key:"errorMessage",lang:a(me)}),!0)}const Ar=()=>w(B,null);async function ki(b){const I=pa(u,a(me),a(it));if(!I||!b.length)return b.map(()=>({}));const F=await tt.getWineTranslations(b.map(ne=>ne.id),I);return Fl(b,F)}xn(()=>{tt.setVisitorLanguage(pa(u,a(me),a(it)))});async function Si(b){const I=mi(c,2592e6),F=mi(s(I),I?l:o),ne=!!(F!=null&&F.length);ne?w(d,F,!0):w(g,!0);try{const{wines:je,profileHash:It}=await tt.getInstantRecommendations();je.length>0&&(wi(s(It),je),wi(c,It)),!ne&&!p&&w(d,je,!0)}catch(je){console.error("[wineater] instant recommendations error:",je),!ne&&!p&&(await b,Vt())}finally{p||w(g,!1)}}async function Ci(){w(de,!0),ce.setSearchAvailable(!1);try{const{wines:b}=await tt.getInstantRecommendations();w(d,b,!0),w(E,[],!0),w(C,!1)}catch(b){console.error("[wineater] instant recommendations error:",b),w(d,[],!0)}}function On(b=220){return!a(d)||a(d).length===0?Promise.resolve():(w(S,!0),new Promise(I=>{setTimeout(()=>{I()},b)}))}async function Ti(b){b.preventDefault(),p=!0;let I="",F;try{w(g,!0),Ar(),I=a(D).trim()+";",w(k,I,!0),V=da(),F=V;try{Ee(Pe.SEARCH_PERFORMED,a(ie),{query:I})}catch(we){console.error("Error tracking search event:",we)}let ne=!1,je=!1,It=null;const jn=we=>{if(!we||we.length===0){w(d,[],!0),w(E,[],!0),w(B,ae({key:"noResultsMessage",lang:a(me)}),!0),Ee(Pe.NO_RESULTS_FOUND,a(ie),{query:I});return}w(d,we,!0),w(g,!1),!je&&(je=!0,w(C,pi==="2"&&!n&&we.length>=4,!0),Ie(we,I),Ee(Pe.SEARCH_RESULTS_DISPLAYED,a(ie),{results_count:we.length,results:we,query:I}))},Rr=we=>{F===V&&(ne?jn(we):It=we)},sr=tt.searchStream(I,V,Rr);sr.catch(()=>{}),await On(220),w(d,[],!0),w(S,!1),w(C,!1),w(Y,[],!0),ne=!0,It&&jn(It);const qn=await sr;if(F!==V)return;if(je&&qn.length===a(d).length&&qn.every((we,wt)=>{var pn;return we.id===((pn=a(d)[wt])==null?void 0:pn.id)})){const we=new Map(qn.map(wt=>[wt.id,wt]));w(d,a(d).map(wt=>{var pn;return{...wt,reason:((pn=we.get(wt.id))==null?void 0:pn.reason)??wt.reason}}),!0)}else jn(qn)}catch(ne){if(F!==V)return;if(ne instanceof ra){await Ci();return}w(d,[],!0),console.error("[wineater] search error:",ne),Ee(Pe.ERROR_OCCURRED,a(ie),{error_message:ne==null?void 0:ne.message,query:I}),Vt()}finally{F===V&&w(g,!1)}}async function Ei(){if(a(y)||!a(C))return;p=!0;const b=a(d);try{w(y,!0),w(g,!0),w(Y,[...new Set([...a(Y),...a(d).map(je=>je.id)])],!0);const I=tt.getMoreWineRecommendations(a(k),a(Y));I.catch(()=>{}),await On(220),w(d,[],!0),w(S,!1);const{recommendations:F,hasMore:ne}=await I;ln({type:"more",query_id:V??void 0,text:a(k)||void 0}),Ie(F,a(k)),Ee(Pe.SHOW_MORE_CLICKED,a(ie),{query:a(k),results_count:F.length}),w(d,F.length>0?F:b,!0),w(C,ne,!0)}catch(I){console.error("[wineater] try again error:",I),w(d,b,!0),w(C,!1)}finally{w(y,!1),w(g,!1)}}async function Pi(b){p=!0;try{w(g,!0),Ar(),Ee(Pe.SIMILAR_WINES_CLICKED,a(ie),{wine_id:b.id,wine_title:b.title}),ln({type:"similar",query_id:V??void 0,sku_ids:[b.id]}),V=da();const I=tt.getSimilarWines(b.id);I.catch(()=>{}),await On(220),w(d,[],!0),w(S,!1),w(C,!1),w(_,null);const F=await I;w(D,b.title,!0),w(k,""),!F||F.length===0?(w(d,[],!0),w(E,[],!0),w(B,ae({key:"noResultsMessage",lang:a(me)}),!0)):(w(d,F,!0),Ie(F,""))}catch(I){w(d,[],!0),console.error("[wineater] similar wines error:",I),Vt()}finally{w(g,!1)}}xn(async()=>{if(!a(d)||a(d).length===0){w(E,[],!0);return}const b=a(d);try{const I=await ki(a(d));a(d)===b&&a(d).length>0&&w(E,I,!0)}catch(I){console.error("translatePopupContent failed",I)}});function Ai(b,I){a(_)&&a(_)!==b.id&&w(_,null),w(_,b.id,!0),ln({type:"click",query_id:V??void 0,sku_ids:[b.id],position:I}),Ee(Pe.WINE_DETAILS_VIEWED,a(ie),{wine_id:b.id,wine_title:b.title,is_mobile:window.innerWidth<=768})}function Ii(b,I){ln({type:"buy_click",query_id:V??void 0,sku_ids:[b.id],position:I}),Ee(Pe.BUY_BUTTON_CLICKED,a(ie),{wine_id:b.id,wine_title:b.title,wine_url:b.url,is_mobile:window.innerWidth<=768})}async function Di(b,I){const F=na(b);if(!n||!F)return;ln({type:"add_to_cart",query_id:V??void 0,sku_ids:[b.id],position:I}),Ee(Pe.BUY_BUTTON_CLICKED,a(ie),{action:"add_to_cart",wine_id:b.id,wine_title:b.title,wine_url:b.url,variant_id:F,query:a(k)||void 0,is_mobile:window.innerWidth<=768});const ne=await ku(F,{root:n.root,sessionId:ia()});ne.ok&&(w(ue,[...a(ue),b.id],!0),window.dispatchEvent(new CustomEvent("wineater:added-to-cart",{detail:{variantId:F,via:ne.via}})))}function Ri(){const b=a(d).find(I=>I.id===a(_));Ee(Pe.WINE_DETAILS_CLOSED,a(ie),{wine_id:a(_),wine_title:b.title}),w(_,null)}function Wi(b){return!!(b.reason||b.shortDescription||b.tags)}function x(b){u==="store"&&Wi(b)&&(w(A,b.id,!0),Ee(Pe.WINE_CARD_HOVER,a(ie),{wine_id:b.id,wine_title:b.title}))}function N(b){u==="store"&&a(A)===b.id&&w(A,null)}function K(b,I){b.target.closest(".js-WineTileAction")||b.target.closest(".js-WinePopupClose")||(ln({type:"click",query_id:V??void 0,sku_ids:[I.id],position:a(d).findIndex(F=>F.id===I.id)}),Ee(Pe.WINE_CARD_CLICK,a(ie),{wine_id:I.id,wine_title:I.title}))}function te(b){var ne;const I=((ne=b.composedPath)==null?void 0:ne.call(b)[0])??b.target;if(!(I!=null&&I.closest))return;I.closest(".js-WinePopup")||I.closest(".js-WineTileAction")||w(_,null)}const pe=((Ma=(Wa=(Dr=(Ra=window==null?void 0:window.wineaterData)==null?void 0:Ra.mountTarget)==null?void 0:Dr.getRootNode)==null?void 0:Wa.call(Dr))==null?void 0:Ma.host)||document.documentElement;xn(()=>{var b,I;(b=a(ze))!=null&&b.brandColor&&pe.style.setProperty("--wr-brand-color",a(ze).brandColor),(I=a(ze))!=null&&I.wineaterColor&&pe.style.setProperty("--wr-wineater-color",a(ze).wineaterColor)}),ri(()=>(document.addEventListener("click",te),(async()=>{const b=ce.initializeStore();if(Si(b),await b,!a(Ht)){w(h,!0);return}a(ze).customCss&&gu(a(ze).customCss),w(m,!0),n&&!a(De)&&w(de,!0),Ee(Pe.WIDGET_INITIALIZED,a(ie))})(),()=>{document.removeEventListener("click",te)}));var oe=yr(),At=Je(oe);{var Oe=b=>{var I=Au();let F;var ne=P(I);{var je=re=>{var at=Su(),Kt=P(at);M(()=>W(Kt,"src",a(ze).logoUrl)),T(re,at)};X(ne,re=>{a(ze).logoUrl&&re(je)})}var It=R(ne,2);dc(It,{});var jn=R(It,2);xc(jn,{onSubmit:Ti,get initialized(){return a(m)},get searchQuery(){return a(D)},set searchQuery(re){w(D,re,!0)}});var Rr=R(jn,2),sr=P(Rr);{var qn=re=>{var at=Cu(),Kt=P(at);M(lr=>O(Kt,lr),[()=>ae({key:"sommelierResting",lang:a(me)})]),T(re,at)};X(sr,re=>{a(de)&&!a(B)&&re(qn)})}var Ba=R(sr,2);{var we=re=>{var at=Tu(),Kt=P(at),lr=P(Kt);M(()=>O(lr,a(B))),T(re,at)},wt=re=>{var at=Pu(),Kt=Je(at);zt(Kt,21,()=>a(d),Cn,(cr,ur,Wr)=>{{let Mi=U(()=>n?Di:void 0),La=U(()=>a(ue).includes(a(ur).id)),Mr=U(()=>n?void 0:Pi);cu(cr,{get wine(){return a(ur)},index:Wr,get hoveredWineId(){return a(A)},get selectedWineId(){return a(_)},get isAnimating(){return a(S)},get translatedPopup(){return a(E)[Wr]},onBuyClick:Ai,onBuyLinkClick:Ii,get onAddToCart(){return a(Mi)},get addedToCart(){return a(La)},onPopupClose:Ri,get onSimilarClick(){return a(Mr)},onTileEnter:x,onTileLeave:N,onTileClick:K})}});var lr=R(Kt,2);{var zu=cr=>{var ur=Eu(),Wr=P(ur);jt(Wr,{handleClick:Ei,variant:"outlined",children:(Mi,La)=>{var Mr=Tt();M(Ou=>O(Mr,Ou),[()=>ae({key:"tryAgain",lang:a(me)})]),T(Mi,Mr)},$$slots:{default:!0}}),T(cr,ur)};X(lr,cr=>{a(C)&&cr(zu)})}T(re,at)},pn=re=>{Sa(re)};X(Ba,re=>{a(B)?re(we):a(d)&&a(d).length>0?re(wt,1):a(g)&&re(pn,2)})}var Na=R(Rr,2);{var Mu=re=>{hu(re,{get lang(){return a(me)}})},Bu=U(()=>El());X(Na,re=>{a(Bu)&&re(Mu)})}var Nu=R(Na,2);{var Lu=re=>{gc(re,{get countryCode(){return v}})};X(Nu,re=>{n||re(Lu)})}M(()=>F=ft(I,1,"wr-App svelte-1n46o8q",null,F,{"wr-App--embedded":!!n})),T(b,I)},ot=b=>{var I=Iu();let F;var ne=R(P(I),2);Sa(ne),M(()=>F=ft(I,1,"wr-App wr-App--loading svelte-1n46o8q",null,F,{"wr-App--embedded":!!n})),T(b,I)};X(At,b=>{a(Ht)?b(Oe):a(h)||b(ot,1)})}T(e,oe),lt()}const Wu=((Da=window.wineaterData)==null?void 0:Da.mountTarget)||document.getElementById("wineater-widget-conteiner");return ol(Ru,{target:Wu})});