immutable 3.8.2 → 4.0.0-rc.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,31 +4,35 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Immutable=e()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return o(t)?t:O(t)}function r(t){return u(t)?t:x(t)}function n(t){return s(t)?t:k(t)}function i(t){return o(t)&&!a(t)?t:A(t)}function o(t){return!(!t||!t[ar])}function u(t){return!(!t||!t[hr])}function s(t){return!(!t||!t[fr])}function a(t){return u(t)||s(t)}function h(t){return!(!t||!t[cr])}function f(t){return t.value=!1,t}function c(t){t&&(t.value=!0)}function _(){}function p(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function v(t){return void 0===t.size&&(t.size=t.__iterate(y)),t.size}function l(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return 0>e?v(t)+e:e}function y(){return!0}function d(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function m(t,e){return w(t,e,0)}function g(t,e){return w(t,e,e)}function w(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function S(t){this.next=t}function z(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 I(){return{value:void 0,done:!0}}function b(t){return!!M(t)}function q(t){return t&&"function"==typeof t.next}function D(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(zr&&t[zr]||t[Ir]);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():o(t)?t.toSeq():C(t)}function x(t){return null===t||void 0===t?T().toKeyedSeq():o(t)?u(t)?t.toSeq():t.fromEntrySeq():B(t)}function k(t){return null===t||void 0===t?T():o(t)?u(t)?t.entrySeq():t.toIndexedSeq():W(t)}function A(t){return(null===t||void 0===t?T():o(t)?u(t)?t.entrySeq():t:W(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,
8
- this.size=e.length}function U(t){this._iterable=t,this.size=t.length||t.size}function K(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[qr])}function T(){return Dr||(Dr=new j([]))}function B(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():q(t)?new K(t).fromEntrySeq():b(t)?new U(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function W(t){var e=J(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function C(t){var e=J(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function J(t){return E(t)?new j(t):q(t)?new K(t):b(t)?new U(t):void 0}function N(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 P(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new S(function(){var t=i[r?o-u:u];return u++>o?I():z(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function H(t,e){return e?V(e,t,"",{"":t}):Y(t)}function V(t,e,r,n){return Array.isArray(e)?t.call(n,r,k(e).map(function(r,n){return V(t,r,n,e)})):Q(e)?t.call(n,r,x(e).map(function(r,n){return V(t,r,n,e)})):e}function Y(t){return Array.isArray(t)?k(t).map(Y).toList():Q(t)?x(t).map(Y).toMap():t}function Q(t){return t&&(t.constructor===Object||void 0===t.constructor)}function X(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 F(t,e){if(t===e)return!0;if(!o(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||u(t)!==u(e)||s(t)!==s(e)||h(t)!==h(e))return!1;if(0===t.size&&0===e.size)return!0;
9
- var r=!a(t);if(h(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&X(i[1],t)&&(r||X(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 f=t;t=e,e=f}var c=!0,_=e.__iterate(function(e,n){return(r?t.has(e):i?X(e,t.get(n,yr)):X(t.get(n,yr),e))?void 0:(c=!1,!1)});return c&&t.size===_}function G(t,e){if(!(this instanceof G))return new G(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Mr)return Mr;Mr=this}}function Z(t,e){if(!t)throw Error(e)}function $(t,e,r){if(!(this instanceof $))return new $(t,e,r);if(Z(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(Er)return Er;Er=this}}function tt(){throw TypeError("Abstract")}function et(){}function rt(){}function nt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(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){if(t!==t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return it(r)}if("string"===e)return t.length>Kr?ut(t):st(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return at(t);if("function"==typeof t.toString)return st(""+t);throw Error("Value type "+e+" cannot be hashed.")}function ut(t){var e=Br[t];return void 0===e&&(e=st(t),Tr===Lr&&(Tr=0,Br={}),Tr++,Br[t]=e),e}function st(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)|0;return it(e)}function at(t){var e;if(jr&&(e=Or.get(t),void 0!==e))return e;if(e=t[Ur],void 0!==e)return e;if(!Ar){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ur],void 0!==e)return e;if(e=ht(t),void 0!==e)return e}if(e=++Rr,1073741824&Rr&&(Rr=0),jr)Or.set(t,e);else{if(void 0!==kr&&kr(t)===!1)throw Error("Non-extensible objects are not allowed as keys.");
10
- if(Ar)Object.defineProperty(t,Ur,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Ur]=e;else{if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Ur]=e}}return e}function ht(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ft(t){Z(t!==1/0,"Cannot perform this action with an infinite size.")}function ct(t){return null===t||void 0===t?zt():_t(t)&&!h(t)?t:zt().withMutations(function(e){var n=r(t);ft(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function _t(t){return!(!t||!t[Wr])}function pt(t,e){this.ownerID=t,this.entries=e}function vt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function lt(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function yt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function dt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function mt(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&wt(t._root)}function gt(t,e){return z(t,e[0],e[1])}function wt(t,e){return{node:t,index:0,__prev:e}}function St(t,e,r,n){var i=Object.create(Cr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zt(){return Jr||(Jr=St(0))}function It(t,e,r){var n,i;if(t._root){var o=f(dr),u=f(mr);if(n=bt(t._root,t.__ownerID,0,void 0,e,r,o,u),!u.value)return t;i=t.size+(o.value?r===yr?-1:1:0)}else{if(r===yr)return t;i=1,n=new pt(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?St(i,n):zt()}function bt(t,e,r,n,i,o,u,s){return t?t.update(e,r,n,i,o,u,s):o===yr?t:(c(s),c(u),new dt(e,n,[i,o]))}function qt(t){return t.constructor===dt||t.constructor===yt}function Dt(t,e,r,n,i){if(t.keyHash===n)return new yt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&lr,s=(0===r?n:n>>>r)&lr,a=u===s?[Dt(t,e,r+pr,n,i)]:(o=new dt(e,n,i),
11
- s>u?[t,o]:[o,t]);return new vt(e,1<<u|1<<s,a)}function Mt(t,e,r,n){t||(t=new _);for(var i=new dt(t,ot(r),[r,n]),o=0;e.length>o;o++){var u=e[o];i=i.update(t,0,void 0,u[0],u[1])}return i}function Et(t,e,r,n){for(var i=0,o=0,u=Array(r),s=0,a=1,h=e.length;h>s;s++,a<<=1){var f=e[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new vt(t,i,u)}function Ot(t,e,r,n,i){for(var o=0,u=Array(vr),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new lt(t,o+1,u)}function xt(t,e,n){for(var i=[],u=0;n.length>u;u++){var s=n[u],a=r(s);o(s)||(a=a.map(function(t){return H(t)})),i.push(a)}return jt(t,e,i)}function kt(t,e,r){return t&&t.mergeDeep&&o(e)?t.mergeDeep(e):X(t,e)?t:e}function At(t){return function(e,r,n){if(e&&e.mergeDeepWith&&o(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return X(e,i)?e:i}}function jt(t,e,r){return r=r.filter(function(t){return 0!==t.size}),0===r.length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,yr,function(t){return t===yr?r:e(t,r,n)})}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)}):t.constructor(r[0])}function Rt(t,e,r,n){var i=t===yr,o=e.next();if(o.done){var u=i?r:t,s=n(u);return s===u?t:s}Z(i||t&&t.set,"invalid keyPath");var a=o.value,h=i?yr:t.get(a,yr),f=Rt(h,e,r,n);return f===h?t:f===yr?t.remove(a):(i?zt():t).set(a,f)}function Ut(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function Kt(t,e,r,n){var i=n?t:p(t);return i[e]=r,i}function Lt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=Array(i),u=0,s=0;i>s;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function Tt(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function Bt(t){var e=Pt();if(null===t||void 0===t)return e;if(Wt(t))return t;var r=n(t),i=r.size;return 0===i?e:(ft(i),i>0&&vr>i?Nt(0,i,pr,null,new Ct(r.toArray())):e.withMutations(function(t){t.setSize(i),r.forEach(function(e,r){return t.set(r,e)})}))}function Wt(t){
12
- return!(!t||!t[Vr])}function Ct(t,e){this.array=t,this.ownerID=e}function Jt(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,h=u-r;return h>vr&&(h=vr),function(){if(i===h)return Xr;var t=e?--h:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,h=i>o?0:o-i>>n,f=(u-i>>n)+1;return f>vr&&(f=vr),function(){for(;;){if(s){var t=s();if(t!==Xr)return t;s=null}if(h===f)return Xr;var o=e?--f:h++;s=r(a&&a[o],n-pr,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=Gt(u),a=t._tail;return r(t._root,t._level,0)}function Nt(t,e,r,n,i,o,u){var s=Object.create(Yr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function Pt(){return Qr||(Qr=Nt(0,0,pr))}function Ht(t,e,r){if(e=l(t,e),e!==e)return t;if(e>=t.size||0>e)return t.withMutations(function(t){0>e?Xt(t,e).set(0,r):Xt(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,o=f(mr);return e>=Gt(t._capacity)?n=Vt(n,t.__ownerID,0,e,r,o):i=Vt(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Nt(t._origin,t._capacity,t._level,i,n):t}function Vt(t,e,r,n,i,o){var u=n>>>r&lr,s=t&&t.array.length>u;if(!s&&void 0===i)return t;var a;if(r>0){var h=t&&t.array[u],f=Vt(h,e,r-pr,n,i,o);return f===h?t:(a=Yt(t,e),a.array[u]=f,a)}return s&&t.array[u]===i?t:(c(o),a=Yt(t,e),void 0===i&&u===a.array.length-1?a.array.pop():a.array[u]=i,a)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new Ct(t?t.array.slice():[],e)}function Qt(t,e){if(e>=Gt(t._capacity))return t._tail;if(1<<t._level+pr>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&lr],n-=pr;return r}}function Xt(t,e,r){void 0!==e&&(e=0|e),void 0!==r&&(r=0|r);var n=t.__ownerID||new _,i=t._origin,o=t._capacity,u=i+e,s=void 0===r?o:0>r?o+r:i+r;if(u===i&&s===o)return t;if(u>=s)return t.clear();for(var a=t._level,h=t._root,f=0;0>u+f;)h=new Ct(h&&h.array.length?[void 0,h]:[],n),a+=pr,f+=1<<a;f&&(u+=f,i+=f,s+=f,o+=f);for(var c=Gt(o),p=Gt(s);p>=1<<a+pr;)h=new Ct(h&&h.array.length?[h]:[],n),
13
- a+=pr;var v=t._tail,l=c>p?Qt(t,s-1):p>c?new Ct([],n):v;if(v&&p>c&&o>u&&v.array.length){h=Yt(h,n);for(var y=h,d=a;d>pr;d-=pr){var m=c>>>d&lr;y=y.array[m]=Yt(y.array[m],n)}y.array[c>>>pr&lr]=v}if(o>s&&(l=l&&l.removeAfter(n,0,s)),u>=p)u-=p,s-=p,a=pr,h=null,l=l&&l.removeBefore(n,0,u);else if(u>i||c>p){for(f=0;h;){var g=u>>>a&lr;if(g!==p>>>a&lr)break;g&&(f+=(1<<a)*g),a-=pr,h=h.array[g]}h&&u>i&&(h=h.removeBefore(n,a,u-f)),h&&c>p&&(h=h.removeAfter(n,a,p-f)),f&&(u-=f,s-=f)}return t.__ownerID?(t.size=s-u,t._origin=u,t._capacity=s,t._level=a,t._root=h,t._tail=l,t.__hash=void 0,t.__altered=!0,t):Nt(u,s,a,h,l)}function Ft(t,e,r){for(var i=[],u=0,s=0;r.length>s;s++){var a=r[s],h=n(a);h.size>u&&(u=h.size),o(a)||(h=h.map(function(t){return H(t)})),i.push(h)}return u>t.size&&(t=t.setSize(u)),jt(t,e,i)}function Gt(t){return vr>t?0:t-1>>>pr<<pr}function Zt(t){return null===t||void 0===t?ee():$t(t)?t:ee().withMutations(function(e){var n=r(t);ft(n.size),n.forEach(function(t,r){return e.set(r,t)})})}function $t(t){return _t(t)&&h(t)}function te(t,e,r,n){var i=Object.create(Zt.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function ee(){return Fr||(Fr=te(zt(),Pt()))}function re(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===yr){if(!a)return t;u.size>=vr&&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):te(n,i)}function ne(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ue(t){this._iter=t,this.size=t.size}function se(t){var e=Ee(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);
14
- 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=Oe,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===Sr){var n=t.__iterator(e,r);return new S(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===wr?gr:wr,r)},e}function ae(t,e,r){var n=Ee(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,yr);return o===yr?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(Sr,i);return new S(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return z(n,s,e.call(r,u[1],s,t),i)})},n}function he(t,e){var r=Ee(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=se(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=Oe,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 fe(t,e,r,n){var i=Ee(t);return n&&(i.has=function(n){var i=t.get(n,yr);return i!==yr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,yr);return o!==yr&&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(Sr,o),s=0;return new S(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,h=a[0],f=a[1];if(e.call(r,f,h,t))return z(i,n?h:s++,f,o)}})},i}function ce(t,e,r){var n=ct().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){
15
- return t+1})}),n.asImmutable()}function _e(t,e,r){var n=u(t),i=(h(t)?Zt():ct()).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=Me(t);return i.map(function(e){return be(t,o(e))})}function pe(t,e,r,n){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==r&&(r=r===1/0?i:0|r),d(e,r,i))return t;var o=m(e,i),u=g(r,i);if(o!==o||u!==u)return pe(t.toSeq().cacheResult(),e,r,n);var s,a=u-o;a===a&&(s=0>a?0:a);var h=Ee(t);return h.size=0===s?s:t.size&&s||void 0,!n&&L(t)&&s>=0&&(h.get=function(e,r){return e=l(this,e),e>=0&&s>e?t.get(e+o,r):r}),h.__iterateUncached=function(e,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,a=!0,h=0;return t.__iterate(function(t,r){return a&&(a=u++<o)?void 0:(h++,e(t,n?r:h-1,i)!==!1&&h!==s)}),h},h.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);var i=0!==s&&t.__iterator(e,r),u=0,a=0;return new S(function(){for(;u++<o;)i.next();if(++a>s)return I();var t=i.next();return n||e===wr?t:e===gr?z(e,a-1,void 0,t):z(e,a-1,t.value[1],t)})},h}function ve(t,e,r){var n=Ee(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(Sr,i),s=!0;return new S(function(){if(!s)return I();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],h=i[1];return e.call(r,h,a,o)?n===Sr?t:z(n,a,h,t):(s=!1,I())})},n}function le(t,e,r,n){var i=Ee(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,h){return s&&(s=e.call(r,t,o,h))?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(Sr,o),a=!0,h=0;return new S(function(){var t,o,f;do{if(t=s.next(),t.done)return n||i===wr?t:i===gr?z(i,h++,void 0,t):z(i,h++,t.value[1],t);
16
- var c=t.value;o=c[0],f=c[1],a&&(a=e.call(r,f,o,u))}while(a);return i===Sr?t:z(i,o,f,t)})},i}function ye(t,e){var n=u(t),i=[t].concat(e).map(function(t){return o(t)?n&&(t=r(t)):t=n?B(t):W(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var a=i[0];if(a===t||n&&u(a)||s(t)&&s(a))return a}var h=new j(i);return n?h=h.toKeyedSeq():s(t)||(h=h.toSetSeq()),h=h.flatten(!0),h.size=i.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),h}function de(t,e,r){var n=Ee(t);return n.__iterateUncached=function(n,i){function u(t,h){var f=this;t.__iterate(function(t,i){return(!e||e>h)&&o(t)?u(t,h+1):n(t,r?i:s++,f)===!1&&(a=!0),!a},i)}var s=0,a=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){var u=t.__iterator(n,i),s=[],a=0;return new S(function(){for(;u;){var t=u.next();if(t.done===!1){var h=t.value;if(n===Sr&&(h=h[1]),e&&!(e>s.length)||!o(h))return r?t:z(n,a++,h,t);s.push(u),u=h.__iterator(n,i)}else u=s.pop()}return I()})},n}function me(t,e,r){var n=Me(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function ge(t,e){var r=Ee(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t,n){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(wr,n),u=0;return new S(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?z(r,u++,e):z(r,u++,i.value,i)})},r}function we(t,e,r){e||(e=xe);var n=u(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?x(o):s(t)?k(o):A(o)}function Se(t,e,r){if(e||(e=xe),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return ze(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return ze(e,t,r)?r:t})}function ze(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function Ie(t,r,n){
17
- var i=Ee(t);return i.size=new j(n).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(wr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=n.map(function(t){return t=e(t),D(i?t.reverse():t)}),u=0,s=!1;return new S(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=e.some(function(t){return t.done})),s?I():z(t,u++,r.apply(null,e.map(function(t){return t.value})))})},i}function be(t,e){return L(t)?e:t.constructor(e)}function qe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function De(t){return ft(t.size),v(t)}function Me(t){return u(t)?r:s(t)?n:i}function Ee(t){return Object.create((u(t)?x:s(t)?k:A).prototype)}function Oe(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function xe(t,e){return t>e?1:e>t?-1:0}function ke(t){var r=D(t);if(!r){if(!E(t))throw new TypeError("Expected iterable or array-like: "+t);r=D(e(t))}return r}function Ae(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);Ue(i,u),i.size=u.length,i._name=e,i._keys=u,i._defaultValues=t}this._map=ct(o)},i=n.prototype=Object.create(Gr);return i.constructor=n,n}function je(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Re(t){return t._name||t.constructor.name||"Record"}function Ue(t,e){try{e.forEach(Ke.bind(void 0,t))}catch(r){}}function Ke(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Z(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Le(t){return null===t||void 0===t?Ce():Te(t)&&!h(t)?t:Ce().withMutations(function(e){var r=i(t);ft(r.size),r.forEach(function(t){return e.add(t)})})}function Te(t){return!(!t||!t[Zr])}function Be(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 We(t,e){var r=Object.create($r);
18
- return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ce(){return tn||(tn=We(zt()))}function Je(t){return null===t||void 0===t?He():Ne(t)?t:He().withMutations(function(e){var r=i(t);ft(r.size),r.forEach(function(t){return e.add(t)})})}function Ne(t){return Te(t)&&h(t)}function Pe(t,e){var r=Object.create(en);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function He(){return rn||(rn=Pe(ee()))}function Ve(t){return null===t||void 0===t?Xe():Ye(t)?t:Xe().unshiftAll(t)}function Ye(t){return!(!t||!t[nn])}function Qe(t,e,r,n){var i=Object.create(on);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Xe(){return un||(un=Qe(0))}function Fe(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 Ze(t,e){return[e,t]}function $e(t){return function(){return!t.apply(this,arguments)}}function tr(t){return function(){return-t.apply(this,arguments)}}function er(t){return"string"==typeof t?JSON.stringify(t):t+""}function rr(){return p(arguments)}function nr(t,e){return e>t?1:t>e?-1:0}function ir(t){if(t.size===1/0)return 0;var e=h(t),r=u(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+ur(ot(t),ot(e))|0}:function(t,e){n=n+ur(ot(t),ot(e))|0}:e?function(t){n=31*n+ot(t)|0}:function(t){n=n+ot(t)|0});return or(i,n)}function or(t,e){return e=xr(e,3432918353),e=xr(e<<15|e>>>-15,461845907),e=xr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=xr(e^e>>>16,2246822507),e=xr(e^e>>>13,3266489909),e=it(e^e>>>16)}function ur(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sr=Array.prototype.slice;t(r,e),t(n,e),t(i,e),e.isIterable=o,e.isKeyed=u,e.isIndexed=s,e.isAssociative=a,e.isOrdered=h,e.Keyed=r,e.Indexed=n,e.Set=i;var ar="@@__IMMUTABLE_ITERABLE__@@",hr="@@__IMMUTABLE_KEYED__@@",fr="@@__IMMUTABLE_INDEXED__@@",cr="@@__IMMUTABLE_ORDERED__@@",_r="delete",pr=5,vr=1<<pr,lr=vr-1,yr={},dr={value:!1},mr={value:!1},gr=0,wr=1,Sr=2,zr="function"==typeof Symbol&&Symbol.iterator,Ir="@@iterator",br=zr||Ir;
19
- S.prototype.toString=function(){return"[Iterator]"},S.KEYS=gr,S.VALUES=wr,S.ENTRIES=Sr,S.prototype.inspect=S.prototype.toSource=function(){return""+this},S.prototype[br]=function(){return this},t(O,e),O.of=function(){return O(arguments)},O.prototype.toSeq=function(){return this},O.prototype.toString=function(){return this.__toString("Seq {","}")},O.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},O.prototype.__iterate=function(t,e){return N(this,t,e,!0)},O.prototype.__iterator=function(t,e){return P(this,t,e,!0)},t(x,O),x.prototype.toKeyedSeq=function(){return this},t(k,O),k.of=function(){return k(arguments)},k.prototype.toIndexedSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq [","]")},k.prototype.__iterate=function(t,e){return N(this,t,e,!1)},k.prototype.__iterator=function(t,e){return P(this,t,e,!1)},t(A,O),A.of=function(){return A(arguments)},A.prototype.toSetSeq=function(){return this},O.isSeq=L,O.Keyed=x,O.Set=A,O.Indexed=k;var qr="@@__IMMUTABLE_SEQ__@@";O.prototype[qr]=!0,t(j,k),j.prototype.get=function(t,e){return this.has(t)?this._array[l(this,t)]:e},j.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=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 S(function(){return i>n?I():z(t,i,r[e?n-i++:i++])})},t(R,x),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.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},R.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new S(function(){var u=n[e?i-o:o];return o++>i?I():z(t,u,r[u])})},R.prototype[cr]=!0,t(U,k),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);
20
- var r=this._iterable,n=D(r),i=0;if(q(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=D(r);if(!q(n))return new S(I);var i=0;return new S(function(){var e=n.next();return e.done?e:z(t,i++,e.value)})},t(K,k),K.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var o;!(o=r.next()).done;){var u=o.value;if(n[i]=u,t(u,i++,this)===!1)break}return i},K.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new S(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return z(t,i,n[i++])})};var Dr;t(G,k),G.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},G.prototype.get=function(t,e){return this.has(t)?this._value:e},G.prototype.includes=function(t){return X(this._value,t)},G.prototype.slice=function(t,e){var r=this.size;return d(t,e,r)?this:new G(this._value,g(e,r)-m(t,r))},G.prototype.reverse=function(){return this},G.prototype.indexOf=function(t){return X(this._value,t)?0:-1},G.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},G.prototype.__iterate=function(t,e){for(var r=0;this.size>r;r++)if(t(this._value,r,this)===!1)return r+1;return r},G.prototype.__iterator=function(t,e){var r=this,n=0;return new S(function(){return r.size>n?z(t,n++,r._value):I()})},G.prototype.equals=function(t){return t instanceof G?X(this._value,t._value):F(t)};var Mr;t($,k),$.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},$.prototype.get=function(t,e){return this.has(t)?this._start+l(this,t)*this._step:e},$.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e);
21
- },$.prototype.slice=function(t,e){return d(t,e,this.size)?this:(t=m(t,this.size),e=g(e,this.size),t>=e?new $(0,0):new $(this.get(t,this._end),this.get(e,this._end),this._step))},$.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},$.prototype.lastIndexOf=function(t){return this.indexOf(t)},$.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;r>=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},$.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 S(function(){var u=i;return i+=e?-n:n,o>r?I():z(t,o++,u)})},$.prototype.equals=function(t){return t instanceof $?this._start===t._start&&this._end===t._end&&this._step===t._step:F(this,t)};var Er;t(tt,e),t(et,tt),t(rt,tt),t(nt,tt),tt.Keyed=et,tt.Indexed=rt,tt.Set=nt;var Or,xr="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},kr=Object.isExtensible,Ar=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),jr="function"==typeof WeakMap;jr&&(Or=new WeakMap);var Rr=0,Ur="__immutablehash__";"function"==typeof Symbol&&(Ur=Symbol(Ur));var Kr=16,Lr=255,Tr=0,Br={};t(ct,et),ct.of=function(){var t=sr.call(arguments,0);return zt().withMutations(function(e){for(var r=0;t.length>r;r+=2){if(r+1>=t.length)throw Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}})},ct.prototype.toString=function(){return this.__toString("Map {","}")},ct.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ct.prototype.set=function(t,e){return It(this,t,e)},ct.prototype.setIn=function(t,e){return this.updateIn(t,yr,function(){return e})},ct.prototype.remove=function(t){return It(this,t,yr)},ct.prototype.deleteIn=function(t){return this.updateIn(t,function(){return yr})},ct.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r);
22
- },ct.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=Rt(this,ke(t),e,r);return n===yr?void 0:n},ct.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):zt()},ct.prototype.merge=function(){return xt(this,void 0,arguments)},ct.prototype.mergeWith=function(t){var e=sr.call(arguments,1);return xt(this,t,e)},ct.prototype.mergeIn=function(t){var e=sr.call(arguments,1);return this.updateIn(t,zt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ct.prototype.mergeDeep=function(){return xt(this,kt,arguments)},ct.prototype.mergeDeepWith=function(t){var e=sr.call(arguments,1);return xt(this,At(t),e)},ct.prototype.mergeDeepIn=function(t){var e=sr.call(arguments,1);return this.updateIn(t,zt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ct.prototype.sort=function(t){return Zt(we(this,t))},ct.prototype.sortBy=function(t,e){return Zt(we(this,e,t))},ct.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ct.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new _)},ct.prototype.asImmutable=function(){return this.__ensureOwner()},ct.prototype.wasAltered=function(){return this.__altered},ct.prototype.__iterator=function(t,e){return new mt(this,t,e)},ct.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},ct.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?St(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ct.isMap=_t;var Wr="@@__IMMUTABLE_MAP__@@",Cr=ct.prototype;Cr[Wr]=!0,Cr[_r]=Cr.remove,Cr.removeIn=Cr.deleteIn,pt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},pt.prototype.update=function(t,e,r,n,i,o,u){for(var s=i===yr,a=this.entries,h=0,f=a.length;f>h&&!X(n,a[h][0]);h++);
23
- var _=f>h;if(_?a[h][1]===i:s)return this;if(c(u),(s||!_)&&c(o),!s||1!==a.length){if(!_&&!s&&a.length>=Nr)return Mt(t,a,n,i);var v=t&&t===this.ownerID,l=v?a:p(a);return _?s?h===f-1?l.pop():l[h]=l.pop():l[h]=[n,i]:l.push([n,i]),v?(this.entries=l,this):new pt(t,l)}},vt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=1<<((0===t?e:e>>>t)&lr),o=this.bitmap;return 0===(o&i)?n:this.nodes[Ut(o&i-1)].get(t+pr,e,r,n)},vt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=(0===e?r:r>>>e)&lr,a=1<<s,h=this.bitmap,f=0!==(h&a);if(!f&&i===yr)return this;var c=Ut(h&a-1),_=this.nodes,p=f?_[c]:void 0,v=bt(p,t,e+pr,r,n,i,o,u);if(v===p)return this;if(!f&&v&&_.length>=Pr)return Ot(t,_,h,s,v);if(f&&!v&&2===_.length&&qt(_[1^c]))return _[1^c];if(f&&v&&1===_.length&&qt(v))return v;var l=t&&t===this.ownerID,y=f?v?h:h^a:h|a,d=f?v?Kt(_,c,v,l):Tt(_,c,l):Lt(_,c,v,l);return l?(this.bitmap=y,this.nodes=d,this):new vt(t,y,d)},lt.prototype.get=function(t,e,r,n){void 0===e&&(e=ot(r));var i=(0===t?e:e>>>t)&lr,o=this.nodes[i];return o?o.get(t+pr,e,r,n):n},lt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=(0===e?r:r>>>e)&lr,a=i===yr,h=this.nodes,f=h[s];if(a&&!f)return this;var c=bt(f,t,e+pr,r,n,i,o,u);if(c===f)return this;var _=this.count;if(f){if(!c&&(_--,Hr>_))return Et(t,h,_,s)}else _++;var p=t&&t===this.ownerID,v=Kt(h,s,c,p);return p?(this.count=_,this.nodes=v,this):new lt(t,_,v)},yt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},yt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=ot(n));var s=i===yr;if(r!==this.keyHash)return s?this:(c(u),c(o),Dt(this,t,e,r,[n,i]));for(var a=this.entries,h=0,f=a.length;f>h&&!X(n,a[h][0]);h++);var _=f>h;if(_?a[h][1]===i:s)return this;if(c(u),(s||!_)&&c(o),s&&2===f)return new dt(t,this.keyHash,a[1^h]);var v=t&&t===this.ownerID,l=v?a:p(a);return _?s?h===f-1?l.pop():l[h]=l.pop():l[h]=[n,i]:l.push([n,i]),v?(this.entries=l,this):new yt(t,this.keyHash,l)},dt.prototype.get=function(t,e,r,n){return X(r,this.entry[0])?this.entry[1]:n;
24
- },dt.prototype.update=function(t,e,r,n,i,o,u){var s=i===yr,a=X(n,this.entry[0]);return(a?i===this.entry[1]:s)?this:(c(u),s?void c(o):a?t&&t===this.ownerID?(this.entry[1]=i,this):new dt(t,this.keyHash,[n,i]):(c(o),Dt(this,t,e,ot(n),[n,i])))},pt.prototype.iterate=yt.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},vt.prototype.iterate=lt.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}},dt.prototype.iterate=function(t,e){return t(this.entry)},t(mt,S),mt.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 gt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return gt(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 gt(t,o.entry);e=this._stack=wt(o,e)}continue}e=this._stack=this._stack.__prev}return I()};var Jr,Nr=vr/4,Pr=vr/2,Hr=vr/4;t(Bt,rt),Bt.of=function(){return this(arguments)},Bt.prototype.toString=function(){return this.__toString("List [","]")},Bt.prototype.get=function(t,e){if(t=l(this,t),t>=0&&this.size>t){t+=this._origin;var r=Qt(this,t);return r&&r.array[t&lr]}return e},Bt.prototype.set=function(t,e){return Ht(this,t,e)},Bt.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},Bt.prototype.insert=function(t,e){return this.splice(t,0,e)},Bt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=pr,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Pt()},Bt.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){Xt(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},Bt.prototype.pop=function(){return Xt(this,0,-1)},Bt.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){Xt(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r]);
25
- })},Bt.prototype.shift=function(){return Xt(this,1)},Bt.prototype.merge=function(){return Ft(this,void 0,arguments)},Bt.prototype.mergeWith=function(t){var e=sr.call(arguments,1);return Ft(this,t,e)},Bt.prototype.mergeDeep=function(){return Ft(this,kt,arguments)},Bt.prototype.mergeDeepWith=function(t){var e=sr.call(arguments,1);return Ft(this,At(t),e)},Bt.prototype.setSize=function(t){return Xt(this,0,t)},Bt.prototype.slice=function(t,e){var r=this.size;return d(t,e,r)?this:Xt(this,m(t,r),g(e,r))},Bt.prototype.__iterator=function(t,e){var r=0,n=Jt(this,e);return new S(function(){var e=n();return e===Xr?I():z(t,r++,e)})},Bt.prototype.__iterate=function(t,e){for(var r,n=0,i=Jt(this,e);(r=i())!==Xr&&t(r,n++,this)!==!1;);return n},Bt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Nt(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},Bt.isList=Wt;var Vr="@@__IMMUTABLE_LIST__@@",Yr=Bt.prototype;Yr[Vr]=!0,Yr[_r]=Yr.remove,Yr.setIn=Cr.setIn,Yr.deleteIn=Yr.removeIn=Cr.removeIn,Yr.update=Cr.update,Yr.updateIn=Cr.updateIn,Yr.mergeIn=Cr.mergeIn,Yr.mergeDeepIn=Cr.mergeDeepIn,Yr.withMutations=Cr.withMutations,Yr.asMutable=Cr.asMutable,Yr.asImmutable=Cr.asImmutable,Yr.wasAltered=Cr.wasAltered,Ct.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&lr;if(n>=this.array.length)return new Ct([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-pr,r),i===u&&o)return this}if(o&&!i)return this;var s=Yt(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},Ct.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&lr;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if(i=o&&o.removeAfter(t,e-pr,r),i===o&&n===this.array.length-1)return this}var u=Yt(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Qr,Xr={};t(Zt,ct),Zt.of=function(){return this(arguments)},Zt.prototype.toString=function(){return this.__toString("OrderedMap {","}");
26
- },Zt.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Zt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Zt.prototype.set=function(t,e){return re(this,t,e)},Zt.prototype.remove=function(t){return re(this,t,yr)},Zt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Zt.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Zt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Zt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?te(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},Zt.isOrderedMap=$t,Zt.prototype[cr]=!0,Zt.prototype[_r]=Zt.prototype.remove;var Fr;t(ne,x),ne.prototype.get=function(t,e){return this._iter.get(t,e)},ne.prototype.has=function(t){return this._iter.has(t)},ne.prototype.valueSeq=function(){return this._iter.valueSeq()},ne.prototype.reverse=function(){var t=this,e=he(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ne.prototype.map=function(t,e){var r=this,n=ae(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ne.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?De(this):0,function(i){return t(i,e?--r:r++,n)}),e)},ne.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(wr,e),n=e?De(this):0;return new S(function(){var i=r.next();return i.done?i:z(t,e?--n:n++,i.value,i)})},ne.prototype[cr]=!0,t(ie,k),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ie.prototype.__iterator=function(t,e){var r=this._iter.__iterator(wr,e),n=0;
27
- return new S(function(){var e=r.next();return e.done?e:z(t,n++,e.value,e)})},t(oe,A),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},oe.prototype.__iterator=function(t,e){var r=this._iter.__iterator(wr,e);return new S(function(){var e=r.next();return e.done?e:z(t,e.value,e.value,e)})},t(ue,x),ue.prototype.entrySeq=function(){return this._iter.toSeq()},ue.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){qe(e);var n=o(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ue.prototype.__iterator=function(t,e){var r=this._iter.__iterator(wr,e);return new S(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){qe(n);var i=o(n);return z(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ie.prototype.cacheResult=ne.prototype.cacheResult=oe.prototype.cacheResult=ue.prototype.cacheResult=Oe,t(Ae,et),Ae.prototype.toString=function(){return this.__toString(Re(this)+" {","}")},Ae.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Ae.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Ae.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=je(this,zt()))},Ae.prototype.set=function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+Re(this));if(this._map&&!this._map.has(t)){var r=this._defaultValues[t];if(e===r)return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:je(this,n)},Ae.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:je(this,e)},Ae.prototype.wasAltered=function(){return this._map.wasAltered()},Ae.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterator(t,e)},Ae.prototype.__iterate=function(t,e){
28
- var n=this;return r(this._defaultValues).map(function(t,e){return n.get(e)}).__iterate(t,e)},Ae.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?je(this,e,t):(this.__ownerID=t,this._map=e,this)};var Gr=Ae.prototype;Gr[_r]=Gr.remove,Gr.deleteIn=Gr.removeIn=Cr.removeIn,Gr.merge=Cr.merge,Gr.mergeWith=Cr.mergeWith,Gr.mergeIn=Cr.mergeIn,Gr.mergeDeep=Cr.mergeDeep,Gr.mergeDeepWith=Cr.mergeDeepWith,Gr.mergeDeepIn=Cr.mergeDeepIn,Gr.setIn=Cr.setIn,Gr.update=Cr.update,Gr.updateIn=Cr.updateIn,Gr.withMutations=Cr.withMutations,Gr.asMutable=Cr.asMutable,Gr.asImmutable=Cr.asImmutable,t(Le,nt),Le.of=function(){return this(arguments)},Le.fromKeys=function(t){return this(r(t).keySeq())},Le.prototype.toString=function(){return this.__toString("Set {","}")},Le.prototype.has=function(t){return this._map.has(t)},Le.prototype.add=function(t){return Be(this,this._map.set(t,!0))},Le.prototype.remove=function(t){return Be(this,this._map.remove(t))},Le.prototype.clear=function(){return Be(this,this._map.clear())},Le.prototype.union=function(){var t=sr.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;t.length>r;r++)i(t[r]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},Le.prototype.intersect=function(){var t=sr.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.every(function(t){return t.includes(e)})||r.remove(e)})})},Le.prototype.subtract=function(){var t=sr.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return i(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.remove(e)})})},Le.prototype.merge=function(){return this.union.apply(this,arguments)},Le.prototype.mergeWith=function(t){var e=sr.call(arguments,1);return this.union.apply(this,e)},
29
- Le.prototype.sort=function(t){return Je(we(this,t))},Le.prototype.sortBy=function(t,e){return Je(we(this,e,t))},Le.prototype.wasAltered=function(){return this._map.wasAltered()},Le.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},Le.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Le.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Le.isSet=Te;var Zr="@@__IMMUTABLE_SET__@@",$r=Le.prototype;$r[Zr]=!0,$r[_r]=$r.remove,$r.mergeDeep=$r.merge,$r.mergeDeepWith=$r.mergeWith,$r.withMutations=Cr.withMutations,$r.asMutable=Cr.asMutable,$r.asImmutable=Cr.asImmutable,$r.__empty=Ce,$r.__make=We;var tn;t(Je,Le),Je.of=function(){return this(arguments)},Je.fromKeys=function(t){return this(r(t).keySeq())},Je.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Je.isOrderedSet=Ne;var en=Je.prototype;en[cr]=!0,en.__empty=He,en.__make=Pe;var rn;t(Ve,rt),Ve.of=function(){return this(arguments)},Ve.prototype.toString=function(){return this.__toString("Stack [","]")},Ve.prototype.get=function(t,e){var r=this._head;for(t=l(this,t);r&&t--;)r=r.next;return r?r.value:e},Ve.prototype.peek=function(){return this._head&&this._head.value},Ve.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):Qe(t,e)},Ve.prototype.pushAll=function(t){if(t=n(t),0===t.size)return this;ft(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):Qe(e,r)},Ve.prototype.pop=function(){return this.slice(1)},Ve.prototype.unshift=function(){return this.push.apply(this,arguments)},Ve.prototype.unshiftAll=function(t){
30
- return this.pushAll(t)},Ve.prototype.shift=function(){return this.pop.apply(this,arguments)},Ve.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):Xe()},Ve.prototype.slice=function(t,e){if(d(t,e,this.size))return this;var r=m(t,this.size),n=g(e,this.size);if(n!==this.size)return rt.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):Qe(i,o)},Ve.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Qe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ve.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},Ve.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new S(function(){if(n){var e=n.value;return n=n.next,z(t,r++,e)}return I()})},Ve.isStack=Ye;var nn="@@__IMMUTABLE_STACK__@@",on=Ve.prototype;on[nn]=!0,on.withMutations=Cr.withMutations,on.asMutable=Cr.asMutable,on.asImmutable=Cr.asImmutable,on.wasAltered=Cr.wasAltered;var un;e.Iterator=S,Fe(e,{toArray:function(){ft(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new ne(this,!0)},toMap:function(){return ct(this.toKeyedSeq())},toObject:function(){ft(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return Zt(this.toKeyedSeq())},toOrderedSet:function(){return Je(u(this)?this.valueSeq():this)},toSet:function(){return Le(u(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this);
31
- },toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ve(u(this)?this.valueSeq():this)},toList:function(){return Bt(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=sr.call(arguments,0);return be(this,ye(this,t))},includes:function(t){return this.some(function(e){return X(e,t)})},entries:function(){return this.__iterator(Sr)},every:function(t,e){ft(this.size);var r=!0;return this.__iterate(function(n,i,o){return t.call(e,n,i,o)?void 0:(r=!1,!1)}),r},filter:function(t,e){return be(this,fe(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return ft(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){ft(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?""+n:""}),e},keys:function(){return this.__iterator(gr)},map:function(t,e){return be(this,ae(this,t,e))},reduce:function(t,e,r){ft(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,u){i?(i=!1,n=e):n=t.call(r,n,e,o,u)}),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return be(this,he(this,!0))},slice:function(t,e){return be(this,pe(this,t,e,!0))},some:function(t,e){return!this.every($e(t),e)},sort:function(t){return be(this,we(this,t))},values:function(){return this.__iterator(wr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return v(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return ce(this,t,e)},equals:function(t){return F(this,t)},entrySeq:function(){var t=this;if(t._cache)return new j(t._cache);var e=t.toSeq().map(Ze).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){
32
- return this.filter($e(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?(n=[i,r],!1):void 0}),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(y)},flatMap:function(t,e){return be(this,me(this,t,e))},flatten:function(t){return be(this,de(this,t,!0))},fromEntrySeq:function(){return new ue(this)},get:function(t,e){return this.find(function(e,r){return X(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=ke(t);!(r=i.next()).done;){var o=r.value;if(n=n&&n.get?n.get(o,yr):yr,n===yr)return e}return n},groupBy:function(t,e){return _e(this,t,e)},has:function(t){return this.get(t,yr)!==yr},hasIn:function(t){return this.getIn(t,yr)!==yr},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return X(e,t)})},keySeq:function(){return this.toSeq().map(Ge).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Se(this,t)},maxBy:function(t,e){return Se(this,e,t)},min:function(t){return Se(this,t?tr(t):nr)},minBy:function(t,e){return Se(this,e?tr(e):nr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return be(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return be(this,le(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile($e(t),e)},sortBy:function(t,e){return be(this,we(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return be(this,this.toSeq().reverse().take(t).reverse());
33
- },takeWhile:function(t,e){return be(this,ve(this,t,e))},takeUntil:function(t,e){return this.takeWhile($e(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var sn=e.prototype;sn[ar]=!0,sn[br]=sn.values,sn.__toJS=sn.toArray,sn.__toStringMapper=er,sn.inspect=sn.toSource=function(){return""+this},sn.chain=sn.flatMap,sn.contains=sn.includes,Fe(r,{flip:function(){return be(this,se(this))},mapEntries:function(t,e){var r=this,n=0;return be(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return be(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var an=r.prototype;an[hr]=!0,an[br]=sn.entries,an.__toJS=sn.toObject,an.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+er(t)},Fe(n,{toKeyedSeq:function(){return new ne(this,!1)},filter:function(t,e){return be(this,fe(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return be(this,he(this,!1))},slice:function(t,e){return be(this,pe(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=m(t,0>t?this.count():this.size);var n=this.slice(0,t);return be(this,1===r?n:n.concat(p(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(t){return be(this,de(this,t,!1))},get:function(t,e){return t=l(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=l(this,t),t>=0&&(void 0!==this.size?this.size===1/0||this.size>t:-1!==this.indexOf(t))},interpose:function(t){return be(this,ge(this,t))},interleave:function(){var t=[this].concat(p(arguments)),e=Ie(this.toSeq(),k.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),
34
- be(this,r)},keySeq:function(){return $(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return be(this,le(this,t,e,!1))},zip:function(){var t=[this].concat(p(arguments));return be(this,Ie(this,rr,t))},zipWith:function(t){var e=p(arguments);return e[0]=this,be(this,Ie(this,t,e))}}),n.prototype[fr]=!0,n.prototype[cr]=!0,Fe(i,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=sn.includes,i.prototype.contains=i.prototype.includes,Fe(x,r.prototype),Fe(k,n.prototype),Fe(A,i.prototype),Fe(et,r.prototype),Fe(rt,n.prototype),Fe(nt,i.prototype);var hn={Iterable:e,Seq:O,Collection:tt,Map:ct,OrderedMap:Zt,List:Bt,Stack:Ve,Set:Le,OrderedSet:Je,Record:Ae,Range:$,Repeat:G,is:X,fromJS:H};return hn});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.Immutable={})}(this,function(t){"use strict";function e(){return{value:!1}}function r(t){t&&(t.value=!0)}function n(){}function i(t){return void 0===t.size&&(t.size=t.__iterate(u)),t.size}function o(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?i(t)+e:e}function u(){return!0}function s(t,e,r){return(0===t&&!h(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function a(t,e){return f(t,e,0)}function c(t,e){return f(t,e,e)}function f(t,e,r){return void 0===t?r:h(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function h(t){return t<0||0===t&&1/t==-(1/0)}function p(t){return!(!t||!t[fr])}function _(t){return!(!t||!t[hr])}function l(t){return!(!t||!t[pr])}function v(t){return _(t)||l(t)}function y(t){return!(!t||!t[dr])}function d(t){return!(!t||!t[gr])}function g(t){return p(t)||d(t)}function m(t){return!(!t||!t[mr])}function w(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 z(){return{value:void 0,done:!0}}function S(t){return!!O(t)}function I(t){return t&&"function"==typeof t.next}function b(t){var e=O(t);return e&&e.call(t)}function O(t){var e=t&&(Ir&&t[Ir]||t[br]);if("function"==typeof e)return e}function E(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}function M(){return Rr||(Rr=new xr([]))}function q(t){var e=Array.isArray(t)?new xr(t):S(t)?new Kr(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new kr(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function D(t){var e=j(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function A(t){var e=j(t);if(e)return e;if("object"==typeof t)return new kr(t)
8
+ ;throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function j(t){return E(t)?new xr(t):S(t)?new Kr(t):void 0}function x(t){return!(!t||!t[Tr])}function k(t){return x(t)&&m(t)}function R(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function U(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!!(R(t)&&R(e)&&t.equals(e))}function K(t){return t>>>1&1073741824|3221225471&t}function T(t){switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return L(t);case"string":return t.length>Jr?C(t):B(t);case"object":case"function":return null===t?1108378658:"function"==typeof t.hashCode?K(t.hashCode(t)):(t.valueOf!==Cr&&"function"==typeof t.valueOf&&(t=t.valueOf(t)),W(t));case"undefined":return 1108378659;default:if("function"==typeof t.toString)return B(""+t);throw Error("Value type "+typeof t+" cannot be hashed.")}}function L(t){if(t!==t||t===1/0)return 0;var e=0|t;for(e!==t&&(e^=4294967295*t);t>4294967295;)t/=4294967295,e^=t;return K(e)}function C(t){var e=Qr[t];return void 0===e&&(e=B(t),Yr===Vr&&(Yr=0,Qr={}),Yr++,Qr[t]=e),e}function B(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return K(e)}function W(t){var e;if(Nr&&void 0!==(e=Ur.get(t)))return e;if(void 0!==(e=t[Hr]))return e;if(!Wr){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Hr]))return e;if(void 0!==(e=N(t)))return e}if(e=++Pr,1073741824&Pr&&(Pr=0),Nr)Ur.set(t,e);else{if(void 0!==Br&&Br(t)===!1)throw Error("Non-extensible objects are not allowed as keys.");if(Wr)Object.defineProperty(t,Hr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Hr]=e;else{
9
+ if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Hr]=e}}return e}function N(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function P(t){var e=ct(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=ft,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===Sr){var n=t.__iterator(e,r);return new Er(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===zr?wr:zr,r)},e}function H(t,e,r){var n=ct(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(Sr,i);return new Er(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return w(n,s,e.call(r,u[1],s,t),i)})},n}function J(t,e){var r=this,n=ct(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=P(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=ft,n.__iterate=function(r,n){var o=this,u=0;return n&&i(t),t.__iterate(function(t,i){return r(t,e?i:n?o.size-++u:u++,o)},!n)},n.__iterator=function(n,o){var u=0;o&&i(t);var s=t.__iterator(Sr,!o);return new Er(function(){var t=s.next();if(t.done)return t;var i=t.value;return w(n,e?i[0]:o?r.size-++u:u++,i[1],t)})},n}function V(t,e,r,n){var i=ct(t);return n&&(i.has=function(n){var i=t.get(n,cr)
10
+ ;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){if(e.call(r,t,o,a))return s++,i(t,n?o:s-1,u)},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(Sr,o),s=0;return new Er(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,c=a[0],f=a[1];if(e.call(r,f,c,t))return w(i,n?c:s++,f,o)}})},i}function Y(t,e,r){var n=$r().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function Q(t,e,r){var n=_(t),i=(m(t)?gn():$r()).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=at(t);return i.map(function(e){return ut(t,o(e))}).asImmutable()}function X(t,e,r,n){var i=t.size;if(s(e,r,i))return t;var u=a(e,i),f=c(r,i);if(u!==u||f!==f)return X(t.toSeq().cacheResult(),e,r,n);var h,p=f-u;p===p&&(h=p<0?0:p);var _=ct(t);return _.size=0===h?h:t.size&&h||void 0,!n&&y(t)&&h>=0&&(_.get=function(e,r){return e=o(this,e),e>=0&&e<h?t.get(e+u,r):r}),_.__iterateUncached=function(e,r){var i=this;if(0===h)return 0;if(r)return this.cacheResult().__iterate(e,r);var o=0,s=!0,a=0;return t.__iterate(function(t,r){if(!s||!(s=o++<u))return a++,e(t,n?r:a-1,i)!==!1&&a!==h}),a},_.__iteratorUncached=function(e,r){if(0!==h&&r)return this.cacheResult().__iterator(e,r);if(0===h)return new Er(z);var i=t.__iterator(e,r),o=0,s=0;return new Er(function(){for(;o++<u;)i.next();if(++s>h)return z();var t=i.next();return n||e===zr||t.done?t:e===wr?w(e,s-1,void 0,t):w(e,s-1,t.value[1],t)})},_}function F(t,e,r){var n=ct(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(Sr,i),s=!0;return new Er(function(){if(!s)return z()
11
+ ;var t=u.next();if(t.done)return t;var i=t.value,a=i[0],c=i[1];return e.call(r,c,a,o)?n===Sr?t:w(n,a,c,t):(s=!1,z())})},n}function G(t,e,r,n){var i=ct(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,c){if(!s||!(s=e.call(r,t,o,c)))return 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(Sr,o),a=!0,c=0;return new Er(function(){var t,o,f;do{if(t=s.next(),t.done)return n||i===zr?t:i===wr?w(i,c++,void 0,t):w(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],a&&(a=e.call(r,f,o,u))}while(a);return i===Sr?t:w(i,o,f,t)})},i}function Z(t,e){var r=_(t),n=[t].concat(e).map(function(t){return p(t)?r&&(t=lr(t)):t=r?q(t):D(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&&_(i)||l(t)&&l(i))return i}var o=new xr(n);return r?o=o.toKeyedSeq():l(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 $(t,e,r){var n=ct(t);return n.__iterateUncached=function(i,o){function u(t,c){t.__iterate(function(t,o){return(!e||c<e)&&p(t)?u(t,c+1):(s++,i(t,r?o:s-1,n)===!1&&(a=!0)),!a},o)}if(o)return this.cacheResult().__iterate(i,o);var s=0,a=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=t.__iterator(n,i),u=[],s=0;return new Er(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===Sr&&(a=a[1]),e&&!(u.length<e)||!p(a))return r?t:w(n,s++,a,t);u.push(o),o=a.__iterator(n,i)}else o=u.pop()}return z()})},n}function tt(t,e,r){var n=at(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function et(t,e){var r=ct(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){
12
+ var i,o=t.__iterator(zr,n),u=0;return new Er(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?w(r,u++,e):w(r,u++,i.value,i)})},r}function rt(t,e,r){e||(e=ht);var n=_(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).valueSeq().toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?Dr(o):l(t)?Ar(o):jr(o)}function nt(t,e,r){if(e||(e=ht),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return it(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return it(e,t,r)?r:t})}function it(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function ot(t,e,r,n){var i=ct(t),o=new xr(r).map(function(t){return t.size});return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(zr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=_r(t),b(i?t.reverse():t)}),u=0,s=!1;return new Er(function(){var r;return s||(r=o.map(function(t){return t.next()}),s=n?r.every(function(t){return t.done}):r.some(function(t){return t.done})),s?z():w(t,u++,e.apply(null,r.map(function(t){return t.value})))})},i}function ut(t,e){return t===e?t:y(t)?e:t.constructor(e)}function st(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function at(t){return _(t)?lr:l(t)?vr:yr}function ct(t){return Object.create((_(t)?Dr:l(t)?Ar:jr).prototype)}function ft(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):qr.prototype.cacheResult.call(this)}function ht(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function pt(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function _t(t,e){if(!t)throw Error(e)}function lt(t){_t(t!==1/0,"Cannot perform this action with an infinite size.")}function vt(t){if(E(t)&&"string"!=typeof t)return t;if(m(t))return t.toArray()
13
+ ;throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function yt(t){return t&&("function"!=typeof t.constructor||"Object"===t.constructor.name)}function dt(t){return"object"==typeof t&&(g(t)||Array.isArray(t)||yt(t))}function gt(t){try{return"string"==typeof t?JSON.stringify(t):t+""}catch(e){return JSON.stringify(t)}}function mt(t,e){return g(t)?t.has(e):dt(t)&&Mr.call(t,e)}function wt(t,e,r){return g(t)?t.get(e,r):mt(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function zt(t){if(Array.isArray(t))return pt(t);var e={};for(var r in t)Mr.call(t,r)&&(e[r]=t[r]);return e}function St(t,e){if(!dt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(g(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!Mr.call(t,e))return t;var r=zt(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function It(t,e,r){if(!dt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(g(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(Mr.call(t,e)&&r===t[e])return t;var n=zt(t);return n[e]=r,n}function bt(t,e,r,n){n||(n=r,r=void 0);var i=Ot(g(t),t,vt(e),0,r,n);return i===cr?r:i}function Ot(t,e,r,n,i,o){var u=e===cr;if(n===r.length){var s=u?i:e,a=o(s);return a===s?e:a}if(!u&&!dt(e))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,n).map(gt)+"]: "+e);var c=r[n],f=u?cr:wt(e,c,cr),h=Ot(f===cr?t:g(f),f,r,n+1,i,o);return h===f?e:h===cr?St(e,c):It(u?t?te():{}:e,c,h)}function Et(t,e,r){return bt(t,e,cr,function(){return r})}function Mt(t,e){return Et(this,t,e)}function qt(t,e){return bt(t,e,function(){return cr})}function Dt(t){return qt(this,t)}function At(t,e,r,n){return bt(t,[e],r,n)}function jt(t,e,r){return 1===arguments.length?t(this):At(this,t,e,r)}function xt(t,e,r){return bt(this,t,e,r)}function kt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ut(this,t)}function Rt(t){
14
+ for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return Ut(this,e,t)}function Ut(t,e,r){for(var n=[],i=0;i<e.length;i++){var o=lr(e[i]);0!==o.size&&n.push(o)}return 0===n.length?t:0!==t.toSeq().size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var e=r?function(e,n){At(t,n,cr,function(t){return t===cr?e:r(t,e,n)})}:function(e,r){t.set(r,e)},i=0;i<n.length;i++)n[i].forEach(e)}):t.constructor(n[0])}function Kt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Wt(t,e)}function Tt(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Wt(e,r,t)}function Lt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Bt(t,e)}function Ct(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Bt(e,r,t)}function Bt(t,e,r){return Wt(t,e,Nt(r))}function Wt(t,e,r){if(!dt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(g(t))return"function"==typeof r&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),i=t,o=n?vr:lr,u=n?function(e){i===t&&(i=zt(i)),i.push(e)}:function(e,n){var o=Mr.call(i,n),u=o&&r?r(i[n],e,n):e;o&&u===i[n]||(i===t&&(i=zt(i)),i[n]=u)},s=0;s<e.length;s++)o(e[s]).forEach(u);return i}function Nt(t){function e(r,n,i){return dt(r)&&dt(n)?Wt(r,[n],e):t?t(r,n,i):n}return e}function Pt(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Bt(this,t)}function Ht(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Bt(this,e,t)}function Jt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return bt(this,t,te(),function(t){return Wt(t,e)})}function Vt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return bt(this,t,te(),function(t){return Bt(t,e)})}function Yt(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Qt(){
15
+ return this.__ownerID?this:this.__ensureOwner(new n)}function Xt(){return this.__ensureOwner()}function Ft(){return this.__altered}function Gt(t,e){return w(t,e[0],e[1])}function Zt(t,e){return{node:t,index:0,__prev:e}}function $t(t,e,r,n){var i=Object.create(tn);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function te(){return sn||(sn=$t(0))}function ee(t,r,n){var i,o;if(t._root){var u=e(),s=e();if(i=re(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 en(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?$t(o,i):te()}function re(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 un(e,i,[o,u]))}function ne(t){return t.constructor===un||t.constructor===on}function ie(t,e,r,n,i){if(t.keyHash===n)return new on(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&ar,s=(0===r?n:n>>>r)&ar;return new rn(e,1<<u|1<<s,u===s?[ie(t,e,r+ur,n,i)]:(o=new un(e,n,i),u<s?[t,o]:[o,t]))}function oe(t,e,r,i){t||(t=new n);for(var o=new un(t,T(r),[r,i]),u=0;u<e.length;u++){var s=e[u];o=o.update(t,0,void 0,s[0],s[1])}return o}function ue(t,e,r,n){for(var i=0,o=0,u=Array(r),s=0,a=1,c=e.length;s<c;s++,a<<=1){var f=e[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new rn(t,i,u)}function se(t,e,r,n,i){for(var o=0,u=Array(sr),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new nn(t,o+1,u)}function ae(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function ce(t,e,r,n){var i=n?t:pt(t);return i[e]=r,i}function fe(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=Array(i),u=0,s=0;s<i;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function he(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u<n;u++)u===e&&(o=1),i[u]=t[u+o];return i}function pe(t){return!(!t||!t[pn])}function _e(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){
16
+ var n=r===s?a&&a.array:t&&t.array,i=r>o?0:o-r,c=u-r;return c>sr&&(c=sr),function(){if(i===c)return dn;var t=e?--c:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,c=i>o?0:o-i>>n,f=1+(u-i>>n);return f>sr&&(f=sr),function(){for(;;){if(s){var t=s();if(t!==dn)return t;s=null}if(c===f)return dn;var o=e?--f:c++;s=r(a&&a[o],n-ur,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=ze(u),a=t._tail;return r(t._root,t._level,0)}function le(t,e,r,n,i,o,u){var s=Object.create(ln);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function ve(){return yn||(yn=le(0,0,ur))}function ye(t,r,n){if((r=o(t,r))!==r)return t;if(r>=t.size||r<0)return t.withMutations(function(t){r<0?we(t,r).set(0,n):we(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,u=t._root,s=e();return r>=ze(t._capacity)?i=de(i,t.__ownerID,0,r,n,s):u=de(u,t.__ownerID,t._level,r,n,s),s.value?t.__ownerID?(t._root=u,t._tail=i,t.__hash=void 0,t.__altered=!0,t):le(t._origin,t._capacity,t._level,u,i):t}function de(t,e,n,i,o,u){var s=i>>>n&ar,a=t&&s<t.array.length;if(!a&&void 0===o)return t;var c;if(n>0){var f=t&&t.array[s],h=de(f,e,n-ur,i,o,u);return h===f?t:(c=ge(t,e),c.array[s]=h,c)}return a&&t.array[s]===o?t:(u&&r(u),c=ge(t,e),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function ge(t,e){return e&&t&&e===t.ownerID?t:new vn(t?t.array.slice():[],e)}function me(t,e){if(e>=ze(t._capacity))return t._tail;if(e<1<<t._level+ur){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&ar],n-=ur;return r}}function we(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+e,a=void 0===r?u:r<0?u+r:o+r;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var c=t._level,f=t._root,h=0;s+h<0;)f=new vn(f&&f.array.length?[void 0,f]:[],i),c+=ur,h+=1<<c;h&&(s+=h,o+=h,a+=h,u+=h);for(var p=ze(u),_=ze(a);_>=1<<c+ur;)f=new vn(f&&f.array.length?[f]:[],i),c+=ur;var l=t._tail,v=_<p?me(t,a-1):_>p?new vn([],i):l;if(l&&_>p&&s<u&&l.array.length){f=ge(f,i)
17
+ ;for(var y=f,d=c;d>ur;d-=ur){var g=p>>>d&ar;y=y.array[g]=ge(y.array[g],i)}y.array[p>>>ur&ar]=l}if(a<u&&(v=v&&v.removeAfter(i,0,a)),s>=_)s-=_,a-=_,c=ur,f=null,v=v&&v.removeBefore(i,0,s);else if(s>o||_<p){for(h=0;f;){var m=s>>>c&ar;if(m!==_>>>c&ar)break;m&&(h+=(1<<c)*m),c-=ur,f=f.array[m]}f&&s>o&&(f=f.removeBefore(i,c,s-h)),f&&_<p&&(f=f.removeAfter(i,c,_-h)),h&&(s-=h,a-=h)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=c,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):le(s,a,c,f,v)}function ze(t){return t<sr?0:t-1>>>ur<<ur}function Se(t,e,r,n){var i=Object.create(gn.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Ie(){return mn||(mn=Se(te(),ve()))}function be(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===cr){if(!a)return t;u.size>=sr&&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):Se(n,i)}function Oe(t){return!(!t||!t[wn])}function Ee(t,e,r,n){var i=Object.create(Sn);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Me(){return In||(In=Ee(0))}function qe(t){return!(!t||!t[bn])}function De(t){return qe(t)&&m(t)}function Ae(t,e){if(t===e)return!0;if(!p(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||_(t)!==_(e)||l(t)!==l(e)||m(t)!==m(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!v(t);if(m(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&U(i[1],t)&&(r||U(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){
18
+ if(r?!t.has(e):i?!U(e,t.get(n,cr)):!U(t.get(n,cr),e))return u=!1,!1});return u&&t.size===s}function je(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){if(!t||"object"!=typeof t)return t;if(!p(t)){if(!dt(t))return t;t=qr(t)}if(_(t)){var e={};return t.__iterate(function(t,r){e[r]=xe(t)}),e}var r=[];return t.__iterate(function(t){r.push(xe(t))}),r}function ke(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 Re(t,e){var r=Object.create(En);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ue(){return Mn||(Mn=Re(te()))}function Ke(t,e,r){for(var n=vt(e),i=0;i!==n.length;)if((t=wt(t,n[i++],cr))===cr)return r;return t}function Te(t,e){return Ke(this,t,e)}function Le(t,e){return Ke(t,e,cr)!==cr}function Ce(t){return Le(this,t)}function Be(){lt(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t}function We(t,e,r,n,i,o){return lt(t.size),t.__iterate(function(t,o,u){i?(i=!1,r=t):r=e.call(n,r,t,o,u)},o),r}function Ne(t,e){return e}function Pe(t,e){return[e,t]}function He(t){return function(){return!t.apply(this,arguments)}}function Je(t){return function(){return-t.apply(this,arguments)}}function Ve(){return pt(arguments)}function Ye(t,e){return t<e?1:t>e?-1:0}function Qe(t){if(t.size===1/0)return 0;var e=m(t),r=_(t),n=e?1:0;return Xe(t.__iterate(r?e?function(t,e){n=31*n+Fe(T(t),T(e))|0}:function(t,e){n=n+Fe(T(t),T(e))|0}:e?function(t){n=31*n+T(t)|0}:function(t){n=n+T(t)|0}),n)}function Xe(t,e){return e=Lr(e,3432918353),e=Lr(e<<15|e>>>-15,461845907),e=Lr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Lr(e^e>>>16,2246822507),e=Lr(e^e>>>13,3266489909),e=K(e^e>>>16)}function Fe(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}function Ge(t,e){var r=Object.create(Rn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ze(){return Un||(Un=Ge(Ie()))}function $e(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,
19
+ n.__ownerID=r,n}function tr(t){return t.constructor.displayName||t.constructor.name||"Record"}function er(t){return q(t._keys.map(function(e){return[e,t.get(e)]}))}function rr(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){_t(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}function nr(t,e){return ir([],e||or,t,"",e&&e.length>2?[]:void 0,{"":t})}function ir(t,e,r,n,i,o){var u=Array.isArray(r)?Ar:yt(r)?Dr:null;if(u){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),i&&""!==n&&i.push(n);var s=e.call(o,n,u(r).map(function(n,o){return ir(t,e,n,o,i,r)}),i&&i.slice());return t.pop(),i&&i.pop(),s}return r}function or(t,e){return _(e)?e.toMap():e.toList()}var ur=5,sr=1<<ur,ar=sr-1,cr={},fr="@@__IMMUTABLE_ITERABLE__@@",hr="@@__IMMUTABLE_KEYED__@@",pr="@@__IMMUTABLE_INDEXED__@@",_r=function(t){return p(t)?t:qr(t)},lr=function(t){function e(t){return _(t)?t:Dr(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_r),vr=function(t){function e(t){return l(t)?t:Ar(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_r),yr=function(t){function e(t){return p(t)&&!v(t)?t:jr(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(_r);_r.Keyed=lr,_r.Indexed=vr,_r.Set=yr;var dr="@@__IMMUTABLE_SEQ__@@",gr="@@__IMMUTABLE_RECORD__@@",mr="@@__IMMUTABLE_ORDERED__@@",wr=0,zr=1,Sr=2,Ir="function"==typeof Symbol&&Symbol.iterator,br="@@iterator",Or=Ir||br,Er=function(t){this.next=t};Er.prototype.toString=function(){return"[Iterator]"},Er.KEYS=wr,Er.VALUES=zr,Er.ENTRIES=Sr,Er.prototype.inspect=Er.prototype.toSource=function(){return""+this},Er.prototype[Or]=function(){return this};var Mr=Object.prototype.hasOwnProperty,qr=function(t){function e(t){return null===t||void 0===t?M():g(t)?t.toSeq():A(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),
20
+ e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(t(o[1],o[0],this)===!1)break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new Er(function(){if(i===n)return z();var o=r[e?n-++i:i++];return w(t,o[0],o[1])})}return this.__iteratorUncached(t,e)},e}(_r),Dr=function(t){function e(t){return null===t||void 0===t?M().toKeyedSeq():p(t)?_(t)?t.toSeq():t.fromEntrySeq():d(t)?t.toSeq():q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(qr),Ar=function(t){function e(t){return null===t||void 0===t?M():p(t)?_(t)?t.entrySeq():t.toIndexedSeq():d(t)?t.toSeq().entrySeq():D(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(qr),jr=function(t){function e(t){return(p(t)&&!v(t)?t:Ar(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(qr);qr.isSeq=y,qr.Keyed=Dr,qr.Set=jr,qr.Indexed=Ar,qr.prototype[dr]=!0;var xr=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[o(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(t(r[o],o,this)===!1)break}
21
+ return i},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new Er(function(){if(i===n)return z();var o=e?n-++i:i++;return w(t,o,r[o])})},e}(Ar),kr=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return Mr.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var u=n[e?i-++o:o++];if(t(r[u],u,this)===!1)break}return o},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new Er(function(){if(o===i)return z();var u=n[e?i-++o:o++];return w(t,u,r[u])})},e}(Dr);kr.prototype[mr]=!0;var Rr,Ur,Kr=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._collection,n=b(r),i=0;if(I(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._collection,n=b(r);if(!I(n))return new Er(z);var i=0;return new Er(function(){var e=n.next();return e.done?e:w(t,i++,e.value)})},e}(Ar),Tr="@@__IMMUTABLE_MAP__@@",Lr="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(t,e){t|=0,e|=0;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Cr=Object.prototype.valueOf,Br=Object.isExtensible,Wr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Nr="function"==typeof WeakMap;Nr&&(Ur=new WeakMap);var Pr=0,Hr="__immutablehash__";"function"==typeof Symbol&&(Hr=Symbol(Hr));var Jr=16,Vr=255,Yr=0,Qr={},Xr=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}
22
+ return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=J(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var r=this,n=H(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e,n){return t(e,n,r)},e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(Dr);Xr.prototype[mr]=!0;var Fr=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this,n=0;return e&&i(this),this._iter.__iterate(function(i){return t(i,e?r.size-++n:n++,r)},e)},e.prototype.__iterator=function(t,e){var r=this,n=this._iter.__iterator(zr,e),o=0;return e&&i(this),new Er(function(){var i=n.next();return i.done?i:w(t,e?r.size-++o:o++,i.value,i)})},e}(Ar),Gr=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(zr,e);return new Er(function(){var e=r.next();return e.done?e:w(t,e.value,e.value,e)})},e}(jr),Zr=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var r=this
23
+ ;return this._iter.__iterate(function(e){if(e){st(e);var n=p(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(zr,e);return new Er(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){st(n);var i=p(n);return w(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},e}(Dr);Fr.prototype.cacheResult=Xr.prototype.cacheResult=Gr.prototype.cacheResult=Zr.prototype.cacheResult=ft;var $r=function(t){function e(e){return null===e||void 0===e?te():x(e)&&!m(e)?e:te().withMutations(function(r){var n=t(e);lt(n.size),n.forEach(function(t,e){return r.set(e,t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return te().withMutations(function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}})},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return ee(this,t,e)},e.prototype.remove=function(t){return ee(this,t,cr)},e.prototype.deleteAll=function(t){var e=_r(t);return 0===e.size?this:this.withMutations(function(t){e.forEach(function(e){return t.remove(e)})})},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):te()},e.prototype.sort=function(t){return gn(rt(this,t))},e.prototype.sortBy=function(t,e){return gn(rt(this,e,t))},e.prototype.map=function(t,e){return this.withMutations(function(r){r.forEach(function(n,i){r.set(i,t.call(e,n,i,r))})})},e.prototype.__iterator=function(t,e){return new an(this,t,e)},e.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},e.prototype.__ensureOwner=function(t){
24
+ return t===this.__ownerID?this:t?$t(this.size,this._root,t,this.__hash):0===this.size?te():(this.__ownerID=t,this.__altered=!1,this)},e}(lr);$r.isMap=x;var tn=$r.prototype;tn[Tr]=!0,tn.delete=tn.remove,tn.removeAll=tn.deleteAll,tn.setIn=Mt,tn.removeIn=tn.deleteIn=Dt,tn.update=jt,tn.updateIn=xt,tn.merge=tn.concat=kt,tn.mergeWith=Rt,tn.mergeDeep=Pt,tn.mergeDeepWith=Ht,tn.mergeIn=Jt,tn.mergeDeepIn=Vt,tn.withMutations=Yt,tn.wasAltered=Ft,tn.asImmutable=Xt,tn["@@transducer/init"]=tn.asMutable=Qt,tn["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},tn["@@transducer/result"]=function(t){return t.asImmutable()};var en=function(t,e){this.ownerID=t,this.entries=e};en.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(U(r,i[o][0]))return i[o][1];return n},en.prototype.update=function(t,e,n,i,o,u,s){for(var a=o===cr,c=this.entries,f=0,h=c.length;f<h&&!U(i,c[f][0]);f++);var p=f<h;if(p?c[f][1]===o:a)return this;if(r(s),(a||!p)&&r(u),!a||1!==c.length){if(!p&&!a&&c.length>=cn)return oe(t,c,i,o);var _=t&&t===this.ownerID,l=_?c:pt(c);return p?a?f===h-1?l.pop():l[f]=l.pop():l[f]=[i,o]:l.push([i,o]),_?(this.entries=l,this):new en(t,l)}};var rn=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};rn.prototype.get=function(t,e,r,n){void 0===e&&(e=T(r));var i=1<<((0===t?e:e>>>t)&ar),o=this.bitmap;return 0==(o&i)?n:this.nodes[ae(o&i-1)].get(t+ur,e,r,n)},rn.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=T(n));var s=(0===e?r:r>>>e)&ar,a=1<<s,c=this.bitmap,f=0!=(c&a);if(!f&&i===cr)return this;var h=ae(c&a-1),p=this.nodes,_=f?p[h]:void 0,l=re(_,t,e+ur,r,n,i,o,u);if(l===_)return this;if(!f&&l&&p.length>=fn)return se(t,p,c,s,l);if(f&&!l&&2===p.length&&ne(p[1^h]))return p[1^h];if(f&&l&&1===p.length&&ne(l))return l;var v=t&&t===this.ownerID,y=f?l?c:c^a:c|a,d=f?l?ce(p,h,l,v):he(p,h,v):fe(p,h,l,v);return v?(this.bitmap=y,this.nodes=d,this):new rn(t,y,d)};var nn=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};nn.prototype.get=function(t,e,r,n){void 0===e&&(e=T(r))
25
+ ;var i=(0===t?e:e>>>t)&ar,o=this.nodes[i];return o?o.get(t+ur,e,r,n):n},nn.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=T(n));var s=(0===e?r:r>>>e)&ar,a=i===cr,c=this.nodes,f=c[s];if(a&&!f)return this;var h=re(f,t,e+ur,r,n,i,o,u);if(h===f)return this;var p=this.count;if(f){if(!h&&--p<hn)return ue(t,c,p,s)}else p++;var _=t&&t===this.ownerID,l=ce(c,s,h,_);return _?(this.count=p,this.nodes=l,this):new nn(t,p,l)};var on=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};on.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(U(r,i[o][0]))return i[o][1];return n},on.prototype.update=function(t,e,n,i,o,u,s){void 0===n&&(n=T(i));var a=o===cr;if(n!==this.keyHash)return a?this:(r(s),r(u),ie(this,t,e,n,[i,o]));for(var c=this.entries,f=0,h=c.length;f<h&&!U(i,c[f][0]);f++);var p=f<h;if(p?c[f][1]===o:a)return this;if(r(s),(a||!p)&&r(u),a&&2===h)return new un(t,this.keyHash,c[1^f]);var _=t&&t===this.ownerID,l=_?c:pt(c);return p?a?f===h-1?l.pop():l[f]=l.pop():l[f]=[i,o]:l.push([i,o]),_?(this.entries=l,this):new on(t,this.keyHash,l)};var un=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};un.prototype.get=function(t,e,r,n){return U(r,this.entry[0])?this.entry[1]:n},un.prototype.update=function(t,e,n,i,o,u,s){var a=o===cr,c=U(i,this.entry[0]);return(c?o===this.entry[1]:a)?this:(r(s),a?void r(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new un(t,this.keyHash,[i,o]):(r(u),ie(this,t,e,T(i),[i,o])))},en.prototype.iterate=on.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(t(r[e?i-n:n])===!1)return!1},rn.prototype.iterate=nn.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},un.prototype.iterate=function(t,e){return t(this.entry)};var sn,an=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Zt(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){
26
+ for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,i=void 0;if(r.entry){if(0===n)return Gt(t,r.entry)}else if(r.entries){if(i=r.entries.length-1,n<=i)return Gt(t,r.entries[this._reverse?i-n:n])}else if(i=r.nodes.length-1,n<=i){var o=r.nodes[this._reverse?i-n:n];if(o){if(o.entry)return Gt(t,o.entry);e=this._stack=Zt(o,e)}continue}e=this._stack=this._stack.__prev}return z()},e}(Er),cn=sr/4,fn=sr/2,hn=sr/4,pn="@@__IMMUTABLE_LIST__@@",_n=function(t){function e(e){var r=ve();if(null===e||void 0===e)return r;if(pe(e))return e;var n=t(e),i=n.size;return 0===i?r:(lt(i),i>0&&i<sr?le(0,i,ur,null,new vn(n.toArray())):r.withMutations(function(t){t.setSize(i),n.forEach(function(e,r){return t.set(r,e)})}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=o(this,t))>=0&&t<this.size){t+=this._origin;var r=me(this,t);return r&&r.array[t&ar]}return e},e.prototype.set=function(t,e){return ye(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=ur,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ve()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){we(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])})},e.prototype.pop=function(){return we(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){we(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])})},e.prototype.shift=function(){return we(this,1)},e.prototype.concat=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++){var i=e[n],o=t("string"!=typeof i&&S(i)?i:[i]);0!==o.size&&r.push(o)}
27
+ return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(t){r.forEach(function(e){return e.forEach(function(e){return t.push(e)})})}):this.constructor(r[0])},e.prototype.setSize=function(t){return we(this,0,t)},e.prototype.map=function(t,e){var r=this;return this.withMutations(function(n){for(var i=0;i<r.size;i++)n.set(i,t.call(e,n.get(i),i,n))})},e.prototype.slice=function(t,e){var r=this.size;return s(t,e,r)?this:we(this,a(t,r),c(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=_e(this,e);return new Er(function(){var i=n();return i===dn?z():w(t,e?--r:r++,i)})},e.prototype.__iterate=function(t,e){for(var r,n=e?this.size:0,i=_e(this,e);(r=i())!==dn&&t(r,e?--n:n++,this)!==!1;);return n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?le(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?ve():(this.__ownerID=t,this.__altered=!1,this)},e}(vr);_n.isList=pe;var ln=_n.prototype;ln[pn]=!0,ln.delete=ln.remove,ln.merge=ln.concat,ln.setIn=Mt,ln.deleteIn=ln.removeIn=Dt,ln.update=jt,ln.updateIn=xt,ln.mergeIn=Jt,ln.mergeDeepIn=Vt,ln.withMutations=Yt,ln.wasAltered=Ft,ln.asImmutable=Xt,ln["@@transducer/init"]=ln.asMutable=Qt,ln["@@transducer/step"]=function(t,e){return t.push(e)},ln["@@transducer/result"]=function(t){return t.asImmutable()};var vn=function(t,e){this.array=t,this.ownerID=e};vn.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&ar;if(n>=this.array.length)return new vn([],t);var i,o=0===n;if(e>0){var u=this.array[n];if((i=u&&u.removeBefore(t,e-ur,r))===u&&o)return this}if(o&&!i)return this;var s=ge(this,t);if(!o)for(var a=0;a<n;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},vn.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&ar;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n];if((i=o&&o.removeAfter(t,e-ur,r))===o&&n===this.array.length-1)return this}var u=ge(this,t)
28
+ ;return u.array.splice(n+1),i&&(u.array[n]=i),u};var yn,dn={},gn=function(t){function e(t){return null===t||void 0===t?Ie():k(t)?t:Ie().withMutations(function(e){var r=lr(t);lt(r.size),r.forEach(function(t,r){return e.set(r,t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Ie()},e.prototype.set=function(t,e){return be(this,t,e)},e.prototype.remove=function(t){return be(this,t,cr)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Se(e,r,t,this.__hash):0===this.size?Ie():(this.__ownerID=t,this._map=e,this._list=r,this)},e}($r);gn.isOrderedMap=k,gn.prototype[mr]=!0,gn.prototype.delete=gn.prototype.remove;var mn,wn="@@__IMMUTABLE_STACK__@@",zn=function(t){function e(t){return null===t||void 0===t?Me():Oe(t)?t:Me().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=o(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={
29
+ value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Ee(e,r)},e.prototype.pushAll=function(e){if(e=t(e),0===e.size)return this;if(0===this.size&&Oe(e))return e;lt(e.size);var r=this.size,n=this._head;return e.__iterate(function(t){r++,n={value:t,next:n}},!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ee(r,n)},e.prototype.pop=function(){return this.slice(1)},e.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):Me()},e.prototype.slice=function(e,r){if(s(e,r,this.size))return this;var n=a(e,this.size);if(c(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Ee(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ee(this.size,this._head,t,this.__hash):0===this.size?Me():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new xr(this.toArray()).__iterate(function(e,n){return t(e,n,r)},e);for(var n=0,i=this._head;i&&t(i.value,n++,this)!==!1;)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new xr(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new Er(function(){if(n){var e=n.value;return n=n.next,w(t,r++,e)}return z()})},e}(vr);zn.isStack=Oe;var Sn=zn.prototype;Sn[wn]=!0,Sn.shift=Sn.pop,Sn.unshift=Sn.push,Sn.unshiftAll=Sn.pushAll,Sn.withMutations=Yt,Sn.wasAltered=Ft,Sn.asImmutable=Xt,Sn["@@transducer/init"]=Sn.asMutable=Qt,Sn["@@transducer/step"]=function(t,e){return t.unshift(e)},Sn["@@transducer/result"]=function(t){return t.asImmutable()};var In,bn="@@__IMMUTABLE_SET__@@",On=function(t){function e(e){return null===e||void 0===e?Ue():qe(e)&&!m(e)?e:Ue().withMutations(function(r){var n=t(e);lt(n.size),n.forEach(function(t){return r.add(t)})})}return t&&(e.__proto__=t),
30
+ e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(lr(t).keySeq())},e.intersect=function(t){return t=_r(t).toArray(),t.length?En.intersect.apply(e(t.pop()),t):Ue()},e.union=function(t){return t=_r(t).toArray(),t.length?En.union.apply(e(t.pop()),t):Ue()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return ke(this,this._map.set(t,t))},e.prototype.remove=function(t){return ke(this,this._map.remove(t))},e.prototype.clear=function(){return ke(this,this._map.clear())},e.prototype.map=function(t,e){var r=this,n=[],i=[];return this.forEach(function(o){var u=t.call(e,o,o,r);u!==o&&(n.push(o),i.push(u))}),this.withMutations(function(t){n.forEach(function(e){return t.remove(e)}),i.forEach(function(e){return t.add(e)})})},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return e=e.filter(function(t){return 0!==t.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(r){for(var n=0;n<e.length;n++)t(e[n]).forEach(function(t){return r.add(t)})}):this.constructor(e[0])},e.prototype.intersect=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map(function(e){return t(e)});var n=[];return this.forEach(function(t){e.every(function(e){return e.includes(t)})||n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},e.prototype.subtract=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map(function(e){return t(e)});var n=[];return this.forEach(function(t){e.some(function(e){return e.includes(t)})&&n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},e.prototype.sort=function(t){return kn(rt(this,t))},e.prototype.sortBy=function(t,e){return kn(rt(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()
31
+ },e.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e){return t(e,e,r)},e)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(yr);On.isSet=qe;var En=On.prototype;En[bn]=!0,En.delete=En.remove,En.merge=En.concat=En.union,En.withMutations=Yt,En.asImmutable=Xt,En["@@transducer/init"]=En.asMutable=Qt,En["@@transducer/step"]=function(t,e){return t.add(e)},En["@@transducer/result"]=function(t){return t.asImmutable()},En.__empty=Ue,En.__make=Re;var Mn,qn,Dn=function(t){function e(t,r,n){if(!(this instanceof e))return new e(t,r,n);if(_t(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<t&&(n=-n),this._start=t,this._end=r,this._step=n,0===(this.size=Math.max(0,Math.ceil((r-t)/n-1)+1))){if(qn)return qn;qn=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+o(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,r){return s(t,r,this.size)?this:(t=a(t,this.size),r=c(r,this.size),r<=t?new e(0,0):new e(this.get(t,this._end),this.get(r,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;o!==r&&t(i,e?r-++o:o++,this)!==!1;)i+=e?-n:n;return o},e.prototype.__iterator=function(t,e){
32
+ var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;return new Er(function(){if(o===r)return z();var u=i;return i+=e?-n:n,w(t,e?r-++o:o++,u)})},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:Ae(this,t)},e}(Ar);_r.isIterable=p,_r.isKeyed=_,_r.isIndexed=l,_r.isAssociative=v,_r.isOrdered=m,_r.Iterator=Er,je(_r,{toArray:function(){lt(this.size);var t=Array(this.size||0),e=_(this),r=0;return this.__iterate(function(n,i){t[r++]=e?[i,n]:n}),t},toIndexedSeq:function(){return new Fr(this)},toJS:function(){return xe(this)},toKeyedSeq:function(){return new Xr(this,!0)},toMap:function(){return $r(this.toKeyedSeq())},toObject:Be,toOrderedMap:function(){return gn(this.toKeyedSeq())},toOrderedSet:function(){return kn(_(this)?this.valueSeq():this)},toSet:function(){return On(_(this)?this.valueSeq():this)},toSetSeq:function(){return new Gr(this)},toSeq:function(){return l(this)?this.toIndexedSeq():_(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return zn(_(this)?this.valueSeq():this)},toList:function(){return _n(_(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return ut(this,Z(this,t))},includes:function(t){return this.some(function(e){return U(e,t)})},entries:function(){return this.__iterator(Sr)},every:function(t,e){lt(this.size);var r=!0;return this.__iterate(function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1}),r},filter:function(t,e){return ut(this,V(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return lt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){lt(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?""+n:""}),e},keys:function(){return this.__iterator(wr)},map:function(t,e){
33
+ return ut(this,H(this,t,e))},reduce:function(t,e,r){return We(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return We(this,t,e,r,arguments.length<2,!0)},reverse:function(){return ut(this,J(this,!0))},slice:function(t,e){return ut(this,X(this,t,e,!0))},some:function(t,e){return!this.every(He(t),e)},sort:function(t){return ut(this,rt(this,t))},values:function(){return this.__iterator(zr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return i(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return Y(this,t,e)},equals:function(t){return Ae(this,t)},entrySeq:function(){var t=this;if(t._cache)return new xr(t._cache);var e=t.toSeq().map(Pe).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(He(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate(function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1}),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(u,null,t)},flatMap:function(t,e){return ut(this,tt(this,t,e))},flatten:function(t){return ut(this,$(this,t,!0))},fromEntrySeq:function(){return new Zr(this)},get:function(t,e){return this.find(function(e,r){return U(r,t)},void 0,e)},getIn:Te,groupBy:function(t,e){return Q(this,t,e)},has:function(t){return this.get(t,cr)!==cr},hasIn:Ce,isSubset:function(t){return t="function"==typeof t.includes?t:_r(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:_r(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return U(e,t)})},keySeq:function(){return this.toSeq().map(Ne).toIndexedSeq()},last:function(t){
34
+ return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return nt(this,t)},maxBy:function(t,e){return nt(this,e,t)},min:function(t){return nt(this,t?Je(t):Ye)},minBy:function(t,e){return nt(this,e?Je(e):Ye,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return ut(this,G(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(He(t),e)},sortBy:function(t,e){return ut(this,rt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return ut(this,F(this,t,e))},takeUntil:function(t,e){return this.takeWhile(He(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Qe(this))}});var An=_r.prototype;An[fr]=!0,An[Or]=An.values,An.toJSON=An.toArray,An.__toStringMapper=gt,An.inspect=An.toSource=function(){return""+this},An.chain=An.flatMap,An.contains=An.includes,je(lr,{flip:function(){return ut(this,P(this))},mapEntries:function(t,e){var r=this,n=0;return ut(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return ut(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var jn=lr.prototype;jn[hr]=!0,jn[Or]=An.entries,jn.toJSON=Be,jn.__toStringMapper=function(t,e){return gt(e)+": "+gt(t)},je(vr,{toKeyedSeq:function(){return new Xr(this,!1)},filter:function(t,e){return ut(this,V(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return ut(this,J(this,!1))},slice:function(t,e){return ut(this,X(this,t,e,!1))},splice:function(t,e){var r=arguments.length
35
+ ;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=a(t,t<0?this.count():this.size);var n=this.slice(0,t);return ut(this,1===r?n:n.concat(pt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ut(this,$(this,t,!1))},get:function(t,e){return t=o(this,t),t<0||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=o(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return ut(this,et(this,t))},interleave:function(){var t=[this].concat(pt(arguments)),e=ot(this.toSeq(),Ar.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),ut(this,r)},keySeq:function(){return Dn(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return ut(this,G(this,t,e,!1))},zip:function(){return ut(this,ot(this,Ve,[this].concat(pt(arguments))))},zipAll:function(){return ut(this,ot(this,Ve,[this].concat(pt(arguments)),!0))},zipWith:function(t){var e=pt(arguments);return e[0]=this,ut(this,ot(this,t,e))}});var xn=vr.prototype;xn[pr]=!0,xn[mr]=!0,je(yr,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),yr.prototype.has=An.includes,yr.prototype.contains=yr.prototype.includes,je(Dr,lr.prototype),je(Ar,vr.prototype),je(jr,yr.prototype);var kn=function(t){function e(t){return null===t||void 0===t?Ze():De(t)?t:Ze().withMutations(function(e){var r=yr(t);lt(r.size),r.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(lr(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(On);kn.isOrderedSet=De;var Rn=kn.prototype;Rn[mr]=!0,Rn.zip=xn.zip,Rn.zipWith=xn.zipWith,Rn.__empty=Ze,Rn.__make=Ge
36
+ ;var Un,Kn=function(t,e){var r,n=function(o){var u=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),a=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c<s.length;c++){var f=s[c];a[f]=c,i[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+tr(this)+' with property "'+f+'" since that property name is part of the Record API.'):rr(i,f)}}this.__ownerID=void 0,this._values=_n().withMutations(function(t){t.setSize(u._keys.length),lr(o).forEach(function(e,r){t.set(u._indices[r],e===u._defaultValues[r]?void 0:e)})})},i=n.prototype=Object.create(Tn);return i.constructor=n,e&&(n.displayName=e),n};Kn.prototype.toString=function(){for(var t,e=tr(this)+" { ",r=this._keys,n=0,i=r.length;n!==i;n++)t=r[n],e+=(n?", ":"")+t+": "+gt(this.get(t));return e+" }"},Kn.prototype.equals=function(t){return this===t||t&&this._keys===t._keys&&er(this).equals(er(t))},Kn.prototype.hashCode=function(){return er(this).hashCode()},Kn.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Kn.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},Kn.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return $e(this,r)}return this},Kn.prototype.remove=function(t){return this.set(t)},Kn.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:$e(this,t)},Kn.prototype.wasAltered=function(){return this._values.wasAltered()},Kn.prototype.toSeq=function(){return er(this)},Kn.prototype.toJS=function(){return xe(this)},Kn.prototype.entries=function(){return this.__iterator(Sr)},Kn.prototype.__iterator=function(t,e){return er(this).__iterator(t,e)},Kn.prototype.__iterate=function(t,e){return er(this).__iterate(t,e)},Kn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this
37
+ ;var e=this._values.__ensureOwner(t);return t?$e(this,e,t):(this.__ownerID=t,this._values=e,this)},Kn.isRecord=d,Kn.getDescriptiveName=tr;var Tn=Kn.prototype;Tn[gr]=!0,Tn.delete=Tn.remove,Tn.deleteIn=Tn.removeIn=Dt,Tn.getIn=Te,Tn.hasIn=An.hasIn,Tn.merge=kt,Tn.mergeWith=Rt,Tn.mergeIn=Jt,Tn.mergeDeep=Pt,Tn.mergeDeepWith=Ht,Tn.mergeDeepIn=Vt,Tn.setIn=Mt,Tn.update=jt,Tn.updateIn=xt,Tn.withMutations=Yt,Tn.asMutable=Qt,Tn.asImmutable=Xt,Tn[Or]=Tn.entries,Tn.toJSON=Tn.toObject=An.toObject,Tn.inspect=Tn.toSource=function(){return""+this};var Ln,Cn=function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,0===(this.size=void 0===r?1/0:Math.max(0,r))){if(Ln)return Ln;Ln=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return U(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return s(t,r,n)?this:new e(this._value,c(r,n)-a(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return U(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return U(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&t(this._value,e?r-++n:n++,this)!==!1;);return n},e.prototype.__iterator=function(t,e){var r=this,n=this.size,i=0;return new Er(function(){return i===n?z():w(t,e?n-++i:i++,r._value)})},e.prototype.equals=function(t){return t instanceof e?U(this._value,t._value):Ae(t)},e}(Ar),Bn={version:"4.0.0-rc.11",Collection:_r,Iterable:_r,Seq:qr,Map:$r,OrderedMap:gn,List:_n,Stack:zn,Set:On,OrderedSet:kn,Record:Kn,Range:Dn,Repeat:Cn,is:U,fromJS:nr,hash:T,isImmutable:g,isCollection:p,isKeyed:_,isIndexed:l,isAssociative:v,isOrdered:m,isValueObject:R,isSeq:y,isList:pe,isMap:x,isOrderedMap:k,isStack:Oe,isSet:qe,isOrderedSet:De,isRecord:d,get:wt,getIn:Ke,has:mt,hasIn:Le,
38
+ merge:Kt,mergeDeep:Lt,mergeWith:Tt,mergeDeepWith:Ct,remove:St,removeIn:qt,set:It,setIn:Et,update:At,updateIn:bt},Wn=_r;t.default=Bn,t.version="4.0.0-rc.11",t.Collection=_r,t.Iterable=Wn,t.Seq=qr,t.Map=$r,t.OrderedMap=gn,t.List=_n,t.Stack=zn,t.Set=On,t.OrderedSet=kn,t.Record=Kn,t.Range=Dn,t.Repeat=Cn,t.is=U,t.fromJS=nr,t.hash=T,t.isImmutable=g,t.isCollection=p,t.isKeyed=_,t.isIndexed=l,t.isAssociative=v,t.isOrdered=m,t.isValueObject=R,t.get=wt,t.getIn=Ke,t.has=mt,t.hasIn=Le,t.merge=Kt,t.mergeDeep=Lt,t.mergeWith=Tt,t.mergeDeepWith=Ct,t.remove=St,t.removeIn=qt,t.set=It,t.setIn=Et,t.update=At,t.updateIn=bt,Object.defineProperty(t,"__esModule",{value:!0})});