contentful 10.3.7 → 10.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.contentful=t():e.contentful=t()}(self,(function(){return function(){var e={206:function(e,t,n){e.exports=n(57)},387:function(e,t,n){"use strict";var r=n(485),o=n(570),i=n(940),s=n(581),a=n(574),u=n(845),c=n(338),l=n(524),f=n(832),p=n(132);e.exports=function(e){return new Promise((function(t,n){var d,h=e.data,y=e.headers,v=e.responseType;function m(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}r.isFormData(h)&&delete y["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(b+":"+w)}var x=a(e.baseURL,e.url);function O(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g};o((function(e){t(e),m()}),(function(e){n(e),m()}),i),g=null}}if(g.open(e.method.toUpperCase(),s(x,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=O:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(O)},g.onabort=function(){g&&(n(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||f;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var j=(e.withCredentials||c(x))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;j&&(y[e.xsrfHeaderName]=j)}"setRequestHeader"in g&&r.forEach(y,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete y[t]:g.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),v&&"json"!==v&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(d=function(e){g&&(n(!e||e&&e.type?new p("canceled"):e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d))),h||(h=null),g.send(h)}))}},57:function(e,t,n){"use strict";var r=n(485),o=n(875),i=n(29),s=n(941),a=function e(t){var n=new i(t),a=o(i.prototype.request,n);return r.extend(a,i.prototype,n),r.extend(a,n),a.create=function(n){return e(s(t,n))},a}(n(396));a.Axios=i,a.Cancel=n(132),a.CancelToken=n(603),a.isCancel=n(475),a.VERSION=n(345).version,a.all=function(e){return Promise.all(e)},a.spread=n(739),a.isAxiosError=n(835),e.exports=a,e.exports.default=a},132:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},603:function(e,t,n){"use strict";var r=n(132);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},475:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},29:function(e,t,n){"use strict";var r=n(485),o=n(581),i=n(96),s=n(9),a=n(941),u=n(144),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&u.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!o){var f=[s,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(l),i=Promise.resolve(t);f.length;)i=i.then(f.shift(),f.shift());return i}for(var p=t;r.length;){var d=r.shift(),h=r.shift();try{p=d(p)}catch(e){h(e);break}}try{i=s(p)}catch(e){return Promise.reject(e)}for(;l.length;)i=i.then(l.shift(),l.shift());return i},l.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=l},96:function(e,t,n){"use strict";var r=n(485);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},574:function(e,t,n){"use strict";var r=n(642),o=n(288);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},524:function(e,t,n){"use strict";var r=n(953);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},9:function(e,t,n){"use strict";var r=n(485),o=n(212),i=n(475),s=n(396),a=n(132);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return u(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},953:function(e){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},941:function(e,t,n){"use strict";var r=n(485);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function s(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function u(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,o=t(e);r.isUndefined(o)&&t!==u||(n[e]=o)})),n}},570:function(e,t,n){"use strict";var r=n(524);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},212:function(e,t,n){"use strict";var r=n(485),o=n(396);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},396:function(e,t,n){"use strict";var r=n(485),o=n(446),i=n(953),s=n(832),a={"Content-Type":"application/x-www-form-urlencoded"};function u(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,l={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(387)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(u(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(u(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(a)})),e.exports=l},832:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},345:function(e){e.exports={version:"0.26.1"}},875:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},581:function(e,t,n){"use strict";var r=n(485);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},288:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},940:function(e,t,n){"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},642:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},835:function(e,t,n){"use strict";var r=n(485);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},338:function(e,t,n){"use strict";var r=n(485);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},446:function(e,t,n){"use strict";var r=n(485);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},845:function(e,t,n){"use strict";var r=n(485),o=["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"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},739:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},144:function(e,t,n){"use strict";var r=n(345).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},485:function(e,t,n){"use strict";var r=n(875),o=Object.prototype.toString;function i(e){return Array.isArray(e)}function s(e){return void 0===e}function a(e){return"[object ArrayBuffer]"===o.call(e)}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:a,isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===o.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&a(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:c,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:l,isStream:function(e){return u(e)&&l(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===o.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:f,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):i(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)f(arguments[r],n);return t},extend:function(e,t,n){return f(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},968:function(e,t,n){e.exports=function(){"use strict";var e=Function.prototype.toString,t=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,a=Object.getPrototypeOf,u=Object.prototype,c=u.hasOwnProperty,l=u.propertyIsEnumerable,f="function"==typeof s,p="function"==typeof WeakMap,d=function(){if(p)return function(){return new WeakMap};var e=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}();return function(){return new e}}(),h=function(n,r){var o=n.__proto__||a(n);if(!o)return t(null);var i=o.constructor;if(i===r.Object)return o===r.Object.prototype?{}:t(o);if(~e.call(i).indexOf("[native code]"))try{return new i}catch(e){}return t(o)},y=function(e,t,n,r){var o=h(e,t);for(var i in r.set(e,o),e)c.call(e,i)&&(o[i]=n(e[i],r));if(f)for(var a=s(e),u=0,p=a.length,d=void 0;u<p;++u)d=a[u],l.call(e,d)&&(o[d]=n(e[d],r));return o},v=function(e,t,n,a){var u=h(e,t);a.set(e,u);for(var c=f?i(e).concat(s(e)):i(e),l=0,p=c.length,d=void 0,y=void 0;l<p;++l)if("callee"!==(d=c[l])&&"caller"!==d)if(y=o(e,d)){y.get||y.set||(y.value=n(e[d],a));try{r(u,d,y)}catch(e){u[d]=y.value}}else u[d]=n(e[d],a);return u},m=Array.isArray,g=Object.getPrototypeOf,b=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function w(e,t){var n=!(!t||!t.isStrict),r=t&&t.realm||b,o=n?v:y,i=function(e,t){if(!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);var s,a,u,c=e.__proto__||g(e),l=c&&c.constructor;if(!l||l===r.Object)return o(e,r,i,t);if(m(e)){if(n)return v(e,r,i,t);s=new l,t.set(e,s);for(var f=0,p=e.length;f<p;++f)s[f]=i(e[f],t);return s}if(e instanceof r.Date)return new l(e.getTime());if(e instanceof r.RegExp)return(s=new l(e.source,e.flags||(a=e,u="",a.global&&(u+="g"),a.ignoreCase&&(u+="i"),a.multiline&&(u+="m"),a.unicode&&(u+="u"),a.sticky&&(u+="y"),u))).lastIndex=e.lastIndex,s;if(r.Map&&e instanceof r.Map)return s=new l,t.set(e,s),e.forEach((function(e,n){s.set(n,i(e,t))})),s;if(r.Set&&e instanceof r.Set)return s=new l,t.set(e,s),e.forEach((function(e){s.add(i(e,t))})),s;if(r.Blob&&e instanceof r.Blob)return e.slice(0,e.size,e.type);if(r.Buffer&&r.Buffer.isBuffer(e))return s=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(e.length):new l(e.length),t.set(e,s),e.copy(s),s;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(e))return s=new l(e.buffer.slice(0)),t.set(e,s),s;if(e instanceof r.ArrayBuffer)return s=e.slice(0),t.set(e,s),s}return"function"==typeof e.then||e instanceof Error||r.WeakMap&&e instanceof r.WeakMap||r.WeakSet&&e instanceof r.WeakSet?e:o(e,r,i,t)};return i(e,d())}return w.default=w,w.strict=function(e,t){return w(e,{isStrict:!0,realm:t?t.realm:void 0})},w}()},784:function(e,t){function n(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(o,i){if(n.length>0){var s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?r.splice(s,1/0,o):r.push(o),~n.indexOf(i)&&(i=t.call(this,o,i))}else n.push(i);return null==e?i:e.call(this,o,i)}}(e.exports=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)}).getSerialize=n},261:function(e){var t,n,r=Function.prototype,o=Object.prototype,i=r.toString,s=o.hasOwnProperty,a=i.call(Object),u=o.toString,c=(t=Object.getPrototypeOf,n=Object,function(e){return t(n(e))});e.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=u.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=c(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&i.call(n)==a}},451:function(e){var t=Object.prototype.toString,n=Array.isArray;e.exports=function(e){return"string"==typeof e||!n(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},930:function(e){"use strict";class t extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}e.exports=({limit:e,interval:n,strict:r})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(n))throw new TypeError("Expected `interval` to be a finite number");const o=new Map;let i=0,s=0;const a=[],u=r?function(){const t=Date.now();if(a.length<e)return a.push(t),0;const r=a.shift()+n;return t>=r?(a.push(t),0):(a.push(r),r-t)}:function(){const t=Date.now();return t-i>n?(s=1,i=t,0):(s<e?s++:(i+=n,s=1),i-t)};return e=>{const n=function(...t){if(!n.isEnabled)return(async()=>e.apply(this,t))();let r;return new Promise(((n,i)=>{r=setTimeout((()=>{n(e.apply(this,t)),o.delete(r)}),u()),o.set(r,i)}))};return n.abort=()=>{for(const e of o.keys())clearTimeout(e),o.get(e)(new t);o.clear(),a.splice(0,a.length)},n.isEnabled=!0,n}},e.exports.AbortError=t}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{createClient:function(){return ie},createGlobalOptions:function(){return _}});var e=n(206),t=n.n(e),o=n(968),i=n.n(o),s=n(451),a=n.n(s),u=n(930),c=n.n(u),l=n(261),f=n.n(l);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(){y=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),m(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var s=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,s)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},y.apply(this,arguments)}function v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(){}var x=function(e){return new Promise((function(t){setTimeout(t,e)}))},O=function(e){return Math.pow(Math.SQRT2,e)},j=y(/(\d+)(%)/,{value:1});function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:7,n=t;if(j.test(e)){var r,o=null===(r=e.match(j))||void 0===r?void 0:r.groups;if(o&&o.value){var i=parseInt(o.value)/100;n=Math.round(t*i)}}return Math.min(30,Math.max(1,n))}function E(e,t){return t("info","Throttle request to ".concat(e,"/s")),c()({limit:e,interval:1e3,strict:!1})}var S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n=e.defaults.logHandler,r=void 0===n?w:n,o=a()(t)?k(t):k("auto",t),i=E(o,r),s=!1,u=e.interceptors.request.use((function(e){return i((function(){return e}))()}),(function(e){return Promise.reject(e)})),c=e.interceptors.response.use((function(n){if(!s&&a()(t)&&("auto"===t||j.test(t))&&n.headers&&n.headers["x-contentful-ratelimit-second-limit"]){var c=parseInt(n.headers["x-contentful-ratelimit-second-limit"]),l=k(t,c);l!==o&&(u&&e.interceptors.request.eject(u),o=l,i=E(l,r),u=e.interceptors.request.use((function(e){return i((function(){return e}))()}),(function(e){return Promise.reject(e)}))),s=!0}return n}),(function(e){return Promise.reject(e)}));return function(){e.interceptors.request.eject(u),e.interceptors.response.eject(c)}},A=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function L(e,t){var n=d(d({},{insecure:!1,retryOnError:!0,logHandler:function(e,t){if("error"===e&&t){var n=[t.name,t.message].filter((function(e){return e})).join(" - ");return console.error("[error] ".concat(n)),void console.error(t)}console.log("[".concat(e,"] ").concat(t))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824}),t);if(!n.accessToken){var r=new TypeError("Expected parameter accessToken");throw n.logHandler("error",r),r}var o,s,a=n.insecure?"http":"https",u=n.space?"".concat(n.space,"/"):"",c=n.defaultHostname,l=n.insecure?80:443;if(n.host&&A.test(n.host)){var f=n.host.split(":");if(2===f.length){var p=(s=2,function(e){if(Array.isArray(e))return e}(o=f)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(o,s)||g(o,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());c=p[0],l=p[1]}else c=f[0]}n.basePath&&(n.basePath="/".concat(n.basePath.split("/").filter(Boolean).join("/")));var h=t.baseURL||"".concat(a,"://").concat(c,":").concat(l).concat(n.basePath,"/spaces/").concat(u);n.headers.Authorization||"function"==typeof n.accessToken||(n.headers.Authorization="Bearer "+n.accessToken);var y={baseURL:h,headers:n.headers,httpAgent:n.httpAgent,httpsAgent:n.httpsAgent,proxy:n.proxy,timeout:n.timeout,adapter:n.adapter,maxContentLength:n.maxContentLength,maxBodyLength:n.maxBodyLength,logHandler:n.logHandler,responseLogger:n.responseLogger,requestLogger:n.requestLogger,retryOnError:n.retryOnError},v=e.create(y);return v.httpClientParams=t,v.cloneWithNewParams=function(n){return L(e,d(d({},i()(t)),n))},n.onBeforeRequest&&v.interceptors.request.use(n.onBeforeRequest),"function"==typeof n.accessToken&&function(e,t){e.interceptors.request.use((function(e){return t().then((function(t){return e.headers.set("Authorization","Bearer ".concat(t)),e}))}))}(v,n.accessToken),n.throttle&&S(v,n.throttle),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=e.defaults,r=n.responseLogger,o=void 0===r?w:r,i=n.requestLogger,s=void 0===i?w:i;e.interceptors.request.use((function(e){return s(e),e}),(function(e){return s(e),Promise.reject(e)})),e.interceptors.response.use((function(e){return o(e),e}),(function(n){var r=n.response,i=n.config;if(o(n),!i||!e.defaults.retryOnError)return Promise.reject(n);var s=i.attempts||1;if(s>t)return n.attempts=i.attempts,Promise.reject(n);var a=null,u=O(s);return r?r.status>=500&&r.status<600?a="Server ".concat(r.status):429===r.status&&(a="Rate limit",r.headers&&n.response.headers["x-contentful-ratelimit-reset"]&&(u=r.headers["x-contentful-ratelimit-reset"])):a="Connection",a?(u=Math.floor(1e3*u+200*Math.random()+500),e.defaults.logHandler("warning","".concat(a," error occurred. Waiting for ").concat(u," ms before retrying...")),i.attempts=s+1,delete i.httpAgent,delete i.httpsAgent,x(u).then((function(){return e(i)}))):Promise.reject(n)}))}(v,n.retryLimit),n.onError&&v.interceptors.response.use((function(e){return e}),n.onError),v}function P(e){var t=e.query,n={};return delete t.resolveLinks,n.params=i()(t),n}function T(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=g(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(Object.getOwnPropertyNames(e));try{for(n.s();!(t=n.n()).done;){var r=e[t.value];r&&"object"===h(r)&&T(r)}}catch(e){n.e(e)}finally{n.f()}return Object.freeze(e)}function U(){var e=window;if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(n)?"macOS":-1!==["iPhone","iPad","iPod"].indexOf(n)?"iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(n)?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function R(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return i()(this)}})}function C(e){var t,n=e.config,r=e.response;if(n&&n.headers&&n.headers.Authorization){var o="...".concat(n.headers.Authorization.toString().substr(-5));n.headers.Authorization="Bearer ".concat(o)}if(!f()(r)||!f()(n))throw e;var i,s=null==r?void 0:r.data,a={status:null==r?void 0:r.status,statusText:null==r?void 0:r.statusText,message:"",details:{}};n&&f()(n)&&(a.request={url:n.url,headers:n.headers,method:n.method,payloadData:n.data}),s&&"object"===h(s)&&("requestId"in s&&(a.requestId=s.requestId||"UNKNOWN"),"message"in s&&(a.message=s.message||""),"details"in s&&(a.details=s.details||{}),t=null===(i=s.sys)||void 0===i?void 0:i.id);var u=new Error;u.name=t&&"Unknown"!==t?t:"".concat(null==r?void 0:r.status," ").concat(null==r?void 0:r.statusText);try{u.message=JSON.stringify(a,null," ")}catch(e){var c;u.message=null!==(c=null==a?void 0:a.message)&&void 0!==c?c:""}throw u}function _(e){return function(t){return Object.assign({},e,t)}}var B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function N(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var q={},M=function(e,t){var n=t.entryId,r=t.linkType,o=t.spaceId;return o?e.get(o+"!"+r+"!"+n):e.get(r+"!"+n)},I=function e(t,n,r,o){if(n(t))return r(t);if(t&&"object"===(void 0===t?"undefined":B(t))){for(var i in t)t.hasOwnProperty(i)&&(t[i]=e(t[i],n,r,o));o&&(t=function(e){if(Array.isArray(e))return e.filter((function(e){return e!==q}));for(var t in e)e[t]===q&&delete e[t];return e}(t))}return t},D=function(e,t,n){var r=function(e,t){var n=t.sys,r=n.type,o=n.linkType;if("ResourceLink"===r){var i=t.sys.urn,s=/.*:spaces\/([A-Za-z0-9]*)\/entries\/([A-Za-z0-9]*)/;if(!s.test(i))return q;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(i.match(s),3),u=(a[0],a[1]),c=a[2],l=o.split(":")[1];return M(e,{linkType:l,entryId:c,spaceId:u})||q}var f=t.sys.id;return M(e,{linkType:o,entryId:f})||q}(e,t);return r===q?n?r:t:r},W=function(e,t){if(t=t||{},!e.items)return[];var n=i()(e),r=Object.keys(n.includes||{}).reduce((function(t,n){return[].concat(N(t),N(e.includes[n]))}),[]),o=[].concat(N(n.items),N(r)).filter((function(e){return Boolean(e.sys)})),s=new Map(o.reduce((function(e,t){var n,r=(n=t.sys,n.space?[n.type+"!"+n.id,n.space.sys.id+"!"+n.type+"!"+n.id]:[n.type+"!"+n.id]).map((function(e){return[e,t]}));return e.push.apply(e,N(r)),e}),[]));return o.forEach((function(e){var n=function(e,t){return Array.isArray(t)?Object.keys(e).filter((function(e){return-1!==t.indexOf(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):e}(e,t.itemEntryPoints);Object.assign(e,I(n,(function(e){return(t=e)&&t.sys&&"Link"===t.sys.type||function(e){return e&&e.sys&&"ResourceLink"===e.sys.type}(e);var t}),(function(e){return D(s,e,t.removeUnresolved)}),t.removeUnresolved))})),n.items},$=n(784),z=n.n($);function F(e){return Object.defineProperty(e,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(e=null,t=""){return z()(this,e,t,((e,t)=>({sys:{type:"Link",linkType:"Entry",id:t.sys.id,circular:!0}})))}})}async function H(e,t,n){if(!t||!t.initial&&!t.nextSyncToken&&!t.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(t.content_type&&!t.type)t.type="Entry";else if(t.content_type&&t.type&&"Entry"!==t.type)throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const{withoutLinkResolution:r,withoutUnresolvableLinks:o,paginate:i}={withoutLinkResolution:!1,withoutUnresolvableLinks:!1,paginate:!0,...n},s=await J(e,[],t,{paginate:i});r||(s.items=W(s,{removeUnresolved:o,itemEntryPoints:["fields"]}));const a=function(e){const t=e=>(t,n)=>(n.sys.type===e&&t.push(R(n)),t);return{entries:e.reduce(t("Entry"),[]),assets:e.reduce(t("Asset"),[]),deletedEntries:e.reduce(t("DeletedEntry"),[]),deletedAssets:e.reduce(t("DeletedAsset"),[])}}(s.items);return s.nextSyncToken&&(a.nextSyncToken=s.nextSyncToken),s.nextPageToken&&(a.nextPageToken=s.nextPageToken),T((u=F(R(a))).sys||{}),u;var u}async function J(e,t,n,{paginate:r}){const o=(i=n).nextPageToken?{sync_token:i.nextPageToken}:i.nextSyncToken?{sync_token:i.nextSyncToken}:i.sync_token?{sync_token:i.sync_token}:i;var i;const s=(await e.get("sync",P({query:o}))).data||{};return t=t.concat(s.items||[]),s.nextPageUrl?r?(delete o.initial,o.sync_token=G(s.nextPageUrl),J(e,t,o,{paginate:r})):{items:t,nextPageToken:G(s.nextPageUrl)}:s.nextSyncUrl?{items:t,nextSyncToken:G(s.nextSyncUrl)}:{items:[]}}function G(e){const t=e.split("?");return t.length>0?t[1].replace("sync_token=",""):""}function V(e){const t={};let n=!1;for(const r in e)Array.isArray(e[r])&&(t[r]=e[r].join(","),n=!0);return n?{...e,...t}:e}function X(e){if(!e.select)return e;const t=Array.isArray(e.select)?e.select:e.select.split(",").map((e=>e.trim())),n=new Set(t);return n.has("sys")?e:(n.add("sys.id"),n.add("sys.type"),{...e,select:[...n].join(",")})}function K(e,{resolveLinks:t,removeUnresolved:n}){const r=F(e);return t&&(r.items=W(r,{removeUnresolved:n,itemEntryPoints:["fields"]})),r}class Z extends Error{constructor(e,t){super(`Invalid "${e}" provided, `+t),this.name="ValidationError"}}function Q(e,t){t?function(e){if(e.locale)throw new Z("locale","The `locale` parameter is not allowed")}(e):function(e){if("*"===e.locale)throw new Z("locale","The use of locale='*' is no longer supported.To fetch an entry in all existing locales, \n use client.withAllLocales instead of the locale='*' parameter.")}(e)}function Y(e){if("resolveLinks"in e)throw new Z("resolveLinks","The use of the 'resolveLinks' parameter is no longer supported. By default, links are resolved. \n If you do not want to resolve links, use client.withoutLinkResolution.")}function ee(e){if("removeUnresolved"in e)throw new Z("removeUnresolved","The use of the 'removeUnresolved' parameter is no longer supported. By default, unresolved links are kept as link objects.\n If you do not want to include unresolved links, use client.withoutUnresolvableLinks.")}function te(e){for(const t in e){const n=e[t];if("object"==typeof n&&null!==n&&!Array.isArray(n))throw new Error(`Objects are not supported as value for the "${t}" query parameter.`)}}class ne extends Error{sys;details;constructor(e,t,n){super("The resource could not be found."),this.sys={type:"Error",id:"NotFound"},this.details={type:"Entry",id:e,environment:t,space:n}}}function re({http:e,getGlobalOptions:t},n){const r=(e="unknown")=>new ne(e,t().environment,t().space),o=e=>{let n="space"===e?t().spaceBaseUrl:t().environmentBaseUrl;if(!n)throw new Error("Please define baseUrl for "+e);return n.endsWith("/")||(n+="/"),n};async function i({context:t,path:n,config:r}){const i=o(t);try{return(await e.get(i+n,r)).data}catch(e){C(e)}}async function s(e,t){const{withoutLinkResolution:n,withoutUnresolvableLinks:r}=t;try{return K(await i({context:"environment",path:"entries",config:P({query:V(X(e))})}),{resolveLinks:!n??!0,removeUnresolved:r??!1})}catch(e){C(e)}}return{version:"10.3.7",getSpace:async function(){return i({context:"space",path:""})},getContentType:async function(e){return i({context:"environment",path:`content_types/${e}`})},getContentTypes:async function(e={}){return i({context:"environment",path:"content_types",config:P({query:e})})},getAsset:async function(e,t={}){return async function(e,t,n={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:r}=n;Q(t,r),te(t);return async function(e,t){try{return i({context:"environment",path:`assets/${e}`,config:P({query:X(t)})})}catch(e){C(e)}}(e,r?{...t,locale:"*"}:t)}(e,t,n)},getAssets:async function(e={}){return async function(e,t={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:n}=t;Q(e,n),te(e);return async function(e){try{return i({context:"environment",path:"assets",config:P({query:V(X(e))})})}catch(e){C(e)}}(n?{...e,locale:"*"}:e)}(e,n)},getTag:async function(e){return i({context:"environment",path:`tags/${e}`})},getTags:async function(e={}){return te(e),i({context:"environment",path:"tags",config:P({query:V(X(e))})})},getLocales:async function(e={}){return te(e),i({context:"environment",path:"locales",config:P({query:X(e)})})},parseEntries:function(e){return function(e,t={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){return function(e,t){const{withoutLinkResolution:n,withoutUnresolvableLinks:r}=t;return K(e,{resolveLinks:!n??!0,removeUnresolved:r??!1})}(e,t)}(e,n)},sync:async function(r,o={paginate:!0}){return async function(n,r,o={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){Y(n),ee(n);const i={...r,...o};return function(e){e.defaults.baseURL=t().environmentBaseUrl}(e),H(e,n,i)}(r,o,n)},getEntry:async function(e,t={}){return async function(e,t,n={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:o}=n;return Q(t,o),Y(t),ee(t),te(t),async function(e,t,n){if(!e)throw r(e);try{const o=await s({"sys.id":e,...t},n);if(o.items.length>0)return o.items[0];throw r(e)}catch(e){C(e)}}(e,o?{...t,locale:"*"}:t,n)}(e,t,n)},getEntries:async function(e={}){return async function(e,t={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:n}=t;return Q(e,n),Y(e),ee(e),te(e),s(n?{...e,locale:"*"}:e,t)}(e,n)},createAssetKey:async function(t){try{const e=Math.floor(Date.now()/1e3);!function(e,t,n){if(n=n||{},"number"!=typeof t)throw new Z(e,`only numeric values are allowed for timestamps, provided type was "${typeof t}"`);if(n.maximum&&t>n.maximum)throw new Z(e,`value (${t}) cannot be further in the future than expected maximum (${n.maximum})`);if(n.now&&t<n.now)throw new Z(e,`value (${t}) cannot be in the past, current time was ${n.now}`)}("expiresAt",t,{maximum:e+172800,now:e})}catch(e){C(e)}return async function({context:t,path:n,data:r,config:i}){const s=o(t);try{return(await e.post(s+n,r,i)).data}catch(e){C(e)}}({context:"environment",path:"asset_keys",data:{expiresAt:t}})}}}const oe=({http:e,getGlobalOptions:t})=>{function n(r){return function({http:e,getGlobalOptions:t},n,r){const o=re({http:e,getGlobalOptions:t},n);return Object.defineProperty(o,"withAllLocales",{get:()=>r({...n,withAllLocales:!0})}),Object.defineProperty(o,"withoutLinkResolution",{get:()=>r({...n,withoutLinkResolution:!0})}),Object.defineProperty(o,"withoutUnresolvableLinks",{get:()=>r({...n,withoutUnresolvableLinks:!0})}),Object.create(o)}({http:e,getGlobalOptions:t},r,n)}return{...re({http:e,getGlobalOptions:t},{withoutLinkResolution:!1,withAllLocales:!1,withoutUnresolvableLinks:!1}),get withAllLocales(){return n({withAllLocales:!0,withoutLinkResolution:!1,withoutUnresolvableLinks:!1})},get withoutLinkResolution(){return n({withAllLocales:!1,withoutLinkResolution:!0,withoutUnresolvableLinks:!1})},get withoutUnresolvableLinks(){return n({withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!0})}}};function ie(e){if(!e.accessToken)throw new TypeError("Expected parameter accessToken");if(!e.space)throw new TypeError("Expected parameter space");Y(e),ee(e);const n={resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master",...e},r=function(e,t,n,r){var o=[];t&&o.push("app ".concat(t)),n&&o.push("integration ".concat(n)),r&&o.push("feature "+r),o.push("sdk ".concat(e));var i=null;try{"undefined"!=typeof window&&"navigator"in window&&"product"in window.navigator&&"ReactNative"===window.navigator.product?(i=U(),o.push("platform ReactNative")):"undefined"==typeof process||process.browser?(i=U(),o.push("platform browser")):(i=function(){var e=process.platform||"linux",t=process.version||"0.0.0",n={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in n?"".concat(n[e]||"Linux","/").concat(t):null}(),o.push("platform node.js/".concat(process.versions&&process.versions.node?"v".concat(process.versions.node):process.version)))}catch(e){i=null}return i&&o.push("os ".concat(i)),"".concat(o.filter((function(e){return""!==e})).join("; "),";")}("contentful.js/10.3.7",n.application,n.integration);n.headers={...n.headers,"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":r};const o=L(t(),n);if(!o.defaults.baseURL)throw new Error("Please define a baseURL");const i=_({space:n.space,environment:n.environment,spaceBaseUrl:o.defaults.baseURL,environmentBaseUrl:`${o.defaults.baseURL}environments/${n.environment}`});return o.defaults.baseURL=i({}).environmentBaseUrl,oe({http:o,getGlobalOptions:i})}}(),r}()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.contentful=t():e.contentful=t()}(self,(function(){return function(){var e={581:function(e,t,n){e.exports=function(){"use strict";var e=Function.prototype.toString,t=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,a=Object.getPrototypeOf,c=Object.prototype,u=c.hasOwnProperty,l=c.propertyIsEnumerable,f="function"==typeof s,p="function"==typeof WeakMap,d=function(){if(p)return function(){return new WeakMap};var e=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}();return function(){return new e}}(),h=function(n,r){var o=n.__proto__||a(n);if(!o)return t(null);var i=o.constructor;if(i===r.Object)return o===r.Object.prototype?{}:t(o);if(~e.call(i).indexOf("[native code]"))try{return new i}catch(e){}return t(o)},y=function(e,t,n,r){var o=h(e,t);for(var i in r.set(e,o),e)u.call(e,i)&&(o[i]=n(e[i],r));if(f)for(var a=s(e),c=0,p=a.length,d=void 0;c<p;++c)d=a[c],l.call(e,d)&&(o[d]=n(e[d],r));return o},m=function(e,t,n,a){var c=h(e,t);a.set(e,c);for(var u=f?i(e).concat(s(e)):i(e),l=0,p=u.length,d=void 0,y=void 0;l<p;++l)if("callee"!==(d=u[l])&&"caller"!==d)if(y=o(e,d)){y.get||y.set||(y.value=n(e[d],a));try{r(c,d,y)}catch(e){c[d]=y.value}}else c[d]=n(e[d],a);return c},g=Array.isArray,b=Object.getPrototypeOf,v=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function w(e,t){var n=!(!t||!t.isStrict),r=t&&t.realm||v,o=n?m:y,i=function(e,t){if(!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);var s,a,c,u=e.__proto__||b(e),l=u&&u.constructor;if(!l||l===r.Object)return o(e,r,i,t);if(g(e)){if(n)return m(e,r,i,t);s=new l,t.set(e,s);for(var f=0,p=e.length;f<p;++f)s[f]=i(e[f],t);return s}if(e instanceof r.Date)return new l(e.getTime());if(e instanceof r.RegExp)return(s=new l(e.source,e.flags||(a=e,c="",a.global&&(c+="g"),a.ignoreCase&&(c+="i"),a.multiline&&(c+="m"),a.unicode&&(c+="u"),a.sticky&&(c+="y"),c))).lastIndex=e.lastIndex,s;if(r.Map&&e instanceof r.Map)return s=new l,t.set(e,s),e.forEach((function(e,n){s.set(n,i(e,t))})),s;if(r.Set&&e instanceof r.Set)return s=new l,t.set(e,s),e.forEach((function(e){s.add(i(e,t))})),s;if(r.Blob&&e instanceof r.Blob)return e.slice(0,e.size,e.type);if(r.Buffer&&r.Buffer.isBuffer(e))return s=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(e.length):new l(e.length),t.set(e,s),e.copy(s),s;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(e))return s=new l(e.buffer.slice(0)),t.set(e,s),s;if(e instanceof r.ArrayBuffer)return s=e.slice(0),t.set(e,s),s}return"function"==typeof e.then||e instanceof Error||r.WeakMap&&e instanceof r.WeakMap||r.WeakSet&&e instanceof r.WeakSet?e:o(e,r,i,t)};return i(e,d())}return w.default=w,w.strict=function(e,t){return w(e,{isStrict:!0,realm:t?t.realm:void 0})},w}()},784:function(e,t){function n(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(o,i){if(n.length>0){var s=n.indexOf(this);~s?n.splice(s+1):n.push(this),~s?r.splice(s,1/0,o):r.push(o),~n.indexOf(i)&&(i=t.call(this,o,i))}else n.push(i);return null==e?i:e.call(this,o,i)}}(e.exports=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)}).getSerialize=n},261:function(e){var t,n,r=Function.prototype,o=Object.prototype,i=r.toString,s=o.hasOwnProperty,a=i.call(Object),c=o.toString,u=(t=Object.getPrototypeOf,n=Object,function(e){return t(n(e))});e.exports=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=c.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=u(e);if(null===t)return!0;var n=s.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&i.call(n)==a}},451:function(e){var t=Object.prototype.toString,n=Array.isArray;e.exports=function(e){return"string"==typeof e||!n(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},930:function(e){"use strict";class t extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}e.exports=({limit:e,interval:n,strict:r})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(n))throw new TypeError("Expected `interval` to be a finite number");const o=new Map;let i=0,s=0;const a=[],c=r?function(){const t=Date.now();if(a.length<e)return a.push(t),0;const r=a.shift()+n;return t>=r?(a.push(t),0):(a.push(r),r-t)}:function(){const t=Date.now();return t-i>n?(s=1,i=t,0):(s<e?s++:(i+=n,s=1),i-t)};return e=>{const n=function(...t){if(!n.isEnabled)return(async()=>e.apply(this,t))();let r;return new Promise(((n,i)=>{r=setTimeout((()=>{n(e.apply(this,t)),o.delete(r)}),c()),o.set(r,i)}))};return n.abort=()=>{for(const e of o.keys())clearTimeout(e),o.get(e)(new t);o.clear(),a.splice(0,a.length)},n.isEnabled=!0,n}},e.exports.AbortError=t}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";function e(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{createClient:function(){return Ft},createGlobalOptions:function(){return dt}});const{toString:t}=Object.prototype,{getPrototypeOf:o}=Object,i=(s=Object.create(null),e=>{const n=t.call(e);return s[n]||(s[n]=n.slice(8,-1).toLowerCase())});var s;const a=e=>(e=e.toLowerCase(),t=>i(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,l=c("undefined"),f=a("ArrayBuffer"),p=c("string"),d=c("function"),h=c("number"),y=e=>null!==e&&"object"==typeof e,m=e=>{if("object"!==i(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=a("Date"),b=a("File"),v=a("Blob"),w=a("FileList"),O=a("URLSearchParams");function E(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),u(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function S(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!l(e)&&e!==x,j=(T="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>T&&e instanceof T);var T;const R=a("HTMLFormElement"),L=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),k=a("RegExp"),P=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};E(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",_="0123456789",N={DIGIT:_,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+_},C=a("AsyncFunction");var B={isArray:u,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&d(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||d(e.append)&&("formdata"===(t=i(e))||"object"===t&&d(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:p,isNumber:h,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:m,isUndefined:l,isDate:g,isFile:b,isBlob:v,isRegExp:k,isFunction:d,isStream:e=>y(e)&&d(e.pipe),isURLSearchParams:O,isTypedArray:j,isFileList:w,forEach:E,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,o)=>{const i=t&&S(n,o)||o;m(n[i])&&m(r)?n[i]=e(n[i],r):m(r)?n[i]=e({},r):u(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&E(arguments[e],r);return n},extend:(t,n,r,{allOwnKeys:o}={})=>(E(n,((n,o)=>{r&&d(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),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,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)},toFlatObject:(e,t,n,r)=>{let i,s,a;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&o(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:a,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!h(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:R,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:P,freezeMethods:e=>{P(e,((t,n)=>{if(d(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];d(r)&&(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={},r=e=>{e.forEach((e=>{n[e]=!0}))};return u(e)?r(e):r(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)=>(e=+e,Number.isFinite(e)?e:t),findKey:S,global:x,isContextDefined:A,ALPHABET:N,generateString:(e=16,t=N.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&d(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=u(e)?[]:{};return E(e,((e,t)=>{const i=n(e,r+1);!l(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:C,isThenable:e=>e&&(y(e)||d(e))&&d(e.then)&&d(e.catch)};function D(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)}B.inherits(D,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:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const F=D.prototype,q={};["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=>{q[e]={value:e}})),Object.defineProperties(D,q),Object.defineProperty(F,"isAxiosError",{value:!0}),D.from=(e,t,n,r,o,i)=>{const s=Object.create(F);return B.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),D.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var I=D;function M(e){return B.isPlainObject(e)||B.isArray(e)}function z(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function W(e,t,n){return e?e.concat(t).map((function(e,t){return e=z(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const H=B.toFlatObject(B,{},null,(function(e){return/^is[A-Z]/.test(e)}));var $=function(e,t,n){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=B.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!B.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(B.isDate(e))return e.toISOString();if(!a&&B.isBlob(e))throw new I("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(e)||B.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(B.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(B.isArray(e)&&function(e){return B.isArray(e)&&!e.some(M)}(e)||(B.isFileList(e)||B.endsWith(n,"[]"))&&(a=B.toArray(e)))return n=z(n),a.forEach((function(e,r){!B.isUndefined(e)&&null!==e&&t.append(!0===s?W([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!M(e)||(t.append(W(o,n,i),c(e)),!1)}const l=[],f=Object.assign(H,{defaultVisitor:u,convertValue:c,isVisitable:M});if(!B.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!B.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),B.forEach(n,(function(n,i){!0===(!(B.isUndefined(n)||null===n)&&o.call(t,n,B.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function J(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function K(e,t){this._pairs=[],e&&$(e,this,t)}const G=K.prototype;G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,J)}:J;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var V=K;function X(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q(e,t,n){if(!t)return e;const r=n&&n.encode||X,o=n&&n.serialize;let i;if(i=o?o(t,n):B.isURLSearchParams(t)?t.toString():new V(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}var Z=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){B.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ee={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:V,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},te=function(e){function t(e,n,r,o){let i=e[o++];const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&B.isArray(r)?r.length:i,a?(B.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&B.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&B.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(B.isFormData(e)&&B.isFunction(e.entries)){const n={};return B.forEachEntry(e,((e,r)=>{t(function(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const ne={"Content-Type":void 0},re={transitional:Y,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=B.isObject(e);if(o&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return r&&r?JSON.stringify(te(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return $(e,new ee.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ee.isNode&&B.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=B.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return $(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(B.isString(e))try{return(0,JSON.parse)(e),B.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||re.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&B.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw I.from(e,I.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:ee.classes.FormData,Blob:ee.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};B.forEach(["delete","get","head"],(function(e){re.headers[e]={}})),B.forEach(["post","put","patch"],(function(e){re.headers[e]=B.merge(ne)}));var oe=re;const ie=B.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"]),se=Symbol("internals");function ae(e){return e&&String(e).trim().toLowerCase()}function ce(e){return!1===e||null==e?e:B.isArray(e)?e.map(ce):String(e)}function ue(e,t,n,r,o){return B.isFunction(r)?r.call(this,t,n):(o&&(t=n),B.isString(t)?B.isString(r)?-1!==t.indexOf(r):B.isRegExp(r)?r.test(t):void 0:void 0)}class le{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ae(t);if(!o)throw new Error("header name must be a non-empty string");const i=B.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ce(e))}const i=(e,t)=>B.forEach(e,((e,n)=>o(e,n,t)));return B.isPlainObject(e)||e instanceof this.constructor?i(e,t):B.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ie[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ae(e)){const n=B.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 r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(B.isFunction(t))return t.call(this,e,n);if(B.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ae(e)){const n=B.findKey(this,e);return!(!n||void 0===this[n]||t&&!ue(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ae(e)){const o=B.findKey(n,e);!o||t&&!ue(0,n[o],o,t)||(delete n[o],r=!0)}}return B.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ue(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return B.forEach(this,((r,o)=>{const i=B.findKey(n,o);if(i)return t[i]=ce(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=ce(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&B.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")}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[se]=this[se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ae(e);t[r]||(function(e,t){const n=B.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return B.isArray(e)?e.forEach(r):r(e),this}}le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.freezeMethods(le.prototype),B.freezeMethods(le);var fe=le;function pe(e,t){const n=this||oe,r=t||n,o=fe.from(r.headers);let i=r.data;return B.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function de(e){return!(!e||!e.__CANCEL__)}function he(e,t,n){I.call(this,null==e?"canceled":e,I.ERR_CANCELED,t,n),this.name="CanceledError"}B.inherits(he,I,{__CANCEL__:!0});var ye=he,me=ee.isStandardBrowserEnv?{write:function(e,t,n,r,o,i){const s=[];s.push(e+"="+encodeURIComponent(t)),B.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),B.isString(r)&&s.push("path="+r),B.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ge(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var be=ee.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=B.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function ve(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,c=r(a);n=i;const u={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:o};u[t?"download":"upload"]=!0,e(u)}}const we={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=fe.from(e.headers).normalize(),i=e.responseType;let s;function a(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}B.isFormData(r)&&(ee.isStandardBrowserEnv||ee.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const u=ge(e.baseURL,e.url);function l(){if(!c)return;const r=fe.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new I("Request failed with status code "+n.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),Q(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new I("Request aborted",I.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new I("Network Error",I.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Y;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new I(t,r.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,e,c)),c=null},ee.isStandardBrowserEnv){const t=(e.withCredentials||be(u))&&e.xsrfCookieName&&me.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&B.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),B.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&"json"!==i&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{c&&(n(!t||t.type?new ye(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);f&&-1===ee.protocols.indexOf(f)?n(new I("Unsupported protocol "+f+":",I.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};B.forEach(we,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ye(null,e)}function Ee(e){return Oe(e),e.headers=fe.from(e.headers),e.data=pe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),(e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=B.isString(n)?we[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new I(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(B.hasOwnProp(we,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!B.isFunction(r))throw new TypeError("adapter is not a function");return r})(e.adapter||oe.adapter)(e).then((function(t){return Oe(e),t.data=pe.call(e,e.transformResponse,t),t.headers=fe.from(t.headers),t}),(function(t){return de(t)||(Oe(e),t&&t.response&&(t.response.data=pe.call(e,e.transformResponse,t.response),t.response.headers=fe.from(t.response.headers))),Promise.reject(t)}))}const Se=e=>e instanceof fe?e.toJSON():e;function xe(e,t){t=t||{};const n={};function r(e,t,n){return B.isPlainObject(e)&&B.isPlainObject(t)?B.merge.call({caseless:n},e,t):B.isPlainObject(t)?B.merge({},t):B.isArray(t)?t.slice():t}function o(e,t,n){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!B.isUndefined(t))return r(void 0,t)}function s(e,t){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(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,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)=>o(Se(e),Se(t),!0)};return B.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);B.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Ae={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ae[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const je={};Ae.transitional=function(e,t,n){function r(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new I(r(o," has been removed"+(t?" in "+t:"")),I.ERR_DEPRECATED);return t&&!je[o]&&(je[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Te={assertOptions:function(e,t,n){if("object"!=typeof e)throw new I("options must be an object",I.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new I("option "+i+" must be "+n,I.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new I("Unknown option "+i,I.ERR_BAD_OPTION)}},validators:Ae};const Re=Te.validators;class Le{constructor(e){this.defaults=e,this.interceptors={request:new Z,response:new Z}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=xe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let i;void 0!==n&&Te.assertOptions(n,{silentJSONParsing:Re.transitional(Re.boolean),forcedJSONParsing:Re.transitional(Re.boolean),clarifyTimeoutError:Re.transitional(Re.boolean)},!1),null!=r&&(B.isFunction(r)?t.paramsSerializer={serialize:r}:Te.assertOptions(r,{encode:Re.function,serialize:Re.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&B.merge(o.common,o[t.method]),i&&B.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=fe.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[Ee.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let p=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=Ee.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Q(ge((e=xe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],(function(e){Le.prototype[e]=function(t,n){return this.request(xe(n||{},{method:e,url:t,data:(n||{}).data}))}})),B.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(xe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Le.prototype[e]=t(),Le.prototype[e+"Form"]=t(!0)}));var ke=Le;class Pe{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 r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new ye(e,r,o),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)}static source(){let e;return{token:new Pe((function(t){e=t})),cancel:e}}}var Ue=Pe;const _e={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(_e).forEach((([e,t])=>{_e[t]=e}));var Ne=_e;const Ce=function t(n){const r=new ke(n),o=e(ke.prototype.request,r);return B.extend(o,ke.prototype,r,{allOwnKeys:!0}),B.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(xe(n,e))},o}(oe);Ce.Axios=ke,Ce.CanceledError=ye,Ce.CancelToken=Ue,Ce.isCancel=de,Ce.VERSION="1.4.0",Ce.toFormData=$,Ce.AxiosError=I,Ce.Cancel=Ce.CanceledError,Ce.all=function(e){return Promise.all(e)},Ce.spread=function(e){return function(t){return e.apply(null,t)}},Ce.isAxiosError=function(e){return B.isObject(e)&&!0===e.isAxiosError},Ce.mergeConfig=xe,Ce.AxiosHeaders=fe,Ce.formToJSON=e=>te(B.isHTMLForm(e)?new FormData(e):e),Ce.HttpStatusCode=Ne,Ce.default=Ce;var Be=Ce,De=n(581),Fe=n.n(De),qe=n(451),Ie=n.n(qe),Me=n(930),ze=n.n(Me),We=n(261),He=n.n(We);function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}function Ge(){Ge=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=new RegExp(e,r);return t.set(i,o||t.get(e)),Xe(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1<o.length;)i++;t[n]=e[o[i]]}return t}),Object.create(null))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var i=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var s=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(r(e,s)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},Ge.apply(this,arguments)}function Ve(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xe(e,t){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xe(e,t)}function Qe(e,t){if(e){if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ye(){}var et=function(e){return new Promise((function(t){setTimeout(t,e)}))},tt=function(e){return Math.pow(Math.SQRT2,e)},nt=Ge(/(\d+)(%)/,{value:1});function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:7,n=t;if(nt.test(e)){var r,o=null===(r=e.match(nt))||void 0===r?void 0:r.groups;if(o&&o.value){var i=parseInt(o.value)/100;n=Math.round(t*i)}}return Math.min(30,Math.max(1,n))}function ot(e,t){return t("info","Throttle request to ".concat(e,"/s")),ze()({limit:e,interval:1e3,strict:!1})}var it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n=e.defaults.logHandler,r=void 0===n?Ye:n,o=Ie()(t)?rt(t):rt("auto",t),i=ot(o,r),s=!1,a=e.interceptors.request.use((function(e){return i((function(){return e}))()}),(function(e){return Promise.reject(e)})),c=e.interceptors.response.use((function(n){if(!s&&Ie()(t)&&("auto"===t||nt.test(t))&&n.headers&&n.headers["x-contentful-ratelimit-second-limit"]){var c=parseInt(n.headers["x-contentful-ratelimit-second-limit"]),u=rt(t,c);u!==o&&(a&&e.interceptors.request.eject(a),o=u,i=ot(u,r),a=e.interceptors.request.use((function(e){return i((function(){return e}))()}),(function(e){return Promise.reject(e)}))),s=!0}return n}),(function(e){return Promise.reject(e)}));return function(){e.interceptors.request.eject(a),e.interceptors.response.eject(c)}},st=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function at(e,t){var n=Je(Je({},{insecure:!1,retryOnError:!0,logHandler:function(e,t){if("error"===e&&t){var n=[t.name,t.message].filter((function(e){return e})).join(" - ");return console.error("[error] ".concat(n)),void console.error(t)}console.log("[".concat(e,"] ").concat(t))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824}),t);if(!n.accessToken){var r=new TypeError("Expected parameter accessToken");throw n.logHandler("error",r),r}var o,i,s=n.insecure?"http":"https",a=n.space?"".concat(n.space,"/"):"",c=n.defaultHostname,u=n.insecure?80:443;if(n.host&&st.test(n.host)){var l=n.host.split(":");if(2===l.length){var f=(i=2,function(e){if(Array.isArray(e))return e}(o=l)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(o,i)||Qe(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());c=f[0],u=f[1]}else c=l[0]}n.basePath&&(n.basePath="/".concat(n.basePath.split("/").filter(Boolean).join("/")));var p=t.baseURL||"".concat(s,"://").concat(c,":").concat(u).concat(n.basePath,"/spaces/").concat(a);n.headers.Authorization||"function"==typeof n.accessToken||(n.headers.Authorization="Bearer "+n.accessToken);var d={baseURL:p,headers:n.headers,httpAgent:n.httpAgent,httpsAgent:n.httpsAgent,proxy:n.proxy,timeout:n.timeout,adapter:n.adapter,maxContentLength:n.maxContentLength,maxBodyLength:n.maxBodyLength,logHandler:n.logHandler,responseLogger:n.responseLogger,requestLogger:n.requestLogger,retryOnError:n.retryOnError},h=e.create(d);return h.httpClientParams=t,h.cloneWithNewParams=function(n){return at(e,Je(Je({},Fe()(t)),n))},n.onBeforeRequest&&h.interceptors.request.use(n.onBeforeRequest),"function"==typeof n.accessToken&&function(e,t){e.interceptors.request.use((function(e){return t().then((function(t){return e.headers.set("Authorization","Bearer ".concat(t)),e}))}))}(h,n.accessToken),n.throttle&&it(h,n.throttle),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=e.defaults,r=n.responseLogger,o=void 0===r?Ye:r,i=n.requestLogger,s=void 0===i?Ye:i;e.interceptors.request.use((function(e){return s(e),e}),(function(e){return s(e),Promise.reject(e)})),e.interceptors.response.use((function(e){return o(e),e}),(function(n){var r=n.response,i=n.config;if(o(n),!i||!e.defaults.retryOnError)return Promise.reject(n);var s=i.attempts||1;if(s>t)return n.attempts=i.attempts,Promise.reject(n);var a=null,c=tt(s);return r?r.status>=500&&r.status<600?a="Server ".concat(r.status):429===r.status&&(a="Rate limit",r.headers&&n.response.headers["x-contentful-ratelimit-reset"]&&(c=r.headers["x-contentful-ratelimit-reset"])):a="Connection",a?(c=Math.floor(1e3*c+200*Math.random()+500),e.defaults.logHandler("warning","".concat(a," error occurred. Waiting for ").concat(c," ms before retrying...")),i.attempts=s+1,delete i.httpAgent,delete i.httpsAgent,et(c).then((function(){return e(i)}))):Promise.reject(n)}))}(h,n.retryLimit),n.onError&&h.interceptors.response.use((function(e){return e}),n.onError),h}function ct(e){var t=e.query,n={};return delete t.resolveLinks,n.params=Fe()(t),n}function ut(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Qe(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}(Object.getOwnPropertyNames(e));try{for(n.s();!(t=n.n()).done;){var r=e[t.value];r&&"object"===Ke(r)&&ut(r)}}catch(e){n.e(e)}finally{n.f()}return Object.freeze(e)}function lt(){var e=window;if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(n)?"macOS":-1!==["iPhone","iPad","iPod"].indexOf(n)?"iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(n)?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function ft(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return Fe()(this)}})}function pt(e){var t,n=e.config,r=e.response;if(n&&n.headers&&n.headers.Authorization){var o="...".concat(n.headers.Authorization.toString().substr(-5));n.headers.Authorization="Bearer ".concat(o)}if(!He()(r)||!He()(n))throw e;var i,s=null==r?void 0:r.data,a={status:null==r?void 0:r.status,statusText:null==r?void 0:r.statusText,message:"",details:{}};n&&He()(n)&&(a.request={url:n.url,headers:n.headers,method:n.method,payloadData:n.data}),s&&"object"===Ke(s)&&("requestId"in s&&(a.requestId=s.requestId||"UNKNOWN"),"message"in s&&(a.message=s.message||""),"details"in s&&(a.details=s.details||{}),t=null===(i=s.sys)||void 0===i?void 0:i.id);var c=new Error;c.name=t&&"Unknown"!==t?t:"".concat(null==r?void 0:r.status," ").concat(null==r?void 0:r.statusText);try{c.message=JSON.stringify(a,null," ")}catch(e){var u;c.message=null!==(u=null==a?void 0:a.message)&&void 0!==u?u:""}throw c}function dt(e){return function(t){return Object.assign({},e,t)}}var ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function yt(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var mt={},gt=function(e,t){var n=t.entryId,r=t.linkType,o=t.spaceId;return o?e.get(o+"!"+r+"!"+n):e.get(r+"!"+n)},bt=function e(t,n,r,o){if(n(t))return r(t);if(t&&"object"===(void 0===t?"undefined":ht(t))){for(var i in t)t.hasOwnProperty(i)&&(t[i]=e(t[i],n,r,o));o&&(t=function(e){if(Array.isArray(e))return e.filter((function(e){return e!==mt}));for(var t in e)e[t]===mt&&delete e[t];return e}(t))}return t},vt=function(e,t,n){var r=function(e,t){var n=t.sys,r=n.type,o=n.linkType;if("ResourceLink"===r){var i=t.sys.urn,s=/.*:spaces\/([A-Za-z0-9]*)\/entries\/([A-Za-z0-9]*)/;if(!s.test(i))return mt;var a=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(i.match(s),3),c=(a[0],a[1]),u=a[2],l=o.split(":")[1];return gt(e,{linkType:l,entryId:u,spaceId:c})||mt}var f=t.sys.id;return gt(e,{linkType:o,entryId:f})||mt}(e,t);return r===mt?n?r:t:r},wt=function(e,t){if(t=t||{},!e.items)return[];var n=Fe()(e),r=Object.keys(n.includes||{}).reduce((function(t,n){return[].concat(yt(t),yt(e.includes[n]))}),[]),o=[].concat(yt(n.items),yt(r)).filter((function(e){return Boolean(e.sys)})),i=new Map(o.reduce((function(e,t){var n,r=(n=t.sys,n.space?[n.type+"!"+n.id,n.space.sys.id+"!"+n.type+"!"+n.id]:[n.type+"!"+n.id]).map((function(e){return[e,t]}));return e.push.apply(e,yt(r)),e}),[]));return o.forEach((function(e){var n=function(e,t){return Array.isArray(t)?Object.keys(e).filter((function(e){return-1!==t.indexOf(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):e}(e,t.itemEntryPoints);Object.assign(e,bt(n,(function(e){return(t=e)&&t.sys&&"Link"===t.sys.type||function(e){return e&&e.sys&&"ResourceLink"===e.sys.type}(e);var t}),(function(e){return vt(i,e,t.removeUnresolved)}),t.removeUnresolved))})),n.items},Ot=n(784),Et=n.n(Ot);function St(e){return Object.defineProperty(e,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(e=null,t=""){return Et()(this,e,t,((e,t)=>({sys:{type:"Link",linkType:"Entry",id:t.sys.id,circular:!0}})))}})}async function xt(e,t,n){if(!t||!t.initial&&!t.nextSyncToken&&!t.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(t.content_type&&!t.type)t.type="Entry";else if(t.content_type&&t.type&&"Entry"!==t.type)throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const{withoutLinkResolution:r,withoutUnresolvableLinks:o,paginate:i}={withoutLinkResolution:!1,withoutUnresolvableLinks:!1,paginate:!0,...n},s=await At(e,[],t,{paginate:i});r||(s.items=wt(s,{removeUnresolved:o,itemEntryPoints:["fields"]}));const a=function(e){const t=e=>(t,n)=>(n.sys.type===e&&t.push(ft(n)),t);return{entries:e.reduce(t("Entry"),[]),assets:e.reduce(t("Asset"),[]),deletedEntries:e.reduce(t("DeletedEntry"),[]),deletedAssets:e.reduce(t("DeletedAsset"),[])}}(s.items);return s.nextSyncToken&&(a.nextSyncToken=s.nextSyncToken),s.nextPageToken&&(a.nextPageToken=s.nextPageToken),ut((c=St(ft(a))).sys||{}),c;var c}async function At(e,t,n,{paginate:r}){const o=(i=n).nextPageToken?{sync_token:i.nextPageToken}:i.nextSyncToken?{sync_token:i.nextSyncToken}:i.sync_token?{sync_token:i.sync_token}:i;var i;const s=(await e.get("sync",ct({query:o}))).data||{};return t=t.concat(s.items||[]),s.nextPageUrl?r?(delete o.initial,o.sync_token=jt(s.nextPageUrl),At(e,t,o,{paginate:r})):{items:t,nextPageToken:jt(s.nextPageUrl)}:s.nextSyncUrl?{items:t,nextSyncToken:jt(s.nextSyncUrl)}:{items:[]}}function jt(e){const t=e.split("?");return t.length>0?t[1].replace("sync_token=",""):""}function Tt(e){const t={};let n=!1;for(const r in e)Array.isArray(e[r])&&(t[r]=e[r].join(","),n=!0);return n?{...e,...t}:e}function Rt(e){if(!e.select)return e;const t=Array.isArray(e.select)?e.select:e.select.split(",").map((e=>e.trim())),n=new Set(t);return n.has("sys")?e:(n.add("sys.id"),n.add("sys.type"),{...e,select:[...n].join(",")})}function Lt(e,{resolveLinks:t,removeUnresolved:n}){const r=St(e);return t&&(r.items=wt(r,{removeUnresolved:n,itemEntryPoints:["fields"]})),r}class kt extends Error{constructor(e,t){super(`Invalid "${e}" provided, `+t),this.name="ValidationError"}}function Pt(e,t){t?function(e){if(e.locale)throw new kt("locale","The `locale` parameter is not allowed")}(e):function(e){if("*"===e.locale)throw new kt("locale","The use of locale='*' is no longer supported.To fetch an entry in all existing locales, \n use client.withAllLocales instead of the locale='*' parameter.")}(e)}function Ut(e){if("resolveLinks"in e)throw new kt("resolveLinks","The use of the 'resolveLinks' parameter is no longer supported. By default, links are resolved. \n If you do not want to resolve links, use client.withoutLinkResolution.")}function _t(e){if("removeUnresolved"in e)throw new kt("removeUnresolved","The use of the 'removeUnresolved' parameter is no longer supported. By default, unresolved links are kept as link objects.\n If you do not want to include unresolved links, use client.withoutUnresolvableLinks.")}function Nt(e){for(const t in e){const n=e[t];if("object"==typeof n&&null!==n&&!Array.isArray(n))throw new Error(`Objects are not supported as value for the "${t}" query parameter.`)}}class Ct extends Error{sys;details;constructor(e,t,n){super("The resource could not be found."),this.sys={type:"Error",id:"NotFound"},this.details={type:"Entry",id:e,environment:t,space:n}}}function Bt({http:e,getGlobalOptions:t},n){const r=(e="unknown")=>new Ct(e,t().environment,t().space),o=e=>{let n="space"===e?t().spaceBaseUrl:t().environmentBaseUrl;if(!n)throw new Error("Please define baseUrl for "+e);return n.endsWith("/")||(n+="/"),n};async function i({context:t,path:n,config:r}){const i=o(t);try{return(await e.get(i+n,r)).data}catch(e){pt(e)}}async function s(e,t){const{withoutLinkResolution:n,withoutUnresolvableLinks:r}=t;try{return Lt(await i({context:"environment",path:"entries",config:ct({query:Tt(Rt(e))})}),{resolveLinks:!n??!0,removeUnresolved:r??!1})}catch(e){pt(e)}}return{version:"10.4.0",getSpace:async function(){return i({context:"space",path:""})},getContentType:async function(e){return i({context:"environment",path:`content_types/${e}`})},getContentTypes:async function(e={}){return i({context:"environment",path:"content_types",config:ct({query:e})})},getAsset:async function(e,t={}){return async function(e,t,n={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:r}=n;Pt(t,r),Nt(t);return async function(e,t){try{return i({context:"environment",path:`assets/${e}`,config:ct({query:Rt(t)})})}catch(e){pt(e)}}(e,r?{...t,locale:"*"}:t)}(e,t,n)},getAssets:async function(e={}){return async function(e,t={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:n}=t;Pt(e,n),Nt(e);return async function(e){try{return i({context:"environment",path:"assets",config:ct({query:Tt(Rt(e))})})}catch(e){pt(e)}}(n?{...e,locale:"*"}:e)}(e,n)},getTag:async function(e){return i({context:"environment",path:`tags/${e}`})},getTags:async function(e={}){return Nt(e),i({context:"environment",path:"tags",config:ct({query:Tt(Rt(e))})})},getLocales:async function(e={}){return Nt(e),i({context:"environment",path:"locales",config:ct({query:Rt(e)})})},parseEntries:function(e){return function(e,t={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){return function(e,t){const{withoutLinkResolution:n,withoutUnresolvableLinks:r}=t;return Lt(e,{resolveLinks:!n??!0,removeUnresolved:r??!1})}(e,t)}(e,n)},sync:async function(r,o={paginate:!0}){return async function(n,r,o={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){Ut(n),_t(n);const i={...r,...o};return function(e){e.defaults.baseURL=t().environmentBaseUrl}(e),xt(e,n,i)}(r,o,n)},getEntry:async function(e,t={}){return async function(e,t,n={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:o}=n;return Pt(t,o),Ut(t),_t(t),Nt(t),async function(e,t,n){if(!e)throw r(e);try{const o=await s({"sys.id":e,...t},n);if(o.items.length>0)return o.items[0];throw r(e)}catch(e){pt(e)}}(e,o?{...t,locale:"*"}:t,n)}(e,t,n)},getEntries:async function(e={}){return async function(e,t={withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!1}){const{withAllLocales:n}=t;return Pt(e,n),Ut(e),_t(e),Nt(e),s(n?{...e,locale:"*"}:e,t)}(e,n)},createAssetKey:async function(t){try{const e=Math.floor(Date.now()/1e3);!function(e,t,n){if(n=n||{},"number"!=typeof t)throw new kt(e,`only numeric values are allowed for timestamps, provided type was "${typeof t}"`);if(n.maximum&&t>n.maximum)throw new kt(e,`value (${t}) cannot be further in the future than expected maximum (${n.maximum})`);if(n.now&&t<n.now)throw new kt(e,`value (${t}) cannot be in the past, current time was ${n.now}`)}("expiresAt",t,{maximum:e+172800,now:e})}catch(e){pt(e)}return async function({context:t,path:n,data:r,config:i}){const s=o(t);try{return(await e.post(s+n,r,i)).data}catch(e){pt(e)}}({context:"environment",path:"asset_keys",data:{expiresAt:t}})}}}const Dt=({http:e,getGlobalOptions:t})=>{function n(r){return function({http:e,getGlobalOptions:t},n,r){const o=Bt({http:e,getGlobalOptions:t},n);return Object.defineProperty(o,"withAllLocales",{get:()=>r({...n,withAllLocales:!0})}),Object.defineProperty(o,"withoutLinkResolution",{get:()=>r({...n,withoutLinkResolution:!0})}),Object.defineProperty(o,"withoutUnresolvableLinks",{get:()=>r({...n,withoutUnresolvableLinks:!0})}),Object.create(o)}({http:e,getGlobalOptions:t},r,n)}return{...Bt({http:e,getGlobalOptions:t},{withoutLinkResolution:!1,withAllLocales:!1,withoutUnresolvableLinks:!1}),get withAllLocales(){return n({withAllLocales:!0,withoutLinkResolution:!1,withoutUnresolvableLinks:!1})},get withoutLinkResolution(){return n({withAllLocales:!1,withoutLinkResolution:!0,withoutUnresolvableLinks:!1})},get withoutUnresolvableLinks(){return n({withAllLocales:!1,withoutLinkResolution:!1,withoutUnresolvableLinks:!0})}}};function Ft(e){if(!e.accessToken)throw new TypeError("Expected parameter accessToken");if(!e.space)throw new TypeError("Expected parameter space");Ut(e),_t(e);const t={resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master",...e},n=function(e,t,n,r){var o=[];t&&o.push("app ".concat(t)),n&&o.push("integration ".concat(n)),r&&o.push("feature "+r),o.push("sdk ".concat(e));var i=null;try{"undefined"!=typeof window&&"navigator"in window&&"product"in window.navigator&&"ReactNative"===window.navigator.product?(i=lt(),o.push("platform ReactNative")):"undefined"==typeof process||process.browser?(i=lt(),o.push("platform browser")):(i=function(){var e=process.platform||"linux",t=process.version||"0.0.0",n={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in n?"".concat(n[e]||"Linux","/").concat(t):null}(),o.push("platform node.js/".concat(process.versions&&process.versions.node?"v".concat(process.versions.node):process.version)))}catch(e){i=null}return i&&o.push("os ".concat(i)),"".concat(o.filter((function(e){return""!==e})).join("; "),";")}("contentful.js/10.4.0",t.application,t.integration);t.headers={...t.headers,"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":n};const r=at(Be,t);if(!r.defaults.baseURL)throw new Error("Please define a baseURL");const o=dt({space:t.space,environment:t.environment,spaceBaseUrl:r.defaults.baseURL,environmentBaseUrl:`${r.defaults.baseURL}environments/${t.environment}`});return r.defaults.baseURL=o({}).environmentBaseUrl,Dt({http:r,getGlobalOptions:o})}}(),r}()}));