@haus-storefront-react/vendure-plugin-configs 0.0.32-2 → 0.0.32-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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.0.32-2 (2025-09-16)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated core to 0.0.32-2
6
+ - Updated common/utils to 0.0.32-2
7
+ - Updated shared/types to 0.0.32-2
8
+
1
9
  ## 0.0.32-1 (2025-09-15)
2
10
 
3
11
  ### 🧱 Updated Dependencies
package/badge.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("./index-CATkY-bf.js"),A=require("./index-BtCqYPso.js"),K=require("react"),ln=require("react-i18next"),fn=require("i18next"),Pt=require("@tanstack/react-query");function dn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const E=dn(K),L=new ge.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?L.getSettings().availablePositions[e]:L.getSettings().defaultPositions;return{badges:ge.lodashExports.filter(t,o=>r?r.includes(o.position):!0),availablePositions:r}}},queryUpdates:{},settings:{defaultPositions:["top-left","top-right","bottom-left","bottom-right"],availablePositions:{productListItem:["top-left","top-right","bottom-left","bottom-right"],productDetail:["top-left","top-right","bottom-left","bottom-right"],imageCarousel:["top-left","top-right","bottom-left","bottom-right"]}}});L.setQueryUpdates({product:{fields:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},search:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},products:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},briefProducts:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]}});L.setRequests({getBadges:async()=>L.getSdk().createRequest({operation:"badges",fields:["totalItems",{items:["id","createdAt","updatedAt","collectionId","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},{options:{take:100}},!1).then(t=>t.data).catch(t=>({message:t.message,errorCode:t.code||"unknown"}))});function pn(t){const e=[];function r(o,i){const s=E.createContext(i),a=e.length;e.push(s);const u=l=>{const f=A.compilerRuntimeExports.c(8);let p,y,m;f[0]!==l?({scope:m,children:p,...y}=l,f[0]=l,f[1]=p,f[2]=y,f[3]=m):(p=f[1],y=f[2],m=f[3]);const g=m?.[t]?.[a]||s;let h;h=y;const v=h;let w;return f[4]!==g.Provider||f[5]!==p||f[6]!==v?(w=A.jsxRuntimeExports.jsx(g.Provider,{value:v,children:p}),f[4]=g.Provider,f[5]=p,f[6]=v,f[7]=w):w=f[7],w};u.displayName=o+"Provider";function c(l,f){const p=f?.[t]?.[a]||s,y=E.useContext(p);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[u,c]}function n(){const o=e.map(i=>E.createContext(i));return function(s){const a=s?.[t]||o;return E.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}function mn(t,e){if(e==="web")return t;const{src:r,alt:n,width:o,height:i,...s}=t,a=[typeof o=="number"?{width:o}:void 0,typeof i=="number"?{height:i}:void 0].filter(Boolean);let u;return a.length===1?u=a[0]:a.length>1&&(u=a),{...s,source:{uri:r},...u?{style:u}:{}}}function hn(t){const{src:e,alt:r,...n}=t;return e?{...n,source:{uri:e}}:n}const yn={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",button:"Pressable",input:"TextInput",form:"View",section:"View",article:"View",nav:"View",header:"View",footer:"View",main:"View",aside:"View",ul:"View",ol:"View",li:"View",a:"Pressable",img:"Image",label:"Text",textarea:"TextInput",select:"Pressable",option:"Text"};function gn(t,e){if(e==="web")return t;let r=null;try{r=require("react-native")}catch{r=null}if(!r)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const n=yn[t];if(!n)return console.warn(`No native component mapping found for '${t}', falling back to View`),r.View;if(n==="Image"){const i=K.forwardRef((s,a)=>{const u=A.compilerRuntimeExports.c(5);if(!s.src)return null;let c;u[0]!==s?(c=hn(s),u[0]=s,u[1]=c):c=u[1];let l;return u[2]!==a||u[3]!==c?(l=A.jsxRuntimeExports.jsx(r.Image,{ref:a,...c}),u[2]=a,u[3]=c,u[4]=l):l=u[4],l});return i.displayName="PlatformPrimitiveImage",i}const o=r[n];return o||(console.warn(`Native component '${n}' not found, falling back to View`),r.View)}const bn=Symbol("radix.slottable");function vn(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function wn(t,e){const r={...e};for(const n in e){const o=t[n],i=e[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const u=i(...a);return o(...a),u}:o&&(r[n]=o):n==="style"?r[n]=Sn(o,i):n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...t,...r}}function Sn(t,e){let r=null;try{r=require("react-native")}catch{r=null}const n=r?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return i=>{const s=[t(i),e(i)];return n?n(s):s};if(typeof t=="function")return i=>{const s=e?[t(i),e]:t(i);return n?n(s):s};if(typeof e=="function")return i=>{const s=t?[t,e(i)]:e(i);return n?n(s):s};const o=[t,e].filter(Boolean);return n?n(o):o}function On(t){return E.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===bn}function En(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function An(t,e){const r=E.forwardRef((n,o)=>{const{children:i,...s}=n;if(E.isValidElement(i)){const a=En(i),u=wn(s,i.props);return i.type!==E.Fragment&&(u.ref=o?vn(o,a):a),E.cloneElement(i,u)}return E.Children.count(i)>1?E.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function Se(t,e=!1,r="div"){if(!e)return gn(r,t);const n=An("Slot"),o=E.forwardRef((i,s)=>{const a=A.compilerRuntimeExports.c(15);let u,c;a[0]!==i?({children:u,...c}=i,a[0]=i,a[1]=u,a[2]=c):(u=a[1],c=a[2]);let l;if(a[3]!==u||a[4]!==s||a[5]!==c){l=Symbol.for("react.early_return_sentinel");e:{const p=E.Children.toArray(u),y=p.find(On);if(y){const m=y.props.children,g=p.map(w=>w===y?E.Children.count(m)>1?E.Children.only(null):E.isValidElement(m)?m.props.children:null:w),h=E.isValidElement(m)?E.cloneElement(m,void 0,g):null;let v;a[7]!==s||a[8]!==c||a[9]!==h?(v=A.jsxRuntimeExports.jsx(n,{...c,ref:s,children:h}),a[7]=s,a[8]=c,a[9]=h,a[10]=v):v=a[10],l=v;break e}}a[3]=u,a[4]=s,a[5]=c,a[6]=l}else l=a[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let f;return a[11]!==u||a[12]!==s||a[13]!==c?(f=A.jsxRuntimeExports.jsx(n,{...c,ref:s,children:u}),a[11]=u,a[12]=s,a[13]=c,a[14]=f):f=a[14],f});return o.displayName="Slot",o}const Tn="debug",N=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(Tn);return t==="true"||t==="1"}catch{return!1}},Rn=()=>{const t=(e,r,n=[])=>r?typeof e=="string"?[`<${r}> ${e}`,...n]:[`<${r}>`,e,...n]:Array.isArray(e)?[...e,...n]:[e,...n];return{log:(e,r,...n)=>{N()&&console.log(...t(e,r,n))},info:(e,r,...n)=>{N()&&console.info(...t(e,r,n))},warn:(e,r,...n)=>{N()&&console.warn(...t(e,r,n))},error:(e,r,...n)=>{N()&&console.error(...t(e,r,n))},debug:(e,r,...n)=>{N()&&console.debug(...t(e,r,n))},group:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.group(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupCollapsed:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.groupCollapsed(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupEnd:()=>{N()&&console.groupEnd()},table:(e,r,n)=>{N()&&(r&&console.log(`<${r}>`),console.table(e,n))},time:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.time(r?n?`<${r}> ${n}`:`<${r}>`:n)}},timeEnd:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.timeEnd(r?n?`<${r}> ${n}`:`<${r}>`:n)}}}},kt=Rn();function Pn(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}let J;try{J=require("@react-native-async-storage/async-storage").default}catch{J=null}const je=typeof window<"u"&&typeof window.localStorage<"u",Ce=!!J,qe={},ue={},D={getItem:async t=>Ce?J.getItem(t):je?new Promise(e=>{Promise.resolve().then(()=>{const r=window.localStorage.getItem(t),n=ue[t];r!==n&&(ue[t]=r||""),e(r)})}):qe[t]||null,setItem:async(t,e)=>{if(Ce)return J.setItem(t,e);if(je)return new Promise((r,n)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const o=window.localStorage.getItem(t);o===e?(ue[t]=e,r()):n(new Error(`Failed to set localStorage item: expected "${e}", got "${o}"`))}catch(o){n(o)}})});qe[t]=e},removeItem:async t=>{if(Ce)return J.removeItem(t);if(je)return new Promise((e,r)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const n=window.localStorage.getItem(t);n===null?(delete ue[t],e()):r(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${n}"`))}catch(n){r(n)}})});delete qe[t]}},Ge=50,F={get:async()=>{try{const t=await D.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await D.setItem("eventHistory",JSON.stringify(t.slice(-Ge)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await D.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await F.get();await F.set([{...t,timestamp:Date.now()},...e].slice(-Ge))},find:async t=>(await F.get()).find(r=>r.key===t.key&&r.identifier===t.identifier),filter:async(t,e)=>{const r=await F.get();return e?r.filter(e):r.filter(({key:n,identifier:o})=>(!n||t.key===n)&&(!o||t.identifier===o))}};function kn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=Pn(),t.__HAUS_EVENT_EMITTER__}function V(t){const e=kn(),r=(...u)=>console.error(...u);F.get().then(u=>{const l=ge.lodashExports.first(u)?.timestamp;l&&l<Date.now()-1e3*60*60&&(kt.info("Clearing event history since it is older than 1 hour:","eventBus",l),F.clear())});const n=(u,c,l)=>{const f=p=>{try{if(typeof p=="object"&&p!==null){const{identifier:y,data:m}=p;(!y||y===l)&&c(m)}else c(p)}catch(y){r(y)}};return e.on(u,f),()=>{o(u,c,l)}},o=(u,c,l)=>{const f=p=>{if(typeof p=="object"&&p!==null){const{identifier:y}=p;(!y||y===l)&&e.off(u,c)}};e.off(u,f)};return{on:n,off:o,once:(u,c,l)=>{const f=p=>{try{if(typeof p=="object"&&p!==null){const{identifier:y,data:m}=p;(!y||y===l)&&c(m)}else c(p)}finally{o(u,f,l)}};e.on(u,f)},emit:(u,c,...l)=>{const f={identifier:c,data:l.length===1?l[0]:l};F.push({key:u,identifier:c,payload:f.data}),e.emit(u,f)},getEventHistory:(u,c)=>F.filter({key:u,identifier:c})}}V();V();V();V();V();V();V();const Nn=globalThis.__STORE_I18N_INSTANCE__||=fn.createInstance();Nn.use(ln.initReactI18next);function Ie(t){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(t)}function Nt(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ie(XMLHttpRequest))==="object"}function _n(t){return!!t&&typeof t.then=="function"}function xn(t){return _n(t)?t:Promise.resolve(t)}function Ye(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Ze(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ye(Object(r),!0).forEach(function(n){jn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ye(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function jn(t,e,r){return(e=Cn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cn(t){var e=qn(t,"string");return $(e)=="symbol"?e:e+""}function qn(t,e){if($(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if($(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $(t){"@babel/helpers - typeof";return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(t)}var M=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?M=global.fetch:typeof window<"u"&&window.fetch&&(M=window.fetch);var te;Nt()&&(typeof global<"u"&&global.XMLHttpRequest?te=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(te=window.XMLHttpRequest));var be;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?be=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(be=window.ActiveXObject));typeof M!="function"&&(M=void 0);if(!M&&!te&&!be)try{Promise.resolve().then(()=>require("./browser-ponyfill-ByZyuJ42.js")).then(t=>t.browserPonyfill).then(function(t){M=t.default}).catch(function(){})}catch{}var Ue=function(e,r){if(r&&$(r)==="object"){var n="";for(var o in r)n+="&"+encodeURIComponent(o)+"="+encodeURIComponent(r[o]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},et=function(e,r,n,o){var i=function(u){if(!u.ok)return n(u.statusText||"Error",{status:u.status});u.text().then(function(c){n(null,{status:u.status,data:c})}).catch(n)};if(o){var s=o(e,r);if(s instanceof Promise){s.then(i).catch(n);return}}typeof fetch=="function"?fetch(e,r).then(i).catch(n):M(e,r).then(i).catch(n)},tt=!1,Dn=function(e,r,n,o){e.queryStringParams&&(r=Ue(r,e.queryStringParams));var i=Ze({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(i["Content-Type"]="application/json");var s=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=Ze({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i},tt?{}:s),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{et(r,a,o,u)}catch(c){if(!s||Object.keys(s).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(s).forEach(function(l){delete a[l]}),et(r,a,o,u),tt=!0}catch(l){o(l)}}},Fn=function(e,r,n,o){n&&$(n)==="object"&&(n=Ue("",n).slice(1)),e.queryStringParams&&(r=Ue(r,e.queryStringParams));try{var i=te?new te:new be("MSXML2.XMLHTTP.3.0");i.open(n?"POST":"GET",r,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(var a in s)i.setRequestHeader(a,s[a]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(u){console&&console.log(u)}},Mn=function(e,r,n,o){if(typeof n=="function"&&(o=n,n=void 0),o=o||function(){},M&&r.indexOf("file:")!==0)return Dn(e,r,n,o);if(Nt()||typeof ActiveXObject=="function")return Fn(e,r,n,o);o(new Error("No fetch and no xhr implementation found!"))};function Q(t){"@babel/helpers - typeof";return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(t)}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nt(Object(r),!0).forEach(function(n){_t(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Bn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function In(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xt(n.key),n)}}function Un(t,e,r){return e&&In(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function _t(t,e,r){return(e=xt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xt(t){var e=Ln(t,"string");return Q(e)=="symbol"?e:e+""}function Ln(t,e){if(Q(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Q(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $n=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(r){return JSON.parse(r)},stringify:JSON.stringify,parsePayload:function(r,n,o){return _t({},n,o||"")},parseLoadPayload:function(r,n){},request:Mn,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Hn=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Bn(this,t),this.services=e,this.options=r,this.allOptions=n,this.type="backend",this.init(e,r,n)}return Un(t,[{key:"init",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=De(De(De({},$n()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var s=setInterval(function(){return n.reload()},this.options.reloadInterval);Q(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(r,n,o){this._readAny(r,r,n,n,o)}},{key:"read",value:function(r,n,o){this._readAny([r],r,[n],n,o)}},{key:"_readAny",value:function(r,n,o,i,s){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(r,o)),u=xn(u),u.then(function(c){if(!c)return s(null,{});var l=a.services.interpolator.interpolate(c,{lng:r.join("+"),ns:o.join("+")});a.loadUrl(l,s,n,i)})}},{key:"loadUrl",value:function(r,n,o,i){var s=this,a=typeof o=="string"?[o]:o,u=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(a,u);this.options.request(this.options,r,c,function(l,f){if(f&&(f.status>=500&&f.status<600||!f.status))return n("failed loading "+r+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return n("failed loading "+r+"; status code: "+f.status,!1);if(!f&&l&&l.message){var p=l.message.toLowerCase(),y=["failed","fetch","network","load"].find(function(h){return p.indexOf(h)>-1});if(y)return n("failed loading "+r+": "+l.message,!0)}if(l)return n(l,!1);var m,g;try{typeof f.data=="string"?m=s.options.parse(f.data,o,i):m=f.data}catch{g="failed parsing "+r+" to json"}if(g)return n(g,!1);n(null,m)})}},{key:"create",value:function(r,n,o,i,s){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var u=this.options.parsePayload(n,o,i),c=0,l=[],f=[];r.forEach(function(p){var y=a.options.addPath;typeof a.options.addPath=="function"&&(y=a.options.addPath(p,n));var m=a.services.interpolator.interpolate(y,{lng:p,ns:n});a.options.request(a.options,m,u,function(g,h){c+=1,l.push(g),f.push(h),c===r.length&&typeof s=="function"&&s(l,f)})})}}},{key:"reload",value:function(){var r=this,n=this.services,o=n.backendConnector,i=n.languageUtils,s=n.logger,a=o.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(f){var p=i.toResolveHierarchy(f);p.forEach(function(y){u.indexOf(y)<0&&u.push(y)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(l){return c(l)}),u.forEach(function(l){r.allOptions.ns.forEach(function(f){o.read(l,f,"read",null,null,function(p,y){p&&s.warn("loading namespace ".concat(f," for language ").concat(l," failed"),p),!p&&y&&s.log("loaded namespace ".concat(f," for language ").concat(l),y),o.loaded("".concat(l,"|").concat(f),p,y)})})})}}}])}();Hn.type="backend";const Vn=globalThis.__STORE_SDK_CONTEXT__||=K.createContext(void 0),Wn=()=>{const t=K.useContext(Vn);return t||console.error("You must wrap your component in a <DataProvider>"),t?.sdkType==="dummy"||t?.sdkType==="vendure",t};new Pt.QueryClient;function jt(t,e){return function(){return t.apply(e,arguments)}}const{toString:zn}=Object.prototype,{getPrototypeOf:Xe}=Object,{iterator:Oe,toStringTag:Ct}=Symbol,Ee=(t=>e=>{const r=zn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),x=t=>(t=t.toLowerCase(),e=>Ee(e)===t),Ae=t=>e=>typeof e===t,{isArray:G}=Array,ne=Ae("undefined");function Xn(t){return t!==null&&!ne(t)&&t.constructor!==null&&!ne(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const qt=x("ArrayBuffer");function Jn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&qt(t.buffer),e}const Qn=Ae("string"),P=Ae("function"),Dt=Ae("number"),Te=t=>t!==null&&typeof t=="object",Kn=t=>t===!0||t===!1,me=t=>{if(Ee(t)!=="object")return!1;const e=Xe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ct in t)&&!(Oe in t)},Gn=x("Date"),Yn=x("File"),Zn=x("Blob"),er=x("FileList"),tr=t=>Te(t)&&P(t.pipe),nr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||P(t.append)&&((e=Ee(t))==="formdata"||e==="object"&&P(t.toString)&&t.toString()==="[object FormData]"))},rr=x("URLSearchParams"),[or,ir,sr,ar]=["ReadableStream","Request","Response","Headers"].map(x),ur=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function re(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),G(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function Ft(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}const I=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mt=t=>!ne(t)&&t!==I;function Le(){const{caseless:t}=Mt(this)&&this||{},e={},r=(n,o)=>{const i=t&&Ft(e,o)||o;me(e[i])&&me(n)?e[i]=Le(e[i],n):me(n)?e[i]=Le({},n):G(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&re(arguments[n],r);return e}const cr=(t,e,r,{allOwnKeys:n}={})=>(re(e,(o,i)=>{r&&P(o)?t[i]=jt(o,r):t[i]=o},{allOwnKeys:n}),t),lr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},dr=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Xe(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},pr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},mr=t=>{if(!t)return null;if(G(t))return t;let e=t.length;if(!Dt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},hr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Xe(Uint8Array)),yr=(t,e)=>{const n=(t&&t[Oe]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},gr=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},br=x("HTMLFormElement"),vr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),rt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),wr=x("RegExp"),Bt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};re(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},Sr=t=>{Bt(t,(e,r)=>{if(P(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(P(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Or=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return G(t)?n(t):n(String(t).split(e)),r},Er=()=>{},Ar=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Tr(t){return!!(t&&P(t.append)&&t[Ct]==="FormData"&&t[Oe])}const Rr=t=>{const e=new Array(10),r=(n,o)=>{if(Te(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const i=G(n)?[]:{};return re(n,(s,a)=>{const u=r(s,o+1);!ne(u)&&(i[a]=u)}),e[o]=void 0,i}}return n};return r(t,0)},Pr=x("AsyncFunction"),kr=t=>t&&(Te(t)||P(t))&&P(t.then)&&P(t.catch),It=((t,e)=>t?setImmediate:e?((r,n)=>(I.addEventListener("message",({source:o,data:i})=>{o===I&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),I.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P(I.postMessage)),Nr=typeof queueMicrotask<"u"?queueMicrotask.bind(I):typeof process<"u"&&process.nextTick||It,_r=t=>t!=null&&P(t[Oe]),d={isArray:G,isArrayBuffer:qt,isBuffer:Xn,isFormData:nr,isArrayBufferView:Jn,isString:Qn,isNumber:Dt,isBoolean:Kn,isObject:Te,isPlainObject:me,isReadableStream:or,isRequest:ir,isResponse:sr,isHeaders:ar,isUndefined:ne,isDate:Gn,isFile:Yn,isBlob:Zn,isRegExp:wr,isFunction:P,isStream:tr,isURLSearchParams:rr,isTypedArray:hr,isFileList:er,forEach:re,merge:Le,extend:cr,trim:ur,stripBOM:lr,inherits:fr,toFlatObject:dr,kindOf:Ee,kindOfTest:x,endsWith:pr,toArray:mr,forEachEntry:yr,matchAll:gr,isHTMLForm:br,hasOwnProperty:rt,hasOwnProp:rt,reduceDescriptors:Bt,freezeMethods:Sr,toObjectSet:Or,toCamelCase:vr,noop:Er,toFiniteNumber:Ar,findKey:Ft,global:I,isContextDefined:Mt,isSpecCompliantForm:Tr,toJSONObject:Rr,isAsyncFn:Pr,isThenable:kr,setImmediate:It,asap:Nr,isIterable:_r};function b(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(b,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Ut=b.prototype,Lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Lt[t]={value:t}});Object.defineProperties(b,Lt);Object.defineProperty(Ut,"isAxiosError",{value:!0});b.from=(t,e,r,n,o,i)=>{const s=Object.create(Ut);return d.toFlatObject(t,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),b.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const xr=null;function $e(t){return d.isPlainObject(t)||d.isArray(t)}function $t(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function ot(t,e,r){return t?t.concat(e).map(function(o,i){return o=$t(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function jr(t){return d.isArray(t)&&!t.some($e)}const Cr=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Re(t,e,r){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,h){return!d.isUndefined(h[g])});const n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(d.isDate(m))return m.toISOString();if(d.isBoolean(m))return m.toString();if(!u&&d.isBlob(m))throw new b("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(m)||d.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,g,h){let v=m;if(m&&!h&&typeof m=="object"){if(d.endsWith(g,"{}"))g=n?g:g.slice(0,-2),m=JSON.stringify(m);else if(d.isArray(m)&&jr(m)||(d.isFileList(m)||d.endsWith(g,"[]"))&&(v=d.toArray(m)))return g=$t(g),v.forEach(function(O,C){!(d.isUndefined(O)||O===null)&&e.append(s===!0?ot([g],C,i):s===null?g:g+"[]",c(O))}),!1}return $e(m)?!0:(e.append(ot(h,g,i),c(m)),!1)}const f=[],p=Object.assign(Cr,{defaultVisitor:l,convertValue:c,isVisitable:$e});function y(m,g){if(!d.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(m),d.forEach(m,function(v,w){(!(d.isUndefined(v)||v===null)&&o.call(e,v,d.isString(w)?w.trim():w,g,p))===!0&&y(v,g?g.concat(w):[w])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return y(t),e}function it(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Je(t,e){this._pairs=[],t&&Re(t,this,e)}const Ht=Je.prototype;Ht.append=function(e,r){this._pairs.push([e,r])};Ht.toString=function(e){const r=e?function(n){return e.call(this,n,it)}:it;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function qr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vt(t,e,r){if(!e)return t;const n=r&&r.encode||qr;d.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(e,r):i=d.isURLSearchParams(e)?e.toString():new Je(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class st{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Wt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dr=typeof URLSearchParams<"u"?URLSearchParams:Je,Fr=typeof FormData<"u"?FormData:null,Mr=typeof Blob<"u"?Blob:null,Br={isBrowser:!0,classes:{URLSearchParams:Dr,FormData:Fr,Blob:Mr},protocols:["http","https","file","blob","url","data"]},Qe=typeof window<"u"&&typeof document<"u",He=typeof navigator=="object"&&navigator||void 0,Ir=Qe&&(!He||["ReactNative","NativeScript","NS"].indexOf(He.product)<0),Ur=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lr=Qe&&window.location.href||"http://localhost",$r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qe,hasStandardBrowserEnv:Ir,hasStandardBrowserWebWorkerEnv:Ur,navigator:He,origin:Lr},Symbol.toStringTag,{value:"Module"})),T={...$r,...Br};function Hr(t,e){return Re(t,new T.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return T.isNode&&d.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Vr(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Wr(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function zt(t){function e(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=i>=r.length;return s=!s&&d.isArray(o)?o.length:s,u?(d.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&d.isArray(o[s])&&(o[s]=Wr(o[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const r={};return d.forEachEntry(t,(n,o)=>{e(Vr(n),o,r,0)}),r}return null}function zr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const oe={transitional:Wt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=d.isObject(e);if(i&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return o?JSON.stringify(zt(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Hr(e,this.formSerializer).toString();if((a=d.isFileList(e))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Re(a?{"files[]":e}:e,u&&new u,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),zr(e)):e}],transformResponse:[function(e){const r=this.transitional||oe.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?b.from(a,b.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],t=>{oe.headers[t]={}});const Xr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Jr=t=>{const e={};let r,n,o;return t&&t.split(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("./index-CATkY-bf.js"),A=require("./index-BtCqYPso.js"),K=require("react"),ln=require("react-i18next"),fn=require("i18next"),Pt=require("@tanstack/react-query");function dn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const E=dn(K),L=new ge.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?L.getSettings().availablePositions[e]:L.getSettings().defaultPositions;return{badges:ge.lodashExports.filter(t,o=>r?r.includes(o.position):!0),availablePositions:r}}},queryUpdates:{},settings:{defaultPositions:["top-left","top-right","bottom-left","bottom-right"],availablePositions:{productListItem:["top-left","top-right","bottom-left","bottom-right"],productDetail:["top-left","top-right","bottom-left","bottom-right"],imageCarousel:["top-left","top-right","bottom-left","bottom-right"]}}});L.setQueryUpdates({product:{fields:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},search:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},products:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},briefProducts:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]}});L.setRequests({getBadges:async()=>L.getSdk().createRequest({operation:"badges",fields:["totalItems",{items:["id","createdAt","updatedAt","collectionId","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},{options:{take:100}},!1).then(t=>t.data).catch(t=>({message:t.message,errorCode:t.code||"unknown"}))});function pn(t){const e=[];function r(o,i){const s=E.createContext(i),a=e.length;e.push(s);const u=l=>{const f=A.compilerRuntimeExports.c(8);let p,y,m;f[0]!==l?({scope:m,children:p,...y}=l,f[0]=l,f[1]=p,f[2]=y,f[3]=m):(p=f[1],y=f[2],m=f[3]);const g=m?.[t]?.[a]||s;let h;h=y;const v=h;let w;return f[4]!==g.Provider||f[5]!==p||f[6]!==v?(w=A.jsxRuntimeExports.jsx(g.Provider,{value:v,children:p}),f[4]=g.Provider,f[5]=p,f[6]=v,f[7]=w):w=f[7],w};u.displayName=o+"Provider";function c(l,f){const p=f?.[t]?.[a]||s,y=E.useContext(p);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[u,c]}function n(){const o=e.map(i=>E.createContext(i));return function(s){const a=s?.[t]||o;return E.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}function mn(t,e){if(e==="web")return t;const{src:r,alt:n,width:o,height:i,...s}=t,a=[typeof o=="number"?{width:o}:void 0,typeof i=="number"?{height:i}:void 0].filter(Boolean);let u;return a.length===1?u=a[0]:a.length>1&&(u=a),{...s,source:{uri:r},...u?{style:u}:{}}}function hn(t){const{src:e,alt:r,...n}=t;return e?{...n,source:{uri:e}}:n}const yn={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",button:"Pressable",input:"TextInput",form:"View",section:"View",article:"View",nav:"View",header:"View",footer:"View",main:"View",aside:"View",ul:"View",ol:"View",li:"View",a:"Pressable",img:"Image",label:"Text",textarea:"TextInput",select:"Pressable",option:"Text"};function gn(t,e){if(e==="web")return t;let r=null;try{r=require("react-native")}catch{r=null}if(!r)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const n=yn[t];if(!n)return console.warn(`No native component mapping found for '${t}', falling back to View`),r.View;if(n==="Image"){const i=K.forwardRef((s,a)=>{const u=A.compilerRuntimeExports.c(5);if(!s.src)return null;let c;u[0]!==s?(c=hn(s),u[0]=s,u[1]=c):c=u[1];let l;return u[2]!==a||u[3]!==c?(l=A.jsxRuntimeExports.jsx(r.Image,{ref:a,...c}),u[2]=a,u[3]=c,u[4]=l):l=u[4],l});return i.displayName="PlatformPrimitiveImage",i}const o=r[n];return o||(console.warn(`Native component '${n}' not found, falling back to View`),r.View)}const bn=Symbol("radix.slottable");function vn(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function wn(t,e){const r={...e};for(const n in e){const o=t[n],i=e[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const u=i(...a);return o(...a),u}:o&&(r[n]=o):n==="style"?r[n]=Sn(o,i):n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...t,...r}}function Sn(t,e){let r=null;try{r=require("react-native")}catch{r=null}const n=r?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return i=>{const s=[t(i),e(i)];return n?n(s):s};if(typeof t=="function")return i=>{const s=e?[t(i),e]:t(i);return n?n(s):s};if(typeof e=="function")return i=>{const s=t?[t,e(i)]:e(i);return n?n(s):s};const o=[t,e].filter(Boolean);return n?n(o):o}function On(t){return E.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===bn}function En(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function An(t,e){const r=E.forwardRef((n,o)=>{const{children:i,...s}=n;if(E.isValidElement(i)){const a=En(i),u=wn(s,i.props);return i.type!==E.Fragment&&(u.ref=o?vn(o,a):a),E.cloneElement(i,u)}return E.Children.count(i)>1?E.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function Se(t,e=!1,r="div"){if(!e)return gn(r,t);const n=An("Slot"),o=E.forwardRef((i,s)=>{const a=A.compilerRuntimeExports.c(15);let u,c;a[0]!==i?({children:u,...c}=i,a[0]=i,a[1]=u,a[2]=c):(u=a[1],c=a[2]);let l;if(a[3]!==u||a[4]!==s||a[5]!==c){l=Symbol.for("react.early_return_sentinel");e:{const p=E.Children.toArray(u),y=p.find(On);if(y){const m=y.props.children,g=p.map(w=>w===y?E.Children.count(m)>1?E.Children.only(null):E.isValidElement(m)?m.props.children:null:w),h=E.isValidElement(m)?E.cloneElement(m,void 0,g):null;let v;a[7]!==s||a[8]!==c||a[9]!==h?(v=A.jsxRuntimeExports.jsx(n,{...c,ref:s,children:h}),a[7]=s,a[8]=c,a[9]=h,a[10]=v):v=a[10],l=v;break e}}a[3]=u,a[4]=s,a[5]=c,a[6]=l}else l=a[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let f;return a[11]!==u||a[12]!==s||a[13]!==c?(f=A.jsxRuntimeExports.jsx(n,{...c,ref:s,children:u}),a[11]=u,a[12]=s,a[13]=c,a[14]=f):f=a[14],f});return o.displayName="Slot",o}const Tn="debug",N=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(Tn);return t==="true"||t==="1"}catch{return!1}},Rn=()=>{const t=(e,r,n=[])=>r?typeof e=="string"?[`<${r}> ${e}`,...n]:[`<${r}>`,e,...n]:Array.isArray(e)?[...e,...n]:[e,...n];return{log:(e,r,...n)=>{N()&&console.log(...t(e,r,n))},info:(e,r,...n)=>{N()&&console.info(...t(e,r,n))},warn:(e,r,...n)=>{N()&&console.warn(...t(e,r,n))},error:(e,r,...n)=>{N()&&console.error(...t(e,r,n))},debug:(e,r,...n)=>{N()&&console.debug(...t(e,r,n))},group:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.group(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupCollapsed:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.groupCollapsed(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupEnd:()=>{N()&&console.groupEnd()},table:(e,r,n)=>{N()&&(r&&console.log(`<${r}>`),console.table(e,n))},time:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.time(r?n?`<${r}> ${n}`:`<${r}>`:n)}},timeEnd:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.timeEnd(r?n?`<${r}> ${n}`:`<${r}>`:n)}}}},kt=Rn();function Pn(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}let J;try{J=require("@react-native-async-storage/async-storage").default}catch{J=null}const je=typeof window<"u"&&typeof window.localStorage<"u",Ce=!!J,qe={},ue={},D={getItem:async t=>Ce?J.getItem(t):je?new Promise(e=>{Promise.resolve().then(()=>{const r=window.localStorage.getItem(t),n=ue[t];r!==n&&(ue[t]=r||""),e(r)})}):qe[t]||null,setItem:async(t,e)=>{if(Ce)return J.setItem(t,e);if(je)return new Promise((r,n)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const o=window.localStorage.getItem(t);o===e?(ue[t]=e,r()):n(new Error(`Failed to set localStorage item: expected "${e}", got "${o}"`))}catch(o){n(o)}})});qe[t]=e},removeItem:async t=>{if(Ce)return J.removeItem(t);if(je)return new Promise((e,r)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const n=window.localStorage.getItem(t);n===null?(delete ue[t],e()):r(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${n}"`))}catch(n){r(n)}})});delete qe[t]}},Ge=50,F={get:async()=>{try{const t=await D.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await D.setItem("eventHistory",JSON.stringify(t.slice(-Ge)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await D.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await F.get();await F.set([{...t,timestamp:Date.now()},...e].slice(-Ge))},find:async t=>(await F.get()).find(r=>r.key===t.key&&r.identifier===t.identifier),filter:async(t,e)=>{const r=await F.get();return e?r.filter(e):r.filter(({key:n,identifier:o})=>(!n||t.key===n)&&(!o||t.identifier===o))}};function kn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=Pn(),t.__HAUS_EVENT_EMITTER__}function V(t){const e=kn(),r=(...u)=>console.error(...u);F.get().then(u=>{const l=ge.lodashExports.first(u)?.timestamp;l&&l<Date.now()-1e3*60*60&&(kt.info("Clearing event history since it is older than 1 hour:","eventBus",l),F.clear())});const n=(u,c,l)=>{const f=p=>{try{if(typeof p=="object"&&p!==null){const{identifier:y,data:m}=p;(!y||y===l)&&c(m)}else c(p)}catch(y){r(y)}};return e.on(u,f),()=>{o(u,c,l)}},o=(u,c,l)=>{const f=p=>{if(typeof p=="object"&&p!==null){const{identifier:y}=p;(!y||y===l)&&e.off(u,c)}};e.off(u,f)};return{on:n,off:o,once:(u,c,l)=>{const f=p=>{try{if(typeof p=="object"&&p!==null){const{identifier:y,data:m}=p;(!y||y===l)&&c(m)}else c(p)}finally{o(u,f,l)}};e.on(u,f)},emit:(u,c,...l)=>{const f={identifier:c,data:l.length===1?l[0]:l};F.push({key:u,identifier:c,payload:f.data}),e.emit(u,f)},getEventHistory:(u,c)=>F.filter({key:u,identifier:c})}}V();V();V();V();V();V();V();const Nn=globalThis.__STORE_I18N_INSTANCE__||=fn.createInstance();Nn.use(ln.initReactI18next);function Ie(t){"@babel/helpers - typeof";return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(t)}function Nt(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ie(XMLHttpRequest))==="object"}function _n(t){return!!t&&typeof t.then=="function"}function xn(t){return _n(t)?t:Promise.resolve(t)}function Ye(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Ze(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ye(Object(r),!0).forEach(function(n){jn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ye(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function jn(t,e,r){return(e=Cn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cn(t){var e=qn(t,"string");return $(e)=="symbol"?e:e+""}function qn(t,e){if($(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if($(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $(t){"@babel/helpers - typeof";return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(t)}var M=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?M=global.fetch:typeof window<"u"&&window.fetch&&(M=window.fetch);var te;Nt()&&(typeof global<"u"&&global.XMLHttpRequest?te=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(te=window.XMLHttpRequest));var be;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?be=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(be=window.ActiveXObject));typeof M!="function"&&(M=void 0);if(!M&&!te&&!be)try{Promise.resolve().then(()=>require("./browser-ponyfill-ByZyuJ42.js")).then(t=>t.browserPonyfill).then(function(t){M=t.default}).catch(function(){})}catch{}var Ue=function(e,r){if(r&&$(r)==="object"){var n="";for(var o in r)n+="&"+encodeURIComponent(o)+"="+encodeURIComponent(r[o]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},et=function(e,r,n,o){var i=function(u){if(!u.ok)return n(u.statusText||"Error",{status:u.status});u.text().then(function(c){n(null,{status:u.status,data:c})}).catch(n)};if(o){var s=o(e,r);if(s instanceof Promise){s.then(i).catch(n);return}}typeof fetch=="function"?fetch(e,r).then(i).catch(n):M(e,r).then(i).catch(n)},tt=!1,Dn=function(e,r,n,o){e.queryStringParams&&(r=Ue(r,e.queryStringParams));var i=Ze({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(i["Content-Type"]="application/json");var s=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=Ze({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:i},tt?{}:s),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{et(r,a,o,u)}catch(c){if(!s||Object.keys(s).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(s).forEach(function(l){delete a[l]}),et(r,a,o,u),tt=!0}catch(l){o(l)}}},Fn=function(e,r,n,o){n&&$(n)==="object"&&(n=Ue("",n).slice(1)),e.queryStringParams&&(r=Ue(r,e.queryStringParams));try{var i=te?new te:new be("MSXML2.XMLHTTP.3.0");i.open(n?"POST":"GET",r,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(var a in s)i.setRequestHeader(a,s[a]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(u){console&&console.log(u)}},Mn=function(e,r,n,o){if(typeof n=="function"&&(o=n,n=void 0),o=o||function(){},M&&r.indexOf("file:")!==0)return Dn(e,r,n,o);if(Nt()||typeof ActiveXObject=="function")return Fn(e,r,n,o);o(new Error("No fetch and no xhr implementation found!"))};function Q(t){"@babel/helpers - typeof";return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(t)}function nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nt(Object(r),!0).forEach(function(n){_t(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Bn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function In(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xt(n.key),n)}}function Un(t,e,r){return e&&In(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function _t(t,e,r){return(e=xt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xt(t){var e=Ln(t,"string");return Q(e)=="symbol"?e:e+""}function Ln(t,e){if(Q(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Q(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $n=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(r){return JSON.parse(r)},stringify:JSON.stringify,parsePayload:function(r,n,o){return _t({},n,o||"")},parseLoadPayload:function(r,n){},request:Mn,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Hn=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Bn(this,t),this.services=e,this.options=r,this.allOptions=n,this.type="backend",this.init(e,r,n)}return Un(t,[{key:"init",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=De(De(De({},$n()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var s=setInterval(function(){return n.reload()},this.options.reloadInterval);Q(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(r,n,o){this._readAny(r,r,n,n,o)}},{key:"read",value:function(r,n,o){this._readAny([r],r,[n],n,o)}},{key:"_readAny",value:function(r,n,o,i,s){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(r,o)),u=xn(u),u.then(function(c){if(!c)return s(null,{});var l=a.services.interpolator.interpolate(c,{lng:r.join("+"),ns:o.join("+")});a.loadUrl(l,s,n,i)})}},{key:"loadUrl",value:function(r,n,o,i){var s=this,a=typeof o=="string"?[o]:o,u=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(a,u);this.options.request(this.options,r,c,function(l,f){if(f&&(f.status>=500&&f.status<600||!f.status))return n("failed loading "+r+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return n("failed loading "+r+"; status code: "+f.status,!1);if(!f&&l&&l.message){var p=l.message.toLowerCase(),y=["failed","fetch","network","load"].find(function(h){return p.indexOf(h)>-1});if(y)return n("failed loading "+r+": "+l.message,!0)}if(l)return n(l,!1);var m,g;try{typeof f.data=="string"?m=s.options.parse(f.data,o,i):m=f.data}catch{g="failed parsing "+r+" to json"}if(g)return n(g,!1);n(null,m)})}},{key:"create",value:function(r,n,o,i,s){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var u=this.options.parsePayload(n,o,i),c=0,l=[],f=[];r.forEach(function(p){var y=a.options.addPath;typeof a.options.addPath=="function"&&(y=a.options.addPath(p,n));var m=a.services.interpolator.interpolate(y,{lng:p,ns:n});a.options.request(a.options,m,u,function(g,h){c+=1,l.push(g),f.push(h),c===r.length&&typeof s=="function"&&s(l,f)})})}}},{key:"reload",value:function(){var r=this,n=this.services,o=n.backendConnector,i=n.languageUtils,s=n.logger,a=o.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(f){var p=i.toResolveHierarchy(f);p.forEach(function(y){u.indexOf(y)<0&&u.push(y)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(l){return c(l)}),u.forEach(function(l){r.allOptions.ns.forEach(function(f){o.read(l,f,"read",null,null,function(p,y){p&&s.warn("loading namespace ".concat(f," for language ").concat(l," failed"),p),!p&&y&&s.log("loaded namespace ".concat(f," for language ").concat(l),y),o.loaded("".concat(l,"|").concat(f),p,y)})})})}}}])}();Hn.type="backend";const Vn=globalThis.__STORE_SDK_CONTEXT__||=K.createContext(void 0),Wn=()=>{const e=K.useContext(Vn)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};new Pt.QueryClient;function jt(t,e){return function(){return t.apply(e,arguments)}}const{toString:zn}=Object.prototype,{getPrototypeOf:Xe}=Object,{iterator:Oe,toStringTag:Ct}=Symbol,Ee=(t=>e=>{const r=zn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),x=t=>(t=t.toLowerCase(),e=>Ee(e)===t),Ae=t=>e=>typeof e===t,{isArray:G}=Array,ne=Ae("undefined");function Xn(t){return t!==null&&!ne(t)&&t.constructor!==null&&!ne(t.constructor)&&P(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const qt=x("ArrayBuffer");function Jn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&qt(t.buffer),e}const Qn=Ae("string"),P=Ae("function"),Dt=Ae("number"),Te=t=>t!==null&&typeof t=="object",Kn=t=>t===!0||t===!1,me=t=>{if(Ee(t)!=="object")return!1;const e=Xe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ct in t)&&!(Oe in t)},Gn=x("Date"),Yn=x("File"),Zn=x("Blob"),er=x("FileList"),tr=t=>Te(t)&&P(t.pipe),nr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||P(t.append)&&((e=Ee(t))==="formdata"||e==="object"&&P(t.toString)&&t.toString()==="[object FormData]"))},rr=x("URLSearchParams"),[or,ir,sr,ar]=["ReadableStream","Request","Response","Headers"].map(x),ur=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function re(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),G(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function Ft(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}const I=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mt=t=>!ne(t)&&t!==I;function Le(){const{caseless:t}=Mt(this)&&this||{},e={},r=(n,o)=>{const i=t&&Ft(e,o)||o;me(e[i])&&me(n)?e[i]=Le(e[i],n):me(n)?e[i]=Le({},n):G(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&re(arguments[n],r);return e}const cr=(t,e,r,{allOwnKeys:n}={})=>(re(e,(o,i)=>{r&&P(o)?t[i]=jt(o,r):t[i]=o},{allOwnKeys:n}),t),lr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fr=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},dr=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Xe(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},pr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},mr=t=>{if(!t)return null;if(G(t))return t;let e=t.length;if(!Dt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},hr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Xe(Uint8Array)),yr=(t,e)=>{const n=(t&&t[Oe]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},gr=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},br=x("HTMLFormElement"),vr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),rt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),wr=x("RegExp"),Bt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};re(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},Sr=t=>{Bt(t,(e,r)=>{if(P(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(P(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Or=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return G(t)?n(t):n(String(t).split(e)),r},Er=()=>{},Ar=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Tr(t){return!!(t&&P(t.append)&&t[Ct]==="FormData"&&t[Oe])}const Rr=t=>{const e=new Array(10),r=(n,o)=>{if(Te(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const i=G(n)?[]:{};return re(n,(s,a)=>{const u=r(s,o+1);!ne(u)&&(i[a]=u)}),e[o]=void 0,i}}return n};return r(t,0)},Pr=x("AsyncFunction"),kr=t=>t&&(Te(t)||P(t))&&P(t.then)&&P(t.catch),It=((t,e)=>t?setImmediate:e?((r,n)=>(I.addEventListener("message",({source:o,data:i})=>{o===I&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),I.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",P(I.postMessage)),Nr=typeof queueMicrotask<"u"?queueMicrotask.bind(I):typeof process<"u"&&process.nextTick||It,_r=t=>t!=null&&P(t[Oe]),d={isArray:G,isArrayBuffer:qt,isBuffer:Xn,isFormData:nr,isArrayBufferView:Jn,isString:Qn,isNumber:Dt,isBoolean:Kn,isObject:Te,isPlainObject:me,isReadableStream:or,isRequest:ir,isResponse:sr,isHeaders:ar,isUndefined:ne,isDate:Gn,isFile:Yn,isBlob:Zn,isRegExp:wr,isFunction:P,isStream:tr,isURLSearchParams:rr,isTypedArray:hr,isFileList:er,forEach:re,merge:Le,extend:cr,trim:ur,stripBOM:lr,inherits:fr,toFlatObject:dr,kindOf:Ee,kindOfTest:x,endsWith:pr,toArray:mr,forEachEntry:yr,matchAll:gr,isHTMLForm:br,hasOwnProperty:rt,hasOwnProp:rt,reduceDescriptors:Bt,freezeMethods:Sr,toObjectSet:Or,toCamelCase:vr,noop:Er,toFiniteNumber:Ar,findKey:Ft,global:I,isContextDefined:Mt,isSpecCompliantForm:Tr,toJSONObject:Rr,isAsyncFn:Pr,isThenable:kr,setImmediate:It,asap:Nr,isIterable:_r};function b(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(b,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Ut=b.prototype,Lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Lt[t]={value:t}});Object.defineProperties(b,Lt);Object.defineProperty(Ut,"isAxiosError",{value:!0});b.from=(t,e,r,n,o,i)=>{const s=Object.create(Ut);return d.toFlatObject(t,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),b.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const xr=null;function $e(t){return d.isPlainObject(t)||d.isArray(t)}function $t(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function ot(t,e,r){return t?t.concat(e).map(function(o,i){return o=$t(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function jr(t){return d.isArray(t)&&!t.some($e)}const Cr=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Re(t,e,r){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,h){return!d.isUndefined(h[g])});const n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(d.isDate(m))return m.toISOString();if(d.isBoolean(m))return m.toString();if(!u&&d.isBlob(m))throw new b("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(m)||d.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,g,h){let v=m;if(m&&!h&&typeof m=="object"){if(d.endsWith(g,"{}"))g=n?g:g.slice(0,-2),m=JSON.stringify(m);else if(d.isArray(m)&&jr(m)||(d.isFileList(m)||d.endsWith(g,"[]"))&&(v=d.toArray(m)))return g=$t(g),v.forEach(function(O,C){!(d.isUndefined(O)||O===null)&&e.append(s===!0?ot([g],C,i):s===null?g:g+"[]",c(O))}),!1}return $e(m)?!0:(e.append(ot(h,g,i),c(m)),!1)}const f=[],p=Object.assign(Cr,{defaultVisitor:l,convertValue:c,isVisitable:$e});function y(m,g){if(!d.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(m),d.forEach(m,function(v,w){(!(d.isUndefined(v)||v===null)&&o.call(e,v,d.isString(w)?w.trim():w,g,p))===!0&&y(v,g?g.concat(w):[w])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return y(t),e}function it(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Je(t,e){this._pairs=[],t&&Re(t,this,e)}const Ht=Je.prototype;Ht.append=function(e,r){this._pairs.push([e,r])};Ht.toString=function(e){const r=e?function(n){return e.call(this,n,it)}:it;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function qr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vt(t,e,r){if(!e)return t;const n=r&&r.encode||qr;d.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(e,r):i=d.isURLSearchParams(e)?e.toString():new Je(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class st{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Wt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dr=typeof URLSearchParams<"u"?URLSearchParams:Je,Fr=typeof FormData<"u"?FormData:null,Mr=typeof Blob<"u"?Blob:null,Br={isBrowser:!0,classes:{URLSearchParams:Dr,FormData:Fr,Blob:Mr},protocols:["http","https","file","blob","url","data"]},Qe=typeof window<"u"&&typeof document<"u",He=typeof navigator=="object"&&navigator||void 0,Ir=Qe&&(!He||["ReactNative","NativeScript","NS"].indexOf(He.product)<0),Ur=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lr=Qe&&window.location.href||"http://localhost",$r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qe,hasStandardBrowserEnv:Ir,hasStandardBrowserWebWorkerEnv:Ur,navigator:He,origin:Lr},Symbol.toStringTag,{value:"Module"})),T={...$r,...Br};function Hr(t,e){return Re(t,new T.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return T.isNode&&d.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Vr(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Wr(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function zt(t){function e(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=i>=r.length;return s=!s&&d.isArray(o)?o.length:s,u?(d.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&d.isArray(o[s])&&(o[s]=Wr(o[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const r={};return d.forEachEntry(t,(n,o)=>{e(Vr(n),o,r,0)}),r}return null}function zr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const oe={transitional:Wt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=d.isObject(e);if(i&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return o?JSON.stringify(zt(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Hr(e,this.formSerializer).toString();if((a=d.isFileList(e))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Re(a?{"files[]":e}:e,u&&new u,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),zr(e)):e}],transformResponse:[function(e){const r=this.transitional||oe.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?b.from(a,b.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],t=>{oe.headers[t]={}});const Xr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Jr=t=>{const e={};let r,n,o;return t&&t.split(`
2
2
  `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&Xr[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},at=Symbol("internals");function Z(t){return t&&String(t).trim().toLowerCase()}function he(t){return t===!1||t==null?t:d.isArray(t)?t.map(he):String(t)}function Qr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Kr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Fe(t,e,r,n,o){if(d.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!d.isString(e)){if(d.isString(n))return e.indexOf(n)!==-1;if(d.isRegExp(n))return n.test(e)}}function Gr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Yr(t,e){const r=d.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}let k=class{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function i(a,u,c){const l=Z(u);if(!l)throw new Error("header name must be a non-empty string");const f=d.findKey(o,l);(!f||o[f]===void 0||c===!0||c===void 0&&o[f]!==!1)&&(o[f||u]=he(a))}const s=(a,u)=>d.forEach(a,(c,l)=>i(c,l,u));if(d.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(d.isString(e)&&(e=e.trim())&&!Kr(e))s(Jr(e),r);else if(d.isObject(e)&&d.isIterable(e)){let a={},u,c;for(const l of e){if(!d.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(u=a[c])?d.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}s(a,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=Z(e),e){const n=d.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return Qr(o);if(d.isFunction(r))return r.call(this,o,n);if(d.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Z(e),e){const n=d.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Fe(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function i(s){if(s=Z(s),s){const a=d.findKey(n,s);a&&(!r||Fe(n,n[a],a,r))&&(delete n[a],o=!0)}}return d.isArray(e)?e.forEach(i):i(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!e||Fe(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const r=this,n={};return d.forEach(this,(o,i)=>{const s=d.findKey(n,i);if(s){r[s]=he(o),delete r[i];return}const a=e?Gr(i):String(i).trim();a!==i&&delete r[i],r[a]=he(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return d.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&d.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
3
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[at]=this[at]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Z(s);n[a]||(Yr(o,s),n[a]=!0)}return d.isArray(e)?e.forEach(i):i(e),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(k.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});d.freezeMethods(k);function Me(t,e){const r=this||oe,n=e||r,o=k.from(n.headers);let i=n.data;return d.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Xt(t){return!!(t&&t.__CANCEL__)}function Y(t,e,r){b.call(this,t??"canceled",b.ERR_CANCELED,e,r),this.name="CanceledError"}d.inherits(Y,b,{__CANCEL__:!0});function Jt(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new b("Request failed with status code "+r.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Zr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function eo(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),l=n[i];s||(s=c),r[o]=u,n[o]=c;let f=i,p=0;for(;f!==o;)p+=r[f++],f=f%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),c-s<e)return;const y=l&&c-l;return y?Math.round(p*1e3/y):void 0}}function to(t,e){let r=0,n=1e3/e,o,i;const s=(c,l=Date.now())=>{r=l,o=null,i&&(clearTimeout(i),i=null),t.apply(null,c)};return[(...c)=>{const l=Date.now(),f=l-r;f>=n?s(c,l):(o=c,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const ve=(t,e,r=3)=>{let n=0;const o=eo(50,250);return to(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,u=s-n,c=o(u),l=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a&&l?(a-s)/c:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},r)},ut=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},ct=t=>(...e)=>d.asap(()=>t(...e)),no=T.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,T.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,ro=T.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const s=[t+"="+encodeURIComponent(e)];d.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),d.isString(n)&&s.push("path="+n),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oo(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function io(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Qt(t,e,r){let n=!oo(e);return t&&(n||r==!1)?io(t,e):e}const lt=t=>t instanceof k?{...t}:t;function H(t,e){e=e||{};const r={};function n(c,l,f,p){return d.isPlainObject(c)&&d.isPlainObject(l)?d.merge.call({caseless:p},c,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function o(c,l,f,p){if(d.isUndefined(l)){if(!d.isUndefined(c))return n(void 0,c,f,p)}else return n(c,l,f,p)}function i(c,l){if(!d.isUndefined(l))return n(void 0,l)}function s(c,l){if(d.isUndefined(l)){if(!d.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,f){if(f in e)return n(c,l);if(f in t)return n(void 0,c)}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,l,f)=>o(lt(c),lt(l),f,!0)};return d.forEach(Object.keys(Object.assign({},t,e)),function(l){const f=u[l]||o,p=f(t[l],e[l],l);d.isUndefined(p)&&f!==a||(r[l]=p)}),r}const Kt=t=>{const e=H({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=e;e.headers=s=k.from(s),e.url=Vt(Qt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(d.isFormData(r)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((u=s.getContentType())!==!1){const[c,...l]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...l].join("; "))}}if(T.hasStandardBrowserEnv&&(n&&d.isFunction(n)&&(n=n(e)),n||n!==!1&&no(e.url))){const c=o&&i&&ro.read(i);c&&s.set(o,c)}return e},so=typeof XMLHttpRequest<"u",ao=so&&function(t){return new Promise(function(r,n){const o=Kt(t);let i=o.data;const s=k.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:c}=o,l,f,p,y,m;function g(){y&&y(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function v(){if(!h)return;const O=k.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:O,config:t,request:h};Jt(function(B){r(B),g()},function(B){n(B),g()},R),h=null}"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},h.onabort=function(){h&&(n(new b("Request aborted",b.ECONNABORTED,t,h)),h=null)},h.onerror=function(){n(new b("Network Error",b.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||Wt;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),n(new b(C,R.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,h)),h=null},i===void 0&&s.setContentType(null),"setRequestHeader"in h&&d.forEach(s.toJSON(),function(C,R){h.setRequestHeader(R,C)}),d.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),a&&a!=="json"&&(h.responseType=o.responseType),c&&([p,m]=ve(c,!0),h.addEventListener("progress",p)),u&&h.upload&&([f,y]=ve(u),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(l=O=>{h&&(n(!O||O.type?new Y(null,t,h):O),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const w=Zr(o.url);if(w&&T.protocols.indexOf(w)===-1){n(new b("Unsupported protocol "+w+":",b.ERR_BAD_REQUEST,t));return}h.send(i||null)})},uo=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o;const i=function(c){if(!o){o=!0,a();const l=c instanceof Error?c:this.reason;n.abort(l instanceof b?l:new Y(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,i(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),t=null)};t.forEach(c=>c.addEventListener("abort",i));const{signal:u}=n;return u.unsubscribe=()=>d.asap(a),u}},co=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},lo=async function*(t,e){for await(const r of fo(t))yield*co(r,e)},fo=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},ft=(t,e,r,n)=>{const o=lo(t,e);let i=0,s,a=u=>{s||(s=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:c,value:l}=await o.next();if(c){a(),u.close();return}let f=l.byteLength;if(r){let p=i+=f;r(p)}u.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Pe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Gt=Pe&&typeof ReadableStream=="function",po=Pe&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Yt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mo=Gt&&Yt(()=>{let t=!1;const e=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),dt=64*1024,Ve=Gt&&Yt(()=>d.isReadableStream(new Response("").body)),we={stream:Ve&&(t=>t.body)};Pe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!we[e]&&(we[e]=d.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new b(`Response type '${e}' is not supported`,b.ERR_NOT_SUPPORT,n)})})})(new Response);const ho=async t=>{if(t==null)return 0;if(d.isBlob(t))return t.size;if(d.isSpecCompliantForm(t))return(await new Request(T.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(d.isArrayBufferView(t)||d.isArrayBuffer(t))return t.byteLength;if(d.isURLSearchParams(t)&&(t=t+""),d.isString(t))return(await po(t)).byteLength},yo=async(t,e)=>{const r=d.toFiniteNumber(t.getContentLength());return r??ho(e)},go=Pe&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:l,withCredentials:f="same-origin",fetchOptions:p}=Kt(t);c=c?(c+"").toLowerCase():"text";let y=uo([o,i&&i.toAbortSignal()],s),m;const g=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let h;try{if(u&&mo&&r!=="get"&&r!=="head"&&(h=await yo(l,n))!==0){let R=new Request(e,{method:"POST",body:n,duplex:"half"}),q;if(d.isFormData(n)&&(q=R.headers.get("content-type"))&&l.setContentType(q),R.body){const[B,ae]=ut(h,ve(ct(u)));n=ft(R.body,dt,B,ae)}}d.isString(f)||(f=f?"include":"omit");const v="credentials"in Request.prototype;m=new Request(e,{...p,signal:y,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:v?f:void 0});let w=await fetch(m,p);const O=Ve&&(c==="stream"||c==="response");if(Ve&&(a||O&&g)){const R={};["status","statusText","headers"].forEach(Ke=>{R[Ke]=w[Ke]});const q=d.toFiniteNumber(w.headers.get("content-length")),[B,ae]=a&&ut(q,ve(ct(a),!0))||[];w=new Response(ft(w.body,dt,B,()=>{ae&&ae(),g&&g()}),R)}c=c||"text";let C=await we[d.findKey(we,c)||"text"](w,t);return!O&&g&&g(),await new Promise((R,q)=>{Jt(R,q,{data:C,headers:k.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:m})})}catch(v){throw g&&g(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,t,m),{cause:v.cause||v}):b.from(v,v&&v.code,t,m)}}),We={http:xr,xhr:ao,fetch:go};d.forEach(We,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const pt=t=>`- ${t}`,bo=t=>d.isFunction(t)||t===null||t===!1,Zt={getAdapter:t=>{t=d.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i<e;i++){r=t[i];let s;if(n=r,!bo(r)&&(n=We[(s=String(r)).toLowerCase()],n===void 0))throw new b(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
4
4
  `+i.map(pt).join(`
package/badge.mjs CHANGED
@@ -931,8 +931,8 @@ var zn = function() {
931
931
  }();
932
932
  Jn.type = "backend";
933
933
  const Kn = globalThis.__STORE_SDK_CONTEXT__ ||= kt(void 0), Qn = () => {
934
- const t = mn(Kn);
935
- return t || console.error("You must wrap your component in a <DataProvider>"), t?.sdkType === "dummy" || t?.sdkType === "vendure", t;
934
+ const e = mn(Kn)?.sdk;
935
+ return e || console.error("You must wrap your component in a <DataProvider>"), e?.sdkType === "dummy" || e?.sdkType === "vendure", e;
936
936
  };
937
937
  new Nt();
938
938
  function Dt(t, e) {
package/elastic.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/exports/elastic'
2
+ export {}
package/elastic.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CATkY-bf.js"),i=new e.VendurePluginConfig({name:"vendure-elastic-search",queryUpdates:{search:{fields:[{prices:[{range:["min","max"],rangeWithTax:["min","max"]}]}]},searchField:{fields:[{prices:[{range:["min","max"],rangeWithTax:["min","max"]}]}]}}});exports.VendureElasticSearchPlugin=i;
package/elastic.mjs ADDED
@@ -0,0 +1,25 @@
1
+ import { V as e } from "./index-Wcc0o6jA.mjs";
2
+ const i = new e({
3
+ name: "vendure-elastic-search",
4
+ queryUpdates: {
5
+ search: {
6
+ fields: [{
7
+ prices: [{
8
+ range: ["min", "max"],
9
+ rangeWithTax: ["min", "max"]
10
+ }]
11
+ }]
12
+ },
13
+ searchField: {
14
+ fields: [{
15
+ prices: [{
16
+ range: ["min", "max"],
17
+ rangeWithTax: ["min", "max"]
18
+ }]
19
+ }]
20
+ }
21
+ }
22
+ });
23
+ export {
24
+ i as VendureElasticSearchPlugin
25
+ };
@@ -0,0 +1,31 @@
1
+ declare module '@haus-storefront-react/shared-types' {
2
+ interface SearchResult {
3
+ prices: SearchResponsePriceData;
4
+ }
5
+ interface SearchInput {
6
+ priceRange?: Maybe<PriceRangeInput>;
7
+ priceRangeWithTax?: Maybe<PriceRangeInput>;
8
+ inStock?: Maybe<boolean>;
9
+ }
10
+ interface FilterInputs {
11
+ priceRange?: PriceRangeInput;
12
+ priceRangeWithTax?: PriceRangeInput;
13
+ }
14
+ interface SearchResponsePriceData {
15
+ range: PriceRange;
16
+ rangeWithTax: PriceRange;
17
+ }
18
+ interface SearchInputProps {
19
+ priceRange?: PriceRangeInput;
20
+ priceRangeWithTax?: PriceRangeInput;
21
+ }
22
+ interface PriceRangeBucket {
23
+ to: number;
24
+ count: number;
25
+ }
26
+ type PriceRangeInput = {
27
+ max: number;
28
+ min: number;
29
+ };
30
+ }
31
+ export {};
@@ -0,0 +1,38 @@
1
+ import { VendurePluginConfig } from '../plugin-config';
2
+ export declare const VendureElasticSearchPlugin: VendurePluginConfig<Partial<{
3
+ showBadges: (props: {
4
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
5
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
6
+ parentComponent?: keyof import('./vendure-badge-plugin.types').BadgePluginSettings["availablePositions"];
7
+ badges: import('@haus-storefront-react/shared-types').Maybe<import('@haus-storefront-react/shared-types').Badge[]>;
8
+ }) => {
9
+ badges: import('@haus-storefront-react/shared-types').Badge[];
10
+ availablePositions?: string[];
11
+ };
12
+ showCampaignPrices: boolean;
13
+ ordinaryPrice: (props: {
14
+ product?: import('@haus-storefront-react/shared-types').Product;
15
+ searchResult?: import('@haus-storefront-react/shared-types').SearchResult;
16
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
17
+ orderLine?: import('@haus-storefront-react/shared-types').OrderLine;
18
+ identifier?: string;
19
+ }) => import('@haus-storefront-react/shared-types').Price;
20
+ changeQuantityByPackageSize: (props: {
21
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
22
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
23
+ identifier: string;
24
+ }) => boolean;
25
+ showPackageSize: (props: {
26
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
27
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
28
+ identifier: string;
29
+ }) => boolean;
30
+ showCostPerPackage: (props: {
31
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
32
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
33
+ identifier: string;
34
+ }) => boolean;
35
+ sortByPopularity: boolean;
36
+ }>, Record<string, (...args: any[]) => any>, {
37
+ [x: string]: any;
38
+ }, import('@haus-storefront-react/shared-types').IGraphQLSDK>;
@@ -2,3 +2,4 @@ export * from '../configs/vendure-badge-plugin.augmentation';
2
2
  export * from '../configs/vendure-campaign-plugin.augmentation';
3
3
  export * from '../configs/vendure-packagesize-plugin.augmentation';
4
4
  export * from '../configs/vendure-product-popularity-plugin.augmentation';
5
+ export * from '../configs/vendure-elastic-search-plugin.augmentation';
@@ -0,0 +1 @@
1
+ export * from '../configs/vendure-elastic-search-plugin';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-storefront-react/vendure-plugin-configs",
3
- "version": "0.0.32-2",
3
+ "version": "0.0.32-3",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -21,6 +21,12 @@
21
21
  "require": "./badge.js",
22
22
  "default": "./badge"
23
23
  },
24
+ "./elastic": {
25
+ "types": "./lib/exports/elastic.d.ts",
26
+ "import": "./elastic.mjs",
27
+ "require": "./elastic.js",
28
+ "default": "./elastic"
29
+ },
24
30
  "./campaign": {
25
31
  "types": "./lib/exports/campaign.d.ts",
26
32
  "import": "./campaign.mjs",
@@ -41,8 +47,8 @@
41
47
  }
42
48
  },
43
49
  "dependencies": {
44
- "@haus-storefront-react/common-utils": "0.0.32-2",
45
- "@haus-storefront-react/core": "0.0.32-2",
46
- "@haus-storefront-react/shared-types": "0.0.32-2"
50
+ "@haus-storefront-react/common-utils": "0.0.32-3",
51
+ "@haus-storefront-react/core": "0.0.32-3",
52
+ "@haus-storefront-react/shared-types": "0.0.32-3"
47
53
  }
48
54
  }