UNPKG

habit-export-center

Version:
6 lines 192 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),fr=require("react-dom"),g=require("react/jsx-runtime");function Ao(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 u=Ao(S),fn=Ao(fr);function To(e,t){return function(){return e.apply(t,arguments)}}const{toString:hi}=Object.prototype,{getPrototypeOf:pr}=Object,{iterator:pn,toStringTag:Po}=Symbol,mn=(e=>t=>{const n=hi.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ae=e=>(e=e.toLowerCase(),t=>mn(t)===e),hn=e=>t=>typeof t===e,{isArray:vt}=Array,Dt=hn("undefined");function gi(e){return e!==null&&!Dt(e)&&e.constructor!==null&&!Dt(e.constructor)&&he(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Oo=Ae("ArrayBuffer");function bi(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Oo(e.buffer),t}const wi=hn("string"),he=hn("function"),ko=hn("number"),gn=e=>e!==null&&typeof e=="object",vi=e=>e===!0||e===!1,Kt=e=>{if(mn(e)!=="object")return!1;const t=pr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Po in e)&&!(pn in e)},yi=Ae("Date"),xi=Ae("File"),Ei=Ae("Blob"),Si=Ae("FileList"),Ci=e=>gn(e)&&he(e.pipe),Ri=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||he(e.append)&&((t=mn(e))==="formdata"||t==="object"&&he(e.toString)&&e.toString()==="[object FormData]"))},Ni=Ae("URLSearchParams"),[Ai,Ti,Pi,Oi]=["ReadableStream","Request","Response","Headers"].map(Ae),ki=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _t(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),vt(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 jo(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 Qe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Do=e=>!Dt(e)&&e!==Qe;function qn(){const{caseless:e}=Do(this)&&this||{},t={},n=(r,o)=>{const s=e&&jo(t,o)||o;Kt(t[s])&&Kt(r)?t[s]=qn(t[s],r):Kt(r)?t[s]=qn({},r):vt(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&_t(arguments[r],n);return t}const ji=(e,t,n,{allOwnKeys:r}={})=>(_t(t,(o,s)=>{n&&he(o)?e[s]=To(o,n):e[s]=o},{allOwnKeys:r}),e),Di=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ii=(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)},Mi=(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&&pr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Li=(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},_i=e=>{if(!e)return null;if(vt(e))return e;let t=e.length;if(!ko(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bi=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pr(Uint8Array)),Fi=(e,t)=>{const r=(e&&e[pn]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},$i=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ui=Ae("HTMLFormElement"),zi=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),$r=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wi=Ae("RegExp"),Io=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_t(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Hi=e=>{Io(e,(t,n)=>{if(he(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(he(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+"'")})}})},Vi=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return vt(e)?r(e):r(String(e).split(t)),n},qi=()=>{},Yi=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Gi(e){return!!(e&&he(e.append)&&e[Po]==="FormData"&&e[pn])}const Ki=e=>{const t=new Array(10),n=(r,o)=>{if(gn(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=vt(r)?[]:{};return _t(r,(a,i)=>{const l=n(a,o+1);!Dt(l)&&(s[i]=l)}),t[o]=void 0,s}}return r};return n(e,0)},Xi=Ae("AsyncFunction"),Ji=e=>e&&(gn(e)||he(e))&&he(e.then)&&he(e.catch),Mo=((e,t)=>e?setImmediate:t?((n,r)=>(Qe.addEventListener("message",({source:o,data:s})=>{o===Qe&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Qe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",he(Qe.postMessage)),Zi=typeof queueMicrotask<"u"?queueMicrotask.bind(Qe):typeof process<"u"&&process.nextTick||Mo,Qi=e=>e!=null&&he(e[pn]),x={isArray:vt,isArrayBuffer:Oo,isBuffer:gi,isFormData:Ri,isArrayBufferView:bi,isString:wi,isNumber:ko,isBoolean:vi,isObject:gn,isPlainObject:Kt,isReadableStream:Ai,isRequest:Ti,isResponse:Pi,isHeaders:Oi,isUndefined:Dt,isDate:yi,isFile:xi,isBlob:Ei,isRegExp:Wi,isFunction:he,isStream:Ci,isURLSearchParams:Ni,isTypedArray:Bi,isFileList:Si,forEach:_t,merge:qn,extend:ji,trim:ki,stripBOM:Di,inherits:Ii,toFlatObject:Mi,kindOf:mn,kindOfTest:Ae,endsWith:Li,toArray:_i,forEachEntry:Fi,matchAll:$i,isHTMLForm:Ui,hasOwnProperty:$r,hasOwnProp:$r,reduceDescriptors:Io,freezeMethods:Hi,toObjectSet:Vi,toCamelCase:zi,noop:qi,toFiniteNumber:Yi,findKey:jo,global:Qe,isContextDefined:Do,isSpecCompliantForm:Gi,toJSONObject:Ki,isAsyncFn:Xi,isThenable:Ji,setImmediate:Mo,asap:Zi,isIterable:Qi};function F(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)}x.inherits(F,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:x.toJSONObject(this.config),code:this.code,status:this.status}}});const Lo=F.prototype,_o={};["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=>{_o[e]={value:e}});Object.defineProperties(F,_o);Object.defineProperty(Lo,"isAxiosError",{value:!0});F.from=(e,t,n,r,o,s)=>{const a=Object.create(Lo);return x.toFlatObject(e,a,function(l){return l!==Error.prototype},i=>i!=="isAxiosError"),F.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const el=null;function Yn(e){return x.isPlainObject(e)||x.isArray(e)}function Bo(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function Ur(e,t,n){return e?e.concat(t).map(function(o,s){return o=Bo(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function tl(e){return x.isArray(e)&&!e.some(Yn)}const nl=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function bn(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!x.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(o))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(x.isDate(b))return b.toISOString();if(!l&&x.isBlob(b))throw new F("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(b)||x.isTypedArray(b)?l&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function d(b,p,h){let v=b;if(b&&!h&&typeof b=="object"){if(x.endsWith(p,"{}"))p=r?p:p.slice(0,-2),b=JSON.stringify(b);else if(x.isArray(b)&&tl(b)||(x.isFileList(b)||x.endsWith(p,"[]"))&&(v=x.toArray(b)))return p=Bo(p),v.forEach(function(E,C){!(x.isUndefined(E)||E===null)&&t.append(a===!0?Ur([p],C,s):a===null?p:p+"[]",c(E))}),!1}return Yn(b)?!0:(t.append(Ur(h,p,s),c(b)),!1)}const m=[],w=Object.assign(nl,{defaultVisitor:d,convertValue:c,isVisitable:Yn});function f(b,p){if(!x.isUndefined(b)){if(m.indexOf(b)!==-1)throw Error("Circular reference detected in "+p.join("."));m.push(b),x.forEach(b,function(v,y){(!(x.isUndefined(v)||v===null)&&o.call(t,v,x.isString(y)?y.trim():y,p,w))===!0&&f(v,p?p.concat(y):[y])}),m.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return f(e),t}function zr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function mr(e,t){this._pairs=[],e&&bn(e,this,t)}const Fo=mr.prototype;Fo.append=function(t,n){this._pairs.push([t,n])};Fo.toString=function(t){const n=t?function(r){return t.call(this,r,zr)}:zr;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function rl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $o(e,t,n){if(!t)return e;const r=n&&n.encode||rl;x.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=x.isURLSearchParams(t)?t.toString():new mr(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Wr{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){x.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Uo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ol=typeof URLSearchParams<"u"?URLSearchParams:mr,sl=typeof FormData<"u"?FormData:null,al=typeof Blob<"u"?Blob:null,il={isBrowser:!0,classes:{URLSearchParams:ol,FormData:sl,Blob:al},protocols:["http","https","file","blob","url","data"]},hr=typeof window<"u"&&typeof document<"u",Gn=typeof navigator=="object"&&navigator||void 0,ll=hr&&(!Gn||["ReactNative","NativeScript","NS"].indexOf(Gn.product)<0),cl=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dl=hr&&window.location.href||"http://localhost",ul=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hr,hasStandardBrowserEnv:ll,hasStandardBrowserWebWorkerEnv:cl,navigator:Gn,origin:dl},Symbol.toStringTag,{value:"Module"})),de={...ul,...il};function fl(e,t){return bn(e,new de.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return de.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function pl(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ml(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 zo(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&&x.isArray(o)?o.length:a,l?(x.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!x.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&x.isArray(o[a])&&(o[a]=ml(o[a])),!i)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,o)=>{t(pl(r),o,n,0)}),n}return null}function hl(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Bt={transitional:Uo,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=x.isObject(t);if(s&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return o?JSON.stringify(zo(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.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 fl(t,this.formSerializer).toString();if((i=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return bn(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),hl(t)):t}],transformResponse:[function(t){const n=this.transitional||Bt.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.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"?F.from(i,F.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:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Bt.headers[e]={}});const gl=x.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"]),bl=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]&&gl[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Hr=Symbol("internals");function Tt(e){return e&&String(e).trim().toLowerCase()}function Xt(e){return e===!1||e==null?e:x.isArray(e)?e.map(Xt):String(e)}function wl(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 vl=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Dn(e,t,n,r,o){if(x.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function yl(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function xl(e,t){const n=x.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 ge=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,l,c){const d=Tt(l);if(!d)throw new Error("header name must be a non-empty string");const m=x.findKey(o,d);(!m||o[m]===void 0||c===!0||c===void 0&&o[m]!==!1)&&(o[m||l]=Xt(i))}const a=(i,l)=>x.forEach(i,(c,d)=>s(c,d,l));if(x.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(x.isString(t)&&(t=t.trim())&&!vl(t))a(bl(t),n);else if(x.isObject(t)&&x.isIterable(t)){let i={},l,c;for(const d of t){if(!x.isArray(d))throw TypeError("Object iterator must return a key-value pair");i[c=d[0]]=(l=i[c])?x.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}a(i,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=Tt(t),t){const r=x.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return wl(o);if(x.isFunction(n))return n.call(this,o,r);if(x.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Tt(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Dn(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Tt(a),a){const i=x.findKey(r,a);i&&(!n||Dn(r,r[i],i,n))&&(delete r[i],o=!0)}}return x.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||Dn(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return x.forEach(this,(o,s)=>{const a=x.findKey(r,s);if(a){n[a]=Xt(o),delete n[s];return}const i=t?yl(s):String(s).trim();i!==s&&delete n[s],n[i]=Xt(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return x.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&x.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[Hr]=this[Hr]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Tt(a);r[i]||(xl(o,a),r[i]=!0)}return x.isArray(t)?t.forEach(s):s(t),this}};ge.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ge.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(ge);function In(e,t){const n=this||Bt,r=t||n,o=ge.from(r.headers);let s=r.data;return x.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Wo(e){return!!(e&&e.__CANCEL__)}function yt(e,t,n){F.call(this,e??"canceled",F.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(yt,F,{__CANCEL__:!0});function Ho(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new F("Request failed with status code "+n.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function El(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Sl(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(),d=r[s];a||(a=c),n[o]=l,r[o]=c;let m=s,w=0;for(;m!==o;)w+=n[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-a<t)return;const f=d&&c-d;return f?Math.round(w*1e3/f):void 0}}function Cl(e,t){let n=0,r=1e3/t,o,s;const a=(c,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),m=d-n;m>=r?a(c,d):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},r-m)))},()=>o&&a(o)]}const nn=(e,t,n=3)=>{let r=0;const o=Sl(50,250);return Cl(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-r,c=o(l),d=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&&d?(i-a)/c:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(m)},n)},Vr=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qr=e=>(...t)=>x.asap(()=>e(...t)),Rl=de.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,de.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(de.origin),de.navigator&&/(msie|trident)/i.test(de.navigator.userAgent)):()=>!0,Nl=de.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),x.isString(r)&&a.push("path="+r),x.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 Al(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Tl(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vo(e,t,n){let r=!Al(t);return e&&(r||n==!1)?Tl(e,t):t}const Yr=e=>e instanceof ge?{...e}:e;function tt(e,t){t=t||{};const n={};function r(c,d,m,w){return x.isPlainObject(c)&&x.isPlainObject(d)?x.merge.call({caseless:w},c,d):x.isPlainObject(d)?x.merge({},d):x.isArray(d)?d.slice():d}function o(c,d,m,w){if(x.isUndefined(d)){if(!x.isUndefined(c))return r(void 0,c,m,w)}else return r(c,d,m,w)}function s(c,d){if(!x.isUndefined(d))return r(void 0,d)}function a(c,d){if(x.isUndefined(d)){if(!x.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function i(c,d,m){if(m in t)return r(c,d);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,d,m)=>o(Yr(c),Yr(d),m,!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(d){const m=l[d]||o,w=m(e[d],t[d],d);x.isUndefined(w)&&m!==i||(n[d]=w)}),n}const qo=e=>{const t=tt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=ge.from(a),t.url=$o(Vo(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(x.isFormData(n)){if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...d]=l?l.split(";").map(m=>m.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(de.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&Rl(t.url))){const c=o&&s&&Nl.read(s);c&&a.set(o,c)}return t},Pl=typeof XMLHttpRequest<"u",Ol=Pl&&function(e){return new Promise(function(n,r){const o=qo(e);let s=o.data;const a=ge.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:c}=o,d,m,w,f,b;function p(){f&&f(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function v(){if(!h)return;const E=ge.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:e,request:h};Ho(function(N){n(N),p()},function(N){r(N),p()},R),h=null}"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},h.onabort=function(){h&&(r(new F("Request aborted",F.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new F("Network Error",F.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||Uo;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),r(new F(C,R.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&x.forEach(a.toJSON(),function(C,R){h.setRequestHeader(R,C)}),x.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),c&&([w,b]=nn(c,!0),h.addEventListener("progress",w)),l&&h.upload&&([m,f]=nn(l),h.upload.addEventListener("progress",m),h.upload.addEventListener("loadend",f)),(o.cancelToken||o.signal)&&(d=E=>{h&&(r(!E||E.type?new yt(null,e,h):E),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const y=El(o.url);if(y&&de.protocols.indexOf(y)===-1){r(new F("Unsupported protocol "+y+":",F.ERR_BAD_REQUEST,e));return}h.send(s||null)})},kl=(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 d=c instanceof Error?c:this.reason;r.abort(d instanceof F?d:new yt(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new F(`timeout ${t} of ms exceeded`,F.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=()=>x.asap(i),l}},jl=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},Dl=async function*(e,t){for await(const n of Il(e))yield*jl(n,t)},Il=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Gr=(e,t,n,r)=>{const o=Dl(e,t);let s=0,a,i=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await o.next();if(c){i(),l.close();return}let m=d.byteLength;if(n){let w=s+=m;n(w)}l.enqueue(new Uint8Array(d))}catch(c){throw i(c),c}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},wn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Yo=wn&&typeof ReadableStream=="function",Ml=wn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Go=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ll=Yo&&Go(()=>{let e=!1;const t=new Request(de.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Kr=64*1024,Kn=Yo&&Go(()=>x.isReadableStream(new Response("").body)),rn={stream:Kn&&(e=>e.body)};wn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!rn[t]&&(rn[t]=x.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new F(`Response type '${t}' is not supported`,F.ERR_NOT_SUPPORT,r)})})})(new Response);const _l=async e=>{if(e==null)return 0;if(x.isBlob(e))return e.size;if(x.isSpecCompliantForm(e))return(await new Request(de.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(x.isArrayBufferView(e)||x.isArrayBuffer(e))return e.byteLength;if(x.isURLSearchParams(e)&&(e=e+""),x.isString(e))return(await Ml(e)).byteLength},Bl=async(e,t)=>{const n=x.toFiniteNumber(e.getContentLength());return n??_l(t)},Fl=wn&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:l,responseType:c,headers:d,withCredentials:m="same-origin",fetchOptions:w}=qo(e);c=c?(c+"").toLowerCase():"text";let f=kl([o,s&&s.toAbortSignal()],a),b;const p=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let h;try{if(l&&Ll&&n!=="get"&&n!=="head"&&(h=await Bl(d,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),A;if(x.isFormData(r)&&(A=R.headers.get("content-type"))&&d.setContentType(A),R.body){const[N,k]=Vr(h,nn(qr(l)));r=Gr(R.body,Kr,N,k)}}x.isString(m)||(m=m?"include":"omit");const v="credentials"in Request.prototype;b=new Request(t,{...w,signal:f,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:v?m:void 0});let y=await fetch(b);const E=Kn&&(c==="stream"||c==="response");if(Kn&&(i||E&&p)){const R={};["status","statusText","headers"].forEach(B=>{R[B]=y[B]});const A=x.toFiniteNumber(y.headers.get("content-length")),[N,k]=i&&Vr(A,nn(qr(i),!0))||[];y=new Response(Gr(y.body,Kr,N,()=>{k&&k(),p&&p()}),R)}c=c||"text";let C=await rn[x.findKey(rn,c)||"text"](y,e);return!E&&p&&p(),await new Promise((R,A)=>{Ho(R,A,{data:C,headers:ge.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:b})})}catch(v){throw p&&p(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new F("Network Error",F.ERR_NETWORK,e,b),{cause:v.cause||v}):F.from(v,v&&v.code,e,b)}}),Xn={http:el,xhr:Ol,fetch:Fl};x.forEach(Xn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xr=e=>`- ${e}`,$l=e=>x.isFunction(e)||e===null||e===!1,Ko={getAdapter:e=>{e=x.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,!$l(n)&&(r=Xn[(a=String(n)).toLowerCase()],r===void 0))throw new F(`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(Xr).join(` `):" "+Xr(s[0]):"as no adapter specified";throw new F("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Xn};function Mn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yt(null,e)}function Jr(e){return Mn(e),e.headers=ge.from(e.headers),e.data=In.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ko.getAdapter(e.adapter||Bt.adapter)(e).then(function(r){return Mn(e),r.data=In.call(e,e.transformResponse,r),r.headers=ge.from(r.headers),r},function(r){return Wo(r)||(Mn(e),r&&r.response&&(r.response.data=In.call(e,e.transformResponse,r.response),r.response.headers=ge.from(r.response.headers))),Promise.reject(r)})}const Xo="1.9.0",vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zr={};vn.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Xo+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new F(o(a," has been removed"+(n?" in "+n:"")),F.ERR_DEPRECATED);return n&&!Zr[a]&&(Zr[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}};vn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ul(e,t,n){if(typeof e!="object")throw new F("options must be an object",F.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 F("option "+s+" must be "+l,F.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}}const Jt={assertOptions:Ul,validators:vn},Pe=Jt.validators;let et=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Wr,response:new Wr}}async request(t,n){try{return await 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{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=tt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Jt.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),o!=null&&(x.isFunction(o)?n.paramsSerializer={serialize:o}:Jt.assertOptions(o,{encode:Pe.function,serialize:Pe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Jt.assertOptions(n,{baseUrl:Pe.spelling("baseURL"),withXsrfToken:Pe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&x.merge(s.common,s[n.method]);s&&x.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=ge.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let d,m=0,w;if(!l){const b=[Jr.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,c),w=b.length,d=Promise.resolve(n);m<w;)d=d.then(b[m++],b[m++]);return d}w=i.length;let f=n;for(m=0;m<w;){const b=i[m++],p=i[m++];try{f=b(f)}catch(h){p.call(this,h);break}}try{d=Jr.call(this,f)}catch(b){return Promise.reject(b)}for(m=0,w=c.length;m<w;)d=d.then(c[m++],c[m++]);return d}getUri(t){t=tt(this.defaults,t);const n=Vo(t.baseURL,t.url,t.allowAbsoluteUrls);return $o(n,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){et.prototype[t]=function(n,r){return this.request(tt(r||{},{method:t,url:n,data:(r||{}).data}))}});x.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(tt(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}et.prototype[t]=n(),et.prototype[t+"Form"]=n(!0)});let zl=class Jo{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 yt(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 Jo(function(o){t=o}),cancel:t}}};function Wl(e){return function(n){return e.apply(null,n)}}function Hl(e){return x.isObject(e)&&e.isAxiosError===!0}const Jn={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(Jn).forEach(([e,t])=>{Jn[t]=e});function Zo(e){const t=new et(e),n=To(et.prototype.request,t);return x.extend(n,et.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Zo(tt(e,o))},n}const re=Zo(Bt);re.Axios=et;re.CanceledError=yt;re.CancelToken=zl;re.isCancel=Wo;re.VERSION=Xo;re.toFormData=bn;re.AxiosError=F;re.Cancel=re.CanceledError;re.all=function(t){return Promise.all(t)};re.spread=Wl;re.isAxiosError=Hl;re.mergeConfig=tt;re.AxiosHeaders=ge;re.formToJSON=e=>zo(x.isHTMLForm(e)?new FormData(e):e);re.getAdapter=Ko.getAdapter;re.HttpStatusCode=Jn;re.default=re;const{Axios:em,AxiosError:tm,CanceledError:nm,isCancel:rm,CancelToken:om,VERSION:sm,all:am,Cancel:im,isAxiosError:lm,spread:cm,toFormData:dm,AxiosHeaders:um,HttpStatusCode:fm,formToJSON:pm,getAdapter:mm,mergeConfig:hm}=re;function Qo(){if(typeof window<"u"){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 kt(e){return`${Qo()}${e}`}const Ft={list:(e="me")=>kt(`/v3/users/${e}/export-entries?page_size=9999`),create:e=>kt(`/v3/applications/${e}/export-data`),download:e=>kt(`/v3/exports/${e}/download`),delete:e=>kt(`/v3/exports/${e}`)};async function es(e,t){const n=t||Ft.list();return(await re.get(n,{headers:{Authorization:e?`Bearer ${e}`:""}})).data.elements||[]}async function ts(e,t,n="app_id",r){if(!t.namespace)throw new Error("Namespace is required for export creation");if(!t.output?.format)throw new Error("Output format is required for export creation");const o=r||Ft.create(n);return(await re.post(o,t,{headers:{"Content-Type":"application/json",Authorization:e?`Bearer ${e}`:""}})).data}async function ns(e,t,n){const r=n||Ft.download(t);return(await re.get(r,{headers:{Authorization:e?`Bearer ${e}`:""},responseType:"blob"})).data}async function Vl(e,t,n){const r=n||Ft.delete(t);await re.delete(r,{headers:{Authorization:e?`Bearer ${e}`:""}})}var ql=e=>{switch(e){case"success":return Kl;case"info":return Jl;case"warning":return Xl;case"error":return Zl;default:return null}},Yl=Array(12).fill(0),Gl=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},Yl.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Kl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),Xl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.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"})),Jl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),Zl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),Ql=S.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"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ec=()=>{let[e,t]=S.useState(document.hidden);return S.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Zn=1,tc=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{message:n,...r}=e,o=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Zn++,s=this.toasts.find(i=>i.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(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:a,title:n}):i):this.addToast({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({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...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(async l=>{if(s=["resolve",l],S.isValidElement(l))o=!1,this.create({id:n,type:"default",message:l});else if(rc(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:c,description:d})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:c,description:d})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:c,description:d})}}).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?.id||Zn++;return this.create({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 tc,nc=(e,t)=>{let n=t?.id||Zn++;return me.addToast({title:e,...t,id:n}),n},rc=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",oc=nc,sc=()=>me.toasts,ac=()=>me.getActiveToasts(),on=Object.assign(oc,{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:sc,getToasts:ac});function ic(e,{insertAt:t}={}){if(typeof document>"u")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))}ic(`: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-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:wher