Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tryghost/content-api

Package Overview
Dependencies
Maintainers
27
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryghost/content-api - npm Package Compare versions

Comparing version 1.11.4 to 1.11.5

22

cjs/content-api.js

@@ -6,3 +6,3 @@ 'use strict';

var name$1 = "@tryghost/content-api";
var version = "1.11.4";
var version = "1.11.5";
var repository = "https://github.com/TryGhost/SDK/tree/master/packages/content-api";

@@ -36,19 +36,19 @@ var author = "Ghost Foundation";

var devDependencies = {
"@babel/core": "7.19.1",
"@babel/core": "7.20.5",
"@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.19.1",
"@rollup/plugin-json": "4.1.0",
"@babel/preset-env": "7.20.2",
"@rollup/plugin-json": "5.0.2",
c8: "7.12.0",
"core-js": "3.25.2",
"eslint-plugin-ghost": "2.15.1",
mocha: "10.0.0",
rollup: "2.79.0",
"core-js": "3.26.1",
"eslint-plugin-ghost": "2.16.0",
mocha: "10.1.0",
rollup: "2.79.1",
"rollup-plugin-babel": "4.4.0",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-node-resolve": "5.2.0",
"rollup-plugin-polyfill-node": "0.10.2",
"rollup-plugin-polyfill-node": "0.11.0",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-terser": "7.0.2",
should: "13.2.3",
sinon: "14.0.0"
sinon: "15.0.0"
};

@@ -58,3 +58,3 @@ var dependencies = {

};
var gitHead = "c4bc4d5ee2c7fea2eb9fc8de6cb8fd479ea039e3";
var gitHead = "bc7ef4154981d09195c25acd6eda0531b1cffa32";
var packageInfo = {

@@ -61,0 +61,0 @@ name: name$1,

{
"name": "@tryghost/content-api",
"version": "1.11.4",
"version": "1.11.5",
"repository": "https://github.com/TryGhost/SDK/tree/master/packages/content-api",

@@ -33,19 +33,19 @@ "author": "Ghost Foundation",

"devDependencies": {
"@babel/core": "7.19.1",
"@babel/core": "7.20.5",
"@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.19.1",
"@rollup/plugin-json": "4.1.0",
"@babel/preset-env": "7.20.2",
"@rollup/plugin-json": "5.0.2",
"c8": "7.12.0",
"core-js": "3.25.2",
"eslint-plugin-ghost": "2.15.1",
"mocha": "10.0.0",
"rollup": "2.79.0",
"core-js": "3.26.1",
"eslint-plugin-ghost": "2.16.0",
"mocha": "10.1.0",
"rollup": "2.79.1",
"rollup-plugin-babel": "4.4.0",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-node-resolve": "5.2.0",
"rollup-plugin-polyfill-node": "0.10.2",
"rollup-plugin-polyfill-node": "0.11.0",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-terser": "7.0.2",
"should": "13.2.3",
"sinon": "14.0.0"
"sinon": "15.0.0"
},

@@ -55,3 +55,3 @@ "dependencies": {

},
"gitHead": "c4bc4d5ee2c7fea2eb9fc8de6cb8fd479ea039e3"
"gitHead": "bc7ef4154981d09195c25acd6eda0531b1cffa32"
}

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).GhostContentAPI=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r,n,o=function(e){return e&&e.Math==Math&&e},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a=function(e){try{return!!e()}catch(e){return!0}},s=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!a((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),c=Function.prototype.call,f=u?c.bind(c):function(){return c.apply(c,arguments)},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p={f:h&&!l.call({1:2},1)?function(e){var t=h(this,e);return!!t&&t.enumerable}:l},d=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},m=Function.prototype,v=m.bind,g=m.call,y=u&&v.bind(g,g),b=u?function(e){return e&&y(e)}:function(e){return e&&function(){return g.apply(e,arguments)}},w=b({}.toString),O=b("".slice),E=Object,j=b("".split),R=a((function(){return!E("z").propertyIsEnumerable(0)}))?function(e){return"String"==function(e){return O(w(e),8,-1)}(e)?j(e,""):E(e)}:E,S=function(e){return null==e},A=TypeError,C=function(e){if(S(e))throw A("Can't call method on "+e);return e},P=function(e){return R(C(e))},T="object"==typeof document&&document.all,x={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},_=x.all,U=x.IS_HTMLDDA?function(e){return"function"==typeof e||e===_}:function(e){return"function"==typeof e},N=x.all,D=x.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:U(e)||e===N}:function(e){return"object"==typeof e?null!==e:U(e)},I=function(e){return U(e)?e:void 0},k=function(e,t){return arguments.length<2?I(i[e]):i[e]&&i[e][t]},L=b({}.isPrototypeOf),q=k("navigator","userAgent")||"",B=i.process,$=i.Deno,F=B&&B.versions||$&&$.version,M=F&&F.v8;M&&(n=(r=M.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&q&&(!(r=q.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=q.match(/Chrome\/(\d+)/))&&(n=+r[1]);var z=n,W=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&z&&z<41})),H=W&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,J=Object,V=H?function(e){return"symbol"==typeof e}:function(e){var t=k("Symbol");return U(t)&&L(t.prototype,J(e))},K=String,G=TypeError,X=function(e){if(U(e))return e;throw G(function(e){try{return K(e)}catch(e){return"Object"}}(e)+" is not a function")},Q=TypeError,Y=Object.defineProperty,Z=function(e,t){try{Y(i,e,{value:t,configurable:!0,writable:!0})}catch(r){i[e]=t}return t},ee="__core-js_shared__",te=i[ee]||Z(ee,{}),re=t((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.25.2",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.2/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=Object,oe=b({}.hasOwnProperty),ie=Object.hasOwn||function(e,t){return oe(ne(C(e)),t)},ae=0,se=Math.random(),ue=b(1..toString),ce=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ue(++ae+se,36)},fe=re("wks"),le=i.Symbol,he=le&&le.for,pe=H?le:le&&le.withoutSetter||ce,de=function(e){if(!ie(fe,e)||!W&&"string"!=typeof fe[e]){var t="Symbol."+e;W&&ie(le,e)?fe[e]=le[e]:fe[e]=H&&he?he(t):pe(t)}return fe[e]},me=TypeError,ve=de("toPrimitive"),ge=function(e,t){if(!D(e)||V(e))return e;var r,n,o=(r=e[ve],S(r)?void 0:X(r));if(o){if(void 0===t&&(t="default"),n=f(o,e,t),!D(n)||V(n))return n;throw me("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&U(r=e.toString)&&!D(n=f(r,e)))return n;if(U(r=e.valueOf)&&!D(n=f(r,e)))return n;if("string"!==t&&U(r=e.toString)&&!D(n=f(r,e)))return n;throw Q("Can't convert object to primitive value")}(e,t)},ye=function(e){var t=ge(e,"string");return V(t)?t:t+""},be=i.document,we=D(be)&&D(be.createElement),Oe=function(e){return we?be.createElement(e):{}},Ee=!s&&!a((function(){return 7!=Object.defineProperty(Oe("div"),"a",{get:function(){return 7}}).a})),je=Object.getOwnPropertyDescriptor,Re={f:s?je:function(e,t){if(e=P(e),t=ye(t),Ee)try{return je(e,t)}catch(e){}if(ie(e,t))return d(!f(p.f,e,t),e[t])}},Se=s&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ae=String,Ce=TypeError,Pe=function(e){if(D(e))return e;throw Ce(Ae(e)+" is not an object")},Te=TypeError,xe=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,Ue="enumerable",Ne="configurable",De="writable",Ie={f:s?Se?function(e,t,r){if(Pe(e),t=ye(t),Pe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&De in r&&!r.writable){var n=_e(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:Ne in r?r.configurable:n.configurable,enumerable:Ue in r?r.enumerable:n.enumerable,writable:!1})}return xe(e,t,r)}:xe:function(e,t,r){if(Pe(e),t=ye(t),Pe(r),Ee)try{return xe(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Te("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},ke=s?function(e,t,r){return Ie.f(e,t,d(1,r))}:function(e,t,r){return e[t]=r,e},Le=Function.prototype,qe=s&&Object.getOwnPropertyDescriptor,Be=ie(Le,"name"),$e={EXISTS:Be,PROPER:Be&&"something"===function(){}.name,CONFIGURABLE:Be&&(!s||s&&qe(Le,"name").configurable)},Fe=b(Function.toString);U(te.inspectSource)||(te.inspectSource=function(e){return Fe(e)});var Me,ze,We,He=te.inspectSource,Je=i.WeakMap,Ve=U(Je)&&/native code/.test(String(Je)),Ke=re("keys"),Ge=function(e){return Ke[e]||(Ke[e]=ce(e))},Xe={},Qe="Object already initialized",Ye=i.TypeError,Ze=i.WeakMap;if(Ve||te.state){var et=te.state||(te.state=new Ze),tt=b(et.get),rt=b(et.has),nt=b(et.set);Me=function(e,t){if(rt(et,e))throw Ye(Qe);return t.facade=e,nt(et,e,t),t},ze=function(e){return tt(et,e)||{}},We=function(e){return rt(et,e)}}else{var ot=Ge("state");Xe[ot]=!0,Me=function(e,t){if(ie(e,ot))throw Ye(Qe);return t.facade=e,ke(e,ot,t),t},ze=function(e){return ie(e,ot)?e[ot]:{}},We=function(e){return ie(e,ot)}}var it,at={set:Me,get:ze,has:We,enforce:function(e){return We(e)?ze(e):Me(e,{})},getterFor:function(e){return function(t){var r;if(!D(t)||(r=ze(t)).type!==e)throw Ye("Incompatible receiver, "+e+" required");return r}}},st=t((function(e){var t=$e.CONFIGURABLE,r=at.enforce,n=at.get,o=Object.defineProperty,i=s&&!a((function(){return 8!==o((function(){}),"length",{value:8}).length})),u=String(String).split("String"),c=e.exports=function(e,n,a){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!ie(e,"name")||t&&e.name!==n)&&(s?o(e,"name",{value:n,configurable:!0}):e.name=n),i&&a&&ie(a,"arity")&&e.length!==a.arity&&o(e,"length",{value:a.arity});try{a&&ie(a,"constructor")&&a.constructor?s&&o(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ie(c,"source")||(c.source=u.join("string"==typeof n?n:"")),e};Function.prototype.toString=c((function(){return U(this)&&n(this).source||He(this)}),"toString")})),ut=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(U(r)&&st(r,i,n),n.global)o?e[t]=r:Z(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Ie.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},ct=Math.ceil,ft=Math.floor,lt=Math.trunc||function(e){var t=+e;return(t>0?ft:ct)(t)},ht=function(e){var t=+e;return t!=t||0===t?0:lt(t)},pt=Math.max,dt=Math.min,mt=Math.min,vt=function(e){return(t=e.length)>0?mt(ht(t),9007199254740991):0;var t},gt=function(e){return function(t,r,n){var o,i=P(t),a=vt(i),s=function(e,t){var r=ht(e);return r<0?pt(r+t,0):dt(r,t)}(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},yt={includes:gt(!0),indexOf:gt(!1)},bt=yt.indexOf,wt=b([].push),Ot=function(e,t){var r,n=P(e),o=0,i=[];for(r in n)!ie(Xe,r)&&ie(n,r)&&wt(i,r);for(;t.length>o;)ie(n,r=t[o++])&&(~bt(i,r)||wt(i,r));return i},Et=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jt=Et.concat("length","prototype"),Rt={f:Object.getOwnPropertyNames||function(e){return Ot(e,jt)}},St={f:Object.getOwnPropertySymbols},At=b([].concat),Ct=k("Reflect","ownKeys")||function(e){var t=Rt.f(Pe(e)),r=St.f;return r?At(t,r(e)):t},Pt=function(e,t,r){for(var n=Ct(t),o=Ie.f,i=Re.f,a=0;a<n.length;a++){var s=n[a];ie(e,s)||r&&ie(r,s)||o(e,s,i(t,s))}},Tt=/#|\.prototype\./,xt=function(e,t){var r=Ut[_t(e)];return r==Dt||r!=Nt&&(U(t)?a(t):!!t)},_t=xt.normalize=function(e){return String(e).replace(Tt,".").toLowerCase()},Ut=xt.data={},Nt=xt.NATIVE="N",Dt=xt.POLYFILL="P",It=xt,kt=Re.f,Lt=Object.keys||function(e){return Ot(e,Et)},qt=s&&!Se?Object.defineProperties:function(e,t){Pe(e);for(var r,n=P(t),o=Lt(t),i=o.length,a=0;i>a;)Ie.f(e,r=o[a++],n[r]);return e},Bt={f:qt},$t=k("document","documentElement"),Ft=Ge("IE_PROTO"),Mt=function(){},zt=function(e){return"<script>"+e+"</"+"script>"},Wt=function(e){e.write(zt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ht=function(){try{it=new ActiveXObject("htmlfile")}catch(e){}var e,t;Ht="undefined"!=typeof document?document.domain&&it?Wt(it):((t=Oe("iframe")).style.display="none",$t.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(zt("document.F=Object")),e.close(),e.F):Wt(it);for(var r=Et.length;r--;)delete Ht.prototype[Et[r]];return Ht()};Xe[Ft]=!0;var Jt=Object.create||function(e,t){var r;return null!==e?(Mt.prototype=Pe(e),r=new Mt,Mt.prototype=null,r[Ft]=e):r=Ht(),void 0===t?r:Bt.f(r,t)},Vt=Ie.f,Kt=de("unscopables"),Gt=Array.prototype;null==Gt[Kt]&&Vt(Gt,Kt,{configurable:!0,value:Jt(null)});var Xt,Qt=yt.includes;!function(e,t){var r,n,o,a,s,u=e.target,c=e.global,f=e.stat;if(r=c?i:f?i[u]||Z(u,{}):(i[u]||{}).prototype)for(n in t){if(a=t[n],o=e.dontCallGetSet?(s=kt(r,n))&&s.value:r[n],!It(c?n:u+(f?".":"#")+n,e.forced)&&void 0!==o){if(typeof a==typeof o)continue;Pt(a,o)}(e.sham||o&&o.sham)&&ke(a,"sham",!0),ut(r,n,a,e)}}({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(e){return Qt(this,e,arguments.length>1?arguments[1]:void 0)}}),Xt="includes",Gt[Kt][Xt]=!0;var Yt,Zt=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},er=Object.prototype.toString,tr=(Yt=Object.create(null),function(e){var t=er.call(e);return Yt[t]||(Yt[t]=t.slice(8,-1).toLowerCase())});function rr(e){return e=e.toLowerCase(),function(t){return tr(t)===e}}function nr(e){return Array.isArray(e)}function or(e){return void 0===e}var ir=rr("ArrayBuffer");function ar(e){return null!==e&&"object"==typeof e}function sr(e){if("object"!==tr(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var ur=rr("Date"),cr=rr("File"),fr=rr("Blob"),lr=rr("FileList");function hr(e){return"[object Function]"===er.call(e)}var pr=rr("URLSearchParams");function dr(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),nr(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var mr,vr=(mr="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return mr&&e instanceof mr}),gr={supportedProtocols:["http:","https:","file:"],getProtocol:function(e){return e||"http:"},isArray:nr,isArrayBuffer:ir,isBuffer:function(e){return null!==e&&!or(e)&&null!==e.constructor&&!or(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||er.call(e)===t||hr(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ir(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:ar,isPlainObject:sr,isUndefined:or,isDate:ur,isFile:cr,isBlob:fr,isFunction:hr,isStream:function(e){return ar(e)&&hr(e.pipe)},isURLSearchParams:pr,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:dr,merge:function e(){var t={};function r(r,n){sr(t[n])&&sr(r)?t[n]=e(t[n],r):sr(r)?t[n]=e({},r):nr(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)dr(arguments[n],r);return t},extend:function(e,t,r){return dr(t,(function(t,n){e[n]=r&&"function"==typeof t?Zt(t,r):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},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var n,o,i,a={};t=t||{};do{for(o=(n=Object.getOwnPropertyNames(e)).length;o-- >0;)a[i=n[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:tr,kindOfTest:rr,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(or(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:vr,isFileList:lr};function yr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var br=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(gr.isURLSearchParams(t))n=t.toString();else{var o=[];gr.forEach(t,(function(e,t){null!=e&&(gr.isArray(e)?t+="[]":e=[e],gr.forEach(e,(function(e){gr.isDate(e)?e=e.toISOString():gr.isObject(e)&&(e=JSON.stringify(e)),o.push(yr(t)+"="+yr(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e};function wr(){this.handlers=[]}wr.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},wr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},wr.prototype.forEach=function(e){gr.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var Or=wr,Er=function(e,t){gr.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))};function jr(e,t,r,n,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}gr.inherits(jr,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Rr=jr.prototype,Sr={};["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"].forEach((function(e){Sr[e]={value:e}})),Object.defineProperties(jr,Sr),Object.defineProperty(Rr,"isAxiosError",{value:!0}),jr.from=function(e,t,r,n,o,i){var a=Object.create(Rr);return gr.toFlatObject(e,a,(function(e){return e!==Error.prototype})),jr.call(a,e.message,t,r,n,o),a.name=e.name,i&&Object.assign(a,i),a};var Ar=jr,Cr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Pr=function(e,t){t=t||new FormData;var r=[];function n(e){return null===e?"":gr.isDate(e)?e.toISOString():gr.isArrayBuffer(e)||gr.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,i){if(gr.isPlainObject(o)||gr.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+i);r.push(o),gr.forEach(o,(function(r,o){if(!gr.isUndefined(r)){var a,s=i?i+"."+o:o;if(r&&!i&&"object"==typeof r)if(gr.endsWith(o,"{}"))r=JSON.stringify(r);else if(gr.endsWith(o,"[]")&&(a=gr.toArray(r)))return void a.forEach((function(e){!gr.isUndefined(e)&&t.append(s,n(e))}));e(r,s)}})),r.pop()}else t.append(i,n(o))}(e),t},Tr=gr.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),gr.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),gr.isString(n)&&a.push("path="+n),gr.isString(o)&&a.push("domain="+o),!0===i&&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(){}},xr=function(e,t){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},_r=["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"],Ur=gr.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=gr.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},Nr=2147483647,Dr=/[^\x20-\x7E]/,Ir=/[\x2E\u3002\uFF0E\uFF61]/g,kr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Lr=Math.floor,qr=String.fromCharCode;function Br(e){throw new RangeError(kr[e])}function $r(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function Fr(e,t,r){var n=0;for(e=r?Lr(e/700):e>>1,e+=Lr(e/t);e>455;n+=36)e=Lr(e/35);return Lr(n+36*e/(e+38))}function Mr(e){return function(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var o=function(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}((e=e.replace(Ir,".")).split("."),t).join(".");return n+o}(e,(function(e){return Dr.test(e)?"xn--"+function(e){var t,r,n,o,i,a,s,u,c,f,l,h,p,d,m,v=[];for(e=function(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}(e),h=e.length,t=128,r=0,i=72,a=0;a<h;++a)(l=e[a])<128&&v.push(qr(l));for(n=o=v.length,o&&v.push("-");n<h;){for(s=Nr,a=0;a<h;++a)(l=e[a])>=t&&l<s&&(s=l);for(s-t>Lr((Nr-r)/(p=n+1))&&Br("overflow"),r+=(s-t)*p,t=s,a=0;a<h;++a)if((l=e[a])<t&&++r>Nr&&Br("overflow"),l==t){for(u=r,c=36;!(u<(f=c<=i?1:c>=i+26?26:c-i));c+=36)m=u-f,d=36-f,v.push(qr($r(f+m%d,0))),u=Lr(m/d);v.push(qr($r(u,0))),i=Fr(r,p,n==o),r=0,++n}++r,++t}return v.join("")}(e):e}))}function zr(e){return null===e}function Wr(e){return"string"==typeof e}function Hr(e){return"object"==typeof e&&null!==e}function Jr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Vr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function Kr(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function Gr(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var Xr=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t};function Qr(e,t,r,n){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(t);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var c,f,l,h,p=e[u].replace(i,"%20"),d=p.indexOf(r);d>=0?(c=p.substr(0,d),f=p.substr(d+1)):(c=p,f=""),l=decodeURIComponent(c),h=decodeURIComponent(f),Jr(o,l)?Vr(o[l])?o[l].push(h):o[l]=[o[l],h]:o[l]=h}return o}var Yr={parse:pn,resolve:function(e,t){return pn(e,!1,!0).resolve(t)},resolveObject:function(e,t){return e?pn(e,!1,!0).resolveObject(t):t},fileURLToPath:function(e){if("string"==typeof e)e=(new Zr).parse(e);else if(!(e instanceof Zr))throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof e+String(e));if("file:"!==e.protocol)throw new TypeError("The URL must be of scheme file");return function(e){const t=e.pathname;for(let e=0;e<t.length;e++)if("%"===t[e]){const r=32|t.codePointAt(e+2);if("2"===t[e+1]&&102===r)throw new TypeError("must not include encoded / characters")}return decodeURIComponent(t)}(e)},format:function(e){Wr(e)&&(e=dn({},e));return mn(e)},Url:Zr};function Zr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var en=/^([a-z0-9.+-]+:)/i,tn=/:[0-9]*$/,rn=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,nn=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),on=["'"].concat(nn),an=["%","/","?",";","#"].concat(on),sn=["/","?","#"],un=/^[+a-z0-9A-Z_-]{0,63}$/,cn=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,fn={javascript:!0,"javascript:":!0},ln={javascript:!0,"javascript:":!0},hn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function pn(e,t,r){if(e&&Hr(e)&&e instanceof Zr)return e;var n=new Zr;return n.parse(e,t,r),n}function dn(e,t,r,n){if(!Wr(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),i=-1!==o&&o<t.indexOf("#")?"?":"#",a=t.split(i);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(i);if(s=s.trim(),!n&&1===t.split("#").length){var u=rn.exec(s);if(u)return e.path=s,e.href=s,e.pathname=u[1],u[2]?(e.search=u[2],e.query=r?Qr(e.search.substr(1)):e.search.substr(1)):r&&(e.search="",e.query={}),e}var c,f,l,h,p=en.exec(s);if(p){var d=(p=p[0]).toLowerCase();e.protocol=d,s=s.substr(p.length)}if(n||p||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var m="//"===s.substr(0,2);!m||p&&ln[p]||(s=s.substr(2),e.slashes=!0)}if(!ln[p]&&(m||p&&!hn[p])){var v,g,y=-1;for(c=0;c<sn.length;c++)-1!==(f=s.indexOf(sn[c]))&&(-1===y||f<y)&&(y=f);for(-1!==(g=-1===y?s.lastIndexOf("@"):s.lastIndexOf("@",y))&&(v=s.slice(0,g),s=s.slice(g+1),e.auth=decodeURIComponent(v)),y=-1,c=0;c<an.length;c++)-1!==(f=s.indexOf(an[c]))&&(-1===y||f<y)&&(y=f);-1===y&&(y=s.length),e.host=s.slice(0,y),s=s.slice(y),vn(e),e.hostname=e.hostname||"";var b="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!b){var w=e.hostname.split(/\./);for(c=0,l=w.length;c<l;c++){var O=w[c];if(O&&!O.match(un)){for(var E="",j=0,R=O.length;j<R;j++)O.charCodeAt(j)>127?E+="x":E+=O[j];if(!E.match(un)){var S=w.slice(0,c),A=w.slice(c+1),C=O.match(cn);C&&(S.push(C[1]),A.unshift(C[2])),A.length&&(s="/"+A.join(".")+s),e.hostname=S.join(".");break}}}}e.hostname.length>255?e.hostname="":e.hostname=e.hostname.toLowerCase(),b||(e.hostname=Mr(e.hostname)),h=e.port?":"+e.port:"";var P=e.hostname||"";e.host=P+h,e.href+=e.host,b&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!fn[d])for(c=0,l=on.length;c<l;c++){var T=on[c];if(-1!==s.indexOf(T)){var x=encodeURIComponent(T);x===T&&(x=escape(T)),s=s.split(T).join(x)}}var _=s.indexOf("#");-1!==_&&(e.hash=s.substr(_),s=s.slice(0,_));var U=s.indexOf("?");if(-1!==U?(e.search=s.substr(U),e.query=s.substr(U+1),r&&(e.query=Qr(e.query)),s=s.slice(0,U)):r&&(e.search="",e.query={}),s&&(e.pathname=s),hn[d]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){h=e.pathname||"";var N=e.search||"";e.path=h+N}return e.href=mn(e),e}function mn(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var r=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=!1,a="";e.host?i=t+e.host:e.hostname&&(i=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(i+=":"+e.port)),e.query&&Hr(e.query)&&Object.keys(e.query).length&&(a=function(e,t,r,n){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Gr(Xr(e),(function(n){var o=encodeURIComponent(Kr(n))+r;return Vr(e[n])?Gr(e[n],(function(e){return o+encodeURIComponent(Kr(e))})).join(t):o+encodeURIComponent(Kr(e[n]))})).join(t):n?encodeURIComponent(Kr(n))+r+encodeURIComponent(Kr(e)):""}(e.query));var s=e.search||a&&"?"+a||"";return r&&":"!==r.substr(-1)&&(r+=":"),e.slashes||(!r||hn[r])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),o&&"#"!==o.charAt(0)&&(o="#"+o),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})),r+i+n+(s=s.replace("#","%23"))+o}function vn(e){var t=e.host,r=tn.exec(t);r&&(":"!==(r=r[0])&&(e.port=r.substr(1)),t=t.substr(0,t.length-r.length)),t&&(e.hostname=t)}function gn(e){Ar.call(this,null==e?"canceled":e,Ar.ERR_CANCELED),this.name="CanceledError"}Zr.prototype.parse=function(e,t,r){return dn(this,e,t,r)},Zr.prototype.format=function(){return mn(this)},Zr.prototype.resolve=function(e){return this.resolveObject(pn(e,!1,!0)).format()},Zr.prototype.resolveObject=function(e){if(Wr(e)){var t=new Zr;t.parse(e,!1,!0),e=t}for(var r,n=new Zr,o=Object.keys(this),i=0;i<o.length;i++){var a=o[i];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var c=s[u];"protocol"!==c&&(n[c]=e[c])}return hn[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!hn[e.protocol]){for(var f=Object.keys(e),l=0;l<f.length;l++){var h=f[l];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||ln[e.protocol])n.pathname=e.pathname;else{for(r=(e.pathname||"").split("/");r.length&&!(e.host=r.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==r[0]&&r.unshift(""),r.length<2&&r.unshift(""),n.pathname=r.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",d=n.search||"";n.path=p+d}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var m,v=n.pathname&&"/"===n.pathname.charAt(0),g=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=g||v||n.host&&e.pathname,b=y,w=n.pathname&&n.pathname.split("/")||[],O=n.protocol&&!hn[n.protocol];if(r=e.pathname&&e.pathname.split("/")||[],O&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===r[0]?r[0]=e.host:r.unshift(e.host)),e.host=null),y=y&&(""===r[0]||""===w[0])),g)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=r;else if(r.length)w||(w=[]),w.pop(),w=w.concat(r),n.search=e.search,n.query=e.query;else if(null!=e.search)return O&&(n.hostname=n.host=w.shift(),(m=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=m.shift(),n.host=n.hostname=m.shift())),n.search=e.search,n.query=e.query,zr(n.pathname)&&zr(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=w.slice(-1)[0],j=(n.host||e.host||w.length>1)&&("."===E||".."===E)||""===E,R=0,S=w.length;S>=0;S--)"."===(E=w[S])?w.splice(S,1):".."===E?(w.splice(S,1),R++):R&&(w.splice(S,1),R--);if(!y&&!b)for(;R--;R)w.unshift("..");!y||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),j&&"/"!==w.join("/").substr(-1)&&w.push("");var A=""===w[0]||w[0]&&"/"===w[0].charAt(0);return O&&(n.hostname=n.host=A?"":w.length?w.shift():"",(m=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=m.shift(),n.host=n.hostname=m.shift())),(y=y||n.host&&w.length)&&!A&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),zr(n.pathname)&&zr(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},Zr.prototype.parseHost=function(){return vn(this)},gr.inherits(gn,Ar,{__CANCEL__:!0});var yn=gn,bn=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}var u=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(c+":"+f)}var l=xr(e.baseURL,e.url),h=Yr.parse(l),p=gr.getProtocol(h.protocol);function d(){if(u){var n="getAllResponseHeaders"in u?function(e){var t,r,n,o={};return e?(gr.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=gr.trim(e.substr(0,n)).toLowerCase(),r=gr.trim(e.substr(n+1)),t){if(o[t]&&_r.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o}(u.getAllResponseHeaders()):null;!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Ar("Request failed with status code "+r.status,[Ar.ERR_BAD_REQUEST,Ar.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),s()}),(function(e){r(e),s()}),{data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u}),u=null}}if(u.open(e.method.toUpperCase(),br(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(r(new Ar("Request aborted",Ar.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new Ar("Network Error",Ar.ERR_NETWORK,e,u,u)),u=null},u.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||Cr;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new Ar(t,n.clarifyTimeoutError?Ar.ETIMEDOUT:Ar.ECONNABORTED,e,u)),u=null},gr.isStandardBrowserEnv()){var m=(e.withCredentials||Ur(l))&&e.xsrfCookieName?Tr.read(e.xsrfCookieName):void 0;m&&(i[e.xsrfHeaderName]=m)}"setRequestHeader"in u&&gr.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:u.setRequestHeader(t,e)})),gr.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){u&&(r(!e||e&&e.type?new yn:e),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||(o=null),null!==h.path?gr.supportedProtocols.includes(p)?u.send(o):r(new Ar("Unsupported protocol "+p,Ar.ERR_BAD_REQUEST,e)):r(new Ar("Malformed URL "+l,Ar.ERR_BAD_REQUEST,e))}))},wn={"Content-Type":"application/x-www-form-urlencoded"};function On(e,t){!gr.isUndefined(e)&&gr.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var En,jn={transitional:Cr,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(En=bn),En),transformRequest:[function(e,t){if(Er(t,"Accept"),Er(t,"Content-Type"),gr.isFormData(e)||gr.isArrayBuffer(e)||gr.isBuffer(e)||gr.isStream(e)||gr.isFile(e)||gr.isBlob(e))return e;if(gr.isArrayBufferView(e))return e.buffer;if(gr.isURLSearchParams(e))return On(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=gr.isObject(e),o=t&&t["Content-Type"];if((r=gr.isFileList(e))||n&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return Pr(r?{"files[]":e}:e,i&&new i)}return n||"application/json"===o?(On(t,"application/json"),function(e,t,r){if(gr.isString(e))try{return(t||JSON.parse)(e),gr.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||jn.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&gr.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Ar.from(e,Ar.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:null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};gr.forEach(["delete","get","head"],(function(e){jn.headers[e]={}})),gr.forEach(["post","put","patch"],(function(e){jn.headers[e]=gr.merge(wn)}));var Rn=jn,Sn=function(e,t,r){var n=this||Rn;return gr.forEach(r,(function(r){e=r.call(n,e,t)})),e},An=function(e){return!(!e||!e.__CANCEL__)};function Cn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yn}var Pn=function(e){return Cn(e),e.headers=e.headers||{},e.data=Sn.call(e,e.data,e.headers,e.transformRequest),e.headers=gr.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),gr.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Rn.adapter)(e).then((function(t){return Cn(e),t.data=Sn.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return An(t)||(Cn(e),t&&t.response&&(t.response.data=Sn.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Tn=function(e,t){t=t||{};var r={};function n(e,t){return gr.isPlainObject(e)&&gr.isPlainObject(t)?gr.merge(e,t):gr.isPlainObject(t)?gr.merge({},t):gr.isArray(t)?t.slice():t}function o(r){return gr.isUndefined(t[r])?gr.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!gr.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return gr.isUndefined(t[r])?gr.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function s(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var u={url:i,method:i,data:i,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,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return gr.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,n=t(e);gr.isUndefined(n)&&t!==s||(r[e]=n)})),r},xn="0.27.0",_n=xn,Un={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Un[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var Nn={};Un.transitional=function(e,t,r){function n(e,t){return"[Axios v"+_n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new Ar(n(o," has been removed"+(t?" in "+t:"")),Ar.ERR_DEPRECATED);return t&&!Nn[o]&&(Nn[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var Dn={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Ar("options must be an object",Ar.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new Ar("option "+i+" must be "+u,Ar.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Ar("Unknown option "+i,Ar.ERR_BAD_OPTION)}},validators:Un},In=Dn.validators;function kn(e){this.defaults=e,this.interceptors={request:new Or,response:new Or}}kn.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Tn(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Dn.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var s=[Pn,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(a),i=Promise.resolve(t);s.length;)i=i.then(s.shift(),s.shift());return i}for(var u=t;n.length;){var c=n.shift(),f=n.shift();try{u=c(u)}catch(e){f(e);break}}try{i=Pn(u)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},kn.prototype.getUri=function(e){e=Tn(this.defaults,e);var t=xr(e.baseURL,e.url);return br(t,e.params,e.paramsSerializer)},gr.forEach(["delete","get","head","options"],(function(e){kn.prototype[e]=function(t,r){return this.request(Tn(r||{},{method:e,url:t,data:(r||{}).data}))}})),gr.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(Tn(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}kn.prototype[e]=t(),kn.prototype[e+"Form"]=t(!0)}));var Ln=kn;function qn(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new yn(e),t(r.reason))}))}qn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},qn.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},qn.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},qn.source=function(){var e;return{token:new qn((function(t){e=t})),cancel:e}};var Bn=qn;var $n=function e(t){var r=new Ln(t),n=Zt(Ln.prototype.request,r);return gr.extend(n,Ln.prototype,r),gr.extend(n,r),n.create=function(r){return e(Tn(t,r))},n}(Rn);$n.Axios=Ln,$n.CanceledError=yn,$n.CancelToken=Bn,$n.isCancel=An,$n.VERSION=xn,$n.toFormData=Pr,$n.AxiosError=Ar,$n.Cancel=$n.CanceledError,$n.all=function(e){return Promise.all(e)},$n.spread=function(e){return function(t){return e.apply(null,t)}},$n.isAxiosError=function(e){return gr.isObject(e)&&!0===e.isAxiosError};var Fn=$n,Mn=$n;Fn.default=Mn;var zn=Fn;const Wn="1.11.4",Hn="v5.0",Jn=["v2","v3","v4","v5","canary"],Vn="@tryghost/content-api",Kn=e=>{let t;if("v5"===e||void 0===e||e.match(/^v5\.\d+/))t="/content/";else if(e.match(/^v\d+\.\d+/)){t=`/${/^(v\d+)\.\d+/.exec(e)[1]}/content/`}else t=`/${e}/content/`;return t},Gn=e=>{let{url:t,method:r,params:n,headers:o}=e;return zn[r](t,{params:n,paramsSerializer:e=>Object.keys(e).reduce(((t,r)=>{const n=encodeURIComponent([].concat(e[r]).join(","));return t.concat(`${r}=${n}`)}),[]).join("&"),headers:o})};return function e(t){let r,{url:n,key:o,host:i,version:a,userAgent:s,ghostPath:u="ghost",makeRequest:c=Gn}=t;if(i&&(console.warn(`${Vn}: The 'host' parameter is deprecated, please use 'url' instead`),n||(n=i)),this instanceof e)return e({url:n,key:o,version:a,userAgent:s,ghostPath:u,makeRequest:c});if(void 0===a)throw new Error(`${Vn} Config Missing: 'version' is required. E.g. ${Jn.join(",")}`);if("boolean"==typeof a)!0===a&&(r=Hn),a=void 0;else{if(a&&!Jn.includes(a)&&!a.match(/^v\d+\.\d+/))throw new Error(`${Vn} Config Invalid: 'version' ${a} is not supported`);"canary"===a?(console.warn(`${Vn}: The 'version' parameter has a deprecated format 'canary', please use 'v{major}.{minor}' format instead`),r=Hn):a.match(/^v\d+$/)?(console.warn(`${Vn}: The 'version' parameter has a deprecated format 'v{major}', please use 'v{major}.{minor}' format instead`),r=`${a}.0`):r=a}if(!n)throw new Error(`${Vn} Config Missing: 'url' is required. E.g. 'https://site.com'`);if(!/https?:\/\//.test(n))throw new Error(`${Vn} Config Invalid: 'url' ${n} requires a protocol. E.g. 'https://site.com'`);if(n.endsWith("/"))throw new Error(`${Vn} Config Invalid: 'url' ${n} must not have a trailing slash. E.g. 'https://site.com'`);if(u.endsWith("/")||u.startsWith("/"))throw new Error(`${Vn} Config Invalid: 'ghostPath' ${u} must not have a leading or trailing slash. E.g. 'ghost'`);if(o&&!/[0-9a-f]{26}/.test(o))throw new Error(`${Vn} Config Invalid: 'key' ${o} must have 26 hex characters`);void 0===s&&(s=false);const f=["posts","authors","tags","pages","settings","tiers","newsletters","offers"].reduce(((e,t)=>Object.assign(e,{[t]:{read:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!e||!e.id&&!e.slug)return Promise.reject(new Error(`${Vn} read requires an id or slug.`));const o=Object.assign({},e,r);return l(t,o,e.id||`slug/${e.slug}`,n)},browse:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return l(t,e,null,r)}}})),{});return delete f.settings.read,delete f.tiers.read,delete f.newsletters.read,delete f.offers.browse,f;function l(e,t,i){let f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!f&&!o)return Promise.reject(new Error(`${Vn} Config Missing: 'key' is required.`));delete t.id;const l=f?{Authorization:`GhostMembers ${f}`}:{};s&&(l["User-Agent"]="boolean"==typeof s?`GhostContentSDK/${Wn}`:s),r&&(l["Accept-Version"]=r),t=Object.assign({key:o},t);const h=`${n}/${u}/api${Kn(a)}${e}/${i?i+"/":""}`;return c({url:h,method:"get",params:t,headers:l}).then((t=>Array.isArray(t.data[e])?1!==t.data[e].length||t.data.meta?Object.assign(t.data[e],{meta:t.data.meta}):t.data[e][0]:t.data[e])).catch((e=>{if(e.response&&e.response.data&&e.response.data.errors){const t=e.response.data.errors[0],r=new Error(t.message),n=Object.keys(t);throw r.name=t.type,n.forEach((e=>{r[e]=t[e]})),r.response=e.response,r.request=e.request,r.config=e.config,r}throw e}))}}}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).GhostContentAPI=t()}(this,(function(){"use strict";var e,t=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},r=Object.prototype.toString,n=(e=Object.create(null),function(t){var n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())});function o(e){return e=e.toLowerCase(),function(t){return n(t)===e}}function i(e){return Array.isArray(e)}function s(e){return void 0===e}var a=o("ArrayBuffer");function u(e){return null!==e&&"object"==typeof e}function c(e){if("object"!==n(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var f=o("Date"),l=o("File"),d=o("Blob"),h=o("FileList");function p(e){return"[object Function]"===r.call(e)}var m=o("URLSearchParams");function g(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var v,y=(v="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return v&&e instanceof v}),E={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){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||r.call(e)===t||p(e.toString)&&e.toString()===t)},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:f,isFile:l,isBlob:d,isFunction:p,isStream:function(e){return u(e)&&p(e.pipe)},isURLSearchParams:m,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:g,merge:function e(){var t={};function r(r,n){c(t[n])&&c(r)?t[n]=e(t[n],r):c(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)g(arguments[n],r);return t},extend:function(e,r,n){return g(r,(function(r,o){e[o]=n&&"function"==typeof r?t(r,n):r})),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},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var n,o,i,s={};t=t||{};do{for(o=(n=Object.getOwnPropertyNames(e)).length;o-- >0;)s[i=n[o]]||(t[i]=e[i],s[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:n,kindOfTest:o,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(s(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:y,isFileList:h};function w(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var b=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(E.isURLSearchParams(t))n=t.toString();else{var o=[];E.forEach(t,(function(e,t){null!=e&&(E.isArray(e)?t+="[]":e=[e],E.forEach(e,(function(e){E.isDate(e)?e=e.toISOString():E.isObject(e)&&(e=JSON.stringify(e)),o.push(w(t)+"="+w(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e};function O(){this.handlers=[]}O.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},O.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},O.prototype.forEach=function(e){E.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var R=O,A=function(e,t){E.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))};function j(e,t,r,n,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}E.inherits(j,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var S=j.prototype,C={};["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"].forEach((function(e){C[e]={value:e}})),Object.defineProperties(j,C),Object.defineProperty(S,"isAxiosError",{value:!0}),j.from=function(e,t,r,n,o,i){var s=Object.create(S);return E.toFlatObject(e,s,(function(e){return e!==Error.prototype})),j.call(s,e.message,t,r,n,o),s.name=e.name,i&&Object.assign(s,i),s};var T=j,N={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var _=function(e,t){t=t||new FormData;var r=[];function n(e){return null===e?"":E.isDate(e)?e.toISOString():E.isArrayBuffer(e)||E.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,i){if(E.isPlainObject(o)||E.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+i);r.push(o),E.forEach(o,(function(r,o){if(!E.isUndefined(r)){var s,a=i?i+"."+o:o;if(r&&!i&&"object"==typeof r)if(E.endsWith(o,"{}"))r=JSON.stringify(r);else if(E.endsWith(o,"[]")&&(s=E.toArray(r)))return void s.forEach((function(e){!E.isUndefined(e)&&t.append(a,n(e))}));e(r,a)}})),r.pop()}else t.append(i,n(o))}(e),t},x=E.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var s=[];s.push(e+"="+encodeURIComponent(t)),E.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),E.isString(n)&&s.push("path="+n),E.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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(){}},P=function(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},U=["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"],D=E.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=E.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function B(e){T.call(this,null==e?"canceled":e,T.ERR_CANCELED),this.name="CanceledError"}E.inherits(B,T,{__CANCEL__:!0});var k=B,$=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,s=e.responseType;function a(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}E.isFormData(o)&&E.isStandardBrowserEnv()&&delete i["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var c=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(c+":"+f)}var l=P(e.baseURL,e.url);function d(){if(u){var n,o,i,c,f,l="getAllResponseHeaders"in u?(n=u.getAllResponseHeaders(),f={},n?(E.forEach(n.split("\n"),(function(e){if(c=e.indexOf(":"),o=E.trim(e.substr(0,c)).toLowerCase(),i=E.trim(e.substr(c+1)),o){if(f[o]&&U.indexOf(o)>=0)return;f[o]="set-cookie"===o?(f[o]?f[o]:[]).concat([i]):f[o]?f[o]+", "+i:i}})),f):f):null;!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new T("Request failed with status code "+r.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),a()}),(function(e){r(e),a()}),{data:s&&"text"!==s&&"json"!==s?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:l,config:e,request:u}),u=null}}if(u.open(e.method.toUpperCase(),b(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(r(new T("Request aborted",T.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new T("Network Error",T.ERR_NETWORK,e,u,u)),u=null},u.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||N;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new T(t,n.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,e,u)),u=null},E.isStandardBrowserEnv()){var h=(e.withCredentials||D(l))&&e.xsrfCookieName?x.read(e.xsrfCookieName):void 0;h&&(i[e.xsrfHeaderName]=h)}"setRequestHeader"in u&&E.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:u.setRequestHeader(t,e)})),E.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&"json"!==s&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){u&&(r(!e||e&&e.type?new k:e),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||(o=null);var p,m=(p=/^([-+\w]{1,25})(:?\/\/|:)/.exec(l))&&p[1]||"";m&&-1===["http","https","file"].indexOf(m)?r(new T("Unsupported protocol "+m+":",T.ERR_BAD_REQUEST,e)):u.send(o)}))},L={"Content-Type":"application/x-www-form-urlencoded"};function q(e,t){!E.isUndefined(e)&&E.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var F,I={transitional:N,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(F=$),F),transformRequest:[function(e,t){if(A(t,"Accept"),A(t,"Content-Type"),E.isFormData(e)||E.isArrayBuffer(e)||E.isBuffer(e)||E.isStream(e)||E.isFile(e)||E.isBlob(e))return e;if(E.isArrayBufferView(e))return e.buffer;if(E.isURLSearchParams(e))return q(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=E.isObject(e),o=t&&t["Content-Type"];if((r=E.isFileList(e))||n&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return _(r?{"files[]":e}:e,i&&new i)}return n||"application/json"===o?(q(t,"application/json"),function(e,t,r){if(E.isString(e))try{return(t||JSON.parse)(e),E.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||I.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&E.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw T.from(e,T.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:null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};E.forEach(["delete","get","head"],(function(e){I.headers[e]={}})),E.forEach(["post","put","patch"],(function(e){I.headers[e]=E.merge(L)}));var M=I,J=function(e,t,r){var n=this||M;return E.forEach(r,(function(r){e=r.call(n,e,t)})),e},W=function(e){return!(!e||!e.__CANCEL__)};function z(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new k}var H=function(e){return z(e),e.headers=e.headers||{},e.data=J.call(e,e.data,e.headers,e.transformRequest),e.headers=E.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),E.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||M.adapter)(e).then((function(t){return z(e),t.data=J.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return W(t)||(z(e),t&&t.response&&(t.response.data=J.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},V=function(e,t){t=t||{};var r={};function n(e,t){return E.isPlainObject(e)&&E.isPlainObject(t)?E.merge(e,t):E.isPlainObject(t)?E.merge({},t):E.isArray(t)?t.slice():t}function o(r){return E.isUndefined(t[r])?E.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!E.isUndefined(t[e]))return n(void 0,t[e])}function s(r){return E.isUndefined(t[r])?E.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function a(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var u={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};return E.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,n=t(e);E.isUndefined(n)&&t!==a||(r[e]=n)})),r},K="0.27.2",X=K,G={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){G[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var Q={};G.transitional=function(e,t,r){function n(e,t){return"[Axios v"+X+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new T(n(o," has been removed"+(t?" in "+t:"")),T.ERR_DEPRECATED);return t&&!Q[o]&&(Q[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var Y={assertOptions:function(e,t,r){if("object"!=typeof e)throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new T("option "+i+" must be "+u,T.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new T("Unknown option "+i,T.ERR_BAD_OPTION)}},validators:G},Z=Y.validators;function ee(e){this.defaults=e,this.interceptors={request:new R,response:new R}}ee.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=V(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Y.assertOptions(r,{silentJSONParsing:Z.transitional(Z.boolean),forcedJSONParsing:Z.transitional(Z.boolean),clarifyTimeoutError:Z.transitional(Z.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!o){var a=[H,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(s),i=Promise.resolve(t);a.length;)i=i.then(a.shift(),a.shift());return i}for(var u=t;n.length;){var c=n.shift(),f=n.shift();try{u=c(u)}catch(e){f(e);break}}try{i=H(u)}catch(e){return Promise.reject(e)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},ee.prototype.getUri=function(e){e=V(this.defaults,e);var t=P(e.baseURL,e.url);return b(t,e.params,e.paramsSerializer)},E.forEach(["delete","get","head","options"],(function(e){ee.prototype[e]=function(t,r){return this.request(V(r||{},{method:e,url:t,data:(r||{}).data}))}})),E.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(V(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ee.prototype[e]=t(),ee.prototype[e+"Form"]=t(!0)}));var te=ee;function re(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new k(e),t(r.reason))}))}re.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},re.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},re.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},re.source=function(){var e;return{token:new re((function(t){e=t})),cancel:e}};var ne=re;var oe=function e(r){var n=new te(r),o=t(te.prototype.request,n);return E.extend(o,te.prototype,n),E.extend(o,n),o.create=function(t){return e(V(r,t))},o}(M);oe.Axios=te,oe.CanceledError=k,oe.CancelToken=ne,oe.isCancel=W,oe.VERSION=K,oe.toFormData=_,oe.AxiosError=T,oe.Cancel=oe.CanceledError,oe.all=function(e){return Promise.all(e)},oe.spread=function(e){return function(t){return e.apply(null,t)}},oe.isAxiosError=function(e){return E.isObject(e)&&!0===e.isAxiosError};var ie=oe,se=oe;ie.default=se;var ae=ie;const ue="1.11.5",ce="v5.0",fe=["v2","v3","v4","v5","canary"],le="@tryghost/content-api",de=e=>{let t;if("v5"===e||void 0===e||e.match(/^v5\.\d+/))t="/content/";else if(e.match(/^v\d+\.\d+/)){t=`/${/^(v\d+)\.\d+/.exec(e)[1]}/content/`}else t=`/${e}/content/`;return t},he=e=>{let{url:t,method:r,params:n,headers:o}=e;return ae[r](t,{params:n,paramsSerializer:e=>Object.keys(e).reduce(((t,r)=>{const n=encodeURIComponent([].concat(e[r]).join(","));return t.concat(`${r}=${n}`)}),[]).join("&"),headers:o})};return function e(t){let r,{url:n,key:o,host:i,version:s,userAgent:a,ghostPath:u="ghost",makeRequest:c=he}=t;if(i&&(console.warn(`${le}: The 'host' parameter is deprecated, please use 'url' instead`),n||(n=i)),this instanceof e)return e({url:n,key:o,version:s,userAgent:a,ghostPath:u,makeRequest:c});if(void 0===s)throw new Error(`${le} Config Missing: 'version' is required. E.g. ${fe.join(",")}`);if("boolean"==typeof s)!0===s&&(r=ce),s=void 0;else{if(s&&!fe.includes(s)&&!s.match(/^v\d+\.\d+/))throw new Error(`${le} Config Invalid: 'version' ${s} is not supported`);"canary"===s?(console.warn(`${le}: The 'version' parameter has a deprecated format 'canary', please use 'v{major}.{minor}' format instead`),r=ce):s.match(/^v\d+$/)?(console.warn(`${le}: The 'version' parameter has a deprecated format 'v{major}', please use 'v{major}.{minor}' format instead`),r=`${s}.0`):r=s}if(!n)throw new Error(`${le} Config Missing: 'url' is required. E.g. 'https://site.com'`);if(!/https?:\/\//.test(n))throw new Error(`${le} Config Invalid: 'url' ${n} requires a protocol. E.g. 'https://site.com'`);if(n.endsWith("/"))throw new Error(`${le} Config Invalid: 'url' ${n} must not have a trailing slash. E.g. 'https://site.com'`);if(u.endsWith("/")||u.startsWith("/"))throw new Error(`${le} Config Invalid: 'ghostPath' ${u} must not have a leading or trailing slash. E.g. 'ghost'`);if(o&&!/[0-9a-f]{26}/.test(o))throw new Error(`${le} Config Invalid: 'key' ${o} must have 26 hex characters`);void 0===a&&(a=false);const f=["posts","authors","tags","pages","settings","tiers","newsletters","offers"].reduce(((e,t)=>Object.assign(e,{[t]:{read:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!e||!e.id&&!e.slug)return Promise.reject(new Error(`${le} read requires an id or slug.`));const o=Object.assign({},e,r);return l(t,o,e.id||`slug/${e.slug}`,n)},browse:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return l(t,e,null,r)}}})),{});return delete f.settings.read,delete f.tiers.read,delete f.newsletters.read,delete f.offers.browse,f;function l(e,t,i){let f=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!f&&!o)return Promise.reject(new Error(`${le} Config Missing: 'key' is required.`));delete t.id;const l=f?{Authorization:`GhostMembers ${f}`}:{};a&&(l["User-Agent"]="boolean"==typeof a?`GhostContentSDK/${ue}`:a),r&&(l["Accept-Version"]=r),t=Object.assign({key:o},t);const d=`${n}/${u}/api${de(s)}${e}/${i?i+"/":""}`;return c({url:d,method:"get",params:t,headers:l}).then((t=>Array.isArray(t.data[e])?1!==t.data[e].length||t.data.meta?Object.assign(t.data[e],{meta:t.data.meta}):t.data[e][0]:t.data[e])).catch((e=>{if(e.response&&e.response.data&&e.response.data.errors){const t=e.response.data.errors[0],r=new Error(t.message),n=Object.keys(t);throw r.name=t.type,n.forEach((e=>{r[e]=t[e]})),r.response=e.response,r.request=e.request,r.config=e.config,r}throw e}))}}}));
//# sourceMappingURL=content-api.min.js.map

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc