@haus-storefront-react/vendure-plugin-configs 0.0.47 → 0.0.48

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.
Files changed (4) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/badge.js +13 -13
  3. package/badge.mjs +965 -898
  4. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.0.47 (2025-10-08)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated core to 0.0.47
6
+ - Updated common/utils to 0.0.47
7
+ - Updated shared/types to 0.0.47
8
+
1
9
  ## 0.0.46 (2025-10-08)
2
10
 
3
11
  ### 🩹 Fixes
package/badge.js CHANGED
@@ -1,24 +1,24 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-CzxpJe9c.js"),E=require("./index-jyV3VKB7.js"),K=require("react"),vt=require("@tanstack/react-query");function Zt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const T=Zt(K),U=new he.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?U.getSettings().availablePositions[e]:U.getSettings().defaultPositions;return{badges:he.lodashExports.filter(t,o=>r?r.includes(o.position):!0),availablePositions:r}}},queryUpdates:{},settings:{defaultPositions:["top-left","top-right","bottom-left","bottom-right"],availablePositions:{productListItem:["top-left","top-right","bottom-left","bottom-right"],productDetail:["top-left","top-right","bottom-left","bottom-right"],imageCarousel:["top-left","top-right","bottom-left","bottom-right"]}}});U.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"]}]}]}]}});U.setRequests({getBadges:async()=>U.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 en(t){const e=[];function r(o,i){const s=T.createContext(i),a=e.length;e.push(s);const c=l=>{const f=E.compilerRuntimeExports.c(8);let m,g,p;f[0]!==l?({scope:p,children:m,...g}=l,f[0]=l,f[1]=m,f[2]=g,f[3]=p):(m=f[1],g=f[2],p=f[3]);const y=p?.[t]?.[a]||s,h=g;let w;return f[4]!==y.Provider||f[5]!==m||f[6]!==h?(w=E.jsxRuntimeExports.jsx(y.Provider,{value:h,children:m}),f[4]=y.Provider,f[5]=m,f[6]=h,f[7]=w):w=f[7],w};c.displayName=o+"Provider";function u(l,f){const m=f?.[t]?.[a]||s,g=T.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[c,u]}function n(){const o=e.map(i=>T.createContext(i));return function(s){const a=s?.[t]||o;return T.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}function tn(t,e){if(e==="web")return t;const{src:r,alt:n,width:o,height:i,...s}=t,a=[typeof o=="number"?{width:o}:void 0,typeof i=="number"?{height:i}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...s,source:{uri:r},...c?{style:c}:{}}}function nn(t){const{src:e,alt:r,...n}=t;return e?{...n,source:{uri:e}}:n}const rn={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 on(t,e){if(e==="web")return t;let r=null;try{r=require("react-native")}catch{r=null}if(!r)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const n=rn[t];if(!n)return console.warn(`No native component mapping found for '${t}', falling back to View`),r.View;if(n==="Image"){const i=K.forwardRef((s,a)=>{const c=E.compilerRuntimeExports.c(5);if(!s.src)return null;let u;c[0]!==s?(u=nn(s),c[0]=s,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=E.jsxRuntimeExports.jsx(r.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return i.displayName="PlatformPrimitiveImage",i}const o=r[n];return o||(console.warn(`Native component '${n}' not found, falling back to View`),r.View)}const sn=Symbol("radix.slottable");function an(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function cn(t,e){const r={...e};for(const n in e){const o=t[n],i=e[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const c=i(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]=un(o,i):n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...t,...r}}function un(t,e){let r=null;try{r=require("react-native")}catch{r=null}const n=r?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return i=>{const s=[t(i),e(i)];return n?n(s):s};if(typeof t=="function")return i=>{const s=e?[t(i),e]:t(i);return n?n(s):s};if(typeof e=="function")return i=>{const s=t?[t,e(i)]:e(i);return n?n(s):s};const o=[t,e].filter(Boolean);return n?n(o):o}function ln(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===sn}function dn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function fn(t,e){const r=T.forwardRef((n,o)=>{const{children:i,...s}=n;if(T.isValidElement(i)){const a=dn(i),c=cn(s,i.props);return i.type!==T.Fragment&&(c.ref=o?an(o,a):a),T.cloneElement(i,c)}return T.Children.count(i)>1?T.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function be(t,e=!1,r="div"){if(!e)return on(r,t);const n=fn("Slot"),o=T.forwardRef((i,s)=>{const a=E.compilerRuntimeExports.c(15);let c,u;a[0]!==i?({children:c,...u}=i,a[0]=i,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 m=T.Children.toArray(c),g=m.find(ln);if(g){const p=g.props.children,y=m.map(S=>S===g?T.Children.count(p)>1?T.Children.only(null):T.isValidElement(p)?p.props.children:null:S),h=T.isValidElement(p)?T.cloneElement(p,void 0,y):null;let w;a[7]!==s||a[8]!==u||a[9]!==h?(w=E.jsxRuntimeExports.jsx(n,{...u,ref:s,children:h}),a[7]=s,a[8]=u,a[9]=h,a[10]=w):w=a[10],l=w;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=E.jsxRuntimeExports.jsx(n,{...u,ref:s,children:c}),a[11]=c,a[12]=s,a[13]=u,a[14]=f):f=a[14],f});return o.displayName="Slot",o}const pn="debug",_=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(pn);return t==="true"||t==="1"}catch{return!1}},mn=()=>{const t=(e,r,n=[])=>r?typeof e=="string"?[`<${r}> ${e}`,...n]:[`<${r}>`,e,...n]:Array.isArray(e)?[...e,...n]:[e,...n];return{log:(e,r,...n)=>{_()&&console.log(...t(e,r,n))},info:(e,r,...n)=>{_()&&console.info(...t(e,r,n))},warn:(e,r,...n)=>{_()&&console.warn(...t(e,r,n))},error:(e,r,...n)=>{_()&&console.error(...t(e,r,n))},debug:(e,r,...n)=>{_()&&console.debug(...t(e,r,n))},group:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.group(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupCollapsed:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.groupCollapsed(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupEnd:()=>{_()&&console.groupEnd()},table:(e,r,n)=>{_()&&(r&&console.log(`<${r}>`),console.table(e,n))},time:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.time(r?n?`<${r}> ${n}`:`<${r}>`:n)}},timeEnd:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.timeEnd(r?n?`<${r}> ${n}`:`<${r}>`:n)}}}},Et=mn();function hn(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}let Q;try{Q=require("@react-native-async-storage/async-storage").default}catch{Q=null}let qe=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");qe=new t}catch{qe=null}const V=typeof window<"u"&&typeof window.localStorage<"u",H=!!Q,se={},_e={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},xe=()=>{try{return qe?.getStore?.()??null}catch{return null}},F={getItem:async t=>{const e=!V&&!H?xe():null;return e?e.getItem(t):H?Q.getItem(t):V?new Promise(r=>{Promise.resolve().then(()=>{const n=window.localStorage.getItem(t),o=se[t];n!==o&&(se[t]=n||""),r(n)})}):_e.getItem(t)},setItem:async(t,e)=>{const r=!V&&!H?xe():null;return r?r.setItem(t,e):H?Q.setItem(t,e):V?new Promise((n,o)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const i=window.localStorage.getItem(t);i===e?(se[t]=e,n()):o(new Error(`Failed to set localStorage item: expected "${e}", got "${i}"`))}catch(i){o(i)}})}):_e.setItem(t,e)},removeItem:async t=>{const e=!V&&!H?xe():null;return e?e.removeItem(t):H?Q.removeItem(t):V?new Promise((r,n)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const o=window.localStorage.getItem(t);o===null?(delete se[t],r()):n(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${o}"`))}catch(o){n(o)}})}):_e.removeItem(t)}},We=50,j={get:async()=>{try{const t=await F.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await F.setItem("eventHistory",JSON.stringify(t.slice(-We)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await F.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await j.get();await j.set([{...t,timestamp:Date.now()},...e].slice(-We))},find:async t=>(await j.get()).find(r=>r.key===t.key&&r.identifier===t.identifier),filter:async(t,e)=>{const r=await j.get();return e?r.filter(e):r.filter(({key:n,identifier:o})=>(!n||t.key===n)&&(!o||t.identifier===o))}};function yn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=hn(),t.__HAUS_EVENT_EMITTER__}function $(t){const e=yn(),r=(...c)=>console.error(...c);j.get().then(c=>{const l=he.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(Et.info("Clearing event history since it is older than 1 hour:","eventBus",l),j.clear())});const n=(c,u,l)=>{const f=m=>{try{if(typeof m=="object"&&m!==null){const{identifier:g,data:p}=m;(!g||g===l)&&u(p)}else u(m)}catch(g){r(g)}};return e.on(c,f),()=>{o(c,u,l)}},o=(c,u,l)=>{const f=m=>{if(typeof m=="object"&&m!==null){const{identifier:g}=m;(!g||g===l)&&e.off(c,u)}};e.off(c,f)};return{on:n,off:o,once:(c,u,l)=>{const f=m=>{try{if(typeof m=="object"&&m!==null){const{identifier:g,data:p}=m;(!g||g===l)&&u(p)}else u(m)}finally{o(c,f,l)}};e.on(c,f)},emit:(c,u,...l)=>{const f={identifier:u,data:l.length===1?l[0]:l};j.push({key:c,identifier:u,payload:f.data}),e.emit(c,f)},getEventHistory:(c,u)=>j.filter({key:c,identifier:u})}}$();$();$();$();$();$();$();new vt.QueryClient;function At(t,e){return function(){return t.apply(e,arguments)}}const{toString:gn}=Object.prototype,{getPrototypeOf:Le}=Object,{iterator:we,toStringTag:Tt}=Symbol,Se=(t=>e=>{const r=gn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),P=t=>(t=t.toLowerCase(),e=>Se(e)===t),ve=t=>e=>typeof e===t,{isArray:X}=Array,ee=ve("undefined");function bn(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&N(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ot=P("ArrayBuffer");function wn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ot(t.buffer),e}const Sn=ve("string"),N=ve("function"),Rt=ve("number"),Ee=t=>t!==null&&typeof t=="object",vn=t=>t===!0||t===!1,fe=t=>{if(Se(t)!=="object")return!1;const e=Le(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tt in t)&&!(we in t)},En=P("Date"),An=P("File"),Tn=P("Blob"),On=P("FileList"),Rn=t=>Ee(t)&&N(t.pipe),Nn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||N(t.append)&&((e=Se(t))==="formdata"||e==="object"&&N(t.toString)&&t.toString()==="[object FormData]"))},kn=P("URLSearchParams"),[_n,xn,Pn,Cn]=["ReadableStream","Request","Response","Headers"].map(P),Dn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function te(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),X(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function Nt(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}const B=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kt=t=>!ee(t)&&t!==B;function Fe(){const{caseless:t}=kt(this)&&this||{},e={},r=(n,o)=>{const i=t&&Nt(e,o)||o;fe(e[i])&&fe(n)?e[i]=Fe(e[i],n):fe(n)?e[i]=Fe({},n):X(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&te(arguments[n],r);return e}const qn=(t,e,r,{allOwnKeys:n}={})=>(te(e,(o,i)=>{r&&N(o)?t[i]=At(o,r):t[i]=o},{allOwnKeys:n}),t),Fn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),jn=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Mn=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Le(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Bn=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},In=t=>{if(!t)return null;if(X(t))return t;let e=t.length;if(!Rt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Un=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Le(Uint8Array)),Ln=(t,e)=>{const n=(t&&t[we]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},$n=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Vn=P("HTMLFormElement"),Hn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),ze=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Wn=P("RegExp"),_t=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};te(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},zn=t=>{_t(t,(e,r)=>{if(N(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(N(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Jn=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return X(t)?n(t):n(String(t).split(e)),r},Qn=()=>{},Kn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Xn(t){return!!(t&&N(t.append)&&t[Tt]==="FormData"&&t[we])}const Gn=t=>{const e=new Array(10),r=(n,o)=>{if(Ee(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const i=X(n)?[]:{};return te(n,(s,a)=>{const c=r(s,o+1);!ee(c)&&(i[a]=c)}),e[o]=void 0,i}}return n};return r(t,0)},Yn=P("AsyncFunction"),Zn=t=>t&&(Ee(t)||N(t))&&N(t.then)&&N(t.catch),xt=((t,e)=>t?setImmediate:e?((r,n)=>(B.addEventListener("message",({source:o,data:i})=>{o===B&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),B.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N(B.postMessage)),er=typeof queueMicrotask<"u"?queueMicrotask.bind(B):typeof process<"u"&&process.nextTick||xt,tr=t=>t!=null&&N(t[we]),d={isArray:X,isArrayBuffer:Ot,isBuffer:bn,isFormData:Nn,isArrayBufferView:wn,isString:Sn,isNumber:Rt,isBoolean:vn,isObject:Ee,isPlainObject:fe,isReadableStream:_n,isRequest:xn,isResponse:Pn,isHeaders:Cn,isUndefined:ee,isDate:En,isFile:An,isBlob:Tn,isRegExp:Wn,isFunction:N,isStream:Rn,isURLSearchParams:kn,isTypedArray:Un,isFileList:On,forEach:te,merge:Fe,extend:qn,trim:Dn,stripBOM:Fn,inherits:jn,toFlatObject:Mn,kindOf:Se,kindOfTest:P,endsWith:Bn,toArray:In,forEachEntry:Ln,matchAll:$n,isHTMLForm:Vn,hasOwnProperty:ze,hasOwnProp:ze,reduceDescriptors:_t,freezeMethods:zn,toObjectSet:Jn,toCamelCase:Hn,noop:Qn,toFiniteNumber:Kn,findKey:Nt,global:B,isContextDefined:kt,isSpecCompliantForm:Xn,toJSONObject:Gn,isAsyncFn:Yn,isThenable:Zn,setImmediate:xt,asap:er,isIterable:tr};function b(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(b,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Pt=b.prototype,Ct={};["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=>{Ct[t]={value:t}});Object.defineProperties(b,Ct);Object.defineProperty(Pt,"isAxiosError",{value:!0});b.from=(t,e,r,n,o,i)=>{const s=Object.create(Pt);return d.toFlatObject(t,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),b.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const nr=null;function je(t){return d.isPlainObject(t)||d.isArray(t)}function Dt(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function Je(t,e,r){return t?t.concat(e).map(function(o,i){return o=Dt(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function rr(t){return d.isArray(t)&&!t.some(je)}const or=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Ae(t,e,r){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!d.isUndefined(h[y])});const n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(o))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,h){let w=p;if(p&&!h&&typeof p=="object"){if(d.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&rr(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(w=d.toArray(p)))return y=Dt(y),w.forEach(function(A,D){!(d.isUndefined(A)||A===null)&&e.append(s===!0?Je([y],D,i):s===null?y:y+"[]",u(A))}),!1}return je(p)?!0:(e.append(Je(h,y,i),u(p)),!1)}const f=[],m=Object.assign(or,{defaultVisitor:l,convertValue:u,isVisitable:je});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(w,S){(!(d.isUndefined(w)||w===null)&&o.call(e,w,d.isString(S)?S.trim():S,y,m))===!0&&g(w,y?y.concat(S):[S])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Qe(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function $e(t,e){this._pairs=[],t&&Ae(t,this,e)}const qt=$e.prototype;qt.append=function(e,r){this._pairs.push([e,r])};qt.toString=function(e){const r=e?function(n){return e.call(this,n,Qe)}:Qe;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function ir(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(t,e,r){if(!e)return t;const n=r&&r.encode||ir;d.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(e,r):i=d.isURLSearchParams(e)?e.toString():new $e(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Ke{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(n){n!==null&&e(n)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sr=typeof URLSearchParams<"u"?URLSearchParams:$e,ar=typeof FormData<"u"?FormData:null,cr=typeof Blob<"u"?Blob:null,ur={isBrowser:!0,classes:{URLSearchParams:sr,FormData:ar,Blob:cr},protocols:["http","https","file","blob","url","data"]},Ve=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,lr=Ve&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),dr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fr=Ve&&window.location.href||"http://localhost",pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:dr,navigator:Me,origin:fr},Symbol.toStringTag,{value:"Module"})),O={...pr,...ur};function mr(t,e){return Ae(t,new O.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return O.isNode&&d.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function hr(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function yr(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function Mt(t){function e(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=r.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&d.isArray(o[s])&&(o[s]=yr(o[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const r={};return d.forEachEntry(t,(n,o)=>{e(hr(n),o,r,0)}),r}return null}function gr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ne={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=d.isObject(e);if(i&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return o?JSON.stringify(Mt(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return mr(e,this.formSerializer).toString();if((a=d.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ae(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),gr(e)):e}],transformResponse:[function(e){const r=this.transitional||ne.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?b.from(a,b.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData: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=>{ne.headers[t]={}});const br=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"]),wr=t=>{const e={};let r,n,o;return t&&t.split(`
2
- `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&br[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Xe=Symbol("internals");function Y(t){return t&&String(t).trim().toLowerCase()}function pe(t){return t===!1||t==null?t:d.isArray(t)?t.map(pe):String(t)}function Sr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const vr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Pe(t,e,r,n,o){if(d.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!d.isString(e)){if(d.isString(n))return e.indexOf(n)!==-1;if(d.isRegExp(n))return n.test(e)}}function Er(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Ar(t,e){const r=d.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}let k=class{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function i(a,c,u){const l=Y(c);if(!l)throw new Error("header name must be a non-empty string");const f=d.findKey(o,l);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=pe(a))}const s=(a,c)=>d.forEach(a,(u,l)=>i(u,l,c));if(d.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(d.isString(e)&&(e=e.trim())&&!vr(e))s(wr(e),r);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,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=Y(e),e){const n=d.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return Sr(o);if(d.isFunction(r))return r.call(this,o,n);if(d.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Y(e),e){const n=d.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Pe(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function i(s){if(s=Y(s),s){const a=d.findKey(n,s);a&&(!r||Pe(n,n[a],a,r))&&(delete n[a],o=!0)}}return d.isArray(e)?e.forEach(i):i(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!e||Pe(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const r=this,n={};return d.forEach(this,(o,i)=>{const s=d.findKey(n,i);if(s){r[s]=pe(o),delete r[i];return}const a=e?Er(i):String(i).trim();a!==i&&delete r[i],r[a]=pe(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return d.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&d.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[Xe]=this[Xe]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Y(s);n[a]||(Ar(o,s),n[a]=!0)}return d.isArray(e)?e.forEach(i):i(e),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(k.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});d.freezeMethods(k);function Ce(t,e){const r=this||ne,n=e||r,o=k.from(n.headers);let i=n.data;return d.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Bt(t){return!!(t&&t.__CANCEL__)}function G(t,e,r){b.call(this,t??"canceled",b.ERR_CANCELED,e,r),this.name="CanceledError"}d.inherits(G,b,{__CANCEL__:!0});function It(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new b("Request failed with status code "+r.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Tr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Or(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=n[i];s||(s=u),r[o]=c,n[o]=u;let f=i,m=0;for(;f!==o;)m+=r[f++],f=f%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;const g=l&&u-l;return g?Math.round(m*1e3/g):void 0}}function Rr(t,e){let r=0,n=1e3/e,o,i;const s=(u,l=Date.now())=>{r=l,o=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const l=Date.now(),f=l-r;f>=n?s(u,l):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const ye=(t,e,r=3)=>{let n=0;const o=Or(50,250);return Rr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-n,u=o(c),l=s<=a;n=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:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},r)},Ge=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ye=t=>(...e)=>d.asap(()=>t(...e)),Nr=O.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,O.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,kr=O.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const s=[t+"="+encodeURIComponent(e)];d.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),d.isString(n)&&s.push("path="+n),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _r(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function xr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ut(t,e,r){let n=!_r(e);return t&&(n||r==!1)?xr(t,e):e}const Ze=t=>t instanceof k?{...t}:t;function L(t,e){e=e||{};const r={};function n(u,l,f,m){return d.isPlainObject(u)&&d.isPlainObject(l)?d.merge.call({caseless:m},u,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function o(u,l,f,m){if(d.isUndefined(l)){if(!d.isUndefined(u))return n(void 0,u,f,m)}else return n(u,l,f,m)}function i(u,l){if(!d.isUndefined(l))return n(void 0,l)}function s(u,l){if(d.isUndefined(l)){if(!d.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function a(u,l,f){if(f in e)return n(u,l);if(f in t)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,l,f)=>o(Ze(u),Ze(l),f,!0)};return d.forEach(Object.keys(Object.assign({},t,e)),function(l){const f=c[l]||o,m=f(t[l],e[l],l);d.isUndefined(m)&&f!==a||(r[l]=m)}),r}const Lt=t=>{const e=L({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=e;e.headers=s=k.from(s),e.url=Ft(Ut(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(r)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...l]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...l].join("; "))}}if(O.hasStandardBrowserEnv&&(n&&d.isFunction(n)&&(n=n(e)),n||n!==!1&&Nr(e.url))){const u=o&&i&&kr.read(i);u&&s.set(o,u)}return e},Pr=typeof XMLHttpRequest<"u",Cr=Pr&&function(t){return new Promise(function(r,n){const o=Lt(t);let i=o.data;const s=k.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,l,f,m,g,p;function y(){g&&g(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function w(){if(!h)return;const A=k.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:A,config:t,request:h};It(function(M){r(M),y()},function(M){n(M),y()},R),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(n(new b("Request aborted",b.ECONNABORTED,t,h)),h=null)},h.onerror=function(){n(new b("Network Error",b.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),n(new b(D,R.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,h)),h=null},i===void 0&&s.setContentType(null),"setRequestHeader"in h&&d.forEach(s.toJSON(),function(D,R){h.setRequestHeader(R,D)}),d.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),a&&a!=="json"&&(h.responseType=o.responseType),u&&([m,p]=ye(u,!0),h.addEventListener("progress",m)),c&&h.upload&&([f,g]=ye(c),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(l=A=>{h&&(n(!A||A.type?new G(null,t,h):A),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const S=Tr(o.url);if(S&&O.protocols.indexOf(S)===-1){n(new b("Unsupported protocol "+S+":",b.ERR_BAD_REQUEST,t));return}h.send(i||null)})},Dr=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const l=u instanceof Error?u:this.reason;n.abort(l instanceof b?l:new G(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,i(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>d.asap(a),c}},qr=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},Fr=async function*(t,e){for await(const r of jr(t))yield*qr(r,e)},jr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},et=(t,e,r,n)=>{const o=Fr(t,e);let i=0,s,a=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await o.next();if(u){a(),c.close();return}let f=l.byteLength;if(r){let m=i+=f;r(m)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Te=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$t=Te&&typeof ReadableStream=="function",Mr=Te&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Vt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Br=$t&&Vt(()=>{let t=!1;const e=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),tt=64*1024,Be=$t&&Vt(()=>d.isReadableStream(new Response("").body)),ge={stream:Be&&(t=>t.body)};Te&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ge[e]&&(ge[e]=d.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new b(`Response type '${e}' is not supported`,b.ERR_NOT_SUPPORT,n)})})})(new Response);const Ir=async t=>{if(t==null)return 0;if(d.isBlob(t))return t.size;if(d.isSpecCompliantForm(t))return(await new Request(O.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(d.isArrayBufferView(t)||d.isArrayBuffer(t))return t.byteLength;if(d.isURLSearchParams(t)&&(t=t+""),d.isString(t))return(await Mr(t)).byteLength},Ur=async(t,e)=>{const r=d.toFiniteNumber(t.getContentLength());return r??Ir(e)},Lr=Te&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:m}=Lt(t);u=u?(u+"").toLowerCase():"text";let g=Dr([o,i&&i.toAbortSignal()],s),p;const y=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let h;try{if(c&&Br&&r!=="get"&&r!=="head"&&(h=await Ur(l,n))!==0){let R=new Request(e,{method:"POST",body:n,duplex:"half"}),q;if(d.isFormData(n)&&(q=R.headers.get("content-type"))&&l.setContentType(q),R.body){const[M,ie]=Ge(h,ye(Ye(c)));n=et(R.body,tt,M,ie)}}d.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;p=new Request(e,{...m,signal:g,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let S=await fetch(p,m);const A=Be&&(u==="stream"||u==="response");if(Be&&(a||A&&y)){const R={};["status","statusText","headers"].forEach(He=>{R[He]=S[He]});const q=d.toFiniteNumber(S.headers.get("content-length")),[M,ie]=a&&Ge(q,ye(Ye(a),!0))||[];S=new Response(et(S.body,tt,M,()=>{ie&&ie(),y&&y()}),R)}u=u||"text";let D=await ge[d.findKey(ge,u)||"text"](S,t);return!A&&y&&y(),await new Promise((R,q)=>{It(R,q,{data:D,headers:k.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,t,p),{cause:w.cause||w}):b.from(w,w&&w.code,t,p)}}),Ie={http:nr,xhr:Cr,fetch:Lr};d.forEach(Ie,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const nt=t=>`- ${t}`,$r=t=>d.isFunction(t)||t===null||t===!1,Ht={getAdapter:t=>{t=d.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i<e;i++){r=t[i];let s;if(n=r,!$r(r)&&(n=Ie[(s=String(r)).toLowerCase()],n===void 0))throw new b(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
4
- `+i.map(nt).join(`
5
- `):" "+nt(i[0]):"as no adapter specified";throw new b("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Ie};function De(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new G(null,t)}function rt(t){return De(t),t.headers=k.from(t.headers),t.data=Ce.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ht.getAdapter(t.adapter||ne.adapter)(t).then(function(n){return De(t),n.data=Ce.call(t,t.transformResponse,n),n.headers=k.from(n.headers),n},function(n){return Bt(n)||(De(t),n&&n.response&&(n.response.data=Ce.call(t,t.transformResponse,n.response),n.response.headers=k.from(n.response.headers))),Promise.reject(n)})}const Wt="1.10.0",Oe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Oe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ot={};Oe.transitional=function(e,r,n){function o(i,s){return"[Axios v"+Wt+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(e===!1)throw new b(o(s," has been removed"+(r?" in "+r:"")),b.ERR_DEPRECATED);return r&&!ot[s]&&(ot[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,a):!0}};Oe.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Vr(t,e,r){if(typeof t!="object")throw new b("options must be an object",b.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const a=t[i],c=a===void 0||s(a,i,t);if(c!==!0)throw new b("option "+i+" must be "+c,b.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new b("Unknown option "+i,b.ERR_BAD_OPTION)}}const me={assertOptions:Vr,validators:Oe},C=me.validators;let I=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ke,response:new Ke}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=L(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&me.assertOptions(n,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),o!=null&&(d.isFunction(o)?r.paramsSerializer={serialize:o}:me.assertOptions(o,{encode:C.function,serialize:C.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),me.assertOptions(r,{baseUrl:C.spelling("baseURL"),withXsrfToken:C.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[r.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=k.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!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,m;if(!c){const p=[rt.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),m=p.length,l=Promise.resolve(r);f<m;)l=l.then(p[f++],p[f++]);return l}m=a.length;let g=r;for(f=0;f<m;){const p=a[f++],y=a[f++];try{g=p(g)}catch(h){y.call(this,h);break}}try{l=rt.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,m=u.length;f<m;)l=l.then(u[f++],u[f++]);return l}getUri(e){e=L(this.defaults,e);const r=Ut(e.baseURL,e.url,e.allowAbsoluteUrls);return Ft(r,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){I.prototype[e]=function(r,n){return this.request(L(n||{},{method:e,url:r,data:(n||{}).data}))}});d.forEach(["post","put","patch"],function(e){function r(n){return function(i,s,a){return this.request(L(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}I.prototype[e]=r(),I.prototype[e+"Form"]=r(!0)});let Hr=class zt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new G(i,s,a),r(n.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new zt(function(o){e=o}),cancel:e}}};function Wr(t){return function(r){return t.apply(null,r)}}function zr(t){return d.isObject(t)&&t.isAxiosError===!0}const Ue={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};Object.entries(Ue).forEach(([t,e])=>{Ue[e]=t});function Jt(t){const e=new I(t),r=At(I.prototype.request,e);return d.extend(r,I.prototype,e,{allOwnKeys:!0}),d.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Jt(L(t,o))},r}const v=Jt(ne);v.Axios=I;v.CanceledError=G;v.CancelToken=Hr;v.isCancel=Bt;v.VERSION=Wt;v.toFormData=Ae;v.AxiosError=b;v.Cancel=v.CanceledError;v.all=function(e){return Promise.all(e)};v.spread=Wr;v.isAxiosError=zr;v.mergeConfig=L;v.AxiosHeaders=k;v.formToJSON=t=>Mt(d.isHTMLForm(t)?new FormData(t):t);v.getAdapter=Ht.getAdapter;v.HttpStatusCode=Ue;v.default=v;const{Axios:Ro,AxiosError:it,CanceledError:No,isCancel:ko,CancelToken:_o,VERSION:xo,all:Po,Cancel:Co,isAxiosError:Do,spread:qo,toFormData:Fo,AxiosHeaders:jo,HttpStatusCode:Mo,formToJSON:Bo,getAdapter:Io,mergeConfig:Uo}=v,Jr=t=>he.lodashExports.some(t,e=>e&&e.errorCode!==void 0)||t?.errorCode!==void 0;function st(){return new vt.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})}function at(t){return Qt?(globalThis.__STORE_QUERY_CLIENT__||(globalThis.__STORE_QUERY_CLIENT__=st()),globalThis.__STORE_QUERY_CLIENT__):st()}const Qt=typeof window<"u";let Qr;const ct="auth_token",Kr="lang",Xr="currencyCode";let Gr=async(t,e)=>{await e(t)};function Yr(t){return t.interceptors.request.use(async e=>(await Gr(e,async n=>{const o=await F.getItem(ct),i=await F.getItem("channelToken"),s=await F.getItem(Xr),a=await F.getItem(Kr);o&&(n.headers.Authorization=`Bearer ${o}`),i&&(n.headers["vendure-token"]=i),n.params=n.params||{},s&&(n.params.currencyCode=s),a&&(n.params.languageCode=a)}),e)),t.interceptors.response.use(async e=>(await Zr(e,async n=>{const o=n.headers["vendure-auth-token"];if(o&&F.setItem(ct,o),Jr(n.data.data)){const i=Object.values(n.data.data)[0],s=new it(i.errorCode);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}if(n.data.errors?.length>0){const i=n.data.errors[0],s=new it(i.message);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}}),e),e=>(Et.error("Axios error","vendure/axiosClient",e),Promise.reject(e))),t}function ut(t){const e=v.create({baseURL:Qr,withCredentials:!0,headers:{"vendure-token":""}});return Yr(e)}function lt(){return Qt?(globalThis.__STORE_API_CLIENT__||(globalThis.__STORE_API_CLIENT__=ut()),globalThis.__STORE_API_CLIENT__):ut()}let Zr=async(t,e)=>{await e(t)};new Proxy({},{get:(t,e)=>{const r=lt(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(lt(),e,r)});new Proxy({},{get:(t,e)=>{const r=at(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(at(),e,r)});const eo=globalThis.__STORE_SDK_CONTEXT__||=K.createContext(void 0),to=()=>{const e=K.useContext(eo)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};new Event("searchParamsUpdate");var x={},ae={},ce={},ue={},dt;function re(){if(dt)return ue;dt=1,Object.defineProperty(ue,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),ue.default=t,ue}var W={},Z={},ft;function no(){if(ft)return Z;ft=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.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 Z.isNestedField=t,Z}var pt;function oe(){if(pt)return W;pt=1;var t=W&&W.__assign||function(){return t=Object.assign||function(n){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},t.apply(this,arguments)};Object.defineProperty(W,"__esModule",{value:!0});var e=no(),r=function(){function n(){}return n.resolveVariables=function(o){for(var i={},s=0,a=o;s<a.length;s++){var c=a[s],u=c.variables,l=c.fields;i=t(t(t({},i),u),l&&n.getNestedVariables(l)||{})}return i},n.queryDataNameAndArgumentMap=function(o){return o&&Object.keys(o).length?"(".concat(Object.entries(o).reduce(function(i,s,a){var c=s[0],u=s[1];return"".concat(i).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},n.queryFieldsMap=function(o){var i=this;return o?o.map(function(s){if((0,e.isNestedField)(s))return n.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(c,u,l){var f=c[0],m=c[1];a+="".concat(f," ").concat(m.length>0?"{ "+i.queryFieldsMap(m)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},n.operationOrAlias=function(o){return typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name)},n.isFragment=function(o){var i;return(i=o?.fragment===!0)!==null&&i!==void 0?i:!1},n.operationOrFragment=function(o){return n.isFragment(o)?o.operation:n.operationOrAlias(o.operation)},n.getFragment=function(o){return n.isFragment(o)?"... on ":""},n.queryNestedFieldMap=function(o){return"".concat(n.getFragment(o)).concat(n.operationOrFragment(o)," ").concat(this.isFragment(o)?"":this.queryDataNameAndArgumentMap(o.variables)," ").concat(o.fields.length>0?"{ "+this.queryFieldsMap(o.fields)+" }":"")},n.queryVariablesMap=function(o,i){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(o),i&&typeof i=="object"&&a(n.getNestedVariables(i)),s},n.getNestedVariables=function(o){var i={};function s(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))i=t(t(t({},c.variables),i),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],m=f[1];s(m)}}),i}return s(o),i},n.queryDataType=function(o){var i="String",s=typeof o=="object"?o.value:o;if(o?.type!=null)i=o.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":i="Object";break;case"boolean":i="Boolean";break;case"number":i=a%1===0?"Int":"Float";break}}return typeof o=="object"&&(o.list===!0?i="[".concat(i,"]"):Array.isArray(o.list)&&(i="[".concat(i).concat(o.list[0]?"!":"","]")),o.required&&(i+="!")),i},n}();return W.default=r,W}var mt;function ro(){if(mt)return ce;mt=1,Object.defineProperty(ce,"__esModule",{value:!0});var t=re(),e=oe(),r=function(){function n(o){Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation)}return n.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},n.prototype.mutationsBuilder=function(o){var i=this,s=o.map(function(a){return i.operation=a.operation,i.variables=a.variables,i.fields=a.fields,i.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(o),s.join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Re=require("./index-CzxpJe9c.js"),v=require("./index-jyV3VKB7.js"),te=require("react"),Bt=require("@tanstack/react-query");function gn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const A=gn(te),H=new Re.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?H.getSettings().availablePositions[e]:H.getSettings().defaultPositions;return{badges:Re.lodashExports.filter(t,o=>r?r.includes(o.position):!0),availablePositions:r}}},queryUpdates:{},settings:{defaultPositions:["top-left","top-right","bottom-left","bottom-right"],availablePositions:{productListItem:["top-left","top-right","bottom-left","bottom-right"],productDetail:["top-left","top-right","bottom-left","bottom-right"],imageCarousel:["top-left","top-right","bottom-left","bottom-right"]}}});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 bn(t){const e=[];function r(o,i){const s=A.createContext(i),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 w;return f[4]!==y.Provider||f[5]!==h||f[6]!==m?(w=v.jsxRuntimeExports.jsx(y.Provider,{value:m,children:h}),f[4]=y.Provider,f[5]=h,f[6]=m,f[7]=w):w=f[7],w};c.displayName=o+"Provider";function u(l,f){const h=f?.[t]?.[a]||s,g=A.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[c,u]}function n(){const o=e.map(i=>A.createContext(i));return function(s){const a=s?.[t]||o;return A.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}function wn(t,e){if(e==="web")return t;const{src:r,alt:n,width:o,height:i,...s}=t,a=[typeof o=="number"?{width:o}:void 0,typeof i=="number"?{height:i}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...s,source:{uri:r},...c?{style:c}:{}}}function Sn(t){const{src:e,alt:r,...n}=t;return e?{...n,source:{uri:e}}:n}const vn={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 En(t,e){if(e==="web")return t;let r=null;try{r=require("react-native")}catch{r=null}if(!r)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const n=vn[t];if(!n)return console.warn(`No native component mapping found for '${t}', falling back to View`),r.View;if(n==="Image"){const i=te.forwardRef((s,a)=>{const c=v.compilerRuntimeExports.c(5);if(!s.src)return null;let u;c[0]!==s?(u=Sn(s),c[0]=s,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=v.jsxRuntimeExports.jsx(r.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return i.displayName="PlatformPrimitiveImage",i}const o=r[n];return o||(console.warn(`Native component '${n}' not found, falling back to View`),r.View)}const An=Symbol("radix.slottable");function On(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function Tn(t,e){const r={...e};for(const n in e){const o=t[n],i=e[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const c=i(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]=Rn(o,i):n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...t,...r}}function Rn(t,e){let r=null;try{r=require("react-native")}catch{r=null}const n=r?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return i=>{const s=[t(i),e(i)];return n?n(s):s};if(typeof t=="function")return i=>{const s=e?[t(i),e]:t(i);return n?n(s):s};if(typeof e=="function")return i=>{const s=t?[t,e(i)]:e(i);return n?n(s):s};const o=[t,e].filter(Boolean);return n?n(o):o}function Nn(t){return A.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===An}function kn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function _n(t,e){const r=A.forwardRef((n,o)=>{const{children:i,...s}=n;if(A.isValidElement(i)){const a=kn(i),c=Tn(s,i.props);return i.type!==A.Fragment&&(c.ref=o?On(o,a):a),A.cloneElement(i,c)}return A.Children.count(i)>1?A.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function ke(t,e=!1,r="div"){if(!e)return En(r,t);const n=_n("Slot"),o=A.forwardRef((i,s)=>{const a=v.compilerRuntimeExports.c(15);let c,u;a[0]!==i?({children:c,...u}=i,a[0]=i,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=A.Children.toArray(c),g=h.find(Nn);if(g){const p=g.props.children,y=h.map(T=>T===g?A.Children.count(p)>1?A.Children.only(null):A.isValidElement(p)?p.props.children:null:T),m=A.isValidElement(p)?A.cloneElement(p,void 0,y):null;let w;a[7]!==s||a[8]!==u||a[9]!==m?(w=v.jsxRuntimeExports.jsx(n,{...u,ref:s,children:m}),a[7]=s,a[8]=u,a[9]=m,a[10]=w):w=a[10],l=w;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(n,{...u,ref:s,children:c}),a[11]=c,a[12]=s,a[13]=u,a[14]=f):f=a[14],f});return o.displayName="Slot",o}const xn="debug",P=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(xn);return t==="true"||t==="1"}catch{return!1}},Pn=()=>{const t=(e,r,n=[])=>r?typeof e=="string"?[`<${r}> ${e}`,...n]:[`<${r}>`,e,...n]:Array.isArray(e)?[...e,...n]:[e,...n];return{log:(e,r,...n)=>{P()&&console.log(...t(e,r,n))},info:(e,r,...n)=>{P()&&console.info(...t(e,r,n))},warn:(e,r,...n)=>{P()&&console.warn(...t(e,r,n))},error:(e,r,...n)=>{P()&&console.error(...t(e,r,n))},debug:(e,r,...n)=>{P()&&console.debug(...t(e,r,n))},group:(e,r)=>{if(P()){const n=typeof e=="string"?e:void 0;console.group(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupCollapsed:(e,r)=>{if(P()){const n=typeof e=="string"?e:void 0;console.groupCollapsed(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupEnd:()=>{P()&&console.groupEnd()},table:(e,r,n)=>{P()&&(r&&console.log(`<${r}>`),console.table(e,n))},time:(e,r)=>{if(P()){const n=typeof e=="string"?e:void 0;console.time(r?n?`<${r}> ${n}`:`<${r}>`:n)}},timeEnd:(e,r)=>{if(P()){const n=typeof e=="string"?e:void 0;console.timeEnd(r?n?`<${r}> ${n}`:`<${r}>`:n)}}}},It=Pn();function Cn(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}let Z;try{Z=require("@react-native-async-storage/async-storage").default}catch{Z=null}let He=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");He=new t}catch{He=null}const Q=typeof window<"u"&&typeof window.localStorage<"u",K=!!Z,ye={},Ie={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},Ue=()=>{try{return He?.getStore?.()??null}catch{return null}},B={getItem:async t=>{const e=!Q&&!K?Ue():null;return e?e.getItem(t):K?Z.getItem(t):Q?new Promise(r=>{Promise.resolve().then(()=>{const n=window.localStorage.getItem(t),o=ye[t];n!==o&&(ye[t]=n||""),r(n)})}):Ie.getItem(t)},setItem:async(t,e)=>{const r=!Q&&!K?Ue():null;return r?r.setItem(t,e):K?Z.setItem(t,e):Q?new Promise((n,o)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const i=window.localStorage.getItem(t);i===e?(ye[t]=e,n()):o(new Error(`Failed to set localStorage item: expected "${e}", got "${i}"`))}catch(i){o(i)}})}):Ie.setItem(t,e)},removeItem:async t=>{const e=!Q&&!K?Ue():null;return e?e.removeItem(t):K?Z.removeItem(t):Q?new Promise((r,n)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const o=window.localStorage.getItem(t);o===null?(delete ye[t],r()):n(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${o}"`))}catch(o){n(o)}})}):Ie.removeItem(t)}},it=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(-it)))}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(-it))},find:async t=>(await I.get()).find(r=>r.key===t.key&&r.identifier===t.identifier),filter:async(t,e)=>{const r=await I.get();return e?r.filter(e):r.filter(({key:n,identifier:o})=>(!n||t.key===n)&&(!o||t.identifier===o))}};function Dn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=Cn(),t.__HAUS_EVENT_EMITTER__}function z(t){const e=Dn(),r=(...c)=>console.error(...c);I.get().then(c=>{const l=Re.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(It.info("Clearing event history since it is older than 1 hour:","eventBus",l),I.clear())});const n=(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){r(g)}};return e.on(c,f),()=>{o(c,u,l)}},o=(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:n,off:o,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{o(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})}}z();z();z();z();z();z();z();new Bt.QueryClient;function Ut(t,e){return function(){return t.apply(e,arguments)}}const{toString:qn}=Object.prototype,{getPrototypeOf:Ke}=Object,{iterator:_e,toStringTag:$t}=Symbol,xe=(t=>e=>{const r=qn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>xe(e)===t),Pe=t=>e=>typeof e===t,{isArray:ne}=Array,ee=Pe("undefined");function ae(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&N(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Lt=D("ArrayBuffer");function Fn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Lt(t.buffer),e}const jn=Pe("string"),N=Pe("function"),Vt=Pe("number"),ce=t=>t!==null&&typeof t=="object",Mn=t=>t===!0||t===!1,Ae=t=>{if(xe(t)!=="object")return!1;const e=Ke(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!($t in t)&&!(_e in t)},Bn=t=>{if(!ce(t)||ae(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},In=D("Date"),Un=D("File"),$n=D("Blob"),Ln=D("FileList"),Vn=t=>ce(t)&&N(t.pipe),Hn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||N(t.append)&&((e=xe(t))==="formdata"||e==="object"&&N(t.toString)&&t.toString()==="[object FormData]"))},Wn=D("URLSearchParams"),[zn,Jn,Qn,Kn]=["ReadableStream","Request","Response","Headers"].map(D),Xn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ue(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),ne(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(ae(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function Ht(t,e){if(ae(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wt=t=>!ee(t)&&t!==L;function We(){const{caseless:t,skipUndefined:e}=Wt(this)&&this||{},r={},n=(o,i)=>{const s=t&&Ht(r,i)||i;Ae(r[s])&&Ae(o)?r[s]=We(r[s],o):Ae(o)?r[s]=We({},o):ne(o)?r[s]=o.slice():(!e||!ee(o))&&(r[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&ue(arguments[o],n);return r}const Gn=(t,e,r,{allOwnKeys:n}={})=>(ue(e,(o,i)=>{r&&N(o)?t[i]=Ut(o,r):t[i]=o},{allOwnKeys:n}),t),Yn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Zn=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},er=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Ke(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},tr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},nr=t=>{if(!t)return null;if(ne(t))return t;let e=t.length;if(!Vt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},rr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ke(Uint8Array)),or=(t,e)=>{const n=(t&&t[_e]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},ir=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},sr=D("HTMLFormElement"),ar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),st=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),cr=D("RegExp"),zt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};ue(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},ur=t=>{zt(t,(e,r)=>{if(N(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(N(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},lr=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return ne(t)?n(t):n(String(t).split(e)),r},dr=()=>{},fr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function pr(t){return!!(t&&N(t.append)&&t[$t]==="FormData"&&t[_e])}const mr=t=>{const e=new Array(10),r=(n,o)=>{if(ce(n)){if(e.indexOf(n)>=0)return;if(ae(n))return n;if(!("toJSON"in n)){e[o]=n;const i=ne(n)?[]:{};return ue(n,(s,a)=>{const c=r(s,o+1);!ee(c)&&(i[a]=c)}),e[o]=void 0,i}}return n};return r(t,0)},hr=D("AsyncFunction"),yr=t=>t&&(ce(t)||N(t))&&N(t.then)&&N(t.catch),Jt=((t,e)=>t?setImmediate:e?((r,n)=>(L.addEventListener("message",({source:o,data:i})=>{o===L&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),L.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N(L.postMessage)),gr=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Jt,br=t=>t!=null&&N(t[_e]),d={isArray:ne,isArrayBuffer:Lt,isBuffer:ae,isFormData:Hn,isArrayBufferView:Fn,isString:jn,isNumber:Vt,isBoolean:Mn,isObject:ce,isPlainObject:Ae,isEmptyObject:Bn,isReadableStream:zn,isRequest:Jn,isResponse:Qn,isHeaders:Kn,isUndefined:ee,isDate:In,isFile:Un,isBlob:$n,isRegExp:cr,isFunction:N,isStream:Vn,isURLSearchParams:Wn,isTypedArray:rr,isFileList:Ln,forEach:ue,merge:We,extend:Gn,trim:Xn,stripBOM:Yn,inherits:Zn,toFlatObject:er,kindOf:xe,kindOfTest:D,endsWith:tr,toArray:nr,forEachEntry:or,matchAll:ir,isHTMLForm:sr,hasOwnProperty:st,hasOwnProp:st,reduceDescriptors:zt,freezeMethods:ur,toObjectSet:lr,toCamelCase:ar,noop:dr,toFiniteNumber:fr,findKey:Ht,global:L,isContextDefined:Wt,isSpecCompliantForm:pr,toJSONObject:mr,isAsyncFn:hr,isThenable:yr,setImmediate:Jt,asap:gr,isIterable:br};function b(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(b,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Qt=b.prototype,Kt={};["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=>{Kt[t]={value:t}});Object.defineProperties(b,Kt);Object.defineProperty(Qt,"isAxiosError",{value:!0});b.from=(t,e,r,n,o,i)=>{const s=Object.create(Qt);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,r,n,o),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",i&&Object.assign(s,i),s};const wr=null;function ze(t){return d.isPlainObject(t)||d.isArray(t)}function Xt(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function at(t,e,r){return t?t.concat(e).map(function(o,i){return o=Xt(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function Sr(t){return d.isArray(t)&&!t.some(ze)}const vr=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Ce(t,e,r){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!d.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(o))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 w=p;if(p&&!m&&typeof p=="object"){if(d.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Sr(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(w=d.toArray(p)))return y=Xt(y),w.forEach(function(E,R){!(d.isUndefined(E)||E===null)&&e.append(s===!0?at([y],R,i):s===null?y:y+"[]",u(E))}),!1}return ze(p)?!0:(e.append(at(m,y,i),u(p)),!1)}const f=[],h=Object.assign(vr,{defaultVisitor:l,convertValue:u,isVisitable:ze});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(w,T){(!(d.isUndefined(w)||w===null)&&o.call(e,w,d.isString(T)?T.trim():T,y,h))===!0&&g(w,y?y.concat(T):[T])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return g(t),e}function ct(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Xe(t,e){this._pairs=[],t&&Ce(t,this,e)}const Gt=Xe.prototype;Gt.append=function(e,r){this._pairs.push([e,r])};Gt.toString=function(e){const r=e?function(n){return e.call(this,n,ct)}:ct;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Er(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yt(t,e,r){if(!e)return t;const n=r&&r.encode||Er;d.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(e,r):i=d.isURLSearchParams(e)?e.toString():new Xe(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ut{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){d.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ar=typeof URLSearchParams<"u"?URLSearchParams:Xe,Or=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,Rr={isBrowser:!0,classes:{URLSearchParams:Ar,FormData:Or,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",Je=typeof navigator=="object"&&navigator||void 0,Nr=Ge&&(!Je||["ReactNative","NativeScript","NS"].indexOf(Je.product)<0),kr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_r=Ge&&window.location.href||"http://localhost",xr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:Nr,hasStandardBrowserWebWorkerEnv:kr,navigator:Je,origin:_r},Symbol.toStringTag,{value:"Module"})),O={...xr,...Rr};function Pr(t,e){return Ce(t,new O.classes.URLSearchParams,{visitor:function(r,n,o,i){return O.isNode&&d.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function Cr(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Dr(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function en(t){function e(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=r.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&d.isArray(o[s])&&(o[s]=Dr(o[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const r={};return d.forEachEntry(t,(n,o)=>{e(Cr(n),o,r,0)}),r}return null}function qr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const le={transitional:Zt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=d.isObject(e);if(i&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return o?JSON.stringify(en(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Pr(e,this.formSerializer).toString();if((a=d.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ce(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),qr(e)):e}],transformResponse:[function(e){const r=this.transitional||le.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e,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 Fr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jr=t=>{const e={};let r,n,o;return t&&t.split(`
2
+ `).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&Fr[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},lt=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 Mr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Br=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function $e(t,e,r,n,o){if(d.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!d.isString(e)){if(d.isString(n))return e.indexOf(n)!==-1;if(d.isRegExp(n))return n.test(e)}}function Ir(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Ur(t,e){const r=d.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}let k=class{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function i(a,c,u){const l=ie(c);if(!l)throw new Error("header name must be a non-empty string");const f=d.findKey(o,l);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=Oe(a))}const s=(a,c)=>d.forEach(a,(u,l)=>i(u,l,c));if(d.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(d.isString(e)&&(e=e.trim())&&!Br(e))s(jr(e),r);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,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=ie(e),e){const n=d.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return Mr(o);if(d.isFunction(r))return r.call(this,o,n);if(d.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=ie(e),e){const n=d.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||$e(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function i(s){if(s=ie(s),s){const a=d.findKey(n,s);a&&(!r||$e(n,n[a],a,r))&&(delete n[a],o=!0)}}return d.isArray(e)?e.forEach(i):i(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!e||$e(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const r=this,n={};return d.forEach(this,(o,i)=>{const s=d.findKey(n,i);if(s){r[s]=Oe(o),delete r[i];return}const a=e?Ir(i):String(i).trim();a!==i&&delete r[i],r[a]=Oe(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return d.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&d.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[lt]=this[lt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ie(s);n[a]||(Ur(o,s),n[a]=!0)}return d.isArray(e)?e.forEach(i):i(e),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(k.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});d.freezeMethods(k);function Le(t,e){const r=this||le,n=e||r,o=k.from(n.headers);let i=n.data;return d.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function tn(t){return!!(t&&t.__CANCEL__)}function re(t,e,r){b.call(this,t??"canceled",b.ERR_CANCELED,e,r),this.name="CanceledError"}d.inherits(re,b,{__CANCEL__:!0});function nn(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new b("Request failed with status code "+r.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $r(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Lr(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=n[i];s||(s=u),r[o]=c,n[o]=u;let f=i,h=0;for(;f!==o;)h+=r[f++],f=f%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;const g=l&&u-l;return g?Math.round(h*1e3/g):void 0}}function Vr(t,e){let r=0,n=1e3/e,o,i;const s=(u,l=Date.now())=>{r=l,o=null,i&&(clearTimeout(i),i=null),t(...u)};return[(...u)=>{const l=Date.now(),f=l-r;f>=n?s(u,l):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const Ne=(t,e,r=3)=>{let n=0;const o=Lr(50,250);return Vr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-n,u=o(c),l=s<=a;n=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:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},r)},dt=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},ft=t=>(...e)=>d.asap(()=>t(...e)),Hr=O.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,O.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Wr=O.hasStandardBrowserEnv?{write(t,e,r,n,o,i,s){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];d.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),d.isString(n)&&a.push(`path=${n}`),d.isString(o)&&a.push(`domain=${o}`),i===!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 zr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Jr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function rn(t,e,r){let n=!zr(e);return t&&(n||r==!1)?Jr(t,e):e}const pt=t=>t instanceof k?{...t}:t;function W(t,e){e=e||{};const r={};function n(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 o(u,l,f,h){if(d.isUndefined(l)){if(!d.isUndefined(u))return n(void 0,u,f,h)}else return n(u,l,f,h)}function i(u,l){if(!d.isUndefined(l))return n(void 0,l)}function s(u,l){if(d.isUndefined(l)){if(!d.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function a(u,l,f){if(f in e)return n(u,l);if(f in t)return n(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,l,f)=>o(pt(u),pt(l),f,!0)};return d.forEach(Object.keys({...t,...e}),function(l){const f=c[l]||o,h=f(t[l],e[l],l);d.isUndefined(h)&&f!==a||(r[l]=h)}),r}const on=t=>{const e=W({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=e;if(e.headers=s=k.from(s),e.url=Yt(rn(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(r)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(d.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,f])=>{u.includes(l.toLowerCase())&&s.set(l,f)})}}if(O.hasStandardBrowserEnv&&(n&&d.isFunction(n)&&(n=n(e)),n||n!==!1&&Hr(e.url))){const c=o&&i&&Wr.read(i);c&&s.set(o,c)}return e},Qr=typeof XMLHttpRequest<"u",Kr=Qr&&function(t){return new Promise(function(r,n){const o=on(t);let i=o.data;const s=k.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,l,f,h,g,p;function y(){g&&g(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function w(){if(!m)return;const E=k.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:E,config:t,request:m};nn(function(_){r(_),y()},function(_){n(_),y()},x),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(w)},m.onabort=function(){m&&(n(new b("Request aborted",b.ECONNABORTED,t,m)),m=null)},m.onerror=function(R){const x=R&&R.message?R.message:"Network Error",U=new b(x,b.ERR_NETWORK,t,m);U.event=R||null,n(U),m=null},m.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||Zt;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),n(new b(R,x.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,m)),m=null},i===void 0&&s.setContentType(null),"setRequestHeader"in m&&d.forEach(s.toJSON(),function(R,x){m.setRequestHeader(x,R)}),d.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),a&&a!=="json"&&(m.responseType=o.responseType),u&&([h,p]=Ne(u,!0),m.addEventListener("progress",h)),c&&m.upload&&([f,g]=Ne(c),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(l=E=>{m&&(n(!E||E.type?new re(null,t,m):E),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const T=$r(o.url);if(T&&O.protocols.indexOf(T)===-1){n(new b("Unsupported protocol "+T+":",b.ERR_BAD_REQUEST,t));return}m.send(i||null)})},Xr=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const l=u instanceof Error?u:this.reason;n.abort(l instanceof b?l:new re(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,i(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>d.asap(a),c}},Gr=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},Yr=async function*(t,e){for await(const r of Zr(t))yield*Gr(r,e)},Zr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},mt=(t,e,r,n)=>{const o=Yr(t,e);let i=0,s,a=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await o.next();if(u){a(),c.close();return}let f=l.byteLength;if(r){let h=i+=f;r(h)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},ht=64*1024,{isFunction:ge}=d,eo=(({Request:t,Response:e})=>({Request:t,Response:e}))(d.global),{ReadableStream:yt,TextEncoder:gt}=d.global,bt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},to=t=>{t=d.merge.call({skipUndefined:!0},eo,t);const{fetch:e,Request:r,Response:n}=t,o=e?ge(e):typeof fetch=="function",i=ge(r),s=ge(n);if(!o)return!1;const a=o&&ge(yt),c=o&&(typeof gt=="function"?(p=>y=>p.encode(y))(new gt):async p=>new Uint8Array(await new r(p).arrayBuffer())),u=i&&a&&bt(()=>{let p=!1;const y=new r(O.origin,{body:new yt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),l=s&&a&&bt(()=>d.isReadableStream(new n("").body)),f={stream:l&&(p=>p.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!f[p]&&(f[p]=(y,m)=>{let w=y&&y[p];if(w)return w.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 r(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:w,signal:T,cancelToken:E,timeout:R,onDownloadProgress:x,onUploadProgress:U,responseType:_,headers:Me,withCredentials:pe="same-origin",fetchOptions:Ze}=on(p),et=e||fetch;_=_?(_+"").toLowerCase():"text";let me=Xr([T,E&&E.toAbortSignal()],R),oe=null;const $=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let tt;try{if(U&&u&&m!=="get"&&m!=="head"&&(tt=await g(Me,w))!==0){let M=new r(y,{method:"POST",body:w,duplex:"half"}),J;if(d.isFormData(w)&&(J=M.headers.get("content-type"))&&Me.setContentType(J),M.body){const[Be,he]=dt(tt,Ne(ft(U)));w=mt(M.body,ht,Be,he)}}d.isString(pe)||(pe=pe?"include":"omit");const q=i&&"credentials"in r.prototype,nt={...Ze,signal:me,method:m.toUpperCase(),headers:Me.normalize().toJSON(),body:w,duplex:"half",credentials:q?pe:void 0};oe=i&&new r(y,nt);let j=await(i?et(oe,Ze):et(y,nt));const rt=l&&(_==="stream"||_==="response");if(l&&(x||rt&&$)){const M={};["status","statusText","headers"].forEach(ot=>{M[ot]=j[ot]});const J=d.toFiniteNumber(j.headers.get("content-length")),[Be,he]=x&&dt(J,Ne(ft(x),!0))||[];j=new n(mt(j.body,ht,Be,()=>{he&&he(),$&&$()}),M)}_=_||"text";let yn=await f[d.findKey(f,_)||"text"](j,p);return!rt&&$&&$(),await new Promise((M,J)=>{nn(M,J,{data:yn,headers:k.from(j.headers),status:j.status,statusText:j.statusText,config:p,request:oe})})}catch(q){throw $&&$(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,p,oe),{cause:q.cause||q}):b.from(q,q&&q.code,p,oe)}}},no=new Map,sn=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:o}=e,i=[n,o,r];let s=i.length,a=s,c,u,l=no;for(;a--;)c=i[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:to(e)),l=u;return u};sn();const Ye={http:wr,xhr:Kr,fetch:{get:sn}};d.forEach(Ye,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const wt=t=>`- ${t}`,ro=t=>d.isFunction(t)||t===null||t===!1;function oo(t,e){t=d.isArray(t)?t:[t];const{length:r}=t;let n,o;const i={};for(let s=0;s<r;s++){n=t[s];let a;if(o=n,!ro(n)&&(o=Ye[(a=String(n)).toLowerCase()],o===void 0))throw new b(`Unknown adapter '${a}'`);if(o&&(d.isFunction(o)||(o=o.get(e))))break;i[a||"#"+s]=o}if(!o){const s=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=r?s.length>1?`since :
4
+ `+s.map(wt).join(`
5
+ `):" "+wt(s[0]):"as no adapter specified";throw new b("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const an={getAdapter:oo,adapters:Ye};function Ve(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new re(null,t)}function St(t){return Ve(t),t.headers=k.from(t.headers),t.data=Le.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),an.getAdapter(t.adapter||le.adapter,t)(t).then(function(n){return Ve(t),n.data=Le.call(t,t.transformResponse,n),n.headers=k.from(n.headers),n},function(n){return tn(n)||(Ve(t),n&&n.response&&(n.response.data=Le.call(t,t.transformResponse,n.response),n.response.headers=k.from(n.response.headers))),Promise.reject(n)})}const cn="1.13.2",De={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{De[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const vt={};De.transitional=function(e,r,n){function o(i,s){return"[Axios v"+cn+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(e===!1)throw new b(o(s," has been removed"+(r?" in "+r:"")),b.ERR_DEPRECATED);return r&&!vt[s]&&(vt[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,a):!0}};De.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function io(t,e,r){if(typeof t!="object")throw new b("options must be an object",b.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const a=t[i],c=a===void 0||s(a,i,t);if(c!==!0)throw new b("option "+i+" must be "+c,b.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new b("Unknown option "+i,b.ERR_BAD_OPTION)}}const Te={assertOptions:io,validators:De},F=Te.validators;let V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ut,response:new ut}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
+ `+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=W(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Te.assertOptions(n,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),o!=null&&(d.isFunction(o)?r.paramsSerializer={serialize:o}:Te.assertOptions(o,{encode:F.function,serialize:F.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Te.assertOptions(r,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[r.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=k.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!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=[St.bind(this),void 0];for(p.unshift(...a),p.push(...u),h=p.length,l=Promise.resolve(r);f<h;)l=l.then(p[f++],p[f++]);return l}h=a.length;let g=r;for(;f<h;){const p=a[f++],y=a[f++];try{g=p(g)}catch(m){y.call(this,m);break}}try{l=St.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=W(this.defaults,e);const r=rn(e.baseURL,e.url,e.allowAbsoluteUrls);return Yt(r,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){V.prototype[e]=function(r,n){return this.request(W(n||{},{method:e,url:r,data:(n||{}).data}))}});d.forEach(["post","put","patch"],function(e){function r(n){return function(i,s,a){return this.request(W(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}V.prototype[e]=r(),V.prototype[e+"Form"]=r(!0)});let so=class un{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new re(i,s,a),r(n.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 r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new un(function(o){e=o}),cancel:e}}};function ao(t){return function(r){return t.apply(null,r)}}function co(t){return d.isObject(t)&&t.isAxiosError===!0}const Qe={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(Qe).forEach(([t,e])=>{Qe[e]=t});function ln(t){const e=new V(t),r=Ut(V.prototype.request,e);return d.extend(r,V.prototype,e,{allOwnKeys:!0}),d.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return ln(W(t,o))},r}const S=ln(le);S.Axios=V;S.CanceledError=re;S.CancelToken=so;S.isCancel=tn;S.VERSION=cn;S.toFormData=Ce;S.AxiosError=b;S.Cancel=S.CanceledError;S.all=function(e){return Promise.all(e)};S.spread=ao;S.isAxiosError=co;S.mergeConfig=W;S.AxiosHeaders=k;S.formToJSON=t=>en(d.isHTMLForm(t)?new FormData(t):t);S.getAdapter=an.getAdapter;S.HttpStatusCode=Qe;S.default=S;const{Axios:Lo,AxiosError:Et,CanceledError:Vo,isCancel:Ho,CancelToken:Wo,VERSION:zo,all:Jo,Cancel:Qo,isAxiosError:Ko,spread:Xo,toFormData:Go,AxiosHeaders:Yo,HttpStatusCode:Zo,formToJSON:ei,getAdapter:ti,mergeConfig:ni}=S,uo=t=>Re.lodashExports.some(t,e=>e&&e.errorCode!==void 0)||t?.errorCode!==void 0;function At(){return new Bt.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})}function Ot(t){return dn?(globalThis.__STORE_QUERY_CLIENT__||(globalThis.__STORE_QUERY_CLIENT__=At()),globalThis.__STORE_QUERY_CLIENT__):At()}const dn=typeof window<"u";let lo;const Tt="auth_token",fo="lang",po="currencyCode";let mo=async(t,e)=>{await e(t)};function ho(t){return t.interceptors.request.use(async e=>(await mo(e,async n=>{const o=await B.getItem(Tt),i=await B.getItem("channelToken"),s=await B.getItem(po),a=await B.getItem(fo);o&&(n.headers.Authorization=`Bearer ${o}`),i&&(n.headers["vendure-token"]=i),n.params=n.params||{},s&&(n.params.currencyCode=s),a&&(n.params.languageCode=a)}),e)),t.interceptors.response.use(async e=>(await yo(e,async n=>{const o=n.headers["vendure-auth-token"];if(o&&B.setItem(Tt,o),uo(n.data.data)){const i=Object.values(n.data.data)[0],s=new Et(i.errorCode);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}if(n.data.errors?.length>0){const i=n.data.errors[0],s=new Et(i.message);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}}),e),e=>(It.error("Axios error","vendure/axiosClient",e),Promise.reject(e))),t}function Rt(t){const e=S.create({baseURL:lo,withCredentials:!0,headers:{"vendure-token":""}});return ho(e)}function Nt(){return dn?(globalThis.__STORE_API_CLIENT__||(globalThis.__STORE_API_CLIENT__=Rt()),globalThis.__STORE_API_CLIENT__):Rt()}let yo=async(t,e)=>{await e(t)};new Proxy({},{get:(t,e)=>{const r=Nt(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(Nt(),e,r)});new Proxy({},{get:(t,e)=>{const r=Ot(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(Ot(),e,r)});const go=globalThis.__STORE_SDK_CONTEXT__||=te.createContext(void 0),bo=()=>{const e=te.useContext(go)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};var C={},be={},we={},Se={},kt;function de(){if(kt)return Se;kt=1,Object.defineProperty(Se,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),Se.default=t,Se}var X={},se={},_t;function wo(){if(_t)return se;_t=1,Object.defineProperty(se,"__esModule",{value:!0}),se.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 se.isNestedField=t,se}var xt;function fe(){if(xt)return X;xt=1;var t=X&&X.__assign||function(){return t=Object.assign||function(n){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},t.apply(this,arguments)};Object.defineProperty(X,"__esModule",{value:!0});var e=wo(),r=function(){function n(){}return n.resolveVariables=function(o){for(var i={},s=0,a=o;s<a.length;s++){var c=a[s],u=c.variables,l=c.fields;i=t(t(t({},i),u),l&&n.getNestedVariables(l)||{})}return i},n.queryDataNameAndArgumentMap=function(o){return o&&Object.keys(o).length?"(".concat(Object.entries(o).reduce(function(i,s,a){var c=s[0],u=s[1];return"".concat(i).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},n.queryFieldsMap=function(o){var i=this;return o?o.map(function(s){if((0,e.isNestedField)(s))return n.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?"{ "+i.queryFieldsMap(h)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},n.operationOrAlias=function(o){return typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name)},n.isFragment=function(o){var i;return(i=o?.fragment===!0)!==null&&i!==void 0?i:!1},n.operationOrFragment=function(o){return n.isFragment(o)?o.operation:n.operationOrAlias(o.operation)},n.getFragment=function(o){return n.isFragment(o)?"... on ":""},n.queryNestedFieldMap=function(o){return"".concat(n.getFragment(o)).concat(n.operationOrFragment(o)," ").concat(this.isFragment(o)?"":this.queryDataNameAndArgumentMap(o.variables)," ").concat(o.fields.length>0?"{ "+this.queryFieldsMap(o.fields)+" }":"")},n.queryVariablesMap=function(o,i){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(o),i&&typeof i=="object"&&a(n.getNestedVariables(i)),s},n.getNestedVariables=function(o){var i={};function s(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))i=t(t(t({},c.variables),i),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)}}),i}return s(o),i},n.queryDataType=function(o){var i="String",s=typeof o=="object"?o.value:o;if(o?.type!=null)i=o.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":i="Object";break;case"boolean":i="Boolean";break;case"number":i=a%1===0?"Int":"Float";break}}return typeof o=="object"&&(o.list===!0?i="[".concat(i,"]"):Array.isArray(o.list)&&(i="[".concat(i).concat(o.list[0]?"!":"","]")),o.required&&(i+="!")),i},n}();return X.default=r,X}var Pt;function So(){if(Pt)return we;Pt=1,Object.defineProperty(we,"__esModule",{value:!0});var t=de(),e=fe(),r=function(){function n(o){Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation)}return n.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},n.prototype.mutationsBuilder=function(o){var i=this,s=o.map(function(a){return i.operation=a.operation,i.variables=a.variables,i.fields=a.fields,i.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(o),s.join(`
7
7
  `))},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,i,s){return"".concat(o).concat(s!==0?", ":"").concat(i,": $").concat(i)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(o){return Object.keys(o).length?"(".concat(Object.keys(o).reduce(function(i,s,a){return"".concat(i).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(o[s]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o,i){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(o),` {
8
8
  `).concat(i,`
9
9
  }`),variables:e.default.queryVariablesMap(o)}},n.prototype.operationTemplate=function(o){var i=typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name);return"".concat(i," ").concat(this.queryDataNameAndArgumentMap(),` {
10
10
  `).concat(this.queryFieldsMap(this.fields),`
11
- }`)},n.prototype.queryFieldsMap=function(o){var i=this;return Array.isArray(o)?o.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(i.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},n}();return ce.default=r,ce}var le={},ht;function oo(){if(ht)return le;ht=1,Object.defineProperty(le,"__esModule",{value:!0});var t=re(),e=oe(),r=function(){function n(o){this.queryDataType=function(i){var s="String",a=typeof i=="object"?i.value:i;if(i.type!==void 0)s=i.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 i=="object"&&i.required&&(s+="!"),s},Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields||[],this.operation=o.operation)}return n.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate())},n.prototype.queriesBuilder=function(o){var i=this,s=function(){var a=[];return o.forEach(function(c){c&&(i.operation=c.operation,i.fields=c.fields,i.variables=c.variables,a.push(i.operationTemplate()))}),a.join(" ")};return this.operationWrapperTemplate(s())},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,i,s){return"".concat(o).concat(s!==0?", ":"").concat(i,": $").concat(i)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(){var o=this;return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,s,a){return"".concat(i).concat(a!==0?", ":"","$").concat(s,": ").concat(o.queryDataType(o.variables[s]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o){var i=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Query," ").concat(i.charAt(0).toUpperCase()).concat(i.slice(1)," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(o," }"),variables:e.default.queryVariablesMap(this.variables)}},n.prototype.operationTemplate=function(){var o=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap()," { nodes { ").concat(e.default.queryFieldsMap(this.fields)," } }")},n}();return le.default=r,le}var yt;function io(){if(yt)return ae;yt=1,Object.defineProperty(ae,"__esModule",{value:!0});var t=ro(),e=oo();return ae.default={DefaultAppSyncQueryAdapter:e.default,DefaultAppSyncMutationAdapter:t.default},ae}var z={},gt;function so(){if(gt)return z;gt=1;var t=z&&z.__assign||function(){return t=Object.assign||function(o){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(o[c]=i[c])}return o},t.apply(this,arguments)};Object.defineProperty(z,"__esModule",{value:!0});var e=re(),r=oe(),n=function(){function o(i,s){var a=this;Array.isArray(i)?this.variables=r.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation),this.config={operationName:""},s&&Object.entries(s).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l})}return o.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(e.default.Mutation,this.variables,this.operationTemplate(this.operation))},o.prototype.mutationsBuilder=function(i){var s=this,a=i.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,r.default.resolveVariables(i),a.join(`
11
+ }`)},n.prototype.queryFieldsMap=function(o){var i=this;return Array.isArray(o)?o.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(i.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},n}();return we.default=r,we}var ve={},Ct;function vo(){if(Ct)return ve;Ct=1,Object.defineProperty(ve,"__esModule",{value:!0});var t=de(),e=fe(),r=function(){function n(o){this.queryDataType=function(i){var s="String",a=typeof i=="object"?i.value:i;if(i.type!==void 0)s=i.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 i=="object"&&i.required&&(s+="!"),s},Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields||[],this.operation=o.operation)}return n.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate())},n.prototype.queriesBuilder=function(o){var i=this,s=function(){var a=[];return o.forEach(function(c){c&&(i.operation=c.operation,i.fields=c.fields,i.variables=c.variables,a.push(i.operationTemplate()))}),a.join(" ")};return this.operationWrapperTemplate(s())},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,i,s){return"".concat(o).concat(s!==0?", ":"").concat(i,": $").concat(i)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(){var o=this;return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,s,a){return"".concat(i).concat(a!==0?", ":"","$").concat(s,": ").concat(o.queryDataType(o.variables[s]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o){var i=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Query," ").concat(i.charAt(0).toUpperCase()).concat(i.slice(1)," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(o," }"),variables:e.default.queryVariablesMap(this.variables)}},n.prototype.operationTemplate=function(){var o=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap()," { nodes { ").concat(e.default.queryFieldsMap(this.fields)," } }")},n}();return ve.default=r,ve}var Dt;function Eo(){if(Dt)return be;Dt=1,Object.defineProperty(be,"__esModule",{value:!0});var t=So(),e=vo();return be.default={DefaultAppSyncQueryAdapter:e.default,DefaultAppSyncMutationAdapter:t.default},be}var G={},qt;function Ao(){if(qt)return G;qt=1;var t=G&&G.__assign||function(){return t=Object.assign||function(o){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(o[c]=i[c])}return o},t.apply(this,arguments)};Object.defineProperty(G,"__esModule",{value:!0});var e=de(),r=fe(),n=function(){function o(i,s){var a=this;Array.isArray(i)?this.variables=r.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation),this.config={operationName:""},s&&Object.entries(s).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l})}return o.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(e.default.Mutation,this.variables,this.operationTemplate(this.operation))},o.prototype.mutationsBuilder=function(i){var s=this,a=i.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,r.default.resolveVariables(i),a.join(`
12
12
  `))},o.prototype.queryDataArgumentAndTypeMap=function(i){return this.fields&&typeof this.fields=="object"&&(i=t(t({},r.default.getNestedVariables(this.fields)),i)),i&&Object.keys(i).length>0?"(".concat(Object.keys(i).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(r.default.queryDataType(i[a]))},""),")"):""},o.prototype.operationWrapperTemplate=function(i,s,a){var c="".concat(i," ").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:r.default.queryVariablesMap(s,this.fields)}},o.prototype.operationTemplate=function(i){var s=typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name);return"".concat(s," ").concat(r.default.queryDataNameAndArgumentMap(this.variables)," ").concat(this.fields&&this.fields.length>0?`{
15
15
  `.concat(r.default.queryFieldsMap(this.fields),`
16
- }`):"")},o}();return z.default=n,z}var J={},bt;function ao(){if(bt)return J;bt=1;var t=J&&J.__assign||function(){return t=Object.assign||function(o){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(o[c]=i[c])}return o},t.apply(this,arguments)};Object.defineProperty(J,"__esModule",{value:!0});var e=re(),r=oe(),n=function(){function o(i,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(i)?this.variables=r.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields||[],this.operation=i.operation)}return o.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate(this.variables))},o.prototype.queriesBuilder=function(i){var s=this,a=function(){var c=[];return i.forEach(function(u){u&&(s.operation=u.operation,s.fields=u.fields,c.push(s.operationTemplate(u.variables)))}),c.join(" ")};return this.operationWrapperTemplate(a())},o.prototype.queryDataArgumentAndTypeMap=function(){var i=this.variables;return this.fields&&typeof this.fields=="object"&&(i=t(t({},r.default.getNestedVariables(this.fields)),i)),i&&Object.keys(i).length>0?"(".concat(Object.keys(i).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(r.default.queryDataType(i[a]))},""),")"):""},o.prototype.operationWrapperTemplate=function(i){var s="".concat(e.default.Query," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(i," }");return s=s.replace("query","query".concat(this.config.operationName!==""?" "+this.config.operationName:"")),{query:s,variables:r.default.queryVariablesMap(this.variables,this.fields)}},o.prototype.operationTemplate=function(i){var s=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(s," ").concat(i?r.default.queryDataNameAndArgumentMap(i):""," ").concat(this.fields&&this.fields.length>0?"{ "+r.default.queryFieldsMap(this.fields)+" }":"")},o}();return J.default=n,J}var de={},wt;function co(){if(wt)return de;wt=1,Object.defineProperty(de,"__esModule",{value:!0});var t=re(),e=oe(),r=function(){function n(o){Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation)}return n.prototype.subscriptionBuilder=function(){return this.operationWrapperTemplate(t.default.Subscription,this.variables,this.operationTemplate(this.operation))},n.prototype.subscriptionsBuilder=function(o){var i=this,s=o.map(function(a){return i.operation=a.operation,i.variables=a.variables,i.fields=a.fields,i.operationTemplate(a.operation)});return this.operationWrapperTemplate(t.default.Subscription,e.default.resolveVariables(o),s.join(`
16
+ }`):"")},o}();return G.default=n,G}var Y={},Ft;function Oo(){if(Ft)return Y;Ft=1;var t=Y&&Y.__assign||function(){return t=Object.assign||function(o){for(var i,s=1,a=arguments.length;s<a;s++){i=arguments[s];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(o[c]=i[c])}return o},t.apply(this,arguments)};Object.defineProperty(Y,"__esModule",{value:!0});var e=de(),r=fe(),n=function(){function o(i,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(i)?this.variables=r.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields||[],this.operation=i.operation)}return o.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate(this.variables))},o.prototype.queriesBuilder=function(i){var s=this,a=function(){var c=[];return i.forEach(function(u){u&&(s.operation=u.operation,s.fields=u.fields,c.push(s.operationTemplate(u.variables)))}),c.join(" ")};return this.operationWrapperTemplate(a())},o.prototype.queryDataArgumentAndTypeMap=function(){var i=this.variables;return this.fields&&typeof this.fields=="object"&&(i=t(t({},r.default.getNestedVariables(this.fields)),i)),i&&Object.keys(i).length>0?"(".concat(Object.keys(i).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(r.default.queryDataType(i[a]))},""),")"):""},o.prototype.operationWrapperTemplate=function(i){var s="".concat(e.default.Query," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(i," }");return s=s.replace("query","query".concat(this.config.operationName!==""?" "+this.config.operationName:"")),{query:s,variables:r.default.queryVariablesMap(this.variables,this.fields)}},o.prototype.operationTemplate=function(i){var s=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(s," ").concat(i?r.default.queryDataNameAndArgumentMap(i):""," ").concat(this.fields&&this.fields.length>0?"{ "+r.default.queryFieldsMap(this.fields)+" }":"")},o}();return Y.default=n,Y}var Ee={},jt;function To(){if(jt)return Ee;jt=1,Object.defineProperty(Ee,"__esModule",{value:!0});var t=de(),e=fe(),r=function(){function n(o){Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation)}return n.prototype.subscriptionBuilder=function(){return this.operationWrapperTemplate(t.default.Subscription,this.variables,this.operationTemplate(this.operation))},n.prototype.subscriptionsBuilder=function(o){var i=this,s=o.map(function(a){return i.operation=a.operation,i.variables=a.variables,i.fields=a.fields,i.operationTemplate(a.operation)});return this.operationWrapperTemplate(t.default.Subscription,e.default.resolveVariables(o),s.join(`
17
17
  `))},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,i,s){return"".concat(o).concat(s!==0?", ":"").concat(i,": $").concat(i)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(o){return Object.keys(o).length?"(".concat(Object.keys(o).reduce(function(i,s,a){return"".concat(i).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(o[s]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o,i,s){return{query:"".concat(o," ").concat(this.queryDataArgumentAndTypeMap(i),` {
18
18
  `).concat(s,`
19
19
  }`),variables:e.default.queryVariablesMap(i)}},n.prototype.operationTemplate=function(o){var i=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(i," ").concat(this.queryDataNameAndArgumentMap(),` {
20
20
  `).concat(this.queryFieldsMap(this.fields),`
21
- }`)},n.prototype.queryFieldsMap=function(o){var i=this;return o?o.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(i.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},n}();return de.default=r,de}var St;function uo(){if(St)return x;St=1,Object.defineProperty(x,"__esModule",{value:!0}),x.adapters=x.query=x.mutation=x.subscription=void 0;var t=io();x.adapters=t.default;var e=so(),r=ao(),n=co();function o(a,c,u){var l;if(Array.isArray(a)){if(c){var f=new c(a,u);return f.queriesBuilder(a)}return l=new r.default(a,u),l.queriesBuilder(a)}if(c){var f=new c(a,u);return f.queryBuilder()}return l=new r.default(a,u),l.queryBuilder()}x.query=o;function i(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())}x.mutation=i;function s(a,c){var u,l;return Array.isArray(a)?c?(u=new c(a),u.subscriptionsBuilder(a)):(l=new n.default(a),l.subscriptionsBuilder(a)):c?(u=new c(a),u.subscriptionBuilder()):(l=new n.default(a),l.subscriptionBuilder())}return x.subscription=s,x}uo();const lo={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"}}]}}]},fo={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"}}]}}]}}]}}]},po={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"}}]}}]}}]},mo={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"}}]}}]}}]},ho={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"}}]}}]}}]}}]},yo={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"nextOrderStates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nextOrderStates"}}]}}]},go={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"}}]}}]},bo={"\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":fo,"\n mutation logout {\n logout {\n success\n }\n }\n":po,"\n query me {\n me {\n id\n }\n }\n":mo,"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":ho,"\n query nextOrderStates {\n nextOrderStates\n }\n":yo,"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n":lo,"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n":go};function Re(t){return bo[t]??{}}Re(`
21
+ }`)},n.prototype.queryFieldsMap=function(o){var i=this;return o?o.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(i.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},n}();return Ee.default=r,Ee}var Mt;function Ro(){if(Mt)return C;Mt=1,Object.defineProperty(C,"__esModule",{value:!0}),C.adapters=C.query=C.mutation=C.subscription=void 0;var t=Eo();C.adapters=t.default;var e=Ao(),r=Oo(),n=To();function o(a,c,u){var l;if(Array.isArray(a)){if(c){var f=new c(a,u);return f.queriesBuilder(a)}return l=new r.default(a,u),l.queriesBuilder(a)}if(c){var f=new c(a,u);return f.queryBuilder()}return l=new r.default(a,u),l.queryBuilder()}C.query=o;function i(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())}C.mutation=i;function s(a,c){var u,l;return Array.isArray(a)?c?(u=new c(a),u.subscriptionsBuilder(a)):(l=new n.default(a),l.subscriptionsBuilder(a)):c?(u=new c(a),u.subscriptionBuilder()):(l=new n.default(a),l.subscriptionBuilder())}return C.subscription=s,C}Ro();const No={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"}}]}}]},ko={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"}}]}}]}}]}}]},_o={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"}}]}}]}}]},xo={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"}}]}}]}}]},Po={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"}}]}}]}}]}}]},Co={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"nextOrderStates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nextOrderStates"}}]}}]},Do={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"}}]}}]},qo={"\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":ko,"\n mutation logout {\n logout {\n success\n }\n }\n":_o,"\n query me {\n me {\n id\n }\n }\n":xo,"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":Po,"\n query nextOrderStates {\n nextOrderStates\n }\n":Co,"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n":No,"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n":Do};function qe(t){return qo[t]??{}}qe(`
22
22
  mutation transitionOrderToState($input: String!) {
23
23
  transitionOrderToState(state: $input) {
24
24
  ... on ErrorResult {
@@ -27,21 +27,21 @@
27
27
  }
28
28
  }
29
29
  }
30
- `);Re(`
30
+ `);qe(`
31
31
  query nextOrderStates {
32
32
  nextOrderStates
33
33
  }
34
- `);Re(`
34
+ `);qe(`
35
35
  fragment EligiblePaymentMethods on PaymentMethodQuote {
36
36
  id
37
37
  name
38
38
  description
39
39
  code
40
40
  }
41
- `);Re(`
41
+ `);qe(`
42
42
  query EligiblePaymentMethods {
43
43
  eligiblePaymentMethods {
44
44
  ...EligiblePaymentMethods
45
45
  }
46
46
  }
47
- `);const Ne=()=>{const t=E.compilerRuntimeExports.c(2),{getPlatform:e}=to();let r;return t[0]!==e?(r=e(),t[0]=e,t[1]=r):r=t[1],r};globalThis.__STORE_COMPONENT_PROVIDER_CONTEXT__||=K.createContext(void 0);const ke="ProductBadge",[wo]=en(ke),[So,vo]=wo(ke),Kt=t=>{const e=E.compilerRuntimeExports.c(13);let r,n,o,i,s;e[0]!==t?({children:n,product:o,__scopeProductBadge:r,style:s,...i}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=i,e[5]=s):(r=e[1],n=e[2],o=e[3],i=e[4],s=e[5]);const a=K.useRef(null),c=Ne();let u;e[6]!==c?(u=be(c),e[6]=c,e[7]=u):u=e[7];const l=u;if(!U.getEnabled())return null;const{badges:f}=o;if(!f)return null;const m=f.reduce(Ao,{}),g=Object.keys(m),p={groupedBadges:m,badges:f,badgesRef:a,positions:g},y=E.renderChildren(n,p);let h;return e[8]!==l||e[9]!==i||e[10]!==s||e[11]!==y?(h=E.jsxRuntimeExports.jsx(l,{...i,style:s,children:y}),e[8]=l,e[9]=i,e[10]=s,e[11]=y,e[12]=h):h=e[12],E.jsxRuntimeExports.jsx(So,{scope:r,...p,children:h})};Kt.displayName=ke;const Xt=t=>{const e=E.compilerRuntimeExports.c(18);let r,n,o,i,s;e[0]!==t?({children:o,position:i,asChild:n,__scopeProductBadge:r,...s}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=i,e[5]=s):(r=e[1],n=e[2],o=e[3],i=e[4],s=e[5]);const a=Ne();let c;e[6]!==n||e[7]!==a?(c=be(a,n,"div"),e[6]=n,e[7]=a,e[8]=c):c=e[8];const u=c,{groupedBadges:l}=vo(ke,r),f=l[i];let m;e[9]!==f||e[10]!==o||e[11]!==i?(m=E.renderChildren(o,{badges:f,position:i}),e[9]=f,e[10]=o,e[11]=i,e[12]=m):m=e[12];let g;return e[13]!==u||e[14]!==i||e[15]!==s||e[16]!==m?(g=E.jsxRuntimeExports.jsx(u,{...s,"data-position":i,children:m}),e[13]=u,e[14]=i,e[15]=s,e[16]=m,e[17]=g):g=e[17],g},Gt=t=>{const e=E.compilerRuntimeExports.c(13);let r,n,o,i;e[0]!==t?({children:o,asChild:r,badge:n,...i}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=i):(r=e[1],n=e[2],o=e[3],i=e[4]);const s=Ne();let a;e[5]!==r||e[6]!==s?(a=be(s,r,"div"),e[5]=r,e[6]=s,e[7]=a):a=e[7];const c=a,u=n?.id;let l;return e[8]!==c||e[9]!==o||e[10]!==i||e[11]!==u?(l=E.jsxRuntimeExports.jsx(c,{...i,"data-badge-id":u,children:o}),e[8]=c,e[9]=o,e[10]=i,e[11]=u,e[12]=l):l=e[12],l},Yt=t=>{const e=E.compilerRuntimeExports.c(8),{badge:r,asChild:n,...o}=t,i=Ne();let s;e[0]!==n||e[1]!==i?(s=be(i,n,"img"),e[0]=n,e[1]=i,e[2]=s):s=e[2];const a=s,c=tn(o,i),u=r.asset?.preview;let l;return e[3]!==a||e[4]!==r.collection.name||e[5]!==u||e[6]!==c?(l=E.jsxRuntimeExports.jsx(a,{src:u,alt:r.collection.name,"data-badge-name":r.collection.name,...c}),e[3]=a,e[4]=r.collection.name,e[5]=u,e[6]=c,e[7]=l):l=e[7],l};Xt.displayName="ProductBadgeGroup";Gt.displayName="ProductBadgeItem";Yt.displayName="ProductBadgeImage";const Eo={Root:Kt,Group:Xt,Item:Gt,Image:Yt};function Ao(t,e){return t[e.position]||(t[e.position]=[]),t[e.position].push(e),t}exports.ProductBadge=Eo;exports.VendureBadgePlugin=U;
47
+ `);const Fe=()=>{const t=v.compilerRuntimeExports.c(2),{getPlatform:e}=bo();let r;return t[0]!==e?(r=e(),t[0]=e,t[1]=r):r=t[1],r};globalThis.__STORE_COMPONENT_PROVIDER_CONTEXT__||=te.createContext(void 0);const je="ProductBadge",[Fo]=bn(je),[jo,Mo]=Fo(je),fn=t=>{const e=v.compilerRuntimeExports.c(13);let r,n,o,i,s;e[0]!==t?({children:n,product:o,__scopeProductBadge:r,style:s,...i}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=i,e[5]=s):(r=e[1],n=e[2],o=e[3],i=e[4],s=e[5]);const a=te.useRef(null),c=Fe();let u;e[6]!==c?(u=ke(c),e[6]=c,e[7]=u):u=e[7];const l=u;if(!H.getEnabled())return null;const{badges:f}=o;if(!f)return null;const h=f.reduce(Io,{}),g=Object.keys(h),p={groupedBadges:h,badges:f,badgesRef:a,positions:g},y=v.renderChildren(n,p);let m;return e[8]!==l||e[9]!==i||e[10]!==s||e[11]!==y?(m=v.jsxRuntimeExports.jsx(l,{...i,style:s,children:y}),e[8]=l,e[9]=i,e[10]=s,e[11]=y,e[12]=m):m=e[12],v.jsxRuntimeExports.jsx(jo,{scope:r,...p,children:m})};fn.displayName=je;const pn=t=>{const e=v.compilerRuntimeExports.c(18);let r,n,o,i,s;e[0]!==t?({children:o,position:i,asChild:n,__scopeProductBadge:r,...s}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=i,e[5]=s):(r=e[1],n=e[2],o=e[3],i=e[4],s=e[5]);const a=Fe();let c;e[6]!==n||e[7]!==a?(c=ke(a,n,"div"),e[6]=n,e[7]=a,e[8]=c):c=e[8];const u=c,{groupedBadges:l}=Mo(je,r),f=l[i];let h;e[9]!==f||e[10]!==o||e[11]!==i?(h=v.renderChildren(o,{badges:f,position:i}),e[9]=f,e[10]=o,e[11]=i,e[12]=h):h=e[12];let g;return e[13]!==u||e[14]!==i||e[15]!==s||e[16]!==h?(g=v.jsxRuntimeExports.jsx(u,{...s,"data-position":i,children:h}),e[13]=u,e[14]=i,e[15]=s,e[16]=h,e[17]=g):g=e[17],g},mn=t=>{const e=v.compilerRuntimeExports.c(13);let r,n,o,i;e[0]!==t?({children:o,asChild:r,badge:n,...i}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=i):(r=e[1],n=e[2],o=e[3],i=e[4]);const s=Fe();let a;e[5]!==r||e[6]!==s?(a=ke(s,r,"div"),e[5]=r,e[6]=s,e[7]=a):a=e[7];const c=a,u=n?.id;let l;return e[8]!==c||e[9]!==o||e[10]!==i||e[11]!==u?(l=v.jsxRuntimeExports.jsx(c,{...i,"data-badge-id":u,children:o}),e[8]=c,e[9]=o,e[10]=i,e[11]=u,e[12]=l):l=e[12],l},hn=t=>{const e=v.compilerRuntimeExports.c(8),{badge:r,asChild:n,...o}=t,i=Fe();let s;e[0]!==n||e[1]!==i?(s=ke(i,n,"img"),e[0]=n,e[1]=i,e[2]=s):s=e[2];const a=s,c=wn(o,i),u=r.asset?.preview;let l;return e[3]!==a||e[4]!==r.collection.name||e[5]!==u||e[6]!==c?(l=v.jsxRuntimeExports.jsx(a,{src:u,alt:r.collection.name,"data-badge-name":r.collection.name,...c}),e[3]=a,e[4]=r.collection.name,e[5]=u,e[6]=c,e[7]=l):l=e[7],l};pn.displayName="ProductBadgeGroup";mn.displayName="ProductBadgeItem";hn.displayName="ProductBadgeImage";const Bo={Root:fn,Group:pn,Item:mn,Image:hn};function Io(t,e){return t[e.position]||(t[e.position]=[]),t[e.position].push(e),t}exports.ProductBadge=Bo;exports.VendureBadgePlugin=H;