From 9f6a927f0653c4c293c52363cf2745be3eefcf1e Mon Sep 17 00:00:00 2001 From: Robin Bressan Date: Mon, 28 Sep 2015 16:35:21 +0200 Subject: [PATCH] Fix 204 response on fetch --- dist/es5/http/fetch.js | 2 +- dist/restful.js | 2 +- dist/restful.min.js | 4 ++-- dist/restful.standalone.js | 2 +- dist/restful.standalone.min.js | 4 ++-- src/http/fetch.js | 2 +- test/src/http/fetchSpec.js | 31 ++++++++++++++++++++++++++++++- 7 files changed, 38 insertions(+), 9 deletions(-) diff --git a/dist/es5/http/fetch.js b/dist/es5/http/fetch.js index 3867025..d9deecb 100644 --- a/dist/es5/http/fetch.js +++ b/dist/es5/http/fetch.js @@ -15,7 +15,7 @@ exports['default'] = function (fetch) { } return fetch(url, config).then(function (response) { - return response.json().then(function (json) { + return (response.status === 204 ? Promise.resolve(null) : response.json()).then(function (json) { var headers = {}; response.headers.forEach(function (value, name) { diff --git a/dist/restful.js b/dist/restful.js index 67736fa..12a7447 100644 --- a/dist/restful.js +++ b/dist/restful.js @@ -5482,7 +5482,7 @@ return /******/ (function(modules) { // webpackBootstrap } return fetch(url, config).then(function (response) { - return response.json().then(function (json) { + return (response.status === 204 ? Promise.resolve(null) : response.json()).then(function (json) { var headers = {}; response.headers.forEach(function (value, name) { diff --git a/dist/restful.min.js b/dist/restful.min.js index 4c1c560..ca0c4e3 100644 --- a/dist/restful.min.js +++ b/dist/restful.min.js @@ -1,3 +1,3 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.restful=e():t.restful=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(1),o=n(i);e["default"]=o["default"],t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(4),o=n(i),u=r(9),s=n(u),a=r(10),f=n(a),c=r(2),h=r(11),p=n(h),_=r(12),l=n(_);e["default"]=function(t,e){var r=l["default"]();return r.assign("config","entityIdentifier","id"),r.set("debug",!1),!t&&void 0!==typeof window&&window.location?r.set("url",window.location.protocol+"//"+window.location.host):r.set("url",t),c.member(o["default"](f["default"](e))(r))},e.fetchBackend=s["default"],e.requestBackend=p["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return function(e){var r=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];return u(r?t["new"](t.url()+"/"+e):t["new"](e))}}function o(t){function e(e){return function(){for(var r,n=arguments.length,i=Array(n),o=0;n>o;o++)i[o]=arguments[o];var s=i.shift();return(r=u(t["new"](t.url()+"/"+s)))[e].apply(r,i)}}return a["default"](t,{custom:i(t),"delete":e("delete"),getAll:t.get,get:e("get"),head:e("head"),one:function(e,r){return u(t["new"](t.url()+"/"+e+"/"+r))},patch:e("patch"),put:e("put")})}function u(t){return a["default"](t,{all:function(e){return o(t["new"](t.url()+"/"+e))},custom:i(t),one:function(e,r){return u(t["new"](t.url()+"/"+e+"/"+r))}})}Object.defineProperty(e,"__esModule",{value:!0}),e.custom=i,e.collection=o,e.member=u;var s=r(3),a=n(s)},function(t,e){"use strict";function r(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t,e){for(var n,i,o=r(t),u=1;ui;i++)n[i]=arguments[i];return e.put.apply(e,[t].concat(n))},url:e.url}},t.exports=e["default"]},function(t,e,r){!function(e,r){t.exports=r()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function r(t){t&&(t.value=!0)}function n(){}function i(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){if("number"!=typeof e){var r=+e;if(""+r!==e)return NaN;e=r}return 0>e?o(t)+e:e}function s(){return!0}function a(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function f(t,e){return h(t,e,0)}function c(t,e){return h(t,e,e)}function h(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function p(t){return d(t)?t:O(t)}function _(t){return y(t)?t:D(t)}function l(t){return m(t)?t:A(t)}function v(t){return d(t)&&!g(t)?t:k(t)}function d(t){return!(!t||!t[lr])}function y(t){return!(!t||!t[vr])}function m(t){return!(!t||!t[dr])}function g(t){return y(t)||m(t)}function w(t){return!(!t||!t[yr])}function I(t){this.next=t}function S(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function b(){return{value:void 0,done:!0}}function z(t){return!!q(t)}function M(t){return t&&"function"==typeof t.next}function x(t){var e=q(t);return e&&e.call(t)}function q(t){var e=t&&(Ir&&t[Ir]||t[Sr]);return"function"==typeof e?e:void 0}function E(t){return t&&"number"==typeof t.length}function O(t){return null===t||void 0===t?T():d(t)?t.toSeq():B(t)}function D(t){return null===t||void 0===t?T().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():P(t)}function A(t){return null===t||void 0===t?T():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():C(t)}function k(t){return(null===t||void 0===t?T():d(t)?y(t)?t.entrySeq():t:C(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function L(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function U(t){this._iterable=t,this.size=t.length||t.size}function R(t){this._iterator=t,this._iteratorCache=[]}function K(t){return!(!t||!t[zr])}function T(){return Mr||(Mr=new j([]))}function P(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():M(t)?new R(t).fromEntrySeq():z(t)?new U(t).fromEntrySeq():"object"==typeof t?new L(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function C(t){var e=W(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function B(t){var e=W(t)||"object"==typeof t&&new L(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function W(t){return E(t)?new j(t):M(t)?new R(t):z(t)?new U(t):void 0}function J(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var s=i[r?o-u:u];if(e(s[1],n?s[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function N(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new I(function(){var t=i[r?o-u:u];return u++>o?b():S(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function H(){throw TypeError("Abstract")}function V(){}function Y(){}function F(){}function Q(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function X(t,e){return e?G(e,t,"",{"":t}):Z(t)}function G(t,e,r,n){return Array.isArray(e)?t.call(n,r,A(e).map(function(r,n){return G(t,r,n,e)})):$(e)?t.call(n,r,D(e).map(function(r,n){return G(t,r,n,e)})):e}function Z(t){return Array.isArray(t)?A(t).map(Z).toList():$(t)?D(t).map(Z).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>jr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Rr[t];return void 0===e&&(e=nt(t),Ur===Lr&&(Ur=0,Rr={}),Ur++,Rr[t]=e),e}function nt(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function st(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function at(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function pt(t){var e=jt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Lt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===wr){var n=t.__iterator(e,r);return new I(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===gr?mr:gr,r)},e}function _t(t,e,r){var n=jt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,hr);return o===hr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(wr,i);return new I(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return S(n,s,e.call(r,u[1],s,t),i)})},n}function lt(t,e){var r=jt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=pt(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Lt,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function vt(t,e,r,n){var i=jt(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,hr);return o!==hr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){return e.call(r,t,o,a)?(s++,i(t,n?o:s-1,u)):void 0},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(wr,o),s=0;return new I(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,f=a[0],c=a[1];if(e.call(r,c,f,t))return S(i,n?f:s++,c,o)}})},i}function dt(t,e,r){var n=Kt().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function yt(t,e,r){var n=y(t),i=(w(t)?be():Kt()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=kt(t);return i.map(function(e){return Ot(t,o(e))})}function mt(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=0|r),a(e,r,i))return t;var o=f(e,i),s=c(r,i);if(o!==o||s!==s)return mt(t.toSeq().cacheResult(),e,r,n);var h,p=s-o;p===p&&(h=0>p?0:p);var _=jt(t);return _.size=0===h?h:t.size&&h||void 0,!n&&K(t)&&h>=0&&(_.get=function(e,r){return e=u(this,e),e>=0&&h>e?t.get(e+o,r):r}),_.__iterateUncached=function(e,r){var i=this;if(0===h)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,s=!0,a=0;return t.__iterate(function(t,r){return s&&(s=u++h)return b();var t=i.next();return n||e===gr?t:e===mr?S(e,s-1,void 0,t):S(e,s-1,t.value[1],t)})},_}function gt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(wr,i),s=!0;return new I(function(){if(!s)return b();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],f=i[1];return e.call(r,f,a,o)?n===wr?t:S(n,a,f,t):(s=!1,b())})},n}function wt(t,e,r,n){var i=jt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate(function(t,o,f){return s&&(s=e.call(r,t,o,f))?void 0:(a++,i(t,n?o:a-1,u))}),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(wr,o),a=!0,f=0;return new I(function(){var t,o,c;do{if(t=s.next(),t.done)return n||i===gr?t:i===mr?S(i,f++,void 0,t):S(i,f++,t.value[1],t);var h=t.value;o=h[0],c=h[1],a&&(a=e.call(r,c,o,u))}while(a);return i===wr?t:S(i,o,c,t)})},i}function It(t,e){var r=y(t),n=[t].concat(e).map(function(t){return d(t)?r&&(t=_(t)):t=r?P(t):C(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&y(i)||m(t)&&m(i))return i}var o=new j(n);return r?o=o.toKeyedSeq():m(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function St(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){function o(t,a){var f=this;t.__iterate(function(t,i){return(!e||e>a)&&d(t)?o(t,a+1):n(t,r?i:u++,f)===!1&&(s=!0),!s},i)}var u=0,s=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],s=0;return new I(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===wr&&(a=a[1]),e&&!(u.length0}function Et(t,e,r){var n=jt(t);return n.size=new j(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(gr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=p(t),x(n?t.reverse():t)}),o=0,u=!1;return new I(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?b():S(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function Ot(t,e){return K(t)?e:t.constructor(e)}function Dt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function At(t){return st(t.size),o(t)}function kt(t){return y(t)?_:m(t)?l:v}function jt(t){return Object.create((y(t)?D:m(t)?A:k).prototype)}function Lt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Ut(t,e){return t>e?1:e>t?-1:0}function Rt(t){var e=x(t);if(!e){if(!E(t))throw new TypeError("Expected iterable or array-like: "+t);e=x(p(t))}return e}function Kt(t){return null===t||void 0===t?Ft():Tt(t)&&!w(t)?t:Ft().withMutations(function(e){var r=_(t);st(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Tt(t){return!(!t||!t[Kr])}function Pt(t,e){this.ownerID=t,this.entries=e}function Ct(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Bt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Wt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Jt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Nt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Vt(t._root)}function Ht(t,e){return S(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Yt(t,e,r,n){var i=Object.create(Tr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ft(){return Pr||(Pr=Yt(0))}function Qt(t,r,n){var i,o;if(t._root){var u=e(pr),s=e(_r);if(i=Xt(t._root,t.__ownerID,0,void 0,r,n,u,s),!s.value)return t;o=t.size+(u.value?n===hr?-1:1:0)}else{if(n===hr)return t;o=1,i=new Pt(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Yt(o,i):Ft()}function Xt(t,e,n,i,o,u,s,a){return t?t.update(e,n,i,o,u,s,a):u===hr?t:(r(a),r(s),new Jt(e,i,[o,u]))}function Gt(t){return t.constructor===Jt||t.constructor===Wt}function Zt(t,e,r,n,i){if(t.keyHash===n)return new Wt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&cr,s=(0===r?n:n>>>r)&cr,a=u===s?[Zt(t,e,r+ar,n,i)]:(o=new Jt(e,n,i),s>u?[t,o]:[o,t]);return new Ct(e,1<s;s++,a<<=1){var c=e[s];void 0!==c&&s!==n&&(i|=a,u[o++]=c)}return new Ct(t,i,u)}function ee(t,e,r,n,i){for(var o=0,u=new Array(fr),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new Bt(t,o+1,u)}function re(t,e,r){for(var n=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function se(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function ae(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,s=0;i>s;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function fe(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function ce(t){var e=ve();if(null===t||void 0===t)return e;if(he(t))return t;var r=l(t),n=r.size;return 0===n?e:(st(n),n>0&&fr>n?le(0,n,ar,null,new pe(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function he(t){return!(!t||!t[Jr])}function pe(t,e){this.array=t,this.ownerID=e}function _e(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===s?a&&a.array:t&&t.array,i=r>o?0:o-r,f=u-r;return f>fr&&(f=fr),function(){if(i===f)return Vr;var t=e?--f:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,f=i>o?0:o-i>>n,c=(u-i>>n)+1;return c>fr&&(c=fr),function(){for(;;){if(s){var t=s();if(t!==Vr)return t;s=null}if(f===c)return Vr;var o=e?--c:f++;s=r(a&&a[o],n-ar,i+(o<=t.size||0>r)return t.withMutations(function(t){0>r?we(t,r).set(0,n):we(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,s=e(_r);return r>=Se(t._capacity)?i=ye(i,t.__ownerID,0,r,n,s):o=ye(o,t.__ownerID,t._level,r,n,s),s.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):le(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,n,i,o,u){var s=i>>>n&cr,a=t&&s0){var c=t&&t.array[s],h=ye(c,e,n-ar,i,o,u);return h===c?t:(f=me(t,e),f.array[s]=h,f)}return a&&t.array[s]===o?t:(r(u),f=me(t,e),void 0===o&&s===f.array.length-1?f.array.pop():f.array[s]=o,f)}function me(t,e){return e&&t&&e===t.ownerID?t:new pe(t?t.array.slice():[],e)}function ge(t,e){if(e>=Se(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&cr],n-=ar;return r}}function we(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+e,a=void 0===r?u:0>r?u+r:o+r;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var f=t._level,c=t._root,h=0;0>s+h;)c=new pe(c&&c.array.length?[void 0,c]:[],i),f+=ar,h+=1<=1<_?ge(t,a-1):_>p?new pe([],i):l;if(l&&_>p&&u>s&&l.array.length){c=me(c,i);for(var d=c,y=f;y>ar;y-=ar){var m=p>>>y&cr;d=d.array[m]=me(d.array[m],i)}d.array[p>>>ar&cr]=l}if(u>a&&(v=v&&v.removeAfter(i,0,a)),s>=_)s-=_,a-=_,f=ar,c=null,v=v&&v.removeBefore(i,0,s);else if(s>o||p>_){for(h=0;c;){var g=s>>>f&cr;if(g!==_>>>f&cr)break;g&&(h+=(1<o&&(c=c.removeBefore(i,f,s-h)),c&&p>_&&(c=c.removeAfter(i,f,_-h)),h&&(s-=h,a-=h)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=f,t._root=c,t._tail=v,t.__hash=void 0,t.__altered=!0,t):le(s,a,f,c,v)}function Ie(t,e,r){for(var n=[],i=0,o=0;oi&&(i=s.size),d(u)||(s=s.map(function(t){return X(t)})),n.push(s)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function Se(t){return fr>t?0:t-1>>>ar<=fr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Me(n,i)}function Ee(t){return null===t||void 0===t?Ae():Oe(t)?t:Ae().unshiftAll(t)}function Oe(t){return!(!t||!t[Fr])}function De(t,e,r,n){var i=Object.create(Qr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ae(){return Xr||(Xr=De(0))}function ke(t){return null===t||void 0===t?Re():je(t)&&!w(t)?t:Re().withMutations(function(e){var r=v(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function je(t){return!(!t||!t[Gr])}function Le(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ue(t,e){var r=Object.create(Zr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Re(){return $r||($r=Ue(Ft()))}function Ke(t){return null===t||void 0===t?Ce():Te(t)?t:Ce().withMutations(function(e){var r=v(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function Te(t){return je(t)&&w(t)}function Pe(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ce(){return en||(en=Pe(xe()))}function Be(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);Ne(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Kt(o)},i=n.prototype=Object.create(rn);return i.constructor=n,n}function We(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Je(t){return t._name||t.constructor.name||"Record"}function Ne(t,e){try{e.forEach(He.bind(void 0,t))}catch(r){}}function He(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ve(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||m(t)!==m(e)||w(t)!==w(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!g(t);if(w(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&Q(i[1],t)&&(r||Q(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,s=e.__iterate(function(e,n){return(r?t.has(e):i?Q(e,t.get(n,hr)):Q(t.get(n,hr),e))?void 0:(u=!1,!1)});return u&&t.size===s}function Ye(t,e,r){if(!(this instanceof Ye))return new Ye(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(nn)return nn;nn=this}}function Fe(t,e){if(!(this instanceof Fe))return new Fe(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(on)return on;on=this}}function Qe(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Xe(t,e){return e}function Ge(t,e){return[e,t]}function Ze(t){return function(){return!t.apply(this,arguments)}}function $e(t){return function(){return-t.apply(this,arguments)}}function tr(t){return"string"==typeof t?JSON.stringify(t):t}function er(){return i(arguments)}function rr(t,e){return e>t?1:t>e?-1:0}function nr(t){if(t.size===1/0)return 0;var e=w(t),r=y(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+or(et(t),et(e))|0}:function(t,e){n=n+or(et(t),et(e))|0}:e?function(t){n=31*n+et(t)|0}:function(t){n=n+et(t)|0});return ir(i,n)}function ir(t,e){return e=qr(e,3432918353),e=qr(e<<15|e>>>-15,461845907),e=qr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=qr(e^e>>>16,2246822507),e=qr(e^e>>>13,3266489909),e=tt(e^e>>>16)}function or(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ur=Array.prototype.slice,sr="delete",ar=5,fr=1<=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new I(function(){return i>n?b():S(t,i,r[e?n-i++:i++])})},t(L,D),L.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},L.prototype.has=function(t){return this._object.hasOwnProperty(t)},L.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},L.prototype.__iterator=function(t,e){ -var r=this._object,n=this._keys,i=n.length-1,o=0;return new I(function(){var u=n[e?i-o:o];return o++>i?b():S(t,u,r[u])})},L.prototype[yr]=!0,t(U,A),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=x(r),i=0;if(M(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},U.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=x(r);if(!M(n))return new I(b);var i=0;return new I(function(){var e=n.next();return e.done?e:S(t,i++,e.value)})},t(R,A),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return S(t,i,n[i++])})};var Mr;t(H,p),t(V,H),t(Y,H),t(F,H),H.Keyed=V,H.Indexed=Y,H.Set=F;var xr,qr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Er=Object.isExtensible,Or=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Dr="function"==typeof WeakMap;Dr&&(xr=new WeakMap);var Ar=0,kr="__immutablehash__";"function"==typeof Symbol&&(kr=Symbol(kr));var jr=16,Lr=255,Ur=0,Rr={};t(at,D),at.prototype.get=function(t,e){return this._iter.get(t,e)},at.prototype.has=function(t){return this._iter.has(t)},at.prototype.valueSeq=function(){return this._iter.valueSeq()},at.prototype.reverse=function(){var t=this,e=lt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},at.prototype.map=function(t,e){var r=this,n=_t(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},at.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?At(this):0,function(i){return t(i,e?--r:r++,n)}),e)},at.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(gr,e),n=e?At(this):0;return new I(function(){var i=r.next();return i.done?i:S(t,e?--n:n++,i.value,i)})},at.prototype[yr]=!0,t(ft,A),ft.prototype.includes=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e),n=0;return new I(function(){var e=r.next();return e.done?e:S(t,n++,e.value,e)})},t(ct,k),ct.prototype.has=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new I(function(){var e=r.next();return e.done?e:S(t,e.value,e.value,e)})},t(ht,D),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){Dt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new I(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Dt(n);var i=d(n);return S(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ft.prototype.cacheResult=at.prototype.cacheResult=ct.prototype.cacheResult=ht.prototype.cacheResult=Lt,t(Kt,V),Kt.prototype.toString=function(){return this.__toString("Map {","}")},Kt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Kt.prototype.set=function(t,e){return Qt(this,t,e)},Kt.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Kt.prototype.remove=function(t){return Qt(this,t,hr)},Kt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Kt.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Kt.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Rt(t),e,r);return n===hr?void 0:n},Kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ft()},Kt.prototype.merge=function(){return re(this,void 0,arguments)},Kt.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Kt.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Ft(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Kt.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Kt.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Kt.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Ft(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Kt.prototype.sort=function(t){return be(Mt(this,t))},Kt.prototype.sortBy=function(t,e){return be(Mt(this,e,t))},Kt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Kt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Kt.prototype.asImmutable=function(){return this.__ensureOwner()},Kt.prototype.wasAltered=function(){return this.__altered},Kt.prototype.__iterator=function(t,e){return new Nt(this,t,e)},Kt.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Kt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Yt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Kt.isMap=Tt;var Kr="@@__IMMUTABLE_MAP__@@",Tr=Kt.prototype;Tr[Kr]=!0,Tr[sr]=Tr.remove,Tr.removeIn=Tr.deleteIn,Pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Q(r,i[o][0]))return i[o][1];return n},Pt.prototype.update=function(t,e,n,o,u,s,a){for(var f=u===hr,c=this.entries,h=0,p=c.length;p>h&&!Q(o,c[h][0]);h++);var _=p>h;if(_?c[h][1]===u:f)return this;if(r(a),(f||!_)&&r(s),!f||1!==c.length){if(!_&&!f&&c.length>=Cr)return $t(t,c,o,u);var l=t&&t===this.ownerID,v=l?c:i(c);return _?f?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Pt(t,v)}},Ct.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&cr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+ar,e,r,n)},Ct.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&cr,a=1<=Br)return ee(t,p,f,s,l);if(c&&!l&&2===p.length&&Gt(p[1^h]))return p[1^h];if(c&&l&&1===p.length&&Gt(l))return l;var v=t&&t===this.ownerID,d=c?l?f:f^a:f|a,y=c?l?se(p,h,l,v):fe(p,h,v):ae(p,h,l,v);return v?(this.bitmap=d,this.nodes=y,this):new Ct(t,d,y)},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&cr,o=this.nodes[i];return o?o.get(t+ar,e,r,n):n},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&cr,a=i===hr,f=this.nodes,c=f[s];if(a&&!c)return this;var h=Xt(c,t,e+ar,r,n,i,o,u);if(h===c)return this;var p=this.count;if(c){if(!h&&(p--,Wr>p))return te(t,f,p,s)}else p++;var _=t&&t===this.ownerID,l=se(f,s,h,_);return _?(this.count=p,this.nodes=l,this):new Bt(t,p,l)},Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Q(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,s,a){void 0===n&&(n=et(o));var f=u===hr;if(n!==this.keyHash)return f?this:(r(a),r(s),Zt(this,t,e,n,[o,u]));for(var c=this.entries,h=0,p=c.length;p>h&&!Q(o,c[h][0]);h++);var _=p>h;if(_?c[h][1]===u:f)return this;if(r(a),(f||!_)&&r(s),f&&2===p)return new Jt(t,this.keyHash,c[1^h]);var l=t&&t===this.ownerID,v=l?c:i(c);return _?f?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Wt(t,this.keyHash,v)},Jt.prototype.get=function(t,e,r,n){return Q(r,this.entry[0])?this.entry[1]:n},Jt.prototype.update=function(t,e,n,i,o,u,s){var a=o===hr,f=Q(i,this.entry[0]);return(f?o===this.entry[1]:a)?this:(r(s),a?void r(u):f?t&&t===this.ownerID?(this.entry[1]=o,this):new Jt(t,this.keyHash,[i,o]):(r(u),Zt(this,t,e,et(i),[i,o])))},Pt.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Ct.prototype.iterate=Bt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Jt.prototype.iterate=function(t,e){return t(this.entry)},t(Nt,I),Nt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Ht(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Ht(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Ht(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return b()};var Pr,Cr=fr/4,Br=fr/2,Wr=fr/4;t(ce,Y),ce.of=function(){return this(arguments)},ce.prototype.toString=function(){return this.__toString("List [","]")},ce.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&cr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-ar,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&cr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-ar,r),i===o&&n===this.array.length-1)return this}var u=me(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Hr,Vr={};t(be,Kt),be.of=function(){return this(arguments)},be.prototype.toString=function(){return this.__toString("OrderedMap {","}")},be.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):xe()},be.prototype.set=function(t,e){return qe(this,t,e)},be.prototype.remove=function(t){return qe(this,t,hr)},be.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},be.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},be.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},be.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Me(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},be.isOrderedMap=ze,be.prototype[yr]=!0,be.prototype[sr]=be.prototype.remove;var Yr;t(Ee,Y),Ee.of=function(){return this(arguments)},Ee.prototype.toString=function(){return this.__toString("Stack [","]")},Ee.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},Ee.prototype.peek=function(){return this._head&&this._head.value},Ee.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):De(t,e)},Ee.prototype.pushAll=function(t){if(t=l(t),0===t.size)return this;st(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):De(e,r)},Ee.prototype.pop=function(){return this.slice(1)},Ee.prototype.unshift=function(){return this.push.apply(this,arguments)},Ee.prototype.unshiftAll=function(t){return this.pushAll(t)},Ee.prototype.shift=function(){return this.pop.apply(this,arguments)},Ee.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ae()},Ee.prototype.slice=function(t,e){if(a(t,e,this.size))return this;var r=f(t,this.size),n=c(e,this.size);if(n!==this.size)return Y.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):De(i,o)},Ee.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ee.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Ee.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new I(function(){if(n){var e=n.value;return n=n.next,S(t,r++,e)}return b()})},Ee.isStack=Oe;var Fr="@@__IMMUTABLE_STACK__@@",Qr=Ee.prototype;Qr[Fr]=!0,Qr.withMutations=Tr.withMutations,Qr.asMutable=Tr.asMutable,Qr.asImmutable=Tr.asImmutable,Qr.wasAltered=Tr.wasAltered;var Xr;t(ke,F),ke.of=function(){return this(arguments)},ke.fromKeys=function(t){return this(_(t).keySeq())},ke.prototype.toString=function(){return this.__toString("Set {","}")},ke.prototype.has=function(t){return this._map.has(t)},ke.prototype.add=function(t){return Le(this,this._map.set(t,!0))},ke.prototype.remove=function(t){return Le(this,this._map.remove(t))},ke.prototype.clear=function(){return Le(this,this._map.clear())},ke.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},Ye.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Ye.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Ye(0,0):new Ye(this.get(t,this._end),this.get(e,this._end),this._step))},Ye.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Ye.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new I(function(){var u=i;return i+=e?-n:n,o>r?b():S(t,o++,u)})},Ye.prototype.equals=function(t){return t instanceof Ye?this._start===t._start&&this._end===t._end&&this._step===t._step:Ve(this,t)};var nn;t(Fe,A),Fe.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Fe.prototype.get=function(t,e){return this.has(t)?this._value:e},Fe.prototype.includes=function(t){return Q(this._value,t)},Fe.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:new Fe(this._value,c(e,r)-f(t,r))},Fe.prototype.reverse=function(){return this},Fe.prototype.indexOf=function(t){return Q(this._value,t)?0:-1},Fe.prototype.lastIndexOf=function(t){return Q(this._value,t)?this.size:-1},Fe.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return Ot(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Ot(this,St(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t=200&&t.status<300)return n;var i=new Error(t.statusText);throw i.response=n,i})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e=200&&e.statusCode<300)return r(s);var a=new Error(e.statusMessage);a.response=s,n(a)})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){var e=o.Map(),r=new i.EventEmitter,u={assign:function(t,r,n){return u.has(t)||u.set(t,o.Map()),e=e.setIn([t,r],n),u},emit:function(){r.emit.apply(r,arguments),t&&t.emit.apply(t,arguments)},get:function(r){var n=e.get(r);if(u.has(r)&&!o.Iterable.isIterable(n)||!t)return n;if(!u.has(r)&&t)return t.get(r);var i=t.get(r);return i?o.List.isList(i)?i.concat(n):i.mergeDeep(n):n},has:function(t){return e.has(t)},"new":function(){return n(u)},on:r.on.bind(r),once:r.once.bind(r),push:function(t,r){return u.has(t)||u.set(t,o.List()),e=e.update(t,function(t){return t.push(r)}),u},set:function(t,r){return e=e.set(t,r),u}};return u}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var i=r(13),o=r(7);t.exports=e["default"]},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,a,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],u(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];r.apply(this,s)}else if(o(r)){for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];for(f=r.slice(),i=f.length,a=0;i>a;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,u,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],u=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=u;s-->0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}}])}); \ No newline at end of file +var r=this._object,n=this._keys,i=n.length-1,o=0;return new I(function(){var u=n[e?i-o:o];return o++>i?b():S(t,u,r[u])})},L.prototype[yr]=!0,t(U,A),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=x(r),i=0;if(M(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},U.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=x(r);if(!M(n))return new I(b);var i=0;return new I(function(){var e=n.next();return e.done?e:S(t,i++,e.value)})},t(R,A),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return S(t,i,n[i++])})};var Mr;t(H,p),t(V,H),t(Y,H),t(F,H),H.Keyed=V,H.Indexed=Y,H.Set=F;var xr,qr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Er=Object.isExtensible,Or=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Dr="function"==typeof WeakMap;Dr&&(xr=new WeakMap);var Ar=0,kr="__immutablehash__";"function"==typeof Symbol&&(kr=Symbol(kr));var jr=16,Lr=255,Ur=0,Rr={};t(at,D),at.prototype.get=function(t,e){return this._iter.get(t,e)},at.prototype.has=function(t){return this._iter.has(t)},at.prototype.valueSeq=function(){return this._iter.valueSeq()},at.prototype.reverse=function(){var t=this,e=lt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},at.prototype.map=function(t,e){var r=this,n=_t(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},at.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?At(this):0,function(i){return t(i,e?--r:r++,n)}),e)},at.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(gr,e),n=e?At(this):0;return new I(function(){var i=r.next();return i.done?i:S(t,e?--n:n++,i.value,i)})},at.prototype[yr]=!0,t(ft,A),ft.prototype.includes=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e),n=0;return new I(function(){var e=r.next();return e.done?e:S(t,n++,e.value,e)})},t(ct,k),ct.prototype.has=function(t){return this._iter.includes(t)},ct.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new I(function(){var e=r.next();return e.done?e:S(t,e.value,e.value,e)})},t(ht,D),ht.prototype.entrySeq=function(){return this._iter.toSeq()},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){Dt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new I(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Dt(n);var i=d(n);return S(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ft.prototype.cacheResult=at.prototype.cacheResult=ct.prototype.cacheResult=ht.prototype.cacheResult=Lt,t(Kt,V),Kt.prototype.toString=function(){return this.__toString("Map {","}")},Kt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Kt.prototype.set=function(t,e){return Qt(this,t,e)},Kt.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Kt.prototype.remove=function(t){return Qt(this,t,hr)},Kt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Kt.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Kt.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Rt(t),e,r);return n===hr?void 0:n},Kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ft()},Kt.prototype.merge=function(){return re(this,void 0,arguments)},Kt.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Kt.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Ft(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Kt.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Kt.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Kt.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Ft(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Kt.prototype.sort=function(t){return be(Mt(this,t))},Kt.prototype.sortBy=function(t,e){return be(Mt(this,e,t))},Kt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Kt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Kt.prototype.asImmutable=function(){return this.__ensureOwner()},Kt.prototype.wasAltered=function(){return this.__altered},Kt.prototype.__iterator=function(t,e){return new Nt(this,t,e)},Kt.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Kt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Yt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Kt.isMap=Tt;var Kr="@@__IMMUTABLE_MAP__@@",Tr=Kt.prototype;Tr[Kr]=!0,Tr[sr]=Tr.remove,Tr.removeIn=Tr.deleteIn,Pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Q(r,i[o][0]))return i[o][1];return n},Pt.prototype.update=function(t,e,n,o,u,s,a){for(var f=u===hr,c=this.entries,h=0,p=c.length;p>h&&!Q(o,c[h][0]);h++);var _=p>h;if(_?c[h][1]===u:f)return this;if(r(a),(f||!_)&&r(s),!f||1!==c.length){if(!_&&!f&&c.length>=Cr)return $t(t,c,o,u);var l=t&&t===this.ownerID,v=l?c:i(c);return _?f?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Pt(t,v)}},Ct.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&cr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+ar,e,r,n)},Ct.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&cr,a=1<=Br)return ee(t,p,f,s,l);if(c&&!l&&2===p.length&&Gt(p[1^h]))return p[1^h];if(c&&l&&1===p.length&&Gt(l))return l;var v=t&&t===this.ownerID,d=c?l?f:f^a:f|a,y=c?l?se(p,h,l,v):fe(p,h,v):ae(p,h,l,v);return v?(this.bitmap=d,this.nodes=y,this):new Ct(t,d,y)},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&cr,o=this.nodes[i];return o?o.get(t+ar,e,r,n):n},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&cr,a=i===hr,f=this.nodes,c=f[s];if(a&&!c)return this;var h=Xt(c,t,e+ar,r,n,i,o,u);if(h===c)return this;var p=this.count;if(c){if(!h&&(p--,Wr>p))return te(t,f,p,s)}else p++;var _=t&&t===this.ownerID,l=se(f,s,h,_);return _?(this.count=p,this.nodes=l,this):new Bt(t,p,l)},Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Q(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,s,a){void 0===n&&(n=et(o));var f=u===hr;if(n!==this.keyHash)return f?this:(r(a),r(s),Zt(this,t,e,n,[o,u]));for(var c=this.entries,h=0,p=c.length;p>h&&!Q(o,c[h][0]);h++);var _=p>h;if(_?c[h][1]===u:f)return this;if(r(a),(f||!_)&&r(s),f&&2===p)return new Jt(t,this.keyHash,c[1^h]);var l=t&&t===this.ownerID,v=l?c:i(c);return _?f?h===p-1?v.pop():v[h]=v.pop():v[h]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Wt(t,this.keyHash,v)},Jt.prototype.get=function(t,e,r,n){return Q(r,this.entry[0])?this.entry[1]:n},Jt.prototype.update=function(t,e,n,i,o,u,s){var a=o===hr,f=Q(i,this.entry[0]);return(f?o===this.entry[1]:a)?this:(r(s),a?void r(u):f?t&&t===this.ownerID?(this.entry[1]=o,this):new Jt(t,this.keyHash,[i,o]):(r(u),Zt(this,t,e,et(i),[i,o])))},Pt.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Ct.prototype.iterate=Bt.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Jt.prototype.iterate=function(t,e){return t(this.entry)},t(Nt,I),Nt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Ht(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Ht(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Ht(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return b()};var Pr,Cr=fr/4,Br=fr/2,Wr=fr/4;t(ce,Y),ce.of=function(){return this(arguments)},ce.prototype.toString=function(){return this.__toString("List [","]")},ce.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&cr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-ar,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&cr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-ar,r),i===o&&n===this.array.length-1)return this}var u=me(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Hr,Vr={};t(be,Kt),be.of=function(){return this(arguments)},be.prototype.toString=function(){return this.__toString("OrderedMap {","}")},be.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},be.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):xe()},be.prototype.set=function(t,e){return qe(this,t,e)},be.prototype.remove=function(t){return qe(this,t,hr)},be.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},be.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},be.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},be.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Me(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},be.isOrderedMap=ze,be.prototype[yr]=!0,be.prototype[sr]=be.prototype.remove;var Yr;t(Ee,Y),Ee.of=function(){return this(arguments)},Ee.prototype.toString=function(){return this.__toString("Stack [","]")},Ee.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},Ee.prototype.peek=function(){return this._head&&this._head.value},Ee.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):De(t,e)},Ee.prototype.pushAll=function(t){if(t=l(t),0===t.size)return this;st(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):De(e,r)},Ee.prototype.pop=function(){return this.slice(1)},Ee.prototype.unshift=function(){return this.push.apply(this,arguments)},Ee.prototype.unshiftAll=function(t){return this.pushAll(t)},Ee.prototype.shift=function(){return this.pop.apply(this,arguments)},Ee.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ae()},Ee.prototype.slice=function(t,e){if(a(t,e,this.size))return this;var r=f(t,this.size),n=c(e,this.size);if(n!==this.size)return Y.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):De(i,o)},Ee.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ee.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Ee.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new I(function(){if(n){var e=n.value;return n=n.next,S(t,r++,e)}return b()})},Ee.isStack=Oe;var Fr="@@__IMMUTABLE_STACK__@@",Qr=Ee.prototype;Qr[Fr]=!0,Qr.withMutations=Tr.withMutations,Qr.asMutable=Tr.asMutable,Qr.asImmutable=Tr.asImmutable,Qr.wasAltered=Tr.wasAltered;var Xr;t(ke,F),ke.of=function(){return this(arguments)},ke.fromKeys=function(t){return this(_(t).keySeq())},ke.prototype.toString=function(){return this.__toString("Set {","}")},ke.prototype.has=function(t){return this._map.has(t)},ke.prototype.add=function(t){return Le(this,this._map.set(t,!0))},ke.prototype.remove=function(t){return Le(this,this._map.remove(t))},ke.prototype.clear=function(){return Le(this,this._map.clear())},ke.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},Ye.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Ye.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Ye(0,0):new Ye(this.get(t,this._end),this.get(e,this._end),this._step))},Ye.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Ye.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new I(function(){var u=i;return i+=e?-n:n,o>r?b():S(t,o++,u)})},Ye.prototype.equals=function(t){return t instanceof Ye?this._start===t._start&&this._end===t._end&&this._step===t._step:Ve(this,t)};var nn;t(Fe,A),Fe.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Fe.prototype.get=function(t,e){return this.has(t)?this._value:e},Fe.prototype.includes=function(t){return Q(this._value,t)},Fe.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:new Fe(this._value,c(e,r)-f(t,r))},Fe.prototype.reverse=function(){return this},Fe.prototype.indexOf=function(t){return Q(this._value,t)?0:-1},Fe.prototype.lastIndexOf=function(t){return Q(this._value,t)?this.size:-1},Fe.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return Ot(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Ot(this,St(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t=200&&t.status<300)return n;var i=new Error(t.statusText);throw i.response=n,i})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e=200&&e.statusCode<300)return r(s);var a=new Error(e.statusMessage);a.response=s,n(a)})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){var e=o.Map(),r=new i.EventEmitter,u={assign:function(t,r,n){return u.has(t)||u.set(t,o.Map()),e=e.setIn([t,r],n),u},emit:function(){r.emit.apply(r,arguments),t&&t.emit.apply(t,arguments)},get:function(r){var n=e.get(r);if(u.has(r)&&!o.Iterable.isIterable(n)||!t)return n;if(!u.has(r)&&t)return t.get(r);var i=t.get(r);return i?o.List.isList(i)?i.concat(n):i.mergeDeep(n):n},has:function(t){return e.has(t)},"new":function(){return n(u)},on:r.on.bind(r),once:r.once.bind(r),push:function(t,r){return u.has(t)||u.set(t,o.List()),e=e.update(t,function(t){return t.push(r)}),u},set:function(t,r){return e=e.set(t,r),u}};return u}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var i=r(13),o=r(7);t.exports=e["default"]},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,a,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],u(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];r.apply(this,s)}else if(o(r)){for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];for(f=r.slice(),i=f.length,a=0;i>a;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,u,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],u=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=u;s-->0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}}])}); \ No newline at end of file diff --git a/dist/restful.standalone.js b/dist/restful.standalone.js index 8a8466c..253d367 100644 --- a/dist/restful.standalone.js +++ b/dist/restful.standalone.js @@ -5493,7 +5493,7 @@ return /******/ (function(modules) { // webpackBootstrap } return fetch(url, config).then(function (response) { - return response.json().then(function (json) { + return (response.status === 204 ? Promise.resolve(null) : response.json()).then(function (json) { var headers = {}; response.headers.forEach(function (value, name) { diff --git a/dist/restful.standalone.min.js b/dist/restful.standalone.min.js index 7bccaa4..a17cc73 100644 --- a/dist/restful.standalone.min.js +++ b/dist/restful.standalone.min.js @@ -1,3 +1,3 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.restful=e():t.restful=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(1),o=n(i),u=r(9),s=n(u);r(14),e["default"]=function(t){var e=arguments.length<=1||void 0===arguments[1]?s["default"](fetch):arguments[1];return o["default"](t,e)},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=r(4),o=n(i),u=r(9),s=n(u),a=r(10),f=n(a),h=r(2),c=r(11),p=n(c),_=r(12),l=n(_);e["default"]=function(t,e){var r=l["default"]();return r.assign("config","entityIdentifier","id"),r.set("debug",!1),!t&&void 0!==typeof window&&window.location?r.set("url",window.location.protocol+"//"+window.location.host):r.set("url",t),h.member(o["default"](f["default"](e))(r))},e.fetchBackend=s["default"],e.requestBackend=p["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){return function(e){var r=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];return u(r?t["new"](t.url()+"/"+e):t["new"](e))}}function o(t){function e(e){return function(){for(var r,n=arguments.length,i=Array(n),o=0;n>o;o++)i[o]=arguments[o];var s=i.shift();return(r=u(t["new"](t.url()+"/"+s)))[e].apply(r,i)}}return a["default"](t,{custom:i(t),"delete":e("delete"),getAll:t.get,get:e("get"),head:e("head"),one:function(e,r){return u(t["new"](t.url()+"/"+e+"/"+r))},patch:e("patch"),put:e("put")})}function u(t){return a["default"](t,{all:function(e){return o(t["new"](t.url()+"/"+e))},custom:i(t),one:function(e,r){return u(t["new"](t.url()+"/"+e+"/"+r))}})}Object.defineProperty(e,"__esModule",{value:!0}),e.custom=i,e.collection=o,e.member=u;var s=r(3),a=n(s)},function(t,e){"use strict";function r(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t,e){for(var n,i,o=r(t),u=1;ui;i++)n[i]=arguments[i];return e.put.apply(e,[t].concat(n))},url:e.url}},t.exports=e["default"]},function(t,e,r){!function(e,r){t.exports=r()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function r(t){t&&(t.value=!0)}function n(){}function i(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){if("number"!=typeof e){var r=+e;if(""+r!==e)return NaN;e=r}return 0>e?o(t)+e:e}function s(){return!0}function a(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function f(t,e){return c(t,e,0)}function h(t,e){return c(t,e,e)}function c(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function p(t){return d(t)?t:O(t)}function _(t){return y(t)?t:D(t)}function l(t){return m(t)?t:A(t)}function v(t){return d(t)&&!g(t)?t:k(t)}function d(t){return!(!t||!t[lr])}function y(t){return!(!t||!t[vr])}function m(t){return!(!t||!t[dr])}function g(t){return y(t)||m(t)}function w(t){return!(!t||!t[yr])}function b(t){this.next=t}function I(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function S(){return{value:void 0,done:!0}}function z(t){return!!M(t)}function x(t){return t&&"function"==typeof t.next}function E(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(br&&t[br]||t[Ir]);return"function"==typeof e?e:void 0}function q(t){return t&&"number"==typeof t.length}function O(t){return null===t||void 0===t?K():d(t)?t.toSeq():C(t)}function D(t){return null===t||void 0===t?K().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():P(t)}function A(t){return null===t||void 0===t?K():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():B(t)}function k(t){return(null===t||void 0===t?K():d(t)?y(t)?t.entrySeq():t:B(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function L(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function T(t){this._iterable=t,this.size=t.length||t.size}function R(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[zr])}function K(){return xr||(xr=new j([]))}function P(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():x(t)?new R(t).fromEntrySeq():z(t)?new T(t).fromEntrySeq():"object"==typeof t?new L(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function B(t){var e=W(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function C(t){var e=W(t)||"object"==typeof t&&new L(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function W(t){return q(t)?new j(t):x(t)?new R(t):z(t)?new T(t):void 0}function J(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var s=i[r?o-u:u];if(e(s[1],n?s[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function N(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new b(function(){var t=i[r?o-u:u];return u++>o?S():I(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function H(){throw TypeError("Abstract")}function V(){}function F(){}function X(){}function Y(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function G(t,e){return e?Q(e,t,"",{"":t}):$(t)}function Q(t,e,r,n){return Array.isArray(e)?t.call(n,r,A(e).map(function(r,n){return Q(t,r,n,e)})):Z(e)?t.call(n,r,D(e).map(function(r,n){return Q(t,r,n,e)})):e}function $(t){return Array.isArray(t)?A(t).map($).toList():Z(t)?D(t).map($).toMap():t}function Z(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>jr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Rr[t];return void 0===e&&(e=nt(t),Tr===Lr&&(Tr=0,Rr={}),Tr++,Rr[t]=e),e}function nt(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw new Error(e)}function st(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function at(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function pt(t){var e=jt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Lt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===wr){var n=t.__iterator(e,r);return new b(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===gr?mr:gr,r)},e}function _t(t,e,r){var n=jt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,cr);return o===cr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(wr,i);return new b(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return I(n,s,e.call(r,u[1],s,t),i)})},n}function lt(t,e){var r=jt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=pt(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=Lt,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function vt(t,e,r,n){var i=jt(t);return n&&(i.has=function(n){var i=t.get(n,cr);return i!==cr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,cr);return o!==cr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){return e.call(r,t,o,a)?(s++,i(t,n?o:s-1,u)):void 0},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(wr,o),s=0;return new b(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,f=a[0],h=a[1];if(e.call(r,h,f,t))return I(i,n?f:s++,h,o)}})},i}function dt(t,e,r){var n=Ut().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function yt(t,e,r){var n=y(t),i=(w(t)?Se():Ut()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=kt(t);return i.map(function(e){return Ot(t,o(e))})}function mt(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=0|r),a(e,r,i))return t;var o=f(e,i),s=h(r,i);if(o!==o||s!==s)return mt(t.toSeq().cacheResult(),e,r,n);var c,p=s-o;p===p&&(c=0>p?0:p);var _=jt(t);return _.size=0===c?c:t.size&&c||void 0,!n&&U(t)&&c>=0&&(_.get=function(e,r){return e=u(this,e),e>=0&&c>e?t.get(e+o,r):r}),_.__iterateUncached=function(e,r){var i=this;if(0===c)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,s=!0,a=0;return t.__iterate(function(t,r){return s&&(s=u++c)return S();var t=i.next();return n||e===gr?t:e===mr?I(e,s-1,void 0,t):I(e,s-1,t.value[1],t)})},_}function gt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(wr,i),s=!0;return new b(function(){if(!s)return S();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],f=i[1];return e.call(r,f,a,o)?n===wr?t:I(n,a,f,t):(s=!1,S())})},n}function wt(t,e,r,n){var i=jt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate(function(t,o,f){return s&&(s=e.call(r,t,o,f))?void 0:(a++,i(t,n?o:a-1,u))}),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(wr,o),a=!0,f=0;return new b(function(){var t,o,h;do{if(t=s.next(),t.done)return n||i===gr?t:i===mr?I(i,f++,void 0,t):I(i,f++,t.value[1],t);var c=t.value;o=c[0],h=c[1],a&&(a=e.call(r,h,o,u))}while(a);return i===wr?t:I(i,o,h,t)})},i}function bt(t,e){var r=y(t),n=[t].concat(e).map(function(t){return d(t)?r&&(t=_(t)):t=r?P(t):B(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&y(i)||m(t)&&m(i))return i}var o=new j(n);return r?o=o.toKeyedSeq():m(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function It(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){function o(t,a){var f=this;t.__iterate(function(t,i){return(!e||e>a)&&d(t)?o(t,a+1):n(t,r?i:u++,f)===!1&&(s=!0),!s},i)}var u=0,s=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],s=0;return new b(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===wr&&(a=a[1]),e&&!(u.length0}function qt(t,e,r){var n=jt(t);return n.size=new j(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(gr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=p(t),E(n?t.reverse():t)}),o=0,u=!1;return new b(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?S():I(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function Ot(t,e){return U(t)?e:t.constructor(e)}function Dt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function At(t){return st(t.size),o(t)}function kt(t){return y(t)?_:m(t)?l:v}function jt(t){return Object.create((y(t)?D:m(t)?A:k).prototype)}function Lt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Tt(t,e){return t>e?1:e>t?-1:0}function Rt(t){var e=E(t);if(!e){if(!q(t))throw new TypeError("Expected iterable or array-like: "+t);e=E(p(t))}return e}function Ut(t){return null===t||void 0===t?Xt():Kt(t)&&!w(t)?t:Xt().withMutations(function(e){var r=_(t);st(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Kt(t){return!(!t||!t[Ur])}function Pt(t,e){this.ownerID=t,this.entries=e}function Bt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Ct(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Wt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Jt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Nt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Vt(t._root)}function Ht(t,e){return I(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Ft(t,e,r,n){var i=Object.create(Kr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Xt(){return Pr||(Pr=Ft(0))}function Yt(t,r,n){var i,o;if(t._root){var u=e(pr),s=e(_r);if(i=Gt(t._root,t.__ownerID,0,void 0,r,n,u,s),!s.value)return t;o=t.size+(u.value?n===cr?-1:1:0)}else{if(n===cr)return t;o=1,i=new Pt(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Ft(o,i):Xt()}function Gt(t,e,n,i,o,u,s,a){return t?t.update(e,n,i,o,u,s,a):u===cr?t:(r(a),r(s),new Jt(e,i,[o,u]))}function Qt(t){return t.constructor===Jt||t.constructor===Wt}function $t(t,e,r,n,i){if(t.keyHash===n)return new Wt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&hr,s=(0===r?n:n>>>r)&hr,a=u===s?[$t(t,e,r+ar,n,i)]:(o=new Jt(e,n,i),s>u?[t,o]:[o,t]);return new Bt(e,1<s;s++,a<<=1){var h=e[s];void 0!==h&&s!==n&&(i|=a,u[o++]=h)}return new Bt(t,i,u)}function ee(t,e,r,n,i){for(var o=0,u=new Array(fr),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new Ct(t,o+1,u)}function re(t,e,r){for(var n=[],i=0;i>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function se(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function ae(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),u=0,s=0;i>s;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function fe(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function he(t){var e=ve();if(null===t||void 0===t)return e;if(ce(t))return t;var r=l(t),n=r.size;return 0===n?e:(st(n),n>0&&fr>n?le(0,n,ar,null,new pe(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function ce(t){return!(!t||!t[Jr])}function pe(t,e){this.array=t,this.ownerID=e}function _e(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===s?a&&a.array:t&&t.array,i=r>o?0:o-r,f=u-r;return f>fr&&(f=fr),function(){if(i===f)return Vr;var t=e?--f:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,f=i>o?0:o-i>>n,h=(u-i>>n)+1;return h>fr&&(h=fr),function(){for(;;){if(s){var t=s();if(t!==Vr)return t;s=null}if(f===h)return Vr;var o=e?--h:f++;s=r(a&&a[o],n-ar,i+(o<=t.size||0>r)return t.withMutations(function(t){0>r?we(t,r).set(0,n):we(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,s=e(_r);return r>=Ie(t._capacity)?i=ye(i,t.__ownerID,0,r,n,s):o=ye(o,t.__ownerID,t._level,r,n,s),s.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):le(t._origin,t._capacity,t._level,o,i):t}function ye(t,e,n,i,o,u){var s=i>>>n&hr,a=t&&s0){var h=t&&t.array[s],c=ye(h,e,n-ar,i,o,u);return c===h?t:(f=me(t,e),f.array[s]=c,f)}return a&&t.array[s]===o?t:(r(u),f=me(t,e),void 0===o&&s===f.array.length-1?f.array.pop():f.array[s]=o,f)}function me(t,e){return e&&t&&e===t.ownerID?t:new pe(t?t.array.slice():[],e)}function ge(t,e){if(e>=Ie(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&hr],n-=ar;return r}}function we(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+e,a=void 0===r?u:0>r?u+r:o+r;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var f=t._level,h=t._root,c=0;0>s+c;)h=new pe(h&&h.array.length?[void 0,h]:[],i),f+=ar,c+=1<=1<_?ge(t,a-1):_>p?new pe([],i):l;if(l&&_>p&&u>s&&l.array.length){h=me(h,i);for(var d=h,y=f;y>ar;y-=ar){var m=p>>>y&hr;d=d.array[m]=me(d.array[m],i)}d.array[p>>>ar&hr]=l}if(u>a&&(v=v&&v.removeAfter(i,0,a)),s>=_)s-=_,a-=_,f=ar,h=null,v=v&&v.removeBefore(i,0,s);else if(s>o||p>_){for(c=0;h;){var g=s>>>f&hr;if(g!==_>>>f&hr)break;g&&(c+=(1<o&&(h=h.removeBefore(i,f,s-c)),h&&p>_&&(h=h.removeAfter(i,f,_-c)),c&&(s-=c,a-=c)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=f,t._root=h,t._tail=v,t.__hash=void 0,t.__altered=!0,t):le(s,a,f,h,v)}function be(t,e,r){for(var n=[],i=0,o=0;oi&&(i=s.size),d(u)||(s=s.map(function(t){return G(t)})),n.push(s)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function Ie(t){return fr>t?0:t-1>>>ar<=fr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):xe(n,i)}function qe(t){return null===t||void 0===t?Ae():Oe(t)?t:Ae().unshiftAll(t)}function Oe(t){return!(!t||!t[Xr])}function De(t,e,r,n){var i=Object.create(Yr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Ae(){return Gr||(Gr=De(0))}function ke(t){return null===t||void 0===t?Re():je(t)&&!w(t)?t:Re().withMutations(function(e){var r=v(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function je(t){return!(!t||!t[Qr])}function Le(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Te(t,e){var r=Object.create($r);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Re(){return Zr||(Zr=Te(Xt()))}function Ue(t){return null===t||void 0===t?Be():Ke(t)?t:Be().withMutations(function(e){var r=v(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function Ke(t){return je(t)&&w(t)}function Pe(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Be(){return en||(en=Pe(Ee()))}function Ce(t,e){var r,n=function(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var u=Object.keys(t);Ne(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=Ut(o)},i=n.prototype=Object.create(rn);return i.constructor=n,n}function We(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Je(t){return t._name||t.constructor.name||"Record"}function Ne(t,e){try{e.forEach(He.bind(void 0,t))}catch(r){}}function He(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ve(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||m(t)!==m(e)||w(t)!==w(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!g(t);if(w(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&Y(i[1],t)&&(r||Y(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,s=e.__iterate(function(e,n){return(r?t.has(e):i?Y(e,t.get(n,cr)):Y(t.get(n,cr),e))?void 0:(u=!1,!1)});return u&&t.size===s}function Fe(t,e,r){if(!(this instanceof Fe))return new Fe(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(nn)return nn;nn=this}}function Xe(t,e){if(!(this instanceof Xe))return new Xe(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(on)return on;on=this}}function Ye(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Ge(t,e){return e}function Qe(t,e){return[e,t]}function $e(t){return function(){return!t.apply(this,arguments)}}function Ze(t){return function(){return-t.apply(this,arguments)}}function tr(t){return"string"==typeof t?JSON.stringify(t):t}function er(){return i(arguments)}function rr(t,e){return e>t?1:t>e?-1:0}function nr(t){if(t.size===1/0)return 0;var e=w(t),r=y(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+or(et(t),et(e))|0}:function(t,e){n=n+or(et(t),et(e))|0}:e?function(t){n=31*n+et(t)|0}:function(t){n=n+et(t)|0});return ir(i,n)}function ir(t,e){return e=Mr(e,3432918353),e=Mr(e<<15|e>>>-15,461845907),e=Mr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Mr(e^e>>>16,2246822507),e=Mr(e^e>>>13,3266489909),e=tt(e^e>>>16)}function or(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ur=Array.prototype.slice,sr="delete",ar=5,fr=1<=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new b(function(){return i>n?S():I(t,i,r[e?n-i++:i++])})},t(L,D),L.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},L.prototype.has=function(t){return this._object.hasOwnProperty(t)},L.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){ -var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},L.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new b(function(){var u=n[e?i-o:o];return o++>i?S():I(t,u,r[u])})},L.prototype[yr]=!0,t(T,A),T.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=E(r),i=0;if(x(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},T.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=E(r);if(!x(n))return new b(S);var i=0;return new b(function(){var e=n.next();return e.done?e:I(t,i++,e.value)})},t(R,A),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return I(t,i,n[i++])})};var xr;t(H,p),t(V,H),t(F,H),t(X,H),H.Keyed=V,H.Indexed=F,H.Set=X;var Er,Mr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},qr=Object.isExtensible,Or=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Dr="function"==typeof WeakMap;Dr&&(Er=new WeakMap);var Ar=0,kr="__immutablehash__";"function"==typeof Symbol&&(kr=Symbol(kr));var jr=16,Lr=255,Tr=0,Rr={};t(at,D),at.prototype.get=function(t,e){return this._iter.get(t,e)},at.prototype.has=function(t){return this._iter.has(t)},at.prototype.valueSeq=function(){return this._iter.valueSeq()},at.prototype.reverse=function(){var t=this,e=lt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},at.prototype.map=function(t,e){var r=this,n=_t(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},at.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?At(this):0,function(i){return t(i,e?--r:r++,n)}),e)},at.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(gr,e),n=e?At(this):0;return new b(function(){var i=r.next();return i.done?i:I(t,e?--n:n++,i.value,i)})},at.prototype[yr]=!0,t(ft,A),ft.prototype.includes=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e),n=0;return new b(function(){var e=r.next();return e.done?e:I(t,n++,e.value,e)})},t(ht,k),ht.prototype.has=function(t){return this._iter.includes(t)},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new b(function(){var e=r.next();return e.done?e:I(t,e.value,e.value,e)})},t(ct,D),ct.prototype.entrySeq=function(){return this._iter.toSeq()},ct.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){Dt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new b(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Dt(n);var i=d(n);return I(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ft.prototype.cacheResult=at.prototype.cacheResult=ht.prototype.cacheResult=ct.prototype.cacheResult=Lt,t(Ut,V),Ut.prototype.toString=function(){return this.__toString("Map {","}")},Ut.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Ut.prototype.set=function(t,e){return Yt(this,t,e)},Ut.prototype.setIn=function(t,e){return this.updateIn(t,cr,function(){return e})},Ut.prototype.remove=function(t){return Yt(this,t,cr)},Ut.prototype.deleteIn=function(t){return this.updateIn(t,function(){return cr})},Ut.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Ut.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Rt(t),e,r);return n===cr?void 0:n},Ut.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xt()},Ut.prototype.merge=function(){return re(this,void 0,arguments)},Ut.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Ut.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Xt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Ut.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Ut.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Ut.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Xt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Ut.prototype.sort=function(t){return Se(xt(this,t))},Ut.prototype.sortBy=function(t,e){return Se(xt(this,e,t))},Ut.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Ut.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Ut.prototype.asImmutable=function(){return this.__ensureOwner()},Ut.prototype.wasAltered=function(){return this.__altered},Ut.prototype.__iterator=function(t,e){return new Nt(this,t,e)},Ut.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Ut.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ft(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ut.isMap=Kt;var Ur="@@__IMMUTABLE_MAP__@@",Kr=Ut.prototype;Kr[Ur]=!0,Kr[sr]=Kr.remove,Kr.removeIn=Kr.deleteIn,Pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Y(r,i[o][0]))return i[o][1];return n},Pt.prototype.update=function(t,e,n,o,u,s,a){for(var f=u===cr,h=this.entries,c=0,p=h.length;p>c&&!Y(o,h[c][0]);c++);var _=p>c;if(_?h[c][1]===u:f)return this;if(r(a),(f||!_)&&r(s),!f||1!==h.length){if(!_&&!f&&h.length>=Br)return Zt(t,h,o,u);var l=t&&t===this.ownerID,v=l?h:i(h);return _?f?c===p-1?v.pop():v[c]=v.pop():v[c]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Pt(t,v)}},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&hr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+ar,e,r,n)},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&hr,a=1<=Cr)return ee(t,p,f,s,l);if(h&&!l&&2===p.length&&Qt(p[1^c]))return p[1^c];if(h&&l&&1===p.length&&Qt(l))return l;var v=t&&t===this.ownerID,d=h?l?f:f^a:f|a,y=h?l?se(p,c,l,v):fe(p,c,v):ae(p,c,l,v);return v?(this.bitmap=d,this.nodes=y,this):new Bt(t,d,y)},Ct.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&hr,o=this.nodes[i];return o?o.get(t+ar,e,r,n):n},Ct.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&hr,a=i===cr,f=this.nodes,h=f[s];if(a&&!h)return this;var c=Gt(h,t,e+ar,r,n,i,o,u);if(c===h)return this;var p=this.count;if(h){if(!c&&(p--,Wr>p))return te(t,f,p,s)}else p++;var _=t&&t===this.ownerID,l=se(f,s,c,_);return _?(this.count=p,this.nodes=l,this):new Ct(t,p,l)},Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Y(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,s,a){void 0===n&&(n=et(o));var f=u===cr;if(n!==this.keyHash)return f?this:(r(a),r(s),$t(this,t,e,n,[o,u]));for(var h=this.entries,c=0,p=h.length;p>c&&!Y(o,h[c][0]);c++);var _=p>c;if(_?h[c][1]===u:f)return this;if(r(a),(f||!_)&&r(s),f&&2===p)return new Jt(t,this.keyHash,h[1^c]);var l=t&&t===this.ownerID,v=l?h:i(h);return _?f?c===p-1?v.pop():v[c]=v.pop():v[c]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Wt(t,this.keyHash,v)},Jt.prototype.get=function(t,e,r,n){return Y(r,this.entry[0])?this.entry[1]:n},Jt.prototype.update=function(t,e,n,i,o,u,s){var a=o===cr,f=Y(i,this.entry[0]);return(f?o===this.entry[1]:a)?this:(r(s),a?void r(u):f?t&&t===this.ownerID?(this.entry[1]=o,this):new Jt(t,this.keyHash,[i,o]):(r(u),$t(this,t,e,et(i),[i,o])))},Pt.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Bt.prototype.iterate=Ct.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Jt.prototype.iterate=function(t,e){return t(this.entry)},t(Nt,b),Nt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Ht(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Ht(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Ht(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return S()};var Pr,Br=fr/4,Cr=fr/2,Wr=fr/4;t(he,F),he.of=function(){return this(arguments)},he.prototype.toString=function(){return this.__toString("List [","]")},he.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&hr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-ar,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&hr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-ar,r),i===o&&n===this.array.length-1)return this}var u=me(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Hr,Vr={};t(Se,Ut),Se.of=function(){return this(arguments)},Se.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Se.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Se.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ee()},Se.prototype.set=function(t,e){return Me(this,t,e)},Se.prototype.remove=function(t){return Me(this,t,cr)},Se.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Se.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Se.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Se.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?xe(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Se.isOrderedMap=ze,Se.prototype[yr]=!0,Se.prototype[sr]=Se.prototype.remove;var Fr;t(qe,F),qe.of=function(){return this(arguments)},qe.prototype.toString=function(){return this.__toString("Stack [","]")},qe.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},qe.prototype.peek=function(){return this._head&&this._head.value},qe.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):De(t,e)},qe.prototype.pushAll=function(t){if(t=l(t),0===t.size)return this;st(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):De(e,r)},qe.prototype.pop=function(){return this.slice(1)},qe.prototype.unshift=function(){return this.push.apply(this,arguments)},qe.prototype.unshiftAll=function(t){return this.pushAll(t)},qe.prototype.shift=function(){return this.pop.apply(this,arguments)},qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ae()},qe.prototype.slice=function(t,e){if(a(t,e,this.size))return this;var r=f(t,this.size),n=h(e,this.size);if(n!==this.size)return F.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):De(i,o)},qe.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},qe.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},qe.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new b(function(){if(n){var e=n.value;return n=n.next,I(t,r++,e)}return S()})},qe.isStack=Oe;var Xr="@@__IMMUTABLE_STACK__@@",Yr=qe.prototype;Yr[Xr]=!0,Yr.withMutations=Kr.withMutations,Yr.asMutable=Kr.asMutable,Yr.asImmutable=Kr.asImmutable,Yr.wasAltered=Kr.wasAltered;var Gr;t(ke,X),ke.of=function(){return this(arguments)},ke.fromKeys=function(t){return this(_(t).keySeq())},ke.prototype.toString=function(){return this.__toString("Set {","}")},ke.prototype.has=function(t){return this._map.has(t)},ke.prototype.add=function(t){return Le(this,this._map.set(t,!0))},ke.prototype.remove=function(t){return Le(this,this._map.remove(t))},ke.prototype.clear=function(){return Le(this,this._map.clear())},ke.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},Fe.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Fe.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Fe(0,0):new Fe(this.get(t,this._end),this.get(e,this._end),this._step))},Fe.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Fe.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new b(function(){var u=i;return i+=e?-n:n,o>r?S():I(t,o++,u)})},Fe.prototype.equals=function(t){return t instanceof Fe?this._start===t._start&&this._end===t._end&&this._step===t._step:Ve(this,t)};var nn;t(Xe,A),Xe.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Xe.prototype.get=function(t,e){return this.has(t)?this._value:e},Xe.prototype.includes=function(t){return Y(this._value,t)},Xe.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:new Xe(this._value,h(e,r)-f(t,r))},Xe.prototype.reverse=function(){return this},Xe.prototype.indexOf=function(t){return Y(this._value,t)?0:-1},Xe.prototype.lastIndexOf=function(t){return Y(this._value,t)?this.size:-1},Xe.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return Ot(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Ot(this,It(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t=200&&t.status<300)return n;var i=new Error(t.statusText);throw i.response=n,i})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e=200&&e.statusCode<300)return r(s);var a=new Error(e.statusMessage);a.response=s,n(a)})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){var e=o.Map(),r=new i.EventEmitter,u={assign:function(t,r,n){return u.has(t)||u.set(t,o.Map()),e=e.setIn([t,r],n),u},emit:function(){r.emit.apply(r,arguments),t&&t.emit.apply(t,arguments)},get:function(r){var n=e.get(r);if(u.has(r)&&!o.Iterable.isIterable(n)||!t)return n;if(!u.has(r)&&t)return t.get(r);var i=t.get(r);return i?o.List.isList(i)?i.concat(n):i.mergeDeep(n):n},has:function(t){return e.has(t)},"new":function(){return n(u)},on:r.on.bind(r),once:r.once.bind(r),push:function(t,r){return u.has(t)||u.set(t,o.List()),e=e.update(t,function(t){return t.push(r)}),u},set:function(t,r){return e=e.set(t,r),u}};return u}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var i=r(13),o=r(7);t.exports=e["default"]},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,a,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],u(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];r.apply(this,s)}else if(o(r)){for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];for(f=r.slice(),i=f.length,a=0;i>a;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,u,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],u=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=u;s-->0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}},function(t,e){!function(){"use strict";function t(t){if("string"!=typeof t&&(t=t.toString()),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function e(t){return"string"!=typeof t&&(t=t.toString()),t}function r(t){this.map={},t instanceof r?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function n(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function i(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function o(t){var e=new FileReader;return e.readAsArrayBuffer(t),i(e)}function u(t){var e=new FileReader;return e.readAsText(t),i(e)}function s(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(_.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(_.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else{if(t)throw new Error("unsupported BodyInit type");this._bodyText=""}},_.blob?(this.blob=function(){var t=n(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(o)},this.text=function(){var t=n(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=n(this);return t?t:Promise.resolve(this._bodyText)},_.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function a(t){var e=t.toUpperCase();return l.indexOf(e)>-1?e:t}function f(t,e){if(e=e||{},this.url=t,this.credentials=e.credentials||"omit",this.headers=new r(e.headers),this.method=a(e.method||"GET"),this.mode=e.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&e.body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(e.body)}function h(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}}),e}function c(t){var e=new r,n=t.getAllResponseHeaders().trim().split("\n");return n.forEach(function(t){var r=t.trim().split(":"),n=r.shift().trim(),i=r.join(":").trim();e.append(n,i)}),e}function p(t,e){e||(e={}),this._initBody(t),this.type="default",this.url=null,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof r?e.headers:new r(e.headers),this.url=e.url||""}if(!self.fetch){r.prototype.append=function(r,n){r=t(r),n=e(n);var i=this.map[r];i||(i=[],this.map[r]=i),i.push(n)},r.prototype["delete"]=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(r,n){this.map[t(r)]=[e(n)]},r.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){t.call(e,n,r,this)},this)},this)};var _={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self},l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];s.call(f.prototype),s.call(p.prototype),self.Headers=r,self.Request=f,self.Response=p,self.fetch=function(t,e){var r;return r=f.prototype.isPrototypeOf(t)&&!e?t:new f(t,e),new Promise(function(t,e){function n(){return"responseURL"in i?i.responseURL:/^X-Request-URL:/m.test(i.getAllResponseHeaders())?i.getResponseHeader("X-Request-URL"):void 0}var i=new XMLHttpRequest;i.onload=function(){var r=1223===i.status?204:i.status;if(100>r||r>599)return void e(new TypeError("Network request failed"));var o={status:r,statusText:i.statusText,headers:c(i),url:n()},u="response"in i?i.response:i.responseText;t(new p(u,o))},i.onerror=function(){e(new TypeError("Network request failed"))},i.open(r.method,r.url,!0),"include"===r.credentials&&(i.withCredentials=!0),"responseType"in i&&_.blob&&(i.responseType="blob"),r.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send("undefined"==typeof r._bodyInit?null:r._bodyInit)})},self.fetch.polyfill=!0}}()}])}); \ No newline at end of file +var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},L.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new b(function(){var u=n[e?i-o:o];return o++>i?S():I(t,u,r[u])})},L.prototype[yr]=!0,t(T,A),T.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=E(r),i=0;if(x(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},T.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=E(r);if(!x(n))return new b(S);var i=0;return new b(function(){var e=n.next();return e.done?e:I(t,i++,e.value)})},t(R,A),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;i=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return I(t,i,n[i++])})};var xr;t(H,p),t(V,H),t(F,H),t(X,H),H.Keyed=V,H.Indexed=F,H.Set=X;var Er,Mr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},qr=Object.isExtensible,Or=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Dr="function"==typeof WeakMap;Dr&&(Er=new WeakMap);var Ar=0,kr="__immutablehash__";"function"==typeof Symbol&&(kr=Symbol(kr));var jr=16,Lr=255,Tr=0,Rr={};t(at,D),at.prototype.get=function(t,e){return this._iter.get(t,e)},at.prototype.has=function(t){return this._iter.has(t)},at.prototype.valueSeq=function(){return this._iter.valueSeq()},at.prototype.reverse=function(){var t=this,e=lt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},at.prototype.map=function(t,e){var r=this,n=_t(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},at.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?At(this):0,function(i){return t(i,e?--r:r++,n)}),e)},at.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(gr,e),n=e?At(this):0;return new b(function(){var i=r.next();return i.done?i:I(t,e?--n:n++,i.value,i)})},at.prototype[yr]=!0,t(ft,A),ft.prototype.includes=function(t){return this._iter.includes(t)},ft.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e),n=0;return new b(function(){var e=r.next();return e.done?e:I(t,n++,e.value,e)})},t(ht,k),ht.prototype.has=function(t){return this._iter.includes(t)},ht.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new b(function(){var e=r.next();return e.done?e:I(t,e.value,e.value,e)})},t(ct,D),ct.prototype.entrySeq=function(){return this._iter.toSeq()},ct.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){Dt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(gr,e);return new b(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Dt(n);var i=d(n);return I(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ft.prototype.cacheResult=at.prototype.cacheResult=ht.prototype.cacheResult=ct.prototype.cacheResult=Lt,t(Ut,V),Ut.prototype.toString=function(){return this.__toString("Map {","}")},Ut.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Ut.prototype.set=function(t,e){return Yt(this,t,e)},Ut.prototype.setIn=function(t,e){return this.updateIn(t,cr,function(){return e})},Ut.prototype.remove=function(t){return Yt(this,t,cr)},Ut.prototype.deleteIn=function(t){return this.updateIn(t,function(){return cr})},Ut.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Ut.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Rt(t),e,r);return n===cr?void 0:n},Ut.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xt()},Ut.prototype.merge=function(){return re(this,void 0,arguments)},Ut.prototype.mergeWith=function(t){var e=ur.call(arguments,1);return re(this,t,e)},Ut.prototype.mergeIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Xt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},Ut.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Ut.prototype.mergeDeepWith=function(t){var e=ur.call(arguments,1);return re(this,ne(t),e)},Ut.prototype.mergeDeepIn=function(t){var e=ur.call(arguments,1);return this.updateIn(t,Xt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},Ut.prototype.sort=function(t){return Se(xt(this,t))},Ut.prototype.sortBy=function(t,e){return Se(xt(this,e,t))},Ut.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Ut.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Ut.prototype.asImmutable=function(){return this.__ensureOwner()},Ut.prototype.wasAltered=function(){return this.__altered},Ut.prototype.__iterator=function(t,e){return new Nt(this,t,e)},Ut.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Ut.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ft(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ut.isMap=Kt;var Ur="@@__IMMUTABLE_MAP__@@",Kr=Ut.prototype;Kr[Ur]=!0,Kr[sr]=Kr.remove,Kr.removeIn=Kr.deleteIn,Pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Y(r,i[o][0]))return i[o][1];return n},Pt.prototype.update=function(t,e,n,o,u,s,a){for(var f=u===cr,h=this.entries,c=0,p=h.length;p>c&&!Y(o,h[c][0]);c++);var _=p>c;if(_?h[c][1]===u:f)return this;if(r(a),(f||!_)&&r(s),!f||1!==h.length){if(!_&&!f&&h.length>=Br)return Zt(t,h,o,u);var l=t&&t===this.ownerID,v=l?h:i(h);return _?f?c===p-1?v.pop():v[c]=v.pop():v[c]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Pt(t,v)}},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&hr),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+ar,e,r,n)},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&hr,a=1<=Cr)return ee(t,p,f,s,l);if(h&&!l&&2===p.length&&Qt(p[1^c]))return p[1^c];if(h&&l&&1===p.length&&Qt(l))return l;var v=t&&t===this.ownerID,d=h?l?f:f^a:f|a,y=h?l?se(p,c,l,v):fe(p,c,v):ae(p,c,l,v);return v?(this.bitmap=d,this.nodes=y,this):new Bt(t,d,y)},Ct.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&hr,o=this.nodes[i];return o?o.get(t+ar,e,r,n):n},Ct.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&hr,a=i===cr,f=this.nodes,h=f[s];if(a&&!h)return this;var c=Gt(h,t,e+ar,r,n,i,o,u);if(c===h)return this;var p=this.count;if(h){if(!c&&(p--,Wr>p))return te(t,f,p,s)}else p++;var _=t&&t===this.ownerID,l=se(f,s,c,_);return _?(this.count=p,this.nodes=l,this):new Ct(t,p,l)},Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(Y(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,s,a){void 0===n&&(n=et(o));var f=u===cr;if(n!==this.keyHash)return f?this:(r(a),r(s),$t(this,t,e,n,[o,u]));for(var h=this.entries,c=0,p=h.length;p>c&&!Y(o,h[c][0]);c++);var _=p>c;if(_?h[c][1]===u:f)return this;if(r(a),(f||!_)&&r(s),f&&2===p)return new Jt(t,this.keyHash,h[1^c]);var l=t&&t===this.ownerID,v=l?h:i(h);return _?f?c===p-1?v.pop():v[c]=v.pop():v[c]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Wt(t,this.keyHash,v)},Jt.prototype.get=function(t,e,r,n){return Y(r,this.entry[0])?this.entry[1]:n},Jt.prototype.update=function(t,e,n,i,o,u,s){var a=o===cr,f=Y(i,this.entry[0]);return(f?o===this.entry[1]:a)?this:(r(s),a?void r(u):f?t&&t===this.ownerID?(this.entry[1]=o,this):new Jt(t,this.keyHash,[i,o]):(r(u),$t(this,t,e,et(i),[i,o])))},Pt.prototype.iterate=Wt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Bt.prototype.iterate=Ct.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Jt.prototype.iterate=function(t,e){return t(this.entry)},t(Nt,b),Nt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Ht(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return Ht(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Ht(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return S()};var Pr,Br=fr/4,Cr=fr/2,Wr=fr/4;t(he,F),he.of=function(){return this(arguments)},he.prototype.toString=function(){return this.__toString("List [","]")},he.prototype.get=function(t,e){if(t=u(this,t),t>=0&&t>>e&hr;if(n>=this.array.length)return new pe([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-ar,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},pe.prototype.removeAfter=function(t,e,r){if(r===(e?1<>>e&hr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-ar,r),i===o&&n===this.array.length-1)return this}var u=me(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Hr,Vr={};t(Se,Ut),Se.of=function(){return this(arguments)},Se.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Se.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Se.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ee()},Se.prototype.set=function(t,e){return Me(this,t,e)},Se.prototype.remove=function(t){return Me(this,t,cr)},Se.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Se.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Se.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Se.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?xe(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Se.isOrderedMap=ze,Se.prototype[yr]=!0,Se.prototype[sr]=Se.prototype.remove;var Fr;t(qe,F),qe.of=function(){return this(arguments)},qe.prototype.toString=function(){return this.__toString("Stack [","]")},qe.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},qe.prototype.peek=function(){return this._head&&this._head.value},qe.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):De(t,e)},qe.prototype.pushAll=function(t){if(t=l(t),0===t.size)return this;st(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):De(e,r)},qe.prototype.pop=function(){return this.slice(1)},qe.prototype.unshift=function(){return this.push.apply(this,arguments)},qe.prototype.unshiftAll=function(t){return this.pushAll(t)},qe.prototype.shift=function(){return this.pop.apply(this,arguments)},qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ae()},qe.prototype.slice=function(t,e){if(a(t,e,this.size))return this;var r=f(t,this.size),n=h(e,this.size);if(n!==this.size)return F.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):De(i,o)},qe.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?De(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},qe.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},qe.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new b(function(){if(n){var e=n.value;return n=n.next,I(t,r++,e)}return S()})},qe.isStack=Oe;var Xr="@@__IMMUTABLE_STACK__@@",Yr=qe.prototype;Yr[Xr]=!0,Yr.withMutations=Kr.withMutations,Yr.asMutable=Kr.asMutable,Yr.asImmutable=Kr.asImmutable,Yr.wasAltered=Kr.wasAltered;var Gr;t(ke,X),ke.of=function(){return this(arguments)},ke.fromKeys=function(t){return this(_(t).keySeq())},ke.prototype.toString=function(){return this.__toString("Set {","}")},ke.prototype.has=function(t){return this._map.has(t)},ke.prototype.add=function(t){return Le(this,this._map.set(t,!0))},ke.prototype.remove=function(t){return Le(this,this._map.remove(t))},ke.prototype.clear=function(){return Le(this,this._map.clear())},ke.prototype.union=function(){var t=ur.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var r=0;r1?" by "+this._step:"")+" ]"},Fe.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Fe.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=e?new Fe(0,0):new Fe(this.get(t,this._end),this.get(e,this._end),this._step))},Fe.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Fe.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new b(function(){var u=i;return i+=e?-n:n,o>r?S():I(t,o++,u)})},Fe.prototype.equals=function(t){return t instanceof Fe?this._start===t._start&&this._end===t._end&&this._step===t._step:Ve(this,t)};var nn;t(Xe,A),Xe.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Xe.prototype.get=function(t,e){return this.has(t)?this._value:e},Xe.prototype.includes=function(t){return Y(this._value,t)},Xe.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:new Xe(this._value,h(e,r)-f(t,r))},Xe.prototype.reverse=function(){return this},Xe.prototype.indexOf=function(t){return Y(this._value,t)?0:-1},Xe.prototype.lastIndexOf=function(t){return Y(this._value,t)?this.size:-1},Xe.prototype.__iterate=function(t,e){for(var r=0;rt?this.count():this.size);var n=this.slice(0,t);return Ot(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Ot(this,It(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t=200&&t.status<300)return n;var i=new Error(t.statusText);throw i.response=n,i})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e=200&&e.statusCode<300)return r(s);var a=new Error(e.statusMessage);a.response=s,n(a)})})}},t.exports=e["default"]},function(t,e,r){"use strict";function n(t){var e=o.Map(),r=new i.EventEmitter,u={assign:function(t,r,n){return u.has(t)||u.set(t,o.Map()),e=e.setIn([t,r],n),u},emit:function(){r.emit.apply(r,arguments),t&&t.emit.apply(t,arguments)},get:function(r){var n=e.get(r);if(u.has(r)&&!o.Iterable.isIterable(n)||!t)return n;if(!u.has(r)&&t)return t.get(r);var i=t.get(r);return i?o.List.isList(i)?i.concat(n):i.mergeDeep(n):n},has:function(t){return e.has(t)},"new":function(){return n(u)},on:r.on.bind(r),once:r.once.bind(r),push:function(t,r){return u.has(t)||u.set(t,o.List()),e=e.update(t,function(t){return t.push(r)}),u},set:function(t,r){return e=e.set(t,r),u}};return u}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n;var i=r(13),o=r(7);t.exports=e["default"]},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function u(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,a,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],u(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];r.apply(this,s)}else if(o(r)){for(i=arguments.length,s=new Array(i-1),a=1;i>a;a++)s[a-1]=arguments[a];for(f=r.slice(),i=f.length,a=0;i>a;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned){var i;i=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,u,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],u=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=u;s-->0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?n(t._events[e])?1:t._events[e].length:0}},function(t,e){!function(){"use strict";function t(t){if("string"!=typeof t&&(t=t.toString()),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function e(t){return"string"!=typeof t&&(t=t.toString()),t}function r(t){this.map={},t instanceof r?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function n(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function i(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function o(t){var e=new FileReader;return e.readAsArrayBuffer(t),i(e)}function u(t){var e=new FileReader;return e.readAsText(t),i(e)}function s(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(_.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(_.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else{if(t)throw new Error("unsupported BodyInit type");this._bodyText=""}},_.blob?(this.blob=function(){var t=n(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(o)},this.text=function(){var t=n(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var t=n(this);return t?t:Promise.resolve(this._bodyText)},_.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function a(t){var e=t.toUpperCase();return l.indexOf(e)>-1?e:t}function f(t,e){if(e=e||{},this.url=t,this.credentials=e.credentials||"omit",this.headers=new r(e.headers),this.method=a(e.method||"GET"),this.mode=e.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&e.body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(e.body)}function h(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}}),e}function c(t){var e=new r,n=t.getAllResponseHeaders().trim().split("\n");return n.forEach(function(t){var r=t.trim().split(":"),n=r.shift().trim(),i=r.join(":").trim();e.append(n,i)}),e}function p(t,e){e||(e={}),this._initBody(t),this.type="default",this.url=null,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText,this.headers=e.headers instanceof r?e.headers:new r(e.headers),this.url=e.url||""}if(!self.fetch){r.prototype.append=function(r,n){r=t(r),n=e(n);var i=this.map[r];i||(i=[],this.map[r]=i),i.push(n)},r.prototype["delete"]=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(r,n){this.map[t(r)]=[e(n)]},r.prototype.forEach=function(t,e){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){t.call(e,n,r,this)},this)},this)};var _={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self},l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];s.call(f.prototype),s.call(p.prototype),self.Headers=r,self.Request=f,self.Response=p,self.fetch=function(t,e){var r;return r=f.prototype.isPrototypeOf(t)&&!e?t:new f(t,e),new Promise(function(t,e){function n(){return"responseURL"in i?i.responseURL:/^X-Request-URL:/m.test(i.getAllResponseHeaders())?i.getResponseHeader("X-Request-URL"):void 0}var i=new XMLHttpRequest;i.onload=function(){var r=1223===i.status?204:i.status;if(100>r||r>599)return void e(new TypeError("Network request failed"));var o={status:r,statusText:i.statusText,headers:c(i),url:n()},u="response"in i?i.response:i.responseText;t(new p(u,o))},i.onerror=function(){e(new TypeError("Network request failed"))},i.open(r.method,r.url,!0),"include"===r.credentials&&(i.withCredentials=!0),"responseType"in i&&_.blob&&(i.responseType="blob"),r.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send("undefined"==typeof r._bodyInit?null:r._bodyInit)})},self.fetch.polyfill=!0}}()}])}); \ No newline at end of file diff --git a/src/http/fetch.js b/src/http/fetch.js index c938917..1ed921c 100644 --- a/src/http/fetch.js +++ b/src/http/fetch.js @@ -10,7 +10,7 @@ export default function(fetch) { return fetch(url, config) .then((response) => { - return response.json().then((json) => { + return (response.status === 204 ? Promise.resolve(null) : response.json()).then((json) => { const headers = {}; response.headers.forEach((value, name) => { diff --git a/test/src/http/fetchSpec.js b/test/src/http/fetchSpec.js index 2641da0..aabebee 100644 --- a/test/src/http/fetchSpec.js +++ b/test/src/http/fetchSpec.js @@ -14,7 +14,7 @@ describe('Fetch HTTP Backend', () => { cb('here', 'test'); }, }, - json: () => Promise.resolve({ content: 'Yes' }), + json: sinon.stub().returns(Promise.resolve({ content: 'Yes' })), status: 200, }; fetch = sinon.stub().returns(Promise.resolve(response)); @@ -102,6 +102,35 @@ describe('Fetch HTTP Backend', () => { .catch(done); }); + it('should correctly format the response when it succeed and returns 204 as status code', (done) => { + response.status = 204; + httpBackend({ + data: { + me: 'you', + }, + headers: { + 'Content-Type': 'application/json;charset=UTF-8', + }, + params: { + asc: 1, + }, + url: '/url', + }) + .then((_response) => { + expect(_response).to.deep.equal({ + data: null, + headers: { + test: 'here', + }, + statusCode: 204, + }); + + expect(response.json.callCount).to.equal(0); + done(); + }) + .catch(done); + }); + it('should correctly format the error when it fails', (done) => { response.status = 404; response.statusText = 'Not Found';