habit-export-center
Version:
habit's front end solution to export list
6 lines • 215 kB
JavaScript
"use strict";var el=Object.defineProperty,tl=Object.defineProperties;var nl=Object.getOwnPropertyDescriptors;var Tn=Object.getOwnPropertySymbols;var To=Object.prototype.hasOwnProperty,Ao=Object.prototype.propertyIsEnumerable;var Ut=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),rl=e=>{throw TypeError(e)};var Ro=(e,t,n)=>t in e?el(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))To.call(t,n)&&Ro(e,n,t[n]);if(Tn)for(var n of Tn(t))Ao.call(t,n)&&Ro(e,n,t[n]);return e},N=(e,t)=>tl(e,nl(t));var k=(e,t)=>{var n={};for(var r in e)To.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tn)for(var r of Tn(e))t.indexOf(r)<0&&Ao.call(e,r)&&(n[r]=e[r]);return n};var he=(e,t,n)=>new Promise((r,o)=>{var s=l=>{try{i(n.next(l))}catch(c){o(c)}},a=l=>{try{i(n.throw(l))}catch(c){o(c)}},i=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,a);i((n=n.apply(e,t)).next())}),Pt=function(e,t){this[0]=e,this[1]=t},wr=(e,t,n)=>{var r=(a,i,l,c)=>{try{var u=n[a](i),m=(i=u.value)instanceof Pt,b=u.done;Promise.resolve(m?i[0]:i).then(d=>m?r(a==="return"?a:"next",i[1]?{done:d.done,value:d.value}:d,l,c):l({value:d,done:b})).catch(d=>r("throw",d,l,c))}catch(d){c(d)}},o=a=>s[a]=i=>new Promise((l,c)=>r(a,i,l,c)),s={};return n=n.apply(e,t),s[Ut("asyncIterator")]=()=>s,o("next"),o("throw"),o("return"),s},xr=e=>{var t=e[Ut("asyncIterator")],n=!1,r,o={};return t==null?(t=e[Ut("iterator")](),r=s=>o[s]=a=>t[s](a)):(t=t.call(e),r=s=>o[s]=a=>{if(n){if(n=!1,s==="throw")throw a;return a}return n=!0,{done:!1,value:new Pt(new Promise(i=>{var l=t[s](a);l instanceof Object||rl("Object expected"),i(l)}),1)}}),o[Ut("iterator")]=()=>o,r("next"),"throw"in t?r("throw"):o.throw=s=>{throw s},"return"in t&&r("return"),o},No=(e,t,n)=>(t=e[Ut("asyncIterator")])?t.call(e):(e=e[Ut("iterator")](),t={},n=(r,o)=>(o=e[r])&&(t[r]=s=>new Promise((a,i,l)=>(s=o.call(e,s),l=s.done,Promise.resolve(s.value).then(c=>a({value:c,done:l}),i)))),n("next"),n("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),no=require("react-dom");function vs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=vs(A),Xn=vs(no);function bs(e,t){return function(){return e.apply(t,arguments)}}const{toString:ol}=Object.prototype,{getPrototypeOf:ro}=Object,{iterator:Jn,toStringTag:ys}=Symbol,Zn=(e=>t=>{const n=ol.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Je=e=>(e=e.toLowerCase(),t=>Zn(t)===e),Qn=e=>t=>typeof t===e,{isArray:Xt}=Array,mn=Qn("undefined");function sl(e){return e!==null&&!mn(e)&&e.constructor!==null&&!mn(e.constructor)&&Le(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ws=Je("ArrayBuffer");function al(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ws(e.buffer),t}const il=Qn("string"),Le=Qn("function"),xs=Qn("number"),er=e=>e!==null&&typeof e=="object",ll=e=>e===!0||e===!1,Dn=e=>{if(Zn(e)!=="object")return!1;const t=ro(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ys in e)&&!(Jn in e)},cl=Je("Date"),ul=Je("File"),dl=Je("Blob"),fl=Je("FileList"),pl=e=>er(e)&&Le(e.pipe),ml=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Le(e.append)&&((t=Zn(e))==="formdata"||t==="object"&&Le(e.toString)&&e.toString()==="[object FormData]"))},hl=Je("URLSearchParams"),[gl,vl,bl,yl]=["ReadableStream","Request","Response","Headers"].map(Je),wl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Xt(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function Es(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const kt=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Ss=e=>!mn(e)&&e!==kt;function Ir(){const{caseless:e}=Ss(this)&&this||{},t={},n=(r,o)=>{const s=e&&Es(t,o)||o;Dn(t[s])&&Dn(r)?t[s]=Ir(t[s],r):Dn(r)?t[s]=Ir({},r):Xt(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&bn(arguments[r],n);return t}const xl=(e,t,n,{allOwnKeys:r}={})=>(bn(t,(o,s)=>{n&&Le(o)?e[s]=bs(o,n):e[s]=o},{allOwnKeys:r}),e),El=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Cl=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&ro(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Tl=e=>{if(!e)return null;if(Xt(e))return e;let t=e.length;if(!xs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Al=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&ro(Uint8Array)),Nl=(e,t)=>{const r=(e&&e[Jn]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Pl=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ol=Je("HTMLFormElement"),kl=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Po=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jl=Je("RegExp"),Cs=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bn(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},_l=e=>{Cs(e,(t,n)=>{if(Le(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Le(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Dl=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Xt(e)?r(e):r(String(e).split(t)),n},Il=()=>{},Ml=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ll(e){return!!(e&&Le(e.append)&&e[ys]==="FormData"&&e[Jn])}const Fl=e=>{const t=new Array(10),n=(r,o)=>{if(er(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Xt(r)?[]:{};return bn(r,(a,i)=>{const l=n(a,o+1);!mn(l)&&(s[i]=l)}),t[o]=void 0,s}}return r};return n(e,0)},Bl=Je("AsyncFunction"),$l=e=>e&&(er(e)||Le(e))&&Le(e.then)&&Le(e.catch),Rs=((e,t)=>e?setImmediate:t?((n,r)=>(kt.addEventListener("message",({source:o,data:s})=>{o===kt&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),kt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Le(kt.postMessage)),Ul=typeof queueMicrotask!="undefined"?queueMicrotask.bind(kt):typeof process!="undefined"&&process.nextTick||Rs,Wl=e=>e!=null&&Le(e[Jn]),C={isArray:Xt,isArrayBuffer:ws,isBuffer:sl,isFormData:ml,isArrayBufferView:al,isString:il,isNumber:xs,isBoolean:ll,isObject:er,isPlainObject:Dn,isReadableStream:gl,isRequest:vl,isResponse:bl,isHeaders:yl,isUndefined:mn,isDate:cl,isFile:ul,isBlob:dl,isRegExp:jl,isFunction:Le,isStream:pl,isURLSearchParams:hl,isTypedArray:Al,isFileList:fl,forEach:bn,merge:Ir,extend:xl,trim:wl,stripBOM:El,inherits:Sl,toFlatObject:Cl,kindOf:Zn,kindOfTest:Je,endsWith:Rl,toArray:Tl,forEachEntry:Nl,matchAll:Pl,isHTMLForm:Ol,hasOwnProperty:Po,hasOwnProp:Po,reduceDescriptors:Cs,freezeMethods:_l,toObjectSet:Dl,toCamelCase:kl,noop:Il,toFiniteNumber:Ml,findKey:Es,global:kt,isContextDefined:Ss,isSpecCompliantForm:Ll,toJSONObject:Fl,isAsyncFn:Bl,isThenable:$l,setImmediate:Rs,asap:Ul,isIterable:Wl};function X(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}C.inherits(X,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:C.toJSONObject(this.config),code:this.code,status:this.status}}});const Ts=X.prototype,As={};["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(e=>{As[e]={value:e}});Object.defineProperties(X,As);Object.defineProperty(Ts,"isAxiosError",{value:!0});X.from=(e,t,n,r,o,s)=>{const a=Object.create(Ts);return C.toFlatObject(e,a,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),X.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const zl=null;function Mr(e){return C.isPlainObject(e)||C.isArray(e)}function Ns(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function Oo(e,t,n){return e?e.concat(t).map(function(o,s){return o=Ns(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Vl(e){return C.isArray(e)&&!e.some(Mr)}const Hl=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function tr(e,t,n){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=C.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,p){return!C.isUndefined(p[h])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(o))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(C.isDate(y))return y.toISOString();if(!l&&C.isBlob(y))throw new X("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(y)||C.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,h,p){let x=y;if(y&&!p&&typeof y=="object"){if(C.endsWith(h,"{}"))h=r?h:h.slice(0,-2),y=JSON.stringify(y);else if(C.isArray(y)&&Vl(y)||(C.isFileList(y)||C.endsWith(h,"[]"))&&(x=C.toArray(y)))return h=Ns(h),x.forEach(function(E,R){!(C.isUndefined(E)||E===null)&&t.append(a===!0?Oo([h],R,s):a===null?h:h+"[]",c(E))}),!1}return Mr(y)?!0:(t.append(Oo(p,h,s),c(y)),!1)}const m=[],b=Object.assign(Hl,{defaultVisitor:u,convertValue:c,isVisitable:Mr});function d(y,h){if(!C.isUndefined(y)){if(m.indexOf(y)!==-1)throw Error("Circular reference detected in "+h.join("."));m.push(y),C.forEach(y,function(x,w){(!(C.isUndefined(x)||x===null)&&o.call(t,x,C.isString(w)?w.trim():w,h,b))===!0&&d(x,h?h.concat(w):[w])}),m.pop()}}if(!C.isObject(e))throw new TypeError("data must be an object");return d(e),t}function ko(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function oo(e,t){this._pairs=[],e&&tr(e,this,t)}const Ps=oo.prototype;Ps.append=function(t,n){this._pairs.push([t,n])};Ps.toString=function(t){const n=t?function(r){return t.call(this,r,ko)}:ko;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ql(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Os(e,t,n){if(!t)return e;const r=n&&n.encode||ql;C.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=C.isURLSearchParams(t)?t.toString():new oo(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class jo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){C.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ks={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yl=typeof URLSearchParams!="undefined"?URLSearchParams:oo,Gl=typeof FormData!="undefined"?FormData:null,Kl=typeof Blob!="undefined"?Blob:null,Xl={isBrowser:!0,classes:{URLSearchParams:Yl,FormData:Gl,Blob:Kl},protocols:["http","https","file","blob","url","data"]},so=typeof window!="undefined"&&typeof document!="undefined",Lr=typeof navigator=="object"&&navigator||void 0,Jl=so&&(!Lr||["ReactNative","NativeScript","NS"].indexOf(Lr.product)<0),Zl=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ql=so&&window.location.href||"http://localhost",ec=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:so,hasStandardBrowserEnv:Jl,hasStandardBrowserWebWorkerEnv:Zl,navigator:Lr,origin:Ql},Symbol.toStringTag,{value:"Module"})),Pe=S(S({},ec),Xl);function tc(e,t){return tr(e,new Pe.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return Pe.isNode&&C.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function nc(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rc(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function js(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=s>=n.length;return a=!a&&C.isArray(o)?o.length:a,l?(C.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!C.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&C.isArray(o[a])&&(o[a]=rc(o[a])),!i)}if(C.isFormData(e)&&C.isFunction(e.entries)){const n={};return C.forEachEntry(e,(r,o)=>{t(nc(r),o,n,0)}),n}return null}function oc(e,t,n){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const yn={transitional:ks,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=C.isObject(t);if(s&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return o?JSON.stringify(js(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t)||C.isReadableStream(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return tc(t,this.formSerializer).toString();if((i=C.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return tr(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),oc(t)):t}],transformResponse:[function(t){const n=this.transitional||yn.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(C.isResponse(t)||C.isReadableStream(t))return t;if(t&&C.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?X.from(i,X.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pe.classes.FormData,Blob:Pe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],e=>{yn.headers[e]={}});const sc=C.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"]),ac=e=>{const t={};let n,r,o;return e&&e.split(`
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&sc[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},_o=Symbol("internals");function an(e){return e&&String(e).trim().toLowerCase()}function In(e){return e===!1||e==null?e:C.isArray(e)?e.map(In):String(e)}function ic(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const lc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Er(e,t,n,r,o){if(C.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!C.isString(t)){if(C.isString(r))return t.indexOf(r)!==-1;if(C.isRegExp(r))return r.test(t)}}function cc(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function uc(e,t){const n=C.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}let Fe=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,l,c){const u=an(l);if(!u)throw new Error("header name must be a non-empty string");const m=C.findKey(o,u);(!m||o[m]===void 0||c===!0||c===void 0&&o[m]!==!1)&&(o[m||l]=In(i))}const a=(i,l)=>C.forEach(i,(c,u)=>s(c,u,l));if(C.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(C.isString(t)&&(t=t.trim())&&!lc(t))a(ac(t),n);else if(C.isObject(t)&&C.isIterable(t)){let i={},l,c;for(const u of t){if(!C.isArray(u))throw TypeError("Object iterator must return a key-value pair");i[c=u[0]]=(l=i[c])?C.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}a(i,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=an(t),t){const r=C.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return ic(o);if(C.isFunction(n))return n.call(this,o,r);if(C.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=an(t),t){const r=C.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Er(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=an(a),a){const i=C.findKey(r,a);i&&(!n||Er(r,r[i],i,n))&&(delete r[i],o=!0)}}return C.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Er(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return C.forEach(this,(o,s)=>{const a=C.findKey(r,s);if(a){n[a]=In(o),delete n[s];return}const i=t?cc(s):String(s).trim();i!==s&&delete n[s],n[i]=In(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return C.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&C.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[_o]=this[_o]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=an(a);r[i]||(uc(o,a),r[i]=!0)}return C.isArray(t)?t.forEach(s):s(t),this}};Fe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(Fe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});C.freezeMethods(Fe);function Sr(e,t){const n=this||yn,r=t||n,o=Fe.from(r.headers);let s=r.data;return C.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function _s(e){return!!(e&&e.__CANCEL__)}function Jt(e,t,n){X.call(this,e==null?"canceled":e,X.ERR_CANCELED,t,n),this.name="CanceledError"}C.inherits(Jt,X,{__CANCEL__:!0});function Ds(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dc(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];a||(a=c),n[o]=l,r[o]=c;let m=s,b=0;for(;m!==o;)b+=n[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const d=u&&c-u;return d?Math.round(b*1e3/d):void 0}}function pc(e,t){let n=0,r=1e3/t,o,s;const a=(c,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),m=u-n;m>=r?a(c,u):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},r-m)))},()=>o&&a(o)]}const Un=(e,t,n=3)=>{let r=0;const o=fc(50,250);return pc(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-r,c=o(l),u=a<=i;r=a;const m={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i&&u?(i-a)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(m)},n)},Do=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Io=e=>(...t)=>C.asap(()=>e(...t)),mc=Pe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Pe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Pe.origin),Pe.navigator&&/(msie|trident)/i.test(Pe.navigator.userAgent)):()=>!0,hc=Pe.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];C.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),C.isString(r)&&a.push("path="+r),C.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function gc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Is(e,t,n){let r=!gc(t);return e&&(r||n==!1)?vc(e,t):t}const Mo=e=>e instanceof Fe?S({},e):e;function _t(e,t){t=t||{};const n={};function r(c,u,m,b){return C.isPlainObject(c)&&C.isPlainObject(u)?C.merge.call({caseless:b},c,u):C.isPlainObject(u)?C.merge({},u):C.isArray(u)?u.slice():u}function o(c,u,m,b){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c,m,b)}else return r(c,u,m,b)}function s(c,u){if(!C.isUndefined(u))return r(void 0,u)}function a(c,u){if(C.isUndefined(u)){if(!C.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function i(c,u,m){if(m in t)return r(c,u);if(m in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(c,u,m)=>o(Mo(c),Mo(u),m,!0)};return C.forEach(Object.keys(Object.assign({},e,t)),function(u){const m=l[u]||o,b=m(e[u],t[u],u);C.isUndefined(b)&&m!==i||(n[u]=b)}),n}const Ms=e=>{const t=_t({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Fe.from(a),t.url=Os(Is(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let l;if(C.isFormData(n)){if(Pe.hasStandardBrowserEnv||Pe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(m=>m.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Pe.hasStandardBrowserEnv&&(r&&C.isFunction(r)&&(r=r(t)),r||r!==!1&&mc(t.url))){const c=o&&s&&hc.read(s);c&&a.set(o,c)}return t},bc=typeof XMLHttpRequest!="undefined",yc=bc&&function(e){return new Promise(function(n,r){const o=Ms(e);let s=o.data;const a=Fe.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,u,m,b,d,y;function h(){d&&d(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function x(){if(!p)return;const E=Fe.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),T={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:E,config:e,request:p};Ds(function(D){n(D),h()},function(D){r(D),h()},T),p=null}"onloadend"in p?p.onloadend=x:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(x)},p.onabort=function(){p&&(r(new X("Request aborted",X.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new X("Network Error",X.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||ks;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),r(new X(R,T.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&C.forEach(a.toJSON(),function(R,T){p.setRequestHeader(T,R)}),C.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),c&&([b,y]=Un(c,!0),p.addEventListener("progress",b)),l&&p.upload&&([m,d]=Un(l),p.upload.addEventListener("progress",m),p.upload.addEventListener("loadend",d)),(o.cancelToken||o.signal)&&(u=E=>{p&&(r(!E||E.type?new Jt(null,e,p):E),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const w=dc(o.url);if(w&&Pe.protocols.indexOf(w)===-1){r(new X("Unsupported protocol "+w+":",X.ERR_BAD_REQUEST,e));return}p.send(s||null)})},wc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(c){if(!o){o=!0,i();const u=c instanceof Error?c:this.reason;r.abort(u instanceof X?u:new Jt(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>C.asap(i),l}},xc=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Ec=function(e,t){return wr(this,null,function*(){try{for(var n=No(Sc(e)),r,o,s;r=!(o=yield new Pt(n.next())).done;r=!1){const a=o.value;yield*xr(xc(a,t))}}catch(o){s=[o]}finally{try{r&&(o=n.return)&&(yield new Pt(o.call(n)))}finally{if(s)throw s[0]}}})},Sc=function(e){return wr(this,null,function*(){if(e[Symbol.asyncIterator]){yield*xr(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Pt(t.read());if(n)break;yield r}}finally{yield new Pt(t.cancel())}})},Lo=(e,t,n,r)=>{const o=Ec(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({pull(c){return he(this,null,function*(){try{const{done:u,value:m}=yield o.next();if(u){i(),c.close();return}let b=m.byteLength;if(n){let d=s+=b;n(d)}c.enqueue(new Uint8Array(m))}catch(u){throw i(u),u}})},cancel(c){return i(c),o.return()}},{highWaterMark:2})},nr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ls=nr&&typeof ReadableStream=="function",Cc=nr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):e=>he(exports,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())})),Fs=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},Rc=Ls&&Fs(()=>{let e=!1;const t=new Request(Pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Fo=64*1024,Fr=Ls&&Fs(()=>C.isReadableStream(new Response("").body)),Wn={stream:Fr&&(e=>e.body)};nr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Wn[t]&&(Wn[t]=C.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new X(`Response type '${t}' is not supported`,X.ERR_NOT_SUPPORT,r)})})})(new Response);const Tc=e=>he(exports,null,function*(){if(e==null)return 0;if(C.isBlob(e))return e.size;if(C.isSpecCompliantForm(e))return(yield new Request(Pe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(C.isArrayBufferView(e)||C.isArrayBuffer(e))return e.byteLength;if(C.isURLSearchParams(e)&&(e=e+""),C.isString(e))return(yield Cc(e)).byteLength}),Ac=(e,t)=>he(exports,null,function*(){const n=C.toFiniteNumber(e.getContentLength());return n==null?Tc(t):n}),Nc=nr&&(e=>he(exports,null,function*(){let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:u,withCredentials:m="same-origin",fetchOptions:b}=Ms(e);c=c?(c+"").toLowerCase():"text";let d=wc([o,s&&s.toAbortSignal()],a),y;const h=d&&d.unsubscribe&&(()=>{d.unsubscribe()});let p;try{if(l&&Rc&&n!=="get"&&n!=="head"&&(p=yield Ac(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(C.isFormData(r)&&(O=T.headers.get("content-type"))&&u.setContentType(O),T.body){const[D,L]=Do(p,Un(Io(l)));r=Lo(T.body,Fo,D,L)}}C.isString(m)||(m=m?"include":"omit");const x="credentials"in Request.prototype;y=new Request(t,N(S({},b),{signal:d,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:x?m:void 0}));let w=yield fetch(y);const E=Fr&&(c==="stream"||c==="response");if(Fr&&(i||E&&h)){const T={};["status","statusText","headers"].forEach(M=>{T[M]=w[M]});const O=C.toFiniteNumber(w.headers.get("content-length")),[D,L]=i&&Do(O,Un(Io(i),!0))||[];w=new Response(Lo(w.body,Fo,D,()=>{L&&L(),h&&h()}),T)}c=c||"text";let R=yield Wn[C.findKey(Wn,c)||"text"](w,e);return!E&&h&&h(),yield new Promise((T,O)=>{Ds(T,O,{data:R,headers:Fe.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:y})})}catch(x){throw h&&h(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new X("Network Error",X.ERR_NETWORK,e,y),{cause:x.cause||x}):X.from(x,x&&x.code,e,y)}})),Br={http:zl,xhr:yc,fetch:Nc};C.forEach(Br,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const Bo=e=>`- ${e}`,Pc=e=>C.isFunction(e)||e===null||e===!1,Bs={getAdapter:e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!Pc(n)&&(r=Br[(a=String(n)).toLowerCase()],r===void 0))throw new X(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,l])=>`adapter ${i} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
`+s.map(Bo).join(`
`):" "+Bo(s[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Br};function Cr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Jt(null,e)}function $o(e){return Cr(e),e.headers=Fe.from(e.headers),e.data=Sr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bs.getAdapter(e.adapter||yn.adapter)(e).then(function(r){return Cr(e),r.data=Sr.call(e,e.transformResponse,r),r.headers=Fe.from(r.headers),r},function(r){return _s(r)||(Cr(e),r&&r.response&&(r.response.data=Sr.call(e,e.transformResponse,r.response),r.response.headers=Fe.from(r.response.headers))),Promise.reject(r)})}const $s="1.9.0",rr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Uo={};rr.transitional=function(t,n,r){function o(s,a){return"[Axios v"+$s+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new X(o(a," has been removed"+(n?" in "+n:"")),X.ERR_DEPRECATED);return n&&!Uo[a]&&(Uo[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};rr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Oc(e,t,n){if(typeof e!="object")throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new X("option "+s+" must be "+l,X.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}}const Mn={assertOptions:Oc,validators:rr},nt=Mn.validators;let jt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new jo,response:new jo}}request(t,n){return he(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}catch(a){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_t(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Mn.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),o!=null&&(C.isFunction(o)?n.paramsSerializer={serialize:o}:Mn.assertOptions(o,{encode:nt.function,serialize:nt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Mn.assertOptions(n,{baseUrl:nt.spelling("baseURL"),withXsrfToken:nt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&C.merge(s.common,s[n.method]);s&&C.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=Fe.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let u,m=0,b;if(!l){const y=[$o.bind(this),void 0];for(y.unshift.apply(y,i),y.push.apply(y,c),b=y.length,u=Promise.resolve(n);m<b;)u=u.then(y[m++],y[m++]);return u}b=i.length;let d=n;for(m=0;m<b;){const y=i[m++],h=i[m++];try{d=y(d)}catch(p){h.call(this,p);break}}try{u=$o.call(this,d)}catch(y){return Promise.reject(y)}for(m=0,b=c.length;m<b;)u=u.then(c[m++],c[m++]);return u}getUri(t){t=_t(this.defaults,t);const n=Is(t.baseURL,t.url,t.allowAbsoluteUrls);return Os(n,t.params,t.paramsSerializer)}};C.forEach(["delete","get","head","options"],function(t){jt.prototype[t]=function(n,r){return this.request(_t(r||{},{method:t,url:n,data:(r||{}).data}))}});C.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(_t(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}jt.prototype[t]=n(),jt.prototype[t+"Form"]=n(!0)});let kc=class Us{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new Jt(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Us(function(o){t=o}),cancel:t}}};function jc(e){return function(n){return e.apply(null,n)}}function _c(e){return C.isObject(e)&&e.isAxiosError===!0}const $r={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($r).forEach(([e,t])=>{$r[t]=e});function Ws(e){const t=new jt(e),n=bs(jt.prototype.request,t);return C.extend(n,jt.prototype,t,{allOwnKeys:!0}),C.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ws(_t(e,o))},n}const ye=Ws(yn);ye.Axios=jt;ye.CanceledError=Jt;ye.CancelToken=kc;ye.isCancel=_s;ye.VERSION=$s;ye.toFormData=tr;ye.AxiosError=X;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=jc;ye.isAxiosError=_c;ye.mergeConfig=_t;ye.AxiosHeaders=Fe;ye.formToJSON=e=>js(C.isHTMLForm(e)?new FormData(e):e);ye.getAdapter=Bs.getAdapter;ye.HttpStatusCode=$r;ye.default=ye;const{Axios:qm,AxiosError:Ym,CanceledError:Gm,isCancel:Km,CancelToken:Xm,VERSION:Jm,all:Zm,Cancel:Qm,isAxiosError:eh,spread:th,toFormData:nh,AxiosHeaders:rh,HttpStatusCode:oh,formToJSON:sh,getAdapter:ah,mergeConfig:ih}=ye;function zs(){if(typeof window!="undefined"){const e=window.location.hostname;if(e.includes(".integrations."))return"https://api.platform.integrations.habit.io";if(e.includes(".staging."))return"https://api.platform.staging.habit.io";if(e.includes(".qa."))return"https://api.platform.qa.habit.io"}return"https://api.platform.habit.io"}function fn(e){return`${zs()}${e}`}const wn={list:(e="me")=>fn(`/v3/users/${e}/export-entries?page_size=9999`),create:e=>fn(`/v3/applications/${e}/export-data`),download:e=>fn(`/v3/exports/${e}/download`),delete:e=>fn(`/v3/exports/${e}`)};function Vs(e,t){return he(this,null,function*(){const n=t||wn.list();return(yield ye.get(n,{headers:{Authorization:e?`Bearer ${e}`:""}})).data.elements||[]})}function Hs(e,t,n="app_id",r){return he(this,null,function*(){var a;if(!t.namespace)throw new Error("Namespace is required for export creation");if(!((a=t.output)!=null&&a.format))throw new Error("Output format is required for export creation");const o=r||wn.create(n);return(yield ye.post(o,t,{headers:{"Content-Type":"application/json",Authorization:e?`Bearer ${e}`:""}})).data})}function qs(e,t,n){return he(this,null,function*(){const r=n||wn.download(t);return(yield ye.get(r,{headers:{Authorization:e?`Bearer ${e}`:""},responseType:"blob"})).data})}function Dc(e,t,n){return he(this,null,function*(){const r=n||wn.delete(t);yield ye.delete(r,{headers:{Authorization:e?`Bearer ${e}`:""}})})}var Ic=e=>{switch(e){case"success":return Fc;case"info":return $c;case"warning":return Bc;case"error":return Uc;default:return null}},Mc=Array(12).fill(0),Lc=({visible:e,className:t})=>A.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},A.createElement("div",{className:"sonner-spinner"},Mc.map((n,r)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Fc=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Bc=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),$c=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Uc=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Wc=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),zc=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ur=1,Vc=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let i=e,{message:n}=i,r=k(i,["message"]),o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ur++,s=this.toasts.find(l=>l.id===o),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(l=>l.id===o?(this.publish(N(S(S({},l),e),{id:o,title:n})),N(S(S({},l),e),{id:o,dismissible:a,title:n})):l):this.addToast(N(S({title:n},r),{dismissible:a,id:o})),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create(N(S({},t),{message:e})),this.error=(e,t)=>this.create(N(S({},t),{message:e,type:"error"})),this.success=(e,t)=>this.create(N(S({},t),{type:"success",message:e})),this.info=(e,t)=>this.create(N(S({},t),{type:"info",message:e})),this.warning=(e,t)=>this.create(N(S({},t),{type:"warning",message:e})),this.loading=(e,t)=>this.create(N(S({},t),{type:"loading",message:e})),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create(N(S({},t),{promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0})));let r=e instanceof Promise?e:e(),o=n!==void 0,s,a=r.then(l=>he(this,null,function*(){if(s=["resolve",l],A.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(qc(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?yield t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?yield t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:u})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?yield t.success(l):t.success,u=typeof t.description=="function"?yield t.description(l):t.description;this.create({id:n,type:"success",message:c,description:u})}})).catch(l=>he(this,null,function*(){if(s=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?yield t.error(l):t.error,u=typeof t.description=="function"?yield t.description(l):t.description;this.create({id:n,type:"error",message:c,description:u})}})).finally(()=>{var l;o&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),i=()=>new Promise((l,c)=>a.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ur++;return this.create(S({jsx:e(n),id:n},t)),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Me=new Vc,Hc=(e,t)=>{let n=(t==null?void 0:t.id)||Ur++;return Me.addToast(N(S({title:e},t),{id:n})),n},qc=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Yc=Hc,Gc=()=>Me.toasts,Kc=()=>Me.getActiveToasts(),zn=Object.assign(Yc,{success:Me.success,info:Me.info,warning:Me.warning,error:Me.error,custom:Me.custom,message:Me.message,promise:Me.promise,dismiss:Me.dismiss,loading:Me.loading},{getHistory:Gc,getToasts:Kc});function Xc(e,{insertAt:t}={}){if(typeof document=="undefined")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Xc(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-bu