immutable
Advanced tools
Comparing version 2.0.17 to 2.1.0
@@ -274,3 +274,3 @@ /** | ||
/** | ||
* Returns a new indexed sequence of the keys of this sequence, | ||
* Returns a new indexed sequence of the values of this sequence, | ||
* discarding keys. | ||
@@ -300,2 +300,7 @@ */ | ||
* in the sequence and passing along the reduced value. | ||
* | ||
* If `initialReduction` is not provided, or is null, the first item in the | ||
* sequence will be used. | ||
* | ||
* @see `Array.prototype.reduce`. | ||
*/ | ||
@@ -316,3 +321,3 @@ reduce<R>( | ||
reducer: (reduction?: R, value?: V, key?: K, seq?: Sequence<K, V>) => R, | ||
initialReduction: R, | ||
initialReduction?: R, | ||
thisArg?: any | ||
@@ -667,2 +672,5 @@ ): R; | ||
* | ||
* `index` may be a negative number, which indexes back from the end of the | ||
* Sequence. `s.splice(-2)` splices after the second to last item. | ||
* | ||
* Sequence(['a','b','c','d']).splice(1, 2, 'q', 'r', 's') | ||
@@ -689,2 +697,11 @@ * // ['a', 'q', 'r', 's', 'd'] | ||
/** | ||
* Returns the value associated with the provided index, or notSetValue if | ||
* the index is beyond the bounds of the sequence. | ||
* | ||
* `index` may be a negative number, which indexes back from the end of the | ||
* Sequence. `s.get(-1)` gets the last item in the Sequence. | ||
*/ | ||
get(index: number, notSetValue?: T): T; | ||
/** | ||
* This new behavior will iterate through the values and sequences with | ||
@@ -723,26 +740,28 @@ * increasing indices. | ||
/** | ||
* Has the same altered behavior as `takeWhile`. | ||
* @override | ||
* Flattens nested Sequences by one level. | ||
* | ||
* Note: `flatten` operates on IndexedSequence<IndexedSequence<T>> and | ||
* returns IndexedSequence<T> | ||
*/ | ||
take(amount: number, maintainIndices?: boolean): IndexedSequence<T>; | ||
flatten(): IndexedSequence<any>; | ||
/** | ||
* Has the same altered behavior as `takeWhile`. | ||
* @override | ||
* Flat-maps the Sequence. | ||
*/ | ||
takeLast(amount: number, maintainIndices?: boolean): IndexedSequence<T>; | ||
flatMap<M>( | ||
mapper: (value?: T, index?: number, seq?: IndexedSequence<T>) => IndexedSequence<M>, | ||
thisArg?: any | ||
): IndexedSequence<M>; | ||
flatMap<M>( | ||
mapper: (value?: T, index?: number, seq?: IndexedSequence<T>) => M[], | ||
thisArg?: any | ||
): IndexedSequence<M>; | ||
/** | ||
* Indexed sequences have a different `takeWhile` behavior. The first | ||
* value will have an index of 0 and the length of the sequence could be | ||
* truncated. If you want to preserve the original indicies, set | ||
* maintainIndices to true. | ||
* Has the same altered behavior as `takeWhile`. | ||
* @override | ||
*/ | ||
takeWhile( | ||
predicate: (value?: T, index?: number, seq?: IndexedSequence<T>) => boolean, | ||
thisArg?: any, | ||
maintainIndices?: boolean | ||
): IndexedSequence<T>; | ||
takeLast(amount: number, maintainIndices?: boolean): IndexedSequence<T>; | ||
@@ -1042,10 +1061,10 @@ /** | ||
* var y = Immutable.fromJS({a: { x: 2 }, b: { y: 5 }, c: { z: 3 } }); | ||
* x.deepMerge(y) // {a: { x: 2, y: 10 }, b: { x: 20, y: 5 }, c: { z: 3 } } | ||
* x.mergeDeep(y) // {a: { x: 2, y: 10 }, b: { x: 20, y: 5 }, c: { z: 3 } } | ||
* | ||
*/ | ||
deepMerge(...sequences: Sequence<K, V>[]): Map<K, V>; | ||
deepMerge(...sequences: {[key: string]: V}[]): Map<string, V>; | ||
mergeDeep(...sequences: Sequence<K, V>[]): Map<K, V>; | ||
mergeDeep(...sequences: {[key: string]: V}[]): Map<string, V>; | ||
/** | ||
* Like `deepMerge()`, but when two non-Sequences conflict, it uses the | ||
* Like `mergeDeep()`, but when two non-Sequences conflict, it uses the | ||
* `merger` function to determine the resulting value. | ||
@@ -1055,11 +1074,11 @@ * | ||
* var y = Immutable.fromJS({a: { x: 2 }, b: { y: 5 }, c: { z: 3 } }); | ||
* x.deepMergeWith((prev, next) => prev / next, y) | ||
* x.mergeDeepWith((prev, next) => prev / next, y) | ||
* // {a: { x: 5, y: 10 }, b: { x: 20, y: 10 }, c: { z: 3 } } | ||
* | ||
*/ | ||
deepMergeWith( | ||
mergeDeepWith( | ||
merger: (previous?: V, next?: V) => V, | ||
...sequences: Sequence<K, V>[] | ||
): Map<K, V>; | ||
deepMergeWith( | ||
mergeDeepWith( | ||
merger: (previous?: V, next?: V) => V, | ||
@@ -1388,2 +1407,5 @@ ...sequences: {[key: string]: V}[] | ||
* exists in this Vector, it will be replaced. | ||
* | ||
* `index` may be a negative number, which indexes back from the end of the | ||
* Vector. `v.set(-1, "value")` sets the last item in the Vector. | ||
*/ | ||
@@ -1396,2 +1418,5 @@ set(index: number, value: T): Vector<T>; | ||
* | ||
* `index` may be a negative number, which indexes back from the end of the | ||
* Vector. `v.delete(-1)` deletes the last item in the Vector. | ||
* | ||
* Note: `delete` cannot be safely used in IE8 | ||
@@ -1479,2 +1504,5 @@ * @alias delete | ||
* | ||
* `index` may be a negative number, which indexes back from the end of the | ||
* Vector. `v.update(-1)` updates the last item in the Vector. | ||
* | ||
* @see Map.update | ||
@@ -1518,15 +1546,15 @@ */ | ||
/** | ||
* @see `Map.prototype.deepMerge` | ||
* @see `Map.prototype.mergeDeep` | ||
*/ | ||
deepMerge(...sequences: IndexedSequence<T>[]): Vector<T>; | ||
deepMerge(...sequences: Array<T>[]): Vector<T>; | ||
mergeDeep(...sequences: IndexedSequence<T>[]): Vector<T>; | ||
mergeDeep(...sequences: Array<T>[]): Vector<T>; | ||
/** | ||
* @see `Map.prototype.deepMergeWith` | ||
* @see `Map.prototype.mergeDeepWith` | ||
*/ | ||
deepMergeWith( | ||
mergeDeepWith( | ||
merger: (previous?: T, next?: T) => T, | ||
...sequences: IndexedSequence<T>[] | ||
): Vector<T>; | ||
deepMergeWith( | ||
mergeDeepWith( | ||
merger: (previous?: T, next?: T) => T, | ||
@@ -1533,0 +1561,0 @@ ...sequences: Array<T>[] |
@@ -9,21 +9,21 @@ /** | ||
*/ | ||
function t(){function t(t,e,n,r){var i;if(r){var u=r.prototype;i=de.create(u)}else i=t.prototype;return de.keys(e).forEach(function(t){i[t]=e[t]}),de.keys(n).forEach(function(e){t[e]=n[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,n,r){return de.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,e){e=e||0;for(var n=Math.max(0,t.length-e),r=Array(n),i=0;n>i;i++)r[i]=t[i+e];return r}function a(t){return De.value=t,De.done=!1,De}function o(){return De.value=void 0,De.done=!0,De}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&xe;t=""+t,e="string"}return"string"===e?t.length>je?f(t):l(t):t.hashCode?c("function"==typeof t.hashCode?t.hashCode():t.hashCode):_(t)}function f(t){var e=Pe[t];return null==e&&(e=l(t),Ue===Re&&(Ue=0,Pe={}),Ue++,Pe[t]=e),e}function l(t){for(var e=0,n=0;t.length>n;n++)e=31*e+t.charCodeAt(n)&xe;return e}function _(t){if(t[Ce])return t[Ce];var e=++Ae&xe;if(!Ee)try{return Object.defineProperty(t,Ce,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}catch(n){Ee=!0}return t[Ce]=e,e}function v(){return Object.create(Je)}function g(t){var e=Object.create(Ve);return e.__reversedIndices=t?t.__reversedIndices:!1,e}function p(t,e,n,r){var i=t.get?t.get(e[r],ke):ke;return i===ke?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 d(t,e){return w(t,e,0)}function y(t,e){return w(t,e,e)}function w(t,e,n){return null==t?n:0>t?Math.max(0,e+t):e?Math.min(e,t):t}function S(t){return t}function I(t,e){return[e,t]}function k(){return!0}function b(){return this}function M(t){return(t||0)+1}function D(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 q(t){return function(){return!t.apply(this,arguments) | ||
}}function O(t){return"string"==typeof t?JSON.stringify(t):t}function x(t,e){for(var n="";e;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n}function A(t,e){return t>e?1:e>t?-1:0}function C(t){h(1/0!==t,"Cannot perform this action with an infinite sequence.")}function E(t,e){var n=new Fe;return n.next=function(){var n=t.next();return n.done?n:(n.value=e(n.value),n)},n}function j(t,e,n){return n instanceof We?R(t,e,n):n}function R(t,e,n){return new He(t._rootData,t._keyPath.concat(e),t._onChange,n)}function U(t,e,n){var r=t._rootData.updateIn(t._keyPath,n?Qe.empty():void 0,e),i=t._keyPath||[];return t._onChange&&t._onChange.call(void 0,r,t._rootData,n?i.concat(n):i),new He(r,t._keyPath,t._onChange)}function P(t,e){return t instanceof He&&(t=t.deref()),e instanceof He&&(e=e.deref()),t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t instanceof We?t.equals(e):!1}function W(t,e){return a(0===t||1===t?e[t]:[e[0],e[1]])}function z(t,e){return{node:t,index:0,__prev:e}}function J(t,e,n,r){var i=Object.create(Xe);return i.length=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function B(t,e,n){var i=r(be),u=r(Me),s=L(t._root,t.__ownerID,0,c(e),e,n,i,u);if(!u.value)return t;var a=t.length+(i.value?n===ke?-1:1:0);return t.__ownerID?(t.length=a,t._root=s,t.__hash=void 0,t.__altered=!0,t):s?J(a,s):Qe.empty()}function L(t,e,n,r,u,s,a,o){return t?t.update(e,n,r,u,s,a,o):s===ke?t:(i(o),i(a),new rn(e,r,[u,s]))}function V(t){return t.constructor===rn||t.constructor===en}function K(t,e,n,r,i){if(t.hash===r)return new en(e,r,[t.entry,i]);var u,s=t.hash>>>n&Ie,a=r>>>n&Ie,o=s===a?[K(t,e,n+we,r,i)]:(u=new rn(e,r,i),a>s?[t,u]:[u,t]);return new Ye(e,1<<s|1<<a,o)}function N(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 Ye(t,i,s)}function F(t,e,n,r,i){for(var u=0,s=Array(Se),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[u++]:null;return s[r]=i,new $e(t,u+1,s)}function G(t,e,n){for(var r=[],i=0;n.length>i;i++){var u=n[i];u&&r.push(Array.isArray(u)?We(u).fromEntrySeq():We(u))}return Q(t,e,r) | ||
}function H(t){return function(e,n){return e&&e.mergeDeepWith?e.mergeDeepWith(t,n):t?t(e,n):n}}function Q(t,e,n){return 0===n.length?t:t.withMutations(function(t){for(var r=e?function(n,r){var i=t.get(r,ke);t.set(r,i===ke?n:e(i,n))}:function(e,n){t.set(n,e)},i=0;n.length>i;i++)n[i].forEach(r)})}function T(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:Qe.empty(),a=e[i],o=t.get(a,s),c=T(o,e,n,r,i+1);return c===o?t:t.set(a,c)}function X(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 Y(t,e,n,r){var i=r?t:s(t);return i[e]=n,i}function Z(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 $(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 te(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-we;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&&!te(g,l,v,r,i,u))return!1}}}}return!0}function ee(t,e,n,r,i){return{array:t,level:e,offset:n,max:r,rawMax:r-n>>e,index:0,__prev:i}}function ne(t,e,n,r,i,u,s){var a=Object.create(ln);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 re(t,e,n){if(e>=t.length)return n===ke?t:t.withMutations(function(t){ae(t,0,e+1).set(e,n)});e=he(e,t._origin);var i=t._tail,u=t._root,s=r(Me);return e>=ce(t._size)?i=ie(i,t.__ownerID,0,e,n,s):u=ie(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):ne(t._origin,t._size,t._level,u,i):t}function ie(t,e,n,r,u,s){var a,o=u===ke,h=r>>>n&Ie,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=ie(f,e,n-we,r,u,s);return l===f?t:(a=ue(t,e),a.array[h]=l,a) | ||
}return!o&&c&&t.array[h]===u?t:(i(s),a=ue(t,e),o?delete a.array[h]:a.array[h]=u,a)}function ue(t,e){return e&&t&&e===t.ownerID?t:new _n(t?t.array.slice():[],e)}function se(t,e){if(e>=ce(t._size))return t._tail;if(1<<t._level+we>e){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&Ie],r-=we;return n}}function ae(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 _n(c&&c.array.length?[null,c]:[],r),h+=we,f+=1<<h;f&&(a+=f,i+=f,o+=f,s+=f);for(var l=ce(s),_=ce(o);_>=1<<h+we;)c=new _n(c&&c.array.length?[c]:[],r),h+=we;var v=t._tail,g=l>_?se(t,o-1):_>l?new _n([],r):v;if(v&&_>l&&s>a&&v.array.length){c=ue(c,r);for(var p=c,m=h;m>we;m-=we){var d=l>>>m&Ie;p=p.array[d]=ue(p.array[d],r)}p.array[l>>>we&Ie]=v}if(s>o&&(g=g&&g.removeAfter(r,0,o)),a>=_)a-=_,o-=_,h=we,c=null,g=g&&g.removeBefore(r,0,a);else if(a>i||l>_){var y,w;f=0;do y=a>>>h&Ie,w=_-1>>>h&Ie,y===w&&(y&&(f+=(1<<h)*y),h-=we,c=c&&c.array[y]);while(c&&y===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):ne(a,o,h,c,g)}function oe(t,e,n){for(var r=[],i=0;n.length>i;i++){var u=n[i];u&&r.push(We(u))}var s=Math.max.apply(null,r.map(function(t){return t.length||0}));return s>t.length&&(t=t.setLength(s)),Q(t,e,r)}function he(t,e){return h(t>=0,"Index out of bounds"),t+e}function ce(t){return Se>t?0:t-1>>>we<<we}function fe(t,e){var n=Object.create(yn);return n.length=t?t.length:0,n._map=t,n.__ownerID=e,n}function le(t,e,n,r){var i=Object.create(Sn.prototype);return i.length=t?t.length:0,i._map=t,i._vector=e,i.__ownerID=n,i.__hash=r,i}function _e(t,e,n){var r=t._map,i=t._vector,u=r.get(e),s=void 0!==u,a=n===ke;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):le(o,h) | ||
}function ve(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function ge(t,e){return e?pe(e,t,"",{"":t}):me(t)}function pe(t,e,n,r){return e&&(Array.isArray(e)||e.constructor===Object)?t.call(r,n,We(e).map(function(n,r){return pe(t,n,r,e)})):e}function me(t){if(t){if(Array.isArray(t))return We(t).map(me).toVector();if(t.constructor===Object)return We(t).map(me).toMap()}return t}var de=Object,ye={};ye.createClass=t,ye.superCall=e,ye.defaultSuperCall=n;var we=5,Se=1<<we,Ie=Se-1,ke={},be={value:!1},Me={value:!1},De={value:void 0,done:!1},qe="delete",Oe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",xe=2147483647,Ae=0,Ce="__immutablehash__";"undefined"!=typeof Symbol&&(Ce=Symbol(Ce));var Ee=!1,je=16,Re=255,Ue=0,Pe={},We=function(t){return ze.from(1===arguments.length?t:Array.prototype.slice.call(arguments))},ze=We;ye.createClass(We,{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+": "+O(t)},toJS:function(){return this.map(function(t){return t instanceof ze?t.toJS():t}).__toJS()},toArray:function(){C(this.length);var t=Array(this.length||0);return this.valueSeq().forEach(function(e,n){t[n]=e}),t},toObject:function(){C(this.length);var t={};return this.forEach(function(e,n){t[n]=e}),t},toVector:function(){return C(this.length),cn.from(this)},toMap:function(){return C(this.length),Qe.from(this)},toOrderedMap:function(){return C(this.length),Sn.from(this)},toSet:function(){return C(this.length),mn.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)))&xe},0))},equals:function(t){if(this===t)return!0;if(!(t instanceof ze))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 P(r,i[0])&&P(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(k)),this.length)},countBy:function(t){var e=this;return Sn.empty().withMutations(function(n){e.forEach(function(e,r,i){n.update(t(e,r,i),M)})})},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var n=[this].concat(t.map(function(t){return ze(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=b,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 ze(t._cache);var e=t.map(I).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(q(t),e)},first:function(){return this.find(k)},last:function(){return this.findLast(k)},rest:function(){return this.slice(1)},butLast:function(){return this.slice(0,-1) | ||
},has:function(t){return this.get(t,ke)!==ke},get:function(t,e){return this.find(function(e,n){return P(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 P(e,t)},null,ke)!==ke},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 D(this,t,e,!0,!1)},slice:function(t,e){if(m(t,e,this.length))return this;var n=d(t,this.length),r=y(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=this;if(t>e.length)return e;var n=e.__makeSequence();return n.__iterateUncached=function(n,r,i){if(r)return this.cacheResult().__iterate(n,r,i);var u=0;return e.__iterate(function(e,r,i){return t>u&&n(e,r,i)!==!1?void u++:!1},r,i),u},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(q(t),e,n)},skip:function(t){var e=this;if(0===t)return e;var n=e.__makeSequence();return n.__iterateUncached=function(n,r,i){if(r)return this.cacheResult().__iterate(n,r,i);var u=!0,s=0,a=0;return e.__iterate(function(e,r,i){if(!u||!(u=a++<t)){if(n(e,r,i)===!1)return!1;s++}},r,i),s},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 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(q(t),e,n)},groupBy:function(t){var e=this,n=Sn.empty().withMutations(function(n){e.forEach(function(e,r,i){var u=t(e,r,i),s=n.get(u,ke);s===ke&&(s=[],n.set(u,s)),s.push([r,e])})});return n.map(function(t){return ze(t).fromEntrySeq()})},sort:function(t,e){return this.sortBy(S,t,e)},sortBy:function(t,e){e=e||A;var n=this;return ze(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&&(C(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 ze)return t;if(!Array.isArray(t)){if(t&&t.constructor===Object)return new Ke(t);t=[t]}return new Ne(t)}});var Je=We.prototype;Je.toJSON=Je.toJS,Je.__toJS=Je.toObject,Je.inspect=Je.toSource=function(){return""+this | ||
};var Be=function(){ye.defaultSuperCall(this,Le.prototype,arguments)},Le=Be;ye.createClass(Be,{toString:function(){return this.__toString("Seq [","]")},toArray:function(){C(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:x(t,u))+r}),this.length&&this.length-1>n&&(e+=x(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 We(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 Le||(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:Ve.reverse.call(this,n)},n},valueSeq:function(){var t=ye.superCall(this,Le.prototype,"valueSeq",[]);return t.length=void 0,t},filter:function(t,e,n){var r=D(this,t,e,n,n);return n&&(r.length=this.length),r},indexOf:function(t){return this.findIndex(function(e){return P(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=d(t,r.length),s=y(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=d(t,c),s=y(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){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=d(t,this.length);var r=this.slice(0,t);return 1===n?r:r.concat(s(arguments,2),this.slice(t+e))},take:function(t){var e=this;if(t>e.length)return e;var n=e.__makeSequence();return n.__iterateUncached=function(n,r,i){if(r)return this.cacheResult().__iterate(n,r,i);var u=0,s=0,a=!0,o=e.__iterate(function(e,r,i){return u++<t&&n(e,r,i)!==!1?void(s=r):(a=!1,!1)},r,i);return a?o:s+1},n.length=this.length&&Math.min(this.length,t),n},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},skip:function(t,e){var n=this;if(0===t)return n;var r=n.__makeSequence();return e&&(r.length=this.length),r.__iterateUncached=function(r,i,u){if(i)return this.cacheResult().__iterate(r,i,u);var s=n.__reversedIndices^u,a=!0,o=0,h=0,c=n.__iterate(function(n,i,s){return a&&(a=h++<t,a||(o=i)),a||r(n,u||e?i:i-o,s)!==!1},i,u);return e?c:s?o+1:c-o},r.length=this.length&&Math.max(0,this.length-t),r},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=Sn.empty().withMutations(function(e){r.forEach(function(i,u,s){var a=t(i,u,s),o=e.get(a,ke);o===ke&&(o=Array(n?r.length:0),e.set(a,o)),n?o[u]=i:o.push(i) | ||
})});return i.map(function(t){return We(t)})},sortBy:function(t,e,n){var r=ye.superCall(this,Le.prototype,"sortBy",[t,e]);return n||(r=r.valueSeq()),r.length=this.length,r},__makeSequence:function(){return g(this)}},{},We);var Ve=Be.prototype;Ve.__toJS=Ve.toArray,Ve.__toStringMapper=O;var Ke=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};ye.createClass(Ke,{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}},{},We);var Ne=function(t){this._array=t,this.length=t.length};ye.createClass(Ne,{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}},{},Be),Ne.prototype.get=Ke.prototype.get,Ne.prototype.has=Ke.prototype.has;var Fe=function(){};ye.createClass(Fe,{toString:function(){return"[Iterator]"}},{});var Ge=Fe.prototype;Ge[Oe]=b,Ge.inspect=Ge.toSource=function(){return""+this};var He=function(t,e,n,r){r=r?r:t.getIn(e),this.length=r instanceof We?r.length:null,this._rootData=t,this._keyPath=e,this._onChange=n};ye.createClass(He,{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),ke);return n===ke?e:j(this,t,n)},set:function(t,e){return U(this,function(n){return n.set(t,e)},t)},remove:function(t){return U(this,function(e){return e.remove(t)},t)},clear:function(){return U(this,function(t){return t.clear()})},update:function(t,e,n){return 1===arguments.length?U(this,t):U(this,function(r){return r.update(t,e,n)},t)},withMutations:function(t){return U(this,function(e){return(e||Qe.empty()).withMutations(t) | ||
})},cursor:function(t){return Array.isArray(t)&&0===t.length?this:R(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(j(r,n,e),n,i)},e,n):0}},{},We),He.prototype[qe]=He.prototype.remove,He.prototype.getIn=He.prototype.get;var Qe=function(t){var e=Te.empty();return t?t.constructor===Te?t:e.merge(t):e},Te=Qe;ye.createClass(Qe,{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 B(this,t,e)},remove:function(t){return B(this,t,ke)},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),T(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):Te.empty()},merge:function(){return G(this,null,arguments)},mergeWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return G(this,t,e)},mergeDeep:function(){return G(this,H(null),arguments)},mergeDeepWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return G(this,H(t),e)},cursor:function(t,e){return e||"function"!=typeof t?0===arguments.length?t=[]:Array.isArray(t)||(t=[t]):(e=t,t=[]),new He(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 sn(this,0)},values:function(){return new sn(this,1)},entries:function(){return new sn(this,2)},__iterator:function(t){return new sn(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 P(e.get(n,ke),t) | ||
})},__ensureOwner:function(t){return t===this.__ownerID?this:t?J(this.length,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{empty:function(){return an||(an=J(0))}},We);var Xe=Qe.prototype;Xe[qe]=Xe.remove,Xe[Oe]=function(){return this.entries()},Qe.from=Qe;var Ye=function(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n},Ze=Ye;ye.createClass(Ye,{get:function(t,e,n,r){var i=1<<(e>>>t&Ie),u=this.bitmap;return 0===(u&i)?r:this.nodes[X(u&i-1)].get(t+we,e,n,r)},update:function(t,e,n,r,i,u,s){var a=n>>>e&Ie,o=1<<a,h=this.bitmap,c=0!==(h&o);if(!c&&i===ke)return this;var f=X(h&o-1),l=this.nodes,_=c?l[f]:null,v=L(_,t,e+we,n,r,i,u,s);if(v===_)return this;if(!c&&v&&l.length>=on)return F(t,l,h,a,v);if(c&&!v&&2===l.length&&V(l[1^f]))return l[1^f];if(c&&v&&1===l.length&&V(v))return v;var g=t&&t===this.ownerID,p=c?v?h:h^o:h|o,m=c?v?Y(l,f,v,g):$(l,f,g):Z(l,f,v,g);return g?(this.bitmap=p,this.nodes=m,this):new Ze(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 $e=function(t,e,n){this.ownerID=t,this.count=e,this.nodes=n},tn=$e;ye.createClass($e,{get:function(t,e,n,r){var i=e>>>t&Ie,u=this.nodes[i];return u?u.get(t+we,e,n,r):r},update:function(t,e,n,r,i,u,s){var a=n>>>e&Ie,o=i===ke,h=this.nodes,c=h[a];if(o&&!c)return this;var f=L(c,t,e+we,n,r,i,u,s);if(f===c)return this;var l=this.count;if(c){if(!f&&(l--,hn>l))return N(t,h,l,a)}else l++;var _=t&&t===this.ownerID,v=Y(h,a,f,_);return _?(this.count=l,this.nodes=v,this):new tn(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 en=function(t,e,n){this.ownerID=t,this.hash=e,this.entries=n},nn=en;ye.createClass(en,{get:function(t,e,n,r){for(var i=this.entries,u=0,s=i.length;s>u;u++)if(P(n,i[u][0]))return i[u][1];return r},update:function(t,e,n,r,u,a,o){var h=u===ke;if(n!==this.hash)return h?this:(i(o),i(a),K(this,t,e,n,[r,u]));for(var c=this.entries,f=0,l=c.length;l>f&&!P(r,c[f][0]);f++);var _=l>f;if(h&&!_)return this; | ||
if(i(o),(h||!_)&&i(a),h&&2===l)return new rn(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 nn(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 rn=function(t,e,n){this.ownerID=t,this.hash=e,this.entry=n},un=rn;ye.createClass(rn,{get:function(t,e,n,r){return P(n,this.entry[0])?this.entry[1]:r},update:function(t,e,n,r,u,s,a){var o=u===ke,h=P(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 un(t,n,[r,u]):(i(s),K(this,t,e,n,[r,u])))},iterate:function(t){return t(this.entry)}},{});var sn=function(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&z(t._root)};ye.createClass(sn,{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 W(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return W(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 W(t,u.entry);e=this._stack=z(u,e)}continue}e=this._stack=this._stack.__prev}return o()}},{},Fe);var an,on=Se/2,hn=Se/4,cn=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return fn.from(t)},fn=cn;ye.createClass(cn,{toString:function(){return this.__toString("Vector [","]")},get:function(t,e){if(t=he(t,this._origin),t>=this._size)return e;var n=se(this,t),r=t&Ie;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 re(this,t,e)},remove:function(t){return re(this,t,ke)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=this._origin=this._size=0,this._level=we,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):fn.empty()},push:function(){var t=arguments,e=this.length;return this.withMutations(function(n){ae(n,0,e+t.length); | ||
for(var r=0;t.length>r;r++)n.set(e+r,t[r])})},pop:function(){return ae(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){ae(e,-t.length);for(var n=0;t.length>n;n++)e.set(n,t[n])})},shift:function(){return ae(this,1)},merge:function(){return oe(this,null,arguments)},mergeWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return oe(this,t,e)},mergeDeep:function(){return oe(this,H(null),arguments)},mergeDeepWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return oe(this,H(t),e)},setLength:function(t){return ae(this,0,t)},slice:function(t,e,n){var r=ye.superCall(this,fn.prototype,"slice",[t,e,n]);if(!n&&r!==this){var i=this,u=i.length;r.toVector=function(){return ae(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 gn(this,0,t)},values:function(t){return new gn(this,1,t)},entries:function(t){return new gn(this,2,t)},__iterator:function(t,e,n){return new gn(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=ce(this._size);return s=e?te(this._tail,0,o-this._origin,this._size-this._origin,a,e)&&te(this._root,this._level,-this._origin,o-this._origin,a,e):te(this._root,this._level,-this._origin,o-this._origin,a,e)&&te(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&&P(r[1],t)})},__ensureOwner:function(t){return t===this.__ownerID?this:t?ne(this._origin,this._size,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{empty:function(){return pn||(pn=ne(0,0,we))},from:function(t){if(!t||0===t.length)return fn.empty();if(t.constructor===fn)return t;var e=Array.isArray(t);return t.length>0&&Se>t.length?ne(0,t.length,we,null,new _n(e?s(t):We(t).toArray())):(e||(t=We(t),t instanceof Be||(t=t.valueSeq())),fn.empty().merge(t)) | ||
}},Be);var ln=cn.prototype;ln[qe]=ln.remove,ln[Oe]=ln.values,ln.update=Xe.update,ln.updateIn=Xe.updateIn,ln.cursor=Xe.cursor,ln.withMutations=Xe.withMutations,ln.asMutable=Xe.asMutable,ln.asImmutable=Xe.asImmutable,ln.wasAltered=Xe.wasAltered;var _n=function(t,e){this.array=t,this.ownerID=e},vn=_n;ye.createClass(_n,{removeBefore:function(t,e,n){if(n===e?1<<e:0||0===this.array.length)return this;var r=n>>>e&Ie;if(r>=this.array.length)return new vn([],t);var i,u=0===r;if(e>0){var s=this.array[r];if(i=s&&s.removeBefore(t,e-we,n),i===s&&u)return this}if(u&&!i)return this;var a=ue(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&Ie;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-we,n),i===s&&u)return this}if(u&&!i)return this;var a=ue(this,t);return u||(a.array.length=r+1),i&&(a.array[r]=i),a}},{});var gn=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=ce(t._size),s=ee(t._root&&t._root.array,t._level,-t._origin,u-t._origin-1),a=ee(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(gn,{next:function(){for(var t=this._sparse,e=this._stack;e;){var n=e.array,r=e.index++;if(this._reverse&&(r=Ie-r,r>e.rawMax&&(r=e.rawMax,e.index=Se-r)),r>=0&&Se>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=ee(i&&i.array,e.level-we,e.offset+(r<<e.level),e.max,e))}else e=this._stack=this._stack.__prev}return o()}},{},Fe);var pn,mn=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return dn.from(t)},dn=mn;ye.createClass(mn,{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:fe(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?dn.empty():fe(e)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this):dn.empty()},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var n=0;t.length>n;n++)We(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 We(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 We(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=We(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){var e=this;return t=We(t),t.every(function(t){return e.contains(t)})},wasAltered:function(){return this._map.wasAltered()},values:function(){return this._map.keys()},entries:function(){return E(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?fe(e,t):(this.__ownerID=t,this._map=e,this)}},{empty:function(){return wn||(wn=fe(Qe.empty()))},from:function(t){var e=dn.empty();return t?t.constructor===dn?t:e.union(t):e},fromKeys:function(t){return dn.from(We(t).flip())}},We);var yn=mn.prototype;yn[qe]=yn.remove,yn[Oe]=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=Xe.withMutations,yn.asMutable=Xe.asMutable,yn.asImmutable=Xe.asImmutable,yn.__toJS=Ve.__toJS,yn.__toStringMapper=Ve.__toStringMapper;var wn,Sn=function(t){var e=In.empty();return t?t.constructor===In?t:e.merge(t):e},In=Sn;ye.createClass(Sn,{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):In.empty()},set:function(t,e){return _e(this,t,e)},remove:function(t){return _e(this,t,ke)},wasAltered:function(){return this._map.wasAltered()||this._vector.wasAltered()},keys:function(){return E(this.entries(),function(t){return t[0]})},values:function(){return E(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&&P(r[0],n)&&P(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?le(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._vector=n,this)}},{empty:function(){return kn||(kn=le(Qe.empty(),cn.empty()))}},Qe),Sn.from=Sn,Sn.prototype[qe]=Sn.prototype.remove;var kn,bn=function(t,e){var n=function(t){return this instanceof n?void(this._map=Qe(t)):new n(t)};t=We(t);var r=n.prototype=Object.create(Dn);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},Mn=bn;ye.createClass(bn,{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 Mn._empty||(Mn._empty=ve(this,Qe.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:ve(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:ve(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?ve(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},We);var Dn=bn.prototype;Dn[qe]=Dn.remove,Dn[Oe]=Xe[Oe],Dn.merge=Xe.merge,Dn.mergeWith=Xe.mergeWith,Dn.mergeDeep=Xe.mergeDeep,Dn.mergeDeepWith=Xe.mergeDeepWith,Dn.update=Xe.update,Dn.updateIn=Xe.updateIn,Dn.cursor=Xe.cursor,Dn.withMutations=Xe.withMutations,Dn.asMutable=Xe.asMutable,Dn.asImmutable=Xe.asImmutable,Dn.__deepEqual=Xe.__deepEqual;var qn=function(t,e,n){return this instanceof On?(h(0!==n,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&An?An:(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 On(t,e,n)},On=qn;ye.createClass(qn,{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,On.prototype,"slice",[t,e,n]):(t=d(t,this.length),e=y(e,this.length),t>=e?An:new On(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,On.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}},{},Be);var xn=qn.prototype;xn.__toJS=xn.toArray,xn.first=ln.first,xn.last=ln.last;var An=qn(0,0),Cn=function(t,e){return 0===e&&Rn?Rn:this instanceof En?(this._value=t,void(this.length=null==e?1/0:Math.max(0,e))):new En(t,e)},En=Cn;ye.createClass(Cn,{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 P(this._value,t)},slice:function(t,e,n){if(n)return ye.superCall(this,En.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 En(this._value,e-t):Rn},reverse:function(t){return t?ye.superCall(this,En.prototype,"reverse",[t]):this},indexOf:function(t){return P(this._value,t)?0:-1},lastIndexOf:function(t){return P(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 P(this._value,t._value)}},{},Be);var jn=Cn.prototype;jn.last=jn.first,jn.has=xn.has,jn.take=xn.take,jn.skip=xn.skip,jn.__toJS=xn.__toJS;var Rn=new Cn(void 0,0),Un={Sequence:We,Map:Qe,Vector:cn,Set:mn,OrderedMap:Sn,Record:bn,Range:qn,Repeat:Cn,is:P,fromJS:ge};return Un}"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,e){e=e||0;for(var n=Math.max(0,t.length-e),r=Array(n),i=0;n>i;i++)r[i]=t[i+e];return r}function a(t){return be.value=t,be.done=!1,be}function h(){return be.value=void 0,be.done=!0,be}function o(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=Ue[t];return null==e&&(e=l(t),Re===je&&(Re=0,Ue={}),Re++,Ue[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[xe])return t[xe];var e=++Ae&Oe;if(!Ce)try{return Object.defineProperty(t,xe,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}catch(n){Ce=!0}return t[xe]=e,e}function v(){return Object.create(Je)}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 d(t,e){return w(t,e,0)}function y(t,e){return w(t,e,e)}function w(t,e,n){return null==t?n:0>t?Math.max(0,e+t):e?Math.min(e,t):t}function S(t){return t}function I(t,e){return[e,t]}function k(){return!0}function M(){return this}function b(t){return(t||0)+1}function D(t,e,n,r,i){var u=t.__makeSequence();return u.__iterateUncached=function(u,s,a){var h=this,o=0,c=t.__iterate(function(t,i,s){if(e.call(n,t,i,s)){if(u(t,r?i:o,h)===!1)return!1;o++}},s,a);return i?c:o},u}function q(t){return function(){return!t.apply(this,arguments) | ||
}}function O(t){return"string"==typeof t?JSON.stringify(t):t}function A(t,e){return t>e?1:e>t?-1:0}function x(t,e){return 0>e?(null==t.length&&t.cacheResult(),t.length+e):e}function C(t){o(1/0!==t,"Cannot perform this action with an infinite sequence.")}function E(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 j(t,e,n){return n instanceof We?R(t,e,n):n}function R(t,e,n){return new Ge(t._rootData,t._keyPath.concat(e),t._onChange,n)}function U(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 We?t.equals(e):!1}function P(t,e){return a(0===t||1===t?e[t]:[e[0],e[1]])}function J(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 B(t,e,n){var i=r(ke),u=r(Me),s=L(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 L(t,e,n,r,u,s,a,h){return t?t.update(e,n,r,u,s,a,h):s===Ie?t:(i(h),i(a),new nn(e,r,[u,s]))}function V(t){return t.constructor===nn||t.constructor===tn}function K(t,e,n,r,i){if(t.hash===r)return new tn(e,r,[t.entry,i]);var u,s=(0===n?t.hash:t.hash>>>n)&Se,a=(0===n?r:r>>>n)&Se,h=s===a?[K(t,e,n+ye,r,i)]:(u=new nn(e,r,i),a>s?[t,u]:[u,t]);return new Xe(e,1<<s|1<<a,h)}function N(t,e,n,r){for(var i=0,u=0,s=Array(n),a=0,h=1,o=e.length;o>a;a++,h<<=1){var c=e[a];null!=c&&a!==r&&(i|=h,s[u++]=c)}return new Xe(t,i,s)}function F(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 G(t,e,n){for(var r=[],i=0;n.length>i;i++){var u=n[i];u&&r.push(Array.isArray(u)?We(u).fromEntrySeq():We(u)) | ||
}return Q(t,e,r)}function H(t){return function(e,n){return e&&e.mergeDeepWith?e.mergeDeepWith(t,n):t?t(e,n):n}}function Q(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 T(t,e,n,r,i){var u=e.length;if(i===u)return r(t);o(t.set,"updateIn with invalid keyPath");var s=i===u-1?n:He.empty(),a=e[i],h=t.get(a,s),c=T(h,e,n,r,i+1);return c===h?t:t.set(a,c)}function X(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 Y(t,e,n,r){var i=r?t:s(t);return i[e]=n,i}function Z(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 $(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 te(t,e,n,r,i,u){var s,a=t&&t.array;if(0===e){var h=0>n?0:n,o=n+we;for(o>r&&(o=r),s=h;o>s;s++){var c=u?h+o-1-s:s;if(i(a&&a[c-n],c)===!1)return!1}}else{var f=1<<e,l=e-ye;for(s=0;Se>=s;s++){var _=u?Se-s:s,v=n+(_<<e);if(r>v&&v+f>0){var g=a&&a[_];if(!te(g,l,v,r,i,u))return!1}}}return!0}function ee(t,e,n,r,i){return{array:t,level:e,offset:n,max:r,rawMax:r-n>>e,index:0,__prev:i}}function ne(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 re(t,e,n){if(e=x(t,e),e>=t.length||0>e)return n===Ie?t:t.withMutations(function(t){0>e?ae(t,e).set(0,n):ae(t,0,e+1).set(e,n)});e+=t._origin;var i=t._tail,u=t._root,s=r(Me);return e>=oe(t._size)?i=ie(i,t.__ownerID,0,e,n,s):u=ie(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):ne(t._origin,t._size,t._level,u,i):t}function ie(t,e,n,r,u,s){var a,h=u===Ie,o=r>>>n&Se,c=t&&t.array.length>o;if(h&&!c)return t;if(n>0){var f=t&&t.array[o],l=ie(f,e,n-ye,r,u,s);return l===f?t:(a=ue(t,e),a.array[o]=l,a) | ||
}return!h&&c&&t.array[o]===u?t:(i(s),a=ue(t,e),h&&o===a.array.length-1?a.array.pop():a.array[o]=h?void 0:u,a)}function ue(t,e){return e&&t&&e===t.ownerID?t:new ln(t?t.array.slice():[],e)}function se(t,e){if(e>=oe(t._size))return t._tail;if(1<<t._level+ye>e){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&Se],r-=ye;return n}}function ae(t,e,n){var r=t.__ownerID||new u,i=t._origin,s=t._size,a=i+e,h=null==n?s:0>n?s+n:i+n;if(a===i&&h===s)return t;if(a>=h)return t.clear();for(var o=t._level,c=t._root,f=0;0>a+f;)c=new ln(c&&c.array.length?[null,c]:[],r),o+=ye,f+=1<<o;f&&(a+=f,i+=f,h+=f,s+=f);for(var l=oe(s),_=oe(h);_>=1<<o+ye;)c=new ln(c&&c.array.length?[c]:[],r),o+=ye;var v=t._tail,g=l>_?se(t,h-1):_>l?new ln([],r):v;if(v&&_>l&&s>a&&v.array.length){c=ue(c,r);for(var p=c,m=o;m>ye;m-=ye){var d=l>>>m&Se;p=p.array[d]=ue(p.array[d],r)}p.array[l>>>ye&Se]=v}if(s>h&&(g=g&&g.removeAfter(r,0,h)),a>=_)a-=_,h-=_,o=ye,c=null,g=g&&g.removeBefore(r,0,a);else if(a>i||l>_){var y,w;f=0;do y=a>>>o&Se,w=_-1>>>o&Se,y===w&&(y&&(f+=(1<<o)*y),o-=ye,c=c&&c.array[y]);while(c&&y===w);c&&a>i&&(c=c&&c.removeBefore(r,o,a-f)),c&&l>_&&(c=c&&c.removeAfter(r,o,_-f)),f&&(a-=f,h-=f)}return t.__ownerID?(t.length=h-a,t._origin=a,t._size=h,t._level=o,t._root=c,t._tail=g,t.__hash=void 0,t.__altered=!0,t):ne(a,h,o,c,g)}function he(t,e,n){for(var r=[],i=0;n.length>i;i++){var u=n[i];u&&r.push(We(u))}var s=Math.max.apply(null,r.map(function(t){return t.length||0}));return s>t.length&&(t=t.setLength(s)),Q(t,e,r)}function oe(t){return we>t?0:t-1>>>ye<<ye}function ce(t,e){var n=Object.create(dn);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 h=a?r.remove(e):s?r:r.set(e,u),o=a?i.remove(u):i.set(u,[e,n]);return t.__ownerID?(t.length=h.length,t._map=h,t._vector=o,t.__hash=void 0,t):fe(h,o)}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,We(e).map(function(n,r){return ge(t,n,r,e)})):e}function pe(t){if(t){if(Array.isArray(t))return We(t).map(pe).toVector();if(t.constructor===Object)return We(t).map(pe).toMap()}return t}var me=Object,de={};de.createClass=t,de.superCall=e,de.defaultSuperCall=n;var ye=5,we=1<<ye,Se=we-1,Ie={},ke={value:!1},Me={value:!1},be={value:void 0,done:!1},De="delete",qe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Oe=2147483647,Ae=0,xe="__immutablehash__";"undefined"!=typeof Symbol&&(xe=Symbol(xe));var Ce=!1,Ee=16,je=255,Re=0,Ue={},We=function(t){return Pe.from(1===arguments.length?t:Array.prototype.slice.call(arguments))},Pe=We;de.createClass(We,{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+": "+O(t)},toJS:function(){return this.map(function(t){return t instanceof Pe?t.toJS():t}).__toJS()},toArray:function(){C(this.length);var t=Array(this.length||0);return this.valueSeq().forEach(function(e,n){t[n]=e}),t},toObject:function(){C(this.length);var t={};return this.forEach(function(e,n){t[n]=e}),t},toVector:function(){return C(this.length),on.from(this)},toMap:function(){return C(this.length),He.from(this)},toOrderedMap:function(){return C(this.length),wn.from(this)},toSet:function(){return C(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 Pe))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=void 0!==t?""+t:",";var e="",n=!0;return this.forEach(function(r){n?(n=!1,e+=null!=r?r:""):e+=t+(null!=r?r:"")}),e},count:function(t,e){return t?this.filter(t,e).count():(null==this.length&&(this.length=this.forEach(k)),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 Pe(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=M,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 Pe(t._cache);var e=t.map(I).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,i;return 2>arguments.length?i=!0:r=e,this.forEach(function(e,u,s){i?(i=!1,r=e):r=t.call(n,r,e,u,s)}),r},reduceRight:function(){var t=this.reverse(!0);return t.reduce.apply(t,arguments)},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(q(t),e)},first:function(){return this.find(k)},last:function(){return this.findLast(k) | ||
},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){var r=this;return t.__iterate(function(t,n){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){var u=this;return n.__iterate(function(n,i,s){return r(t.call(e,n,i,s),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){var u=this;return n.__iterate(function(n,i,s){return r(n,t.call(e,i,n,s),u)!==!1},i)},r},filter:function(t,e){return D(this,t,e,!0,!1)},slice:function(t,e){if(m(t,e,this.length))return this;var n=d(t,this.length),r=y(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=this;if(t>e.length)return e;var n=e.__makeSequence();return n.__iterateUncached=function(n,r,i){var u=this;if(r)return this.cacheResult().__iterate(n,r,i);var s=0;return e.__iterate(function(e,r){return t>s&&n(e,r,u)!==!1?void s++:!1},r,i),s},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){var s=this; | ||
if(i)return this.cacheResult().__iterate(r,i,u);var a=0;return n.__iterate(function(n,i,u){return t.call(e,n,i,u)&&r(n,i,s)!==!1?void a++:!1},i,u),a},r},takeUntil:function(t,e,n){return this.takeWhile(q(t),e,n)},skip:function(t){var e=this;if(0===t)return e;var n=e.__makeSequence();return n.__iterateUncached=function(n,r,i){var u=this;if(r)return this.cacheResult().__iterate(n,r,i);var s=!0,a=0,h=0;return e.__iterate(function(e,r){if(!s||!(s=h++<t)){if(n(e,r,u)===!1)return!1;a++}},r,i),a},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 n=this,r=n.__makeSequence();return r.__iterateUncached=function(r,i,u){var s=this;if(i)return this.cacheResult().__iterate(r,i,u);var a=!0,h=0;return n.__iterate(function(n,i,u){if(!a||!(a=t.call(e,n,i,u))){if(r(n,i,s)===!1)return!1;h++}},i,u),h},r},skipUntil:function(t,e,n){return this.skipWhile(q(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 Pe(t).fromEntrySeq()})},sort:function(t,e){return this.sortBy(S,t,e)},sortBy:function(t,e){e=e||A;var n=this;return Pe(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&&(C(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 Pe)return t;if(!Array.isArray(t)){if(t&&t.constructor===Object)return new Ve(t); | ||
t=[t]}return new Ke(t)}});var Je=We.prototype;Je.toJSON=Je.toJS,Je.__toJS=Je.toObject,Je.inspect=Je.toSource=function(){return""+this};var ze=function(){de.defaultSuperCall(this,Be.prototype,arguments)},Be=ze;de.createClass(ze,{toString:function(){return this.__toString("Seq [","]")},toArray:function(){C(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){var i=this;return t.__iterate(function(t){return t&&e(t[1],t[0],i)},n,r)},e},join:function(t){t=void 0!==t?""+t:",";var e="";return this.forEach(function(n,r){e+=(r?t:"")+(null!=n?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 We(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){var i=this;if(r&&!this.length)return this.cacheResult().__iterate(t,e,r);for(var u,s=0,a=r&&this.length-1,h=n.length-1,o=0;h>=o&&!u;o++){var c=n[e?h-o:o];c instanceof Be||(c=c.valueSeq()),s+=c.__iterate(function(e,n){return n+=s,t(e,r?a-n:n,i)===!1?(u=!0,!1):void 0},e)}return s},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},filter:function(t,e,n){var r=D(this,t,e,n,n);return n&&(r.length=this.length),r},get:function(t,e){return t=x(this,t),this.find(function(e,n){return n===t},null,e)},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=d(t,r.length),s=y(e,r.length); | ||
return i.length=r.length&&(n?r.length:s-u),i.__reversedIndices=r.__reversedIndices,i.__iterateUncached=function(i,a,h){var o=this;if(a)return this.cacheResult().__iterate(i,a,h);var c=this.__reversedIndices^h;if(u!==u||s!==s||c&&null==r.length){var f=r.count();u=d(t,f),s=y(e,f)}var l=c?r.length-s:u,_=c?r.length-u:s,v=r.__iterate(function(t,e){return c?null!=_&&e>=_||e>=l&&i(t,n?e:e-l,o)!==!1:l>e||(null==_||_>e)&&i(t,n?e:e-l,o)!==!1},a,h);return null!=this.length?this.length:n?v:Math.max(0,v-l)},i},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=d(t,this.length);var r=this.slice(0,t);return 1===n?r:r.concat(s(arguments,2),this.slice(t+e))},flatten:function(){var t=this,e=t.__makeSequence();return e.__iterateUncached=function(e,n,r){var i=this;if(r)return this.cacheResult().__iterate(e,n,r);var u=0;return t.__iterate(function(t){u+=We(t).__iterate(function(t,n){return e(t,u+n,i)!==!1},n,r)},n,r),u},e},flatMap:function(t,e){return this.map(t,e).flatten()},skip:function(t,e){var n=this;if(0===t)return n;var r=n.__makeSequence();return e&&(r.length=this.length),r.__iterateUncached=function(r,i,u){var s=this;if(i)return this.cacheResult().__iterate(r,i,u);var a=n.__reversedIndices^u,h=!0,o=0,c=0,f=n.__iterate(function(n,i){return h&&(h=c++<t,h||(o=i)),h||r(n,u||e?i:i-o,s)!==!1},i,u);return e?f:a?o+1:f-o},r.length=this.length&&Math.max(0,this.length-t),r},skipWhile:function(t,e,n){var r=this,i=r.__makeSequence();return n&&(i.length=this.length),i.__iterateUncached=function(i,u,s){var a=this;if(u)return this.cacheResult().__iterate(i,u,s);var h=r.__reversedIndices^s,o=!0,c=0,f=r.__iterate(function(r,u,h){return o&&(o=t.call(e,r,u,h),o||(c=u)),o||i(r,s||n?u:u-c,a)!==!1},u,s);return n?f:h?c+1:f-c},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),h=e.get(a,Ie);h===Ie&&(h=Array(n?r.length:0),e.set(a,h)),n?h[u]=i:h.push(i)})});return i.map(function(t){return We(t)})},sortBy:function(t,e,n){var r=de.superCall(this,Be.prototype,"sortBy",[t,e]); | ||
return n||(r=r.valueSeq()),r.length=this.length,r},__makeSequence:function(){return g(this)}},{},We);var Le=ze.prototype;Le.__toJS=Le.toArray,Le.__toStringMapper=O,Le.chain=Le.flatMap;var Ve=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};de.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}},{},We);var Ke=function(t){this._array=t,this.length=t.length};de.createClass(Ke,{toArray:function(){return this._array},get:function(t,e){return this.has(t)?this._array[x(this,t)]:e},has:function(t){return t=x(this,t),t>=0&&this.length>t},__iterate:function(t,e,n){var r,i,u=this._array,s=u.length-1,a=e^n;for(r=0;s>=r;r++)if(i=s-r,t(u[e?i:r],n?i:r,u)===!1)return a?e?i:r:u.length;return u.length}},{},ze);var Ne=function(){};de.createClass(Ne,{toString:function(){return"[Iterator]"}},{});var Fe=Ne.prototype;Fe[qe]=M,Fe.inspect=Fe.toSource=function(){return""+this};var Ge=function(t,e,n,r){r=r?r:t.getIn(e),this.length=r instanceof We?r.length:null,this._rootData=t,this._keyPath=e,this._onChange=n};de.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:j(this,t,n)},set:function(t,e){return U(this,function(n){return n.set(t,e)},t)},remove:function(t){return U(this,function(e){return e.remove(t)},t)},clear:function(){return U(this,function(t){return t.clear()})},update:function(t,e,n){return 1===arguments.length?U(this,t):U(this,function(r){return r.update(t,e,n)},t)},withMutations:function(t){return U(this,function(e){return(e||He.empty()).withMutations(t)})},cursor:function(t){return Array.isArray(t)&&0===t.length?this:R(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(j(r,n,e),n,i)},e,n):0}},{},We),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;de.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 B(this,t,e)},remove:function(t){return B(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),T(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 G(this,null,arguments)},mergeWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return G(this,t,e)},mergeDeep:function(){return G(this,H(null),arguments)},mergeDeepWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return G(this,H(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},__deepEquals: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))}},We);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;de.createClass(Xe,{get:function(t,e,n,r){var i=1<<((0===t?e:e>>>t)&Se),u=this.bitmap;return 0===(u&i)?r:this.nodes[X(u&i-1)].get(t+ye,e,n,r)},update:function(t,e,n,r,i,u,s){var a=(0===e?n:n>>>e)&Se,h=1<<a,o=this.bitmap,c=0!==(o&h);if(!c&&i===Ie)return this;var f=X(o&h-1),l=this.nodes,_=c?l[f]:null,v=L(_,t,e+ye,n,r,i,u,s);if(v===_)return this;if(!c&&v&&l.length>=an)return F(t,l,o,a,v);if(c&&!v&&2===l.length&&V(l[1^f]))return l[1^f];if(c&&v&&1===l.length&&V(v))return v;var g=t&&t===this.ownerID,p=c?v?o:o^h:o|h,m=c?v?Y(l,f,v,g):$(l,f,g):Z(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;de.createClass(Ze,{get:function(t,e,n,r){var i=(0===t?e:e>>>t)&Se,u=this.nodes[i];return u?u.get(t+ye,e,n,r):r},update:function(t,e,n,r,i,u,s){var a=(0===e?n:n>>>e)&Se,h=i===Ie,o=this.nodes,c=o[a];if(h&&!c)return this;var f=L(c,t,e+ye,n,r,i,u,s);if(f===c)return this;var l=this.count;if(c){if(!f&&(l--,hn>l))return N(t,o,l,a)}else l++;var _=t&&t===this.ownerID,v=Y(o,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;de.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,h){var o=u===Ie;if(n!==this.hash)return o?this:(i(h),i(a),K(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(o&&!_)return this;if(i(h),(o||!_)&&i(a),o&&2===l)return new nn(t,this.hash,c[1^f]);var v=t&&t===this.ownerID,g=v?c:s(c); | ||
return _?o?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;de.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 h=u===Ie,o=W(r,this.entry[0]);return(o?u===this.entry[1]:h)?this:(i(a),h?(i(s),null):o?t&&t===this.ownerID?(this.entry[1]=u,this):new rn(t,n,[r,u]):(i(s),K(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&&J(t._root)};de.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 P(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return P(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 P(t,u.entry);e=this._stack=J(u,e)}continue}e=this._stack=this._stack.__prev}return h()}},{},Ne);var sn,an=we/2,hn=we/4,on=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return cn.from(t)},cn=on;de.createClass(on,{toString:function(){return this.__toString("Vector [","]")},has:function(t){return t=x(this,t),t>=0&&this.length>t},get:function(t,e){if(t=x(this,t),0>t||t>=this.length)return e;t+=this._origin;var n=se(this,t);return n&&n.array[t&Se]},first:function(){return this.get(0)},last:function(){return this.get(this.length?this.length-1:0)},set:function(t,e){return re(this,t,e)},remove:function(t){return re(this,t,Ie)},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=this._origin=this._size=0,this._level=ye,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){ae(n,0,e+t.length);for(var r=0;t.length>r;r++)n.set(e+r,t[r])})},pop:function(){return ae(this,0,-1) | ||
},unshift:function(){var t=arguments;return this.withMutations(function(e){ae(e,-t.length);for(var n=0;t.length>n;n++)e.set(n,t[n])})},shift:function(){return ae(this,1)},merge:function(){return he(this,null,arguments)},mergeWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return he(this,t,e)},mergeDeep:function(){return he(this,H(null),arguments)},mergeDeepWith:function(t){for(var e=[],n=1;arguments.length>n;n++)e[n-1]=arguments[n];return he(this,H(t),e)},setLength:function(t){return ae(this,0,t)},slice:function(t,e,n){var r=de.superCall(this,cn.prototype,"slice",[t,e,n]);if(!n&&r!==this){var i=this,u=i.length;r.toVector=function(){return ae(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(){return new vn(this,0)},values:function(){return new vn(this,1)},entries:function(){return new vn(this,2)},__iterator:function(t,e){return new vn(this,2,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)},h=oe(this._size);return s=e?te(this._tail,0,h-this._origin,this._size-this._origin,a,e)&&te(this._root,this._level,-this._origin,h-this._origin,a,e):te(this._root,this._level,-this._origin,h-this._origin,a,e)&&te(this._tail,0,h-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?ne(this._origin,this._size,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{empty:function(){return gn||(gn=ne(0,0,ye))},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?ne(0,t.length,ye,null,new ln(e?s(t):We(t).toArray())):(e||(t=We(t),t instanceof ze||(t=t.valueSeq())),cn.empty().merge(t))}},ze);var fn=on.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;de.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-ye,n),i===s&&u)return this}if(u&&!i)return this;var a=ue(this,t);if(!u)for(var h=0;r>h;h++)a.array[h]=void 0;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-ye,n),i===s&&u)return this}if(u&&!i)return this;var a=ue(this,t);return u||a.array.pop(),i&&(a.array[r]=i),a}},{});var vn=function(t,e,n,r){this._type=e,this._reverse=!!n,this._flipIndices=!!(r^n),this._maxIndex=t.length-1;var i=oe(t._size),u=ee(t._root&&t._root.array,t._level,-t._origin,i-t._origin-1),s=ee(t._tail&&t._tail.array,0,i-t._origin,t._size-t._origin-1);this._stack=n?s:u,this._stack.__prev=n?u:s};de.createClass(vn,{next:function(){for(var t=this._stack;t;){var e=t.array,n=t.index++;if(this._reverse&&(n=Se-n,n>t.rawMax&&(n=t.rawMax,t.index=we-n)),n>=0&&we>n&&t.rawMax>=n){var r=e&&e[n];if(0===t.level){var i,u=this._type;return 1!==u&&(i=t.offset+(n<<t.level),this._flipIndices&&(i=this._maxIndex-i)),a(0===u?i:1===u?r:[i,r])}this._stack=t=ee(r&&r.array,t.level-ye,t.offset+(n<<t.level),t.max,t)}else t=this._stack=this._stack.__prev}return h()}},{},Ne);var gn,pn=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return mn.from(t)},mn=pn;de.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++)We(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 We(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 We(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=We(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){var e=this;return t=We(t),t.every(function(t){return e.contains(t)})},wasAltered:function(){return this._map.wasAltered()},values:function(){return this._map.keys()},entries:function(){return E(this.values(),function(t){return[t,t]})},hashCode:function(){return this._map.hashCode()},__iterate:function(t,e){var n=this;return this._map.__iterate(function(e,r){return t(r,r,n)},e)},__deepEquals:function(t){return this.isSuperset(t)},__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 yn||(yn=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(We(t).flip())}},We);var dn=pn.prototype;dn[De]=dn.remove,dn[qe]=dn.keys=dn.values,dn.contains=dn.has,dn.mergeDeep=dn.merge=dn.union,dn.mergeDeepWith=dn.mergeWith=function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.merge.apply(this,t)},dn.withMutations=Te.withMutations,dn.asMutable=Te.asMutable,dn.asImmutable=Te.asImmutable,dn.__toJS=Le.__toJS,dn.__toStringMapper=Le.__toStringMapper; | ||
var yn,wn=function(t){var e=Sn.empty();return t?t.constructor===Sn?t:e.merge(t):e},Sn=wn;de.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 E(this.entries(),function(t){return t[0]})},values:function(){return E(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)},__deepEquals: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(),on.empty()))}},He),wn.from=wn,wn.prototype[De]=wn.prototype.remove;var In,kn=function(t,e){var n=function(t){return this instanceof n?void(this._map=He(t)):new n(t)};t=We(t);var r=n.prototype=Object.create(bn);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){o(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}),n},Mn=kn;de.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 Mn._empty||(Mn._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)}},{},We);var bn=kn.prototype;bn[De]=bn.remove,bn[qe]=Te[qe],bn.merge=Te.merge,bn.mergeWith=Te.mergeWith,bn.mergeDeep=Te.mergeDeep,bn.mergeDeepWith=Te.mergeDeepWith,bn.update=Te.update,bn.updateIn=Te.updateIn,bn.cursor=Te.cursor,bn.withMutations=Te.withMutations,bn.asMutable=Te.asMutable,bn.asImmutable=Te.asImmutable,bn.__deepEquals=Te.__deepEquals;var Dn=function(t,e,n){return this instanceof qn?(o(0!==n,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&An?An:(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;de.createClass(Dn,{toString:function(){return 0===this.length?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},has:function(t){return t=x(this,t),t>=0&&(1/0===this.length||this.length>t)},get:function(t,e){return t=x(this,t),this.has(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?de.superCall(this,qn.prototype,"slice",[t,e,n]):(t=d(t,this.length),e=y(e,this.length),t>=e?An: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?de.superCall(this,qn.prototype,"skip",[t]):this.slice(t)},__iterate:function(t,e,n){for(var r=this.length-1,i=this._step,u=e?this._start+r*i:this._start,s=0;r>=s&&t(u,n?r-s:s,this)!==!1;s++)u+=e?-i:i;return n?this.length:s},__deepEquals:function(t){return this._start===t._start&&this._end===t._end&&this._step===t._step}},{},ze);var On=Dn.prototype;On.__toJS=On.toArray,On.first=fn.first,On.last=fn.last;var An=Dn(0,0),xn=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=xn;de.createClass(xn,{toString:function(){return 0===this.length?"Repeat []":"Repeat [ "+this._value+" "+this.length+" times ]"},get:function(t,e){return this.has(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 de.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?de.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;o(!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)}},{},ze);var En=xn.prototype;En.last=En.first,En.has=On.has,En.take=On.take,En.skip=On.skip,En.__toJS=On.__toJS;var jn=new xn(void 0,0),Rn={Sequence:We,Map:He,Vector:on,Set:pn,OrderedMap:wn,Record:kn,Range:Dn,Repeat:xn,is:W,fromJS:ve};return Rn}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t(); |
{ | ||
"name": "immutable", | ||
"version": "2.0.17", | ||
"version": "2.1.0", | ||
"description": "Immutable Data Collections", | ||
@@ -65,2 +65,2 @@ "homepage": "https://github.com/facebook/immutable-js", | ||
"license": "BSD" | ||
} | ||
} |
@@ -240,3 +240,3 @@ Immutable Data Collections | ||
For example, the following performs no work, because the resulting sequence is | ||
For example, the following does not perform any work, because the resulting sequence is | ||
never used: | ||
@@ -243,0 +243,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205679
4587