@tryghost/content-api 1.5.13 → 1.5.17

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/content-api",
3
- "version": "1.5.13",
3
+ "version": "1.5.17",
4
4
  "repository": "https://github.com/TryGhost/SDK/tree/master/packages/content-api",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "dev": "echo \"Implement me!\"",
22
22
  "pretest": "yarn build",
23
- "test": "NODE_ENV=testing c8 mocha './test/**/*.test.js'",
23
+ "test": "NODE_ENV=testing c8 --reporter text --reporter cobertura mocha './test/**/*.test.js'",
24
24
  "build": "rollup -c",
25
25
  "lint": "eslint . --ext .js --cache",
26
26
  "prepare": "NODE_ENV=production yarn build",
@@ -30,14 +30,14 @@
30
30
  "access": "public"
31
31
  },
32
32
  "devDependencies": {
33
- "@babel/core": "7.15.0",
33
+ "@babel/core": "7.16.10",
34
34
  "@babel/polyfill": "7.12.1",
35
- "@babel/preset-env": "7.15.0",
36
- "c8": "7.8.0",
37
- "core-js": "3.16.4",
35
+ "@babel/preset-env": "7.16.10",
36
+ "c8": "7.11.0",
37
+ "core-js": "3.20.3",
38
38
  "eslint-plugin-ghost": "1.5.0",
39
39
  "mocha": "7.2.0",
40
- "rollup": "2.56.3",
40
+ "rollup": "2.64.0",
41
41
  "rollup-plugin-babel": "4.4.0",
42
42
  "rollup-plugin-commonjs": "10.1.0",
43
43
  "rollup-plugin-node-resolve": "5.2.0",
@@ -49,5 +49,5 @@
49
49
  "dependencies": {
50
50
  "axios": "^0.21.1"
51
51
  },
52
- "gitHead": "452a256891a632d7c27d4c4c63831bb37bb75826"
52
+ "gitHead": "fd46ea76699b5f56bb9cd5dfbcd2095ff3863387"
53
53
  }
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).GhostContentAPI=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n,r,o=function(t){return t&&t.Math==Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},c=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,f={f:s&&!u.call({1:2},1)?function(t){var e=s(this,t);return!!e&&e.enumerable}:u},l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,d=function(t){return p.call(t).slice(8,-1)},h="".split,v=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==d(t)?h.call(t,""):Object(t)}:Object,g=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return v(g(t))},y=function(t){return"object"==typeof t?null!==t:"function"==typeof t},b=function(t){return"function"==typeof t?t:void 0},w=function(t,e){return arguments.length<2?b(i[t]):i[t]&&i[t][e]},j=w("navigator","userAgent")||"",S=i.process,E=i.Deno,O=S&&S.versions||E&&E.version,T=O&&O.v8;T?r=(n=T.split("."))[0]<4?1:n[0]+n[1]:j&&(!(n=j.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=j.match(/Chrome\/(\d+)/))&&(r=n[1]);var x=r&&+r,C=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&x&&x<41})),P=C&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,A=P?function(t){return"symbol"==typeof t}:function(t){var e=w("Symbol");return"function"==typeof e&&Object(t)instanceof e},L=function(t,e){try{Object.defineProperty(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e},R="__core-js_shared__",k=i[R]||L(R,{}),N=e((function(t){(t.exports=function(t,e){return k[t]||(k[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.16.0",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),M=function(t){return Object(g(t))},U={}.hasOwnProperty,q=Object.hasOwn||function(t,e){return U.call(M(t),e)},B=0,I=Math.random(),D=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++B+I).toString(36)},_=N("wks"),F=i.Symbol,z=P?F:F&&F.withoutSetter||D,W=function(t){return q(_,t)&&(C||"string"==typeof _[t])||(C&&q(F,t)?_[t]=F[t]:_[t]=z("Symbol."+t)),_[t]},H=W("toPrimitive"),V=function(t,e){if(!y(t)||A(t))return t;var n,r=t[H];if(void 0!==r){if(void 0===e&&(e="default"),n=r.call(t,e),!y(n)||A(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!y(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!y(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!y(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(t,e)},G=function(t){var e=V(t,"string");return A(e)?e:String(e)},X=i.document,J=y(X)&&y(X.createElement),K=function(t){return J?X.createElement(t):{}},$=!c&&!a((function(){return 7!=Object.defineProperty(K("div"),"a",{get:function(){return 7}}).a})),Y=Object.getOwnPropertyDescriptor,Q={f:c?Y:function(t,e){if(t=m(t),e=G(e),$)try{return Y(t,e)}catch(t){}if(q(t,e))return l(!f.f.call(t,e),t[e])}},Z=function(t){if(!y(t))throw TypeError(String(t)+" is not an object");return t},tt=Object.defineProperty,et={f:c?tt:function(t,e,n){if(Z(t),e=G(e),Z(n),$)try{return tt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},nt=c?function(t,e,n){return et.f(t,e,l(1,n))}:function(t,e,n){return t[e]=n,t},rt=Function.toString;"function"!=typeof k.inspectSource&&(k.inspectSource=function(t){return rt.call(t)});var ot,it,at,ct=k.inspectSource,ut=i.WeakMap,st="function"==typeof ut&&/native code/.test(ct(ut)),ft=N("keys"),lt=function(t){return ft[t]||(ft[t]=D(t))},pt={},dt="Object already initialized",ht=i.WeakMap;if(st||k.state){var vt=k.state||(k.state=new ht),gt=vt.get,mt=vt.has,yt=vt.set;ot=function(t,e){if(mt.call(vt,t))throw new TypeError(dt);return e.facade=t,yt.call(vt,t,e),e},it=function(t){return gt.call(vt,t)||{}},at=function(t){return mt.call(vt,t)}}else{var bt=lt("state");pt[bt]=!0,ot=function(t,e){if(q(t,bt))throw new TypeError(dt);return e.facade=t,nt(t,bt,e),e},it=function(t){return q(t,bt)?t[bt]:{}},at=function(t){return q(t,bt)}}var wt={set:ot,get:it,has:at,enforce:function(t){return at(t)?it(t):ot(t,{})},getterFor:function(t){return function(e){var n;if(!y(e)||(n=it(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},jt=e((function(t){var e=wt.get,n=wt.enforce,r=String(String).split("String");(t.exports=function(t,e,o,a){var c,u=!!a&&!!a.unsafe,s=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet;"function"==typeof o&&("string"!=typeof e||q(o,"name")||nt(o,"name",e),(c=n(o)).source||(c.source=r.join("string"==typeof e?e:""))),t!==i?(u?!f&&t[e]&&(s=!0):delete t[e],s?t[e]=o:nt(t,e,o)):s?t[e]=o:L(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||ct(this)}))})),St=Math.ceil,Et=Math.floor,Ot=function(t){return isNaN(t=+t)?0:(t>0?Et:St)(t)},Tt=Math.min,xt=function(t){return t>0?Tt(Ot(t),9007199254740991):0},Ct=Math.max,Pt=Math.min,At=function(t){return function(e,n,r){var o,i=m(e),a=xt(i.length),c=function(t,e){var n=Ot(t);return n<0?Ct(n+e,0):Pt(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},Lt={includes:At(!0),indexOf:At(!1)},Rt=Lt.indexOf,kt=function(t,e){var n,r=m(t),o=0,i=[];for(n in r)!q(pt,n)&&q(r,n)&&i.push(n);for(;e.length>o;)q(r,n=e[o++])&&(~Rt(i,n)||i.push(n));return i},Nt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Mt=Nt.concat("length","prototype"),Ut={f:Object.getOwnPropertyNames||function(t){return kt(t,Mt)}},qt={f:Object.getOwnPropertySymbols},Bt=w("Reflect","ownKeys")||function(t){var e=Ut.f(Z(t)),n=qt.f;return n?e.concat(n(t)):e},It=function(t,e){for(var n=Bt(e),r=et.f,o=Q.f,i=0;i<n.length;i++){var a=n[i];q(t,a)||r(t,a,o(e,a))}},Dt=/#|\.prototype\./,_t=function(t,e){var n=zt[Ft(t)];return n==Ht||n!=Wt&&("function"==typeof e?a(e):!!e)},Ft=_t.normalize=function(t){return String(t).replace(Dt,".").toLowerCase()},zt=_t.data={},Wt=_t.NATIVE="N",Ht=_t.POLYFILL="P",Vt=_t,Gt=Q.f,Xt=function(t,e){var n,r,o,a,c,u=t.target,s=t.global,f=t.stat;if(n=s?i:f?i[u]||L(u,{}):(i[u]||{}).prototype)for(r in e){if(a=e[r],o=t.noTargetGet?(c=Gt(n,r))&&c.value:n[r],!Vt(s?r:u+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof a==typeof o)continue;It(a,o)}(t.sham||o&&o.sham)&&nt(a,"sham",!0),jt(n,r,a,t)}},Jt=function(t,e){var n=[][t];return!!n&&a((function(){n.call(null,e||function(){throw 1},1)}))},Kt=[].join,$t=v!=Object,Yt=Jt("join",",");Xt({target:"Array",proto:!0,forced:$t||!Yt},{join:function(t){return Kt.call(m(this),void 0===t?",":t)}});var Qt,Zt=Object.keys||function(t){return kt(t,Nt)},te=c?Object.defineProperties:function(t,e){Z(t);for(var n,r=Zt(e),o=r.length,i=0;o>i;)et.f(t,n=r[i++],e[n]);return t},ee=w("document","documentElement"),ne=lt("IE_PROTO"),re=function(){},oe=function(t){return"<script>"+t+"</"+"script>"},ie=function(t){t.write(oe("")),t.close();var e=t.parentWindow.Object;return t=null,e},ae=function(){try{Qt=new ActiveXObject("htmlfile")}catch(t){}ae=document.domain&&Qt?ie(Qt):function(){var t,e=K("iframe");if(e.style)return e.style.display="none",ee.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(oe("document.F=Object")),t.close(),t.F}()||ie(Qt);for(var t=Nt.length;t--;)delete ae.prototype[Nt[t]];return ae()};pt[ne]=!0;var ce=Object.create||function(t,e){var n;return null!==t?(re.prototype=Z(t),n=new re,re.prototype=null,n[ne]=t):n=ae(),void 0===e?n:te(n,e)},ue=W("unscopables"),se=Array.prototype;null==se[ue]&&et.f(se,ue,{configurable:!0,value:ce(null)});var fe,le=Lt.includes;Xt({target:"Array",proto:!0},{includes:function(t){return le(this,t,arguments.length>1?arguments[1]:void 0)}}),fe="includes",se[ue][fe]=!0;var pe,de=function(t){if(A(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},he=W("match"),ve=function(t){if(function(t){var e;return y(t)&&(void 0!==(e=t[he])?!!e:"RegExp"==d(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},ge=W("match"),me=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[ge]=!1,"/./"[t](e)}catch(t){}}return!1},ye=Q.f,be="".endsWith,we=Math.min,je=me("endsWith");Xt({target:"String",proto:!0,forced:!!(je||(pe=ye(String.prototype,"endsWith"),!pe||pe.writable))&&!je},{endsWith:function(t){var e=de(g(this));ve(t);var n=arguments.length>1?arguments[1]:void 0,r=xt(e.length),o=void 0===n?r:we(xt(n),r),i=de(t);return be?be.call(e,i,o):e.slice(o-i.length,o)===i}});var Se=Q.f,Ee="".startsWith,Oe=Math.min,Te=me("startsWith");Xt({target:"String",proto:!0,forced:!(!Te&&!!function(){var t=Se(String.prototype,"startsWith");return t&&!t.writable}())&&!Te},{startsWith:function(t){var e=de(g(this));ve(t);var n=xt(Oe(arguments.length>1?arguments[1]:void 0,e.length)),r=de(t);return Ee?Ee.call(e,r,n):e.slice(n,n+r.length)===r}});var xe={};xe[W("toStringTag")]="z";var Ce="[object z]"===String(xe),Pe=W("toStringTag"),Ae="Arguments"==d(function(){return arguments}()),Le=Ce?d:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Pe))?n:Ae?d(e):"Object"==(r=d(e))&&"function"==typeof e.callee?"Arguments":r},Re=Ce?{}.toString:function(){return"[object "+Le(this)+"]"};Ce||jt(Object.prototype,"toString",Re,{unsafe:!0});var ke=i.Promise,Ne=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Z(n),function(t){if(!y(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Me=et.f,Ue=W("toStringTag"),qe=W("species"),Be=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Ie={},De=W("iterator"),_e=Array.prototype,Fe=function(t,e,n){if(Be(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},ze=W("iterator"),We=function(t){var e=t.return;if(void 0!==e)return Z(e.call(t)).value},He=function(t,e){this.stopped=t,this.result=e},Ve=function(t,e,n){var r,o,i,a,c,u,s,f,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),v=Fe(e,l,1+p+h),g=function(t){return r&&We(r),new He(!0,t)},m=function(t){return p?(Z(t),h?v(t[0],t[1],g):v(t[0],t[1])):h?v(t,g):v(t)};if(d)r=t;else{if("function"!=typeof(o=function(t){if(null!=t)return t[ze]||t["@@iterator"]||Ie[Le(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(f=o)&&(Ie.Array===f||_e[De]===f)){for(i=0,a=xt(t.length);a>i;i++)if((c=m(t[i]))&&c instanceof He)return c;return new He(!1)}r=o.call(t)}for(u=r.next;!(s=u.call(r)).done;){try{c=m(s.value)}catch(t){throw We(r),t}if("object"==typeof c&&c&&c instanceof He)return c}return new He(!1)},Ge=W("iterator"),Xe=!1;try{var Je=0,Ke={next:function(){return{done:!!Je++}},return:function(){Xe=!0}};Ke[Ge]=function(){return this},Array.from(Ke,(function(){throw 2}))}catch(t){}var $e,Ye,Qe,Ze,tn=W("species"),en=/(?:iphone|ipod|ipad).*applewebkit/i.test(j),nn="process"==d(i.process),rn=i.setImmediate,on=i.clearImmediate,an=i.process,cn=i.MessageChannel,un=i.Dispatch,sn=0,fn={},ln="onreadystatechange";try{$e=i.location}catch(t){}var pn=function(t){if(fn.hasOwnProperty(t)){var e=fn[t];delete fn[t],e()}},dn=function(t){return function(){pn(t)}},hn=function(t){pn(t.data)},vn=function(t){i.postMessage(String(t),$e.protocol+"//"+$e.host)};rn&&on||(rn=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return fn[++sn]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Ye(sn),sn},on=function(t){delete fn[t]},nn?Ye=function(t){an.nextTick(dn(t))}:un&&un.now?Ye=function(t){un.now(dn(t))}:cn&&!en?(Ze=(Qe=new cn).port2,Qe.port1.onmessage=hn,Ye=Fe(Ze.postMessage,Ze,1)):i.addEventListener&&"function"==typeof postMessage&&!i.importScripts&&$e&&"file:"!==$e.protocol&&!a(vn)?(Ye=vn,i.addEventListener("message",hn,!1)):Ye=ln in K("script")?function(t){ee.appendChild(K("script")).onreadystatechange=function(){ee.removeChild(this),pn(t)}}:function(t){setTimeout(dn(t),0)});var gn,mn,yn,bn,wn,jn,Sn,En,On={set:rn,clear:on},Tn=/web0s(?!.*chrome)/i.test(j),xn=Q.f,Cn=On.set,Pn=i.MutationObserver||i.WebKitMutationObserver,An=i.document,Ln=i.process,Rn=i.Promise,kn=xn(i,"queueMicrotask"),Nn=kn&&kn.value;Nn||(gn=function(){var t,e;for(nn&&(t=Ln.domain)&&t.exit();mn;){e=mn.fn,mn=mn.next;try{e()}catch(t){throw mn?bn():yn=void 0,t}}yn=void 0,t&&t.enter()},en||nn||Tn||!Pn||!An?Rn&&Rn.resolve?((Sn=Rn.resolve(void 0)).constructor=Rn,En=Sn.then,bn=function(){En.call(Sn,gn)}):bn=nn?function(){Ln.nextTick(gn)}:function(){Cn.call(i,gn)}:(wn=!0,jn=An.createTextNode(""),new Pn(gn).observe(jn,{characterData:!0}),bn=function(){jn.data=wn=!wn}));var Mn,Un,qn,Bn,In,Dn,_n,Fn=Nn||function(t){var e={fn:t,next:void 0};yn&&(yn.next=e),mn||(mn=e,bn()),yn=e},zn=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=Be(e),this.reject=Be(n)},Wn={f:function(t){return new zn(t)}},Hn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Vn="object"==typeof window,Gn=On.set,Xn=W("species"),Jn="Promise",Kn=wt.get,$n=wt.set,Yn=wt.getterFor(Jn),Qn=ke&&ke.prototype,Zn=ke,tr=Qn,er=i.TypeError,nr=i.document,rr=i.process,or=Wn.f,ir=or,ar=!!(nr&&nr.createEvent&&i.dispatchEvent),cr="function"==typeof PromiseRejectionEvent,ur="unhandledrejection",sr=!1,fr=Vt(Jn,(function(){var t=ct(Zn),e=t!==String(Zn);if(!e&&66===x)return!0;if(x>=51&&/native code/.test(t))return!1;var n=new Zn((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Xn]=r,!(sr=n.then((function(){}))instanceof r)||!e&&Vn&&!cr})),lr=fr||!function(t,e){if(!e&&!Xe)return!1;var n=!1;try{var r={};r[Ge]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){Zn.all(t).catch((function(){}))})),pr=function(t){var e;return!(!y(t)||"function"!=typeof(e=t.then))&&e},dr=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;Fn((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,c,u,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,p=s.reject,d=s.domain;try{f?(o||(2===t.rejection&&mr(t),t.rejection=1),!0===f?a=r:(d&&d.enter(),a=f(r),d&&(d.exit(),u=!0)),a===s.promise?p(er("Promise-chain cycle")):(c=pr(a))?c.call(a,l,p):l(a)):p(r)}catch(t){d&&!u&&d.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&vr(t)}))}},hr=function(t,e,n){var r,o;ar?((r=nr.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),i.dispatchEvent(r)):r={promise:e,reason:n},!cr&&(o=i["on"+t])?o(r):t===ur&&function(t,e){var n=i.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},vr=function(t){Gn.call(i,(function(){var e,n=t.facade,r=t.value;if(gr(t)&&(e=Hn((function(){nn?rr.emit("unhandledRejection",r,n):hr(ur,n,r)})),t.rejection=nn||gr(t)?2:1,e.error))throw e.value}))},gr=function(t){return 1!==t.rejection&&!t.parent},mr=function(t){Gn.call(i,(function(){var e=t.facade;nn?rr.emit("rejectionHandled",e):hr("rejectionhandled",e,t.value)}))},yr=function(t,e,n){return function(r){t(e,r,n)}},br=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,dr(t,!0))},wr=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw er("Promise can't be resolved itself");var r=pr(e);r?Fn((function(){var n={done:!1};try{r.call(e,yr(wr,n,t),yr(br,n,t))}catch(e){br(n,e,t)}})):(t.value=e,t.state=1,dr(t,!1))}catch(e){br({done:!1},e,t)}}};if(fr&&(tr=(Zn=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,Zn,Jn),Be(t),Mn.call(this);var e=Kn(this);try{t(yr(wr,e),yr(br,e))}catch(t){br(e,t)}}).prototype,(Mn=function(t){$n(this,{type:Jn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)jt(t,r,e[r],n);return t}(tr,{then:function(t,e){var n,r,o,i=Yn(this),a=or((n=Zn,void 0===(o=Z(this).constructor)||null==(r=Z(o)[tn])?n:Be(r)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=nn?rr.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&dr(i,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),Un=function(){var t=new Mn,e=Kn(t);this.promise=t,this.resolve=yr(wr,e),this.reject=yr(br,e)},Wn.f=or=function(t){return t===Zn||t===qn?new Un(t):ir(t)},"function"==typeof ke&&Qn!==Object.prototype)){Bn=Qn.then,sr||(jt(Qn,"then",(function(t,e){var n=this;return new Zn((function(t,e){Bn.call(n,t,e)})).then(t,e)}),{unsafe:!0}),jt(Qn,"catch",tr.catch,{unsafe:!0}));try{delete Qn.constructor}catch(t){}Ne&&Ne(Qn,tr)}Xt({global:!0,wrap:!0,forced:fr},{Promise:Zn}),Dn=Jn,_n=!1,(In=Zn)&&!q(In=_n?In:In.prototype,Ue)&&Me(In,Ue,{configurable:!0,value:Dn}),function(t){var e=w(t),n=et.f;c&&e&&!e[qe]&&n(e,qe,{configurable:!0,get:function(){return this}})}(Jn),qn=w(Jn),Xt({target:Jn,stat:!0,forced:fr},{reject:function(t){var e=or(this);return e.reject.call(void 0,t),e.promise}}),Xt({target:Jn,stat:!0,forced:fr},{resolve:function(t){return function(t,e){if(Z(t),y(e)&&e.constructor===t)return e;var n=Wn.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),Xt({target:Jn,stat:!0,forced:lr},{all:function(t){var e=this,n=or(e),r=n.resolve,o=n.reject,i=Hn((function(){var n=Be(e.resolve),i=[],a=0,c=1;Ve(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=or(e),r=n.reject,o=Hn((function(){var o=Be(e.resolve);Ve(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var jr=Object.assign,Sr=Object.defineProperty,Er=!jr||a((function(){if(c&&1!==jr({b:1},jr(Sr({},"a",{enumerable:!0,get:function(){Sr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=jr({},t)[n]||Zt(jr({},e)).join("")!=r}))?function(t,e){for(var n=M(t),r=arguments.length,o=1,i=qt.f,a=f.f;r>o;)for(var u,s=v(arguments[o++]),l=i?Zt(s).concat(i(s)):Zt(s),p=l.length,d=0;p>d;)u=l[d++],c&&!a.call(s,u)||(n[u]=s[u]);return n}:jr;Xt({target:"Object",stat:!0,forced:Object.assign!==Er},{assign:Er});var Or,Tr=Array.isArray||function(t){return"Array"==d(t)},xr=function(t,e,n){var r=G(e);r in t?et.f(t,r,l(0,n)):t[r]=n},Cr=W("species"),Pr=function(t,e){return new(function(t){var e;return Tr(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Tr(e.prototype)?y(e)&&null===(e=e[Cr])&&(e=void 0):e=void 0),void 0===e?Array:e}(t))(0===e?0:e)},Ar=W("species"),Lr=W("isConcatSpreadable"),Rr=9007199254740991,kr="Maximum allowed index exceeded",Nr=x>=51||!a((function(){var t=[];return t[Lr]=!1,t.concat()[0]!==t})),Mr=(Or="concat",x>=51||!a((function(){var t=[];return(t.constructor={})[Ar]=function(){return{foo:1}},1!==t[Or](Boolean).foo}))),Ur=function(t){if(!y(t))return!1;var e=t[Lr];return void 0!==e?!!e:Tr(t)};Xt({target:"Array",proto:!0,forced:!Nr||!Mr},{concat:function(t){var e,n,r,o,i,a=M(this),c=Pr(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Ur(i=-1===e?a:arguments[e])){if(u+(o=xt(i.length))>Rr)throw TypeError(kr);for(n=0;n<o;n++,u++)n in i&&xr(c,u,i[n])}else{if(u>=Rr)throw TypeError(kr);xr(c,u++,i)}return c.length=u,c}}),Xt({target:"Object",stat:!0,forced:a((function(){Zt(1)}))},{keys:function(t){return Zt(M(t))}});var qr=et.f,Br=Function.prototype,Ir=Br.toString,Dr=/^\s*function ([^ (]*)/,_r="name";c&&!(_r in Br)&&qr(Br,_r,{configurable:!0,get:function(){try{return Ir.call(this).match(Dr)[1]}catch(t){return""}}});var Fr=[].push,zr=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,a=7==t,c=5==t||i;return function(u,s,f,l){for(var p,d,h=M(u),g=v(h),m=Fe(s,f,3),y=xt(g.length),b=0,w=l||Pr,j=e?w(u,y):n||a?w(u,0):void 0;y>b;b++)if((c||b in g)&&(d=m(p=g[b],b,h),t))if(e)j[b]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Fr.call(j,p)}else switch(t){case 4:return!1;case 7:Fr.call(j,p)}return i?-1:r||o?o:j}},Wr={forEach:zr(0),map:zr(1),filter:zr(2),some:zr(3),every:zr(4),find:zr(5),findIndex:zr(6),filterReject:zr(7)}.forEach,Hr=Jt("forEach")?[].forEach:function(t){return Wr(this,t,arguments.length>1?arguments[1]:void 0)};for(var Vr in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Gr=i[Vr],Xr=Gr&&Gr.prototype;if(Xr&&Xr.forEach!==Hr)try{nt(Xr,"forEach",Hr)}catch(t){Xr.forEach=Hr}}var Jr=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}},Kr=Object.prototype.toString;function $r(t){return"[object Array]"===Kr.call(t)}function Yr(t){return void 0===t}function Qr(t){return null!==t&&"object"==typeof t}function Zr(t){if("[object Object]"!==Kr.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function to(t){return"[object Function]"===Kr.call(t)}function eo(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),$r(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var no={isArray:$r,isArrayBuffer:function(t){return"[object ArrayBuffer]"===Kr.call(t)},isBuffer:function(t){return null!==t&&!Yr(t)&&null!==t.constructor&&!Yr(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:Qr,isPlainObject:Zr,isUndefined:Yr,isDate:function(t){return"[object Date]"===Kr.call(t)},isFile:function(t){return"[object File]"===Kr.call(t)},isBlob:function(t){return"[object Blob]"===Kr.call(t)},isFunction:to,isStream:function(t){return Qr(t)&&to(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:eo,merge:function t(){var e={};function n(n,r){Zr(e[r])&&Zr(n)?e[r]=t(e[r],n):Zr(n)?e[r]=t({},n):$r(n)?e[r]=n.slice():e[r]=n}for(var r=0,o=arguments.length;r<o;r++)eo(arguments[r],n);return e},extend:function(t,e,n){return eo(e,(function(e,r){t[r]=n&&"function"==typeof e?Jr(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}};function ro(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var oo=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(no.isURLSearchParams(e))r=e.toString();else{var o=[];no.forEach(e,(function(t,e){null!=t&&(no.isArray(t)?e+="[]":t=[t],no.forEach(t,(function(t){no.isDate(t)?t=t.toISOString():no.isObject(t)&&(t=JSON.stringify(t)),o.push(ro(e)+"="+ro(t))})))})),r=o.join("&")}if(r){var i=t.indexOf("#");-1!==i&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t};function io(){this.handlers=[]}io.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},io.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},io.prototype.forEach=function(t){no.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var ao=io,co=function(t,e,n){return no.forEach(n,(function(n){t=n(t,e)})),t},uo=function(t){return!(!t||!t.__CANCEL__)},so=function(t,e){no.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))},fo=function(t,e,n,r,o){return function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.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}},t}(new Error(t),e,n,r,o)},lo=no.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),no.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),no.isString(r)&&a.push("path="+r),no.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},po=["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"],ho=no.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(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 t=r(window.location.href),function(e){var n=no.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},vo=function(t){return new Promise((function(e,n){var r=t.data,o=t.headers;no.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(t.auth){var a=t.auth.username||"",c=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.Authorization="Basic "+btoa(a+":"+c)}var u,s,f=(u=t.baseURL,s=t.url,u&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(s)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(u,s):s);if(i.open(t.method.toUpperCase(),oo(f,t.params,t.paramsSerializer),!0),i.timeout=t.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in i?function(t){var e,n,r,o={};return t?(no.forEach(t.split("\n"),(function(t){if(r=t.indexOf(":"),e=no.trim(t.substr(0,r)).toLowerCase(),n=no.trim(t.substr(r+1)),e){if(o[e]&&po.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}})),o):o}(i.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:r,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(fo("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,o),i=null}},i.onabort=function(){i&&(n(fo("Request aborted",t,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(fo("Network Error",t,null,i)),i=null},i.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(fo(e,t,"ECONNABORTED",i)),i=null},no.isStandardBrowserEnv()){var l=(t.withCredentials||ho(f))&&t.xsrfCookieName?lo.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}if("setRequestHeader"in i&&no.forEach(o,(function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)})),no.isUndefined(t.withCredentials)||(i.withCredentials=!!t.withCredentials),t.responseType)try{i.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&i.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){i&&(i.abort(),n(t),i=null)})),r||(r=null),i.send(r)}))},go={"Content-Type":"application/x-www-form-urlencoded"};function mo(t,e){!no.isUndefined(t)&&no.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var yo,bo={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(yo=vo),yo),transformRequest:[function(t,e){return so(e,"Accept"),so(e,"Content-Type"),no.isFormData(t)||no.isArrayBuffer(t)||no.isBuffer(t)||no.isStream(t)||no.isFile(t)||no.isBlob(t)?t:no.isArrayBufferView(t)?t.buffer:no.isURLSearchParams(t)?(mo(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):no.isObject(t)?(mo(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};bo.headers={common:{Accept:"application/json, text/plain, */*"}},no.forEach(["delete","get","head"],(function(t){bo.headers[t]={}})),no.forEach(["post","put","patch"],(function(t){bo.headers[t]=no.merge(go)}));var wo=bo;function jo(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var So=function(t){return jo(t),t.headers=t.headers||{},t.data=co(t.data,t.headers,t.transformRequest),t.headers=no.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),no.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||wo.adapter)(t).then((function(e){return jo(t),e.data=co(e.data,e.headers,t.transformResponse),e}),(function(e){return uo(e)||(jo(t),e&&e.response&&(e.response.data=co(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},Eo=function(t,e){e=e||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(t,e){return no.isPlainObject(t)&&no.isPlainObject(e)?no.merge(t,e):no.isPlainObject(e)?no.merge({},e):no.isArray(e)?e.slice():e}function u(r){no.isUndefined(e[r])?no.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(t[r],e[r])}no.forEach(r,(function(t){no.isUndefined(e[t])||(n[t]=c(void 0,e[t]))})),no.forEach(o,u),no.forEach(i,(function(r){no.isUndefined(e[r])?no.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(void 0,e[r])})),no.forEach(a,(function(r){r in e?n[r]=c(t[r],e[r]):r in t&&(n[r]=c(void 0,t[r]))}));var s=r.concat(o).concat(i).concat(a),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===s.indexOf(t)}));return no.forEach(f,u),n};function Oo(t){this.defaults=t,this.interceptors={request:new ao,response:new ao}}Oo.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=Eo(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[So,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},Oo.prototype.getUri=function(t){return t=Eo(this.defaults,t),oo(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},no.forEach(["delete","get","head","options"],(function(t){Oo.prototype[t]=function(e,n){return this.request(Eo(n||{},{method:t,url:e,data:(n||{}).data}))}})),no.forEach(["post","put","patch"],(function(t){Oo.prototype[t]=function(e,n,r){return this.request(Eo(r||{},{method:t,url:e,data:n}))}}));var To=Oo;function xo(t){this.message=t}xo.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},xo.prototype.__CANCEL__=!0;var Co=xo;function Po(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new Co(t),e(n.reason))}))}Po.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Po.source=function(){var t;return{token:new Po((function(e){t=e})),cancel:t}};var Ao=Po;function Lo(t){var e=new To(t),n=Jr(To.prototype.request,e);return no.extend(n,To.prototype,e),no.extend(n,e),n}var Ro=Lo(wo);Ro.Axios=To,Ro.create=function(t){return Lo(Eo(Ro.defaults,t))},Ro.Cancel=Co,Ro.CancelToken=Ao,Ro.isCancel=uo,Ro.all=function(t){return Promise.all(t)},Ro.spread=function(t){return function(e){return t.apply(null,e)}},Ro.isAxiosError=function(t){return"object"==typeof t&&!0===t.isAxiosError};var ko=Ro,No=Ro;ko.default=No;var Mo=ko,Uo=["v2","v3","v4","canary"],qo="@tryghost/content-api";return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,c=e.key;if(r&&(console.warn("".concat(qo,": The 'host' parameter is deprecated, please use 'url' instead")),n||(n=r)),this instanceof t)return t({url:n,version:a,key:c});if(!a)throw new Error("".concat(qo," Config Missing: 'version' is required. E.g. ").concat(Uo.join(",")));if(!Uo.includes(a))throw new Error("".concat(qo," Config Invalid: 'version' ").concat(a," is not supported"));if(!n)throw new Error("".concat(qo," Config Missing: 'url' is required. E.g. 'https://site.com'"));if(!/https?:\/\//.test(n))throw new Error("".concat(qo," Config Invalid: 'url' ").concat(n," requires a protocol. E.g. 'https://site.com'"));if(n.endsWith("/"))throw new Error("".concat(qo," Config Invalid: 'url' ").concat(n," must not have a trailing slash. E.g. 'https://site.com'"));if(i.endsWith("/")||i.startsWith("/"))throw new Error("".concat(qo," Config Invalid: 'ghostPath' ").concat(i," must not have a leading or trailing slash. E.g. 'ghost'"));if(c&&!/[0-9a-f]{26}/.test(c))throw new Error("".concat(qo," Config Invalid: 'key' ").concat(c," must have 26 hex characters"));var u=["posts","authors","tags","pages","settings"].reduce((function(t,e){return Object.assign(t,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,{read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||!t.id&&!t.slug)return Promise.reject(new Error("".concat(qo," read requires an id or slug.")));var o=Object.assign({},t,n);return s(e,o,t.id||"slug/".concat(t.slug),r)},browse:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return s(e,t,null,n)}}))}),{});return delete u.settings.read,u;function s(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!c)return Promise.reject(new Error("".concat(qo," Config Missing: 'key' is required.")));delete e.id;var u=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return Mo.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:c},e),paramsSerializer:function(t){return Object.keys(t).reduce((function(e,n){var r=encodeURIComponent([].concat(t[n]).join(","));return e.concat("".concat(n,"=").concat(r))}),[]).join("&")},headers:u}).then((function(e){return Array.isArray(e.data[t])?1!==e.data[t].length||e.data.meta?Object.assign(e.data[t],{meta:e.data.meta}):e.data[t][0]:e.data[t]})).catch((function(t){if(t.response&&t.response.data&&t.response.data.errors){var e=t.response.data.errors[0],n=new Error(e.message),r=Object.keys(e);throw n.name=e.type,r.forEach((function(t){n[t]=e[t]})),n.response=t.response,n.request=t.request,n.config=t.config,n}throw t}))}}}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).GhostContentAPI=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n,r,o=function(t){return t&&t.Math==Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},c=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),s=Function.prototype.call,f=u?s.bind(s):function(){return s.apply(s,arguments)},l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,d={f:p&&!l.call({1:2},1)?function(t){var e=p(this,t);return!!e&&e.enumerable}:l},h=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v=Function.prototype,g=v.bind,m=v.call,y=u&&g.bind(m,m),b=u?function(t){return t&&y(t)}:function(t){return t&&function(){return m.apply(t,arguments)}},w=b({}.toString),j=b("".slice),E=function(t){return j(w(t),8,-1)},S=i.Object,O=b("".split),x=a((function(){return!S("z").propertyIsEnumerable(0)}))?function(t){return"String"==E(t)?O(t,""):S(t)}:S,T=i.TypeError,C=function(t){if(null==t)throw T("Can't call method on "+t);return t},P=function(t){return x(C(t))},R=function(t){return"function"==typeof t},A=function(t){return"object"==typeof t?null!==t:R(t)},L=function(t){return R(t)?t:void 0},I=function(t,e){return arguments.length<2?L(i[t]):i[t]&&i[t][e]},k=b({}.isPrototypeOf),N=I("navigator","userAgent")||"",M=i.process,U=i.Deno,B=M&&M.versions||U&&U.version,F=B&&B.v8;F&&(r=(n=F.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&N&&(!(n=N.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=N.match(/Chrome\/(\d+)/))&&(r=+n[1]);var D=r,_=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&D&&D<41})),q=_&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,z=i.Object,W=q?function(t){return"symbol"==typeof t}:function(t){var e=I("Symbol");return R(e)&&k(e.prototype,z(t))},G=i.String,H=function(t){try{return G(t)}catch(t){return"Object"}},V=i.TypeError,X=function(t){if(R(t))return t;throw V(H(t)+" is not a function")},K=function(t,e){var n=t[e];return null==n?void 0:X(n)},$=i.TypeError,J=Object.defineProperty,Y=function(t,e){try{J(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e},Q="__core-js_shared__",Z=i[Q]||Y(Q,{}),tt=e((function(t){(t.exports=function(t,e){return Z[t]||(Z[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"})})),et=i.Object,nt=function(t){return et(C(t))},rt=b({}.hasOwnProperty),ot=Object.hasOwn||function(t,e){return rt(nt(t),e)},it=0,at=Math.random(),ct=b(1..toString),ut=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ct(++it+at,36)},st=tt("wks"),ft=i.Symbol,lt=ft&&ft.for,pt=q?ft:ft&&ft.withoutSetter||ut,dt=function(t){if(!ot(st,t)||!_&&"string"!=typeof st[t]){var e="Symbol."+t;_&&ot(ft,t)?st[t]=ft[t]:st[t]=q&&lt?lt(e):pt(e)}return st[t]},ht=i.TypeError,vt=dt("toPrimitive"),gt=function(t,e){if(!A(t)||W(t))return t;var n,r=K(t,vt);if(r){if(void 0===e&&(e="default"),n=f(r,t,e),!A(n)||W(n))return n;throw ht("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&R(n=t.toString)&&!A(r=f(n,t)))return r;if(R(n=t.valueOf)&&!A(r=f(n,t)))return r;if("string"!==e&&R(n=t.toString)&&!A(r=f(n,t)))return r;throw $("Can't convert object to primitive value")}(t,e)},mt=function(t){var e=gt(t,"string");return W(e)?e:e+""},yt=i.document,bt=A(yt)&&A(yt.createElement),wt=function(t){return bt?yt.createElement(t):{}},jt=!c&&!a((function(){return 7!=Object.defineProperty(wt("div"),"a",{get:function(){return 7}}).a})),Et=Object.getOwnPropertyDescriptor,St={f:c?Et:function(t,e){if(t=P(t),e=mt(e),jt)try{return Et(t,e)}catch(t){}if(ot(t,e))return h(!f(d.f,t,e),t[e])}},Ot=c&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xt=i.String,Tt=i.TypeError,Ct=function(t){if(A(t))return t;throw Tt(xt(t)+" is not an object")},Pt=i.TypeError,Rt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,Lt="enumerable",It="configurable",kt="writable",Nt={f:c?Ot?function(t,e,n){if(Ct(t),e=mt(e),Ct(n),"function"==typeof t&&"prototype"===e&&"value"in n&&kt in n&&!n.writable){var r=At(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:It in n?n.configurable:r.configurable,enumerable:Lt in n?n.enumerable:r.enumerable,writable:!1})}return Rt(t,e,n)}:Rt:function(t,e,n){if(Ct(t),e=mt(e),Ct(n),jt)try{return Rt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Pt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Mt=c?function(t,e,n){return Nt.f(t,e,h(1,n))}:function(t,e,n){return t[e]=n,t},Ut=b(Function.toString);R(Z.inspectSource)||(Z.inspectSource=function(t){return Ut(t)});var Bt,Ft,Dt,_t=Z.inspectSource,qt=i.WeakMap,zt=R(qt)&&/native code/.test(_t(qt)),Wt=tt("keys"),Gt=function(t){return Wt[t]||(Wt[t]=ut(t))},Ht={},Vt="Object already initialized",Xt=i.TypeError,Kt=i.WeakMap;if(zt||Z.state){var $t=Z.state||(Z.state=new Kt),Jt=b($t.get),Yt=b($t.has),Qt=b($t.set);Bt=function(t,e){if(Yt($t,t))throw new Xt(Vt);return e.facade=t,Qt($t,t,e),e},Ft=function(t){return Jt($t,t)||{}},Dt=function(t){return Yt($t,t)}}else{var Zt=Gt("state");Ht[Zt]=!0,Bt=function(t,e){if(ot(t,Zt))throw new Xt(Vt);return e.facade=t,Mt(t,Zt,e),e},Ft=function(t){return ot(t,Zt)?t[Zt]:{}},Dt=function(t){return ot(t,Zt)}}var te={set:Bt,get:Ft,has:Dt,enforce:function(t){return Dt(t)?Ft(t):Bt(t,{})},getterFor:function(t){return function(e){var n;if(!A(e)||(n=Ft(e)).type!==t)throw Xt("Incompatible receiver, "+t+" required");return n}}},ee=Function.prototype,ne=c&&Object.getOwnPropertyDescriptor,re=ot(ee,"name"),oe={EXISTS:re,PROPER:re&&"something"===function(){}.name,CONFIGURABLE:re&&(!c||c&&ne(ee,"name").configurable)},ie=e((function(t){var e=oe.CONFIGURABLE,n=te.get,r=te.enforce,o=String(String).split("String");(t.exports=function(t,n,a,c){var u,s=!!c&&!!c.unsafe,f=!!c&&!!c.enumerable,l=!!c&&!!c.noTargetGet,p=c&&void 0!==c.name?c.name:n;R(a)&&("Symbol("===String(p).slice(0,7)&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ot(a,"name")||e&&a.name!==p)&&Mt(a,"name",p),(u=r(a)).source||(u.source=o.join("string"==typeof p?p:""))),t!==i?(s?!l&&t[n]&&(f=!0):delete t[n],f?t[n]=a:Mt(t,n,a)):f?t[n]=a:Y(n,a)})(Function.prototype,"toString",(function(){return R(this)&&n(this).source||_t(this)}))})),ae=Math.ceil,ce=Math.floor,ue=function(t){var e=+t;return e!=e||0===e?0:(e>0?ce:ae)(e)},se=Math.max,fe=Math.min,le=Math.min,pe=function(t){return t>0?le(ue(t),9007199254740991):0},de=function(t){return pe(t.length)},he=function(t){return function(e,n,r){var o,i=P(e),a=de(i),c=function(t,e){var n=ue(t);return n<0?se(n+e,0):fe(n,e)}(r,a);if(t&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},ve={includes:he(!0),indexOf:he(!1)},ge=ve.indexOf,me=b([].push),ye=function(t,e){var n,r=P(t),o=0,i=[];for(n in r)!ot(Ht,n)&&ot(r,n)&&me(i,n);for(;e.length>o;)ot(r,n=e[o++])&&(~ge(i,n)||me(i,n));return i},be=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],we=be.concat("length","prototype"),je={f:Object.getOwnPropertyNames||function(t){return ye(t,we)}},Ee={f:Object.getOwnPropertySymbols},Se=b([].concat),Oe=I("Reflect","ownKeys")||function(t){var e=je.f(Ct(t)),n=Ee.f;return n?Se(e,n(t)):e},xe=function(t,e,n){for(var r=Oe(e),o=Nt.f,i=St.f,a=0;a<r.length;a++){var c=r[a];ot(t,c)||n&&ot(n,c)||o(t,c,i(e,c))}},Te=/#|\.prototype\./,Ce=function(t,e){var n=Re[Pe(t)];return n==Le||n!=Ae&&(R(e)?a(e):!!e)},Pe=Ce.normalize=function(t){return String(t).replace(Te,".").toLowerCase()},Re=Ce.data={},Ae=Ce.NATIVE="N",Le=Ce.POLYFILL="P",Ie=Ce,ke=St.f,Ne=function(t,e){var n,r,o,a,c,u=t.target,s=t.global,f=t.stat;if(n=s?i:f?i[u]||Y(u,{}):(i[u]||{}).prototype)for(r in e){if(a=e[r],o=t.noTargetGet?(c=ke(n,r))&&c.value:n[r],!Ie(s?r:u+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof a==typeof o)continue;xe(a,o)}(t.sham||o&&o.sham)&&Mt(a,"sham",!0),ie(n,r,a,t)}},Me=function(t,e){var n=[][t];return!!n&&a((function(){n.call(null,e||function(){throw 1},1)}))},Ue=b([].join),Be=x!=Object,Fe=Me("join",",");Ne({target:"Array",proto:!0,forced:Be||!Fe},{join:function(t){return Ue(P(this),void 0===t?",":t)}});var De,_e=Object.keys||function(t){return ye(t,be)},qe={f:c&&!Ot?Object.defineProperties:function(t,e){Ct(t);for(var n,r=P(e),o=_e(e),i=o.length,a=0;i>a;)Nt.f(t,n=o[a++],r[n]);return t}},ze=I("document","documentElement"),We=Gt("IE_PROTO"),Ge=function(){},He=function(t){return"<script>"+t+"</"+"script>"},Ve=function(t){t.write(He("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xe=function(){try{De=new ActiveXObject("htmlfile")}catch(t){}var t,e;Xe="undefined"!=typeof document?document.domain&&De?Ve(De):((e=wt("iframe")).style.display="none",ze.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(He("document.F=Object")),t.close(),t.F):Ve(De);for(var n=be.length;n--;)delete Xe.prototype[be[n]];return Xe()};Ht[We]=!0;var Ke=Object.create||function(t,e){var n;return null!==t?(Ge.prototype=Ct(t),n=new Ge,Ge.prototype=null,n[We]=t):n=Xe(),void 0===e?n:qe.f(n,e)},$e=dt("unscopables"),Je=Array.prototype;null==Je[$e]&&Nt.f(Je,$e,{configurable:!0,value:Ke(null)});var Ye,Qe=ve.includes;Ne({target:"Array",proto:!0},{includes:function(t){return Qe(this,t,arguments.length>1?arguments[1]:void 0)}}),Ye="includes",Je[$e][Ye]=!0;var Ze={};Ze[dt("toStringTag")]="z";var tn,en,nn="[object z]"===String(Ze),rn=dt("toStringTag"),on=i.Object,an="Arguments"==E(function(){return arguments}()),cn=nn?E:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=on(t),rn))?n:an?E(e):"Object"==(r=E(e))&&R(e.callee)?"Arguments":r},un=i.String,sn=function(t){if("Symbol"===cn(t))throw TypeError("Cannot convert a Symbol value to a string");return un(t)},fn=function(){var t=Ct(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},ln=i.RegExp,pn=a((function(){var t=ln("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),dn=pn||a((function(){return!ln("a","y").sticky})),hn={BROKEN_CARET:pn||a((function(){var t=ln("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:dn,UNSUPPORTED_Y:pn},vn=i.RegExp,gn=a((function(){var t=vn(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),mn=i.RegExp,yn=a((function(){var t=mn("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),bn=te.get,wn=tt("native-string-replace",String.prototype.replace),jn=RegExp.prototype.exec,En=jn,Sn=b("".charAt),On=b("".indexOf),xn=b("".replace),Tn=b("".slice),Cn=(en=/b*/g,f(jn,tn=/a/,"a"),f(jn,en,"a"),0!==tn.lastIndex||0!==en.lastIndex),Pn=hn.BROKEN_CARET,Rn=void 0!==/()??/.exec("")[1];(Cn||Rn||Pn||gn||yn)&&(En=function(t){var e,n,r,o,i,a,c,u=this,s=bn(u),l=sn(t),p=s.raw;if(p)return p.lastIndex=u.lastIndex,e=f(En,p,l),u.lastIndex=p.lastIndex,e;var d=s.groups,h=Pn&&u.sticky,v=f(fn,u),g=u.source,m=0,y=l;if(h&&(v=xn(v,"y",""),-1===On(v,"g")&&(v+="g"),y=Tn(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Sn(l,u.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,m++),n=new RegExp("^(?:"+g+")",v)),Rn&&(n=new RegExp("^"+g+"$(?!\\s)",v)),Cn&&(r=u.lastIndex),o=f(jn,h?n:u,y),h?o?(o.input=Tn(o.input,m),o[0]=Tn(o[0],m),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:Cn&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),Rn&&o&&o.length>1&&f(wn,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=Ke(null),i=0;i<d.length;i++)a[(c=d[i])[0]]=o[c[1]];return o});Ne({target:"RegExp",proto:!0,forced:/./.exec!==En},{exec:En});var An,Ln=dt("match"),In=i.TypeError,kn=function(t){if(function(t){var e;return A(t)&&(void 0!==(e=t[Ln])?!!e:"RegExp"==E(t))}(t))throw In("The method doesn't accept regular expressions");return t},Nn=dt("match"),Mn=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Nn]=!1,"/./"[t](e)}catch(t){}}return!1},Un=St.f,Bn=b("".endsWith),Fn=b("".slice),Dn=Math.min,_n=Mn("endsWith");Ne({target:"String",proto:!0,forced:!!(_n||(An=Un(String.prototype,"endsWith"),!An||An.writable))&&!_n},{endsWith:function(t){var e=sn(C(this));kn(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,o=void 0===n?r:Dn(pe(n),r),i=sn(t);return Bn?Bn(e,i,o):Fn(e,o-i.length,o)===i}});var qn=St.f,zn=b("".startsWith),Wn=b("".slice),Gn=Math.min,Hn=Mn("startsWith");Ne({target:"String",proto:!0,forced:!(!Hn&&!!function(){var t=qn(String.prototype,"startsWith");return t&&!t.writable}())&&!Hn},{startsWith:function(t){var e=sn(C(this));kn(t);var n=pe(Gn(arguments.length>1?arguments[1]:void 0,e.length)),r=sn(t);return zn?zn(e,r,n):Wn(e,n,n+r.length)===r}});var Vn=nn?{}.toString:function(){return"[object "+cn(this)+"]"};nn||ie(Object.prototype,"toString",Vn,{unsafe:!0});var Xn=i.Promise,Kn=i.String,$n=i.TypeError,Jn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=b(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Ct(n),function(t){if("object"==typeof t||R(t))return t;throw $n("Can't set "+Kn(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),Yn=Nt.f,Qn=dt("toStringTag"),Zn=dt("species"),tr=i.TypeError,er=b(b.bind),nr=function(t,e){return X(t),void 0===e?t:u?er(t,e):function(){return t.apply(e,arguments)}},rr={},or=dt("iterator"),ir=Array.prototype,ar=dt("iterator"),cr=function(t){if(null!=t)return K(t,ar)||K(t,"@@iterator")||rr[cn(t)]},ur=i.TypeError,sr=function(t,e,n){var r,o;Ct(t);try{if(!(r=K(t,"return"))){if("throw"===e)throw n;return n}r=f(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Ct(r),n},fr=i.TypeError,lr=function(t,e){this.stopped=t,this.result=e},pr=lr.prototype,dr=function(t,e,n){var r,o,i,a,c,u,s,l,p=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),g=nr(e,p),m=function(t){return r&&sr(r,"normal",t),new lr(!0,t)},y=function(t){return d?(Ct(t),v?g(t[0],t[1],m):g(t[0],t[1])):v?g(t,m):g(t)};if(h)r=t;else{if(!(o=cr(t)))throw fr(H(t)+" is not iterable");if(void 0!==(l=o)&&(rr.Array===l||ir[or]===l)){for(i=0,a=de(t);a>i;i++)if((c=y(t[i]))&&k(pr,c))return c;return new lr(!1)}r=function(t,e){var n=arguments.length<2?cr(t):e;if(X(n))return Ct(f(n,t));throw ur(H(t)+" is not iterable")}(t,o)}for(u=r.next;!(s=f(u,r)).done;){try{c=y(s.value)}catch(t){sr(r,"throw",t)}if("object"==typeof c&&c&&k(pr,c))return c}return new lr(!1)},hr=dt("iterator"),vr=!1;try{var gr=0,mr={next:function(){return{done:!!gr++}},return:function(){vr=!0}};mr[hr]=function(){return this},Array.from(mr,(function(){throw 2}))}catch(t){}var yr=function(){},br=[],wr=I("Reflect","construct"),jr=/^\s*(?:class|function)\b/,Er=b(jr.exec),Sr=!jr.exec(yr),Or=function(t){if(!R(t))return!1;try{return wr(yr,br,t),!0}catch(t){return!1}},xr=function(t){if(!R(t))return!1;switch(cn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Sr||!!Er(jr,_t(t))}catch(t){return!0}};xr.sham=!0;var Tr,Cr,Pr,Rr,Ar=!wr||a((function(){var t;return Or(Or.call)||!Or(Object)||!Or((function(){t=!0}))||t}))?xr:Or,Lr=i.TypeError,Ir=dt("species"),kr=function(t,e){var n,r=Ct(t).constructor;return void 0===r||null==(n=Ct(r)[Ir])?e:function(t){if(Ar(t))return t;throw Lr(H(t)+" is not a constructor")}(n)},Nr=Function.prototype,Mr=Nr.apply,Ur=Nr.call,Br="object"==typeof Reflect&&Reflect.apply||(u?Ur.bind(Mr):function(){return Ur.apply(Mr,arguments)}),Fr=b([].slice),Dr=/(?:ipad|iphone|ipod).*applewebkit/i.test(N),_r="process"==E(i.process),qr=i.setImmediate,zr=i.clearImmediate,Wr=i.process,Gr=i.Dispatch,Hr=i.Function,Vr=i.MessageChannel,Xr=i.String,Kr=0,$r={},Jr="onreadystatechange";try{Tr=i.location}catch(t){}var Yr=function(t){if(ot($r,t)){var e=$r[t];delete $r[t],e()}},Qr=function(t){return function(){Yr(t)}},Zr=function(t){Yr(t.data)},to=function(t){i.postMessage(Xr(t),Tr.protocol+"//"+Tr.host)};qr&&zr||(qr=function(t){var e=Fr(arguments,1);return $r[++Kr]=function(){Br(R(t)?t:Hr(t),void 0,e)},Cr(Kr),Kr},zr=function(t){delete $r[t]},_r?Cr=function(t){Wr.nextTick(Qr(t))}:Gr&&Gr.now?Cr=function(t){Gr.now(Qr(t))}:Vr&&!Dr?(Rr=(Pr=new Vr).port2,Pr.port1.onmessage=Zr,Cr=nr(Rr.postMessage,Rr)):i.addEventListener&&R(i.postMessage)&&!i.importScripts&&Tr&&"file:"!==Tr.protocol&&!a(to)?(Cr=to,i.addEventListener("message",Zr,!1)):Cr=Jr in wt("script")?function(t){ze.appendChild(wt("script")).onreadystatechange=function(){ze.removeChild(this),Yr(t)}}:function(t){setTimeout(Qr(t),0)});var eo,no,ro,oo,io,ao,co,uo,so={set:qr,clear:zr},fo=/ipad|iphone|ipod/i.test(N)&&void 0!==i.Pebble,lo=/web0s(?!.*chrome)/i.test(N),po=St.f,ho=so.set,vo=i.MutationObserver||i.WebKitMutationObserver,go=i.document,mo=i.process,yo=i.Promise,bo=po(i,"queueMicrotask"),wo=bo&&bo.value;wo||(eo=function(){var t,e;for(_r&&(t=mo.domain)&&t.exit();no;){e=no.fn,no=no.next;try{e()}catch(t){throw no?oo():ro=void 0,t}}ro=void 0,t&&t.enter()},Dr||_r||lo||!vo||!go?!fo&&yo&&yo.resolve?((co=yo.resolve(void 0)).constructor=yo,uo=nr(co.then,co),oo=function(){uo(eo)}):_r?oo=function(){mo.nextTick(eo)}:(ho=nr(ho,i),oo=function(){ho(eo)}):(io=!0,ao=go.createTextNode(""),new vo(eo).observe(ao,{characterData:!0}),oo=function(){ao.data=io=!io}));var jo=wo||function(t){var e={fn:t,next:void 0};ro&&(ro.next=e),no||(no=e,oo()),ro=e},Eo=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=X(e),this.reject=X(n)},So={f:function(t){return new Eo(t)}},Oo=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},xo=function(){this.head=null,this.tail=null};xo.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}};var To,Co,Po,Ro,Ao,Lo,Io,ko=xo,No="object"==typeof window,Mo=so.set,Uo=dt("species"),Bo="Promise",Fo=te.getterFor(Bo),Do=te.set,_o=te.getterFor(Bo),qo=Xn&&Xn.prototype,zo=Xn,Wo=qo,Go=i.TypeError,Ho=i.document,Vo=i.process,Xo=So.f,Ko=Xo,$o=!!(Ho&&Ho.createEvent&&i.dispatchEvent),Jo=R(i.PromiseRejectionEvent),Yo="unhandledrejection",Qo=!1,Zo=Ie(Bo,(function(){var t=_t(zo),e=t!==String(zo);if(!e&&66===D)return!0;if(D>=51&&/native code/.test(t))return!1;var n=new zo((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Uo]=r,!(Qo=n.then((function(){}))instanceof r)||!e&&No&&!Jo})),ti=Zo||!function(t,e){if(!e&&!vr)return!1;var n=!1;try{var r={};r[hr]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){zo.all(t).catch((function(){}))})),ei=function(t){var e;return!(!A(t)||!R(e=t.then))&&e},ni=function(t,e){var n,r,o,i=e.value,a=1==e.state,c=a?t.ok:t.fail,u=t.resolve,s=t.reject,l=t.domain;try{c?(a||(2===e.rejection&&ci(e),e.rejection=1),!0===c?n=i:(l&&l.enter(),n=c(i),l&&(l.exit(),o=!0)),n===t.promise?s(Go("Promise-chain cycle")):(r=ei(n))?f(r,n,u,s):u(n)):s(i)}catch(t){l&&!o&&l.exit(),s(t)}},ri=function(t,e){t.notified||(t.notified=!0,jo((function(){for(var n,r=t.reactions;n=r.get();)ni(n,t);t.notified=!1,e&&!t.rejection&&ii(t)})))},oi=function(t,e,n){var r,o;$o?((r=Ho.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),i.dispatchEvent(r)):r={promise:e,reason:n},!Jo&&(o=i["on"+t])?o(r):t===Yo&&function(t,e){var n=i.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},ii=function(t){f(Mo,i,(function(){var e,n=t.facade,r=t.value;if(ai(t)&&(e=Oo((function(){_r?Vo.emit("unhandledRejection",r,n):oi(Yo,n,r)})),t.rejection=_r||ai(t)?2:1,e.error))throw e.value}))},ai=function(t){return 1!==t.rejection&&!t.parent},ci=function(t){f(Mo,i,(function(){var e=t.facade;_r?Vo.emit("rejectionHandled",e):oi("rejectionhandled",e,t.value)}))},ui=function(t,e,n){return function(r){t(e,r,n)}},si=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ri(t,!0))},fi=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Go("Promise can't be resolved itself");var r=ei(e);r?jo((function(){var n={done:!1};try{f(r,e,ui(fi,n,t),ui(si,n,t))}catch(e){si(n,e,t)}})):(t.value=e,t.state=1,ri(t,!1))}catch(e){si({done:!1},e,t)}}};if(Zo&&(Wo=(zo=function(t){!function(t,e){if(k(e,t))return t;throw tr("Incorrect invocation")}(this,Wo),X(t),f(To,this);var e=Fo(this);try{t(ui(fi,e),ui(si,e))}catch(t){si(e,t)}}).prototype,(To=function(t){Do(this,{type:Bo,done:!1,notified:!1,parent:!1,reactions:new ko,rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)ie(t,r,e[r],n);return t}(Wo,{then:function(t,e){var n=_o(this),r=Xo(kr(this,zo));return n.parent=!0,r.ok=!R(t)||t,r.fail=R(e)&&e,r.domain=_r?Vo.domain:void 0,0==n.state?n.reactions.add(r):jo((function(){ni(r,n)})),r.promise},catch:function(t){return this.then(void 0,t)}}),Co=function(){var t=new To,e=Fo(t);this.promise=t,this.resolve=ui(fi,e),this.reject=ui(si,e)},So.f=Xo=function(t){return t===zo||t===Po?new Co(t):Ko(t)},R(Xn)&&qo!==Object.prototype)){Ro=qo.then,Qo||(ie(qo,"then",(function(t,e){var n=this;return new zo((function(t,e){f(Ro,n,t,e)})).then(t,e)}),{unsafe:!0}),ie(qo,"catch",Wo.catch,{unsafe:!0}));try{delete qo.constructor}catch(t){}Jn&&Jn(qo,Wo)}Ne({global:!0,wrap:!0,forced:Zo},{Promise:zo}),Lo=Bo,Io=!1,(Ao=zo)&&!Io&&(Ao=Ao.prototype),Ao&&!ot(Ao,Qn)&&Yn(Ao,Qn,{configurable:!0,value:Lo}),function(t){var e=I(t),n=Nt.f;c&&e&&!e[Zn]&&n(e,Zn,{configurable:!0,get:function(){return this}})}(Bo),Po=I(Bo),Ne({target:Bo,stat:!0,forced:Zo},{reject:function(t){var e=Xo(this);return f(e.reject,void 0,t),e.promise}}),Ne({target:Bo,stat:!0,forced:Zo},{resolve:function(t){return function(t,e){if(Ct(t),A(e)&&e.constructor===t)return e;var n=So.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),Ne({target:Bo,stat:!0,forced:ti},{all:function(t){var e=this,n=Xo(e),r=n.resolve,o=n.reject,i=Oo((function(){var n=X(e.resolve),i=[],a=0,c=1;dr(t,(function(t){var u=a++,s=!1;c++,f(n,e,t).then((function(t){s||(s=!0,i[u]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Xo(e),r=n.reject,o=Oo((function(){var o=X(e.resolve);dr(t,(function(t){f(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var li=Object.assign,pi=Object.defineProperty,di=b([].concat),hi=!li||a((function(){if(c&&1!==li({b:1},li(pi({},"a",{enumerable:!0,get:function(){pi(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=li({},t)[n]||_e(li({},e)).join("")!=r}))?function(t,e){for(var n=nt(t),r=arguments.length,o=1,i=Ee.f,a=d.f;r>o;)for(var u,s=x(arguments[o++]),l=i?di(_e(s),i(s)):_e(s),p=l.length,h=0;p>h;)u=l[h++],c&&!f(a,s,u)||(n[u]=s[u]);return n}:li;Ne({target:"Object",stat:!0,forced:Object.assign!==hi},{assign:hi});var vi,gi=Array.isArray||function(t){return"Array"==E(t)},mi=function(t,e,n){var r=mt(e);r in t?Nt.f(t,r,h(0,n)):t[r]=n},yi=dt("species"),bi=i.Array,wi=function(t,e){return new(function(t){var e;return gi(t)&&(e=t.constructor,(Ar(e)&&(e===bi||gi(e.prototype))||A(e)&&null===(e=e[yi]))&&(e=void 0)),void 0===e?bi:e}(t))(0===e?0:e)},ji=dt("species"),Ei=dt("isConcatSpreadable"),Si=9007199254740991,Oi="Maximum allowed index exceeded",xi=i.TypeError,Ti=D>=51||!a((function(){var t=[];return t[Ei]=!1,t.concat()[0]!==t})),Ci=(vi="concat",D>=51||!a((function(){var t=[];return(t.constructor={})[ji]=function(){return{foo:1}},1!==t[vi](Boolean).foo}))),Pi=function(t){if(!A(t))return!1;var e=t[Ei];return void 0!==e?!!e:gi(t)};Ne({target:"Array",proto:!0,forced:!Ti||!Ci},{concat:function(t){var e,n,r,o,i,a=nt(this),c=wi(a,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Pi(i=-1===e?a:arguments[e])){if(u+(o=de(i))>Si)throw xi(Oi);for(n=0;n<o;n++,u++)n in i&&mi(c,u,i[n])}else{if(u>=Si)throw xi(Oi);mi(c,u++,i)}return c.length=u,c}}),Ne({target:"Object",stat:!0,forced:a((function(){_e(1)}))},{keys:function(t){return _e(nt(t))}});var Ri=oe.EXISTS,Ai=Nt.f,Li=Function.prototype,Ii=b(Li.toString),ki=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ni=b(ki.exec);c&&!Ri&&Ai(Li,"name",{configurable:!0,get:function(){try{return Ni(ki,Ii(this))[1]}catch(t){return""}}});var Mi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ui=wt("span").classList,Bi=Ui&&Ui.constructor&&Ui.constructor.prototype,Fi=Bi===Object.prototype?void 0:Bi,Di=b([].push),_i=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,a=7==t,c=5==t||i;return function(u,s,f,l){for(var p,d,h=nt(u),v=x(h),g=nr(s,f),m=de(v),y=0,b=l||wi,w=e?b(u,m):n||a?b(u,0):void 0;m>y;y++)if((c||y in v)&&(d=g(p=v[y],y,h),t))if(e)w[y]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return y;case 2:Di(w,p)}else switch(t){case 4:return!1;case 7:Di(w,p)}return i?-1:r||o?o:w}},qi={forEach:_i(0),map:_i(1),filter:_i(2),some:_i(3),every:_i(4),find:_i(5),findIndex:_i(6),filterReject:_i(7)}.forEach,zi=Me("forEach")?[].forEach:function(t){return qi(this,t,arguments.length>1?arguments[1]:void 0)},Wi=function(t){if(t&&t.forEach!==zi)try{Mt(t,"forEach",zi)}catch(e){t.forEach=zi}};for(var Gi in Mi)Mi[Gi]&&Wi(i[Gi]&&i[Gi].prototype);Wi(Fi);var Hi=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}},Vi=Object.prototype.toString;function Xi(t){return"[object Array]"===Vi.call(t)}function Ki(t){return void 0===t}function $i(t){return null!==t&&"object"==typeof t}function Ji(t){if("[object Object]"!==Vi.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function Yi(t){return"[object Function]"===Vi.call(t)}function Qi(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),Xi(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var Zi={isArray:Xi,isArrayBuffer:function(t){return"[object ArrayBuffer]"===Vi.call(t)},isBuffer:function(t){return null!==t&&!Ki(t)&&null!==t.constructor&&!Ki(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:$i,isPlainObject:Ji,isUndefined:Ki,isDate:function(t){return"[object Date]"===Vi.call(t)},isFile:function(t){return"[object File]"===Vi.call(t)},isBlob:function(t){return"[object Blob]"===Vi.call(t)},isFunction:Yi,isStream:function(t){return $i(t)&&Yi(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:Qi,merge:function t(){var e={};function n(n,r){Ji(e[r])&&Ji(n)?e[r]=t(e[r],n):Ji(n)?e[r]=t({},n):Xi(n)?e[r]=n.slice():e[r]=n}for(var r=0,o=arguments.length;r<o;r++)Qi(arguments[r],n);return e},extend:function(t,e,n){return Qi(e,(function(e,r){t[r]=n&&"function"==typeof e?Hi(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}};function ta(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var ea=function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(Zi.isURLSearchParams(e))r=e.toString();else{var o=[];Zi.forEach(e,(function(t,e){null!=t&&(Zi.isArray(t)?e+="[]":t=[t],Zi.forEach(t,(function(t){Zi.isDate(t)?t=t.toISOString():Zi.isObject(t)&&(t=JSON.stringify(t)),o.push(ta(e)+"="+ta(t))})))})),r=o.join("&")}if(r){var i=t.indexOf("#");-1!==i&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t};function na(){this.handlers=[]}na.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},na.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},na.prototype.forEach=function(t){Zi.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var ra=na,oa=function(t,e,n){return Zi.forEach(n,(function(n){t=n(t,e)})),t},ia=function(t){return!(!t||!t.__CANCEL__)},aa=function(t,e){Zi.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))},ca=function(t,e,n,r,o){return function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t.isAxiosError=!0,t.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}},t}(new Error(t),e,n,r,o)},ua=Zi.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),Zi.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Zi.isString(r)&&a.push("path="+r),Zi.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},sa=["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"],fa=Zi.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(t){var r=t;return e&&(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 t=r(window.location.href),function(e){var n=Zi.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},la=function(t){return new Promise((function(e,n){var r=t.data,o=t.headers;Zi.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(t.auth){var a=t.auth.username||"",c=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.Authorization="Basic "+btoa(a+":"+c)}var u,s,f=(u=t.baseURL,s=t.url,u&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(s)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(u,s):s);if(i.open(t.method.toUpperCase(),ea(f,t.params,t.paramsSerializer),!0),i.timeout=t.timeout,i.onreadystatechange=function(){if(i&&4===i.readyState&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in i?function(t){var e,n,r,o={};return t?(Zi.forEach(t.split("\n"),(function(t){if(r=t.indexOf(":"),e=Zi.trim(t.substr(0,r)).toLowerCase(),n=Zi.trim(t.substr(r+1)),e){if(o[e]&&sa.indexOf(e)>=0)return;o[e]="set-cookie"===e?(o[e]?o[e]:[]).concat([n]):o[e]?o[e]+", "+n:n}})),o):o}(i.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:i.status,statusText:i.statusText,headers:r,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(ca("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,o),i=null}},i.onabort=function(){i&&(n(ca("Request aborted",t,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(ca("Network Error",t,null,i)),i=null},i.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(ca(e,t,"ECONNABORTED",i)),i=null},Zi.isStandardBrowserEnv()){var l=(t.withCredentials||fa(f))&&t.xsrfCookieName?ua.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}if("setRequestHeader"in i&&Zi.forEach(o,(function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)})),Zi.isUndefined(t.withCredentials)||(i.withCredentials=!!t.withCredentials),t.responseType)try{i.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&i.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&i.upload&&i.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){i&&(i.abort(),n(t),i=null)})),r||(r=null),i.send(r)}))},pa={"Content-Type":"application/x-www-form-urlencoded"};function da(t,e){!Zi.isUndefined(t)&&Zi.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var ha,va={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(ha=la),ha),transformRequest:[function(t,e){return aa(e,"Accept"),aa(e,"Content-Type"),Zi.isFormData(t)||Zi.isArrayBuffer(t)||Zi.isBuffer(t)||Zi.isStream(t)||Zi.isFile(t)||Zi.isBlob(t)?t:Zi.isArrayBufferView(t)?t.buffer:Zi.isURLSearchParams(t)?(da(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):Zi.isObject(t)?(da(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};va.headers={common:{Accept:"application/json, text/plain, */*"}},Zi.forEach(["delete","get","head"],(function(t){va.headers[t]={}})),Zi.forEach(["post","put","patch"],(function(t){va.headers[t]=Zi.merge(pa)}));var ga=va;function ma(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var ya=function(t){return ma(t),t.headers=t.headers||{},t.data=oa(t.data,t.headers,t.transformRequest),t.headers=Zi.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Zi.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||ga.adapter)(t).then((function(e){return ma(t),e.data=oa(e.data,e.headers,t.transformResponse),e}),(function(e){return ia(e)||(ma(t),e&&e.response&&(e.response.data=oa(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},ba=function(t,e){e=e||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function c(t,e){return Zi.isPlainObject(t)&&Zi.isPlainObject(e)?Zi.merge(t,e):Zi.isPlainObject(e)?Zi.merge({},e):Zi.isArray(e)?e.slice():e}function u(r){Zi.isUndefined(e[r])?Zi.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(t[r],e[r])}Zi.forEach(r,(function(t){Zi.isUndefined(e[t])||(n[t]=c(void 0,e[t]))})),Zi.forEach(o,u),Zi.forEach(i,(function(r){Zi.isUndefined(e[r])?Zi.isUndefined(t[r])||(n[r]=c(void 0,t[r])):n[r]=c(void 0,e[r])})),Zi.forEach(a,(function(r){r in e?n[r]=c(t[r],e[r]):r in t&&(n[r]=c(void 0,t[r]))}));var s=r.concat(o).concat(i).concat(a),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===s.indexOf(t)}));return Zi.forEach(f,u),n};function wa(t){this.defaults=t,this.interceptors={request:new ra,response:new ra}}wa.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=ba(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[ya,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},wa.prototype.getUri=function(t){return t=ba(this.defaults,t),ea(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},Zi.forEach(["delete","get","head","options"],(function(t){wa.prototype[t]=function(e,n){return this.request(ba(n||{},{method:t,url:e,data:(n||{}).data}))}})),Zi.forEach(["post","put","patch"],(function(t){wa.prototype[t]=function(e,n,r){return this.request(ba(r||{},{method:t,url:e,data:n}))}}));var ja=wa;function Ea(t){this.message=t}Ea.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Ea.prototype.__CANCEL__=!0;var Sa=Ea;function Oa(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new Sa(t),e(n.reason))}))}Oa.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Oa.source=function(){var t;return{token:new Oa((function(e){t=e})),cancel:t}};var xa=Oa;function Ta(t){var e=new ja(t),n=Hi(ja.prototype.request,e);return Zi.extend(n,ja.prototype,e),Zi.extend(n,e),n}var Ca=Ta(ga);Ca.Axios=ja,Ca.create=function(t){return Ta(ba(Ca.defaults,t))},Ca.Cancel=Sa,Ca.CancelToken=xa,Ca.isCancel=ia,Ca.all=function(t){return Promise.all(t)},Ca.spread=function(t){return function(e){return t.apply(null,e)}},Ca.isAxiosError=function(t){return"object"==typeof t&&!0===t.isAxiosError};var Pa=Ca,Ra=Ca;Pa.default=Ra;var Aa=Pa,La=["v2","v3","v4","canary"],Ia="@tryghost/content-api";return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,c=e.key;if(r&&(console.warn("".concat(Ia,": The 'host' parameter is deprecated, please use 'url' instead")),n||(n=r)),this instanceof t)return t({url:n,version:a,key:c});if(!a)throw new Error("".concat(Ia," Config Missing: 'version' is required. E.g. ").concat(La.join(",")));if(!La.includes(a))throw new Error("".concat(Ia," Config Invalid: 'version' ").concat(a," is not supported"));if(!n)throw new Error("".concat(Ia," Config Missing: 'url' is required. E.g. 'https://site.com'"));if(!/https?:\/\//.test(n))throw new Error("".concat(Ia," Config Invalid: 'url' ").concat(n," requires a protocol. E.g. 'https://site.com'"));if(n.endsWith("/"))throw new Error("".concat(Ia," Config Invalid: 'url' ").concat(n," must not have a trailing slash. E.g. 'https://site.com'"));if(i.endsWith("/")||i.startsWith("/"))throw new Error("".concat(Ia," Config Invalid: 'ghostPath' ").concat(i," must not have a leading or trailing slash. E.g. 'ghost'"));if(c&&!/[0-9a-f]{26}/.test(c))throw new Error("".concat(Ia," Config Invalid: 'key' ").concat(c," must have 26 hex characters"));var u=["posts","authors","tags","pages","settings"].reduce((function(t,e){return Object.assign(t,function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,{read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t||!t.id&&!t.slug)return Promise.reject(new Error("".concat(Ia," read requires an id or slug.")));var o=Object.assign({},t,n);return s(e,o,t.id||"slug/".concat(t.slug),r)},browse:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return s(e,t,null,n)}}))}),{});return delete u.settings.read,u;function s(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!c)return Promise.reject(new Error("".concat(Ia," Config Missing: 'key' is required.")));delete e.id;var u=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return Aa.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:c},e),paramsSerializer:function(t){return Object.keys(t).reduce((function(e,n){var r=encodeURIComponent([].concat(t[n]).join(","));return e.concat("".concat(n,"=").concat(r))}),[]).join("&")},headers:u}).then((function(e){return Array.isArray(e.data[t])?1!==e.data[t].length||e.data.meta?Object.assign(e.data[t],{meta:e.data.meta}):e.data[t][0]:e.data[t]})).catch((function(t){if(t.response&&t.response.data&&t.response.data.errors){var e=t.response.data.errors[0],n=new Error(e.message),r=Object.keys(e);throw n.name=e.type,r.forEach((function(t){n[t]=e[t]})),n.response=t.response,n.request=t.request,n.config=t.config,n}throw t}))}}}));
2
2
  //# sourceMappingURL=content-api.min.js.map