@haus-storefront-react/vendure-plugin-configs 0.0.52-3 → 0.0.52-4
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 +8 -0
- package/badge.js +9 -9
- package/badge.mjs +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/badge.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./index-TovLbd0h.js"),A=require("./index-BXYyq-8r.js"),se=require("react"),ke=require("@tanstack/react-query");function hn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const E=hn(se),H=new xe.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const n=e?H.getSettings().availablePositions[e]:H.getSettings().defaultPositions;return{badges:xe.lodashExports.filter(t,i=>n?n.includes(i.position):!0),availablePositions:n}}},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"]}}});H.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"]}]}]}]}});H.setRequests({getBadges:async()=>H.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 yn(t){const e=[];function n(i,o){const s=E.createContext(o),a=e.length;e.push(s);const c=l=>{const f=A.compilerRuntimeExports.c(8);let h,g,p;f[0]!==l?({scope:p,children:h,...g}=l,f[0]=l,f[1]=h,f[2]=g,f[3]=p):(h=f[1],g=f[2],p=f[3]);const y=p?.[t]?.[a]||s,m=g;let S;return f[4]!==y.Provider||f[5]!==h||f[6]!==m?(S=A.jsxRuntimeExports.jsx(y.Provider,{value:m,children:h}),f[4]=y.Provider,f[5]=h,f[6]=m,f[7]=S):S=f[7],S};c.displayName=i+"Provider";function u(l,f){const h=f?.[t]?.[a]||s,g=E.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[c,u]}function r(){const i=e.map(o=>E.createContext(o));return function(s){const a=s?.[t]||i;return E.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return r.scopeName=t,[n,r]}function gn(t,e){if(e==="web")return t;const{src:n,alt:r,width:i,height:o,...s}=t,a=[typeof i=="number"?{width:i}:void 0,typeof o=="number"?{height:o}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...s,source:{uri:n},...c?{style:c}:{}}}function bn(t){const{src:e,alt:n,...r}=t;return e?{...r,source:{uri:e}}:r}const Sn={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 wn(t,e){if(e==="web")return t;let n=null;try{n=require("react-native")}catch{n=null}if(!n)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const r=Sn[t];if(!r)return console.warn(`No native component mapping found for '${t}', falling back to View`),n.View;if(r==="Image"){const o=se.forwardRef((s,a)=>{const c=A.compilerRuntimeExports.c(5);if(!s.src)return null;let u;c[0]!==s?(u=bn(s),c[0]=s,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=A.jsxRuntimeExports.jsx(n.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return o.displayName="PlatformPrimitiveImage",o}const i=n[r];return i||(console.warn(`Native component '${r}' not found, falling back to View`),n.View)}const An=Symbol("radix.slottable");function vn(...t){return e=>t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}function En(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const c=o(...a);return i(...a),c}:i&&(n[r]=i):r==="style"?n[r]=On(i,o):r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function On(t,e){let n=null;try{n=require("react-native")}catch{n=null}const r=n?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return o=>{const s=[t(o),e(o)];return r?r(s):s};if(typeof t=="function")return o=>{const s=e?[t(o),e]:t(o);return r?r(s):s};if(typeof e=="function")return o=>{const s=t?[t,e(o)]:e(o);return r?r(s):s};const i=[t,e].filter(Boolean);return r?r(i):i}function Tn(t){return E.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===An}function xn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Rn(t,e){const n=E.forwardRef((r,i)=>{const{children:o,...s}=r;if(E.isValidElement(o)){const a=xn(o),c=En(s,o.props);return o.type!==E.Fragment&&(c.ref=i?vn(i,a):a),E.cloneElement(o,c)}return E.Children.count(o)>1?E.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}function Ne(t,e=!1,n="div"){if(!e)return wn(n,t);const r=Rn("Slot"),i=E.forwardRef((o,s)=>{const a=A.compilerRuntimeExports.c(15);let c,u;a[0]!==o?({children:c,...u}=o,a[0]=o,a[1]=c,a[2]=u):(c=a[1],u=a[2]);let l;if(a[3]!==c||a[4]!==s||a[5]!==u){l=Symbol.for("react.early_return_sentinel");e:{const h=E.Children.toArray(c),g=h.find(Tn);if(g){const p=g.props.children,y=h.map(T=>T===g?E.Children.count(p)>1?E.Children.only(null):E.isValidElement(p)?p.props.children:null:T),m=E.isValidElement(p)?E.cloneElement(p,void 0,y):null;let S;a[7]!==s||a[8]!==u||a[9]!==m?(S=A.jsxRuntimeExports.jsx(r,{...u,ref:s,children:m}),a[7]=s,a[8]=u,a[9]=m,a[10]=S):S=a[10],l=S;break e}}a[3]=c,a[4]=s,a[5]=u,a[6]=l}else l=a[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let f;return a[11]!==c||a[12]!==s||a[13]!==u?(f=A.jsxRuntimeExports.jsx(r,{...u,ref:s,children:c}),a[11]=c,a[12]=s,a[13]=u,a[14]=f):f=a[14],f});return i.displayName="Slot",i}const kn="debug",_=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(kn);return t==="true"||t==="1"}catch{return!1}},Nn=()=>{const t=(e,n,r=[])=>n?typeof e=="string"?[`<${n}> ${e}`,...r]:[`<${n}>`,e,...r]:Array.isArray(e)?[...e,...r]:[e,...r];return{log:(e,n,...r)=>{_()&&console.log(...t(e,n,r))},info:(e,n,...r)=>{_()&&console.info(...t(e,n,r))},warn:(e,n,...r)=>{_()&&console.warn(...t(e,n,r))},error:(e,n,...r)=>{_()&&console.error(...t(e,n,r))},debug:(e,n,...r)=>{_()&&console.debug(...t(e,n,r))},group:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.group(n?r?`<${n}> ${r}`:`<${n}>`:r)}},groupCollapsed:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.groupCollapsed(n?r?`<${n}> ${r}`:`<${n}>`:r)}},groupEnd:()=>{_()&&console.groupEnd()},table:(e,n,r)=>{_()&&(n&&console.log(`<${n}>`),console.table(e,r))},time:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.time(n?r?`<${n}> ${r}`:`<${n}>`:r)}},timeEnd:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.timeEnd(n?r?`<${n}> ${r}`:`<${n}>`:r)}}}},Cn=Nn();function _n(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(i){i(n)}),(r=t.get("*"))&&r.slice().map(function(i){i(e,n)})}}}let Z;try{Z=require("@react-native-async-storage/async-storage").default}catch{Z=null}let We=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");We=new t}catch{We=null}const K=typeof window<"u"&&typeof window.localStorage<"u",J=!!Z,ye={},$e={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},Le=()=>{try{return We?.getStore?.()??null}catch{return null}},B={getItem:async t=>{const e=!K&&!J?Le():null;return e?e.getItem(t):J?Z.getItem(t):K?new Promise(n=>{Promise.resolve().then(()=>{const r=window.localStorage.getItem(t),i=ye[t];r!==i&&(ye[t]=r||""),n(r)})}):$e.getItem(t)},setItem:async(t,e)=>{const n=!K&&!J?Le():null;return n?n.setItem(t,e):J?Z.setItem(t,e):K?new Promise((r,i)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const o=window.localStorage.getItem(t);o===e?(ye[t]=e,r()):i(new Error(`Failed to set localStorage item: expected "${e}", got "${o}"`))}catch(o){i(o)}})}):$e.setItem(t,e)},removeItem:async t=>{const e=!K&&!J?Le():null;return e?e.removeItem(t):J?Z.removeItem(t):K?new Promise((n,r)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const i=window.localStorage.getItem(t);i===null?(delete ye[t],n()):r(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${i}"`))}catch(i){r(i)}})}):$e.removeItem(t)}},at=50,I={get:async()=>{try{const t=await B.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await B.setItem("eventHistory",JSON.stringify(t.slice(-at)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await B.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await I.get();await I.set([{...t,timestamp:Date.now()},...e].slice(-at))},find:async t=>(await I.get()).find(n=>n.key===t.key&&n.identifier===t.identifier),filter:async(t,e)=>{const n=await I.get();return e?n.filter(e):n.filter(({key:r,identifier:i})=>(!r||t.key===r)&&(!i||t.identifier===i))}};function Pn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=_n(),t.__HAUS_EVENT_EMITTER__}function W(t){const e=Pn(),n=(...c)=>console.error(...c);I.get().then(c=>{const l=xe.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(Cn.info("Clearing event history since it is older than 1 hour:","eventBus",l),I.clear())});const r=(c,u,l)=>{const f=h=>{try{if(typeof h=="object"&&h!==null){const{identifier:g,data:p}=h;(!g||g===l)&&u(p)}else u(h)}catch(g){n(g)}};return e.on(c,f),()=>{i(c,u,l)}},i=(c,u,l)=>{const f=h=>{if(typeof h=="object"&&h!==null){const{identifier:g}=h;(!g||g===l)&&e.off(c,u)}};e.off(c,f)};return{on:r,off:i,once:(c,u,l)=>{const f=h=>{try{if(typeof h=="object"&&h!==null){const{identifier:g,data:p}=h;(!g||g===l)&&u(p)}else u(h)}finally{i(c,f,l)}};e.on(c,f)},emit:(c,u,...l)=>{const f={identifier:u,data:l.length===1?l[0]:l};I.push({key:c,identifier:u,payload:f.data}),e.emit(c,f)},getEventHistory:(c,u)=>I.filter({key:c,identifier:u})}}W();W();W();W();W();W();W();new ke.QueryClient;function jt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Dn}=Object.prototype,{getPrototypeOf:Xe}=Object,{iterator:Ce,toStringTag:Mt}=Symbol,_e=(t=>e=>{const n=Dn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>_e(e)===t),Pe=t=>e=>typeof e===t,{isArray:te}=Array,ee=Pe("undefined");function ae(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&R(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bt=D("ArrayBuffer");function qn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Bt(t.buffer),e}const Fn=Pe("string"),R=Pe("function"),It=Pe("number"),ce=t=>t!==null&&typeof t=="object",jn=t=>t===!0||t===!1,Ee=t=>{if(_e(t)!=="object")return!1;const e=Xe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Mt in t)&&!(Ce in t)},Mn=t=>{if(!ce(t)||ae(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Bn=D("Date"),In=D("File"),Un=D("Blob"),$n=D("FileList"),Ln=t=>ce(t)&&R(t.pipe),Vn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||R(t.append)&&((e=_e(t))==="formdata"||e==="object"&&R(t.toString)&&t.toString()==="[object FormData]"))},Hn=D("URLSearchParams"),[Qn,Wn,zn,Kn]=["ReadableStream","Request","Response","Headers"].map(D),Jn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ue(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),te(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(ae(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Ut(t,e){if(ae(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$t=t=>!ee(t)&&t!==L;function ze(){const{caseless:t,skipUndefined:e}=$t(this)&&this||{},n={},r=(i,o)=>{const s=t&&Ut(n,o)||o;Ee(n[s])&&Ee(i)?n[s]=ze(n[s],i):Ee(i)?n[s]=ze({},i):te(i)?n[s]=i.slice():(!e||!ee(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&ue(arguments[i],r);return n}const Gn=(t,e,n,{allOwnKeys:r}={})=>(ue(e,(i,o)=>{n&&R(i)?t[o]=jt(i,n):t[o]=i},{allOwnKeys:r}),t),Xn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Zn=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&Xe(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},er=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},tr=t=>{if(!t)return null;if(te(t))return t;let e=t.length;if(!It(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},nr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Xe(Uint8Array)),rr=(t,e)=>{const r=(t&&t[Ce]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},ir=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},or=D("HTMLFormElement"),sr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ct=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ar=D("RegExp"),Lt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ue(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},cr=t=>{Lt(t,(e,n)=>{if(R(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(R(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ur=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return te(t)?r(t):r(String(t).split(e)),n},lr=()=>{},dr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function fr(t){return!!(t&&R(t.append)&&t[Mt]==="FormData"&&t[Ce])}const pr=t=>{const e=new Array(10),n=(r,i)=>{if(ce(r)){if(e.indexOf(r)>=0)return;if(ae(r))return r;if(!("toJSON"in r)){e[i]=r;const o=te(r)?[]:{};return ue(r,(s,a)=>{const c=n(s,i+1);!ee(c)&&(o[a]=c)}),e[i]=void 0,o}}return r};return n(t,0)},mr=D("AsyncFunction"),hr=t=>t&&(ce(t)||R(t))&&R(t.then)&&R(t.catch),Vt=((t,e)=>t?setImmediate:e?((n,r)=>(L.addEventListener("message",({source:i,data:o})=>{i===L&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),L.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",R(L.postMessage)),yr=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Vt,gr=t=>t!=null&&R(t[Ce]),d={isArray:te,isArrayBuffer:Bt,isBuffer:ae,isFormData:Vn,isArrayBufferView:qn,isString:Fn,isNumber:It,isBoolean:jn,isObject:ce,isPlainObject:Ee,isEmptyObject:Mn,isReadableStream:Qn,isRequest:Wn,isResponse:zn,isHeaders:Kn,isUndefined:ee,isDate:Bn,isFile:In,isBlob:Un,isRegExp:ar,isFunction:R,isStream:Ln,isURLSearchParams:Hn,isTypedArray:nr,isFileList:$n,forEach:ue,merge:ze,extend:Gn,trim:Jn,stripBOM:Xn,inherits:Yn,toFlatObject:Zn,kindOf:_e,kindOfTest:D,endsWith:er,toArray:tr,forEachEntry:rr,matchAll:ir,isHTMLForm:or,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:Lt,freezeMethods:cr,toObjectSet:ur,toCamelCase:sr,noop:lr,toFiniteNumber:dr,findKey:Ut,global:L,isContextDefined:$t,isSpecCompliantForm:fr,toJSONObject:pr,isAsyncFn:mr,isThenable:hr,setImmediate:Vt,asap:yr,isIterable:gr};function b(t,e,n,r,i){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),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.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 Ht=b.prototype,Qt={};["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=>{Qt[t]={value:t}});Object.defineProperties(b,Qt);Object.defineProperty(Ht,"isAxiosError",{value:!0});b.from=(t,e,n,r,i,o)=>{const s=Object.create(Ht);d.toFlatObject(t,s,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=t&&t.message?t.message:"Error",c=e==null&&t?t.code:e;return b.call(s,a,c,n,r,i),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",o&&Object.assign(s,o),s};const br=null;function Ke(t){return d.isPlainObject(t)||d.isArray(t)}function Wt(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function ut(t,e,n){return t?t.concat(e).map(function(i,o){return i=Wt(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Sr(t){return d.isArray(t)&&!t.some(Ke)}const wr=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function De(t,e,n){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!d.isUndefined(m[y])});const r=n.metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new b("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,m){let S=p;if(p&&!m&&typeof p=="object"){if(d.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Sr(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(S=d.toArray(p)))return y=Wt(y),S.forEach(function(v,x){!(d.isUndefined(v)||v===null)&&e.append(s===!0?ut([y],x,o):s===null?y:y+"[]",u(v))}),!1}return Ke(p)?!0:(e.append(ut(m,y,o),u(p)),!1)}const f=[],h=Object.assign(wr,{defaultVisitor:l,convertValue:u,isVisitable:Ke});function g(p,y){if(!d.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(p),d.forEach(p,function(S,T){(!(d.isUndefined(S)||S===null)&&i.call(e,S,d.isString(T)?T.trim():T,y,h))===!0&&g(S,y?y.concat(T):[T])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return g(t),e}function lt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Ye(t,e){this._pairs=[],t&&De(t,this,e)}const zt=Ye.prototype;zt.append=function(e,n){this._pairs.push([e,n])};zt.toString=function(e){const n=e?function(r){return e.call(this,r,lt)}:lt;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ar(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kt(t,e,n){if(!e)return t;const r=n&&n.encode||Ar;d.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(e,n):o=d.isURLSearchParams(e)?e.toString():new Ye(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class dt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.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(r){r!==null&&e(r)})}}const Jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vr=typeof URLSearchParams<"u"?URLSearchParams:Ye,Er=typeof FormData<"u"?FormData:null,Or=typeof Blob<"u"?Blob:null,Tr={isBrowser:!0,classes:{URLSearchParams:vr,FormData:Er,Blob:Or},protocols:["http","https","file","blob","url","data"]},Ze=typeof window<"u"&&typeof document<"u",Je=typeof navigator=="object"&&navigator||void 0,xr=Ze&&(!Je||["ReactNative","NativeScript","NS"].indexOf(Je.product)<0),Rr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=Ze&&window.location.href||"http://localhost",Nr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ze,hasStandardBrowserEnv:xr,hasStandardBrowserWebWorkerEnv:Rr,navigator:Je,origin:kr},Symbol.toStringTag,{value:"Module"})),O={...Nr,...Tr};function Cr(t,e){return De(t,new O.classes.URLSearchParams,{visitor:function(n,r,i,o){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function _r(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pr(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Gt(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&d.isArray(i)?i.length:s,c?(d.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!d.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&d.isArray(i[s])&&(i[s]=Pr(i[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const n={};return d.forEachEntry(t,(r,i)=>{e(_r(r),i,n,0)}),n}return null}function Dr(t,e,n){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const le={transitional:Jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=d.isObject(e);if(o&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return i?JSON.stringify(Gt(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 n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Cr(e,this.formSerializer).toString();if((a=d.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return De(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Dr(e)):e}],transformResponse:[function(e){const n=this.transitional||le.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}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:O.classes.FormData,Blob:O.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=>{le.headers[t]={}});const qr=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"]),Fr=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./index-TovLbd0h.js"),v=require("./index-BXYyq-8r.js"),se=require("react"),ke=require("@tanstack/react-query");function hn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const E=hn(se),H=new xe.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const n=e?H.getSettings().availablePositions[e]:H.getSettings().defaultPositions;return{badges:xe.lodashExports.filter(t,i=>n?n.includes(i.position):!0),availablePositions:n}}},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"]}}});H.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"]}]}]}]}});H.setRequests({getBadges:async()=>H.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 yn(t){const e=[];function n(i,o){const s=E.createContext(o),a=e.length;e.push(s);const c=l=>{const f=v.compilerRuntimeExports.c(8);let h,g,p;f[0]!==l?({scope:p,children:h,...g}=l,f[0]=l,f[1]=h,f[2]=g,f[3]=p):(h=f[1],g=f[2],p=f[3]);const y=p?.[t]?.[a]||s,m=g;let S;return f[4]!==y.Provider||f[5]!==h||f[6]!==m?(S=v.jsxRuntimeExports.jsx(y.Provider,{value:m,children:h}),f[4]=y.Provider,f[5]=h,f[6]=m,f[7]=S):S=f[7],S};c.displayName=i+"Provider";function u(l,f){const h=f?.[t]?.[a]||s,g=E.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[c,u]}function r(){const i=e.map(o=>E.createContext(o));return function(s){const a=s?.[t]||i;return E.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return r.scopeName=t,[n,r]}function gn(t,e){if(e==="web")return t;const{src:n,alt:r,width:i,height:o,...s}=t,a=[typeof i=="number"?{width:i}:void 0,typeof o=="number"?{height:o}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...s,source:{uri:n},...c?{style:c}:{}}}function bn(t){const{src:e,alt:n,...r}=t;return e?{...r,source:{uri:e}}:r}const Sn={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 wn(t,e){if(e==="web")return t;let n=null;try{n=require("react-native")}catch{n=null}if(!n)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const r=Sn[t];if(!r)return console.warn(`No native component mapping found for '${t}', falling back to View`),n.View;if(r==="Image"){const o=se.forwardRef((s,a)=>{const c=v.compilerRuntimeExports.c(5);if(!s.src)return null;let u;c[0]!==s?(u=bn(s),c[0]=s,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=v.jsxRuntimeExports.jsx(n.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return o.displayName="PlatformPrimitiveImage",o}const i=n[r];return i||(console.warn(`Native component '${r}' not found, falling back to View`),n.View)}const vn=Symbol("radix.slottable");function An(...t){return e=>t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}function En(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const c=o(...a);return i(...a),c}:i&&(n[r]=i):r==="style"?n[r]=On(i,o):r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function On(t,e){let n=null;try{n=require("react-native")}catch{n=null}const r=n?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return o=>{const s=[t(o),e(o)];return r?r(s):s};if(typeof t=="function")return o=>{const s=e?[t(o),e]:t(o);return r?r(s):s};if(typeof e=="function")return o=>{const s=t?[t,e(o)]:e(o);return r?r(s):s};const i=[t,e].filter(Boolean);return r?r(i):i}function Tn(t){return E.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===vn}function xn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Rn(t,e){const n=E.forwardRef((r,i)=>{const{children:o,...s}=r;if(E.isValidElement(o)){const a=xn(o),c=En(s,o.props);return o.type!==E.Fragment&&(c.ref=i?An(i,a):a),E.cloneElement(o,c)}return E.Children.count(o)>1?E.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}function Ne(t,e=!1,n="div"){if(!e)return wn(n,t);const r=Rn("Slot"),i=E.forwardRef((o,s)=>{const a=v.compilerRuntimeExports.c(15);let c,u;a[0]!==o?({children:c,...u}=o,a[0]=o,a[1]=c,a[2]=u):(c=a[1],u=a[2]);let l;if(a[3]!==c||a[4]!==s||a[5]!==u){l=Symbol.for("react.early_return_sentinel");e:{const h=E.Children.toArray(c),g=h.find(Tn);if(g){const p=g.props.children,y=h.map(T=>T===g?E.Children.count(p)>1?E.Children.only(null):E.isValidElement(p)?p.props.children:null:T),m=E.isValidElement(p)?E.cloneElement(p,void 0,y):null;let S;a[7]!==s||a[8]!==u||a[9]!==m?(S=v.jsxRuntimeExports.jsx(r,{...u,ref:s,children:m}),a[7]=s,a[8]=u,a[9]=m,a[10]=S):S=a[10],l=S;break e}}a[3]=c,a[4]=s,a[5]=u,a[6]=l}else l=a[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let f;return a[11]!==c||a[12]!==s||a[13]!==u?(f=v.jsxRuntimeExports.jsx(r,{...u,ref:s,children:c}),a[11]=c,a[12]=s,a[13]=u,a[14]=f):f=a[14],f});return i.displayName="Slot",i}const kn="debug",_=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(kn);return t==="true"||t==="1"}catch{return!1}},Nn=()=>{const t=(e,n,r=[])=>n?typeof e=="string"?[`<${n}> ${e}`,...r]:[`<${n}>`,e,...r]:Array.isArray(e)?[...e,...r]:[e,...r];return{log:(e,n,...r)=>{_()&&console.log(...t(e,n,r))},info:(e,n,...r)=>{_()&&console.info(...t(e,n,r))},warn:(e,n,...r)=>{_()&&console.warn(...t(e,n,r))},error:(e,n,...r)=>{_()&&console.error(...t(e,n,r))},debug:(e,n,...r)=>{_()&&console.debug(...t(e,n,r))},group:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.group(n?r?`<${n}> ${r}`:`<${n}>`:r)}},groupCollapsed:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.groupCollapsed(n?r?`<${n}> ${r}`:`<${n}>`:r)}},groupEnd:()=>{_()&&console.groupEnd()},table:(e,n,r)=>{_()&&(n&&console.log(`<${n}>`),console.table(e,r))},time:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.time(n?r?`<${n}> ${r}`:`<${n}>`:r)}},timeEnd:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.timeEnd(n?r?`<${n}> ${r}`:`<${n}>`:r)}}}},Cn=Nn();function _n(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(i){i(n)}),(r=t.get("*"))&&r.slice().map(function(i){i(e,n)})}}}let Z;try{Z=require("@react-native-async-storage/async-storage").default}catch{Z=null}let We=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");We=new t}catch{We=null}const K=typeof window<"u"&&typeof window.localStorage<"u",J=!!Z,ye={},$e={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},Le=()=>{try{return We?.getStore?.()??null}catch{return null}},B={getItem:async t=>{const e=!K&&!J?Le():null;return e?e.getItem(t):J?Z.getItem(t):K?new Promise(n=>{Promise.resolve().then(()=>{const r=window.localStorage.getItem(t),i=ye[t];r!==i&&(ye[t]=r||""),n(r)})}):$e.getItem(t)},setItem:async(t,e)=>{const n=!K&&!J?Le():null;return n?n.setItem(t,e):J?Z.setItem(t,e):K?new Promise((r,i)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const o=window.localStorage.getItem(t);o===e?(ye[t]=e,r()):i(new Error(`Failed to set localStorage item: expected "${e}", got "${o}"`))}catch(o){i(o)}})}):$e.setItem(t,e)},removeItem:async t=>{const e=!K&&!J?Le():null;return e?e.removeItem(t):J?Z.removeItem(t):K?new Promise((n,r)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const i=window.localStorage.getItem(t);i===null?(delete ye[t],n()):r(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${i}"`))}catch(i){r(i)}})}):$e.removeItem(t)}},at=50,I={get:async()=>{try{const t=await B.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await B.setItem("eventHistory",JSON.stringify(t.slice(-at)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await B.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await I.get();await I.set([{...t,timestamp:Date.now()},...e].slice(-at))},find:async t=>(await I.get()).find(n=>n.key===t.key&&n.identifier===t.identifier),filter:async(t,e)=>{const n=await I.get();return e?n.filter(e):n.filter(({key:r,identifier:i})=>(!r||t.key===r)&&(!i||t.identifier===i))}};function Pn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=_n(),t.__HAUS_EVENT_EMITTER__}function W(t){const e=Pn(),n=(...c)=>console.error(...c);I.get().then(c=>{const l=xe.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(Cn.info("Clearing event history since it is older than 1 hour:","eventBus",l),I.clear())});const r=(c,u,l)=>{const f=h=>{try{if(typeof h=="object"&&h!==null){const{identifier:g,data:p}=h;(!g||g===l)&&u(p)}else u(h)}catch(g){n(g)}};return e.on(c,f),()=>{i(c,u,l)}},i=(c,u,l)=>{const f=h=>{if(typeof h=="object"&&h!==null){const{identifier:g}=h;(!g||g===l)&&e.off(c,u)}};e.off(c,f)};return{on:r,off:i,once:(c,u,l)=>{const f=h=>{try{if(typeof h=="object"&&h!==null){const{identifier:g,data:p}=h;(!g||g===l)&&u(p)}else u(h)}finally{i(c,f,l)}};e.on(c,f)},emit:(c,u,...l)=>{const f={identifier:u,data:l.length===1?l[0]:l};I.push({key:c,identifier:u,payload:f.data}),e.emit(c,f)},getEventHistory:(c,u)=>I.filter({key:c,identifier:u})}}W();W();W();W();W();W();W();new ke.QueryClient;function jt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Dn}=Object.prototype,{getPrototypeOf:Xe}=Object,{iterator:Ce,toStringTag:Mt}=Symbol,_e=(t=>e=>{const n=Dn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>_e(e)===t),Pe=t=>e=>typeof e===t,{isArray:te}=Array,ee=Pe("undefined");function ae(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&R(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bt=D("ArrayBuffer");function qn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Bt(t.buffer),e}const Fn=Pe("string"),R=Pe("function"),It=Pe("number"),ce=t=>t!==null&&typeof t=="object",jn=t=>t===!0||t===!1,Ee=t=>{if(_e(t)!=="object")return!1;const e=Xe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Mt in t)&&!(Ce in t)},Mn=t=>{if(!ce(t)||ae(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Bn=D("Date"),In=D("File"),Un=D("Blob"),$n=D("FileList"),Ln=t=>ce(t)&&R(t.pipe),Vn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||R(t.append)&&((e=_e(t))==="formdata"||e==="object"&&R(t.toString)&&t.toString()==="[object FormData]"))},Hn=D("URLSearchParams"),[Qn,Wn,zn,Kn]=["ReadableStream","Request","Response","Headers"].map(D),Jn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ue(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),te(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(ae(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Ut(t,e){if(ae(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$t=t=>!ee(t)&&t!==L;function ze(){const{caseless:t,skipUndefined:e}=$t(this)&&this||{},n={},r=(i,o)=>{const s=t&&Ut(n,o)||o;Ee(n[s])&&Ee(i)?n[s]=ze(n[s],i):Ee(i)?n[s]=ze({},i):te(i)?n[s]=i.slice():(!e||!ee(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&ue(arguments[i],r);return n}const Gn=(t,e,n,{allOwnKeys:r}={})=>(ue(e,(i,o)=>{n&&R(i)?t[o]=jt(i,n):t[o]=i},{allOwnKeys:r}),t),Xn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Zn=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&Xe(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},er=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},tr=t=>{if(!t)return null;if(te(t))return t;let e=t.length;if(!It(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},nr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Xe(Uint8Array)),rr=(t,e)=>{const r=(t&&t[Ce]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},ir=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},or=D("HTMLFormElement"),sr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ct=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ar=D("RegExp"),Lt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ue(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},cr=t=>{Lt(t,(e,n)=>{if(R(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(R(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ur=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return te(t)?r(t):r(String(t).split(e)),n},lr=()=>{},dr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function fr(t){return!!(t&&R(t.append)&&t[Mt]==="FormData"&&t[Ce])}const pr=t=>{const e=new Array(10),n=(r,i)=>{if(ce(r)){if(e.indexOf(r)>=0)return;if(ae(r))return r;if(!("toJSON"in r)){e[i]=r;const o=te(r)?[]:{};return ue(r,(s,a)=>{const c=n(s,i+1);!ee(c)&&(o[a]=c)}),e[i]=void 0,o}}return r};return n(t,0)},mr=D("AsyncFunction"),hr=t=>t&&(ce(t)||R(t))&&R(t.then)&&R(t.catch),Vt=((t,e)=>t?setImmediate:e?((n,r)=>(L.addEventListener("message",({source:i,data:o})=>{i===L&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),L.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",R(L.postMessage)),yr=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Vt,gr=t=>t!=null&&R(t[Ce]),d={isArray:te,isArrayBuffer:Bt,isBuffer:ae,isFormData:Vn,isArrayBufferView:qn,isString:Fn,isNumber:It,isBoolean:jn,isObject:ce,isPlainObject:Ee,isEmptyObject:Mn,isReadableStream:Qn,isRequest:Wn,isResponse:zn,isHeaders:Kn,isUndefined:ee,isDate:Bn,isFile:In,isBlob:Un,isRegExp:ar,isFunction:R,isStream:Ln,isURLSearchParams:Hn,isTypedArray:nr,isFileList:$n,forEach:ue,merge:ze,extend:Gn,trim:Jn,stripBOM:Xn,inherits:Yn,toFlatObject:Zn,kindOf:_e,kindOfTest:D,endsWith:er,toArray:tr,forEachEntry:rr,matchAll:ir,isHTMLForm:or,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:Lt,freezeMethods:cr,toObjectSet:ur,toCamelCase:sr,noop:lr,toFiniteNumber:dr,findKey:Ut,global:L,isContextDefined:$t,isSpecCompliantForm:fr,toJSONObject:pr,isAsyncFn:mr,isThenable:hr,setImmediate:Vt,asap:yr,isIterable:gr};function b(t,e,n,r,i){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),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.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 Ht=b.prototype,Qt={};["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=>{Qt[t]={value:t}});Object.defineProperties(b,Qt);Object.defineProperty(Ht,"isAxiosError",{value:!0});b.from=(t,e,n,r,i,o)=>{const s=Object.create(Ht);d.toFlatObject(t,s,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=t&&t.message?t.message:"Error",c=e==null&&t?t.code:e;return b.call(s,a,c,n,r,i),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",o&&Object.assign(s,o),s};const br=null;function Ke(t){return d.isPlainObject(t)||d.isArray(t)}function Wt(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function ut(t,e,n){return t?t.concat(e).map(function(i,o){return i=Wt(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Sr(t){return d.isArray(t)&&!t.some(Ke)}const wr=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function De(t,e,n){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!d.isUndefined(m[y])});const r=n.metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new b("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,m){let S=p;if(p&&!m&&typeof p=="object"){if(d.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Sr(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(S=d.toArray(p)))return y=Wt(y),S.forEach(function(A,x){!(d.isUndefined(A)||A===null)&&e.append(s===!0?ut([y],x,o):s===null?y:y+"[]",u(A))}),!1}return Ke(p)?!0:(e.append(ut(m,y,o),u(p)),!1)}const f=[],h=Object.assign(wr,{defaultVisitor:l,convertValue:u,isVisitable:Ke});function g(p,y){if(!d.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(p),d.forEach(p,function(S,T){(!(d.isUndefined(S)||S===null)&&i.call(e,S,d.isString(T)?T.trim():T,y,h))===!0&&g(S,y?y.concat(T):[T])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return g(t),e}function lt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Ye(t,e){this._pairs=[],t&&De(t,this,e)}const zt=Ye.prototype;zt.append=function(e,n){this._pairs.push([e,n])};zt.toString=function(e){const n=e?function(r){return e.call(this,r,lt)}:lt;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function vr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kt(t,e,n){if(!e)return t;const r=n&&n.encode||vr;d.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(e,n):o=d.isURLSearchParams(e)?e.toString():new Ye(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class dt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.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(r){r!==null&&e(r)})}}const Jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ar=typeof URLSearchParams<"u"?URLSearchParams:Ye,Er=typeof FormData<"u"?FormData:null,Or=typeof Blob<"u"?Blob:null,Tr={isBrowser:!0,classes:{URLSearchParams:Ar,FormData:Er,Blob:Or},protocols:["http","https","file","blob","url","data"]},Ze=typeof window<"u"&&typeof document<"u",Je=typeof navigator=="object"&&navigator||void 0,xr=Ze&&(!Je||["ReactNative","NativeScript","NS"].indexOf(Je.product)<0),Rr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=Ze&&window.location.href||"http://localhost",Nr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ze,hasStandardBrowserEnv:xr,hasStandardBrowserWebWorkerEnv:Rr,navigator:Je,origin:kr},Symbol.toStringTag,{value:"Module"})),O={...Nr,...Tr};function Cr(t,e){return De(t,new O.classes.URLSearchParams,{visitor:function(n,r,i,o){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function _r(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pr(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Gt(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&d.isArray(i)?i.length:s,c?(d.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!d.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&d.isArray(i[s])&&(i[s]=Pr(i[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const n={};return d.forEachEntry(t,(r,i)=>{e(_r(r),i,n,0)}),n}return null}function Dr(t,e,n){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const le={transitional:Jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=d.isObject(e);if(o&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return i?JSON.stringify(Gt(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 n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Cr(e,this.formSerializer).toString();if((a=d.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return De(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Dr(e)):e}],transformResponse:[function(e){const n=this.transitional||le.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}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:O.classes.FormData,Blob:O.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=>{le.headers[t]={}});const qr=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"]),Fr=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
2
2
|
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&qr[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},ft=Symbol("internals");function ie(t){return t&&String(t).trim().toLowerCase()}function Oe(t){return t===!1||t==null?t:d.isArray(t)?t.map(Oe):String(t)}function jr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Mr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ve(t,e,n,r,i){if(d.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!d.isString(e)){if(d.isString(r))return e.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(e)}}function Br(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Ir(t,e){const n=d.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}let k=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,c,u){const l=ie(c);if(!l)throw new Error("header name must be a non-empty string");const f=d.findKey(i,l);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=Oe(a))}const s=(a,c)=>d.forEach(a,(u,l)=>o(u,l,c));if(d.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(d.isString(e)&&(e=e.trim())&&!Mr(e))s(Fr(e),n);else if(d.isObject(e)&&d.isIterable(e)){let a={},c,u;for(const l of e){if(!d.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?d.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}s(a,n)}else e!=null&&o(n,e,r);return this}get(e,n){if(e=ie(e),e){const r=d.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return jr(i);if(d.isFunction(n))return n.call(this,i,r);if(d.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ie(e),e){const r=d.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ve(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=ie(s),s){const a=d.findKey(r,s);a&&(!n||Ve(r,r[a],a,n))&&(delete r[a],i=!0)}}return d.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||Ve(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return d.forEach(this,(i,o)=>{const s=d.findKey(r,o);if(s){n[s]=Oe(i),delete n[o];return}const a=e?Br(o):String(o).trim();a!==o&&delete n[o],n[a]=Oe(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return d.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&d.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
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,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ft]=this[ft]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ie(s);r[a]||(Ir(i,s),r[a]=!0)}return d.isArray(e)?e.forEach(o):o(e),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(k.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});d.freezeMethods(k);function He(t,e){const n=this||le,r=e||n,i=k.from(r.headers);let o=r.data;return d.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Xt(t){return!!(t&&t.__CANCEL__)}function ne(t,e,n){b.call(this,t??"canceled",b.ERR_CANCELED,e,n),this.name="CanceledError"}d.inherits(ne,b,{__CANCEL__:!0});function Yt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new b("Request failed with status code "+n.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ur(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $r(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=r[o];s||(s=u),n[i]=c,r[i]=u;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-s<e)return;const g=l&&u-l;return g?Math.round(h*1e3/g):void 0}}function Lr(t,e){let n=0,r=1e3/e,i,o;const s=(u,l=Date.now())=>{n=l,i=null,o&&(clearTimeout(o),o=null),t(...u)};return[(...u)=>{const l=Date.now(),f=l-n;f>=r?s(u,l):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const Re=(t,e,n=3)=>{let r=0;const i=$r(50,250);return Lr(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),l=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},pt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},mt=t=>(...e)=>d.asap(()=>t(...e)),Vr=O.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,O.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Hr=O.hasStandardBrowserEnv?{write(t,e,n,r,i,o,s){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];d.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),d.isString(r)&&a.push(`path=${r}`),d.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),d.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Qr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Wr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Zt(t,e,n){let r=!Qr(e);return t&&(r||n==!1)?Wr(t,e):e}const ht=t=>t instanceof k?{...t}:t;function Q(t,e){e=e||{};const n={};function r(u,l,f,h){return d.isPlainObject(u)&&d.isPlainObject(l)?d.merge.call({caseless:h},u,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function i(u,l,f,h){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u,f,h)}else return r(u,l,f,h)}function o(u,l){if(!d.isUndefined(l))return r(void 0,l)}function s(u,l){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,f){if(f in e)return r(u,l);if(f in t)return r(void 0,u)}const c={url:o,method:o,data:o,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:(u,l,f)=>i(ht(u),ht(l),f,!0)};return d.forEach(Object.keys({...t,...e}),function(l){const f=c[l]||i,h=f(t[l],e[l],l);d.isUndefined(h)&&f!==a||(n[l]=h)}),n}const en=t=>{const e=Q({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=k.from(s),e.url=Kt(Zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),d.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(d.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,f])=>{u.includes(l.toLowerCase())&&s.set(l,f)})}}if(O.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(e)),r||r!==!1&&Vr(e.url))){const c=i&&o&&Hr.read(o);c&&s.set(i,c)}return e},zr=typeof XMLHttpRequest<"u",Kr=zr&&function(t){return new Promise(function(n,r){const i=en(t);let o=i.data;const s=k.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=i,l,f,h,g,p;function y(){g&&g(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function S(){if(!m)return;const v=k.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:v,config:t,request:m};Yt(function(N){n(N),y()},function(N){r(N),y()},C),m=null}"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(S)},m.onabort=function(){m&&(r(new b("Request aborted",b.ECONNABORTED,t,m)),m=null)},m.onerror=function(x){const C=x&&x.message?x.message:"Network Error",U=new b(C,b.ERR_NETWORK,t,m);U.event=x||null,r(U),m=null},m.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Jt;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new b(x,C.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&d.forEach(s.toJSON(),function(x,C){m.setRequestHeader(C,x)}),d.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),u&&([h,p]=Re(u,!0),m.addEventListener("progress",h)),c&&m.upload&&([f,g]=Re(c),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(l=v=>{m&&(r(!v||v.type?new ne(null,t,m):v),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const T=Ur(i.url);if(T&&O.protocols.indexOf(T)===-1){r(new b("Unsupported protocol "+T+":",b.ERR_BAD_REQUEST,t));return}m.send(o||null)})},Jr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof b?l:new ne(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,o(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Gr=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Xr=async function*(t,e){for await(const n of Yr(t))yield*Gr(n,e)},Yr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},yt=(t,e,n,r)=>{const i=Xr(t,e);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await i.next();if(u){a(),c.close();return}let f=l.byteLength;if(n){let h=o+=f;n(h)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},gt=64*1024,{isFunction:ge}=d,Zr=(({Request:t,Response:e})=>({Request:t,Response:e}))(d.global),{ReadableStream:bt,TextEncoder:St}=d.global,wt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ei=t=>{t=d.merge.call({skipUndefined:!0},Zr,t);const{fetch:e,Request:n,Response:r}=t,i=e?ge(e):typeof fetch=="function",o=ge(n),s=ge(r);if(!i)return!1;const a=i&&ge(bt),c=i&&(typeof St=="function"?(p=>y=>p.encode(y))(new St):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&wt(()=>{let p=!1;const y=new n(O.origin,{body:new bt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),l=s&&a&&wt(()=>d.isReadableStream(new r("").body)),f={stream:l&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!f[p]&&(f[p]=(y,m)=>{let S=y&&y[p];if(S)return S.call(y);throw new b(`Response type '${p}' is not supported`,b.ERR_NOT_SUPPORT,m)})});const h=async p=>{if(p==null)return 0;if(d.isBlob(p))return p.size;if(d.isSpecCompliantForm(p))return(await new n(O.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(d.isArrayBufferView(p)||d.isArrayBuffer(p))return p.byteLength;if(d.isURLSearchParams(p)&&(p=p+""),d.isString(p))return(await c(p)).byteLength},g=async(p,y)=>{const m=d.toFiniteNumber(p.getContentLength());return m??h(y)};return async p=>{let{url:y,method:m,data:S,signal:T,cancelToken:v,timeout:x,onDownloadProgress:C,onUploadProgress:U,responseType:N,headers:Ie,withCredentials:pe="same-origin",fetchOptions:tt}=en(p),nt=e||fetch;N=N?(N+"").toLowerCase():"text";let me=Jr([T,v&&v.toAbortSignal()],x),re=null;const $=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let rt;try{if(U&&u&&m!=="get"&&m!=="head"&&(rt=await g(Ie,S))!==0){let M=new n(y,{method:"POST",body:S,duplex:"half"}),z;if(d.isFormData(S)&&(z=M.headers.get("content-type"))&&Ie.setContentType(z),M.body){const[Ue,he]=pt(rt,Re(mt(U)));S=yt(M.body,gt,Ue,he)}}d.isString(pe)||(pe=pe?"include":"omit");const q=o&&"credentials"in n.prototype,it={...tt,signal:me,method:m.toUpperCase(),headers:Ie.normalize().toJSON(),body:S,duplex:"half",credentials:q?pe:void 0};re=o&&new n(y,it);let j=await(o?nt(re,tt):nt(y,it));const ot=l&&(N==="stream"||N==="response");if(l&&(C||ot&&$)){const M={};["status","statusText","headers"].forEach(st=>{M[st]=j[st]});const z=d.toFiniteNumber(j.headers.get("content-length")),[Ue,he]=C&&pt(z,Re(mt(C),!0))||[];j=new r(yt(j.body,gt,Ue,()=>{he&&he(),$&&$()}),M)}N=N||"text";let mn=await f[d.findKey(f,N)||"text"](j,p);return!ot&&$&&$(),await new Promise((M,z)=>{Yt(M,z,{data:mn,headers:k.from(j.headers),status:j.status,statusText:j.statusText,config:p,request:re})})}catch(q){throw $&&$(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,p,re),{cause:q.cause||q}):b.from(q,q&&q.code,p,re)}}},ti=new Map,tn=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:i}=e,o=[r,i,n];let s=o.length,a=s,c,u,l=ti;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:ei(e)),l=u;return u};tn();const et={http:br,xhr:Kr,fetch:{get:tn}};d.forEach(et,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const At=t=>`- ${t}`,ni=t=>d.isFunction(t)||t===null||t===!1;function ri(t,e){t=d.isArray(t)?t:[t];const{length:n}=t;let r,i;const o={};for(let s=0;s<n;s++){r=t[s];let a;if(i=r,!ni(r)&&(i=et[(a=String(r)).toLowerCase()],i===void 0))throw new b(`Unknown adapter '${a}'`);if(i&&(d.isFunction(i)||(i=i.get(e))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
|
|
4
|
-
`+s.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Q(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Te.assertOptions(r,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),i!=null&&(d.isFunction(i)?n.paramsSerializer={serialize:i}:Te.assertOptions(i,{encode:F.function,serialize:F.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Te.assertOptions(n,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&d.merge(o.common,o[n.method]);o&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=k.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,f=0,h;if(!c){const p=[vt.bind(this),void 0];for(p.unshift(...a),p.push(...u),h=p.length,l=Promise.resolve(n);f<h;)l=l.then(p[f++],p[f++]);return l}h=a.length;let g=n;for(;f<h;){const p=a[f++],y=a[f++];try{g=p(g)}catch(m){y.call(this,m);break}}try{l=vt.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,h=u.length;f<h;)l=l.then(u[f++],u[f++]);return l}getUri(e){e=Q(this.defaults,e);const n=Zt(e.baseURL,e.url,e.allowAbsoluteUrls);return Kt(n,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){V.prototype[e]=function(n,r){return this.request(Q(r||{},{method:e,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Q(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}V.prototype[e]=n(),V.prototype[e+"Form"]=n(!0)});let oi=class on{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new ne(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new on(function(i){e=i}),cancel:e}}};function si(t){return function(n){return t.apply(null,n)}}function ai(t){return d.isObject(t)&&t.isAxiosError===!0}const Ge={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ge).forEach(([t,e])=>{Ge[e]=t});function sn(t){const e=new V(t),n=jt(V.prototype.request,e);return d.extend(n,V.prototype,e,{allOwnKeys:!0}),d.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return sn(Q(t,i))},n}const w=sn(le);w.Axios=V;w.CanceledError=ne;w.CancelToken=oi;w.isCancel=Xt;w.VERSION=rn;w.toFormData=De;w.AxiosError=b;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=si;w.isAxiosError=ai;w.mergeConfig=Q;w.AxiosHeaders=k;w.formToJSON=t=>Gt(d.isHTMLForm(t)?new FormData(t):t);w.getAdapter=nn.getAdapter;w.HttpStatusCode=Ge;w.default=w;const{Axios:ji,AxiosError:Ot,CanceledError:Mi,isCancel:Bi,CancelToken:Ii,VERSION:Ui,all:$i,Cancel:Li,isAxiosError:Vi,spread:Hi,toFormData:Qi,AxiosHeaders:Wi,HttpStatusCode:zi,formToJSON:Ki,getAdapter:Ji,mergeConfig:Gi}=w,ci=t=>xe.lodashExports.some(t,e=>e&&e.errorCode!==void 0)||t?.errorCode!==void 0,Tt=typeof window<"u";class an{constructor(e={}){this.requestStrategy=async(n,r)=>{await r(n)},this.responseStrategy=async(n,r)=>{await r(n)},this.defaultBaseUrl=e.defaultBaseUrl,this.useGlobalSingletons=e.useGlobalSingletons??!1,this.globalQueryClientKey=e.globalQueryClientKey||"__STORE_QUERY_CLIENT__",this.globalAxiosKey=e.globalAxiosKey||"__STORE_API_CLIENT__",this.createQueryClientImpl=e.createQueryClient||(()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})),this.createAxiosImpl=e.createAxios||(n=>{const r=w.create({baseURL:n||this.defaultBaseUrl,withCredentials:!0});return this.configureAxios(r)})}getQueryClient(e){if(Tt){if(e?.client)return e.client;if(this.useGlobalSingletons){const n=globalThis,r=n[this.globalQueryClientKey];if(r)return r;const i=this.createQueryClientImpl();return n[this.globalQueryClientKey]=i,i}return this.queryClientSingleton||(this.queryClientSingleton=this.createQueryClientImpl()),this.queryClientSingleton}return this.createQueryClientImpl()}getAxiosInstance(){if(Tt){if(this.useGlobalSingletons){const e=globalThis,n=e[this.globalAxiosKey];if(n)return n;const r=this.configureAxios(this.createAxiosImpl());return e[this.globalAxiosKey]=r,r}return this.axiosSingleton||(this.axiosSingleton=this.configureAxios(this.createAxiosImpl())),this.axiosSingleton}return this.configureAxios(this.createAxiosImpl())}setDefaultApiBaseUrl(e){this.defaultBaseUrl=e}async setApiUrl(e){const n=this.getAxiosInstance();n.defaults.baseURL=e}setRequestInterceptorStrategy(e){this.requestStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}setResponseInterceptorStrategy(e){this.responseStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}getAxiosProxy(){return new Proxy({},{get:(e,n)=>{const r=this.getAxiosInstance(),i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i},set:(e,n,r)=>Reflect.set(this.getAxiosInstance(),n,r)})}getQueryClientProxy(){return new Proxy({},{get:(e,n)=>{const r=this.getQueryClient(),i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i},set:(e,n,r)=>Reflect.set(this.getQueryClient(),n,r)})}configureAxios(e){return e.interceptors.request.clear(),e.interceptors.response.clear(),e.interceptors.request.use(async n=>{const r=async i=>{};return await this.requestStrategy(n,r),n}),e.interceptors.response.use(async n=>{const r=async i=>{};return await this.responseStrategy(n,r),n}),e}}const cn="auth_token",ui="lang",li="currencyCode",Fe=new an({createQueryClient:()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:t=>w.create({baseURL:t,withCredentials:!0,headers:{"vendure-token":""}}),useGlobalSingletons:!0,globalQueryClientKey:"__STORE_QUERY_CLIENT__",globalAxiosKey:"__STORE_API_CLIENT__"});Fe.setRequestInterceptorStrategy(async(t,e)=>{const n=await B.getItem(cn),r=await B.getItem("channelToken"),i=await B.getItem(li),o=await B.getItem(ui);n&&(t.headers.Authorization=`Bearer ${n}`),r&&(t.headers["vendure-token"]=r),t.params=t.params||{},i&&(t.params.currencyCode=i),o&&(t.params.languageCode=o),await e(t)});Fe.setResponseInterceptorStrategy(async(t,e)=>{const n=t.headers["vendure-auth-token"];if(n&&B.setItem(cn,n),ci(t.data.data)){const r=Object.values(t.data.data)[0],i=new Ot(r.errorCode);return i.response=t,i.config=t.config,Promise.reject(i)}if(t.data.errors?.length>0){const r=t.data.errors[0],i=new Ot(r.message);return i.response=t,i.config=t.config,Promise.reject(i)}await e(t)});Fe.getAxiosProxy();Fe.getQueryClientProxy();const di=globalThis.__STORE_SDK_CONTEXT__||=se.createContext(void 0),fi=()=>{const e=se.useContext(di)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};var P={},be={},Se={},we={},xt;function de(){if(xt)return we;xt=1,Object.defineProperty(we,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),we.default=t,we}var G={},oe={},Rt;function pi(){if(Rt)return oe;Rt=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.isNestedField=void 0;function t(e){return typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("variables")&&e.hasOwnProperty("fields")||typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("fragment")&&e.hasOwnProperty("fields")}return oe.isNestedField=t,oe}var kt;function fe(){if(kt)return G;kt=1;var t=G&&G.__assign||function(){return t=Object.assign||function(r){for(var i,o=1,s=arguments.length;o<s;o++){i=arguments[o];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},t.apply(this,arguments)};Object.defineProperty(G,"__esModule",{value:!0});var e=pi(),n=function(){function r(){}return r.resolveVariables=function(i){for(var o={},s=0,a=i;s<a.length;s++){var c=a[s],u=c.variables,l=c.fields;o=t(t(t({},o),u),l&&r.getNestedVariables(l)||{})}return o},r.queryDataNameAndArgumentMap=function(i){return i&&Object.keys(i).length?"(".concat(Object.entries(i).reduce(function(o,s,a){var c=s[0],u=s[1];return"".concat(o).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},r.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){if((0,e.isNestedField)(s))return r.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(c,u,l){var f=c[0],h=c[1];a+="".concat(f," ").concat(h.length>0?"{ "+o.queryFieldsMap(h)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},r.operationOrAlias=function(i){return typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name)},r.isFragment=function(i){var o;return(o=i?.fragment===!0)!==null&&o!==void 0?o:!1},r.operationOrFragment=function(i){return r.isFragment(i)?i.operation:r.operationOrAlias(i.operation)},r.getFragment=function(i){return r.isFragment(i)?"... on ":""},r.queryNestedFieldMap=function(i){return"".concat(r.getFragment(i)).concat(r.operationOrFragment(i)," ").concat(this.isFragment(i)?"":this.queryDataNameAndArgumentMap(i.variables)," ").concat(i.fields.length>0?"{ "+this.queryFieldsMap(i.fields)+" }":"")},r.queryVariablesMap=function(i,o){var s={},a=function(c){c&&Object.keys(c).map(function(u){s[u]=typeof c[u]=="object"?c[u].value:c[u]})};return a(i),o&&typeof o=="object"&&a(r.getNestedVariables(o)),s},r.getNestedVariables=function(i){var o={};function s(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))o=t(t(t({},c.variables),o),c.fields&&s(c.fields));else if(typeof c=="object")for(var u=0,l=Object.entries(c);u<l.length;u++){var f=l[u],h=f[1];s(h)}}),o}return s(i),o},r.queryDataType=function(i){var o="String",s=typeof i=="object"?i.value:i;if(i?.type!=null)o=i.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":o="Object";break;case"boolean":o="Boolean";break;case"number":o=a%1===0?"Int":"Float";break}}return typeof i=="object"&&(i.list===!0?o="[".concat(o,"]"):Array.isArray(i.list)&&(o="[".concat(o).concat(i.list[0]?"!":"","]")),i.required&&(o+="!")),o},r}();return G.default=n,G}var Nt;function mi(){if(Nt)return Se;Nt=1,Object.defineProperty(Se,"__esModule",{value:!0});var t=de(),e=fe(),n=function(){function r(i){Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation)}return r.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},r.prototype.mutationsBuilder=function(i){var o=this,s=i.map(function(a){return o.operation=a.operation,o.variables=a.variables,o.fields=a.fields,o.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(i),s.join(`
|
|
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,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ft]=this[ft]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ie(s);r[a]||(Ir(i,s),r[a]=!0)}return d.isArray(e)?e.forEach(o):o(e),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(k.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});d.freezeMethods(k);function He(t,e){const n=this||le,r=e||n,i=k.from(r.headers);let o=r.data;return d.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Xt(t){return!!(t&&t.__CANCEL__)}function ne(t,e,n){b.call(this,t??"canceled",b.ERR_CANCELED,e,n),this.name="CanceledError"}d.inherits(ne,b,{__CANCEL__:!0});function Yt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new b("Request failed with status code "+n.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ur(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $r(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=r[o];s||(s=u),n[i]=c,r[i]=u;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-s<e)return;const g=l&&u-l;return g?Math.round(h*1e3/g):void 0}}function Lr(t,e){let n=0,r=1e3/e,i,o;const s=(u,l=Date.now())=>{n=l,i=null,o&&(clearTimeout(o),o=null),t(...u)};return[(...u)=>{const l=Date.now(),f=l-n;f>=r?s(u,l):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const Re=(t,e,n=3)=>{let r=0;const i=$r(50,250);return Lr(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),l=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},pt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},mt=t=>(...e)=>d.asap(()=>t(...e)),Vr=O.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,O.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Hr=O.hasStandardBrowserEnv?{write(t,e,n,r,i,o,s){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];d.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),d.isString(r)&&a.push(`path=${r}`),d.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),d.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Qr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Wr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Zt(t,e,n){let r=!Qr(e);return t&&(r||n==!1)?Wr(t,e):e}const ht=t=>t instanceof k?{...t}:t;function Q(t,e){e=e||{};const n={};function r(u,l,f,h){return d.isPlainObject(u)&&d.isPlainObject(l)?d.merge.call({caseless:h},u,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function i(u,l,f,h){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u,f,h)}else return r(u,l,f,h)}function o(u,l){if(!d.isUndefined(l))return r(void 0,l)}function s(u,l){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,f){if(f in e)return r(u,l);if(f in t)return r(void 0,u)}const c={url:o,method:o,data:o,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:(u,l,f)=>i(ht(u),ht(l),f,!0)};return d.forEach(Object.keys({...t,...e}),function(l){const f=c[l]||i,h=f(t[l],e[l],l);d.isUndefined(h)&&f!==a||(n[l]=h)}),n}const en=t=>{const e=Q({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=k.from(s),e.url=Kt(Zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),d.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(d.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,f])=>{u.includes(l.toLowerCase())&&s.set(l,f)})}}if(O.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(e)),r||r!==!1&&Vr(e.url))){const c=i&&o&&Hr.read(o);c&&s.set(i,c)}return e},zr=typeof XMLHttpRequest<"u",Kr=zr&&function(t){return new Promise(function(n,r){const i=en(t);let o=i.data;const s=k.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=i,l,f,h,g,p;function y(){g&&g(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function S(){if(!m)return;const A=k.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:A,config:t,request:m};Yt(function(N){n(N),y()},function(N){r(N),y()},C),m=null}"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(S)},m.onabort=function(){m&&(r(new b("Request aborted",b.ECONNABORTED,t,m)),m=null)},m.onerror=function(x){const C=x&&x.message?x.message:"Network Error",U=new b(C,b.ERR_NETWORK,t,m);U.event=x||null,r(U),m=null},m.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Jt;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new b(x,C.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&d.forEach(s.toJSON(),function(x,C){m.setRequestHeader(C,x)}),d.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),u&&([h,p]=Re(u,!0),m.addEventListener("progress",h)),c&&m.upload&&([f,g]=Re(c),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(l=A=>{m&&(r(!A||A.type?new ne(null,t,m):A),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const T=Ur(i.url);if(T&&O.protocols.indexOf(T)===-1){r(new b("Unsupported protocol "+T+":",b.ERR_BAD_REQUEST,t));return}m.send(o||null)})},Jr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof b?l:new ne(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,o(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Gr=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Xr=async function*(t,e){for await(const n of Yr(t))yield*Gr(n,e)},Yr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},yt=(t,e,n,r)=>{const i=Xr(t,e);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await i.next();if(u){a(),c.close();return}let f=l.byteLength;if(n){let h=o+=f;n(h)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},gt=64*1024,{isFunction:ge}=d,Zr=(({Request:t,Response:e})=>({Request:t,Response:e}))(d.global),{ReadableStream:bt,TextEncoder:St}=d.global,wt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ei=t=>{t=d.merge.call({skipUndefined:!0},Zr,t);const{fetch:e,Request:n,Response:r}=t,i=e?ge(e):typeof fetch=="function",o=ge(n),s=ge(r);if(!i)return!1;const a=i&&ge(bt),c=i&&(typeof St=="function"?(p=>y=>p.encode(y))(new St):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&wt(()=>{let p=!1;const y=new n(O.origin,{body:new bt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),l=s&&a&&wt(()=>d.isReadableStream(new r("").body)),f={stream:l&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!f[p]&&(f[p]=(y,m)=>{let S=y&&y[p];if(S)return S.call(y);throw new b(`Response type '${p}' is not supported`,b.ERR_NOT_SUPPORT,m)})});const h=async p=>{if(p==null)return 0;if(d.isBlob(p))return p.size;if(d.isSpecCompliantForm(p))return(await new n(O.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(d.isArrayBufferView(p)||d.isArrayBuffer(p))return p.byteLength;if(d.isURLSearchParams(p)&&(p=p+""),d.isString(p))return(await c(p)).byteLength},g=async(p,y)=>{const m=d.toFiniteNumber(p.getContentLength());return m??h(y)};return async p=>{let{url:y,method:m,data:S,signal:T,cancelToken:A,timeout:x,onDownloadProgress:C,onUploadProgress:U,responseType:N,headers:Ie,withCredentials:pe="same-origin",fetchOptions:tt}=en(p),nt=e||fetch;N=N?(N+"").toLowerCase():"text";let me=Jr([T,A&&A.toAbortSignal()],x),re=null;const $=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let rt;try{if(U&&u&&m!=="get"&&m!=="head"&&(rt=await g(Ie,S))!==0){let M=new n(y,{method:"POST",body:S,duplex:"half"}),z;if(d.isFormData(S)&&(z=M.headers.get("content-type"))&&Ie.setContentType(z),M.body){const[Ue,he]=pt(rt,Re(mt(U)));S=yt(M.body,gt,Ue,he)}}d.isString(pe)||(pe=pe?"include":"omit");const q=o&&"credentials"in n.prototype,it={...tt,signal:me,method:m.toUpperCase(),headers:Ie.normalize().toJSON(),body:S,duplex:"half",credentials:q?pe:void 0};re=o&&new n(y,it);let j=await(o?nt(re,tt):nt(y,it));const ot=l&&(N==="stream"||N==="response");if(l&&(C||ot&&$)){const M={};["status","statusText","headers"].forEach(st=>{M[st]=j[st]});const z=d.toFiniteNumber(j.headers.get("content-length")),[Ue,he]=C&&pt(z,Re(mt(C),!0))||[];j=new r(yt(j.body,gt,Ue,()=>{he&&he(),$&&$()}),M)}N=N||"text";let mn=await f[d.findKey(f,N)||"text"](j,p);return!ot&&$&&$(),await new Promise((M,z)=>{Yt(M,z,{data:mn,headers:k.from(j.headers),status:j.status,statusText:j.statusText,config:p,request:re})})}catch(q){throw $&&$(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,p,re),{cause:q.cause||q}):b.from(q,q&&q.code,p,re)}}},ti=new Map,tn=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:i}=e,o=[r,i,n];let s=o.length,a=s,c,u,l=ti;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:ei(e)),l=u;return u};tn();const et={http:br,xhr:Kr,fetch:{get:tn}};d.forEach(et,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const vt=t=>`- ${t}`,ni=t=>d.isFunction(t)||t===null||t===!1;function ri(t,e){t=d.isArray(t)?t:[t];const{length:n}=t;let r,i;const o={};for(let s=0;s<n;s++){r=t[s];let a;if(i=r,!ni(r)&&(i=et[(a=String(r)).toLowerCase()],i===void 0))throw new b(`Unknown adapter '${a}'`);if(i&&(d.isFunction(i)||(i=i.get(e))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
|
|
4
|
+
`+s.map(vt).join(`
|
|
5
|
+
`):" "+vt(s[0]):"as no adapter specified";throw new b("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const nn={getAdapter:ri,adapters:et};function Qe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ne(null,t)}function At(t){return Qe(t),t.headers=k.from(t.headers),t.data=He.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),nn.getAdapter(t.adapter||le.adapter,t)(t).then(function(r){return Qe(t),r.data=He.call(t,t.transformResponse,r),r.headers=k.from(r.headers),r},function(r){return Xt(r)||(Qe(t),r&&r.response&&(r.response.data=He.call(t,t.transformResponse,r.response),r.response.headers=k.from(r.response.headers))),Promise.reject(r)})}const rn="1.13.2",qe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{qe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Et={};qe.transitional=function(e,n,r){function i(o,s){return"[Axios v"+rn+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new b(i(s," has been removed"+(n?" in "+n:"")),b.ERR_DEPRECATED);return n&&!Et[s]&&(Et[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};qe.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function ii(t,e,n){if(typeof t!="object")throw new b("options must be an object",b.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new b("option "+o+" must be "+c,b.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new b("Unknown option "+o,b.ERR_BAD_OPTION)}}const Te={assertOptions:ii,validators:qe},F=Te.validators;let V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new dt,response:new dt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Q(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Te.assertOptions(r,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),i!=null&&(d.isFunction(i)?n.paramsSerializer={serialize:i}:Te.assertOptions(i,{encode:F.function,serialize:F.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Te.assertOptions(n,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&d.merge(o.common,o[n.method]);o&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=k.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,f=0,h;if(!c){const p=[At.bind(this),void 0];for(p.unshift(...a),p.push(...u),h=p.length,l=Promise.resolve(n);f<h;)l=l.then(p[f++],p[f++]);return l}h=a.length;let g=n;for(;f<h;){const p=a[f++],y=a[f++];try{g=p(g)}catch(m){y.call(this,m);break}}try{l=At.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,h=u.length;f<h;)l=l.then(u[f++],u[f++]);return l}getUri(e){e=Q(this.defaults,e);const n=Zt(e.baseURL,e.url,e.allowAbsoluteUrls);return Kt(n,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){V.prototype[e]=function(n,r){return this.request(Q(r||{},{method:e,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Q(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}V.prototype[e]=n(),V.prototype[e+"Form"]=n(!0)});let oi=class on{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new ne(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new on(function(i){e=i}),cancel:e}}};function si(t){return function(n){return t.apply(null,n)}}function ai(t){return d.isObject(t)&&t.isAxiosError===!0}const Ge={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ge).forEach(([t,e])=>{Ge[e]=t});function sn(t){const e=new V(t),n=jt(V.prototype.request,e);return d.extend(n,V.prototype,e,{allOwnKeys:!0}),d.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return sn(Q(t,i))},n}const w=sn(le);w.Axios=V;w.CanceledError=ne;w.CancelToken=oi;w.isCancel=Xt;w.VERSION=rn;w.toFormData=De;w.AxiosError=b;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=si;w.isAxiosError=ai;w.mergeConfig=Q;w.AxiosHeaders=k;w.formToJSON=t=>Gt(d.isHTMLForm(t)?new FormData(t):t);w.getAdapter=nn.getAdapter;w.HttpStatusCode=Ge;w.default=w;const{Axios:ji,AxiosError:Ot,CanceledError:Mi,isCancel:Bi,CancelToken:Ii,VERSION:Ui,all:$i,Cancel:Li,isAxiosError:Vi,spread:Hi,toFormData:Qi,AxiosHeaders:Wi,HttpStatusCode:zi,formToJSON:Ki,getAdapter:Ji,mergeConfig:Gi}=w,ci=t=>(t&&xe.lodashExports.some(t,e=>e&&e?.errorCode!==void 0)||t?.errorCode!==void 0)&&t!==void 0,Tt=typeof window<"u";class an{constructor(e={}){this.requestStrategy=async(n,r)=>{await r(n)},this.responseStrategy=async(n,r)=>{await r(n)},this.defaultBaseUrl=e.defaultBaseUrl,this.useGlobalSingletons=e.useGlobalSingletons??!1,this.globalQueryClientKey=e.globalQueryClientKey||"__STORE_QUERY_CLIENT__",this.globalAxiosKey=e.globalAxiosKey||"__STORE_API_CLIENT__",this.createQueryClientImpl=e.createQueryClient||(()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})),this.createAxiosImpl=e.createAxios||(n=>{const r=w.create({baseURL:n||this.defaultBaseUrl,withCredentials:!0});return this.configureAxios(r)})}getQueryClient(e){if(Tt){if(e?.client)return e.client;if(this.useGlobalSingletons){const n=globalThis,r=n[this.globalQueryClientKey];if(r)return r;const i=this.createQueryClientImpl();return n[this.globalQueryClientKey]=i,i}return this.queryClientSingleton||(this.queryClientSingleton=this.createQueryClientImpl()),this.queryClientSingleton}return this.createQueryClientImpl()}getAxiosInstance(){if(Tt){if(this.useGlobalSingletons){const e=globalThis,n=e[this.globalAxiosKey];if(n)return n;const r=this.configureAxios(this.createAxiosImpl());return e[this.globalAxiosKey]=r,r}return this.axiosSingleton||(this.axiosSingleton=this.configureAxios(this.createAxiosImpl())),this.axiosSingleton}return this.configureAxios(this.createAxiosImpl())}setDefaultApiBaseUrl(e){this.defaultBaseUrl=e}async setApiUrl(e){const n=this.getAxiosInstance();n.defaults.baseURL=e}setRequestInterceptorStrategy(e){this.requestStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}setResponseInterceptorStrategy(e){this.responseStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}getAxiosProxy(){return new Proxy({},{get:(e,n)=>{const r=this.getAxiosInstance(),i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i},set:(e,n,r)=>Reflect.set(this.getAxiosInstance(),n,r)})}getQueryClientProxy(){return new Proxy({},{get:(e,n)=>{const r=this.getQueryClient(),i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i},set:(e,n,r)=>Reflect.set(this.getQueryClient(),n,r)})}configureAxios(e){return e.interceptors.request.clear(),e.interceptors.response.clear(),e.interceptors.request.use(async n=>{const r=async i=>{};return await this.requestStrategy(n,r),n}),e.interceptors.response.use(async n=>{const r=async i=>{};return await this.responseStrategy(n,r),n}),e}}const cn="auth_token",ui="lang",li="currencyCode",Fe=new an({createQueryClient:()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:t=>w.create({baseURL:t,withCredentials:!0,headers:{"vendure-token":""}}),useGlobalSingletons:!0,globalQueryClientKey:"__STORE_QUERY_CLIENT__",globalAxiosKey:"__STORE_API_CLIENT__"});Fe.setRequestInterceptorStrategy(async(t,e)=>{const n=await B.getItem(cn),r=await B.getItem("channelToken"),i=await B.getItem(li),o=await B.getItem(ui);n&&(t.headers.Authorization=`Bearer ${n}`),r&&(t.headers["vendure-token"]=r),t.params=t.params||{},i&&(t.params.currencyCode=i),o&&(t.params.languageCode=o),await e(t)});Fe.setResponseInterceptorStrategy(async(t,e)=>{const n=t.headers["vendure-auth-token"];if(n&&B.setItem(cn,n),ci(t.data.data)){const r=Object.values(t.data.data)[0],i=new Ot(r.errorCode);return i.response=t,i.config=t.config,Promise.reject(i)}if(t.data.errors?.length>0){const r=t.data.errors[0],i=new Ot(r.message);return i.response=t,i.config=t.config,Promise.reject(i)}await e(t)});Fe.getAxiosProxy();Fe.getQueryClientProxy();const di=globalThis.__STORE_SDK_CONTEXT__||=se.createContext(void 0),fi=()=>{const e=se.useContext(di)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};var P={},be={},Se={},we={},xt;function de(){if(xt)return we;xt=1,Object.defineProperty(we,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),we.default=t,we}var G={},oe={},Rt;function pi(){if(Rt)return oe;Rt=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.isNestedField=void 0;function t(e){return typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("variables")&&e.hasOwnProperty("fields")||typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("fragment")&&e.hasOwnProperty("fields")}return oe.isNestedField=t,oe}var kt;function fe(){if(kt)return G;kt=1;var t=G&&G.__assign||function(){return t=Object.assign||function(r){for(var i,o=1,s=arguments.length;o<s;o++){i=arguments[o];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},t.apply(this,arguments)};Object.defineProperty(G,"__esModule",{value:!0});var e=pi(),n=function(){function r(){}return r.resolveVariables=function(i){for(var o={},s=0,a=i;s<a.length;s++){var c=a[s],u=c.variables,l=c.fields;o=t(t(t({},o),u),l&&r.getNestedVariables(l)||{})}return o},r.queryDataNameAndArgumentMap=function(i){return i&&Object.keys(i).length?"(".concat(Object.entries(i).reduce(function(o,s,a){var c=s[0],u=s[1];return"".concat(o).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},r.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){if((0,e.isNestedField)(s))return r.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(c,u,l){var f=c[0],h=c[1];a+="".concat(f," ").concat(h.length>0?"{ "+o.queryFieldsMap(h)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},r.operationOrAlias=function(i){return typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name)},r.isFragment=function(i){var o;return(o=i?.fragment===!0)!==null&&o!==void 0?o:!1},r.operationOrFragment=function(i){return r.isFragment(i)?i.operation:r.operationOrAlias(i.operation)},r.getFragment=function(i){return r.isFragment(i)?"... on ":""},r.queryNestedFieldMap=function(i){return"".concat(r.getFragment(i)).concat(r.operationOrFragment(i)," ").concat(this.isFragment(i)?"":this.queryDataNameAndArgumentMap(i.variables)," ").concat(i.fields.length>0?"{ "+this.queryFieldsMap(i.fields)+" }":"")},r.queryVariablesMap=function(i,o){var s={},a=function(c){c&&Object.keys(c).map(function(u){s[u]=typeof c[u]=="object"?c[u].value:c[u]})};return a(i),o&&typeof o=="object"&&a(r.getNestedVariables(o)),s},r.getNestedVariables=function(i){var o={};function s(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))o=t(t(t({},c.variables),o),c.fields&&s(c.fields));else if(typeof c=="object")for(var u=0,l=Object.entries(c);u<l.length;u++){var f=l[u],h=f[1];s(h)}}),o}return s(i),o},r.queryDataType=function(i){var o="String",s=typeof i=="object"?i.value:i;if(i?.type!=null)o=i.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":o="Object";break;case"boolean":o="Boolean";break;case"number":o=a%1===0?"Int":"Float";break}}return typeof i=="object"&&(i.list===!0?o="[".concat(o,"]"):Array.isArray(i.list)&&(o="[".concat(o).concat(i.list[0]?"!":"","]")),i.required&&(o+="!")),o},r}();return G.default=n,G}var Nt;function mi(){if(Nt)return Se;Nt=1,Object.defineProperty(Se,"__esModule",{value:!0});var t=de(),e=fe(),n=function(){function r(i){Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation)}return r.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},r.prototype.mutationsBuilder=function(i){var o=this,s=i.map(function(a){return o.operation=a.operation,o.variables=a.variables,o.fields=a.fields,o.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(i),s.join(`
|
|
7
7
|
`))},r.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,o,s){return"".concat(i).concat(s!==0?", ":"").concat(o,": $").concat(o)},""),")"):""},r.prototype.queryDataArgumentAndTypeMap=function(i){return Object.keys(i).length?"(".concat(Object.keys(i).reduce(function(o,s,a){return"".concat(o).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(i[s]))},""),")"):""},r.prototype.operationWrapperTemplate=function(i,o){var s=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Mutation," ").concat(s.charAt(0).toUpperCase()+s.slice(1)," ").concat(this.queryDataArgumentAndTypeMap(i),` {
|
|
8
8
|
`).concat(o,`
|
|
9
9
|
}`),variables:e.default.queryVariablesMap(i)}},r.prototype.operationTemplate=function(i){var o=typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap(),` {
|
|
10
10
|
`).concat(this.queryFieldsMap(this.fields),`
|
|
11
|
-
}`)},r.prototype.queryFieldsMap=function(i){var o=this;return Array.isArray(i)?i.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(o.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},r}();return Se.default=n,Se}var
|
|
11
|
+
}`)},r.prototype.queryFieldsMap=function(i){var o=this;return Array.isArray(i)?i.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(o.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},r}();return Se.default=n,Se}var ve={},Ct;function hi(){if(Ct)return ve;Ct=1,Object.defineProperty(ve,"__esModule",{value:!0});var t=de(),e=fe(),n=function(){function r(i){this.queryDataType=function(o){var s="String",a=typeof o=="object"?o.value:o;if(o.type!==void 0)s=o.type;else switch(typeof a){case"object":s="Object";break;case"boolean":s="Boolean";break;case"number":s=a%1===0?"Int":"Float";break}return typeof o=="object"&&o.required&&(s+="!"),s},Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields||[],this.operation=i.operation)}return r.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate())},r.prototype.queriesBuilder=function(i){var o=this,s=function(){var a=[];return i.forEach(function(c){c&&(o.operation=c.operation,o.fields=c.fields,o.variables=c.variables,a.push(o.operationTemplate()))}),a.join(" ")};return this.operationWrapperTemplate(s())},r.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,o,s){return"".concat(i).concat(s!==0?", ":"").concat(o,": $").concat(o)},""),")"):""},r.prototype.queryDataArgumentAndTypeMap=function(){var i=this;return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,s,a){return"".concat(o).concat(a!==0?", ":"","$").concat(s,": ").concat(i.queryDataType(i.variables[s]))},""),")"):""},r.prototype.operationWrapperTemplate=function(i){var o=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Query," ").concat(o.charAt(0).toUpperCase()).concat(o.slice(1)," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(i," }"),variables:e.default.queryVariablesMap(this.variables)}},r.prototype.operationTemplate=function(){var i=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(i," ").concat(this.queryDataNameAndArgumentMap()," { nodes { ").concat(e.default.queryFieldsMap(this.fields)," } }")},r}();return ve.default=n,ve}var _t;function yi(){if(_t)return be;_t=1,Object.defineProperty(be,"__esModule",{value:!0});var t=mi(),e=hi();return be.default={DefaultAppSyncQueryAdapter:e.default,DefaultAppSyncMutationAdapter:t.default},be}var X={},Pt;function gi(){if(Pt)return X;Pt=1;var t=X&&X.__assign||function(){return t=Object.assign||function(i){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(i[c]=o[c])}return i},t.apply(this,arguments)};Object.defineProperty(X,"__esModule",{value:!0});var e=de(),n=fe(),r=function(){function i(o,s){var a=this;Array.isArray(o)?this.variables=n.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation),this.config={operationName:""},s&&Object.entries(s).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l})}return i.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(e.default.Mutation,this.variables,this.operationTemplate(this.operation))},i.prototype.mutationsBuilder=function(o){var s=this,a=o.map(function(c){return s.operation=c.operation,s.variables=c.variables,s.fields=c.fields,s.operationTemplate(c.operation)});return this.operationWrapperTemplate(e.default.Mutation,n.default.resolveVariables(o),a.join(`
|
|
12
12
|
`))},i.prototype.queryDataArgumentAndTypeMap=function(o){return this.fields&&typeof this.fields=="object"&&(o=t(t({},n.default.getNestedVariables(this.fields)),o)),o&&Object.keys(o).length>0?"(".concat(Object.keys(o).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(n.default.queryDataType(o[a]))},""),")"):""},i.prototype.operationWrapperTemplate=function(o,s,a){var c="".concat(o," ").concat(this.queryDataArgumentAndTypeMap(s),` {
|
|
13
13
|
`).concat(a,`
|
|
14
14
|
}`);return this.config.operationName&&(c=c.replace("mutation","mutation ".concat(this.config.operationName))),{query:c,variables:n.default.queryVariablesMap(s,this.fields)}},i.prototype.operationTemplate=function(o){var s=typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name);return"".concat(s," ").concat(n.default.queryDataNameAndArgumentMap(this.variables)," ").concat(this.fields&&this.fields.length>0?`{
|
|
15
15
|
`.concat(n.default.queryFieldsMap(this.fields),`
|
|
16
|
-
}`):"")},i}();return X.default=r,X}var Y={},Dt;function bi(){if(Dt)return Y;Dt=1;var t=Y&&Y.__assign||function(){return t=Object.assign||function(i){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(i[c]=o[c])}return i},t.apply(this,arguments)};Object.defineProperty(Y,"__esModule",{value:!0});var e=de(),n=fe(),r=function(){function i(o,s){var a=this;this.config={operationName:""},s&&Object.entries(s).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l}),Array.isArray(o)?this.variables=n.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields||[],this.operation=o.operation)}return i.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate(this.variables))},i.prototype.queriesBuilder=function(o){var s=this,a=function(){var c=[];return o.forEach(function(u){u&&(s.operation=u.operation,s.fields=u.fields,c.push(s.operationTemplate(u.variables)))}),c.join(" ")};return this.operationWrapperTemplate(a())},i.prototype.queryDataArgumentAndTypeMap=function(){var o=this.variables;return this.fields&&typeof this.fields=="object"&&(o=t(t({},n.default.getNestedVariables(this.fields)),o)),o&&Object.keys(o).length>0?"(".concat(Object.keys(o).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(n.default.queryDataType(o[a]))},""),")"):""},i.prototype.operationWrapperTemplate=function(o){var s="".concat(e.default.Query," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(o," }");return s=s.replace("query","query".concat(this.config.operationName!==""?" "+this.config.operationName:"")),{query:s,variables:n.default.queryVariablesMap(this.variables,this.fields)}},i.prototype.operationTemplate=function(o){var s=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(s," ").concat(o?n.default.queryDataNameAndArgumentMap(o):""," ").concat(this.fields&&this.fields.length>0?"{ "+n.default.queryFieldsMap(this.fields)+" }":"")},i}();return Y.default=r,Y}var
|
|
16
|
+
}`):"")},i}();return X.default=r,X}var Y={},Dt;function bi(){if(Dt)return Y;Dt=1;var t=Y&&Y.__assign||function(){return t=Object.assign||function(i){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(i[c]=o[c])}return i},t.apply(this,arguments)};Object.defineProperty(Y,"__esModule",{value:!0});var e=de(),n=fe(),r=function(){function i(o,s){var a=this;this.config={operationName:""},s&&Object.entries(s).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l}),Array.isArray(o)?this.variables=n.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields||[],this.operation=o.operation)}return i.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate(this.variables))},i.prototype.queriesBuilder=function(o){var s=this,a=function(){var c=[];return o.forEach(function(u){u&&(s.operation=u.operation,s.fields=u.fields,c.push(s.operationTemplate(u.variables)))}),c.join(" ")};return this.operationWrapperTemplate(a())},i.prototype.queryDataArgumentAndTypeMap=function(){var o=this.variables;return this.fields&&typeof this.fields=="object"&&(o=t(t({},n.default.getNestedVariables(this.fields)),o)),o&&Object.keys(o).length>0?"(".concat(Object.keys(o).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(n.default.queryDataType(o[a]))},""),")"):""},i.prototype.operationWrapperTemplate=function(o){var s="".concat(e.default.Query," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(o," }");return s=s.replace("query","query".concat(this.config.operationName!==""?" "+this.config.operationName:"")),{query:s,variables:n.default.queryVariablesMap(this.variables,this.fields)}},i.prototype.operationTemplate=function(o){var s=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(s," ").concat(o?n.default.queryDataNameAndArgumentMap(o):""," ").concat(this.fields&&this.fields.length>0?"{ "+n.default.queryFieldsMap(this.fields)+" }":"")},i}();return Y.default=r,Y}var Ae={},qt;function Si(){if(qt)return Ae;qt=1,Object.defineProperty(Ae,"__esModule",{value:!0});var t=de(),e=fe(),n=function(){function r(i){Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation)}return r.prototype.subscriptionBuilder=function(){return this.operationWrapperTemplate(t.default.Subscription,this.variables,this.operationTemplate(this.operation))},r.prototype.subscriptionsBuilder=function(i){var o=this,s=i.map(function(a){return o.operation=a.operation,o.variables=a.variables,o.fields=a.fields,o.operationTemplate(a.operation)});return this.operationWrapperTemplate(t.default.Subscription,e.default.resolveVariables(i),s.join(`
|
|
17
17
|
`))},r.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,o,s){return"".concat(i).concat(s!==0?", ":"").concat(o,": $").concat(o)},""),")"):""},r.prototype.queryDataArgumentAndTypeMap=function(i){return Object.keys(i).length?"(".concat(Object.keys(i).reduce(function(o,s,a){return"".concat(o).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(i[s]))},""),")"):""},r.prototype.operationWrapperTemplate=function(i,o,s){return{query:"".concat(i," ").concat(this.queryDataArgumentAndTypeMap(o),` {
|
|
18
18
|
`).concat(s,`
|
|
19
19
|
}`),variables:e.default.queryVariablesMap(o)}},r.prototype.operationTemplate=function(i){var o=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap(),` {
|
|
20
20
|
`).concat(this.queryFieldsMap(this.fields),`
|
|
21
|
-
}`)},r.prototype.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(o.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},r}();return
|
|
21
|
+
}`)},r.prototype.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(o.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},r}();return Ae.default=n,Ae}var Ft;function wi(){if(Ft)return P;Ft=1,Object.defineProperty(P,"__esModule",{value:!0}),P.adapters=P.query=P.mutation=P.subscription=void 0;var t=yi();P.adapters=t.default;var e=gi(),n=bi(),r=Si();function i(a,c,u){var l;if(Array.isArray(a)){if(c){var f=new c(a,u);return f.queriesBuilder(a)}return l=new n.default(a,u),l.queriesBuilder(a)}if(c){var f=new c(a,u);return f.queryBuilder()}return l=new n.default(a,u),l.queryBuilder()}P.query=i;function o(a,c,u){var l,f;return Array.isArray(a)?c?(l=new c(a,u),l.mutationsBuilder(a)):(f=new e.default(a,u),f.mutationsBuilder(a)):c?(l=new c(a,u),l.mutationBuilder()):(f=new e.default(a,u),f.mutationBuilder())}P.mutation=o;function s(a,c){var u,l;return Array.isArray(a)?c?(u=new c(a),u.subscriptionsBuilder(a)):(l=new r.default(a),l.subscriptionsBuilder(a)):c?(u=new c(a),u.subscriptionBuilder()):(l=new r.default(a),l.subscriptionBuilder())}return P.subscription=s,P}wi();const vi={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EligiblePaymentMethods"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PaymentMethodQuote"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"code"}}]}}]},Ai={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"login"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rememberMe"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}},{kind:"Argument",name:{kind:"Name",value:"rememberMe"},value:{kind:"Variable",name:{kind:"Name",value:"rememberMe"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CurrentUser"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"identifier"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ei={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"logout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}}]}}]}}]},Oi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},Ti={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"transitionOrderToState"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transitionOrderToState"},arguments:[{kind:"Argument",name:{kind:"Name",value:"state"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},xi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"nextOrderStates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nextOrderStates"}}]}}]},Ri={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EligiblePaymentMethods"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"eligiblePaymentMethods"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EligiblePaymentMethods"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"EligiblePaymentMethods"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PaymentMethodQuote"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"code"}}]}}]},ki={"\n mutation login($email: String!, $password: String!, $rememberMe: Boolean) {\n login(username: $email, password: $password, rememberMe: $rememberMe) {\n __typename\n ... on CurrentUser {\n id\n identifier\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":Ai,"\n mutation logout {\n logout {\n success\n }\n }\n":Ei,"\n query me {\n me {\n id\n }\n }\n":Oi,"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":Ti,"\n query nextOrderStates {\n nextOrderStates\n }\n":xi,"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n":vi,"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n":Ri};function je(t){return ki[t]??{}}je(`
|
|
22
22
|
mutation transitionOrderToState($input: String!) {
|
|
23
23
|
transitionOrderToState(state: $input) {
|
|
24
24
|
... on ErrorResult {
|
|
@@ -44,4 +44,4 @@
|
|
|
44
44
|
...EligiblePaymentMethods
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
`);const un=new an({createQueryClient:()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:t=>w.create({baseURL:t,withCredentials:!0})});un.getAxiosProxy();un.getQueryClientProxy();const Me=()=>{const t=
|
|
47
|
+
`);const un=new an({createQueryClient:()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:t=>w.create({baseURL:t,withCredentials:!0})});un.getAxiosProxy();un.getQueryClientProxy();const Me=()=>{const t=v.compilerRuntimeExports.c(2),{getPlatform:e}=fi();let n;return t[0]!==e?(n=e(),t[0]=e,t[1]=n):n=t[1],n},Be="ProductBadge",[Ni]=yn(Be),[Ci,_i]=Ni(Be),ln=t=>{const e=v.compilerRuntimeExports.c(13);let n,r,i,o,s;e[0]!==t?({children:r,product:i,__scopeProductBadge:n,style:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s):(n=e[1],r=e[2],i=e[3],o=e[4],s=e[5]);const a=se.useRef(null),c=Me();let u;e[6]!==c?(u=Ne(c),e[6]=c,e[7]=u):u=e[7];const l=u;if(!H.getEnabled())return null;const{badges:f}=i;if(!f)return null;const h=f.reduce(Di,{}),g=Object.keys(h),p={groupedBadges:h,badges:f,badgesRef:a,positions:g},y=v.renderChildren(r,p);let m;return e[8]!==l||e[9]!==o||e[10]!==s||e[11]!==y?(m=v.jsxRuntimeExports.jsx(l,{...o,style:s,children:y}),e[8]=l,e[9]=o,e[10]=s,e[11]=y,e[12]=m):m=e[12],v.jsxRuntimeExports.jsx(Ci,{scope:n,...p,children:m})};ln.displayName=Be;const dn=t=>{const e=v.compilerRuntimeExports.c(18);let n,r,i,o,s;e[0]!==t?({children:i,position:o,asChild:r,__scopeProductBadge:n,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s):(n=e[1],r=e[2],i=e[3],o=e[4],s=e[5]);const a=Me();let c;e[6]!==r||e[7]!==a?(c=Ne(a,r,"div"),e[6]=r,e[7]=a,e[8]=c):c=e[8];const u=c,{groupedBadges:l}=_i(Be,n),f=l[o];let h;e[9]!==f||e[10]!==i||e[11]!==o?(h=v.renderChildren(i,{badges:f,position:o}),e[9]=f,e[10]=i,e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==u||e[14]!==o||e[15]!==s||e[16]!==h?(g=v.jsxRuntimeExports.jsx(u,{...s,"data-position":o,children:h}),e[13]=u,e[14]=o,e[15]=s,e[16]=h,e[17]=g):g=e[17],g},fn=t=>{const e=v.compilerRuntimeExports.c(13);let n,r,i,o;e[0]!==t?({children:i,asChild:n,badge:r,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o):(n=e[1],r=e[2],i=e[3],o=e[4]);const s=Me();let a;e[5]!==n||e[6]!==s?(a=Ne(s,n,"div"),e[5]=n,e[6]=s,e[7]=a):a=e[7];const c=a,u=r?.id;let l;return e[8]!==c||e[9]!==i||e[10]!==o||e[11]!==u?(l=v.jsxRuntimeExports.jsx(c,{...o,"data-badge-id":u,children:i}),e[8]=c,e[9]=i,e[10]=o,e[11]=u,e[12]=l):l=e[12],l},pn=t=>{const e=v.compilerRuntimeExports.c(8),{badge:n,asChild:r,...i}=t,o=Me();let s;e[0]!==r||e[1]!==o?(s=Ne(o,r,"img"),e[0]=r,e[1]=o,e[2]=s):s=e[2];const a=s,c=gn(i,o),u=n.asset?.preview;let l;return e[3]!==a||e[4]!==n.collection.name||e[5]!==u||e[6]!==c?(l=v.jsxRuntimeExports.jsx(a,{src:u,alt:n.collection.name,"data-badge-name":n.collection.name,...c}),e[3]=a,e[4]=n.collection.name,e[5]=u,e[6]=c,e[7]=l):l=e[7],l};dn.displayName="ProductBadgeGroup";fn.displayName="ProductBadgeItem";pn.displayName="ProductBadgeImage";const Pi={Root:ln,Group:dn,Item:fn,Image:pn};function Di(t,e){return t[e.position]||(t[e.position]=[]),t[e.position].push(e),t}exports.ProductBadge=Pi;exports.VendureBadgePlugin=H;
|
package/badge.mjs
CHANGED
|
@@ -2362,7 +2362,7 @@ const {
|
|
|
2362
2362
|
formToJSON: no,
|
|
2363
2363
|
getAdapter: ro,
|
|
2364
2364
|
mergeConfig: io
|
|
2365
|
-
} = S, pi = (t) => Ge.some(t, (e) => e && e
|
|
2365
|
+
} = S, pi = (t) => (t && Ge.some(t, (e) => e && e?.errorCode !== void 0) || t?.errorCode !== void 0) && t !== void 0, Tt = typeof window < "u";
|
|
2366
2366
|
class cn {
|
|
2367
2367
|
constructor(e = {}) {
|
|
2368
2368
|
this.requestStrategy = async (n, r) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haus-storefront-react/vendure-plugin-configs",
|
|
3
|
-
"version": "0.0.52-
|
|
3
|
+
"version": "0.0.52-4",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@haus-storefront-react/common-utils": "0.0.52-
|
|
45
|
-
"@haus-storefront-react/core": "0.0.52-
|
|
46
|
-
"@haus-storefront-react/shared-types": "0.0.52-
|
|
44
|
+
"@haus-storefront-react/common-utils": "0.0.52-4",
|
|
45
|
+
"@haus-storefront-react/core": "0.0.52-4",
|
|
46
|
+
"@haus-storefront-react/shared-types": "0.0.52-4"
|
|
47
47
|
}
|
|
48
48
|
}
|