@tryghost/content-api
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "@tryghost/content-api", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"repository": "https://github.com/TryGhost/Ghost-SDKs/tree/master/packages/content-api", | ||
@@ -33,21 +33,21 @@ "author": "Ghost Foundation", | ||
"devDependencies": { | ||
"@babel/core": "^7.2.2", | ||
"@babel/polyfill": "^7.2.5", | ||
"@babel/preset-env": "^7.2.3", | ||
"eslint-plugin-ghost": "0.1.0", | ||
"mocha": "5.2.0", | ||
"rollup": "^1.0.1", | ||
"rollup-plugin-babel": "^4.2.0", | ||
"rollup-plugin-commonjs": "^9.2.0", | ||
"rollup-plugin-node-resolve": "^4.0.0", | ||
"rollup-plugin-replace": "^2.1.0", | ||
"rollup-plugin-terser": "^4.0.1", | ||
"@babel/core": "7.4.3", | ||
"@babel/polyfill": "7.4.3", | ||
"@babel/preset-env": "7.4.3", | ||
"eslint-plugin-ghost": "0.2.0", | ||
"mocha": "6.1.3", | ||
"rollup": "1.10.0", | ||
"rollup-plugin-babel": "4.3.2", | ||
"rollup-plugin-commonjs": "9.3.4", | ||
"rollup-plugin-node-resolve": "4.2.3", | ||
"rollup-plugin-replace": "2.2.0", | ||
"rollup-plugin-terser": "4.0.4", | ||
"should": "13.2.3", | ||
"sinon": "7.0.0" | ||
"sinon": "7.3.1" | ||
}, | ||
"dependencies": { | ||
"axios": "0.18.0", | ||
"ghost-ignition": "^2.9.6" | ||
"ghost-ignition": "^3.0.0" | ||
}, | ||
"gitHead": "3e8a73b0d7e70e3b8dfe803fd7dc56428a42064b" | ||
"gitHead": "56ac49beb9c80c0736470ee4eb6ce5faa65dea23" | ||
} |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).GhostContentAPI=e()}(this,function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),n=t(function(t){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)}),r=(n.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),o=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t},i=function(t){try{return!!t()}catch(t){return!0}},a=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),s=e.document,c=r(s)&&r(s.createElement),u=function(t){return c?s.createElement(t):{}},f=!a&&!i(function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}),l=Object.defineProperty,h={f:a?Object.defineProperty:function(t,e,n){if(o(t),e=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}(e,!0),o(n),f)try{return l(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}},p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d=a?function(t,e,n){return h.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},v={}.hasOwnProperty,y=function(t,e){return v.call(t,e)},m=0,g=Math.random(),w=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++m+g).toString(36))},b=t(function(t){var r=e["__core-js_shared__"]||(e["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),S=b("native-function-to-string",Function.toString),j=t(function(t){var r=w("src"),o=(""+S).split("toString");n.inspectSource=function(t){return S.call(t)},(t.exports=function(t,n,i,a){var s="function"==typeof i;s&&(y(i,"name")||d(i,"name",n)),t[n]!==i&&(s&&(y(i,r)||d(i,r,t[n]?""+t[n]:o.join(String(n)))),t===e?t[n]=i:a?t[n]?t[n]=i:d(t,n,i):(delete t[n],d(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||S.call(this)})}),_=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},E=function(t,e,n){if(_(t),void 0===e)return t;switch(n){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)}},P=function(t,r,o){var i,a,s,c,u=t&P.F,f=t&P.G,l=t&P.S,h=t&P.P,p=t&P.B,v=f?e:l?e[r]||(e[r]={}):(e[r]||{}).prototype,y=f?n:n[r]||(n[r]={}),m=y.prototype||(y.prototype={});for(i in f&&(o=r),o)s=((a=!u&&v&&void 0!==v[i])?v:o)[i],c=p&&a?E(s,e):h&&"function"==typeof s?E(Function.call,s):s,v&&j(v,i,s,t&P.U),y[i]!=s&&d(y,i,c),h&&m[i]!=s&&(m[i]=s)};e.core=n,P.F=1,P.G=2,P.S=4,P.P=8,P.B=16,P.W=32,P.U=64,P.R=128;var O,A,C,x,T,k,L,R,M,F=P,I={}.toString,q=function(t){return I.call(t).slice(8,-1)},B=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==q(t)?t.split(""):Object(t)},N=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},U=function(t){return Object(N(t))},D=Math.ceil,G=Math.floor,W=function(t){return isNaN(t=+t)?0:(t>0?G:D)(t)},H=Math.min,V=function(t){return t>0?H(W(t),9007199254740991):0},z=Array.isArray||function(t){return"Array"==q(t)},X=t(function(t){var n=b("wks"),r=e.Symbol,o="function"==typeof r;(t.exports=function(t){return n[t]||(n[t]=o&&r[t]||(o?r:w)("Symbol."+t))}).store=n}),K=X("species"),J=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})},$=(C=1==(O=0),x=2==O,T=3==O,k=4==O,L=6==O,R=5==O||L,M=A||function(t,e){return new(function(t){var e;return z(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!z(e.prototype)||(e=void 0),r(e)&&null===(e=e[K])&&(e=void 0)),void 0===e?Array:e}(t))(e)},function(t,e,n){for(var r,o,i=U(t),a=B(i),s=E(e,n,3),c=V(a.length),u=0,f=C?M(t,c):x?M(t,0):void 0;c>u;u++)if((R||u in a)&&(o=s(r=a[u],u,i),O))if(C)f[u]=o;else if(o)switch(O){case 3:return!0;case 5:return r;case 6:return u;case 2:f.push(r)}else if(k)return!1;return L?-1:T||k?k:f}),Q=J([].forEach,!0);F(F.P+F.F*!Q,"Array",{forEach:function(t){return $(this,t,arguments[1])}}),F(F.S,"Array",{isArray:z});var Y=X("unscopables"),Z=Array.prototype;null==Z[Y]&&d(Z,Y,{});var tt=function(t){Z[Y][t]=!0},et=function(t,e){return{value:e,done:!!t}},nt={},rt=function(t){return B(N(t))},ot=Math.max,it=Math.min,at=function(t){return function(e,n,r){var o,i=rt(e),a=V(i.length),s=function(t,e){return(t=W(t))<0?ot(t+e,0):it(t,e)}(r,a);if(t&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===n)return t||s||0;return!t&&-1}},st=b("keys"),ct=function(t){return st[t]||(st[t]=w(t))},ut=at(!1),ft=ct("IE_PROTO"),lt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ht=Object.keys||function(t){return function(t,e){var n,r=rt(t),o=0,i=[];for(n in r)n!=ft&&y(r,n)&&i.push(n);for(;e.length>o;)y(r,n=e[o++])&&(~ut(i,n)||i.push(n));return i}(t,lt)},pt=a?Object.defineProperties:function(t,e){o(t);for(var n,r=ht(e),i=r.length,a=0;i>a;)h.f(t,n=r[a++],e[n]);return t},dt=e.document,vt=dt&&dt.documentElement,yt=ct("IE_PROTO"),mt=function(){},gt=function(){var t,e=u("iframe"),n=lt.length;for(e.style.display="none",vt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),gt=t.F;n--;)delete gt.prototype[lt[n]];return gt()},wt=Object.create||function(t,e){var n;return null!==t?(mt.prototype=o(t),n=new mt,mt.prototype=null,n[yt]=t):n=gt(),void 0===e?n:pt(n,e)},bt=h.f,St=X("toStringTag"),jt=function(t,e,n){t&&!y(t=n?t:t.prototype,St)&&bt(t,St,{configurable:!0,value:e})},_t={};d(_t,X("iterator"),function(){return this});var Et=function(t,e,n){t.prototype=wt(_t,{next:p(1,n)}),jt(t,e+" Iterator")},Pt=ct("IE_PROTO"),Ot=Object.prototype,At=Object.getPrototypeOf||function(t){return t=U(t),y(t,Pt)?t[Pt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ot:null},Ct=X("iterator"),xt=!([].keys&&"next"in[].keys()),Tt=function(){return this},kt=function(t,e,n,r,o,i,a){Et(n,e,r);var s,c,u,f=function(t){if(!xt&&t in v)return v[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==o,p=!1,v=t.prototype,y=v[Ct]||v["@@iterator"]||o&&v[o],m=y||f(o),g=o?h?f("entries"):m:void 0,w="Array"==e&&v.entries||y;if(w&&(u=At(w.call(new t)))!==Object.prototype&&u.next&&(jt(u,l,!0),"function"!=typeof u[Ct]&&d(u,Ct,Tt)),h&&y&&"values"!==y.name&&(p=!0,m=function(){return y.call(this)}),(xt||p||!v[Ct])&&d(v,Ct,m),nt[e]=m,nt[l]=Tt,o)if(s={values:h?m:f("values"),keys:i?m:f("keys"),entries:g},a)for(c in s)c in v||j(v,c,s[c]);else F(F.P+F.F*(xt||p),e,s);return s}(Array,"Array",function(t,e){this._t=rt(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,et(1)):et(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");nt.Arguments=nt.Array,tt("keys"),tt("values"),tt("entries");for(var Lt=X("iterator"),Rt=X("toStringTag"),Mt=nt.Array,Ft={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},It=ht(Ft),qt=0;qt<It.length;qt++){var Bt,Nt=It[qt],Ut=Ft[Nt],Dt=e[Nt],Gt=Dt&&Dt.prototype;if(Gt&&(Gt[Lt]||d(Gt,Lt,Mt),Gt[Rt]||d(Gt,Rt,Nt),nt[Nt]=Mt,Ut))for(Bt in kt)Gt[Bt]||j(Gt,Bt,kt[Bt],!0)}var Wt,Ht,Vt,zt;Wt="keys",Ht=function(){return function(t){return ht(U(t))}},Vt=(n.Object||{})[Wt]||Object[Wt],(zt={})[Wt]=Ht(Vt),F(F.S+F.F*i(function(){Vt(1)}),"Object",zt);var Xt={f:Object.getOwnPropertySymbols},Kt={f:{}.propertyIsEnumerable},Jt=Object.assign,$t=!Jt||i(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Jt({},t)[n]||Object.keys(Jt({},e)).join("")!=r})?function(t,e){for(var n=U(t),r=arguments.length,o=1,i=Xt.f,a=Kt.f;r>o;)for(var s,c=B(arguments[o++]),u=i?ht(c).concat(i(c)):ht(c),f=u.length,l=0;f>l;)a.call(c,s=u[l++])&&(n[s]=c[s]);return n}:Jt;F(F.S+F.F,"Object",{assign:$t});var Qt,Yt,Zt,te=X("toStringTag"),ee="Arguments"==q(function(){return arguments}()),ne=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),te))?n:ee?q(e):"Object"==(r=q(e))&&"function"==typeof e.callee?"Arguments":r},re=function(t,e,n,r){try{return r?e(o(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&o(i.call(t)),e}},oe=X("iterator"),ie=Array.prototype,ae=X("iterator"),se=n.getIteratorMethod=function(t){if(null!=t)return t[ae]||t["@@iterator"]||nt[ne(t)]},ce=t(function(t){var e={},n={},r=t.exports=function(t,r,i,a,s){var c,u,f,l,h,p=s?function(){return t}:se(t),d=E(i,a,r?2:1),v=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(void 0===(h=p)||nt.Array!==h&&ie[oe]!==h){for(f=p.call(t);!(u=f.next()).done;)if((l=re(f,d,u.value,r))===e||l===n)return l}else for(c=V(t.length);c>v;v++)if((l=r?d(o(u=t[v])[0],u[1]):d(t[v]))===e||l===n)return l};r.BREAK=e,r.RETURN=n}),ue=X("species"),fe=e.process,le=e.setImmediate,he=e.clearImmediate,pe=e.MessageChannel,de=e.Dispatch,ve=0,ye={},me=function(){var t=+this;if(ye.hasOwnProperty(t)){var e=ye[t];delete ye[t],e()}},ge=function(t){me.call(t.data)};le&&he||(le=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return ye[++ve]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},Qt(ve),ve},he=function(t){delete ye[t]},"process"==q(fe)?Qt=function(t){fe.nextTick(E(me,t,1))}:de&&de.now?Qt=function(t){de.now(E(me,t,1))}:pe?(Zt=(Yt=new pe).port2,Yt.port1.onmessage=ge,Qt=E(Zt.postMessage,Zt,1)):e.addEventListener&&"function"==typeof postMessage&&!e.importScripts?(Qt=function(t){e.postMessage(t+"","*")},e.addEventListener("message",ge,!1)):Qt="onreadystatechange"in u("script")?function(t){vt.appendChild(u("script")).onreadystatechange=function(){vt.removeChild(this),me.call(t)}}:function(t){setTimeout(E(me,t,1),0)});var we={set:le,clear:he},be=we.set,Se=e.MutationObserver||e.WebKitMutationObserver,je=e.process,_e=e.Promise,Ee="process"==q(je);function Pe(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=_(e),this.reject=_(n)}var Oe={f:function(t){return new Pe(t)}},Ae=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Ce=e.navigator,xe=Ce&&Ce.userAgent||"",Te=X("species"),ke=X("iterator"),Le=!1;try{[7][ke]().return=function(){Le=!0}}catch(t){}var Re,Me,Fe,Ie,qe=we.set,Be=function(){var t,n,r,o=function(){var e,o;for(Ee&&(e=je.domain)&&e.exit();t;){o=t.fn,t=t.next;try{o()}catch(e){throw t?r():n=void 0,e}}n=void 0,e&&e.enter()};if(Ee)r=function(){je.nextTick(o)};else if(!Se||e.navigator&&e.navigator.standalone)if(_e&&_e.resolve){var i=_e.resolve(void 0);r=function(){i.then(o)}}else r=function(){be.call(e,o)};else{var a=!0,s=document.createTextNode("");new Se(o).observe(s,{characterData:!0}),r=function(){s.data=a=!a}}return function(e){var o={fn:e,next:void 0};n&&(n.next=o),t||(t=o,r()),n=o}}(),Ne=e.TypeError,Ue=e.process,De=Ue&&Ue.versions,Ge=De&&De.v8||"",We=e.Promise,He="process"==ne(Ue),Ve=function(){},ze=Me=Oe.f,Xe=!!function(){try{var t=We.resolve(1),e=(t.constructor={})[X("species")]=function(t){t(Ve,Ve)};return(He||"function"==typeof PromiseRejectionEvent)&&t.then(Ve)instanceof e&&0!==Ge.indexOf("6.6")&&-1===xe.indexOf("Chrome/66")}catch(t){}}(),Ke=function(t){var e;return!(!r(t)||"function"!=typeof(e=t.then))&&e},Je=function(t,e){if(!t._n){t._n=!0;var n=t._c;Be(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&Ye(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(Ne("Promise-chain cycle")):(i=Ke(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&$e(t)})}},$e=function(t){qe.call(e,function(){var n,r,o,i=t._v,a=Qe(t);if(a&&(n=Ae(function(){He?Ue.emit("unhandledRejection",i,t):(r=e.onunhandledrejection)?r({promise:t,reason:i}):(o=e.console)&&o.error&&o.error("Unhandled promise rejection",i)}),t._h=He||Qe(t)?2:1),t._a=void 0,a&&n.e)throw n.v})},Qe=function(t){return 1!==t._h&&0===(t._a||t._c).length},Ye=function(t){qe.call(e,function(){var n;He?Ue.emit("rejectionHandled",t):(n=e.onrejectionhandled)&&n({promise:t,reason:t._v})})},Ze=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Je(e,!0))},tn=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw Ne("Promise can't be resolved itself");(e=Ke(t))?Be(function(){var r={_w:n,_d:!1};try{e.call(t,E(tn,r,1),E(Ze,r,1))}catch(t){Ze.call(r,t)}}):(n._v=t,n._s=1,Je(n,!1))}catch(t){Ze.call({_w:n,_d:!1},t)}}};Xe||(We=function(t){!function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!")}(this,We,"Promise","_h"),_(t),Re.call(this);try{t(E(tn,this,1),E(Ze,this,1))}catch(t){Ze.call(this,t)}},(Re=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)j(t,r,e[r],n);return t}(We.prototype,{then:function(t,e){var n,r,i,a=ze((n=We,void 0===(i=o(this).constructor)||null==(r=o(i)[ue])?n:_(r)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=He?Ue.domain:void 0,this._c.push(a),this._a&&this._a.push(a),this._s&&Je(this,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),Fe=function(){var t=new Re;this.promise=t,this.resolve=E(tn,t,1),this.reject=E(Ze,t,1)},Oe.f=ze=function(t){return t===We||t===Ie?new Fe(t):Me(t)}),F(F.G+F.W+F.F*!Xe,{Promise:We}),jt(We,"Promise"),function(t){var n=e[t];a&&n&&!n[Te]&&h.f(n,Te,{configurable:!0,get:function(){return this}})}("Promise"),Ie=n.Promise,F(F.S+F.F*!Xe,"Promise",{reject:function(t){var e=ze(this);return(0,e.reject)(t),e.promise}}),F(F.S+F.F*!Xe,"Promise",{resolve:function(t){return function(t,e){if(o(t),r(e)&&e.constructor===t)return e;var n=Oe.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),F(F.S+F.F*!(Xe&&function(t,e){if(!e&&!Le)return!1;var n=!1;try{var r=[7],o=r[ke]();o.next=function(){return{done:n=!0}},r[ke]=function(){return o},t(r)}catch(t){}return n}(function(t){We.all(t).catch(Ve)})),"Promise",{all:function(t){var e=this,n=ze(e),r=n.resolve,o=n.reject,i=Ae(function(){var n=[],i=0,a=1;ce(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=ze(e),r=n.reject,o=Ae(function(){ce(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}});F(F.P+F.F*!J([].reduce,!0),"Array",{reduce:function(t){return function(t,e,n,r,o){_(e);var i=U(t),a=B(i),s=V(i.length),c=o?s-1:0,u=o?-1:1;if(n<2)for(;;){if(c in a){r=a[c],c+=u;break}if(c+=u,o?c<0:s<=c)throw TypeError("Reduce of empty array with no initial value")}for(;o?c>=0:s>c;c+=u)c in a&&(r=e(r,a[c],c,i));return r}(this,t,arguments.length,arguments[1],!1)}});var en=X("match"),nn=function(t,e,n){if(r(o=e)&&(void 0!==(i=o[en])?i:"RegExp"==q(o)))throw TypeError("String#"+n+" doesn't accept regex!");var o,i;return String(N(t))},rn=X("match"),on=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[rn]=!1,!"/./"[t](e)}catch(t){}}return!0},an="".startsWith;F(F.P+F.F*on("startsWith"),"String",{startsWith:function(t){var e=nn(this,t,"startsWith"),n=V(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return an?an.call(e,r,n):e.slice(n,n+r.length)===r}});var sn="".endsWith;F(F.P+F.F*on("endsWith"),"String",{endsWith:function(t){var e=nn(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=V(e.length),o=void 0===n?r:Math.min(V(n),r),i=String(t);return sn?sn.call(e,i,o):e.slice(o-i.length,o)===i}});var cn=at(!0);F(F.P,"Array",{includes:function(t){return cn(this,t,arguments.length>1?arguments[1]:void 0)}}),tt("includes");var un=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)}};function fn(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var ln=Object.prototype.toString;function hn(t){return"[object Array]"===ln.call(t)}function pn(t){return null!==t&&"object"==typeof t}function dn(t){return"[object Function]"===ln.call(t)}function vn(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),hn(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 yn={isArray:hn,isArrayBuffer:function(t){return"[object ArrayBuffer]"===ln.call(t)},isBuffer:function(t){return null!=t&&(fn(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&fn(t.slice(0,0))}(t)||!!t._isBuffer)},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:pn,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===ln.call(t)},isFile:function(t){return"[object File]"===ln.call(t)},isBlob:function(t){return"[object Blob]"===ln.call(t)},isFunction:dn,isStream:function(t){return pn(t)&&dn(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:vn,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)vn(arguments[r],n);return e},extend:function(t,e,n){return vn(e,function(e,r){t[r]=n&&"function"==typeof e?un(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}},mn=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}(new Error(t),e,n,r,o)};function gn(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var wn=["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"],bn=yn.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=yn.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},Sn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function jn(){this.message="String contains an invalid character"}jn.prototype=new Error,jn.prototype.code=5,jn.prototype.name="InvalidCharacterError";var _n=function(t){for(var e,n,r=String(t),o="",i=0,a=Sn;r.charAt(0|i)||(a="=",i%1);o+=a.charAt(63&e>>8-i%1*8)){if((n=r.charCodeAt(i+=.75))>255)throw new jn;e=e<<8|n}return o},En=yn.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),yn.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),yn.isString(r)&&a.push("path="+r),yn.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(){}},Pn="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||_n,On=function(t){return new Promise(function(e,n){var r=t.data,o=t.headers;yn.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest,a="onreadystatechange",s=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in i||bn(t.url)||(i=new window.XDomainRequest,a="onload",s=!0,i.onprogress=function(){},i.ontimeout=function(){}),t.auth){var c=t.auth.username||"",u=t.auth.password||"";o.Authorization="Basic "+Pn(c+":"+u)}if(i.open(t.method.toUpperCase(),function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(yn.isURLSearchParams(e))r=e.toString();else{var o=[];yn.forEach(e,function(t,e){null!=t&&(yn.isArray(t)?e+="[]":t=[t],yn.forEach(t,function(t){yn.isDate(t)?t=t.toISOString():yn.isObject(t)&&(t=JSON.stringify(t)),o.push(gn(e)+"="+gn(t))}))}),r=o.join("&")}return r&&(t+=(-1===t.indexOf("?")?"?":"&")+r),t}(t.url,t.params,t.paramsSerializer),!0),i.timeout=t.timeout,i[a]=function(){if(i&&(4===i.readyState||s)&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var r,o,a,c,u,f="getAllResponseHeaders"in i?(r=i.getAllResponseHeaders(),u={},r?(yn.forEach(r.split("\n"),function(t){if(c=t.indexOf(":"),o=yn.trim(t.substr(0,c)).toLowerCase(),a=yn.trim(t.substr(c+1)),o){if(u[o]&&wn.indexOf(o)>=0)return;u[o]="set-cookie"===o?(u[o]?u[o]:[]).concat([a]):u[o]?u[o]+", "+a:a}}),u):u):null,l={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:1223===i.status?204:i.status,statusText:1223===i.status?"No Content":i.statusText,headers:f,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(mn("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,l),i=null}},i.onerror=function(){n(mn("Network Error",t,null,i)),i=null},i.ontimeout=function(){n(mn("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",i)),i=null},yn.isStandardBrowserEnv()){var f=En,l=(t.withCredentials||bn(t.url))&&t.xsrfCookieName?f.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}if("setRequestHeader"in i&&yn.forEach(o,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)}),t.withCredentials&&(i.withCredentials=!0),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)}),void 0===r&&(r=null),i.send(r)})},An={"Content-Type":"application/x-www-form-urlencoded"};function Cn(t,e){!yn.isUndefined(t)&&yn.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var xn,Tn={adapter:("undefined"!=typeof XMLHttpRequest?xn=On:"undefined"!=typeof process&&(xn=On),xn),transformRequest:[function(t,e){return function(t,e){yn.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}(e,"Content-Type"),yn.isFormData(t)||yn.isArrayBuffer(t)||yn.isBuffer(t)||yn.isStream(t)||yn.isFile(t)||yn.isBlob(t)?t:yn.isArrayBufferView(t)?t.buffer:yn.isURLSearchParams(t)?(Cn(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):yn.isObject(t)?(Cn(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,validateStatus:function(t){return t>=200&&t<300}};Tn.headers={common:{Accept:"application/json, text/plain, */*"}},yn.forEach(["delete","get","head"],function(t){Tn.headers[t]={}}),yn.forEach(["post","put","patch"],function(t){Tn.headers[t]=yn.merge(An)});var kn=Tn;function Ln(){this.handlers=[]}Ln.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},Ln.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},Ln.prototype.forEach=function(t){yn.forEach(this.handlers,function(e){null!==e&&t(e)})};var Rn=Ln,Mn=function(t,e,n){return yn.forEach(n,function(n){t=n(t,e)}),t},Fn=function(t){return!(!t||!t.__CANCEL__)};function In(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var qn=function(t){var e,n,r;return In(t),t.baseURL&&(r=t.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r))&&(t.url=(e=t.baseURL,(n=t.url)?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e)),t.headers=t.headers||{},t.data=Mn(t.data,t.headers,t.transformRequest),t.headers=yn.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),yn.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||kn.adapter)(t).then(function(e){return In(t),e.data=Mn(e.data,e.headers,t.transformResponse),e},function(e){return Fn(e)||(In(t),e&&e.response&&(e.response.data=Mn(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})};function Bn(t){this.defaults=t,this.interceptors={request:new Rn,response:new Rn}}Bn.prototype.request=function(t){"string"==typeof t&&(t=yn.merge({url:arguments[0]},arguments[1])),(t=yn.merge(kn,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[qn,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},yn.forEach(["delete","get","head","options"],function(t){Bn.prototype[t]=function(e,n){return this.request(yn.merge(n||{},{method:t,url:e}))}}),yn.forEach(["post","put","patch"],function(t){Bn.prototype[t]=function(e,n,r){return this.request(yn.merge(r||{},{method:t,url:e,data:n}))}});var Nn=Bn;function Un(t){this.message=t}Un.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Un.prototype.__CANCEL__=!0;var Dn=Un;function Gn(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 Dn(t),e(n.reason))})}Gn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Gn.source=function(){var t;return{token:new Gn(function(e){t=e}),cancel:t}};var Wn=Gn;function Hn(t){var e=new Nn(t),n=un(Nn.prototype.request,e);return yn.extend(n,Nn.prototype,e),yn.extend(n,e),n}var Vn=Hn(kn);Vn.Axios=Nn,Vn.create=function(t){return Hn(yn.merge(kn,t))},Vn.Cancel=Dn,Vn.CancelToken=Wn,Vn.isCancel=Fn,Vn.all=function(t){return Promise.all(t)},Vn.spread=function(t){return function(e){return t.apply(null,e)}};var zn=Vn,Xn=Vn;zn.default=Xn;var Kn=zn,Jn=["v2"];return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,s=e.key;if(r&&(console.warn("GhostAdminAPI's `host` parameter is deprecated, please use `url` instead"),n||(n=r)),this instanceof t)return t({url:n,version:a,key:s});if(!a)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "version" like "v2"');if(!Jn.includes(a))throw new Error("GhostContentAPI Config Invalid: @tryghost/content-api does not support the supplied version");if(!n)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "url" like "https://site.com" or "https://site.com/blog"');if(!/https?:\/\//.test(n))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" with a protocol like "https://site.com" or "https://site.com/blog"');if(n.endsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" without a trailing slash like "https://site.com" or "https://site.com/blog"');if(i.endsWith("/")||i.startsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "ghostPath" without a leading or trailing slash like "ghost"');if(s&&!/[0-9a-f]{26}/.test(s))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "key" with 26 hex characters');var c=["posts","authors","tags","pages","settings"].reduce(function(t,e){return Object.assign(t,(o={read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t)return Promise.reject(new Error("Missing data"));if(!t.id&&!t.slug)return Promise.reject(new Error("Must include either data.id or data.slug"));var o=Object.assign({},t,n);return u(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 u(e,t,null,n)}},(r=e)in(n={})?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o},{});return delete c.settings.read,c;function u(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!s)return Promise.reject(new Error("GhostContentAPI Config Missing: @tryghost/content-api was instantiated without a content key"));delete e.id;var c=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return Kn.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:s},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:c}).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})}}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).GhostContentAPI=e()}(this,function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var e=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),n=t(function(t){var e=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=e)}),r=(n.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),o=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t},i=function(t){try{return!!t()}catch(t){return!0}},a=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),s=e.document,c=r(s)&&r(s.createElement),u=function(t){return c?s.createElement(t):{}},f=!a&&!i(function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}),l=Object.defineProperty,h={f:a?Object.defineProperty:function(t,e,n){if(o(t),e=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}(e,!0),o(n),f)try{return l(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}},p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},d=a?function(t,e,n){return h.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},v={}.hasOwnProperty,y=function(t,e){return v.call(t,e)},m=0,g=Math.random(),w=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++m+g).toString(36))},b=t(function(t){var r=e["__core-js_shared__"]||(e["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),S=b("native-function-to-string",Function.toString),j=t(function(t){var r=w("src"),o=(""+S).split("toString");n.inspectSource=function(t){return S.call(t)},(t.exports=function(t,n,i,a){var s="function"==typeof i;s&&(y(i,"name")||d(i,"name",n)),t[n]!==i&&(s&&(y(i,r)||d(i,r,t[n]?""+t[n]:o.join(String(n)))),t===e?t[n]=i:a?t[n]?t[n]=i:d(t,n,i):(delete t[n],d(t,n,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[r]||S.call(this)})}),_=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},E=function(t,e,n){if(_(t),void 0===e)return t;switch(n){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)}},P=function(t,r,o){var i,a,s,c,u=t&P.F,f=t&P.G,l=t&P.S,h=t&P.P,p=t&P.B,v=f?e:l?e[r]||(e[r]={}):(e[r]||{}).prototype,y=f?n:n[r]||(n[r]={}),m=y.prototype||(y.prototype={});for(i in f&&(o=r),o)s=((a=!u&&v&&void 0!==v[i])?v:o)[i],c=p&&a?E(s,e):h&&"function"==typeof s?E(Function.call,s):s,v&&j(v,i,s,t&P.U),y[i]!=s&&d(y,i,c),h&&m[i]!=s&&(m[i]=s)};e.core=n,P.F=1,P.G=2,P.S=4,P.P=8,P.B=16,P.W=32,P.U=64,P.R=128;var O,A,C,x,T,k,L,R,M,F=P,I={}.toString,q=function(t){return I.call(t).slice(8,-1)},B=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==q(t)?t.split(""):Object(t)},N=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},U=function(t){return Object(N(t))},D=Math.ceil,G=Math.floor,W=function(t){return isNaN(t=+t)?0:(t>0?G:D)(t)},H=Math.min,z=function(t){return t>0?H(W(t),9007199254740991):0},V=Array.isArray||function(t){return"Array"==q(t)},X=t(function(t){var n=b("wks"),r=e.Symbol,o="function"==typeof r;(t.exports=function(t){return n[t]||(n[t]=o&&r[t]||(o?r:w)("Symbol."+t))}).store=n}),K=X("species"),J=function(t,e){return!!t&&i(function(){e?t.call(null,function(){},1):t.call(null)})},$=(C=1==(O=0),x=2==O,T=3==O,k=4==O,L=6==O,R=5==O||L,M=A||function(t,e){return new(function(t){var e;return V(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!V(e.prototype)||(e=void 0),r(e)&&null===(e=e[K])&&(e=void 0)),void 0===e?Array:e}(t))(e)},function(t,e,n){for(var r,o,i=U(t),a=B(i),s=E(e,n,3),c=z(a.length),u=0,f=C?M(t,c):x?M(t,0):void 0;c>u;u++)if((R||u in a)&&(o=s(r=a[u],u,i),O))if(C)f[u]=o;else if(o)switch(O){case 3:return!0;case 5:return r;case 6:return u;case 2:f.push(r)}else if(k)return!1;return L?-1:T||k?k:f}),Q=J([].forEach,!0);F(F.P+F.F*!Q,"Array",{forEach:function(t){return $(this,t,arguments[1])}});var Y=h.f,Z=Function.prototype,tt=/^\s*function ([^ (]*)/;"name"in Z||a&&Y(Z,"name",{configurable:!0,get:function(){try{return(""+this).match(tt)[1]}catch(t){return""}}}),F(F.S,"Array",{isArray:V});var et=X("unscopables"),nt=Array.prototype;null==nt[et]&&d(nt,et,{});var rt=function(t){nt[et][t]=!0},ot=function(t,e){return{value:e,done:!!t}},it={},at=function(t){return B(N(t))},st=Math.max,ct=Math.min,ut=function(t){return function(e,n,r){var o,i=at(e),a=z(i.length),s=function(t,e){return(t=W(t))<0?st(t+e,0):ct(t,e)}(r,a);if(t&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===n)return t||s||0;return!t&&-1}},ft=b("keys"),lt=function(t){return ft[t]||(ft[t]=w(t))},ht=ut(!1),pt=lt("IE_PROTO"),dt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),vt=Object.keys||function(t){return function(t,e){var n,r=at(t),o=0,i=[];for(n in r)n!=pt&&y(r,n)&&i.push(n);for(;e.length>o;)y(r,n=e[o++])&&(~ht(i,n)||i.push(n));return i}(t,dt)},yt=a?Object.defineProperties:function(t,e){o(t);for(var n,r=vt(e),i=r.length,a=0;i>a;)h.f(t,n=r[a++],e[n]);return t},mt=e.document,gt=mt&&mt.documentElement,wt=lt("IE_PROTO"),bt=function(){},St=function(){var t,e=u("iframe"),n=dt.length;for(e.style.display="none",gt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),St=t.F;n--;)delete St.prototype[dt[n]];return St()},jt=Object.create||function(t,e){var n;return null!==t?(bt.prototype=o(t),n=new bt,bt.prototype=null,n[wt]=t):n=St(),void 0===e?n:yt(n,e)},_t=h.f,Et=X("toStringTag"),Pt=function(t,e,n){t&&!y(t=n?t:t.prototype,Et)&&_t(t,Et,{configurable:!0,value:e})},Ot={};d(Ot,X("iterator"),function(){return this});var At=function(t,e,n){t.prototype=jt(Ot,{next:p(1,n)}),Pt(t,e+" Iterator")},Ct=lt("IE_PROTO"),xt=Object.prototype,Tt=Object.getPrototypeOf||function(t){return t=U(t),y(t,Ct)?t[Ct]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?xt:null},kt=X("iterator"),Lt=!([].keys&&"next"in[].keys()),Rt=function(){return this},Mt=function(t,e,n,r,o,i,a){At(n,e,r);var s,c,u,f=function(t){if(!Lt&&t in v)return v[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==o,p=!1,v=t.prototype,y=v[kt]||v["@@iterator"]||o&&v[o],m=y||f(o),g=o?h?f("entries"):m:void 0,w="Array"==e&&v.entries||y;if(w&&(u=Tt(w.call(new t)))!==Object.prototype&&u.next&&(Pt(u,l,!0),"function"!=typeof u[kt]&&d(u,kt,Rt)),h&&y&&"values"!==y.name&&(p=!0,m=function(){return y.call(this)}),(Lt||p||!v[kt])&&d(v,kt,m),it[e]=m,it[l]=Rt,o)if(s={values:h?m:f("values"),keys:i?m:f("keys"),entries:g},a)for(c in s)c in v||j(v,c,s[c]);else F(F.P+F.F*(Lt||p),e,s);return s}(Array,"Array",function(t,e){this._t=at(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,ot(1)):ot(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");it.Arguments=it.Array,rt("keys"),rt("values"),rt("entries");for(var Ft=X("iterator"),It=X("toStringTag"),qt=it.Array,Bt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Nt=vt(Bt),Ut=0;Ut<Nt.length;Ut++){var Dt,Gt=Nt[Ut],Wt=Bt[Gt],Ht=e[Gt],zt=Ht&&Ht.prototype;if(zt&&(zt[Ft]||d(zt,Ft,qt),zt[It]||d(zt,It,Gt),it[Gt]=qt,Wt))for(Dt in Mt)zt[Dt]||j(zt,Dt,Mt[Dt],!0)}var Vt,Xt,Kt,Jt;Vt="keys",Xt=function(){return function(t){return vt(U(t))}},Kt=(n.Object||{})[Vt]||Object[Vt],(Jt={})[Vt]=Xt(Kt),F(F.S+F.F*i(function(){Kt(1)}),"Object",Jt);var $t={f:Object.getOwnPropertySymbols},Qt={f:{}.propertyIsEnumerable},Yt=Object.assign,Zt=!Yt||i(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=Yt({},t)[n]||Object.keys(Yt({},e)).join("")!=r})?function(t,e){for(var n=U(t),r=arguments.length,o=1,i=$t.f,a=Qt.f;r>o;)for(var s,c=B(arguments[o++]),u=i?vt(c).concat(i(c)):vt(c),f=u.length,l=0;f>l;)a.call(c,s=u[l++])&&(n[s]=c[s]);return n}:Yt;F(F.S+F.F,"Object",{assign:Zt});var te,ee,ne,re=X("toStringTag"),oe="Arguments"==q(function(){return arguments}()),ie=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),re))?n:oe?q(e):"Object"==(r=q(e))&&"function"==typeof e.callee?"Arguments":r},ae=function(t,e,n,r){try{return r?e(o(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&o(i.call(t)),e}},se=X("iterator"),ce=Array.prototype,ue=X("iterator"),fe=n.getIteratorMethod=function(t){if(null!=t)return t[ue]||t["@@iterator"]||it[ie(t)]},le=t(function(t){var e={},n={},r=t.exports=function(t,r,i,a,s){var c,u,f,l,h,p=s?function(){return t}:fe(t),d=E(i,a,r?2:1),v=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(void 0===(h=p)||it.Array!==h&&ce[se]!==h){for(f=p.call(t);!(u=f.next()).done;)if((l=ae(f,d,u.value,r))===e||l===n)return l}else for(c=z(t.length);c>v;v++)if((l=r?d(o(u=t[v])[0],u[1]):d(t[v]))===e||l===n)return l};r.BREAK=e,r.RETURN=n}),he=X("species"),pe=e.process,de=e.setImmediate,ve=e.clearImmediate,ye=e.MessageChannel,me=e.Dispatch,ge=0,we={},be=function(){var t=+this;if(we.hasOwnProperty(t)){var e=we[t];delete we[t],e()}},Se=function(t){be.call(t.data)};de&&ve||(de=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return we[++ge]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},te(ge),ge},ve=function(t){delete we[t]},"process"==q(pe)?te=function(t){pe.nextTick(E(be,t,1))}:me&&me.now?te=function(t){me.now(E(be,t,1))}:ye?(ne=(ee=new ye).port2,ee.port1.onmessage=Se,te=E(ne.postMessage,ne,1)):e.addEventListener&&"function"==typeof postMessage&&!e.importScripts?(te=function(t){e.postMessage(t+"","*")},e.addEventListener("message",Se,!1)):te="onreadystatechange"in u("script")?function(t){gt.appendChild(u("script")).onreadystatechange=function(){gt.removeChild(this),be.call(t)}}:function(t){setTimeout(E(be,t,1),0)});var je={set:de,clear:ve},_e=je.set,Ee=e.MutationObserver||e.WebKitMutationObserver,Pe=e.process,Oe=e.Promise,Ae="process"==q(Pe);function Ce(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=_(e),this.reject=_(n)}var xe={f:function(t){return new Ce(t)}},Te=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},ke=e.navigator,Le=ke&&ke.userAgent||"",Re=X("species"),Me=X("iterator"),Fe=!1;try{[7][Me]().return=function(){Fe=!0}}catch(t){}var Ie,qe,Be,Ne,Ue=je.set,De=function(){var t,n,r,o=function(){var e,o;for(Ae&&(e=Pe.domain)&&e.exit();t;){o=t.fn,t=t.next;try{o()}catch(e){throw t?r():n=void 0,e}}n=void 0,e&&e.enter()};if(Ae)r=function(){Pe.nextTick(o)};else if(!Ee||e.navigator&&e.navigator.standalone)if(Oe&&Oe.resolve){var i=Oe.resolve(void 0);r=function(){i.then(o)}}else r=function(){_e.call(e,o)};else{var a=!0,s=document.createTextNode("");new Ee(o).observe(s,{characterData:!0}),r=function(){s.data=a=!a}}return function(e){var o={fn:e,next:void 0};n&&(n.next=o),t||(t=o,r()),n=o}}(),Ge=e.TypeError,We=e.process,He=We&&We.versions,ze=He&&He.v8||"",Ve=e.Promise,Xe="process"==ie(We),Ke=function(){},Je=qe=xe.f,$e=!!function(){try{var t=Ve.resolve(1),e=(t.constructor={})[X("species")]=function(t){t(Ke,Ke)};return(Xe||"function"==typeof PromiseRejectionEvent)&&t.then(Ke)instanceof e&&0!==ze.indexOf("6.6")&&-1===Le.indexOf("Chrome/66")}catch(t){}}(),Qe=function(t){var e;return!(!r(t)||"function"!=typeof(e=t.then))&&e},Ye=function(t,e){if(!t._n){t._n=!0;var n=t._c;De(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&en(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(Ge("Promise-chain cycle")):(i=Qe(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&Ze(t)})}},Ze=function(t){Ue.call(e,function(){var n,r,o,i=t._v,a=tn(t);if(a&&(n=Te(function(){Xe?We.emit("unhandledRejection",i,t):(r=e.onunhandledrejection)?r({promise:t,reason:i}):(o=e.console)&&o.error&&o.error("Unhandled promise rejection",i)}),t._h=Xe||tn(t)?2:1),t._a=void 0,a&&n.e)throw n.v})},tn=function(t){return 1!==t._h&&0===(t._a||t._c).length},en=function(t){Ue.call(e,function(){var n;Xe?We.emit("rejectionHandled",t):(n=e.onrejectionhandled)&&n({promise:t,reason:t._v})})},nn=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Ye(e,!0))},rn=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw Ge("Promise can't be resolved itself");(e=Qe(t))?De(function(){var r={_w:n,_d:!1};try{e.call(t,E(rn,r,1),E(nn,r,1))}catch(t){nn.call(r,t)}}):(n._v=t,n._s=1,Ye(n,!1))}catch(t){nn.call({_w:n,_d:!1},t)}}};$e||(Ve=function(t){!function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!")}(this,Ve,"Promise","_h"),_(t),Ie.call(this);try{t(E(rn,this,1),E(nn,this,1))}catch(t){nn.call(this,t)}},(Ie=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=function(t,e,n){for(var r in e)j(t,r,e[r],n);return t}(Ve.prototype,{then:function(t,e){var n,r,i,a=Je((n=Ve,void 0===(i=o(this).constructor)||null==(r=o(i)[he])?n:_(r)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=Xe?We.domain:void 0,this._c.push(a),this._a&&this._a.push(a),this._s&&Ye(this,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),Be=function(){var t=new Ie;this.promise=t,this.resolve=E(rn,t,1),this.reject=E(nn,t,1)},xe.f=Je=function(t){return t===Ve||t===Ne?new Be(t):qe(t)}),F(F.G+F.W+F.F*!$e,{Promise:Ve}),Pt(Ve,"Promise"),function(t){var n=e[t];a&&n&&!n[Re]&&h.f(n,Re,{configurable:!0,get:function(){return this}})}("Promise"),Ne=n.Promise,F(F.S+F.F*!$e,"Promise",{reject:function(t){var e=Je(this);return(0,e.reject)(t),e.promise}}),F(F.S+F.F*!$e,"Promise",{resolve:function(t){return function(t,e){if(o(t),r(e)&&e.constructor===t)return e;var n=xe.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),F(F.S+F.F*!($e&&function(t,e){if(!e&&!Fe)return!1;var n=!1;try{var r=[7],o=r[Me]();o.next=function(){return{done:n=!0}},r[Me]=function(){return o},t(r)}catch(t){}return n}(function(t){Ve.all(t).catch(Ke)})),"Promise",{all:function(t){var e=this,n=Je(e),r=n.resolve,o=n.reject,i=Te(function(){var n=[],i=0,a=1;le(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=Je(e),r=n.reject,o=Te(function(){le(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}});var on={};on[X("toStringTag")]="z",on+""!="[object z]"&&j(Object.prototype,"toString",function(){return"[object "+ie(this)+"]"},!0);F(F.P+F.F*!J([].reduce,!0),"Array",{reduce:function(t){return function(t,e,n,r,o){_(e);var i=U(t),a=B(i),s=z(i.length),c=o?s-1:0,u=o?-1:1;if(n<2)for(;;){if(c in a){r=a[c],c+=u;break}if(c+=u,o?c<0:s<=c)throw TypeError("Reduce of empty array with no initial value")}for(;o?c>=0:s>c;c+=u)c in a&&(r=e(r,a[c],c,i));return r}(this,t,arguments.length,arguments[1],!1)}});var an=X("match"),sn=function(t,e,n){if(r(o=e)&&(void 0!==(i=o[an])?i:"RegExp"==q(o)))throw TypeError("String#"+n+" doesn't accept regex!");var o,i;return String(N(t))},cn=X("match"),un=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[cn]=!1,!"/./"[t](e)}catch(t){}}return!0},fn="".startsWith;F(F.P+F.F*un("startsWith"),"String",{startsWith:function(t){var e=sn(this,t,"startsWith"),n=z(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return fn?fn.call(e,r,n):e.slice(n,n+r.length)===r}});var ln="".endsWith;F(F.P+F.F*un("endsWith"),"String",{endsWith:function(t){var e=sn(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=z(e.length),o=void 0===n?r:Math.min(z(n),r),i=String(t);return ln?ln.call(e,i,o):e.slice(o-i.length,o)===i}});var hn=ut(!0);F(F.P,"Array",{includes:function(t){return hn(this,t,arguments.length>1?arguments[1]:void 0)}}),rt("includes");var pn=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)}};function dn(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var vn=Object.prototype.toString;function yn(t){return"[object Array]"===vn.call(t)}function mn(t){return null!==t&&"object"==typeof t}function gn(t){return"[object Function]"===vn.call(t)}function wn(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),yn(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 bn={isArray:yn,isArrayBuffer:function(t){return"[object ArrayBuffer]"===vn.call(t)},isBuffer:function(t){return null!=t&&(dn(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&dn(t.slice(0,0))}(t)||!!t._isBuffer)},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:mn,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===vn.call(t)},isFile:function(t){return"[object File]"===vn.call(t)},isBlob:function(t){return"[object Blob]"===vn.call(t)},isFunction:gn,isStream:function(t){return mn(t)&&gn(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:wn,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)wn(arguments[r],n);return e},extend:function(t,e,n){return wn(e,function(e,r){t[r]=n&&"function"==typeof e?pn(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}},Sn=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}(new Error(t),e,n,r,o)};function jn(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var _n=["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"],En=bn.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=bn.isString(e)?r(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function On(){this.message="String contains an invalid character"}On.prototype=new Error,On.prototype.code=5,On.prototype.name="InvalidCharacterError";var An=function(t){for(var e,n,r=String(t),o="",i=0,a=Pn;r.charAt(0|i)||(a="=",i%1);o+=a.charAt(63&e>>8-i%1*8)){if((n=r.charCodeAt(i+=.75))>255)throw new On;e=e<<8|n}return o},Cn=bn.isStandardBrowserEnv()?{write:function(t,e,n,r,o,i){var a=[];a.push(t+"="+encodeURIComponent(e)),bn.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),bn.isString(r)&&a.push("path="+r),bn.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(){}},xn="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||An,Tn=function(t){return new Promise(function(e,n){var r=t.data,o=t.headers;bn.isFormData(r)&&delete o["Content-Type"];var i=new XMLHttpRequest,a="onreadystatechange",s=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in i||En(t.url)||(i=new window.XDomainRequest,a="onload",s=!0,i.onprogress=function(){},i.ontimeout=function(){}),t.auth){var c=t.auth.username||"",u=t.auth.password||"";o.Authorization="Basic "+xn(c+":"+u)}if(i.open(t.method.toUpperCase(),function(t,e,n){if(!e)return t;var r;if(n)r=n(e);else if(bn.isURLSearchParams(e))r=e.toString();else{var o=[];bn.forEach(e,function(t,e){null!=t&&(bn.isArray(t)?e+="[]":t=[t],bn.forEach(t,function(t){bn.isDate(t)?t=t.toISOString():bn.isObject(t)&&(t=JSON.stringify(t)),o.push(jn(e)+"="+jn(t))}))}),r=o.join("&")}return r&&(t+=(-1===t.indexOf("?")?"?":"&")+r),t}(t.url,t.params,t.paramsSerializer),!0),i.timeout=t.timeout,i[a]=function(){if(i&&(4===i.readyState||s)&&(0!==i.status||i.responseURL&&0===i.responseURL.indexOf("file:"))){var r,o,a,c,u,f="getAllResponseHeaders"in i?(r=i.getAllResponseHeaders(),u={},r?(bn.forEach(r.split("\n"),function(t){if(c=t.indexOf(":"),o=bn.trim(t.substr(0,c)).toLowerCase(),a=bn.trim(t.substr(c+1)),o){if(u[o]&&_n.indexOf(o)>=0)return;u[o]="set-cookie"===o?(u[o]?u[o]:[]).concat([a]):u[o]?u[o]+", "+a:a}}),u):u):null,l={data:t.responseType&&"text"!==t.responseType?i.response:i.responseText,status:1223===i.status?204:i.status,statusText:1223===i.status?"No Content":i.statusText,headers:f,config:t,request:i};!function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(Sn("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}(e,n,l),i=null}},i.onerror=function(){n(Sn("Network Error",t,null,i)),i=null},i.ontimeout=function(){n(Sn("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",i)),i=null},bn.isStandardBrowserEnv()){var f=Cn,l=(t.withCredentials||En(t.url))&&t.xsrfCookieName?f.read(t.xsrfCookieName):void 0;l&&(o[t.xsrfHeaderName]=l)}if("setRequestHeader"in i&&bn.forEach(o,function(t,e){void 0===r&&"content-type"===e.toLowerCase()?delete o[e]:i.setRequestHeader(e,t)}),t.withCredentials&&(i.withCredentials=!0),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)}),void 0===r&&(r=null),i.send(r)})},kn={"Content-Type":"application/x-www-form-urlencoded"};function Ln(t,e){!bn.isUndefined(t)&&bn.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Rn,Mn={adapter:("undefined"!=typeof XMLHttpRequest?Rn=Tn:"undefined"!=typeof process&&(Rn=Tn),Rn),transformRequest:[function(t,e){return function(t,e){bn.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}(e,"Content-Type"),bn.isFormData(t)||bn.isArrayBuffer(t)||bn.isBuffer(t)||bn.isStream(t)||bn.isFile(t)||bn.isBlob(t)?t:bn.isArrayBufferView(t)?t.buffer:bn.isURLSearchParams(t)?(Ln(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):bn.isObject(t)?(Ln(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,validateStatus:function(t){return t>=200&&t<300}};Mn.headers={common:{Accept:"application/json, text/plain, */*"}},bn.forEach(["delete","get","head"],function(t){Mn.headers[t]={}}),bn.forEach(["post","put","patch"],function(t){Mn.headers[t]=bn.merge(kn)});var Fn=Mn;function In(){this.handlers=[]}In.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},In.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},In.prototype.forEach=function(t){bn.forEach(this.handlers,function(e){null!==e&&t(e)})};var qn=In,Bn=function(t,e,n){return bn.forEach(n,function(n){t=n(t,e)}),t},Nn=function(t){return!(!t||!t.__CANCEL__)};function Un(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var Dn=function(t){var e,n,r;return Un(t),t.baseURL&&(r=t.url,!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r))&&(t.url=(e=t.baseURL,(n=t.url)?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e)),t.headers=t.headers||{},t.data=Bn(t.data,t.headers,t.transformRequest),t.headers=bn.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),bn.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||Fn.adapter)(t).then(function(e){return Un(t),e.data=Bn(e.data,e.headers,t.transformResponse),e},function(e){return Nn(e)||(Un(t),e&&e.response&&(e.response.data=Bn(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})};function Gn(t){this.defaults=t,this.interceptors={request:new qn,response:new qn}}Gn.prototype.request=function(t){"string"==typeof t&&(t=bn.merge({url:arguments[0]},arguments[1])),(t=bn.merge(Fn,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[Dn,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},bn.forEach(["delete","get","head","options"],function(t){Gn.prototype[t]=function(e,n){return this.request(bn.merge(n||{},{method:t,url:e}))}}),bn.forEach(["post","put","patch"],function(t){Gn.prototype[t]=function(e,n,r){return this.request(bn.merge(r||{},{method:t,url:e,data:n}))}});var Wn=Gn;function Hn(t){this.message=t}Hn.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Hn.prototype.__CANCEL__=!0;var zn=Hn;function Vn(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 zn(t),e(n.reason))})}Vn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Vn.source=function(){var t;return{token:new Vn(function(e){t=e}),cancel:t}};var Xn=Vn;function Kn(t){var e=new Wn(t),n=pn(Wn.prototype.request,e);return bn.extend(n,Wn.prototype,e),bn.extend(n,e),n}var Jn=Kn(Fn);Jn.Axios=Wn,Jn.create=function(t){return Kn(bn.merge(Fn,t))},Jn.Cancel=zn,Jn.CancelToken=Xn,Jn.isCancel=Nn,Jn.all=function(t){return Promise.all(t)},Jn.spread=function(t){return function(e){return t.apply(null,e)}};var $n=Jn,Qn=Jn;$n.default=Qn;var Yn=$n,Zn=["v2"];return function t(e){var n=e.url,r=e.host,o=e.ghostPath,i=void 0===o?"ghost":o,a=e.version,s=e.key;if(r&&(console.warn("GhostAdminAPI's `host` parameter is deprecated, please use `url` instead"),n||(n=r)),this instanceof t)return t({url:n,version:a,key:s});if(!a)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "version" like "v2"');if(!Zn.includes(a))throw new Error("GhostContentAPI Config Invalid: @tryghost/content-api does not support the supplied version");if(!n)throw new Error('GhostContentAPI Config Missing: @tryghost/content-api requires a "url" like "https://site.com" or "https://site.com/blog"');if(!/https?:\/\//.test(n))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" with a protocol like "https://site.com" or "https://site.com/blog"');if(n.endsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "url" without a trailing slash like "https://site.com" or "https://site.com/blog"');if(i.endsWith("/")||i.startsWith("/"))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "ghostPath" without a leading or trailing slash like "ghost"');if(s&&!/[0-9a-f]{26}/.test(s))throw new Error('GhostContentAPI Config Invalid: @tryghost/content-api requires a "key" with 26 hex characters');var c=["posts","authors","tags","pages","settings"].reduce(function(t,e){return Object.assign(t,(o={read:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!t)return Promise.reject(new Error("Missing data"));if(!t.id&&!t.slug)return Promise.reject(new Error("Must include either data.id or data.slug"));var o=Object.assign({},t,n);return u(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 u(e,t,null,n)}},(r=e)in(n={})?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n));var n,r,o},{});return delete c.settings.read,c;function u(t,e,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!o&&!s)return Promise.reject(new Error("GhostContentAPI Config Missing: @tryghost/content-api was instantiated without a content key"));delete e.id;var c=o?{Authorization:"GhostMembers ".concat(o)}:void 0;return Yn.get("".concat(n,"/").concat(i,"/api/").concat(a,"/content/").concat(t,"/").concat(r?r+"/":""),{params:Object.assign({key:s},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:c}).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})}}}); | ||
//# 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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
464935
2910
0
+ Addeddebug@4.3.7(transitive)
+ Addedgelf-stream@1.1.1(transitive)
+ Addedgelfling@0.3.1(transitive)
+ Addedghost-ignition@3.1.0(transitive)
+ Addedms@2.1.3(transitive)
- Removeddebug@2.6.9(transitive)
- Removedghost-ignition@2.9.6(transitive)
- Removedms@2.0.0(transitive)
Updatedghost-ignition@^3.0.0