wineater-bot 4.9.1 → 4.9.3

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.
@@ -65,7 +65,33 @@ We appreciate your time and valuable input.`),r=q("div","end_button_or",Ta,"Subm
65
65
  box-shadow: none;
66
66
  }
67
67
  }
68
- `,translations:{fr:{"wineDetails.buy":"voir plus"}}},21:{logoUrl:"https://www.intermarche.com/images/logoIntermarche.svg",brandColor:"#B81242",wineaterColor:"#7B2BEB",buttonUppercase:!0,customCss:"",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:"#7B2BEB",buttonUppercase:!0,customCss:"",translations:{}}};function gf(t){const e={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
68
+ `,translations:{fr:{"wineDetails.buy":"voir plus"}}},21:{logoUrl:"https://www.intermarche.com/images/logoIntermarche.svg",brandColor:"#B81242",wineaterColor:"#7B2BEB",buttonUppercase:!0,customCss:"",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:"#7B2BEB",buttonUppercase:!0,customCss:"",translations:{}},30:{logoUrl:"https://www.briceandburnett.co.za/media/logo/stores/1/BB-Logo-Horizontal.png",brandColor:"#8bae98",wineaterColor:"#8bae98",customCss:`
69
+ @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500&display=swap');
70
+ :root { --wineater-font-primary: 'Montserrat', Verdana, Helvetica, Arial, sans-serif; }
71
+ #wr-Custom {
72
+ font-weight: 400;
73
+
74
+ .wr-Header-title {
75
+ font-family: 'Montserrat', Verdana, Helvetica, Arial, sans-serif;
76
+ font-weight: 500;
77
+ }
78
+
79
+ .wr-Footer {
80
+ display: none;
81
+ }
82
+
83
+ .wr-Search-icon {
84
+ background-image: none;
85
+ -webkit-mask-image: url('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
86
+ mask-image: url('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
87
+ -webkit-mask-repeat: no-repeat;
88
+ mask-repeat: no-repeat;
89
+ -webkit-mask-size: contain;
90
+ mask-size: contain;
91
+ background-color: #8bae98;
92
+ }
93
+ }
94
+ `}};function gf(t){const e={logoUrl:null,brandColor:"#7B2BEB",wineaterColor:"#7B2BEB",customCss:`
69
95
  @import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap');
70
96
  :root { --wineater-font-primary: 'Bricolage Grotesque', serif; }
71
97
  `},n=pf[t]||{};return{...e,...n}}let de=at({storeConfig:null,currentLanguage:"en",isConfigLoaded:!1,uiConfig:null});const we={getLanguageFromURL(){return new URLSearchParams(window.location.search).get("lang")},getAppLanguage(){return(de==null?void 0:de.currentLanguage)??"en"},getStoreLanguage(){var t;return((t=de.storeConfig)==null?void 0:t.lang)??null},getApiKey(){var t;return((t=de.storeConfig)==null?void 0:t.open_ai_key)??null},getStoreId(){var t;return((t=de.storeConfig)==null?void 0:t.id)??null},setStoreLanguage(t){if(de.storeConfig&&de.storeConfig.available_languages.includes(t)){de.currentLanguage=t;const e=new URLSearchParams(window.location.search);e.set("lang",t);const n=`${window.location.pathname}?${e.toString()}`;window.history.replaceState({},"",n)}else throw new Error(`Language ${t} is not available in store configuration.`)},getSupportedLanguages(){var t;return((t=de.storeConfig)==null?void 0:t.available_languages)??["en"]},getCurrency(){var t;return((t=de.storeConfig)==null?void 0:t.currency)??"USD"},async initializeStore(){try{const t=await br.getStoreConfig();de.storeConfig=ff(t),de.currentLanguage=de.storeConfig.lang;const e=this.getLanguageFromURL();e&&de.storeConfig.available_languages.includes(e)?this.setStoreLanguage(e):this.setStoreLanguage(de.storeConfig.lang),this.setUiConfig(gf(de.storeConfig.id)),de.isConfigLoaded=!0}catch(t){console.error("Failed to initialize store:",t),de.isConfigLoaded=!1}},isInitialized(){return de.isConfigLoaded},getUiConfig(){return de.uiConfig},setUiConfig(t){de.uiConfig=t}},mf={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 vf(t,e,n="en"){try{return new Intl.NumberFormat(mf[n]||"en-US",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).format(t)}catch{return t.toString()}}function Ne({key:t,lang:e}){const n=df,s=we.getUiConfig(),i=(s==null?void 0:s.translations)||{};if(i[e]&&i[e][t])return i[e][t];if(n[e]&&n[e][t])return n[e][t];throw new Error(`Translation for key "${t}" not found in language "${e}".`)}async function wf({sourceLang:t,targetLang:e,texts:n,apiKey:s}){var u,l,h,d;if(!s||!t||!e||t===e)return n;const i="https://api.openai.com/v1/chat/completions",r={"Content-Type":"application/json",Authorization:`Bearer ${s}`},o=Object.entries(n).map(([p,f])=>({key:p,text:f})),a=`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wineater-bot",
3
- "version": "4.9.1",
3
+ "version": "4.9.3",
4
4
  "description": "",
5
5
  "main": "dist/wineater-chatbot.mjs",
6
6
  "module": "src/index.js",
@@ -90,8 +90,40 @@ export const projectConfigs: Record<string, ProjectUiConfig> = {
90
90
  logoUrl: "https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/ryba_moya.png",
91
91
  brandColor: "#de4e2a",
92
92
  wineaterColor: "#7B2BEB",
93
- buttonUppercase: true,
93
+ buttonUppercase: true,
94
94
  customCss: "",
95
95
  translations: {}
96
+ },
97
+ "30": {
98
+ logoUrl: "https://www.briceandburnett.co.za/media/logo/stores/1/BB-Logo-Horizontal.png",
99
+ brandColor: "#8bae98",
100
+ wineaterColor: "#8bae98",
101
+ customCss: `
102
+ @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500&display=swap');
103
+ :root { --wineater-font-primary: 'Montserrat', Verdana, Helvetica, Arial, sans-serif; }
104
+ #wr-Custom {
105
+ font-weight: 400;
106
+
107
+ .wr-Header-title {
108
+ font-family: 'Montserrat', Verdana, Helvetica, Arial, sans-serif;
109
+ font-weight: 500;
110
+ }
111
+
112
+ .wr-Footer {
113
+ display: none;
114
+ }
115
+
116
+ .wr-Search-icon {
117
+ background-image: none;
118
+ -webkit-mask-image: url('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
119
+ mask-image: url('https://czvgkhagwvmknscoerfy.supabase.co/storage/v1/object/public/static-media/search.svg?x=1');
120
+ -webkit-mask-repeat: no-repeat;
121
+ mask-repeat: no-repeat;
122
+ -webkit-mask-size: contain;
123
+ mask-size: contain;
124
+ background-color: #8bae98;
125
+ }
126
+ }
127
+ `
96
128
  }
97
129
  };