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

immutable

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable - npm Package Compare versions

Comparing version 2.0.15 to 2.0.16

138

dist/Immutable.d.ts

@@ -271,3 +271,3 @@ /**

*/
keys(): IndexedSequence<K>;
keySeq(): IndexedSequence<K>;

@@ -278,3 +278,3 @@ /**

*/
values(): IndexedSequence<V>;
valueSeq(): IndexedSequence<V>;

@@ -284,3 +284,3 @@ /**

*/
entries(): IndexedSequence</*(K, V)*/Array<any>>;
entrySeq(): IndexedSequence</*(K, V)*/Array<any>>;

@@ -630,3 +630,3 @@ /**

*/
fromEntries(): Sequence<any, any>;
fromEntrySeq(): Sequence<any, any>;

@@ -922,3 +922,7 @@ /**

* Returns a new Map which excludes this `key`.
*
* Note: `delete` cannot be safely used in IE8
* @alias delete
*/
remove(key: K): Map<K, V>;
delete(key: K): Map<K, V>;

@@ -932,2 +936,17 @@

/**
* An iterator of this Map's keys.
*/
keys(): Iterator<K>;
/**
* An iterator of this Map's values.
*/
values(): Iterator<V>;
/**
* An iterator of this Map's entries as [key, value] tuples.
*/
entries(): Iterator</*[K, V]*/Array<any>>;
/**
* When this cursor's (or any of its sub-cursors') `update` method is called,

@@ -953,6 +972,8 @@ * the resulting new data structure will be provided to the `onChange`

* value of calling `updater` with the existing value, or `notSetValue` if
* the key was not set.
* the key was not set. If called with only a single argument, `updater` is
* called with the Map itself.
*
* Equivalent to: `map.set(key, updater(map.get(key, notSetValue)))`.
*/
update(updater: (value: Map<K, V>) => Map<K, V>): Map<K, V>;
update(key: K, updater: (value: V) => V): Map<K, V>;

@@ -1142,7 +1163,7 @@ update(key: K, notSetValue: V, updater: (value: V) => V): Map<K, V>;

*
* Records always have a value for the keys they define. `delete()`ing a key
* Records always have a value for the keys they define. `remove`ing a key
* from a record simply resets it to the default value for that key.
*
* myRecord.length // 2
* myRecordWithoutB = myRecord.delete('b')
* myRecordWithoutB = myRecord.remove('b')
* myRecordWithoutB.get('b') // 2

@@ -1210,3 +1231,3 @@ * myRecordWithoutB.length // 2

/**
* `Set.fromKeys()` creates a new immutable Set containing the keys from
* `Set.fromkeySeq()` creates a new immutable Set containing the keys from
* this Sequence or JavaScript Object.

@@ -1238,3 +1259,7 @@ */

* Returns a new Set which excludes this value.
*
* Note: `delete` cannot be safely used in IE8
* @alias delete
*/
remove(value: T): Set<T>;
delete(value: T): Set<T>;

@@ -1248,2 +1273,17 @@

/**
* An iterator of this Set's values (Sets do not have keys).
*/
keys(): Iterator<T>;
/**
* An iterator of this Set's values.
*/
values(): Iterator<T>;
/**
* An iterator of this Sets's entries as [value, value] tuples.
*/
entries(): Iterator</*[T, T]*/Array<T>>;
/**
* Alias for `union`.

@@ -1357,3 +1397,7 @@ * @see `Map.prototype.merge`

* length of the Vector, instead leaving a sparse hole.
*
* Note: `delete` cannot be safely used in IE8
* @alias delete
*/
remove(index: number): Vector<T>;
delete(index: number): Vector<T>;

@@ -1367,2 +1411,19 @@

/**
* An iterator of this Vector's keys.
*/
keys(sparse?: boolean): Iterator<number>;
/**
* An iterator of this Vector's values.
*/
values(sparse?: boolean): Iterator<T>;
/**
* An iterator of this Vector's entries as [key, value] tuples.
*
* `sparse` defaults to true for entries.
*/
entries(sparse?: boolean): Iterator</*[number, T]*/Array<any>>;
/**
* Returns a new Vector with the provided `values` appended, starting at this

@@ -1418,6 +1479,8 @@ * Vector's `length`.

* value of calling `updater` with the existing value, or `notSetValue` if
* `index` was not set.
* `index` was not set. If called with a single argument, `updater` is
* called with the Vector itself.
*
* @see Map.update
*/
update(updater: (value: Vector<T>) => Vector<T>): Vector<T>;
update(index: number, updater: (value: T) => T): Vector<T>;

@@ -1497,11 +1560,2 @@ update(index: number, notSetValue: T, updater: (value: T) => T): Vector<T>;

asImmutable(): Vector<T>;
/**
* Allows `Vector` to be used in ES6 for-of expressions, returning an object
* that adheres to the `Iterator` interface: it has a `next()` method which
* returns the next (index, value) tuple.
*
* When no entries remain, returns `{ done: true }`
*/
iterator(): { next(): { value: /*(number, T)*/Array<any>; done: boolean; } }
}

@@ -1537,2 +1591,8 @@

/**
* Returns a sub-cursor following the key-path starting from this cursor.
*/
cursor(subKeyPath: Array<any>): Cursor<any>;
cursor(subKey: any): Cursor<any>;
/**
* Returns the value at the cursor, if the cursor path does not yet exist,

@@ -1560,22 +1620,4 @@ * returns `notSetValue`.

/**
* Updates the value in the data this cursor points to, triggering the
* callback for the root cursor and returning a new cursor pointing to the
* new data.
*/
update(updater: (value: T) => T): Cursor<T>;
/**
* Updates the value at `key` in the cursor, returning a new cursor pointing
* to the new data.
*
* This is shorthand for `cursor.update(x => x.update(key, fn))`
*/
update(key: any, updater: (value: any) => any): Cursor<T>;
update(key: any, notSetValue: any, updater: (value: any) => any): Cursor<T>;
/**
* Sets `value` at `key` in the cursor, returning a new cursor to the same
* point in the new data.
*
* This is shorthand for `cursor.update(x => x.set(key, value))`
*/

@@ -1588,13 +1630,29 @@ set(key: any, value: any): Cursor<T>;

*
* This is shorthand for `cursor.update(x => x.delete(key))`
* Note: `delete` cannot be safely used in IE8
* @alias delete
*/
remove(key: any): Cursor<T>;
delete(key: any): Cursor<T>;
/**
* Returns a sub-cursor following the key-path starting from this cursor.
* Clears the value at this cursor, returning a new cursor to the same
* point in the new data.
*/
cursor(subKeyPath: Array<any>): Cursor<any>;
cursor(subKey: any): Cursor<any>;
clear(): Cursor<T>;
/**
* Updates the value in the data this cursor points to, triggering the
* callback for the root cursor and returning a new cursor pointing to the
* new data.
*/
update(updater: (value: T) => T): Cursor<T>;
update(key: any, updater: (value: any) => any): Cursor<T>;
update(key: any, notSetValue: any, updater: (value: any) => any): Cursor<T>;
}
// Shim for ES6 Iterator
export interface Iterator<T> {
next(): { value: T; done: boolean; }
}
}

@@ -9,20 +9,21 @@ /**

*/
function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=ue.create(u)}else i=t.prototype;return ue.keys(e).forEach(function(t){i[t]=e[t]}),ue.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return ue.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,"constructor",n)}function n(){return Object.create(oe)}function i(t){var e=Object.create(le);return e.__reversedIndices=t?t.__reversedIndices:!1,e}function u(t,e,r,n){var i=t.get?t.get(e[n],de):de;return i===de?r:++n===e.length?i:u(i,e,r,n)}function a(t,e,r){return(0===t||null!=r&&-r>=t)&&(null==e||null!=r&&e>=r)}function s(t,e){return 0>t?Math.max(0,e+t):e?Math.min(e,t):t}function h(t,e){return null==t?e:0>t?Math.max(0,e+t):e?Math.min(e,t):t}function o(t){return t}function c(t,e){return[e,t]}function f(){return!0}function l(){return this}function _(t){return(t||0)+1}function g(t,e,r,n,i){var u=t.__makeSequence();return u.__iterateUncached=function(u,a,s){var h=0,o=t.__iterate(function(t,i,a){if(e.call(r,t,i,a)){if(u(t,n?i:h,a)===!1)return!1;h++}},a,s);return i?o:h},u}function v(t){return function(){return!t.apply(this,arguments)}}function p(t){return"string"==typeof t?JSON.stringify(t):t}function m(t,e){for(var r="";e;)1&e&&(r+=t),(e>>=1)&&(t+=t);return r}function d(t,e){return t>e?1:e>t?-1:0}function y(t){b(1/0!==t,"Cannot perform this action with an infinite sequence.")}function w(){}function I(t){for(var e=t.length,r=Array(e),n=0;e>n;n++)r[n]=t[n];return r}function D(t,e,r){var n=t._rootData.updateIn(t._keyPath,r?Ie.empty():void 0,e),i=t._keyPath||[];return t._onChange&&t._onChange.call(void 0,n,t._rootData,r?i.concat(r):i),new ye(n,t._keyPath,t._onChange)}function O(t,e){return t instanceof ye&&(t=t.deref()),e instanceof ye&&(e=e.deref()),t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t instanceof se?t.equals(e):!1}function b(t,e){if(!t)throw Error(e)}function k(t){return t.value=!1,t}function M(t){t&&(t.value=!0)}function S(t,e,r){var n=Object.create(Oe);return n.length=t,n._root=e,n.__ownerID=r,n.__altered=!1,n
}function x(t,e,r){var n=k(je),i=k(Pe),u=A(t._root,t.__ownerID,0,V(e),e,r,n,i);if(!i.value)return t;var a=t.length+(n.value?r===de?-1:1:0);return t.__ownerID?(t.length=a,t._root=u,t.__altered=!0,t):u?S(a,u):Ie.empty()}function A(t,e,r,n,i,u,a,s){return t?t.update(e,r,n,i,u,a,s):u===de?t:(M(s),M(a),new Ce(e,n,[i,u]))}function C(t){return t.constructor===Ce||t.constructor===xe}function E(t,e,r,n,i){if(t.hash===n)return new xe(e,n,[t.entry,i]);var u,a=t.hash>>>r&me,s=n>>>r&me,h=a===s?[E(t,e,r+ve,n,i)]:(u=new Ce(e,n,i),s>a?[t,u]:[u,t]);return new be(e,1<<a|1<<s,h)}function q(t,e,r,n){for(var i=0,u=0,a=Array(r),s=0,h=1,o=e.length;o>s;s++,h<<=1){var c=e[s];null!=c&&s!==n&&(i|=h,a[u++]=c)}return new be(t,i,a)}function j(t,e,r,n,i){for(var u=0,a=Array(pe),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[u++]:null;return a[n]=i,new Me(t,u+1,a)}function P(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u&&n.push(Array.isArray(u)?se(u).fromEntries():se(u))}return W(t,e,n)}function U(t){return function(e,r){return e&&e.mergeDeepWith?e.mergeDeepWith(t,r):t?t(e,r):r}}function W(t,e,r){return 0===r.length?t:t.withMutations(function(t){for(var n=e?function(r,n){var i=t.get(n,de);t.set(n,i===de?r:e(i,r))}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function R(t,e,r,n,i){var u=e[i],a=++i===e.length,s=a?r:Ie.empty(),h=t.get?t.get(u,s):s,o=a?n(h):R(h,e,r,n,i);return b(!h||t.set,"updateIn with invalid keyPath"),o===h?t:t.set(u,o)}function z(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 J(t,e,r,n){var i=n?t:I(t);return i[e]=r,i}function B(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),a=0,s=0;i>s;s++)s===e?(u[s]=r,a=-1):u[s]=t[s+a];return u}function L(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,a=0;n>a;a++)a===e&&(u=1),i[a]=t[a+u];return i}function V(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if((0|t)===t)return t&Ue;t=""+t,e="string"}if("string"===e)return t.length>We?K(t):N(t);
if(t.hashCode&&"function"==typeof t.hashCode)return t.hashCode();throw Error("Unable to hash: "+t)}function K(t){var e=Je[t];return null==e&&(e=N(t),ze===Re&&(ze=0,Je={}),ze++,Je[t]=e),e}function N(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)&Ue;return e}function F(t,e,r,n,i){return{array:t,level:e,offset:r,max:n,__prev:i}}function G(t,e,r,n,i,u){var a=Object.create(Ne);return a.length=e-t,a._origin=t,a._size=e,a._level=r,a._root=n,a._tail=i,a.__ownerID=u,a.__altered=!1,a}function H(t,e,r){var n=r===de;if(e>=t.length)return n?t:t.withMutations(function(t){return T(t,0,e+1).set(e,r)});var i=Z(t._size);if(e=Y(e,t._origin),e>=i){var u=t._tail.array.hasOwnProperty(e&me);if(n?!u:u&&t._tail.array[e&me]===r)return t;var a=t._tail.ensureOwner(t.__ownerID);return n?delete a.array[e&me]:a.array[e&me]=r,t.__ownerID?(t._tail=a,t.__altered=!0,t):G(t._origin,t._size,t._level,t._root,a)}for(var s=t._root.ensureOwner(t.__ownerID),h=s,o=t._level;o>0;o-=ve){var c=e>>>o&me;if(n&&!h.array[c])return t;if(h=h.array[c]=h.array[c]?h.array[c].ensureOwner(t.__ownerID):new Fe([],t.__ownerID),n&&!h)return t}var f=h.array.hasOwnProperty(e&me);return(n?!f:f&&h.array[e&me]===r)?t:(n?delete h.array[e&me]:h.array[e&me]=r,t.__ownerID?(t._root=s,t.__altered=!0,t):G(t._origin,t._size,t._level,s,t._tail))}function Q(t,e){if(e>=Z(t._size))return t._tail;if(1<<t._level+ve>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&me],n-=ve;return r}}function T(t,e,r){var n=t.__ownerID||new w,i=t._origin,u=t._size,a=i+e,s=null==r?u:0>r?u+r:i+r;if(a===i&&s===u)return t;if(a>=s)return t.clear();for(var h=t._level,o=t._root,c=0;0>a+c;)o=new Fe(o.array.length?[null,o]:[],n),h+=ve,c+=1<<h;c&&(a+=c,i+=c,s+=c,u+=c);for(var f=Z(u),l=Z(s);l>=1<<h+ve;)o=new Fe(o.array.length?[o]:[],n),h+=ve;var _=t._tail,g=f>l?Q(t,s-1):l>f?new Fe([],n):_;if(l>f&&u>a&&_.array.length){o=o.ensureOwner(n);for(var v=o,p=h;p>ve;p-=ve){var m=f>>>p&me;v=v.array[m]=v.array[m]?v.array[m].ensureOwner(n):new Fe([],n)}v.array[f>>>ve&me]=_}if(u>s&&(g=g.removeAfter(n,0,s)),a>=l)a-=l,s-=l,h=ve,o=Te,g=g.removeBefore(n,0,a);
else if(a>i||f>l){var d,y;c=0;do d=a>>>h&me,y=l-1>>>h&me,d===y&&(d&&(c+=(1<<h)*d),h-=ve,o=o&&o.array[d]);while(o&&d===y);o&&a>i&&(o=o.removeBefore(n,h,a-c)),o&&f>l&&(o=o.removeAfter(n,h,l-c)),c&&(a-=c,s-=c),o=o||Te}return t.__ownerID?(t.length=s-a,t._origin=a,t._size=s,t._level=h,t._root=o,t._tail=g,t.__altered=!0,t):G(a,s,h,o,g)}function X(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u&&n.push(se(u))}var a=Math.max.apply(null,n.map(function(t){return t.length||0}));return a>t.length&&(t=t.setLength(a)),W(t,e,n)}function Y(t,e){return b(t>=0,"Index out of bounds"),t+e}function Z(t){return pe>t?0:t-1>>>ve<<ve}function $(t,e){var r=Object.create(Ze);return r.length=t?t.length:0,r._map=t,r.__ownerID=e,r}function te(t,e,r){var n=Object.create(tr.prototype);return n.length=t?t.length:0,n._map=t,n._vector=e,n.__ownerID=r,n}function ee(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function re(t,e){return e?ne(e,t,"",{"":t}):ie(t)}function ne(t,e,r,n){return e&&(Array.isArray(e)||e.constructor===Object)?t.call(n,r,se(e).map(function(r,n){return ne(t,r,n,e)})):e}function ie(t){if(t){if(Array.isArray(t))return se(t).map(ie).toVector();if(t.constructor===Object)return se(t).map(ie).toMap()}return t}var ue=Object,ae={};ae.createClass=t,ae.superCall=e,ae.defaultSuperCall=r;var se=function(t){return he.from(1===arguments.length?t:Array.prototype.slice.call(arguments))},he=se;ae.createClass(se,{toString:function(){return this.__toString("Seq {","}")},__toString:function(t,e){return 0===this.length?t+e:t+" "+this.map(this.__toStringMapper).join(", ")+" "+e},__toStringMapper:function(t,e){return e+": "+p(t)},toJS:function(){return this.map(function(t){return t instanceof he?t.toJS():t}).__toJS()},toArray:function(){y(this.length);var t=Array(this.length||0);return this.values().forEach(function(e,r){t[r]=e}),t},toObject:function(){y(this.length);var t={};return this.forEach(function(e,r){t[r]=e}),t},toVector:function(){return y(this.length),Ve.from(this)},toMap:function(){return y(this.length),Ie.from(this)
},toOrderedMap:function(){return y(this.length),tr.from(this)},toSet:function(){return y(this.length),Xe.from(this)},equals:function(t){if(this===t)return!0;if(!(t instanceof he))return!1;if(null!=this.length&&null!=t.length){if(this.length!==t.length)return!1;if(0===this.length&&0===t.length)return!0}return this.__deepEquals(t)},__deepEquals:function(t){var e=this.cacheResult().entries().toArray(),r=0;return t.every(function(t,n){var i=e[r++];return O(n,i[0])&&O(t,i[1])})},join:function(t){t=t||",";var e="",r=!0;return this.forEach(function(n){r?(r=!1,e+=n):e+=t+n}),e},count:function(t,e){return t?this.filter(t,e).count():(null==this.length&&(this.length=this.forEach(f)),this.length)},countBy:function(t){var e=this;return tr.empty().withMutations(function(r){e.forEach(function(e,n,i){r.update(t(e,n,i),_)})})},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var r=[this].concat(t.map(function(t){return he(t)})),n=this.__makeSequence();return n.length=r.reduce(function(t,e){return null!=t&&null!=e.length?t+e.length:void 0},0),n.__iterateUncached=function(t,e){for(var n,i=0,u=r.length-1,a=0;u>=a&&!n;a++){var s=r[e?u-a:a];i+=s.__iterate(function(e,r,i){return t(e,r,i)===!1?(n=!0,!1):void 0},e)}return i},n},reverse:function(){var t=this,e=t.__makeSequence();return e.length=t.length,e.__iterateUncached=function(e,r){return t.__iterate(e,!r)},e.reverse=function(){return t},e},keys:function(){return this.flip().values()},values:function(){var t=this,e=i(t);return e.length=t.length,e.values=l,e.__iterateUncached=function(e,r,n){if(n&&null==this.length)return this.cacheResult().__iterate(e,r,n);var i,u=0;return n?(u=this.length-1,i=function(t,r,n){return e(t,u--,n)!==!1}):i=function(t,r,n){return e(t,u++,n)!==!1},t.__iterate(i,r),n?this.length:u},e},entries:function(){var t=this;if(t._cache)return he(t._cache);var e=t.map(c).values();return e.fromEntries=function(){return t},e},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},reduce:function(t,e,r){var n=e;return this.forEach(function(e,i,u){n=t.call(r,n,e,i,u)
}),n},reduceRight:function(t,e,r){return this.reverse(!0).reduce(t,e,r)},every:function(t,e){var r=!0;return this.forEach(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},some:function(t,e){return!this.every(v(t),e)},first:function(){return this.find(f)},last:function(){return this.findLast(f)},rest:function(){return this.slice(1)},butLast:function(){return this.slice(0,-1)},has:function(t){return this.get(t,de)!==de},get:function(t,e){return this.find(function(e,r){return O(r,t)},null,e)},getIn:function(t,e){return t&&0!==t.length?u(this,t,e,0):this},contains:function(t){return this.find(function(e){return O(e,t)},null,de)!==de},find:function(t,e,r){var n=r;return this.forEach(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},findKey:function(t,e){var r;return this.forEach(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLast:function(t,e,r){return this.reverse(!0).find(t,e,r)},findLastKey:function(t,e){return this.reverse(!0).findKey(t,e)},flip:function(){var t=this,e=n();return e.length=t.length,e.flip=function(){return t},e.__iterateUncached=function(e,r){return t.__iterate(function(t,r,n){return e(r,t,n)!==!1},r)},e},map:function(t,e){var r=this,n=r.__makeSequence();return n.length=r.length,n.__iterateUncached=function(n,i){return r.__iterate(function(r,i,u){return n(t.call(e,r,i,u),i,u)!==!1},i)},n},mapKeys:function(t,e){var r=this,n=r.__makeSequence();return n.length=r.length,n.__iterateUncached=function(n,i){return r.__iterate(function(r,i,u){return n(r,t.call(e,i,r,u),u)!==!1},i)},n},filter:function(t,e){return g(this,t,e,!0,!1)},slice:function(t,e){if(a(t,e,this.length))return this;var r=s(t,this.length),n=h(e,this.length);if(r!==r||n!==n)return this.entries().slice(t,e).fromEntries();var i=0===r?this:this.skip(r);return null==n||n===this.length?i:i.take(n-r)},take:function(t){var e=0,r=this.takeWhile(function(){return e++<t});return r.length=this.length&&Math.min(this.length,t),r},takeLast:function(t,e){return this.reverse(e).take(t).reverse(e)},takeWhile:function(t,e){var r=this,n=r.__makeSequence();
return n.__iterateUncached=function(n,i,u){if(i)return this.cacheResult().__iterate(n,i,u);var a=0;return r.__iterate(function(r,i,u){return t.call(e,r,i,u)&&n(r,i,u)!==!1?void a++:!1},i,u),a},n},takeUntil:function(t,e,r){return this.takeWhile(v(t),e,r)},skip:function(t,e){if(0===t)return this;var r=0,n=this.skipWhile(function(){return r++<t},null,e);return n.length=this.length&&Math.max(0,this.length-t),n},skipLast:function(t,e){return this.reverse(e).skip(t).reverse(e)},skipWhile:function(t,e){var r=this,n=r.__makeSequence();return n.__iterateUncached=function(n,i,u){if(i)return this.cacheResult().__iterate(n,i,u);var a=!0,s=0;return r.__iterate(function(r,i,u){if(!a||!(a=t.call(e,r,i,u))){if(n(r,i,u)===!1)return!1;s++}},i,u),s},n},skipUntil:function(t,e,r){return this.skipWhile(v(t),e,r)},groupBy:function(t){var e=this,r=tr.empty().withMutations(function(r){e.forEach(function(e,n,i){var u=t(e,n,i),a=r.get(u,de);a===de&&(a=[],r.set(u,a)),a.push([n,e])})});return r.map(function(t){return he(t).fromEntries()})},sort:function(t,e){return this.sortBy(o,t,e)},sortBy:function(t,e){e=e||d;var r=this;return he(this.entries().entries().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]})).fromEntries().values().fromEntries()},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(y(this.length),this._cache=this.entries().toArray(),null==this.length&&(this.length=this._cache.length)),this},__iterate:function(t,e,r){if(!this._cache)return this.__iterateUncached(t,e,r);var n=this.length-1,i=this._cache,u=this;if(e)for(var a=i.length-1;a>=0;a--){var s=i[a];if(t(s[1],r?s[0]:n-s[0],u)===!1)break}else i.every(r?function(e){return t(e[1],n-e[0],u)!==!1}:function(e){return t(e[1],e[0],u)!==!1});return this.length},__makeSequence:function(){return n()}},{from:function(t){if(t instanceof he)return t;if(!Array.isArray(t)){if(t&&t.constructor===Object)return new _e(t);t=[t]}return new ge(t)}});var oe=se.prototype;oe.toJSON=oe.toJS,oe.__toJS=oe.toObject,oe.inspect=oe.toSource=function(){return""+this
};var ce=function(){ae.defaultSuperCall(this,fe.prototype,arguments)},fe=ce;ae.createClass(ce,{toString:function(){return this.__toString("Seq [","]")},toArray:function(){y(this.length);var t=Array(this.length||0);return t.length=this.forEach(function(e,r){t[r]=e}),t},fromEntries:function(){var t=this,e=n();return e.length=t.length,e.entries=function(){return t},e.__iterateUncached=function(e,r,n){return t.__iterate(function(t,r,n){return e(t[1],t[0],n)},r,n)},e},join:function(t){t=t||",";var e="",r=0;return this.forEach(function(n,i){var u=i-r;r=i,e+=(1===u?t:m(t,u))+n}),this.length&&this.length-1>r&&(e+=m(t,this.length-1-r)),e},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var r=[this].concat(t).map(function(t){return se(t)}),n=this.__makeSequence();return n.length=r.reduce(function(t,e){return null!=t&&null!=e.length?t+e.length:void 0},0),n.__iterateUncached=function(t,e,n){if(n&&!this.length)return this.cacheResult().__iterate(t,e,n);for(var i,u=0,a=n&&this.length-1,s=r.length-1,h=0;s>=h&&!i;h++){var o=r[e?s-h:h];o instanceof fe||(o=o.values()),u+=o.__iterate(function(e,r,s){return r+=u,t(e,n?a-r:r,s)===!1?(i=!0,!1):void 0},e)}return u},n},reverse:function(t){var e=this,r=e.__makeSequence();return r.length=e.length,r.__reversedIndices=!!(t^e.__reversedIndices),r.__iterateUncached=function(r,n,i){return e.__iterate(r,!n,i^t)},r.reverse=function(r){return t===r?e:le.reverse.call(this,r)},r},values:function(){var t=ae.superCall(this,fe.prototype,"values",[]);return t.length=void 0,t},filter:function(t,e,r){var n=g(this,t,e,r,r);return r&&(n.length=this.length),n},indexOf:function(t){return this.findIndex(function(e){return O(e,t)})},lastIndexOf:function(t){return this.reverse(!0).indexOf(t)},findIndex:function(t,e){var r=this.findKey(t,e);return null==r?-1:r},findLastIndex:function(t,e){return this.reverse(!0).findIndex(t,e)},slice:function(t,e,r){var n=this;if(a(t,e,n.length))return n;var i=n.__makeSequence(),u=s(t,n.length),o=h(e,n.length);return i.length=n.length&&(r?n.length:o-u),i.__reversedIndices=n.__reversedIndices,i.__iterateUncached=function(i,a,c){if(a)return this.cacheResult().__iterate(i,a,c);
var f=this.__reversedIndices^c;if(u!==u||o!==o||f&&null==n.length){var l=n.count();u=s(t,l),o=h(e,l)}var _=f?n.length-o:u,g=f?n.length-u:o,v=n.__iterate(function(t,e,n){return f?null!=g&&e>=g||e>=_&&i(t,r?e:e-_,n)!==!1:_>e||(null==g||g>e)&&i(t,r?e:e-_,n)!==!1},a,c);return null!=this.length?this.length:r?v:Math.max(0,v-_)},i},splice:function(t,e){for(var r=[],n=2;arguments.length>n;n++)r[n-2]=arguments[n];return 0===e&&0===r.length?this:this.slice(0,t).concat(r,this.slice(t+e))},takeWhile:function(t,e,r){var n=this,i=n.__makeSequence();return i.__iterateUncached=function(u,a,s){if(a)return this.cacheResult().__iterate(u,a,s);var h=0,o=!0,c=n.__iterate(function(r,n,i){return t.call(e,r,n,i)&&u(r,n,i)!==!1?void(h=n):(o=!1,!1)},a,s);return r?i.length:o?c:h+1},r&&(i.length=this.length),i},skipWhile:function(t,e,r){var n=this,i=n.__makeSequence();return r&&(i.length=this.length),i.__iterateUncached=function(i,u,a){if(u)return this.cacheResult().__iterate(i,u,a);var s=n.__reversedIndices^a,h=!0,o=0,c=n.__iterate(function(n,u,s){return h&&(h=t.call(e,n,u,s),h||(o=u)),h||i(n,a||r?u:u-o,s)!==!1},u,a);return r?c:s?o+1:c-o},i},groupBy:function(t,e,r){var n=this,i=tr.empty().withMutations(function(e){n.forEach(function(i,u,a){var s=t(i,u,a),h=e.get(s,de);h===de&&(h=Array(r?n.length:0),e.set(s,h)),r?h[u]=i:h.push(i)})});return i.map(function(t){return se(t)})},sortBy:function(t,e,r){var n=ae.superCall(this,fe.prototype,"sortBy",[t,e]);return r||(n=n.values()),n.length=this.length,n},__makeSequence:function(){return i(this)}},{},se);var le=ce.prototype;le.__toJS=le.toArray,le.__toStringMapper=p;var _e=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};ae.createClass(_e,{toObject:function(){return this._object},get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var a=e?i-u:u;if(t(r[n[a]],n[a],r)===!1)break}return u}},{},se);var ge=function(t){this._array=t,this.length=t.length
};ae.createClass(ge,{toArray:function(){return this._array},__iterate:function(t,e,r){var n=this._array,i=n.length-1,u=-1;if(e){for(var a=i;a>=0;a--){if(n.hasOwnProperty(a)&&t(n[a],r?a:i-a,n)===!1)return u+1;u=a}return n.length}var s=n.every(function(e,a){return t(e,r?i-a:a,n)===!1?!1:(u=a,!0)});return s?n.length:u+1}},{},ce),ge.prototype.get=_e.prototype.get,ge.prototype.has=_e.prototype.has;var ve=5,pe=1<<ve,me=pe-1,de={},ye=function(t,e,r){var n=t.getIn(e);this.length=n instanceof se?n.length:null,this._rootData=t,this._keyPath=e,this._onChange=r},we=ye;ae.createClass(ye,{deref:function(t){return this._rootData.getIn(this._keyPath,t)},get:function(t,e){return this.getIn([t],e)},getIn:function(t,e){if(!t||!t.length)return this;var r=this._rootData.getIn((this._keyPath||[]).concat(t),de);return r===de?e:r instanceof se?this.cursor(t):r},set:function(t,e){return D(this,function(r){return r.set(t,e)},t)},"delete":function(t){return D(this,function(e){return e.delete(t)},t)},update:function(t,e,r){return 1===arguments.length?D(this,t):D(this,function(n){return n.update(t,e,r)},t)},cursor:function(t){return t&&!Array.isArray(t)&&(t=[t]),t&&0!==t.length?new we(this._rootData,this._keyPath?this._keyPath.concat(t):t,this._onChange):this},__iterate:function(){var t=this.deref();return t&&t.__iterate?t.__iterate.apply(t,arguments):0}},{},se);var Ie=function(t){var e=De.empty();return t?t.constructor===De?t:e.merge(t):e},De=Ie;ae.createClass(Ie,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,V(t),t,e):e},set:function(t,e){return x(this,t,e)},"delete":function(t){return x(this,t,de)},update:function(t,e,r){return this.updateIn([t],e,r)},updateIn:function(t,e,r){var n;return r||(n=[e,r],r=n[0],e=n[1],n),t&&0!==t.length?R(this,t,e,r,0):r(this)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._root=null,this.__altered=!0,this):De.empty()},merge:function(){return P(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];
return P(this,t,e)},mergeDeep:function(){return P(this,U(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return P(this,U(t),e)},cursor:function(t,e){return e||"function"!=typeof t||(e=t,t=null),t&&!Array.isArray(t)&&(t=[t]),new ye(this,t,e)},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new w)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterate:function(t,e){var r=this;if(!r._root)return 0;var n=0;return this._root.iterate(function(e){return t(e[1],e[0],r)===!1?!1:void n++},e),n},__deepEqual:function(t){var e=this;return t.every(function(t,r){return O(e.get(r,de),t)})},__ensureOwner:function(t){return t===this.__ownerID?this:t?S(this.length,this._root,t):(this.__ownerID=t,this.__altered=!1,this)}},{empty:function(){return qe||(qe=S(0))}},se);var Oe=Ie.prototype;Ie.from=Ie;var be=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},ke=be;ae.createClass(be,{get:function(t,e,r,n){var i=1<<(e>>>t&me),u=this.bitmap;return 0===(u&i)?n:this.nodes[z(u&i-1)].get(t+ve,e,r,n)},update:function(t,e,r,n,i,u,a){var s=r>>>e&me,h=1<<s,o=this.bitmap,c=0!==(o&h);if(!c&&i===de)return this;var f=z(o&h-1),l=this.nodes,_=c?l[f]:null,g=A(_,t,e+ve,r,n,i,u,a);if(g===_)return this;if(!c&&g&&l.length>=Be)return j(t,l,o,s,g);if(c&&!g&&2===l.length&&C(l[1^f]))return l[1^f];if(c&&g&&1===l.length&&C(g))return g;var v=t&&t===this.ownerID,p=c?g?o:o^h:o|h,m=c?g?J(l,f,g,v):L(l,f,v):B(l,f,g,v);return v?(this.bitmap=p,this.nodes=m,this):new ke(t,p,m)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++)if(r[e?i-n:n].iterate(t,e)===!1)return!1}},{});var Me=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},Se=Me;ae.createClass(Me,{get:function(t,e,r,n){var i=e>>>t&me,u=this.nodes[i];return u?u.get(t+ve,e,r,n):n},update:function(t,e,r,n,i,u,a){var s=r>>>e&me,h=i===de,o=this.nodes,c=o[s];
if(h&&!c)return this;var f=A(c,t,e+ve,r,n,i,u,a);if(f===c)return this;var l=this.count;if(c){if(!f&&(l--,Le>l))return q(t,o,l,s)}else l++;var _=t&&t===this.ownerID,g=J(o,s,f,_);return _?(this.count=l,this.nodes=g,this):new Se(t,l,g)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}}},{});var xe=function(t,e,r){this.ownerID=t,this.hash=e,this.entries=r},Ae=xe;ae.createClass(xe,{get:function(t,e,r,n){for(var i=this.entries,u=0,a=i.length;a>u;u++)if(O(r,i[u][0]))return i[u][1];return n},update:function(t,e,r,n,i,u,a){var s=i===de;if(r!==this.hash)return s?this:(M(a),M(u),E(this,t,e,r,[n,i]));for(var h=this.entries,o=0,c=h.length;c>o&&!O(n,h[o][0]);o++);var f=c>o;if(s&&!f)return this;if(M(a),(s||!f)&&M(u),s&&2===c)return new Ce(t,this.hash,h[1^o]);var l=t&&t===this.ownerID,_=l?h:I(h);return f?s?o===c-1?_.pop():_[o]=_.pop():_[o]=[n,i]:_.push([n,i]),l?(this.entries=_,this):new Ae(t,this.hash,_)},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}},{});var Ce=function(t,e,r){this.ownerID=t,this.hash=e,this.entry=r},Ee=Ce;ae.createClass(Ce,{get:function(t,e,r,n){return O(r,this.entry[0])?this.entry[1]:n},update:function(t,e,r,n,i,u,a){var s=i===de,h=O(n,this.entry[0]);return(h?i===this.entry[1]:s)?this:(M(a),s?(M(u),null):h?t&&t===this.ownerID?(this.entry[1]=i,this):new Ee(t,r,[n,i]):(M(u),E(this,t,e,r,[n,i])))},iterate:function(t){return t(this.entry)}},{});var qe,je={value:!1},Pe={value:!1},Ue=2147483647,We=16,Re=255,ze=0,Je={},Be=pe/2,Le=pe/4,Ve=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Ke.from(t)},Ke=Ve;ae.createClass(Ve,{toString:function(){return this.__toString("Vector [","]")},get:function(t,e){if(t=Y(t,this._origin),t>=this._size)return e;var r=Q(this,t),n=t&me;return r&&(void 0===e||r.array.hasOwnProperty(n))?r.array[n]:e},first:function(){return this.get(0)},last:function(){return this.get(this.length?this.length-1:0)},set:function(t,e){return H(this,t,e)
},"delete":function(t){return H(this,t,de)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=this._origin=this._size=0,this._level=ve,this._root=this._tail=Te,this.__altered=!0,this):Ke.empty()},push:function(){var t=arguments,e=this.length;return this.withMutations(function(r){T(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return T(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){T(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return T(this,1)},merge:function(){return X(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return X(this,t,e)},mergeDeep:function(){return X(this,U(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return X(this,U(t),e)},setLength:function(t){return T(this,0,t)},slice:function(t,e,r){var n=ae.superCall(this,Ke.prototype,"slice",[t,e,r]);if(!r&&n!==this){var i=this,u=i.length;n.toVector=function(){return T(i,0>t?Math.max(0,u+t):u?Math.min(u,t):t,null==e?u:0>e?Math.max(0,u+e):u?Math.min(u,e):e)}}return n},iterator:function(){return new He(this,this._origin,this._size,this._level,this._root,this._tail)},__iterate:function(t,e,r){var n=this,i=0,u=n.length-1;r^=e;var a,s=function(e,a){return t(e,r?u-a:a,n)===!1?!1:(i=a,!0)},h=Z(this._size);return a=e?this._tail.iterate(0,h-this._origin,this._size-this._origin,s,e)&&this._root.iterate(this._level,-this._origin,h-this._origin,s,e):this._root.iterate(this._level,-this._origin,h-this._origin,s,e)&&this._tail.iterate(0,h-this._origin,this._size-this._origin,s,e),(a?u:e?u-i:i)+1},__deepEquals:function(t){var e=this.iterator();return t.every(function(t,r){var n=e.next().value;return n&&r===n[0]&&O(t,n[1])})},__ensureOwner:function(t){return t===this.__ownerID?this:t?G(this._origin,this._size,this._level,this._root,this._tail,t):(this.__ownerID=t,this)}},{empty:function(){return Qe||(Qe=G(0,0,ve,Te,Te))},from:function(t){if(!t||0===t.length)return Ke.empty();
if(t.constructor===Ke)return t;var e=Array.isArray(t);return t.length>0&&pe>t.length?G(0,t.length,ve,Te,new Fe(e?I(t):se(t).toArray())):(e||(t=se(t),t instanceof ce||(t=t.values())),Ke.empty().merge(t))}},ce);var Ne=Ve.prototype;Ne["@@iterator"]=Ne.iterator,Ne.update=Oe.update,Ne.updateIn=Oe.updateIn,Ne.cursor=Oe.cursor,Ne.withMutations=Oe.withMutations,Ne.asMutable=Oe.asMutable,Ne.asImmutable=Oe.asImmutable,Ne.wasAltered=Oe.wasAltered;var Fe=function(t,e){this.array=t,this.ownerID=e},Ge=Fe;ae.createClass(Fe,{ensureOwner:function(t){return t&&t===this.ownerID?this:new Ge(this.array.slice(),t)},removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&me;if(n>=this.array.length)return new Ge([],t);var i,u=0===n;if(e>0){var a=this.array[n];if(i=a&&a.removeBefore(t,e-ve,r),i===a&&u)return this}if(u&&!i)return this;var s=this.ensureOwner();if(!u)for(var h=0;n>h;h++)delete s.array[h];return i&&(s.array[n]=i),s},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&me;if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var a=this.array[n];if(i=a&&a.removeAfter(t,e-ve,r),i===a&&u)return this}if(u&&!i)return this;var s=this.ensureOwner();return u||(s.array.length=n+1),i&&(s.array[n]=i),s},iterate:function(t,e,r,n,i){var u,a=this.array,s=a.length-1;if(0===t)for(u=0;s>=u;u++){var h=i?s-u:u;if(a.hasOwnProperty(h)){var o=h+e;if(o>=0&&r>o&&n(a[h],o)===!1)return!1}}else{var c=1<<t,f=t-ve;for(u=0;s>=u;u++){var l=i?s-u:u,_=e+l*c;if(r>_&&_+c>0){var g=a[l];if(g&&!g.iterate(f,_,r,n,i))return!1}}}return!0}},{});var He=function(t,e,r,n,i,u){var a=Z(r);this._stack=F(i.array,n,-e,a-e,F(u.array,0,a-e,r-e))};ae.createClass(He,{next:function(){var t=this._stack;t:for(;t;){if(0===t.level)for(t.rawIndex||(t.rawIndex=0);t.array.length>t.rawIndex;){var e=t.rawIndex+t.offset;if(e>=0&&t.max>e&&t.array.hasOwnProperty(t.rawIndex)){var r=t.array[t.rawIndex];return t.rawIndex++,{value:[e,r],done:!1}}t.rawIndex++}else{var n=1<<t.level;for(t.levelIndex||(t.levelIndex=0);t.array.length>t.levelIndex;){var i=t.offset+t.levelIndex*n;
if(i+n>0&&t.max>i){var u=t.array[t.levelIndex];if(u){t.levelIndex++,t=this._stack=F(u.array,t.level-ve,i,t.max,t);continue t}}t.levelIndex++}}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}}},{});var Qe,Te=new Fe([]),Xe=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Ye.from(t)},Ye=Xe;ae.createClass(Xe,{toString:function(){return this.__toString("Set {","}")},has:function(t){return this._map.has(t)},get:function(t,e){return this.has(t)?t:e},add:function(t){var e=this._map.set(t,null);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:$(e)},"delete":function(t){var e=this._map.delete(t);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:0===e.length?Ye.empty():$(e)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this):Ye.empty()},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var r=0;t.length>r;r++)se(t[r]).forEach(function(t){return e.add(t)})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return se(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.delete(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return se(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.delete(r)})})},isSubset:function(t){return t=se(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){var e=this;return t=se(t),t.every(function(t){return e.contains(t)})},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__deepEquals:function(t){return this._map.equals(t._map)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);
return t?$(e,t):(this.__ownerID=t,this._map=e,this)}},{empty:function(){return $e||($e=$(Ie.empty()))},from:function(t){var e=Ye.empty();return t?t.constructor===Ye?t:e.union(t):e},fromKeys:function(t){return Ye.from(se(t).flip())}},se);var Ze=Xe.prototype;Ze.contains=Ze.has,Ze.mergeDeep=Ze.merge=Ze.union,Ze.mergeDeepWith=Ze.mergeWith=function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.merge.apply(this,t)},Ze.withMutations=Oe.withMutations,Ze.asMutable=Oe.asMutable,Ze.asImmutable=Oe.asImmutable,Ze.__toJS=le.__toJS,Ze.__toStringMapper=le.__toStringMapper;var $e,tr=function(t){var e=er.empty();return t?t.constructor===er?t:e.merge(t):e},er=tr;ae.createClass(tr,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return null!=r?this._vector.get(r)[1]:e},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this._vector.clear(),this):er.empty()},set:function(t,e){var r=this._map.get(t),n=null!=r,i=n?this._map:this._map.set(t,this._vector.length),u=n?this._vector.set(r,[t,e]):this._vector.push([t,e]);return this.__ownerID?(this.length=i.length,this._map=i,this._vector=u,this):u===this._vector?this:te(i,u)},"delete":function(t){var e=this._map.get(t);if(null==e)return this;var r=this._map.delete(t),n=this._vector.delete(e);return this.__ownerID?(this.length=r.length,this._map=r,this._vector=n,this):0===r.length?er.empty():te(r,n)},wasAltered:function(){return this._map.wasAltered()||this._vector.wasAltered()},__iterate:function(t,e){return this._vector?this._vector.fromEntries().__iterate(t,e):0},__deepEqual:function(t){var e=this._vector.iterator();return t.every(function(t,r){var n=e.next().value;return n&&(n=n[1]),n&&O(r,n[0])&&O(t,n[1])})},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._vector.__ensureOwner(t);return t?te(e,r,t):(this.__ownerID=t,this._map=e,this._vector=r,this)}},{empty:function(){return rr||(rr=te(Ie.empty(),Ve.empty()))}},Ie),tr.from=tr;
var rr,nr=function(t,e){var r=function(t){this._map=Ie(t)};t=se(t);var n=r.prototype=Object.create(ur);n.constructor=r,n._name=e,n._defaultValues=t;var i=Object.keys(t);return r.prototype.length=i.length,Object.defineProperty&&t.forEach(function(t,e){Object.defineProperty(r.prototype,e,{get:function(){return this.get(e)},set:function(t){b(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}),r},ir=nr;ae.createClass(nr,{toString:function(){return this.__toString((this._name||"Record")+" {","}")},has:function(t){return this._defaultValues.has(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues.get(t)):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;Object.getPrototypeOf(this).constructor;return ir._empty||(ir._empty=ee(this,Ie.empty()))},set:function(t,e){if(null==t||!this.has(t))return this;var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:ee(this,r)},"delete":function(t){if(null==t||!this.has(t))return this;var e=this._map.delete(t);return this.__ownerID||e===this._map?this:ee(this,e)},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._defaultValues.map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?ee(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},se);var ur=nr.prototype;ur.__deepEqual=Oe.__deepEqual,ur.merge=Oe.merge,ur.mergeWith=Oe.mergeWith,ur.mergeDeep=Oe.mergeDeep,ur.mergeDeepWith=Oe.mergeDeepWith,ur.update=Oe.update,ur.updateIn=Oe.updateIn,ur.cursor=Oe.cursor,ur.withMutations=Oe.withMutations,ur.asMutable=Oe.asMutable,ur.asImmutable=Oe.asImmutable;var ar=function(t,e,r){return this instanceof sr?(b(0!==r,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&or?or:(r=null==r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.length=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new sr(t,e,r)},sr=ar;ae.createClass(ar,{toString:function(){return 0===this.length?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"
},has:function(t){return b(t>=0,"Index out of bounds"),this.length>t},get:function(t,e){return b(t>=0,"Index out of bounds"),1/0===this.length||this.length>t?this._start+t*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.length>e&&e===Math.floor(e)},slice:function(t,e,r){return a(t,e,this.length)?this:r?ae.superCall(this,sr.prototype,"slice",[t,e,r]):(t=s(t,this.length),e=h(e,this.length),t>=e?or:new sr(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.length>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,t)},skip:function(t,e){return e?ae.superCall(this,sr.prototype,"skip",[t]):this.slice(t)},__iterate:function(t,e,r){for(var n=e^r,i=this.length-1,u=this._step,a=e?this._start+i*u:this._start,s=0;i>=s&&t(a,n?i-s:s,this)!==!1;s++)a+=e?-u:u;return n?this.length:s},__deepEquals:function(t){return this._start===t._start&&this._end===t._end&&this._step===t._step}},{},ce);var hr=ar.prototype;hr.__toJS=hr.toArray,hr.first=Ne.first,hr.last=Ne.last;var or=ar(0,0),cr=function(t,e){return 0===e&&_r?_r:this instanceof fr?(this._value=t,void(this.length=null==e?1/0:Math.max(0,e))):new fr(t,e)},fr=cr;ae.createClass(cr,{toString:function(){return 0===this.length?"Repeat []":"Repeat [ "+this._value+" "+this.length+" times ]"},get:function(t,e){return b(t>=0,"Index out of bounds"),1/0===this.length||this.length>t?this._value:e},first:function(){return this._value},contains:function(t){return O(this._value,t)},slice:function(t,e,r){if(r)return ae.superCall(this,fr.prototype,"slice",[t,e,r]);var n=this.length;return t=0>t?Math.max(0,n+t):Math.min(n,t),e=null==e?n:e>0?Math.min(n,e):Math.max(0,n+e),e>t?new fr(this._value,e-t):_r},reverse:function(t){return t?ae.superCall(this,fr.prototype,"reverse",[t]):this},indexOf:function(t){return O(this._value,t)?0:-1},lastIndexOf:function(t){return O(this._value,t)?this.length:-1},__iterate:function(t,e,r){var n=e^r;
b(!n||1/0>this.length,"Cannot access end of infinite range.");for(var i=this.length-1,u=0;i>=u&&t(this._value,n?i-u:u,this)!==!1;u++);return n?this.length:u},__deepEquals:function(t){return O(this._value,t._value)}},{},ce);var lr=cr.prototype;lr.last=lr.first,lr.has=hr.has,lr.take=hr.take,lr.skip=hr.skip,lr.__toJS=hr.__toJS;var _r=new cr(void 0,0),gr={Sequence:se,Map:Ie,Vector:Ve,Set:Xe,OrderedMap:tr,Record:nr,Range:ar,Repeat:cr,is:O,fromJS:re};return gr}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
function t(){function t(t,e,n,r){var i;if(r){var u=r.prototype;i=me.create(u)}else i=t.prototype;return me.keys(e).forEach(function(t){i[t]=e[t]}),me.keys(n).forEach(function(e){t[e]=n[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,n,r){return me.getPrototypeOf(e)[n].apply(t,r)}function n(t,n,r){e(t,n,"constructor",r)}function r(t){return t.value=!1,t}function i(t){t&&(t.value=!0)}function u(){}function s(t){for(var e=t.length,n=Array(e),r=0;e>r;r++)n[r]=t[r];return n}function a(t){return Me.value=t,Me.done=!1,Me}function o(){return Me.value=void 0,Me.done=!0,Me}function h(t,e){if(!t)throw Error(e)}function c(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if((0|t)===t)return t&Oe;t=""+t,e="string"}return"string"===e?t.length>Ee?f(t):l(t):t.hashCode?c("function"==typeof t.hashCode?t.hashCode():t.hashCode):_(t)}function f(t){var e=We[t];return null==e&&(e=l(t),Pe===je&&(Pe=0,We={}),Pe++,We[t]=e),e}function l(t){for(var e=0,n=0;t.length>n;n++)e=31*e+t.charCodeAt(n)&Oe;return e}function _(t){if(t[Ae])return t[Ae];var e=++xe&Oe;if(!Ce)try{return Object.defineProperty(t,Ae,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}catch(n){Ce=!0}return t[Ae]=e,e}function v(){return Object.create(ze)}function g(t){var e=Object.create(Le);return e.__reversedIndices=t?t.__reversedIndices:!1,e}function p(t,e,n,r){var i=t.get?t.get(e[r],Ie):Ie;return i===Ie?n:++r===e.length?i:p(i,e,n,r)}function m(t,e,n){return(0===t||null!=n&&-n>=t)&&(null==e||null!=n&&e>=n)}function y(t,e){return 0>t?Math.max(0,e+t):e?Math.min(e,t):t}function d(t,e){return null==t?e:0>t?Math.max(0,e+t):e?Math.min(e,t):t}function w(t){return t}function S(t,e){return[e,t]}function I(){return!0}function k(){return this}function b(t){return(t||0)+1}function M(t,e,n,r,i){var u=t.__makeSequence();return u.__iterateUncached=function(u,s,a){var o=0,h=t.__iterate(function(t,i,s){if(e.call(n,t,i,s)){if(u(t,r?i:o,s)===!1)return!1;o++}},s,a);return i?h:o},u}function D(t){return function(){return!t.apply(this,arguments)}}function q(t){return"string"==typeof t?JSON.stringify(t):t
}function O(t,e){for(var n="";e;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n}function x(t,e){return t>e?1:e>t?-1:0}function A(t){h(1/0!==t,"Cannot perform this action with an infinite sequence.")}function C(t,e){var n=new Ne;return n.next=function(){var n=t.next();return n.done?n:(n.value=e(n.value),n)},n}function E(t,e,n){return n instanceof Re?j(t,e,n):n}function j(t,e,n){return new Ge(t._rootData,t._keyPath.concat(e),t._onChange,n)}function P(t,e,n){var r=t._rootData.updateIn(t._keyPath,n?He.empty():void 0,e),i=t._keyPath||[];return t._onChange&&t._onChange.call(void 0,r,t._rootData,n?i.concat(n):i),new Ge(r,t._keyPath,t._onChange)}function W(t,e){return t instanceof Ge&&(t=t.deref()),e instanceof Ge&&(e=e.deref()),t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t instanceof Re?t.equals(e):!1}function R(t,e){return a(0===t||1===t?e[t]:[e[0],e[1]])}function U(t,e){return{node:t,index:0,__prev:e}}function z(t,e,n,r){var i=Object.create(Te);return i.length=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function J(t,e,n){var i=r(ke),u=r(be),s=B(t._root,t.__ownerID,0,c(e),e,n,i,u);if(!u.value)return t;var a=t.length+(i.value?n===Ie?-1:1:0);return t.__ownerID?(t.length=a,t._root=s,t.__hash=void 0,t.__altered=!0,t):s?z(a,s):He.empty()}function B(t,e,n,r,u,s,a,o){return t?t.update(e,n,r,u,s,a,o):s===Ie?t:(i(o),i(a),new nn(e,r,[u,s]))}function L(t){return t.constructor===nn||t.constructor===tn}function V(t,e,n,r,i){if(t.hash===r)return new tn(e,r,[t.entry,i]);var u,s=t.hash>>>n&Se,a=r>>>n&Se,o=s===a?[V(t,e,n+de,r,i)]:(u=new nn(e,r,i),a>s?[t,u]:[u,t]);return new Xe(e,1<<s|1<<a,o)}function K(t,e,n,r){for(var i=0,u=0,s=Array(n),a=0,o=1,h=e.length;h>a;a++,o<<=1){var c=e[a];null!=c&&a!==r&&(i|=o,s[u++]=c)}return new Xe(t,i,s)}function N(t,e,n,r,i){for(var u=0,s=Array(we),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[u++]:null;return s[r]=i,new Ze(t,u+1,s)}function F(t,e,n){for(var r=[],i=0;n.length>i;i++){var u=n[i];u&&r.push(Array.isArray(u)?Re(u).fromEntrySeq():Re(u))}return H(t,e,r)}function G(t){return function(e,n){return e&&e.mergeDeepWith?e.mergeDeepWith(t,n):t?t(e,n):n
}}function H(t,e,n){return 0===n.length?t:t.withMutations(function(t){for(var r=e?function(n,r){var i=t.get(r,Ie);t.set(r,i===Ie?n:e(i,n))}:function(e,n){t.set(n,e)},i=0;n.length>i;i++)n[i].forEach(r)})}function Q(t,e,n,r,i){var u=e.length;if(i===u)return r(t);h(t.set,"updateIn with invalid keyPath");var s=i===u-1?n:He.empty(),a=e[i],o=t.get(a,s),c=Q(o,e,n,r,i+1);return c===o?t:t.set(a,c)}function T(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 X(t,e,n,r){var i=r?t:s(t);return i[e]=n,i}function Y(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var u=Array(i),s=0,a=0;i>a;a++)a===e?(u[a]=n,s=-1):u[a]=t[a+s];return u}function Z(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=Array(r),u=0,s=0;r>s;s++)s===e&&(u=1),i[s]=t[s+u];return i}function $(t,e,n,r,i,u){if(t){var s,a=t.array,o=a.length-1;if(0===e)for(s=0;o>=s;s++){var h=u?o-s:s;if(a.hasOwnProperty(h)){var c=h+n;if(c>=0&&r>c&&i(a[h],c)===!1)return!1}}else{var f=1<<e,l=e-de;for(s=0;o>=s;s++){var _=u?o-s:s,v=n+_*f;if(r>v&&v+f>0){var g=a[_];if(g&&!$(g,l,v,r,i,u))return!1}}}}return!0}function te(t,e,n,r,i){return{array:t,level:e,offset:n,max:r,rawMax:r-n>>e,index:0,__prev:i}}function ee(t,e,n,r,i,u,s){var a=Object.create(fn);return a.length=e-t,a._origin=t,a._size=e,a._level=n,a._root=r,a._tail=i,a.__ownerID=u,a.__hash=s,a.__altered=!1,a}function ne(t,e,n){if(e>=t.length)return n===Ie?t:t.withMutations(function(t){se(t,0,e+1).set(e,n)});e=oe(e,t._origin);var i=t._tail,u=t._root,s=r(be);return e>=he(t._size)?i=re(i,t.__ownerID,0,e,n,s):u=re(u,t.__ownerID,t._level,e,n,s),s.value?t.__ownerID?(t._root=u,t._tail=i,t.__hash=void 0,t.__altered=!0,t):ee(t._origin,t._size,t._level,u,i):t}function re(t,e,n,r,u,s){var a,o=u===Ie,h=r>>>n&Se,c=t&&t.array.length>h&&t.array.hasOwnProperty(h);if(o&&!c)return t;if(n>0){var f=t&&t.array[h],l=re(f,e,n-de,r,u,s);return l===f?t:(a=ie(t,e),a.array[h]=l,a)}return!o&&c&&t.array[h]===u?t:(i(s),a=ie(t,e),o?delete a.array[h]:a.array[h]=u,a)}function ie(t,e){return e&&t&&e===t.ownerID?t:new ln(t?t.array.slice():[],e)
}function ue(t,e){if(e>=he(t._size))return t._tail;if(1<<t._level+de>e){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&Se],r-=de;return n}}function se(t,e,n){var r=t.__ownerID||new u,i=t._origin,s=t._size,a=i+e,o=null==n?s:0>n?s+n:i+n;if(a===i&&o===s)return t;if(a>=o)return t.clear();for(var h=t._level,c=t._root,f=0;0>a+f;)c=new ln(c&&c.array.length?[null,c]:[],r),h+=de,f+=1<<h;f&&(a+=f,i+=f,o+=f,s+=f);for(var l=he(s),_=he(o);_>=1<<h+de;)c=new ln(c&&c.array.length?[c]:[],r),h+=de;var v=t._tail,g=l>_?ue(t,o-1):_>l?new ln([],r):v;if(v&&_>l&&s>a&&v.array.length){c=ie(c,r);for(var p=c,m=h;m>de;m-=de){var y=l>>>m&Se;p=p.array[y]=ie(p.array[y],r)}p.array[l>>>de&Se]=v}if(s>o&&(g=g&&g.removeAfter(r,0,o)),a>=_)a-=_,o-=_,h=de,c=null,g=g&&g.removeBefore(r,0,a);else if(a>i||l>_){var d,w;f=0;do d=a>>>h&Se,w=_-1>>>h&Se,d===w&&(d&&(f+=(1<<h)*d),h-=de,c=c&&c.array[d]);while(c&&d===w);c&&a>i&&(c=c&&c.removeBefore(r,h,a-f)),c&&l>_&&(c=c&&c.removeAfter(r,h,_-f)),f&&(a-=f,o-=f)}return t.__ownerID?(t.length=o-a,t._origin=a,t._size=o,t._level=h,t._root=c,t._tail=g,t.__hash=void 0,t.__altered=!0,t):ee(a,o,h,c,g)}function ae(t,e,n){for(var r=[],i=0;n.length>i;i++){var u=n[i];u&&r.push(Re(u))}var s=Math.max.apply(null,r.map(function(t){return t.length||0}));return s>t.length&&(t=t.setLength(s)),H(t,e,r)}function oe(t,e){return h(t>=0,"Index out of bounds"),t+e}function he(t){return we>t?0:t-1>>>de<<de}function ce(t,e){var n=Object.create(yn);return n.length=t?t.length:0,n._map=t,n.__ownerID=e,n}function fe(t,e,n,r){var i=Object.create(wn.prototype);return i.length=t?t.length:0,i._map=t,i._vector=e,i.__ownerID=n,i.__hash=r,i}function le(t,e,n){var r=t._map,i=t._vector,u=r.get(e),s=void 0!==u,a=n===Ie;if(!s&&a||s&&n===i.get(u)[1])return t;s||(u=i.length);var o=a?r.remove(e):s?r:r.set(e,u),h=a?i.remove(u):i.set(u,[e,n]);return t.__ownerID?(t.length=o.length,t._map=o,t._vector=h,t.__hash=void 0,t):fe(o,h)}function _e(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function ve(t,e){return e?ge(e,t,"",{"":t}):pe(t)
}function ge(t,e,n,r){return e&&(Array.isArray(e)||e.constructor===Object)?t.call(r,n,Re(e).map(function(n,r){return ge(t,n,r,e)})):e}function pe(t){if(t){if(Array.isArray(t))return Re(t).map(pe).toVector();if(t.constructor===Object)return Re(t).map(pe).toMap()}return t}var me=Object,ye={};ye.createClass=t,ye.superCall=e,ye.defaultSuperCall=n;var de=5,we=1<<de,Se=we-1,Ie={},ke={value:!1},be={value:!1},Me={value:void 0,done:!1},De="delete",qe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Oe=2147483647,xe=0,Ae="__immutablehash__";"undefined"!=typeof Symbol&&(Ae=Symbol(Ae));var Ce=!1,Ee=16,je=255,Pe=0,We={},Re=function(t){return Ue.from(1===arguments.length?t:Array.prototype.slice.call(arguments))},Ue=Re;ye.createClass(Re,{toString:function(){return this.__toString("Seq {","}")},__toString:function(t,e){return 0===this.length?t+e:t+" "+this.map(this.__toStringMapper).join(", ")+" "+e},__toStringMapper:function(t,e){return e+": "+q(t)},toJS:function(){return this.map(function(t){return t instanceof Ue?t.toJS():t}).__toJS()},toArray:function(){A(this.length);var t=Array(this.length||0);return this.valueSeq().forEach(function(e,n){t[n]=e}),t},toObject:function(){A(this.length);var t={};return this.forEach(function(e,n){t[n]=e}),t},toVector:function(){return A(this.length),hn.from(this)},toMap:function(){return A(this.length),He.from(this)},toOrderedMap:function(){return A(this.length),wn.from(this)},toSet:function(){return A(this.length),pn.from(this)},hashCode:function(){return this.__hash||(this.__hash=1/0===this.length?0:this.reduce(function(t,e,n){return t+(c(e)^(e===n?0:c(n)))&Oe},0))},equals:function(t){if(this===t)return!0;if(!(t instanceof Ue))return!1;if(null!=this.length&&null!=t.length){if(this.length!==t.length)return!1;if(0===this.length&&0===t.length)return!0}return null!=this.__hash&&null!=t.__hash&&this.__hash!==t.__hash?!1:this.__deepEquals(t)},__deepEquals:function(t){var e=this.cacheResult().entrySeq().toArray(),n=0;return t.every(function(t,r){var i=e[n++];return W(r,i[0])&&W(t,i[1])})},join:function(t){t=t||",";
var e="",n=!0;return this.forEach(function(r){n?(n=!1,e+=r):e+=t+r}),e},count:function(t,e){return t?this.filter(t,e).count():(null==this.length&&(this.length=this.forEach(I)),this.length)},countBy:function(t){var e=this;return wn.empty().withMutations(function(n){e.forEach(function(e,r,i){n.update(t(e,r,i),b)})})},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var n=[this].concat(t.map(function(t){return Ue(t)})),r=this.__makeSequence();return r.length=n.reduce(function(t,e){return null!=t&&null!=e.length?t+e.length:void 0},0),r.__iterateUncached=function(t,e){for(var r,i=0,u=n.length-1,s=0;u>=s&&!r;s++){var a=n[e?u-s:s];i+=a.__iterate(function(e,n,i){return t(e,n,i)===!1?(r=!0,!1):void 0},e)}return i},r},reverse:function(){var t=this,e=t.__makeSequence();return e.length=t.length,e.__iterateUncached=function(e,n){return t.__iterate(e,!n)},e.reverse=function(){return t},e},keySeq:function(){return this.flip().valueSeq()},valueSeq:function(){var t=this,e=g(t);return e.length=t.length,e.valueSeq=k,e.__iterateUncached=function(e,n,r){if(r&&null==this.length)return this.cacheResult().__iterate(e,n,r);var i,u=0;return r?(u=this.length-1,i=function(t,n,r){return e(t,u--,r)!==!1}):i=function(t,n,r){return e(t,u++,r)!==!1},t.__iterate(i,n),r?this.length:u},e},entrySeq:function(){var t=this;if(t._cache)return Ue(t._cache);var e=t.map(S).valueSeq();return e.fromEntries=function(){return t},e},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},reduce:function(t,e,n){var r=e;return this.forEach(function(e,i,u){r=t.call(n,r,e,i,u)}),r},reduceRight:function(t,e,n){return this.reverse(!0).reduce(t,e,n)},every:function(t,e){var n=!0;return this.forEach(function(r,i,u){return t.call(e,r,i,u)?void 0:(n=!1,!1)}),n},some:function(t,e){return!this.every(D(t),e)},first:function(){return this.find(I)},last:function(){return this.findLast(I)},rest:function(){return this.slice(1)},butLast:function(){return this.slice(0,-1)},has:function(t){return this.get(t,Ie)!==Ie},get:function(t,e){return this.find(function(e,n){return W(n,t)
},null,e)},getIn:function(t,e){return t&&0!==t.length?p(this,t,e,0):this},contains:function(t){return this.find(function(e){return W(e,t)},null,Ie)!==Ie},find:function(t,e,n){var r=n;return this.forEach(function(n,i,u){return t.call(e,n,i,u)?(r=n,!1):void 0}),r},findKey:function(t,e){var n;return this.forEach(function(r,i,u){return t.call(e,r,i,u)?(n=i,!1):void 0}),n},findLast:function(t,e,n){return this.reverse(!0).find(t,e,n)},findLastKey:function(t,e){return this.reverse(!0).findKey(t,e)},flip:function(){var t=this,e=v();return e.length=t.length,e.flip=function(){return t},e.__iterateUncached=function(e,n){return t.__iterate(function(t,n,r){return e(n,t,r)!==!1},n)},e},map:function(t,e){var n=this,r=n.__makeSequence();return r.length=n.length,r.__iterateUncached=function(r,i){return n.__iterate(function(n,i,u){return r(t.call(e,n,i,u),i,u)!==!1},i)},r},mapKeys:function(t,e){var n=this,r=n.__makeSequence();return r.length=n.length,r.__iterateUncached=function(r,i){return n.__iterate(function(n,i,u){return r(n,t.call(e,i,n,u),u)!==!1},i)},r},filter:function(t,e){return M(this,t,e,!0,!1)},slice:function(t,e){if(m(t,e,this.length))return this;var n=y(t,this.length),r=d(e,this.length);if(n!==n||r!==r)return this.entrySeq().slice(t,e).fromEntrySeq();var i=0===n?this:this.skip(n);return null==r||r===this.length?i:i.take(r-n)},take:function(t){var e=0,n=this.takeWhile(function(){return e++<t});return n.length=this.length&&Math.min(this.length,t),n},takeLast:function(t,e){return this.reverse(e).take(t).reverse(e)},takeWhile:function(t,e){var n=this,r=n.__makeSequence();return r.__iterateUncached=function(r,i,u){if(i)return this.cacheResult().__iterate(r,i,u);var s=0;return n.__iterate(function(n,i,u){return t.call(e,n,i,u)&&r(n,i,u)!==!1?void s++:!1},i,u),s},r},takeUntil:function(t,e,n){return this.takeWhile(D(t),e,n)},skip:function(t,e){if(0===t)return this;var n=0,r=this.skipWhile(function(){return n++<t},null,e);return r.length=this.length&&Math.max(0,this.length-t),r},skipLast:function(t,e){return this.reverse(e).skip(t).reverse(e)
},skipWhile:function(t,e){var n=this,r=n.__makeSequence();return r.__iterateUncached=function(r,i,u){if(i)return this.cacheResult().__iterate(r,i,u);var s=!0,a=0;return n.__iterate(function(n,i,u){if(!s||!(s=t.call(e,n,i,u))){if(r(n,i,u)===!1)return!1;a++}},i,u),a},r},skipUntil:function(t,e,n){return this.skipWhile(D(t),e,n)},groupBy:function(t){var e=this,n=wn.empty().withMutations(function(n){e.forEach(function(e,r,i){var u=t(e,r,i),s=n.get(u,Ie);s===Ie&&(s=[],n.set(u,s)),s.push([r,e])})});return n.map(function(t){return Ue(t).fromEntrySeq()})},sort:function(t,e){return this.sortBy(w,t,e)},sortBy:function(t,e){e=e||x;var n=this;return Ue(this.entrySeq().entrySeq().toArray().sort(function(r,i){return e(t(r[1][1],r[1][0],n),t(i[1][1],i[1][0],n))||r[0]-i[0]})).fromEntrySeq().valueSeq().fromEntrySeq()},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(A(this.length),this._cache=this.entrySeq().toArray(),null==this.length&&(this.length=this._cache.length)),this},__iterate:function(t,e,n){if(!this._cache)return this.__iterateUncached(t,e,n);var r=this.length-1,i=this._cache,u=this;if(e)for(var s=i.length-1;s>=0;s--){var a=i[s];if(t(a[1],n?a[0]:r-a[0],u)===!1)break}else i.every(n?function(e){return t(e[1],r-e[0],u)!==!1}:function(e){return t(e[1],e[0],u)!==!1});return this.length},__makeSequence:function(){return v()}},{from:function(t){if(t instanceof Ue)return t;if(!Array.isArray(t)){if(t&&t.constructor===Object)return new Ve(t);t=[t]}return new Ke(t)}});var ze=Re.prototype;ze.toJSON=ze.toJS,ze.__toJS=ze.toObject,ze.inspect=ze.toSource=function(){return""+this};var Je=function(){ye.defaultSuperCall(this,Be.prototype,arguments)},Be=Je;ye.createClass(Je,{toString:function(){return this.__toString("Seq [","]")},toArray:function(){A(this.length);var t=Array(this.length||0);return t.length=this.forEach(function(e,n){t[n]=e}),t},fromEntrySeq:function(){var t=this,e=v();return e.length=t.length,e.entrySeq=function(){return t},e.__iterateUncached=function(e,n,r){return t.__iterate(function(t,n,r){return e(t[1],t[0],r)
},n,r)},e},join:function(t){t=t||",";var e="",n=0;return this.forEach(function(r,i){var u=i-n;n=i,e+=(1===u?t:O(t,u))+r}),this.length&&this.length-1>n&&(e+=O(t,this.length-1-n)),e},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var n=[this].concat(t).map(function(t){return Re(t)}),r=this.__makeSequence();return r.length=n.reduce(function(t,e){return null!=t&&null!=e.length?t+e.length:void 0},0),r.__iterateUncached=function(t,e,r){if(r&&!this.length)return this.cacheResult().__iterate(t,e,r);for(var i,u=0,s=r&&this.length-1,a=n.length-1,o=0;a>=o&&!i;o++){var h=n[e?a-o:o];h instanceof Be||(h=h.valueSeq()),u+=h.__iterate(function(e,n,a){return n+=u,t(e,r?s-n:n,a)===!1?(i=!0,!1):void 0},e)}return u},r},reverse:function(t){var e=this,n=e.__makeSequence();return n.length=e.length,n.__reversedIndices=!!(t^e.__reversedIndices),n.__iterateUncached=function(n,r,i){return e.__iterate(n,!r,i^t)},n.reverse=function(n){return t===n?e:Le.reverse.call(this,n)},n},valueSeq:function(){var t=ye.superCall(this,Be.prototype,"valueSeq",[]);return t.length=void 0,t},filter:function(t,e,n){var r=M(this,t,e,n,n);return n&&(r.length=this.length),r},indexOf:function(t){return this.findIndex(function(e){return W(e,t)})},lastIndexOf:function(t){return this.reverse(!0).indexOf(t)},findIndex:function(t,e){var n=this.findKey(t,e);return null==n?-1:n},findLastIndex:function(t,e){return this.reverse(!0).findIndex(t,e)},slice:function(t,e,n){var r=this;if(m(t,e,r.length))return r;var i=r.__makeSequence(),u=y(t,r.length),s=d(e,r.length);return i.length=r.length&&(n?r.length:s-u),i.__reversedIndices=r.__reversedIndices,i.__iterateUncached=function(i,a,o){if(a)return this.cacheResult().__iterate(i,a,o);var h=this.__reversedIndices^o;if(u!==u||s!==s||h&&null==r.length){var c=r.count();u=y(t,c),s=d(e,c)}var f=h?r.length-s:u,l=h?r.length-u:s,_=r.__iterate(function(t,e,r){return h?null!=l&&e>=l||e>=f&&i(t,n?e:e-f,r)!==!1:f>e||(null==l||l>e)&&i(t,n?e:e-f,r)!==!1},a,o);return null!=this.length?this.length:n?_:Math.max(0,_-f)},i},splice:function(t,e){for(var n=[],r=2;arguments.length>r;r++)n[r-2]=arguments[r];
return 0===e&&0===n.length?this:this.slice(0,t).concat(n,this.slice(t+e))},takeWhile:function(t,e,n){var r=this,i=r.__makeSequence();return i.__iterateUncached=function(u,s,a){if(s)return this.cacheResult().__iterate(u,s,a);var o=0,h=!0,c=r.__iterate(function(n,r,i){return t.call(e,n,r,i)&&u(n,r,i)!==!1?void(o=r):(h=!1,!1)},s,a);return n?i.length:h?c:o+1},n&&(i.length=this.length),i},skipWhile:function(t,e,n){var r=this,i=r.__makeSequence();return n&&(i.length=this.length),i.__iterateUncached=function(i,u,s){if(u)return this.cacheResult().__iterate(i,u,s);var a=r.__reversedIndices^s,o=!0,h=0,c=r.__iterate(function(r,u,a){return o&&(o=t.call(e,r,u,a),o||(h=u)),o||i(r,s||n?u:u-h,a)!==!1},u,s);return n?c:a?h+1:c-h},i},groupBy:function(t,e,n){var r=this,i=wn.empty().withMutations(function(e){r.forEach(function(i,u,s){var a=t(i,u,s),o=e.get(a,Ie);o===Ie&&(o=Array(n?r.length:0),e.set(a,o)),n?o[u]=i:o.push(i)})});return i.map(function(t){return Re(t)})},sortBy:function(t,e,n){var r=ye.superCall(this,Be.prototype,"sortBy",[t,e]);return n||(r=r.valueSeq()),r.length=this.length,r},__makeSequence:function(){return g(this)}},{},Re);var Le=Je.prototype;Le.__toJS=Le.toArray,Le.__toStringMapper=q;var Ve=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};ye.createClass(Ve,{toObject:function(){return this._object},get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,u=0;i>=u;u++){var s=e?i-u:u;if(t(n[r[s]],r[s],n)===!1)break}return u}},{},Re);var Ke=function(t){this._array=t,this.length=t.length};ye.createClass(Ke,{toArray:function(){return this._array},__iterate:function(t,e,n){var r=this._array,i=r.length-1,u=-1;if(e){for(var s=i;s>=0;s--){if(r.hasOwnProperty(s)&&t(r[s],n?s:i-s,r)===!1)return u+1;u=s}return r.length}var a=r.every(function(e,s){return t(e,n?i-s:s,r)===!1?!1:(u=s,!0)});return a?r.length:u+1}},{},Je),Ke.prototype.get=Ve.prototype.get,Ke.prototype.has=Ve.prototype.has;
var Ne=function(){};ye.createClass(Ne,{toString:function(){return"[Iterator]"}},{});var Fe=Ne.prototype;Fe[qe]=k,Fe.inspect=Fe.toSource=function(){return""+this};var Ge=function(t,e,n,r){r=r?r:t.getIn(e),this.length=r instanceof Re?r.length:null,this._rootData=t,this._keyPath=e,this._onChange=n};ye.createClass(Ge,{deref:function(t){return this._rootData.getIn(this._keyPath,t)},get:function(t,e){if(Array.isArray(t)&&0===t.length)return this;var n=this._rootData.getIn(this._keyPath.concat(t),Ie);return n===Ie?e:E(this,t,n)},set:function(t,e){return P(this,function(n){return n.set(t,e)},t)},remove:function(t){return P(this,function(e){return e.remove(t)},t)},clear:function(){return P(this,function(t){return t.clear()})},update:function(t,e,n){return 1===arguments.length?P(this,t):P(this,function(r){return r.update(t,e,n)},t)},cursor:function(t){return Array.isArray(t)&&0===t.length?this:j(this,t)},__iterate:function(t,e,n){var r=this,i=r.deref();return i&&i.__iterate?i.__iterate(function(e,n,i){return t(E(r,n,e),n,i)},e,n):0}},{},Re),Ge.prototype[De]=Ge.prototype.remove,Ge.prototype.getIn=Ge.prototype.get;var He=function(t){var e=Qe.empty();return t?t.constructor===Qe?t:e.merge(t):e},Qe=He;ye.createClass(He,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,c(t),t,e):e},set:function(t,e){return J(this,t,e)},remove:function(t){return J(this,t,Ie)},update:function(t,e,n){return 1===arguments.length?this.updateIn([],null,t):this.updateIn([t],e,n)},updateIn:function(t,e,n){var r;return n||(r=[e,n],n=r[0],e=r[1],r),Q(this,t,e,n,0)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Qe.empty()},merge:function(){return F(this,null,arguments)},mergeWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return F(this,t,e)},mergeDeep:function(){return F(this,G(null),arguments)},mergeDeepWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return F(this,G(t),e)
},cursor:function(t,e){return e||"function"!=typeof t?0===arguments.length?t=[]:Array.isArray(t)||(t=[t]):(e=t,t=[]),new Ge(this,t,e)},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new u)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},keys:function(){return new un(this,0)},values:function(){return new un(this,1)},entries:function(){return new un(this,2)},__iterator:function(t){return new un(this,2,t)},__iterate:function(t,e){var n=this;if(!n._root)return 0;var r=0;return this._root.iterate(function(e){return t(e[1],e[0],n)===!1?!1:void r++},e),r},__deepEqual:function(t){var e=this;return t.every(function(t,n){return W(e.get(n,Ie),t)})},__ensureOwner:function(t){return t===this.__ownerID?this:t?z(this.length,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{empty:function(){return sn||(sn=z(0))}},Re);var Te=He.prototype;Te[De]=Te.remove,Te[qe]=function(){return this.entries()},He.from=He;var Xe=function(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n},Ye=Xe;ye.createClass(Xe,{get:function(t,e,n,r){var i=1<<(e>>>t&Se),u=this.bitmap;return 0===(u&i)?r:this.nodes[T(u&i-1)].get(t+de,e,n,r)},update:function(t,e,n,r,i,u,s){var a=n>>>e&Se,o=1<<a,h=this.bitmap,c=0!==(h&o);if(!c&&i===Ie)return this;var f=T(h&o-1),l=this.nodes,_=c?l[f]:null,v=B(_,t,e+de,n,r,i,u,s);if(v===_)return this;if(!c&&v&&l.length>=an)return N(t,l,h,a,v);if(c&&!v&&2===l.length&&L(l[1^f]))return l[1^f];if(c&&v&&1===l.length&&L(v))return v;var g=t&&t===this.ownerID,p=c?v?h:h^o:h|o,m=c?v?X(l,f,v,g):Z(l,f,g):Y(l,f,v,g);return g?(this.bitmap=p,this.nodes=m,this):new Ye(t,p,m)},iterate:function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++)if(n[e?i-r:r].iterate(t,e)===!1)return!1}},{});var Ze=function(t,e,n){this.ownerID=t,this.count=e,this.nodes=n},$e=Ze;ye.createClass(Ze,{get:function(t,e,n,r){var i=e>>>t&Se,u=this.nodes[i];return u?u.get(t+de,e,n,r):r
},update:function(t,e,n,r,i,u,s){var a=n>>>e&Se,o=i===Ie,h=this.nodes,c=h[a];if(o&&!c)return this;var f=B(c,t,e+de,n,r,i,u,s);if(f===c)return this;var l=this.count;if(c){if(!f&&(l--,on>l))return K(t,h,l,a)}else l++;var _=t&&t===this.ownerID,v=X(h,a,f,_);return _?(this.count=l,this.nodes=v,this):new $e(t,l,v)},iterate:function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var u=n[e?i-r:r];if(u&&u.iterate(t,e)===!1)return!1}}},{});var tn=function(t,e,n){this.ownerID=t,this.hash=e,this.entries=n},en=tn;ye.createClass(tn,{get:function(t,e,n,r){for(var i=this.entries,u=0,s=i.length;s>u;u++)if(W(n,i[u][0]))return i[u][1];return r},update:function(t,e,n,r,u,a,o){var h=u===Ie;if(n!==this.hash)return h?this:(i(o),i(a),V(this,t,e,n,[r,u]));for(var c=this.entries,f=0,l=c.length;l>f&&!W(r,c[f][0]);f++);var _=l>f;if(h&&!_)return this;if(i(o),(h||!_)&&i(a),h&&2===l)return new nn(t,this.hash,c[1^f]);var v=t&&t===this.ownerID,g=v?c:s(c);return _?h?f===l-1?g.pop():g[f]=g.pop():g[f]=[r,u]:g.push([r,u]),v?(this.entries=g,this):new en(t,this.hash,g)},iterate:function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1}},{});var nn=function(t,e,n){this.ownerID=t,this.hash=e,this.entry=n},rn=nn;ye.createClass(nn,{get:function(t,e,n,r){return W(n,this.entry[0])?this.entry[1]:r},update:function(t,e,n,r,u,s,a){var o=u===Ie,h=W(r,this.entry[0]);return(h?u===this.entry[1]:o)?this:(i(a),o?(i(s),null):h?t&&t===this.ownerID?(this.entry[1]=u,this):new rn(t,n,[r,u]):(i(s),V(this,t,e,n,[r,u])))},iterate:function(t){return t(this.entry)}},{});var un=function(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&U(t._root)};ye.createClass(un,{next:function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return R(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return R(t,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var u=r.nodes[this._reverse?n-i:i];if(u){if(u.entry)return R(t,u.entry);e=this._stack=U(u,e)}continue}e=this._stack=this._stack.__prev
}return o()}},{},Ne);var sn,an=we/2,on=we/4,hn=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return cn.from(t)},cn=hn;ye.createClass(hn,{toString:function(){return this.__toString("Vector [","]")},get:function(t,e){if(t=oe(t,this._origin),t>=this._size)return e;var n=ue(this,t),r=t&Se;return n&&(void 0===e||n.array.hasOwnProperty(r))?n.array[r]:e},first:function(){return this.get(0)},last:function(){return this.get(this.length?this.length-1:0)},set:function(t,e){return ne(this,t,e)},remove:function(t){return ne(this,t,Ie)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=this._origin=this._size=0,this._level=de,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):cn.empty()},push:function(){var t=arguments,e=this.length;return this.withMutations(function(n){se(n,0,e+t.length);for(var r=0;t.length>r;r++)n.set(e+r,t[r])})},pop:function(){return se(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){se(e,-t.length);for(var n=0;t.length>n;n++)e.set(n,t[n])})},shift:function(){return se(this,1)},merge:function(){return ae(this,null,arguments)},mergeWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return ae(this,t,e)},mergeDeep:function(){return ae(this,G(null),arguments)},mergeDeepWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return ae(this,G(t),e)},setLength:function(t){return se(this,0,t)},slice:function(t,e,n){var r=ye.superCall(this,cn.prototype,"slice",[t,e,n]);if(!n&&r!==this){var i=this,u=i.length;r.toVector=function(){return se(i,0>t?Math.max(0,u+t):u?Math.min(u,t):t,null==e?u:0>e?Math.max(0,u+e):u?Math.min(u,e):e)}}return r},keys:function(t){return new vn(this,0,t)},values:function(t){return new vn(this,1,t)},entries:function(t){return new vn(this,2,t)},__iterator:function(t,e,n){return new vn(this,2,n,t,e)},__iterate:function(t,e,n){var r=this,i=0,u=r.length-1;n^=e;var s,a=function(e,s){return t(e,n?u-s:s,r)===!1?!1:(i=s,!0)},o=he(this._size);return s=e?$(this._tail,0,o-this._origin,this._size-this._origin,a,e)&&$(this._root,this._level,-this._origin,o-this._origin,a,e):$(this._root,this._level,-this._origin,o-this._origin,a,e)&&$(this._tail,0,o-this._origin,this._size-this._origin,a,e),(s?u:e?u-i:i)+1
},__deepEquals:function(t){var e=this.entries(!0);return t.every(function(t,n){var r=e.next().value;return r&&r[0]===n&&W(r[1],t)})},__ensureOwner:function(t){return t===this.__ownerID?this:t?ee(this._origin,this._size,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{empty:function(){return gn||(gn=ee(0,0,de))},from:function(t){if(!t||0===t.length)return cn.empty();if(t.constructor===cn)return t;var e=Array.isArray(t);return t.length>0&&we>t.length?ee(0,t.length,de,null,new ln(e?s(t):Re(t).toArray())):(e||(t=Re(t),t instanceof Je||(t=t.valueSeq())),cn.empty().merge(t))}},Je);var fn=hn.prototype;fn[De]=fn.remove,fn[qe]=fn.values,fn.update=Te.update,fn.updateIn=Te.updateIn,fn.cursor=Te.cursor,fn.withMutations=Te.withMutations,fn.asMutable=Te.asMutable,fn.asImmutable=Te.asImmutable,fn.wasAltered=Te.wasAltered;var ln=function(t,e){this.array=t,this.ownerID=e},_n=ln;ye.createClass(ln,{removeBefore:function(t,e,n){if(n===e?1<<e:0||0===this.array.length)return this;var r=n>>>e&Se;if(r>=this.array.length)return new _n([],t);var i,u=0===r;if(e>0){var s=this.array[r];if(i=s&&s.removeBefore(t,e-de,n),i===s&&u)return this}if(u&&!i)return this;var a=ie(this,t);if(!u)for(var o=0;r>o;o++)delete a.array[o];return i&&(a.array[r]=i),a},removeAfter:function(t,e,n){if(n===e?1<<e:0||0===this.array.length)return this;var r=n-1>>>e&Se;if(r>=this.array.length)return this;var i,u=r===this.array.length-1;if(e>0){var s=this.array[r];if(i=s&&s.removeAfter(t,e-de,n),i===s&&u)return this}if(u&&!i)return this;var a=ie(this,t);return u||(a.array.length=r+1),i&&(a.array[r]=i),a}},{});var vn=function(t,e,n,r,i){this._type=e,this._sparse=!!n,this._reverse=!!r,this._flipIndices=!!(i^r),this._maxIndex=t.length-1;var u=he(t._size),s=te(t._root&&t._root.array,t._level,-t._origin,u-t._origin-1),a=te(t._tail&&t._tail.array,0,u-t._origin,t._size-t._origin-1);this._stack=r?a:s,this._stack.__prev=r?s:a};ye.createClass(vn,{next:function(){for(var t=this._sparse,e=this._stack;e;){var n=e.array,r=e.index++;if(this._reverse&&(r=Se-r,r>e.rawMax&&(r=e.rawMax,e.index=we-r)),r>=0&&we>r&&e.rawMax>=r){var i=n&&n[r];
if(0===e.level){if(!t||null!=i||n&&n.length>r&&n.hasOwnProperty(r)){var u,s=this._type;return 1!==s&&(u=e.offset+(r<<e.level),this._flipIndices&&(u=this._maxIndex-u)),a(0===s?u:1===s?i:[u,i])}}else t&&null==i||(this._stack=e=te(i&&i.array,e.level-de,e.offset+(r<<e.level),e.max,e))}else e=this._stack=this._stack.__prev}return o()}},{},Ne);var gn,pn=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return mn.from(t)},mn=pn;ye.createClass(pn,{toString:function(){return this.__toString("Set {","}")},has:function(t){return this._map.has(t)},get:function(t,e){return this.has(t)?t:e},add:function(t){var e=this._map.set(t,null);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:ce(e)},remove:function(t){var e=this._map.remove(t);return this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:0===e.length?mn.empty():ce(e)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this):mn.empty()},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var n=0;t.length>n;n++)Re(t[n]).forEach(function(t){return e.add(t)})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return Re(t)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(t){return t.contains(n)})||e.remove(n)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return Re(t)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(t){return t.contains(n)})&&e.remove(n)})})},isSubset:function(t){return t=Re(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){var e=this;return t=Re(t),t.every(function(t){return e.contains(t)})},wasAltered:function(){return this._map.wasAltered()},values:function(){return this._map.keys()},entries:function(){return C(this.values(),function(t){return[t,t]
})},hashCode:function(){return this._map.hashCode()},equals:function(t){return this._map.equals(t._map)},__iterate:function(t,e){var n=this;return this._map.__iterate(function(e,r){return t(r,r,n)},e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?ce(e,t):(this.__ownerID=t,this._map=e,this)}},{empty:function(){return dn||(dn=ce(He.empty()))},from:function(t){var e=mn.empty();return t?t.constructor===mn?t:e.union(t):e},fromKeys:function(t){return mn.from(Re(t).flip())}},Re);var yn=pn.prototype;yn[De]=yn.remove,yn[qe]=yn.keys=yn.values,yn.contains=yn.has,yn.mergeDeep=yn.merge=yn.union,yn.mergeDeepWith=yn.mergeWith=function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.merge.apply(this,t)},yn.withMutations=Te.withMutations,yn.asMutable=Te.asMutable,yn.asImmutable=Te.asImmutable,yn.__toJS=Le.__toJS,yn.__toStringMapper=Le.__toStringMapper;var dn,wn=function(t){var e=Sn.empty();return t?t.constructor===Sn?t:e.merge(t):e},Sn=wn;ye.createClass(wn,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var n=this._map.get(t);return null!=n?this._vector.get(n)[1]:e},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this._vector.clear(),this):Sn.empty()},set:function(t,e){return le(this,t,e)},remove:function(t){return le(this,t,Ie)},wasAltered:function(){return this._map.wasAltered()||this._vector.wasAltered()},keys:function(){return C(this.entries(),function(t){return t[0]})},values:function(){return C(this.entries(),function(t){return t[1]})},entries:function(){return this._vector.values(!0)},__iterate:function(t,e){return this._vector.fromEntrySeq().__iterate(t,e)},__deepEqual:function(t){var e=this.entries();return t.every(function(t,n){var r=e.next().value;return r&&W(r[0],n)&&W(r[1],t)})},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._vector.__ensureOwner(t);return t?fe(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._vector=n,this)
}},{empty:function(){return In||(In=fe(He.empty(),hn.empty()))}},He),wn.from=wn,wn.prototype[De]=wn.prototype.remove;var In,kn=function(t,e){var n=function(t){this._map=He(t)};t=Re(t);var r=n.prototype=Object.create(Mn);r.constructor=n,r._name=e,r._defaultValues=t;var i=Object.keys(t);return n.prototype.length=i.length,Object.defineProperty&&t.forEach(function(t,e){Object.defineProperty(n.prototype,e,{get:function(){return this.get(e)},set:function(t){h(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}),n},bn=kn;ye.createClass(kn,{toString:function(){return this.__toString((this._name||"Record")+" {","}")},has:function(t){return this._defaultValues.has(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues.get(t)):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;Object.getPrototypeOf(this).constructor;return bn._empty||(bn._empty=_e(this,He.empty()))},set:function(t,e){if(null==t||!this.has(t))return this;var n=this._map.set(t,e);return this.__ownerID||n===this._map?this:_e(this,n)},remove:function(t){if(null==t||!this.has(t))return this;var e=this._map.remove(t);return this.__ownerID||e===this._map?this:_e(this,e)},keys:function(){return this._map.keys()},values:function(){return this._map.values()},entries:function(){return this._map.entries()},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var n=this;return this._defaultValues.map(function(t,e){return n.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?_e(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},Re);var Mn=kn.prototype;Mn[De]=Mn.remove,Mn[qe]=Te[qe],Mn.merge=Te.merge,Mn.mergeWith=Te.mergeWith,Mn.mergeDeep=Te.mergeDeep,Mn.mergeDeepWith=Te.mergeDeepWith,Mn.update=Te.update,Mn.updateIn=Te.updateIn,Mn.cursor=Te.cursor,Mn.withMutations=Te.withMutations,Mn.asMutable=Te.asMutable,Mn.asImmutable=Te.asImmutable,Mn.__deepEqual=Te.__deepEqual;var Dn=function(t,e,n){return this instanceof qn?(h(0!==n,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&xn?xn:(n=null==n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,void(this.length=Math.max(0,Math.ceil((e-t)/n-1)+1)))):new qn(t,e,n)
},qn=Dn;ye.createClass(Dn,{toString:function(){return 0===this.length?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},has:function(t){return h(t>=0,"Index out of bounds"),this.length>t},get:function(t,e){return h(t>=0,"Index out of bounds"),1/0===this.length||this.length>t?this._start+t*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.length>e&&e===Math.floor(e)},slice:function(t,e,n){return m(t,e,this.length)?this:n?ye.superCall(this,qn.prototype,"slice",[t,e,n]):(t=y(t,this.length),e=d(e,this.length),t>=e?xn:new qn(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&this.length>n)return n}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,t)},skip:function(t,e){return e?ye.superCall(this,qn.prototype,"skip",[t]):this.slice(t)},__iterate:function(t,e,n){for(var r=e^n,i=this.length-1,u=this._step,s=e?this._start+i*u:this._start,a=0;i>=a&&t(s,r?i-a:a,this)!==!1;a++)s+=e?-u:u;return r?this.length:a},__deepEquals:function(t){return this._start===t._start&&this._end===t._end&&this._step===t._step}},{},Je);var On=Dn.prototype;On.__toJS=On.toArray,On.first=fn.first,On.last=fn.last;var xn=Dn(0,0),An=function(t,e){return 0===e&&jn?jn:this instanceof Cn?(this._value=t,void(this.length=null==e?1/0:Math.max(0,e))):new Cn(t,e)},Cn=An;ye.createClass(An,{toString:function(){return 0===this.length?"Repeat []":"Repeat [ "+this._value+" "+this.length+" times ]"},get:function(t,e){return h(t>=0,"Index out of bounds"),1/0===this.length||this.length>t?this._value:e},first:function(){return this._value},contains:function(t){return W(this._value,t)},slice:function(t,e,n){if(n)return ye.superCall(this,Cn.prototype,"slice",[t,e,n]);var r=this.length;return t=0>t?Math.max(0,r+t):Math.min(r,t),e=null==e?r:e>0?Math.min(r,e):Math.max(0,r+e),e>t?new Cn(this._value,e-t):jn},reverse:function(t){return t?ye.superCall(this,Cn.prototype,"reverse",[t]):this
},indexOf:function(t){return W(this._value,t)?0:-1},lastIndexOf:function(t){return W(this._value,t)?this.length:-1},__iterate:function(t,e,n){var r=e^n;h(!r||1/0>this.length,"Cannot access end of infinite range.");for(var i=this.length-1,u=0;i>=u&&t(this._value,r?i-u:u,this)!==!1;u++);return r?this.length:u},__deepEquals:function(t){return W(this._value,t._value)}},{},Je);var En=An.prototype;En.last=En.first,En.has=On.has,En.take=On.take,En.skip=On.skip,En.__toJS=On.__toJS;var jn=new An(void 0,0),Pn={Sequence:Re,Map:He,Vector:hn,Set:pn,OrderedMap:wn,Record:kn,Range:Dn,Repeat:An,is:W,fromJS:ve};return Pn}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
{
"name": "immutable",
"version": "2.0.15",
"version": "2.0.16",
"description": "Immutable Data Collections",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/facebook/immutable-js",

@@ -50,3 +50,3 @@ Immutable Data Collections

```javascript
require(['./Immutable'], function (Immutable) {
require(['./Immutable.min.js'], function (Immutable) {
var map = Immutable.Map({a:1, b:2, c:3});

@@ -308,3 +308,3 @@ map = map.set('b', 20);

var data = Immutable.fromJS({ a: { b: { c: 1 } } });
var cursor = data.cursor(['a', 'b', 'c'], (newData) => {
var cursor = data.cursor(['a', 'b', 'c'], newData => {
data = newData;

@@ -311,0 +311,0 @@ });

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc