/**
 * @license
 * MIT License
 *
 * Copyright (c) 2014-present, Lee Byron and other contributors.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
var IS_INDEXED_SYMBOL="@@__IMMUTABLE_INDEXED__@@";function isIndexed(t){return Boolean(t&&t[IS_INDEXED_SYMBOL])}var IS_KEYED_SYMBOL="@@__IMMUTABLE_KEYED__@@";function isKeyed(t){return Boolean(t&&t[IS_KEYED_SYMBOL])}function isAssociative(t){return isKeyed(t)||isIndexed(t)}var IS_COLLECTION_SYMBOL="@@__IMMUTABLE_ITERABLE__@@";function isCollection(t){return Boolean(t&&t[IS_COLLECTION_SYMBOL])}var Collection=function(t){return isCollection(t)?t:Seq(t)},KeyedCollection=function(t){function e(t){return isKeyed(t)?t:KeyedSeq(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Collection),IndexedCollection=function(t){function e(t){return isIndexed(t)?t:IndexedSeq(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Collection),SetCollection=function(t){function e(t){return isCollection(t)&&!isAssociative(t)?t:SetSeq(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Collection);Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var ITERATE_KEYS=0,ITERATE_VALUES=1,ITERATE_ENTRIES=2,REAL_ITERATOR_SYMBOL="function"==typeof Symbol&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator",ITERATOR_SYMBOL=REAL_ITERATOR_SYMBOL||FAUX_ITERATOR_SYMBOL,Iterator=function(t){this.next=t};function iteratorValue(t,e,r,n){var o=t===ITERATE_KEYS?e:t===ITERATE_VALUES?r:[e,r];return n?n.value=o:n={value:o,done:!1},n}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(t){return!!Array.isArray(t)||!!getIteratorFn(t)}function isIterator(t){return!(!t||"function"!=typeof t.next)}function getIterator(t){var e=getIteratorFn(t);return e&&e.call(t)}function getIteratorFn(t){var e=t&&(REAL_ITERATOR_SYMBOL&&t[REAL_ITERATOR_SYMBOL]||t[FAUX_ITERATOR_SYMBOL]);if("function"==typeof e)return e}function isEntriesIterable(t){var e=getIteratorFn(t);return e&&e===t.entries}function isKeysIterable(t){var e=getIteratorFn(t);return e&&e===t.keys}Iterator.prototype.toString=function(){return"[Iterator]"},Iterator.KEYS=ITERATE_KEYS,Iterator.VALUES=ITERATE_VALUES,Iterator.ENTRIES=ITERATE_ENTRIES,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[ITERATOR_SYMBOL]=function(){return this};var DELETE="delete",SHIFT=5,SIZE=1<<SHIFT,MASK=SIZE-1,NOT_SET={};function MakeRef(){return{value:!1}}function SetRef(t){t&&(t.value=!0)}function OwnerID(){}function ensureSize(t){return void 0===t.size&&(t.size=t.__iterate(returnTrue)),t.size}function wrapIndex(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?ensureSize(t)+e:e}function returnTrue(){return!0}function wholeSlice(t,e,r){return(0===t&&!isNeg(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function resolveBegin(t,e){return resolveIndex(t,e,0)}function resolveEnd(t,e){return resolveIndex(t,e,e)}function resolveIndex(t,e,r){return void 0===t?r:isNeg(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function isNeg(t){return t<0||0===t&&1/t==-1/0}var IS_RECORD_SYMBOL="@@__IMMUTABLE_RECORD__@@";function isRecord(t){return Boolean(t&&t[IS_RECORD_SYMBOL])}function isImmutable(t){return isCollection(t)||isRecord(t)}var IS_ORDERED_SYMBOL="@@__IMMUTABLE_ORDERED__@@";function isOrdered(t){return Boolean(t&&t[IS_ORDERED_SYMBOL])}var IS_SEQ_SYMBOL="@@__IMMUTABLE_SEQ__@@";function isSeq(t){return Boolean(t&&t[IS_SEQ_SYMBOL])}var hasOwnProperty=Object.prototype.hasOwnProperty;function isArrayLike(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var Seq=function(t){function e(t){return null==t?emptySequence():isImmutable(t)?t.toSeq():seqFromValue(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,o=0;o!==n;){var i=r[e?n-++o:o++];if(!1===t(i[1],i[0],this))break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,o=0;return new Iterator(function(){if(o===n)return iteratorDone();var i=r[e?n-++o:o++];return iteratorValue(t,i[0],i[1])})}return this.__iteratorUncached(t,e)},e}(Collection),KeyedSeq=function(t){function e(t){return null==t?emptySequence().toKeyedSeq():isCollection(t)?isKeyed(t)?t.toSeq():t.fromEntrySeq():isRecord(t)?t.toSeq():keyedSeqFromValue(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(Seq),IndexedSeq=function(t){function e(t){return null==t?emptySequence():isCollection(t)?isKeyed(t)?t.entrySeq():t.toIndexedSeq():isRecord(t)?t.toSeq().entrySeq():indexedSeqFromValue(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(Seq),SetSeq=function(t){function e(t){return(isCollection(t)&&!isAssociative(t)?t:IndexedSeq(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(Seq);Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq,Seq.prototype[IS_SEQ_SYMBOL]=!0;var ArraySeq=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[wrapIndex(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,o=0;o!==n;){var i=e?n-++o:o++;if(!1===t(r[i],i,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,o=0;return new Iterator(function(){if(o===n)return iteratorDone();var i=e?n-++o:o++;return iteratorValue(t,i,r[i])})},e}(IndexedSeq),ObjectSeq=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return hasOwnProperty.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,o=n.length,i=0;i!==o;){var a=n[e?o-++i:i++];if(!1===t(r[a],a,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,o=n.length,i=0;return new Iterator(function(){if(i===o)return iteratorDone();var a=n[e?o-++i:i++];return iteratorValue(t,a,r[a])})},e}(KeyedSeq);ObjectSeq.prototype[IS_ORDERED_SYMBOL]=!0;var EMPTY_SEQ,CollectionSeq=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=getIterator(this._collection),n=0;if(isIterator(r))for(var o;!(o=r.next()).done&&!1!==t(o.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=getIterator(this._collection);if(!isIterator(r))return new Iterator(iteratorDone);var n=0;return new Iterator(function(){var e=r.next();return e.done?e:iteratorValue(t,n++,e.value)})},e}(IndexedSeq);function emptySequence(){return EMPTY_SEQ||(EMPTY_SEQ=new ArraySeq([]))}function keyedSeqFromValue(t){var e=maybeIndexedSeqFromValue(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new ObjectSeq(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function indexedSeqFromValue(t){var e=maybeIndexedSeqFromValue(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function seqFromValue(t){var e=maybeIndexedSeqFromValue(t);if(e)return isEntriesIterable(t)?e.fromEntrySeq():isKeysIterable(t)?e.toSetSeq():e;if("object"==typeof t)return new ObjectSeq(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function maybeIndexedSeqFromValue(t){return isArrayLike(t)?new ArraySeq(t):hasIterator(t)?new CollectionSeq(t):void 0}function asImmutable(){return this.__ensureOwner()}function asMutable(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)}var imul="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function smi(t){return t>>>1&1073741824|3221225471&t}var defaultValueOf=Object.prototype.valueOf;function hash(t){if(null==t)return hashNullish(t);if("function"==typeof t.hashCode)return smi(t.hashCode(t));var e=valueOf(t);if(null==e)return hashNullish(e);switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return hashNumber(e);case"string":return e.length>STRING_HASH_CACHE_MIN_STRLEN?cachedHashString(e):hashString(e);case"object":case"function":return hashJSObj(e);case"symbol":return hashSymbol(e);default:if("function"==typeof e.toString)return hashString(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function hashNullish(t){return null===t?1108378658:1108378659}function hashNumber(t){if(t!=t||t===1/0)return 0;var e=0|t;for(e!==t&&(e^=4294967295*t);t>4294967295;)e^=t/=4294967295;return smi(e)}function cachedHashString(t){var e=stringHashCache[t];return void 0===e&&(e=hashString(t),STRING_HASH_CACHE_SIZE===STRING_HASH_CACHE_MAX_SIZE&&(STRING_HASH_CACHE_SIZE=0,stringHashCache={}),STRING_HASH_CACHE_SIZE++,stringHashCache[t]=e),e}function hashString(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return smi(e)}function hashSymbol(t){var e=symbolMap[t];return void 0!==e||(e=nextHash(),symbolMap[t]=e),e}function hashJSObj(t){var e;if(usingWeakMap&&void 0!==(e=weakMap.get(t)))return e;if(void 0!==(e=t[UID_HASH_KEY]))return e;if(!canDefineProperty){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[UID_HASH_KEY]))return e;if(void 0!==(e=getIENodeHash(t)))return e}if(e=nextHash(),usingWeakMap)weakMap.set(t,e);else{if(void 0!==isExtensible&&!1===isExtensible(t))throw new Error("Non-extensible objects are not allowed as keys.");if(canDefineProperty)Object.defineProperty(t,UID_HASH_KEY,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[UID_HASH_KEY]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[UID_HASH_KEY]=e}}return e}var isExtensible=Object.isExtensible,canDefineProperty=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function getIENodeHash(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function valueOf(t){return t.valueOf!==defaultValueOf&&"function"==typeof t.valueOf?t.valueOf(t):t}function nextHash(){var t=++_objHashUID;return 1073741824&_objHashUID&&(_objHashUID=0),t}var weakMap,usingWeakMap="function"==typeof WeakMap;usingWeakMap&&(weakMap=new WeakMap);var symbolMap=Object.create(null),_objHashUID=0,UID_HASH_KEY="__immutablehash__";"function"==typeof Symbol&&(UID_HASH_KEY=Symbol(UID_HASH_KEY));var STRING_HASH_CACHE_MIN_STRLEN=16,STRING_HASH_CACHE_MAX_SIZE=255,STRING_HASH_CACHE_SIZE=0,stringHashCache={},ToKeyedSequence=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=reverseFactory(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var r=this,n=mapFactory(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e,n){return t(e,n,r)},e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(KeyedSeq);ToKeyedSequence.prototype[IS_ORDERED_SYMBOL]=!0;var ToIndexedSequence=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this,n=0;return e&&ensureSize(this),this._iter.__iterate(function(o){return t(o,e?r.size-++n:n++,r)},e)},e.prototype.__iterator=function(t,e){var r=this,n=this._iter.__iterator(ITERATE_VALUES,e),o=0;return e&&ensureSize(this),new Iterator(function(){var i=n.next();return i.done?i:iteratorValue(t,e?r.size-++o:o++,i.value,i)})},e}(IndexedSeq),ToSetSequence=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(ITERATE_VALUES,e);return new Iterator(function(){var e=r.next();return e.done?e:iteratorValue(t,e.value,e.value,e)})},e}(SetSeq),FromEntriesSequence=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){validateEntry(e);var n=isCollection(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(ITERATE_VALUES,e);return new Iterator(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){validateEntry(n);var o=isCollection(n);return iteratorValue(t,o?n.get(0):n[0],o?n.get(1):n[1],e)}}})},e}(KeyedSeq);function flipFactory(t){var e=makeSequence(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=cacheResultThrough,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return!1!==e(r,t,n)},r)},e.__iteratorUncached=function(e,r){if(e===ITERATE_ENTRIES){var n=t.__iterator(e,r);return new Iterator(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===ITERATE_VALUES?ITERATE_KEYS:ITERATE_VALUES,r)},e}function mapFactory(t,e,r){var n=makeSequence(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,o){var i=t.get(n,NOT_SET);return i===NOT_SET?o:e.call(r,i,n,t)},n.__iterateUncached=function(n,o){var i=this;return t.__iterate(function(t,o,a){return!1!==n(e.call(r,t,o,a),o,i)},o)},n.__iteratorUncached=function(n,o){var i=t.__iterator(ITERATE_ENTRIES,o);return new Iterator(function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return iteratorValue(n,u,e.call(r,a[1],u,t),o)})},n}function reverseFactory(t,e){var r=this,n=makeSequence(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=flipFactory(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=cacheResultThrough,n.__iterate=function(r,n){var o=this,i=0;return n&&ensureSize(t),t.__iterate(function(t,a){return r(t,e?a:n?o.size-++i:i++,o)},!n)},n.__iterator=function(n,o){var i=0;o&&ensureSize(t);var a=t.__iterator(ITERATE_ENTRIES,!o);return new Iterator(function(){var t=a.next();if(t.done)return t;var u=t.value;return iteratorValue(n,e?u[0]:o?r.size-++i:i++,u[1],t)})},n}function filterFactory(t,e,r,n){var o=makeSequence(t);return n&&(o.has=function(n){var o=t.get(n,NOT_SET);return o!==NOT_SET&&!!e.call(r,o,n,t)},o.get=function(n,o){var i=t.get(n,NOT_SET);return i!==NOT_SET&&e.call(r,i,n,t)?i:o}),o.__iterateUncached=function(o,i){var a=this,u=0;return t.__iterate(function(t,i,s){if(e.call(r,t,i,s))return u++,o(t,n?i:u-1,a)},i),u},o.__iteratorUncached=function(o,i){var a=t.__iterator(ITERATE_ENTRIES,i),u=0;return new Iterator(function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,c=s[0],p=s[1];if(e.call(r,p,c,t))return iteratorValue(o,n?c:u++,p,i)}})},o}function countByFactory(t,e,r){var n=Map().asMutable();return t.__iterate(function(o,i){n.update(e.call(r,o,i,t),0,function(t){return t+1})}),n.asImmutable()}function groupByFactory(t,e,r){var n=isKeyed(t),o=(isOrdered(t)?OrderedMap():Map()).asMutable();t.__iterate(function(i,a){o.update(e.call(r,i,a,t),function(t){return(t=t||[]).push(n?[a,i]:i),t})});var i=collectionClass(t);return o.map(function(e){return reify(t,i(e))}).asImmutable()}function partitionFactory(t,e,r){var n=isKeyed(t),o=[[],[]];t.__iterate(function(i,a){o[e.call(r,i,a,t)?1:0].push(n?[a,i]:i)});var i=collectionClass(t);return o.map(function(e){return reify(t,i(e))})}function sliceFactory(t,e,r,n){var o=t.size;if(wholeSlice(e,r,o))return t;if(void 0===o&&(e<0||r<0))return sliceFactory(t.toSeq().cacheResult(),e,r,n);var i,a=resolveBegin(e,o),u=resolveEnd(r,o)-a;u==u&&(i=u<0?0:u);var s=makeSequence(t);return s.size=0===i?i:t.size&&i||void 0,!n&&isSeq(t)&&i>=0&&(s.get=function(e,r){return(e=wrapIndex(this,e))>=0&&e<i?t.get(e+a,r):r}),s.__iterateUncached=function(e,r){var o=this;if(0===i)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,s=!0,c=0;return t.__iterate(function(t,r){if(!s||!(s=u++<a))return c++,!1!==e(t,n?r:c-1,o)&&c!==i}),c},s.__iteratorUncached=function(e,r){if(0!==i&&r)return this.cacheResult().__iterator(e,r);if(0===i)return new Iterator(iteratorDone);var o=t.__iterator(e,r),u=0,s=0;return new Iterator(function(){for(;u++<a;)o.next();if(++s>i)return iteratorDone();var t=o.next();return n||e===ITERATE_VALUES||t.done?t:iteratorValue(e,s-1,e===ITERATE_KEYS?void 0:t.value[1],t)})},s}function takeWhileFactory(t,e,r){var n=makeSequence(t);return n.__iterateUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterate(n,o);var a=0;return t.__iterate(function(t,o,u){return e.call(r,t,o,u)&&++a&&n(t,o,i)}),a},n.__iteratorUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterator(n,o);var a=t.__iterator(ITERATE_ENTRIES,o),u=!0;return new Iterator(function(){if(!u)return iteratorDone();var t=a.next();if(t.done)return t;var o=t.value,s=o[0],c=o[1];return e.call(r,c,s,i)?n===ITERATE_ENTRIES?t:iteratorValue(n,s,c,t):(u=!1,iteratorDone())})},n}function skipWhileFactory(t,e,r,n){var o=makeSequence(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return t.__iterate(function(t,i,c){if(!u||!(u=e.call(r,t,i,c)))return s++,o(t,n?i:s-1,a)}),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=t.__iterator(ITERATE_ENTRIES,i),s=!0,c=0;return new Iterator(function(){var t,i,p;do{if((t=u.next()).done)return n||o===ITERATE_VALUES?t:iteratorValue(o,c++,o===ITERATE_KEYS?void 0:t.value[1],t);var h=t.value;i=h[0],p=h[1],s&&(s=e.call(r,p,i,a))}while(s);return o===ITERATE_ENTRIES?t:iteratorValue(o,i,p,t)})},o}ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough;var ConcatSeq=function(t){function e(t){this._wrappedIterables=t.flatMap(function(t){return t._wrappedIterables?t._wrappedIterables:[t]}),this.size=this._wrappedIterables.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),this[IS_KEYED_SYMBOL]=this._wrappedIterables[0][IS_KEYED_SYMBOL],this[IS_INDEXED_SYMBOL]=this._wrappedIterables[0][IS_INDEXED_SYMBOL],this[IS_ORDERED_SYMBOL]=this._wrappedIterables[0][IS_ORDERED_SYMBOL]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(0!==this._wrappedIterables.length){if(e)return this.cacheResult().__iterate(t,e);for(var r=0,n=isKeyed(this),o=n?ITERATE_ENTRIES:ITERATE_VALUES,i=this._wrappedIterables[r].__iterator(o,e),a=!0,u=0;a;){for(var s=i.next();s.done;){if(++r===this._wrappedIterables.length)return u;s=(i=this._wrappedIterables[r].__iterator(o,e)).next()}a=!1!==(n?t(s.value[1],s.value[0],this):t(s.value,u,this)),u++}return u}},e.prototype.__iteratorUncached=function(t,e){var r=this;if(0===this._wrappedIterables.length)return new Iterator(iteratorDone);if(e)return this.cacheResult().__iterator(t,e);var n=0,o=this._wrappedIterables[n].__iterator(t,e);return new Iterator(function(){for(var i=o.next();i.done;){if(++n===r._wrappedIterables.length)return i;i=(o=r._wrappedIterables[n].__iterator(t,e)).next()}return i})},e}(Seq);function concatFactory(t,e){var r=isKeyed(t),n=[t].concat(e).map(function(t){return isCollection(t)?r&&(t=KeyedCollection(t)):t=r?keyedSeqFromValue(t):indexedSeqFromValue(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var o=n[0];if(o===t||r&&isKeyed(o)||isIndexed(t)&&isIndexed(o))return o}return new ConcatSeq(n)}function flattenFactory(t,e,r){var n=makeSequence(t);return n.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var a=0,u=!1;return function t(s,c){s.__iterate(function(i,s){return(!e||c<e)&&isCollection(i)?t(i,c+1):(a++,!1===o(i,r?s:a-1,n)&&(u=!0)),!u},i)}(t,0),a},n.__iteratorUncached=function(n,o){if(o)return this.cacheResult().__iterator(n,o);var i=t.__iterator(n,o),a=[],u=0;return new Iterator(function(){for(;i;){var t=i.next();if(!1===t.done){var s=t.value;if(n===ITERATE_ENTRIES&&(s=s[1]),e&&!(a.length<e)||!isCollection(s))return r?t:iteratorValue(n,u++,s,t);a.push(i),i=s.__iterator(n,o)}else i=a.pop()}return iteratorDone()})},n}function flatMapFactory(t,e,r){var n=collectionClass(t);return t.toSeq().map(function(o,i){return n(e.call(r,o,i,t))}).flatten(!0)}function interposeFactory(t,e){var r=makeSequence(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var o=this,i=0;return t.__iterate(function(t){return(!i||!1!==r(e,i++,o))&&!1!==r(t,i++,o)},n),i},r.__iteratorUncached=function(r,n){var o,i=t.__iterator(ITERATE_VALUES,n),a=0;return new Iterator(function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?iteratorValue(r,a++,e):iteratorValue(r,a++,o.value,o)})},r}function sortFactory(t,e,r){e||(e=defaultComparator);var n=isKeyed(t),o=0,i=t.toSeq().map(function(e,n){return[n,e,o++,r?r(e,n,t):e]}).valueSeq().toArray();return i.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){i[e].length=2}:function(t,e){i[e]=t[1]}),n?KeyedSeq(i):isIndexed(t)?IndexedSeq(i):SetSeq(i)}function maxFactory(t,e,r){if(e||(e=defaultComparator),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return maxCompare(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return maxCompare(e,t,r)?r:t})}function maxCompare(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function zipWithFactory(t,e,r,n){var o=makeSequence(t),i=new ArraySeq(r).map(function(t){return t.size});return o.size=n?i.max():i.min(),o.__iterate=function(t,e){for(var r,n=this.__iterator(ITERATE_VALUES,e),o=0;!(r=n.next()).done&&!1!==t(r.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=r.map(function(t){return t=Collection(t),getIterator(o?t.reverse():t)}),a=0,u=!1;return new Iterator(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=n?r.every(function(t){return t.done}):r.some(function(t){return t.done})),u?iteratorDone():iteratorValue(t,a++,e.apply(null,r.map(function(t){return t.value})))})},o}function reify(t,e){return t===e?t:isSeq(t)?e:t.constructor(e)}function validateEntry(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function collectionClass(t){return isKeyed(t)?KeyedCollection:isIndexed(t)?IndexedCollection:SetCollection}function makeSequence(t){return Object.create((isKeyed(t)?KeyedSeq:isIndexed(t)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function isValueObject(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function is(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(isValueObject(t)&&isValueObject(e)&&t.equals(e))}function update$1(t,e,r,n){return updateIn(t,[e],r,n)}function merge$1(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return mergeIntoKeyedWith(this,t)}function mergeWith$1(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return mergeIntoKeyedWith(this,e,t)}function mergeIntoKeyedWith(t,e,r){for(var n=[],o=0;o<e.length;o++){var i=KeyedCollection(e[o]);0!==i.size&&n.push(i)}return 0===n.length?t:0!==t.toSeq().size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var e=r?function(e,n){update$1(t,n,NOT_SET,function(t){return t===NOT_SET?e:r(t,e,n)})}:function(e,r){t.set(r,e)},o=0;o<n.length;o++)n[o].forEach(e)}):isRecord(t)?t:t.constructor(n[0])}var toString=Object.prototype.toString;function isPlainObject(t){if(!t||"object"!=typeof t||"[object Object]"!==toString.call(t))return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var r=e,n=Object.getPrototypeOf(e);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===e}function isDataStructure(t){return"object"==typeof t&&(isImmutable(t)||Array.isArray(t)||isPlainObject(t))}function isProtoKey(t){return"string"==typeof t&&("__proto__"===t||"constructor"===t)}function arrCopy(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),o=0;o<r;o++)n[o]=t[o+e];return n}function shallowCopy(t){if(Array.isArray(t))return arrCopy(t);var e={};for(var r in t)isProtoKey(r)||hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function merge(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return mergeWithSources(t,e)}function mergeWith(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return mergeWithSources(e,r,t)}function mergeDeep$1(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return mergeDeepWithSources(t,e)}function mergeDeepWith$1(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return mergeDeepWithSources(e,r,t)}function mergeDeepWithSources(t,e,r){return mergeWithSources(t,e,deepMergerWith(r))}function mergeWithSources(t,e,r){if(!isDataStructure(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(isImmutable(t))return"function"==typeof r&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),o=t,i=n?IndexedCollection:KeyedCollection,a=n?function(e){o===t&&(o=shallowCopy(o)),o.push(e)}:function(e,n){if(!isProtoKey(n)){var i=hasOwnProperty.call(o,n),a=i&&r?r(o[n],e,n):e;i&&a===o[n]||(o===t&&(o=shallowCopy(o)),o[n]=a)}},u=0;u<e.length;u++)i(e[u]).forEach(a);return o}function deepMergerWith(t){return function e(r,n,o){return isDataStructure(r)&&isDataStructure(n)&&areMergeable(r,n)?mergeWithSources(r,[n],e):t?t(r,n,o):n}}function areMergeable(t,e){var r=Seq(t),n=Seq(e);return isIndexed(r)===isIndexed(n)&&isKeyed(r)===isKeyed(n)}function mergeDeep(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return mergeDeepWithSources(this,t)}function mergeDeepWith(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return mergeDeepWithSources(this,e,t)}function mergeDeepIn(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return updateIn(this,t,emptyMap(),function(t){return mergeDeepWithSources(t,e)})}function mergeIn(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return updateIn(this,t,emptyMap(),function(t){return mergeWithSources(t,e)})}function setIn$1(t,e,r){return updateIn(t,e,NOT_SET,function(){return r})}function setIn(t,e){return setIn$1(this,t,e)}function update(t,e,r){return 1===arguments.length?t(this):update$1(this,t,e,r)}function updateIn$1(t,e,r){return updateIn(this,t,e,r)}function wasAltered(){return this.__altered}function withMutations(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}var IS_MAP_SYMBOL="@@__IMMUTABLE_MAP__@@";function isMap(t){return Boolean(t&&t[IS_MAP_SYMBOL])}function invariant(t,e){if(!t)throw new Error(e)}function assertNotInfinite(t){invariant(t!==1/0,"Cannot perform this action with an infinite size.")}var Map=function(t){function e(e){return null==e?emptyMap():isMap(e)&&!isOrdered(e)?e:emptyMap().withMutations(function(r){var n=t(e);assertNotInfinite(n.size),n.forEach(function(t,e){return r.set(e,t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return updateMap(this,t,e)},e.prototype.remove=function(t){return updateMap(this,t,NOT_SET)},e.prototype.deleteAll=function(t){var e=Collection(t);return 0===e.size?this:this.withMutations(function(t){e.forEach(function(e){return t.remove(e)})})},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},e.prototype.sort=function(t){return OrderedMap(sortFactory(this,t))},e.prototype.sortBy=function(t,e){return OrderedMap(sortFactory(this,e,t))},e.prototype.map=function(t,e){var r=this;return this.withMutations(function(n){n.forEach(function(o,i){n.set(i,t.call(e,o,i,r))})})},e.prototype.__iterator=function(t,e){return new MapIterator(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?makeMap(this.size,this._root,t,this.__hash):0===this.size?emptyMap():(this.__ownerID=t,this.__altered=!1,this)},e}(KeyedCollection);Map.isMap=isMap;var MapPrototype=Map.prototype;MapPrototype[IS_MAP_SYMBOL]=!0,MapPrototype[DELETE]=MapPrototype.remove,MapPrototype.removeAll=MapPrototype.deleteAll,MapPrototype.setIn=setIn,MapPrototype.removeIn=MapPrototype.deleteIn=deleteIn,MapPrototype.update=update,MapPrototype.updateIn=updateIn$1,MapPrototype.merge=MapPrototype.concat=merge$1,MapPrototype.mergeWith=mergeWith$1,MapPrototype.mergeDeep=mergeDeep,MapPrototype.mergeDeepWith=mergeDeepWith,MapPrototype.mergeIn=mergeIn,MapPrototype.mergeDeepIn=mergeDeepIn,MapPrototype.withMutations=withMutations,MapPrototype.wasAltered=wasAltered,MapPrototype.asImmutable=asImmutable,MapPrototype["@@transducer/init"]=MapPrototype.asMutable=asMutable,MapPrototype["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},MapPrototype["@@transducer/result"]=function(t){return t.asImmutable()};var ArrayMapNode=function(t,e){this.ownerID=t,this.entries=e};ArrayMapNode.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(is(r,o[i][0]))return o[i][1];return n},ArrayMapNode.prototype.update=function(t,e,r,n,o,i,a){for(var u=o===NOT_SET,s=this.entries,c=0,p=s.length;c<p&&!is(n,s[c][0]);c++);var h=c<p;if(h?s[c][1]===o:u)return this;if(SetRef(a),(u||!h)&&SetRef(i),!u||1!==s.length){if(!h&&!u&&s.length>=MAX_ARRAY_MAP_SIZE)return createNodes(t,s,n,o);var f=t&&t===this.ownerID,_=f?s:arrCopy(s);return h?u?c===p-1?_.pop():_[c]=_.pop():_[c]=[n,o]:_.push([n,o]),f?(this.entries=_,this):new ArrayMapNode(t,_)}};var BitmapIndexedNode=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};BitmapIndexedNode.prototype.get=function(t,e,r,n){void 0===e&&(e=hash(r));var o=1<<((0===t?e:e>>>t)&MASK),i=this.bitmap;return 0===(i&o)?n:this.nodes[popCount(i&o-1)].get(t+SHIFT,e,r,n)},BitmapIndexedNode.prototype.update=function(t,e,r,n,o,i,a){void 0===r&&(r=hash(n));var u=(0===e?r:r>>>e)&MASK,s=1<<u,c=this.bitmap,p=0!==(c&s);if(!p&&o===NOT_SET)return this;var h=popCount(c&s-1),f=this.nodes,_=p?f[h]:void 0,l=updateNode(_,t,e+SHIFT,r,n,o,i,a);if(l===_)return this;if(!p&&l&&f.length>=MAX_BITMAP_INDEXED_SIZE)return expandNodes(t,f,c,u,l);if(p&&!l&&2===f.length&&isLeafNode(f[1^h]))return f[1^h];if(p&&l&&1===f.length&&isLeafNode(l))return l;var d=t&&t===this.ownerID,y=p?l?c:c^s:c|s,S=p?l?setAt(f,h,l,d):spliceOut(f,h,d):spliceIn(f,h,l,d);return d?(this.bitmap=y,this.nodes=S,this):new BitmapIndexedNode(t,y,S)};var HashArrayMapNode=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};HashArrayMapNode.prototype.get=function(t,e,r,n){void 0===e&&(e=hash(r));var o=(0===t?e:e>>>t)&MASK,i=this.nodes[o];return i?i.get(t+SHIFT,e,r,n):n},HashArrayMapNode.prototype.update=function(t,e,r,n,o,i,a){void 0===r&&(r=hash(n));var u=(0===e?r:r>>>e)&MASK,s=o===NOT_SET,c=this.nodes,p=c[u];if(s&&!p)return this;var h=updateNode(p,t,e+SHIFT,r,n,o,i,a);if(h===p)return this;var f=this.count;if(p){if(!h&&--f<MIN_HASH_ARRAY_MAP_SIZE)return packNodes(t,c,f,u)}else f++;var _=t&&t===this.ownerID,l=setAt(c,u,h,_);return _?(this.count=f,this.nodes=l,this):new HashArrayMapNode(t,f,l)};var HashCollisionNode=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};HashCollisionNode.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(is(r,o[i][0]))return o[i][1];return n},HashCollisionNode.prototype.update=function(t,e,r,n,o,i,a){void 0===r&&(r=hash(n));var u=o===NOT_SET;if(r!==this.keyHash)return u?this:(SetRef(a),SetRef(i),mergeIntoNode(this,t,e,r,[n,o]));for(var s=this.entries,c=0,p=s.length;c<p&&!is(n,s[c][0]);c++);var h=c<p;if(h?s[c][1]===o:u)return this;if(SetRef(a),(u||!h)&&SetRef(i),u&&2===p)return new ValueNode(t,this.keyHash,s[1^c]);var f=t&&t===this.ownerID,_=f?s:arrCopy(s);return h?u?c===p-1?_.pop():_[c]=_.pop():_[c]=[n,o]:_.push([n,o]),f?(this.entries=_,this):new HashCollisionNode(t,this.keyHash,_)};var ValueNode=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};ValueNode.prototype.get=function(t,e,r,n){return is(r,this.entry[0])?this.entry[1]:n},ValueNode.prototype.update=function(t,e,r,n,o,i,a){var u=o===NOT_SET,s=is(n,this.entry[0]);return(s?o===this.entry[1]:u)?this:(SetRef(a),u?void SetRef(i):s?t&&t===this.ownerID?(this.entry[1]=o,this):new ValueNode(t,this.keyHash,[n,o]):(SetRef(i),mergeIntoNode(this,t,e,hash(n),[n,o])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(t,e){for(var r=this.entries,n=0,o=r.length-1;n<=o;n++)if(!1===t(r[e?o-n:n]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,o=r.length-1;n<=o;n++){var i=r[e?o-n:n];if(i&&!1===i.iterate(t,e))return!1}},ValueNode.prototype.iterate=function(t,e){return t(this.entry)};var EMPTY_MAP,MapIterator=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&mapIteratorFrame(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,o=void 0;if(r.entry){if(0===n)return mapIteratorValue(t,r.entry)}else if(r.entries){if(n<=(o=r.entries.length-1))return mapIteratorValue(t,r.entries[this._reverse?o-n:n])}else if(n<=(o=r.nodes.length-1)){var i=r.nodes[this._reverse?o-n:n];if(i){if(i.entry)return mapIteratorValue(t,i.entry);e=this._stack=mapIteratorFrame(i,e)}continue}e=this._stack=this._stack.__prev}return iteratorDone()},e}(Iterator);function mapIteratorValue(t,e){return iteratorValue(t,e[0],e[1])}function mapIteratorFrame(t,e){return{node:t,index:0,__prev:e}}function makeMap(t,e,r,n){var o=Object.create(MapPrototype);return o.size=t,o._root=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function emptyMap(){return EMPTY_MAP||(EMPTY_MAP=makeMap(0))}function updateMap(t,e,r){var n,o;if(t._root){var i=MakeRef(),a=MakeRef();if(n=updateNode(t._root,t.__ownerID,0,void 0,e,r,i,a),!a.value)return t;o=t.size+(i.value?r===NOT_SET?-1:1:0)}else{if(r===NOT_SET)return t;o=1,n=new ArrayMapNode(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=o,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?makeMap(o,n):emptyMap()}function updateNode(t,e,r,n,o,i,a,u){return t?t.update(e,r,n,o,i,a,u):i===NOT_SET?t:(SetRef(u),SetRef(a),new ValueNode(e,n,[o,i]))}function isLeafNode(t){return t.constructor===ValueNode||t.constructor===HashCollisionNode}function mergeIntoNode(t,e,r,n,o){if(t.keyHash===n)return new HashCollisionNode(e,n,[t.entry,o]);var i,a=(0===r?t.keyHash:t.keyHash>>>r)&MASK,u=(0===r?n:n>>>r)&MASK,s=a===u?[mergeIntoNode(t,e,r+SHIFT,n,o)]:(i=new ValueNode(e,n,o),a<u?[t,i]:[i,t]);return new BitmapIndexedNode(e,1<<a|1<<u,s)}function createNodes(t,e,r,n){t||(t=new OwnerID);for(var o=new ValueNode(t,hash(r),[r,n]),i=0;i<e.length;i++){var a=e[i];o=o.update(t,0,void 0,a[0],a[1])}return o}function packNodes(t,e,r,n){for(var o=0,i=0,a=new Array(r),u=0,s=1,c=e.length;u<c;u++,s<<=1){var p=e[u];void 0!==p&&u!==n&&(o|=s,a[i++]=p)}return new BitmapIndexedNode(t,o,a)}function expandNodes(t,e,r,n,o){for(var i=0,a=new Array(SIZE),u=0;0!==r;u++,r>>>=1)a[u]=1&r?e[i++]:void 0;return a[n]=o,new HashArrayMapNode(t,i+1,a)}function popCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function setAt(t,e,r,n){var o=n?t:arrCopy(t);return o[e]=r,o}function spliceIn(t,e,r,n){var o=t.length+1;if(n&&e+1===o)return t[e]=r,t;for(var i=new Array(o),a=0,u=0;u<o;u++)u===e?(i[u]=r,a=-1):i[u]=t[u+a];return i}function spliceOut(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var o=new Array(n),i=0,a=0;a<n;a++)a===e&&(i=1),o[a]=t[a+i];return o}var MAX_ARRAY_MAP_SIZE=SIZE/4,MAX_BITMAP_INDEXED_SIZE=SIZE/2,MIN_HASH_ARRAY_MAP_SIZE=SIZE/4;function coerceKeyPath(t){if(isArrayLike(t)&&"string"!=typeof t)return t;if(isOrdered(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function quoteString(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function has(t,e){return isImmutable(t)?t.has(e):isDataStructure(t)&&hasOwnProperty.call(t,e)}function get(t,e,r){return isImmutable(t)?t.get(e,r):has(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function remove(t,e){if(!isDataStructure(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(isImmutable(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!hasOwnProperty.call(t,e))return t;var r=shallowCopy(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function set(t,e,r){if("string"==typeof e&&isProtoKey(e))return t;if(!isDataStructure(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(isImmutable(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(hasOwnProperty.call(t,e)&&r===t[e])return t;var n=shallowCopy(t);return n[e]=r,n}function updateIn(t,e,r,n){n||(n=r,r=void 0);var o=updateInDeeply(isImmutable(t),t,coerceKeyPath(e),0,r,n);return o===NOT_SET?r:o}function updateInDeeply(t,e,r,n,o,i){var a=e===NOT_SET;if(n===r.length){var u=a?o:e,s=i(u);return s===u?e:s}if(!a&&!isDataStructure(e))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(r).slice(0,n).map(quoteString)+"]: "+e);var c=r[n],p=a?NOT_SET:get(e,c,NOT_SET),h=updateInDeeply(p===NOT_SET?t:isImmutable(p),p,r,n+1,o,i);return h===p?e:h===NOT_SET?remove(e,c):set(a?t?emptyMap():{}:e,c,h)}function removeIn(t,e){return updateIn(t,e,function(){return NOT_SET})}function deleteIn(t){return removeIn(this,t)}var IS_LIST_SYMBOL="@@__IMMUTABLE_LIST__@@";function isList(t){return Boolean(t&&t[IS_LIST_SYMBOL])}var List=function(t){function e(e){var r=emptyList();if(null==e)return r;if(isList(e))return e;var n=t(e),o=n.size;return 0===o?r:(assertNotInfinite(o),o>0&&o<SIZE?makeList(0,o,SHIFT,null,new VNode(n.toArray())):r.withMutations(function(t){t.setSize(o),n.forEach(function(e,r){return t.set(r,e)})}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=wrapIndex(this,t))>=0&&t<this.size){var r=listNodeFor(this,t+=this._origin);return r&&r.array[t&MASK]}return e},e.prototype.set=function(t,e){return updateList(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=SHIFT,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):emptyList()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){setListBounds(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])})},e.prototype.pop=function(){return setListBounds(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){setListBounds(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])})},e.prototype.shift=function(){return setListBounds(this,1)},e.prototype.shuffle=function(t){return void 0===t&&(t=Math.random),this.withMutations(function(e){for(var r,n,o=e.size;o;)r=Math.floor(t()*o--),n=e.get(r),e.set(r,e.get(o)),e.set(o,n)})},e.prototype.concat=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++){var o=e[n],i=t("string"!=typeof o&&hasIterator(o)?o:[o]);0!==i.size&&r.push(i)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(t){r.forEach(function(e){return e.forEach(function(e){return t.push(e)})})}):this.constructor(r[0])},e.prototype.setSize=function(t){return setListBounds(this,0,t)},e.prototype.map=function(t,e){var r=this;return this.withMutations(function(n){for(var o=0;o<r.size;o++)n.set(o,t.call(e,n.get(o),o,r))})},e.prototype.slice=function(t,e){var r=this.size;return wholeSlice(t,e,r)?this:setListBounds(this,resolveBegin(t,r),resolveEnd(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=iterateList(this,e);return new Iterator(function(){var o=n();return o===DONE?iteratorDone():iteratorValue(t,e?--r:r++,o)})},e.prototype.__iterate=function(t,e){for(var r,n=e?this.size:0,o=iterateList(this,e);(r=o())!==DONE&&!1!==t(r,e?--n:n++,this););return n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?makeList(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?emptyList():(this.__ownerID=t,this.__altered=!1,this)},e}(IndexedCollection);List.isList=isList;var ListPrototype=List.prototype;ListPrototype[IS_LIST_SYMBOL]=!0,ListPrototype[DELETE]=ListPrototype.remove,ListPrototype.merge=ListPrototype.concat,ListPrototype.setIn=setIn,ListPrototype.deleteIn=ListPrototype.removeIn=deleteIn,ListPrototype.update=update,ListPrototype.updateIn=updateIn$1,ListPrototype.mergeIn=mergeIn,ListPrototype.mergeDeepIn=mergeDeepIn,ListPrototype.withMutations=withMutations,ListPrototype.wasAltered=wasAltered,ListPrototype.asImmutable=asImmutable,ListPrototype["@@transducer/init"]=ListPrototype.asMutable=asMutable,ListPrototype["@@transducer/step"]=function(t,e){return t.push(e)},ListPrototype["@@transducer/result"]=function(t){return t.asImmutable()};var VNode=function(t,e){this.array=t,this.ownerID=e};VNode.prototype.removeBefore=function(t,e,r){if(!(r&(1<<e+SHIFT)-1)||0===this.array.length)return this;var n=r>>>e&MASK;if(n>=this.array.length)return new VNode([],t);var o,i=0===n;if(e>0){var a=this.array[n];if((o=a&&a.removeBefore(t,e-SHIFT,r))===a&&i)return this}if(i&&!o)return this;var u=editableVNode(this,t);if(!i)for(var s=0;s<n;s++)u.array[s]=void 0;return o&&(u.array[n]=o),u},VNode.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e+SHIFT:SIZE)||0===this.array.length)return this;var n,o=r-1>>>e&MASK;if(o>=this.array.length)return this;if(e>0){var i=this.array[o];if((n=i&&i.removeAfter(t,e-SHIFT,r))===i&&o===this.array.length-1)return this}var a=editableVNode(this,t);return a.array.splice(o+1),n&&(a.array[o]=n),a};var DONE={};function iterateList(t,e){var r=t._origin,n=t._capacity,o=getTailOffset(n),i=t._tail;return a(t._root,t._level,0);function a(t,u,s){return 0===u?function(t,a){var u=a===o?i&&i.array:t&&t.array,s=a>r?0:r-a,c=n-a;c>SIZE&&(c=SIZE);return function(){if(s===c)return DONE;var t=e?--c:s++;return u&&u[t]}}(t,s):function(t,o,i){var u,s=t&&t.array,c=i>r?0:r-i>>o,p=1+(n-i>>o);p>SIZE&&(p=SIZE);return function(){for(;;){if(u){var t=u();if(t!==DONE)return t;u=null}if(c===p)return DONE;var r=e?--p:c++;u=a(s&&s[r],o-SHIFT,i+(r<<o))}}}(t,u,s)}}function makeList(t,e,r,n,o,i,a){var u=Object.create(ListPrototype);return u.size=e-t,u._origin=t,u._capacity=e,u._level=r,u._root=n,u._tail=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function emptyList(){return makeList(0,0,SHIFT)}function updateList(t,e,r){if((e=wrapIndex(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?setListBounds(t,e).set(0,r):setListBounds(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,o=t._root,i=MakeRef();return e>=getTailOffset(t._capacity)?n=updateVNode(n,t.__ownerID,0,e,r,i):o=updateVNode(o,t.__ownerID,t._level,e,r,i),i.value?t.__ownerID?(t._root=o,t._tail=n,t.__hash=void 0,t.__altered=!0,t):makeList(t._origin,t._capacity,t._level,o,n):t}function updateVNode(t,e,r,n,o,i){var a,u=n>>>r&MASK,s=t&&u<t.array.length;if(!s&&void 0===o)return t;if(r>0){var c=t&&t.array[u],p=updateVNode(c,e,r-SHIFT,n,o,i);return p===c?t:((a=editableVNode(t,e)).array[u]=p,a)}return s&&t.array[u]===o?t:(i&&SetRef(i),a=editableVNode(t,e),void 0===o&&u===a.array.length-1?a.array.pop():a.array[u]=o,a)}function editableVNode(t,e){return e&&t&&e===t.ownerID?t:new VNode(t?t.array.slice():[],e)}function listNodeFor(t,e){if(e>=getTailOffset(t._capacity))return t._tail;if(e<1<<t._level+SHIFT){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&MASK],n-=SHIFT;return r}}function setListBounds(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new OwnerID,o=t._origin,i=t._capacity,a=o+e,u=void 0===r?i:r<0?i+r:o+r;if(a===o&&u===i)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,p=0;a+p<0;)c=new VNode(c&&c.array.length?[void 0,c]:[],n),p+=1<<(s+=SHIFT);p&&(a+=p,o+=p,u+=p,i+=p);for(var h=getTailOffset(i),f=getTailOffset(u);f>=1<<s+SHIFT;)c=new VNode(c&&c.array.length?[c]:[],n),s+=SHIFT;var _=t._tail,l=f<h?listNodeFor(t,u-1):f>h?new VNode([],n):_;if(_&&f>h&&a<i&&_.array.length){for(var d=c=editableVNode(c,n),y=s;y>SHIFT;y-=SHIFT){var S=h>>>y&MASK;d=d.array[S]=editableVNode(d.array[S],n)}d.array[h>>>SHIFT&MASK]=_}if(u<i&&(l=l&&l.removeAfter(n,0,u)),a>=f)a-=f,u-=f,s=SHIFT,c=null,l=l&&l.removeBefore(n,0,a);else if(a>o||f<h){for(p=0;c;){var v=a>>>s&MASK;if(v!==f>>>s&MASK)break;v&&(p+=(1<<s)*v),s-=SHIFT,c=c.array[v]}c&&a>o&&(c=c.removeBefore(n,s,a-p)),c&&f<h&&(c=c.removeAfter(n,s,f-p)),p&&(a-=p,u-=p)}return t.__ownerID?(t.size=u-a,t._origin=a,t._capacity=u,t._level=s,t._root=c,t._tail=l,t.__hash=void 0,t.__altered=!0,t):makeList(a,u,s,c,l)}function getTailOffset(t){return t<SIZE?0:t-1>>>SHIFT<<SHIFT}function isOrderedMap(t){return isMap(t)&&isOrdered(t)}var EMPTY_ORDERED_MAP,OrderedMap=function(t){function e(t){return null==t?emptyOrderedMap():isOrderedMap(t)?t:emptyOrderedMap().withMutations(function(e){var r=KeyedCollection(t);assertNotInfinite(r.size),r.forEach(function(t,r){return e.set(r,t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):emptyOrderedMap()},e.prototype.set=function(t,e){return updateOrderedMap(this,t,e)},e.prototype.remove=function(t){return updateOrderedMap(this,t,NOT_SET)},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?makeOrderedMap(e,r,t,this.__hash):0===this.size?emptyOrderedMap():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=r,this)},e}(Map);function makeOrderedMap(t,e,r,n){var o=Object.create(OrderedMap.prototype);return o.size=t?t.size:0,o._map=t,o._list=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function emptyOrderedMap(){return EMPTY_ORDERED_MAP||(EMPTY_ORDERED_MAP=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(t,e,r){var n,o,i=t._map,a=t._list,u=i.get(e),s=void 0!==u;if(r===NOT_SET){if(!s)return t;a.size>=SIZE&&a.size>=2*i.size?(n=(o=a.filter(function(t,e){return void 0!==t&&u!==e})).toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=o.__ownerID=t.__ownerID)):(n=i.remove(e),o=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(r===a.get(u)[1])return t;n=i,o=a.set(u,[e,r])}else n=i.set(e,a.size),o=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=o,t.__hash=void 0,t.__altered=!0,t):makeOrderedMap(n,o)}OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[IS_ORDERED_SYMBOL]=!0,OrderedMap.prototype[DELETE]=OrderedMap.prototype.remove;var IS_STACK_SYMBOL="@@__IMMUTABLE_STACK__@@";function isStack(t){return Boolean(t&&t[IS_STACK_SYMBOL])}var Stack=function(t){function e(t){return null==t?emptyStack():isStack(t)?t:emptyStack().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=wrapIndex(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):makeStack(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&isStack(e))return e;assertNotInfinite(e.size);var r=this.size,n=this._head;return e.__iterate(function(t){r++,n={value:t,next:n}},!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):makeStack(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},e.prototype.slice=function(e,r){if(wholeSlice(e,r,this.size))return this;var n=resolveBegin(e,this.size);if(resolveEnd(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(o,i)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?makeStack(this.size,this._head,t,this.__hash):0===this.size?emptyStack():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new ArraySeq(this.toArray()).__iterate(function(e,n){return t(e,n,r)},e);for(var n=0,o=this._head;o&&!1!==t(o.value,n++,this);)o=o.next;return n},e.prototype.__iterator=function(t,e){if(e)return new ArraySeq(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new Iterator(function(){if(n){var e=n.value;return n=n.next,iteratorValue(t,r++,e)}return iteratorDone()})},e}(IndexedCollection);Stack.isStack=isStack;var EMPTY_STACK,StackPrototype=Stack.prototype;function makeStack(t,e,r,n){var o=Object.create(StackPrototype);return o.size=t,o._head=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function emptyStack(){return EMPTY_STACK||(EMPTY_STACK=makeStack(0))}function reduce(t,e,r,n,o,i){return assertNotInfinite(t.size),t.__iterate(function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)},i),r}function keyMapper(t,e){return e}function entryMapper(t,e){return[e,t]}function not(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return!t.apply(this,e)}}function neg(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return-t.apply(this,e)}}function defaultNegComparator(t,e){return t<e?1:t>e?-1:0}function deepEqual(t,e){if(t===e)return!0;if(!isCollection(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||isKeyed(t)!==isKeyed(e)||isIndexed(t)!==isIndexed(e)||isOrdered(t)!==isOrdered(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!isAssociative(t);if(isOrdered(t)){var n=t.entries();return e.every(function(t,e){var o=n.next().value;return o&&is(o[1],t)&&(r||is(o[0],e))})&&n.next().done}var o=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{o=!0;var i=t;t=e,e=i}var a=!0,u=e.__iterate(function(e,n){if(r?!t.has(e):o?!is(e,t.get(n,NOT_SET)):!is(t.get(n,NOT_SET),e))return a=!1,!1});return a&&t.size===u}StackPrototype[IS_STACK_SYMBOL]=!0,StackPrototype.shift=StackPrototype.pop,StackPrototype.unshift=StackPrototype.push,StackPrototype.unshiftAll=StackPrototype.pushAll,StackPrototype.withMutations=withMutations,StackPrototype.wasAltered=wasAltered,StackPrototype.asImmutable=asImmutable,StackPrototype["@@transducer/init"]=StackPrototype.asMutable=asMutable,StackPrototype["@@transducer/step"]=function(t,e){return t.unshift(e)},StackPrototype["@@transducer/result"]=function(t){return t.asImmutable()};var EMPTY_RANGE,Range=function(t){function e(t,r,n){if(void 0===n&&(n=1),!(this instanceof e))return new e(t,r,n);if(invariant(0!==n,"Cannot step a Range by 0"),invariant(void 0!==t,"You must define a start value when using Range"),invariant(void 0!==r,"You must define an end value when using Range"),n=Math.abs(n),r<t&&(n=-n),this._start=t,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-t)/n-1)+1),0===this.size){if(EMPTY_RANGE)return EMPTY_RANGE;EMPTY_RANGE=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+wrapIndex(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,r){return wholeSlice(t,r,this.size)?this:(t=resolveBegin(t,this.size),(r=resolveEnd(r,this.size))<=t?new e(0,0):new e(this.get(t,this._end),this.get(r,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;i!==r&&!1!==t(o,e?r-++i:i++,this);)o+=e?-n:n;return i},e.prototype.__iterator=function(t,e){var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;return new Iterator(function(){if(i===r)return iteratorDone();var a=o;return o+=e?-n:n,iteratorValue(t,e?r-++i:i++,a)})},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:deepEqual(this,t)},e}(IndexedSeq),IS_SET_SYMBOL="@@__IMMUTABLE_SET__@@";function isSet(t){return Boolean(t&&t[IS_SET_SYMBOL])}var Set=function(t){function e(e){return null==e?emptySet():isSet(e)&&!isOrdered(e)?e:emptySet().withMutations(function(r){var n=t(e);assertNotInfinite(n.size),n.forEach(function(t){return r.add(t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(KeyedCollection(t).keySeq())},e.intersect=function(t){return(t=Collection(t).toArray()).length?SetPrototype.intersect.apply(e(t.pop()),t):emptySet()},e.union=function(t){return(t=Collection(t).toArray()).length?SetPrototype.union.apply(e(t.pop()),t):emptySet()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return updateSet(this,this._map.set(t,t))},e.prototype.remove=function(t){return updateSet(this,this._map.remove(t))},e.prototype.clear=function(){return updateSet(this,this._map.clear())},e.prototype.map=function(t,e){var r=this,n=!1,o=updateSet(this,this._map.mapEntries(function(o){var i=o[1],a=t.call(e,i,i,r);return a!==i&&(n=!0),[a,a]},e));return n?o:this},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter(function(t){return 0!==t.size})).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(r){for(var n=0;n<e.length;n++)"string"==typeof e[n]?r.add(e[n]):t(e[n]).forEach(function(t){return r.add(t)})}):this.constructor(e[0])},e.prototype.intersect=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map(function(e){return t(e)});var n=[];return this.forEach(function(t){e.every(function(e){return e.includes(t)})||n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},e.prototype.subtract=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map(function(e){return t(e)});var n=[];return this.forEach(function(t){e.some(function(e){return e.includes(t)})&&n.push(t)}),this.withMutations(function(t){n.forEach(function(e){t.remove(e)})})},e.prototype.sort=function(t){return OrderedSet(sortFactory(this,t))},e.prototype.sortBy=function(t,e){return OrderedSet(sortFactory(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e){return t(e,e,r)},e)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(SetCollection);Set.isSet=isSet;var EMPTY_SET,SetPrototype=Set.prototype;function updateSet(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function makeSet(t,e){var r=Object.create(SetPrototype);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function emptySet(){return EMPTY_SET||(EMPTY_SET=makeSet(emptyMap()))}function getIn$1(t,e,r){for(var n=coerceKeyPath(e),o=0;o!==n.length;)if((t=get(t,n[o++],NOT_SET))===NOT_SET)return r;return t}function getIn(t,e){return getIn$1(this,t,e)}function hasIn$1(t,e){return getIn$1(t,e,NOT_SET)!==NOT_SET}function hasIn(t){return hasIn$1(this,t)}function toObject(){assertNotInfinite(this.size);var t={};return this.__iterate(function(e,r){isProtoKey(r)||(t[r]=e)}),t}function toJS(t){if(!t||"object"!=typeof t)return t;if(!isCollection(t)){if(!isDataStructure(t))return t;t=Seq(t)}if(isKeyed(t)){var e={};return t.__iterate(function(t,r){isProtoKey(r)||(e[r]=toJS(t))}),e}var r=[];return t.__iterate(function(t){r.push(toJS(t))}),r}function hashCollection(t){if(t.size===1/0)return 0;var e=isOrdered(t),r=isKeyed(t),n=e?1:0;return t.__iterate(r?e?function(t,e){n=31*n+hashMerge(hash(t),hash(e))|0}:function(t,e){n=n+hashMerge(hash(t),hash(e))|0}:e?function(t){n=31*n+hash(t)|0}:function(t){n=n+hash(t)|0}),murmurHashOfSize(t.size,n)}function murmurHashOfSize(t,e){return e=imul(e,3432918353),e=imul(e<<15|e>>>-15,461845907),e=imul(e<<13|e>>>-13,5),e=imul((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=smi((e=imul(e^e>>>13,3266489909))^e>>>16)}function hashMerge(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}function mixin(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}SetPrototype[IS_SET_SYMBOL]=!0,SetPrototype[DELETE]=SetPrototype.remove,SetPrototype.merge=SetPrototype.concat=SetPrototype.union,SetPrototype.withMutations=withMutations,SetPrototype.asImmutable=asImmutable,SetPrototype["@@transducer/init"]=SetPrototype.asMutable=asMutable,SetPrototype["@@transducer/step"]=function(t,e){return t.add(e)},SetPrototype["@@transducer/result"]=function(t){return t.asImmutable()},SetPrototype.__empty=emptySet,SetPrototype.__make=makeSet,Collection.Iterator=Iterator,mixin(Collection,{toArray:function(){assertNotInfinite(this.size);var t=new Array(this.size||0),e=isKeyed(this),r=0;return this.__iterate(function(n,o){t[r++]=e?[o,n]:n}),t},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return toJS(this)},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:toObject,toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return reify(this,concatFactory(this,t))},includes:function(t){return this.some(function(e){return is(e,t)})},entries:function(){return this.__iterator(ITERATE_ENTRIES)},every:function(t,e){assertNotInfinite(this.size);var r=!0;return this.__iterate(function(n,o,i){if(!t.call(e,n,o,i))return r=!1,!1}),r},filter:function(t,e){return reify(this,filterFactory(this,t,e,!0))},partition:function(t,e){return partitionFactory(this,t,e)},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return assertNotInfinite(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){assertNotInfinite(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""}),e},keys:function(){return this.__iterator(ITERATE_KEYS)},map:function(t,e){return reify(this,mapFactory(this,t,e))},reduce:function(t,e,r){return reduce(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return reduce(this,t,e,r,arguments.length<2,!0)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(t,e){return reify(this,sliceFactory(this,t,e,!0))},some:function(t,e){assertNotInfinite(this.size);var r=!1;return this.__iterate(function(n,o,i){if(t.call(e,n,o,i))return r=!0,!1}),r},sort:function(t){return reify(this,sortFactory(this,t))},values:function(){return this.__iterator(ITERATE_VALUES)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return ensureSize(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return countByFactory(this,t,e)},equals:function(t){return deepEqual(this,t)},entrySeq:function(){var t=this;if(t._cache)return new ArraySeq(t._cache);var e=t.toSeq().map(entryMapper).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(not(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate(function(r,o,i){if(t.call(e,r,o,i))return n=[o,r],!1}),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(returnTrue,null,t)},flatMap:function(t,e){return reify(this,flatMapFactory(this,t,e))},flatten:function(t){return reify(this,flattenFactory(this,t,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(t,e){return this.find(function(e,r){return is(r,t)},void 0,e)},getIn:getIn,groupBy:function(t,e){return groupByFactory(this,t,e)},has:function(t){return this.get(t,NOT_SET)!==NOT_SET},hasIn:hasIn,isSubset:function(t){return t="function"==typeof t.includes?t:Collection(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:Collection(t)).isSubset(this)},keyOf:function(t){return this.findKey(function(e){return is(e,t)})},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return maxFactory(this,t)},maxBy:function(t,e){return maxFactory(this,e,t)},min:function(t){return maxFactory(this,t?neg(t):defaultNegComparator)},minBy:function(t,e){return maxFactory(this,e?neg(e):defaultNegComparator,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return reify(this,skipWhileFactory(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(not(t),e)},sortBy:function(t,e){return reify(this,sortFactory(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return reify(this,takeWhileFactory(this,t,e))},takeUntil:function(t,e){return this.takeWhile(not(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashCollection(this))}});var CollectionPrototype=Collection.prototype;CollectionPrototype[IS_COLLECTION_SYMBOL]=!0,CollectionPrototype[ITERATOR_SYMBOL]=CollectionPrototype.values,CollectionPrototype.toJSON=CollectionPrototype.toArray,CollectionPrototype.__toStringMapper=quoteString,CollectionPrototype.inspect=CollectionPrototype.toSource=function(){return this.toString()},CollectionPrototype.chain=CollectionPrototype.flatMap,CollectionPrototype.contains=CollectionPrototype.includes,mixin(KeyedCollection,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(t,e){var r=this,n=0;return reify(this,this.toSeq().map(function(o,i){return t.call(e,[i,o],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return reify(this,this.toSeq().flip().map(function(n,o){return t.call(e,n,o,r)}).flip())}});var KeyedCollectionPrototype=KeyedCollection.prototype;KeyedCollectionPrototype[IS_KEYED_SYMBOL]=!0,KeyedCollectionPrototype[ITERATOR_SYMBOL]=CollectionPrototype.entries,KeyedCollectionPrototype.toJSON=toObject,KeyedCollectionPrototype.__toStringMapper=function(t,e){return quoteString(e)+": "+quoteString(t)},mixin(IndexedCollection,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(t,e){return reify(this,filterFactory(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(t,e){return reify(this,sliceFactory(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=resolveBegin(t,t<0?this.count():this.size);var n=this.slice(0,t);return reify(this,1===r?n:n.concat(arrCopy(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return reify(this,flattenFactory(this,t,!1))},get:function(t,e){return(t=wrapIndex(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return(t=wrapIndex(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return reify(this,interposeFactory(this,t))},interleave:function(){var t=[this].concat(arrCopy(arguments)),e=zipWithFactory(this.toSeq(),IndexedSeq.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),reify(this,r)},keySeq:function(){return Range(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return reify(this,skipWhileFactory(this,t,e,!1))},zip:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments))))},zipAll:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments)),!0))},zipWith:function(t){var e=arrCopy(arguments);return e[0]=this,reify(this,zipWithFactory(this,t,e))}});var IndexedCollectionPrototype=IndexedCollection.prototype;IndexedCollectionPrototype[IS_INDEXED_SYMBOL]=!0,IndexedCollectionPrototype[IS_ORDERED_SYMBOL]=!0,mixin(SetCollection,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var SetCollectionPrototype=SetCollection.prototype;function defaultZipper(){return arrCopy(arguments)}function isOrderedSet(t){return isSet(t)&&isOrdered(t)}SetCollectionPrototype.has=CollectionPrototype.includes,SetCollectionPrototype.contains=SetCollectionPrototype.includes,SetCollectionPrototype.keys=SetCollectionPrototype.values,mixin(KeyedSeq,KeyedCollectionPrototype),mixin(IndexedSeq,IndexedCollectionPrototype),mixin(SetSeq,SetCollectionPrototype);var OrderedSet=function(t){function e(t){return null==t?emptyOrderedSet():isOrderedSet(t)?t:emptyOrderedSet().withMutations(function(e){var r=SetCollection(t);assertNotInfinite(r.size),r.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(KeyedCollection(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Set);OrderedSet.isOrderedSet=isOrderedSet;var EMPTY_ORDERED_SET,OrderedSetPrototype=OrderedSet.prototype;function makeOrderedSet(t,e){var r=Object.create(OrderedSetPrototype);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function emptyOrderedSet(){return EMPTY_ORDERED_SET||(EMPTY_ORDERED_SET=makeOrderedSet(emptyOrderedMap()))}OrderedSetPrototype[IS_ORDERED_SYMBOL]=!0,OrderedSetPrototype.zip=IndexedCollectionPrototype.zip,OrderedSetPrototype.zipWith=IndexedCollectionPrototype.zipWith,OrderedSetPrototype.zipAll=IndexedCollectionPrototype.zipAll,OrderedSetPrototype.__empty=emptyOrderedSet,OrderedSetPrototype.__make=makeOrderedSet;var PairSorting={LeftThenRight:-1,RightThenLeft:1};function throwOnInvalidDefaultValues(t){if(isRecord(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(isImmutable(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var Record=function(t,e){var r;throwOnInvalidDefaultValues(t);var n=function(i){var a=this;if(i instanceof n)return i;if(!(this instanceof n))return new n(i);if(!r){r=!0;var u=Object.keys(t),s=o._indices={};o._name=e,o._keys=u,o._defaultValues=t;for(var c=0;c<u.length;c++){var p=u[c];s[p]=c,o[p]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+recordName(this)+' with property "'+p+'" since that property name is part of the Record API.'):setProp(o,p)}}return this.__ownerID=void 0,this._values=List().withMutations(function(t){t.setSize(a._keys.length),KeyedCollection(i).forEach(function(e,r){t.set(a._indices[r],e===a._defaultValues[r]?void 0:e)})}),this},o=n.prototype=Object.create(RecordPrototype);return o.constructor=n,e&&(n.displayName=e),n};Record.prototype.toString=function(){for(var t,e=recordName(this)+" { ",r=this._keys,n=0,o=r.length;n!==o;n++)e+=(n?", ":"")+(t=r[n])+": "+quoteString(this.get(t));return e+" }"},Record.prototype.equals=function(t){return this===t||isRecord(t)&&recordSeq(this).equals(recordSeq(t))},Record.prototype.hashCode=function(){return recordSeq(this).hashCode()},Record.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Record.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},Record.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return makeRecord(this,r)}return this},Record.prototype.remove=function(t){return this.set(t)},Record.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:makeRecord(this,t)},Record.prototype.wasAltered=function(){return this._values.wasAltered()},Record.prototype.toSeq=function(){return recordSeq(this)},Record.prototype.toJS=function(){return toJS(this)},Record.prototype.entries=function(){return this.__iterator(ITERATE_ENTRIES)},Record.prototype.__iterator=function(t,e){return recordSeq(this).__iterator(t,e)},Record.prototype.__iterate=function(t,e){return recordSeq(this).__iterate(t,e)},Record.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?makeRecord(this,e,t):(this.__ownerID=t,this._values=e,this)},Record.isRecord=isRecord,Record.getDescriptiveName=recordName;var RecordPrototype=Record.prototype;function makeRecord(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function recordName(t){return t.constructor.displayName||t.constructor.name||"Record"}function recordSeq(t){return keyedSeqFromValue(t._keys.map(function(e){return[e,t.get(e)]}))}function setProp(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){invariant(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}RecordPrototype[IS_RECORD_SYMBOL]=!0,RecordPrototype[DELETE]=RecordPrototype.remove,RecordPrototype.deleteIn=RecordPrototype.removeIn=deleteIn,RecordPrototype.getIn=getIn,RecordPrototype.hasIn=CollectionPrototype.hasIn,RecordPrototype.merge=merge$1,RecordPrototype.mergeWith=mergeWith$1,RecordPrototype.mergeIn=mergeIn,RecordPrototype.mergeDeep=mergeDeep,RecordPrototype.mergeDeepWith=mergeDeepWith,RecordPrototype.mergeDeepIn=mergeDeepIn,RecordPrototype.setIn=setIn,RecordPrototype.update=update,RecordPrototype.updateIn=updateIn$1,RecordPrototype.withMutations=withMutations,RecordPrototype.asMutable=asMutable,RecordPrototype.asImmutable=asImmutable,RecordPrototype[ITERATOR_SYMBOL]=RecordPrototype.entries,RecordPrototype.toJSON=RecordPrototype.toObject=CollectionPrototype.toObject,RecordPrototype.inspect=RecordPrototype.toSource=function(){return this.toString()};var EMPTY_REPEAT,Repeat=function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(EMPTY_REPEAT)return EMPTY_REPEAT;EMPTY_REPEAT=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return is(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return wholeSlice(t,r,n)?this:new e(this._value,resolveEnd(r,n)-resolveBegin(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return is(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return is(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},e.prototype.__iterator=function(t,e){var r=this,n=this.size,o=0;return new Iterator(function(){return o===n?iteratorDone():iteratorValue(t,e?n-++o:o++,r._value)})},e.prototype.equals=function(t){return t instanceof e?is(this._value,t._value):deepEqual(this,t)},e}(IndexedSeq);function fromJS(t,e){return fromJSWith([],e||defaultConverter,t,"",e&&e.length>2?[]:void 0,{"":t})}function fromJSWith(t,e,r,n,o,i){if("string"!=typeof r&&!isImmutable(r)&&(isArrayLike(r)||hasIterator(r)||isPlainObject(r))){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),o&&""!==n&&o.push(n);var a=e.call(i,n,Seq(r).map(function(n,i){return fromJSWith(t,e,n,i,o,r)}),o&&o.slice());return t.pop(),o&&o.pop(),a}return r}function defaultConverter(t,e){return isIndexed(e)?e.toList():isKeyed(e)?e.toMap():e.toSet()}var version="5.1.5",Iterable=Collection;export{Collection,Iterable,List,Map,OrderedMap,OrderedSet,PairSorting,Range,Record,Repeat,Seq,Set,Stack,fromJS,get,getIn$1 as getIn,has,hasIn$1 as hasIn,hash,is,isAssociative,isCollection,isImmutable,isIndexed,isKeyed,isList,isMap,isOrdered,isOrderedMap,isOrderedSet,isPlainObject,isRecord,isSeq,isSet,isStack,isValueObject,merge,mergeDeep$1 as mergeDeep,mergeDeepWith$1 as mergeDeepWith,mergeWith,remove,removeIn,set,setIn$1 as setIn,update$1 as update,updateIn,version};
