Repository navigation
Expand file tree
/
Copy pathgreip.bundle.js
More file actions
2 lines (2 loc) · 49.5 KB
/
Copy pathgreip.bundle.js
File metadata and controls
2 lines (2 loc) · 49.5 KB
1
2
/*! For license information please see greip.bundle.js.LICENSE.txt */
var Greip;(()=>{"use strict";var e={746(e,t,n){var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getGFP=t.makePostRquest=t.makeHttpRquest=t.serialize=t.availableCountryParams=t.availableFormats=t.availableLanguages=t.availableGeoIPParams=t.baseURL=void 0;var r=n(425);t.baseURL="https://v2.greipapi.com",t.availableGeoIPParams=["location","security","timezone","currency","device"],t.availableLanguages=["EN","AR","DE","FR","ES","JA","ZH","RU"],t.availableFormats=["JSON","XML","CSV","Newline"],t.availableCountryParams=["language","flag","currency","timezone"],t.serialize=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")};var i=function(e){return!0===(null==e?void 0:e.success)&&void 0!==e.data?e.data:e};t.makeHttpRquest=function(e,n,s,a){n.source="JS-Package";var c=n.key;delete n.key;var u=o({},a||{});c&&(u.Authorization="Bearer ".concat(c));var l=Object.keys(u).length>0?{headers:u}:void 0,d=e.startsWith("/")?e:"/".concat(e),p=(0,t.serialize)(n);r.default.get("".concat(t.baseURL).concat(d).concat(p?"?".concat(p):""),l).then(function(e){if(200!==e.status)throw new Error("An unknown error occurred while sending the request to Greip API.");s(i(e.data))}).catch(function(){throw new Error("An unknown error occurred while sending the request to Greip API.")})},t.makePostRquest=function(e,n,o){n.source="JS-Package";var s=n.key;delete n.key;var a=s?{Authorization:"Bearer ".concat(s)}:void 0,c=e.startsWith("/")?e.slice(1):e;r.default.post("".concat(t.baseURL,"/").concat(c),n,a?{headers:a}:void 0).then(function(e){if(200!==e.status)throw new Error("An unknown error occurred while sending the request to Greip API.");o(i(e.data))}).catch(function(){throw new Error("An unknown error occurred while sending the request to Greip API.")})},t.getGFP=function(){try{var e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=navigator.language,n=navigator.languages,o=window.screen.width,r=window.screen.height,i=void 0!==navigator.plugins?Array.from(navigator.plugins).map(function(e){return e.name}):null;return JSON.stringify({timezone:e,primary_language:t,preferred_languages:n,screen_width:o,screen_height:r,plugins:i})}catch(e){return null}}},425(e,t,n){function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:s,toStringTag:a}=Symbol,c=(u=Object.create(null),e=>{const t=r.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const l=e=>(e=e.toLowerCase(),t=>c(t)===e),d=e=>t=>typeof t===e,{isArray:p}=Array,f=d("undefined");function h(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&g(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m=l("ArrayBuffer"),y=d("string"),g=d("function"),w=d("number"),b=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==c(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||a in e||s in e)},v=l("Date"),R=l("File"),O=l("Blob"),S=l("FileList"),k=l("URLSearchParams"),[A,T,P,N]=["ReadableStream","Request","Response","Headers"].map(l);function j(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),p(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{if(h(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let s;for(o=0;o<i;o++)s=r[o],t.call(null,e[s],s,e)}}function C(e,t){if(h(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o,r=n.length;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,U=e=>!f(e)&&e!==_,x=(L="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>L&&e instanceof L);var L;const F=l("HTMLFormElement"),B=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),D=l("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};j(n,(n,r)=>{let i;!1!==(i=t(n,r,e))&&(o[r]=i||n)}),Object.defineProperties(e,o)},q=l("AsyncFunction"),J=(Y="function"==typeof setImmediate,M=g(_.postMessage),Y?setImmediate:M?(z=`axios@${Math.random()}`,H=[],_.addEventListener("message",({source:e,data:t})=>{e===_&&t===z&&H.length&&H.shift()()},!1),e=>{H.push(e),_.postMessage(z,"*")}):e=>setTimeout(e));var Y,M,z,H;const V="undefined"!=typeof queueMicrotask?queueMicrotask.bind(_):"undefined"!=typeof process&&process.nextTick||J;var K={isArray:p,isArrayBuffer:m,isBuffer:h,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||g(e.append)&&("formdata"===(t=c(e))||"object"===t&&g(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&m(e.buffer),t},isString:y,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject:b,isPlainObject:E,isEmptyObject:e=>{if(!b(e)||h(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:A,isRequest:T,isResponse:P,isHeaders:N,isUndefined:f,isDate:v,isFile:R,isBlob:O,isRegExp:D,isFunction:g,isStream:e=>b(e)&&g(e.pipe),isURLSearchParams:k,isTypedArray:x,isFileList:S,forEach:j,merge:function e(){const{caseless:t,skipUndefined:n}=U(this)&&this||{},o={},r=(r,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const s=t&&C(o,i)||i;E(o[s])&&E(r)?o[s]=e(o[s],r):E(r)?o[s]=e({},r):p(r)?o[s]=r.slice():n&&f(r)||(o[s]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&j(arguments[e],r);return o},extend:(e,t,n,{allOwnKeys:r}={})=>(j(t,(t,r)=>{n&&g(t)?Object.defineProperty(e,r,{value:o(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let r,s,a;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:l,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!w(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[s]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:F,hasOwnProperty:B,hasOwnProp:B,reduceDescriptors:I,freezeMethods:e=>{I(e,(t,n)=>{if(g(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];g(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach(e=>{n[e]=!0})};return p(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:C,global:_,isContextDefined:U,isSpecCompliantForm:function(e){return!!(e&&g(e.append)&&"FormData"===e[a]&&e[s])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(b(e)){if(t.indexOf(e)>=0)return;if(h(e))return e;if(!("toJSON"in e)){t[o]=e;const r=p(e)?[]:{};return j(e,(e,t)=>{const i=n(e,o+1);!f(i)&&(r[t]=i)}),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:q,isThenable:e=>e&&(b(e)||g(e))&&g(e.then)&&g(e.catch),setImmediate:J,asap:V,isIterable:e=>null!=e&&g(e[s])};class W extends Error{static from(e,t,n,o,r,i){const s=new W(e.message,t||e.code,n,o,r);return s.cause=e,s.name=e.name,i&&Object.assign(s,i),s}constructor(e,t,n,o,r){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status)}toJSON(){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:K.toJSONObject(this.config),code:this.code,status:this.status}}}W.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",W.ERR_BAD_OPTION="ERR_BAD_OPTION",W.ECONNABORTED="ECONNABORTED",W.ETIMEDOUT="ETIMEDOUT",W.ERR_NETWORK="ERR_NETWORK",W.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",W.ERR_DEPRECATED="ERR_DEPRECATED",W.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",W.ERR_BAD_REQUEST="ERR_BAD_REQUEST",W.ERR_CANCELED="ERR_CANCELED",W.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",W.ERR_INVALID_URL="ERR_INVALID_URL";var G=W;function $(e){return K.isPlainObject(e)||K.isArray(e)}function X(e){return K.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(e,t){return e=X(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Q=K.toFlatObject(K,{},null,function(e){return/^is[A-Z]/.test(e)});function ee(e,t,n){if(!K.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=K.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!K.isUndefined(t[e])})).metaTokens,r=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&K.isSpecCompliantForm(t);if(!K.isFunction(r))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(K.isDate(e))return e.toISOString();if(K.isBoolean(e))return e.toString();if(!a&&K.isBlob(e))throw new G("Blob is not supported. Use a Buffer instead.");return K.isArrayBuffer(e)||K.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,r){let a=e;if(e&&!r&&"object"==typeof e)if(K.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(K.isArray(e)&&function(e){return K.isArray(e)&&!e.some($)}(e)||(K.isFileList(e)||K.endsWith(n,"[]"))&&(a=K.toArray(e)))return n=X(n),a.forEach(function(e,o){!K.isUndefined(e)&&null!==e&&t.append(!0===s?Z([n],o,i):null===s?n:n+"[]",c(e))}),!1;return!!$(e)||(t.append(Z(r,n,i),c(e)),!1)}const l=[],d=Object.assign(Q,{defaultVisitor:u,convertValue:c,isVisitable:$});if(!K.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!K.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+o.join("."));l.push(n),K.forEach(n,function(n,i){!0===(!(K.isUndefined(n)||null===n)&&r.call(t,n,K.isString(i)?i.trim():i,o,d))&&e(n,o?o.concat(i):[i])}),l.pop()}}(e),t}function te(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ne(e,t){this._pairs=[],e&&ee(e,this,t)}const oe=ne.prototype;function re(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,n){if(!t)return e;const o=n&&n.encode||re,r=K.isFunction(n)?{serialize:n}:n,i=r&&r.serialize;let s;if(s=i?i(t,r):K.isURLSearchParams(t)?t.toString():new ne(t,r).toString(o),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,te)}:te;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var se=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){K.forEach(this.handlers,function(t){null!==t&&e(t)})}},ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ce={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ne,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ue="undefined"!=typeof window&&"undefined"!=typeof document,le="object"==typeof navigator&&navigator||void 0,de=ue&&(!le||["ReactNative","NativeScript","NS"].indexOf(le.product)<0),pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,fe=ue&&window.location.href||"http://localhost";var he={...Object.freeze({__proto__:null,hasBrowserEnv:ue,hasStandardBrowserWebWorkerEnv:pe,hasStandardBrowserEnv:de,navigator:le,origin:fe}),...ce};function me(e){function t(e,n,o,r){let i=e[r++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=r>=e.length;return i=!i&&K.isArray(o)?o.length:i,a?(K.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!s):(o[i]&&K.isObject(o[i])||(o[i]=[]),t(e,n,o[i],r)&&K.isArray(o[i])&&(o[i]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let i;for(o=0;o<r;o++)i=n[o],t[i]=e[i];return t}(o[i])),!s)}if(K.isFormData(e)&&K.isFunction(e.entries)){const n={};return K.forEachEntry(e,(e,o)=>{t(function(e){return K.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),o,n,0)}),n}return null}const ye={transitional:ae,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=K.isObject(e);if(r&&K.isHTMLForm(e)&&(e=new FormData(e)),K.isFormData(e))return o?JSON.stringify(me(e)):e;if(K.isArrayBuffer(e)||K.isBuffer(e)||K.isStream(e)||K.isFile(e)||K.isBlob(e)||K.isReadableStream(e))return e;if(K.isArrayBufferView(e))return e.buffer;if(K.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ee(e,new he.classes.URLSearchParams,{visitor:function(e,t,n,o){return he.isNode&&K.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=K.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ee(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e){if(K.isString(e))try{return(0,JSON.parse)(e),K.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(K.isResponse(e)||K.isReadableStream(e))return e;if(e&&K.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw G.from(e,G.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:he.classes.FormData,Blob:he.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};K.forEach(["delete","get","head","post","put","patch"],e=>{ye.headers[e]={}});var ge=ye;const we=K.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"]),be=Symbol("internals");function Ee(e){return e&&String(e).trim().toLowerCase()}function ve(e){return!1===e||null==e?e:K.isArray(e)?e.map(ve):String(e)}function Re(e,t,n,o,r){return K.isFunction(o)?o.call(this,t,n):(r&&(t=n),K.isString(t)?K.isString(o)?-1!==t.indexOf(o):K.isRegExp(o)?o.test(t):void 0:void 0)}class Oe{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=Ee(t);if(!r)throw new Error("header name must be a non-empty string");const i=K.findKey(o,r);(!i||void 0===o[i]||!0===n||void 0===n&&!1!==o[i])&&(o[i||t]=ve(e))}const i=(e,t)=>K.forEach(e,(e,n)=>r(e,n,t));if(K.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(K.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&we[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t})(e),t);else if(K.isObject(e)&&K.isIterable(e)){let n,o,r={};for(const t of e){if(!K.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[o=t[0]]=(n=r[o])?K.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=Ee(e)){const n=K.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}(e);if(K.isFunction(t))return t.call(this,e,n);if(K.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ee(e)){const n=K.findKey(this,e);return!(!n||void 0===this[n]||t&&!Re(0,this[n],n,t))}return!1}delete(e,t){const n=this;let o=!1;function r(e){if(e=Ee(e)){const r=K.findKey(n,e);!r||t&&!Re(0,n[r],r,t)||(delete n[r],o=!0)}}return K.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!Re(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return K.forEach(this,(o,r)=>{const i=K.findKey(n,r);if(i)return t[i]=ve(o),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(r):String(r).trim();s!==r&&delete t[r],t[s]=ve(o),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return K.forEach(this,(n,o)=>{null!=n&&!1!==n&&(t[o]=e&&K.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[be]=this[be]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=Ee(e);t[o]||(function(e,t){const n=K.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[o]=!0)}return K.isArray(e)?e.forEach(o):o(e),this}}Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),K.reduceDescriptors(Oe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),K.freezeMethods(Oe);var Se=Oe;function ke(e,t){const n=this||ge,o=t||n,r=Se.from(o.headers);let i=o.data;return K.forEach(e,function(e){i=e.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function Ae(e){return!(!e||!e.__CANCEL__)}var Te=class extends G{constructor(e,t,n){super(null==e?"canceled":e,G.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Pe(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ne=(e,t,n=3)=>{let o=0;const r=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=o[s];r||(r=c),n[i]=a,o[i]=c;let l=s,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-r<t)return;const p=u&&c-u;return p?Math.round(1e3*d/p):void 0}}(50,250);return function(n,i){let s,a,c=0,u=1e3/i;const l=(n,i=Date.now())=>{c=i,s=null,a&&(clearTimeout(a),a=null),(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-o,c=r(a);o=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-c;n>=u?l(e,t):(s=e,a||(a=setTimeout(()=>{a=null,l(s)},u-n)))},()=>s&&l(s)]}(0,n)},je=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},Ce=e=>(...t)=>K.asap(()=>e(...t));var _e=he.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,he.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(he.origin),he.navigator&&/(msie|trident)/i.test(he.navigator.userAgent)):()=>!0,Ue=he.hasStandardBrowserEnv?{write(e,t,n,o,r,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];K.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),K.isString(o)&&a.push(`path=${o}`),K.isString(r)&&a.push(`domain=${r}`),!0===i&&a.push("secure"),K.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function xe(e,t,n){let o=!("string"==typeof(r=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return e&&(o||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Le=e=>e instanceof Se?{...e}:e;function Fe(e,t){t=t||{};const n={};function o(e,t,n,o){return K.isPlainObject(e)&&K.isPlainObject(t)?K.merge.call({caseless:o},e,t):K.isPlainObject(t)?K.merge({},t):K.isArray(t)?t.slice():t}function r(e,t,n,r){return K.isUndefined(t)?K.isUndefined(e)?void 0:o(void 0,e,0,r):o(e,t,0,r)}function i(e,t){if(!K.isUndefined(t))return o(void 0,t)}function s(e,t){return K.isUndefined(t)?K.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(n,r,i){return i in t?o(n,r):i in e?o(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>r(Le(e),Le(t),0,!0)};return K.forEach(Object.keys({...e,...t}),function(o){if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=K.hasOwnProp(c,o)?c[o]:r,s=i(e[o],t[o],o);K.isUndefined(s)&&i!==a||(n[o]=s)}),n}var Be=e=>{const t=Fe({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=Se.from(s),t.url=ie(xe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),K.isFormData(n))if(he.hasStandardBrowserEnv||he.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(K.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(he.hasStandardBrowserEnv&&(o&&K.isFunction(o)&&(o=o(t)),o||!1!==o&&_e(t.url))){const e=r&&i&&Ue.read(i);e&&s.set(r,e)}return t},De="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const o=Be(e);let r=o.data;const i=Se.from(o.headers).normalize();let s,a,c,u,l,{responseType:d,onUploadProgress:p,onDownloadProgress:f}=o;function h(){u&&u(),l&&l(),o.cancelToken&&o.cancelToken.unsubscribe(s),o.signal&&o.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function y(){if(!m)return;const o=Se.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Pe(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:o,config:e,request:m}),m=null}m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new G("Request aborted",G.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const o=t&&t.message?t.message:"Network Error",r=new G(o,G.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const r=o.transitional||ae;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),n(new G(t,r.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,m)),m=null},void 0===r&&i.setContentType(null),"setRequestHeader"in m&&K.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),K.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),d&&"json"!==d&&(m.responseType=o.responseType),f&&([c,l]=Ne(f,!0),m.addEventListener("progress",c)),p&&m.upload&&([a,u]=Ne(p),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(o.cancelToken||o.signal)&&(s=t=>{m&&(n(!t||t.type?new Te(null,e,m):t),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(s),o.signal&&(o.signal.aborted?s():o.signal.addEventListener("abort",s)));const g=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);g&&-1===he.protocols.indexOf(g)?n(new G("Unsupported protocol "+g+":",G.ERR_BAD_REQUEST,e)):m.send(r||null)})},Ie=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,o=new AbortController;const r=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;o.abort(t instanceof G?t:new Te(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,r(new G(`timeout of ${t}ms exceeded`,G.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:a}=o;return a.unsubscribe=()=>K.asap(s),a}};const qe=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let o,r=0;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Je=(e,t,n,o)=>{const r=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*qe(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t)return a(),void e.close();let i=o.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(o))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:Ye}=K,Me=(({Request:e,Response:t})=>({Request:e,Response:t}))(K.global),{ReadableStream:ze,TextEncoder:He}=K.global,Ve=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ke=e=>{e=K.merge.call({skipUndefined:!0},Me,e);const{fetch:t,Request:n,Response:o}=e,r=t?Ye(t):"function"==typeof fetch,i=Ye(n),s=Ye(o);if(!r)return!1;const a=r&&Ye(ze),c=r&&("function"==typeof He?(u=new He,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=i&&a&&Ve(()=>{let e=!1;const t=new n(he.origin,{body:new ze,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&a&&Ve(()=>K.isReadableStream(new o("").body)),p={stream:d&&(e=>e.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!p[e]&&(p[e]=(t,n)=>{let o=t&&t[e];if(o)return o.call(t);throw new G(`Response type '${e}' is not supported`,G.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:r,method:s,data:a,signal:u,cancelToken:f,timeout:h,onDownloadProgress:m,onUploadProgress:y,responseType:g,headers:w,withCredentials:b="same-origin",fetchOptions:E}=Be(e),v=t||fetch;g=g?(g+"").toLowerCase():"text";let R=Ie([u,f&&f.toAbortSignal()],h),O=null;const S=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let k;try{if(y&&l&&"get"!==s&&"head"!==s&&0!==(k=await(async(e,t)=>{const o=K.toFiniteNumber(e.getContentLength());return null==o?(async e=>{if(null==e)return 0;if(K.isBlob(e))return e.size;if(K.isSpecCompliantForm(e)){const t=new n(he.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return K.isArrayBufferView(e)||K.isArrayBuffer(e)?e.byteLength:(K.isURLSearchParams(e)&&(e+=""),K.isString(e)?(await c(e)).byteLength:void 0)})(t):o})(w,a))){let e,t=new n(r,{method:"POST",body:a,duplex:"half"});if(K.isFormData(a)&&(e=t.headers.get("content-type"))&&w.setContentType(e),t.body){const[e,n]=je(k,Ne(Ce(y)));a=Je(t.body,65536,e,n)}}K.isString(b)||(b=b?"include":"omit");const t=i&&"credentials"in n.prototype,u={...E,signal:R,method:s.toUpperCase(),headers:w.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};O=i&&new n(r,u);let f=await(i?v(O,E):v(r,u));const h=d&&("stream"===g||"response"===g);if(d&&(m||h&&S)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=K.toFiniteNumber(f.headers.get("content-length")),[n,r]=m&&je(t,Ne(Ce(m),!0))||[];f=new o(Je(f.body,65536,n,()=>{r&&r(),S&&S()}),e)}g=g||"text";let A=await p[K.findKey(p,g)||"text"](f,e);return!h&&S&&S(),await new Promise((t,n)=>{Pe(t,n,{data:A,headers:Se.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:O})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new G("Network Error",G.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t});throw G.from(t,t&&t.code,e,O,t&&t.response)}}},We=new Map,Ge=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:r}=t,i=[o,r,n];let s,a,c=i.length,u=We;for(;c--;)s=i[c],a=u.get(s),void 0===a&&u.set(s,a=c?new Map:Ke(t)),u=a;return a};Ge();const $e={http:null,xhr:De,fetch:{get:Ge}};K.forEach($e,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Xe=e=>`- ${e}`,Ze=e=>K.isFunction(e)||null===e||!1===e;var Qe=function(e,t){e=K.isArray(e)?e:[e];const{length:n}=e;let o,r;const i={};for(let s=0;s<n;s++){let n;if(o=e[s],r=o,!Ze(o)&&(r=$e[(n=String(o)).toLowerCase()],void 0===r))throw new G(`Unknown adapter '${n}'`);if(r&&(K.isFunction(r)||(r=r.get(t))))break;i[n||"#"+s]=r}if(!r){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(Xe).join("\n"):" "+Xe(e[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r};function et(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function tt(e){return et(e),e.headers=Se.from(e.headers),e.data=ke.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qe(e.adapter||ge.adapter,e)(e).then(function(t){return et(e),t.data=ke.call(e,e.transformResponse,t),t.headers=Se.from(t.headers),t},function(t){return Ae(t)||(et(e),t&&t.response&&(t.response.data=ke.call(e,e.transformResponse,t.response),t.response.headers=Se.from(t.response.headers))),Promise.reject(t)})}const nt="1.13.5",ot={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ot[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const rt={};ot.transitional=function(e,t,n){function o(e,t){return"[Axios v"+nt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,i)=>{if(!1===e)throw new G(o(r," has been removed"+(t?" in "+t:"")),G.ERR_DEPRECATED);return t&&!rt[r]&&(rt[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},ot.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const i=o[r],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new G("option "+i+" must be "+n,G.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new G("Unknown option "+i,G.ERR_BAD_OPTION)}},validators:ot};const st=it.validators;class at{constructor(e){this.defaults=e||{},this.interceptors={request:new se,response:new se}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Fe(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean),legacyInterceptorReqResOrdering:st.transitional(st.boolean)},!1),null!=o&&(K.isFunction(o)?t.paramsSerializer={serialize:o}:it.assertOptions(o,{encode:st.function,serialize:st.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:st.spelling("baseURL"),withXsrfToken:st.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=r&&K.merge(r.common,r[t.method]);r&&K.forEach(["delete","get","head","post","put","patch","common"],e=>{delete r[e]}),t.headers=Se.concat(i,r);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||ae;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,d=0;if(!a){const e=[tt.bind(this),void 0];for(e.unshift(...s),e.push(...c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=s.length;let p=t;for(;d<l;){const e=s[d++],t=s[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=tt.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return ie(xe((e=Fe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}K.forEach(["delete","get","head","options"],function(e){at.prototype[e]=function(t,n){return this.request(Fe(n||{},{method:e,url:t,data:(n||{}).data}))}}),K.forEach(["post","put","patch"],function(e){function t(t){return function(n,o,r){return this.request(Fe(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}at.prototype[e]=t(),at.prototype[e+"Form"]=t(!0)});var ct=at;class ut{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const o=new Promise(e=>{n.subscribe(e),t=e}).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e(function(e,o,r){n.reason||(n.reason=new Te(e,o,r),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ut(function(t){e=t}),cancel:e}}}var lt=ut;const dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(dt).forEach(([e,t])=>{dt[t]=e});var pt=dt;const ft=function e(t){const n=new ct(t),r=o(ct.prototype.request,n);return K.extend(r,ct.prototype,n,{allOwnKeys:!0}),K.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Fe(t,n))},r}(ge);ft.Axios=ct,ft.CanceledError=Te,ft.CancelToken=lt,ft.isCancel=Ae,ft.VERSION=nt,ft.toFormData=ee,ft.AxiosError=G,ft.Cancel=ft.CanceledError,ft.all=function(e){return Promise.all(e)},ft.spread=function(e){return function(t){return e.apply(null,t)}},ft.isAxiosError=function(e){return K.isObject(e)&&!0===e.isAxiosError},ft.mergeConfig=Fe,ft.AxiosHeaders=Se,ft.formToJSON=e=>me(K.isHTMLForm(e)?new FormData(e):e),ft.getAdapter=Qe,ft.HttpStatusCode=pt,ft.default=ft,e.exports=ft}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var o={};(()=>{var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.IBANValidation=e.PhoneValidation=e.PaymentFraud=e.EmailValidation=e.ASN=e.BadWord=e.Country=e.BulkLookup=e.Threats=e.Lookup=e.GeoIP=void 0;var t=n(746);e.GeoIP=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.params||[],i=e.format||"JSON",s=e.lang||"EN",a=e.mode||"live";s=s.toUpperCase();var c=(0,t.getGFP)();r.forEach(function(e){e.length>0&&(t.availableGeoIPParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `location`, `security`, `timezone`, `currency` and/or `device`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')))}),t.availableFormats.includes(i)||o(new Error('The `format` option value "'+i+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')),t.availableLanguages.includes(s)||o(new Error('The `lang` option value "'+s+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')),"live"!==a&&"test"!==a&&o(new Error('The `mode` option value "'+a+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/geoip')),(0,t.makeHttpRquest)("/geo/ip",{key:e.key,params:r.join(","),format:i,lang:s,mode:a},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)},{gfp:c})})},e.Lookup=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.ip||"",i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";a=a.toUpperCase(),r.length<7&&o(new Error("You should pass the `ip` parameter.")),i.forEach(function(e){e.length>0&&(t.availableGeoIPParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `location`, `security`, `timezone`, `currency` and/or `device`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')))}),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),(0,t.makeHttpRquest)("/lookup/ip/".concat(encodeURIComponent(r)),{key:e.key,params:i.join(","),format:s,lang:a,mode:c},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.Threats=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.ip||"",i=e.format||"JSON",s=e.mode||"live";r.length<7&&o(new Error("You should pass the `ip` parameter.")),t.availableFormats.includes(i)||o(new Error('The `format` option value "'+i+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),"live"!==s&&"test"!==s&&o(new Error('The `mode` option value "'+s+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),(0,t.makeHttpRquest)("/score/ip/".concat(encodeURIComponent(r)),{key:e.key,format:i,mode:s},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.BulkLookup=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.ips||[],i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";a=a.toUpperCase(),"object"!=typeof r&&(r=[]),r.length<1&&o(new Error("You should pass the `ips` parameter.")),r.forEach(function(e){e.length<7&&o(new Error("You should pass a valid IP Addresses in the `ips` parameter."))}),i.forEach(function(e){e.length>0&&(t.availableGeoIPParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `location`, `security`, `timezone`, `currency` and/or `device`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')))}),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/ip-lookup')),(0,t.makeHttpRquest)("/geo/ip/bulk",{ips:r.join(","),key:e.key,params:i.join(","),format:s,lang:a,mode:c},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.Country=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.countryCode||"",i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";r=r.toUpperCase(),a=a.toUpperCase(),2!==r.length&&o(new Error("You should pass the `countryCode` parameter. Also, it should be a `ISO 3166-1 alpha-2` format.\nRead more at: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2")),i.forEach(function(e){e.length>0&&(t.availableCountryParams.includes(e)||o(new Error('The "'+e+'" module you used is unknown.\nYou can use: `language`, `flag`, `currency` and/or `timezone`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')))}),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML`, `CSV` or `Newline`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/country-data')),(0,t.makeHttpRquest)("/lookup/countries/".concat(encodeURIComponent(r)),{key:e.key,params:i.join(","),format:s,lang:a,mode:c},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.BadWord=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.text||"",i=e.params||[],s=e.format||"JSON",a=e.lang||"EN",c=e.mode||"live";a=a.toUpperCase(),r.length<1&&o(new Error("You should pass the `text` parameter.")),t.availableFormats.includes(s)||o(new Error('The `format` option value "'+s+'" you specified is unknown.\nYou can use: `JSON`, `XML` or `CSV`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/profanity-detection')),t.availableLanguages.includes(a)||o(new Error('The `lang` option value "'+a+'" you specified is unknown.\nYou can use: `EN`, `AR`, `DE`, `FR`, `ES`, `JA`, `ZH` or `RU`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/profanity-detection')),"live"!==c&&"test"!==c&&o(new Error('The `mode` option value "'+c+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/other-services/profanity-detection')),(0,t.makePostRquest)("score/text",{text:r,key:e.key,params:i.join(","),format:s,lang:a,mode:c},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.ASN=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.asn||"",i=e.mode||"live";r.length<1&&o(new Error("You should pass the `asn` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/ip-geolocation/asn-lookup')),(0,t.makeHttpRquest)("/lookup/asn/".concat(encodeURIComponent(r)),{key:e.key,mode:i},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.EmailValidation=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.email||"",i=e.mode||"live";r.length<1&&o(new Error("You should pass the `email` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/data-validation/email-lookup')),(0,t.makeHttpRquest)("/score/email/".concat(encodeURIComponent(r)),{key:e.key,mode:i},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.PaymentFraud=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.data||[],i=e.mode||"live";("object"!=typeof r||Array.isArray(r))&&o(new Error("You should pass the `data` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/payment-fraud/payment-fraud-prevention')),(0,t.makePostRquest)("score/payments",{data:r,key:e.key,mode:i},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.PhoneValidation=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.phone||"",i=e.countryCode||"",s=e.mode||"live";(r.length<1||i.length<1)&&o(new Error("You should pass both `phone` and `countryCode` parameters.")),"live"!==s&&"test"!==s&&o(new Error('The `mode` option value "'+s+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/data-validation/phone-lookup')),(0,t.makeHttpRquest)("/score/phone/".concat(encodeURIComponent(r)),{country_code:i,key:e.key,mode:s},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})},e.IBANValidation=function(e){if("object"!=typeof e&&(e={}),!e.key||e.key.length<1)throw new Error("You should pass the API Key.");return new Promise(function(n,o){var r=e.iban||"",i=e.mode||"live";r.length<1&&o(new Error("You should pass the `iban` parameter.")),"live"!==i&&"test"!==i&&o(new Error('The `mode` option value "'+i+'" you specified is unknown.\nYou can use: `live` or `test`.\nRead more at: https://docs.greip.io/api-reference/endpoint/payment-fraud/iban-validation')),(0,t.makeHttpRquest)("/lookup/iban/".concat(encodeURIComponent(r)),{key:e.key,mode:i},function(e){"object"!=typeof e&&(e=JSON.parse(e)),n(e)})})}})(),Greip=o})();