UNPKG

@modern-js/module-tools

Version:

Simple, powerful, high-performance modern npm package development solution.

1 lines • 2.73 MB
(()=>{var __webpack_modules__={158:function(e,r){(function(e,n){true?n(r):0})(this,(function(e){"use strict";var r="delete";var n=5;var i=1<<n;var s=i-1;var a={};function MakeRef(){return{value:false}}function SetRef(e){if(e){e.value=true}}function OwnerID(){}function ensureSize(e){if(e.size===undefined){e.size=e.__iterate(returnTrue)}return e.size}function wrapIndex(e,r){if(typeof r!=="number"){var n=r>>>0;if(""+n!==r||n===4294967295){return NaN}r=n}return r<0?ensureSize(e)+r:r}function returnTrue(){return true}function wholeSlice(e,r,n){return(e===0&&!isNeg(e)||n!==undefined&&e<=-n)&&(r===undefined||n!==undefined&&r>=n)}function resolveBegin(e,r){return resolveIndex(e,r,0)}function resolveEnd(e,r){return resolveIndex(e,r,r)}function resolveIndex(e,r,n){return e===undefined?n:isNeg(e)?r===Infinity?r:Math.max(0,r+e)|0:r===undefined||r===e?e:Math.min(r,e)|0}function isNeg(e){return e<0||e===0&&1/e===-Infinity}var o="@@__IMMUTABLE_ITERABLE__@@";function isCollection(e){return Boolean(e&&e[o])}var l="@@__IMMUTABLE_KEYED__@@";function isKeyed(e){return Boolean(e&&e[l])}var u="@@__IMMUTABLE_INDEXED__@@";function isIndexed(e){return Boolean(e&&e[u])}function isAssociative(e){return isKeyed(e)||isIndexed(e)}var _=function Collection(e){return isCollection(e)?e:C(e)};var c=function(e){function KeyedCollection(e){return isKeyed(e)?e:E(e)}if(e)KeyedCollection.__proto__=e;KeyedCollection.prototype=Object.create(e&&e.prototype);KeyedCollection.prototype.constructor=KeyedCollection;return KeyedCollection}(_);var $=function(e){function IndexedCollection(e){return isIndexed(e)?e:A(e)}if(e)IndexedCollection.__proto__=e;IndexedCollection.prototype=Object.create(e&&e.prototype);IndexedCollection.prototype.constructor=IndexedCollection;return IndexedCollection}(_);var p=function(e){function SetCollection(e){return isCollection(e)&&!isAssociative(e)?e:M(e)}if(e)SetCollection.__proto__=e;SetCollection.prototype=Object.create(e&&e.prototype);SetCollection.prototype.constructor=SetCollection;return SetCollection}(_);_.Keyed=c;_.Indexed=$;_.Set=p;var h="@@__IMMUTABLE_SEQ__@@";function isSeq(e){return Boolean(e&&e[h])}var d="@@__IMMUTABLE_RECORD__@@";function isRecord(e){return Boolean(e&&e[d])}function isImmutable(e){return isCollection(e)||isRecord(e)}var m="@@__IMMUTABLE_ORDERED__@@";function isOrdered(e){return Boolean(e&&e[m])}var g=0;var f=1;var y=2;var S=typeof Symbol==="function"&&Symbol.iterator;var v="@@iterator";var b=S||v;var x=function Iterator(e){this.next=e};x.prototype.toString=function toString(){return"[Iterator]"};x.KEYS=g;x.VALUES=f;x.ENTRIES=y;x.prototype.inspect=x.prototype.toSource=function(){return this.toString()};x.prototype[b]=function(){return this};function iteratorValue(e,r,n,i){var s=e===0?r:e===1?n:[r,n];i?i.value=s:i={value:s,done:false};return i}function iteratorDone(){return{value:undefined,done:true}}function hasIterator(e){if(Array.isArray(e)){return true}return!!getIteratorFn(e)}function isIterator(e){return e&&typeof e.next==="function"}function getIterator(e){var r=getIteratorFn(e);return r&&r.call(e)}function getIteratorFn(e){var r=e&&(S&&e[S]||e[v]);if(typeof r==="function"){return r}}function isEntriesIterable(e){var r=getIteratorFn(e);return r&&r===e.entries}function isKeysIterable(e){var r=getIteratorFn(e);return r&&r===e.keys}var w=Object.prototype.hasOwnProperty;function isArrayLike(e){if(Array.isArray(e)||typeof e==="string"){return true}return e&&typeof e==="object"&&Number.isInteger(e.length)&&e.length>=0&&(e.length===0?Object.keys(e).length===1:e.hasOwnProperty(e.length-1))}var C=function(e){function Seq(e){return e===undefined||e===null?emptySequence():isImmutable(e)?e.toSeq():seqFromValue(e)}if(e)Seq.__proto__=e;Seq.prototype=Object.create(e&&e.prototype);Seq.prototype.constructor=Seq;Seq.prototype.toSeq=function toSeq(){return this};Seq.prototype.toString=function toString(){return this.__toString("Seq {","}")};Seq.prototype.cacheResult=function cacheResult(){if(!this._cache&&this.__iterateUncached){this._cache=this.entrySeq().toArray();this.size=this._cache.length}return this};Seq.prototype.__iterate=function __iterate(e,r){var n=this._cache;if(n){var i=n.length;var s=0;while(s!==i){var a=n[r?i-++s:s++];if(e(a[1],a[0],this)===false){break}}return s}return this.__iterateUncached(e,r)};Seq.prototype.__iterator=function __iterator(e,r){var n=this._cache;if(n){var i=n.length;var s=0;return new x((function(){if(s===i){return iteratorDone()}var a=n[r?i-++s:s++];return iteratorValue(e,a[0],a[1])}))}return this.__iteratorUncached(e,r)};return Seq}(_);var E=function(e){function KeyedSeq(e){return e===undefined||e===null?emptySequence().toKeyedSeq():isCollection(e)?isKeyed(e)?e.toSeq():e.fromEntrySeq():isRecord(e)?e.toSeq():keyedSeqFromValue(e)}if(e)KeyedSeq.__proto__=e;KeyedSeq.prototype=Object.create(e&&e.prototype);KeyedSeq.prototype.constructor=KeyedSeq;KeyedSeq.prototype.toKeyedSeq=function toKeyedSeq(){return this};return KeyedSeq}(C);var A=function(e){function IndexedSeq(e){return e===undefined||e===null?emptySequence():isCollection(e)?isKeyed(e)?e.entrySeq():e.toIndexedSeq():isRecord(e)?e.toSeq().entrySeq():indexedSeqFromValue(e)}if(e)IndexedSeq.__proto__=e;IndexedSeq.prototype=Object.create(e&&e.prototype);IndexedSeq.prototype.constructor=IndexedSeq;IndexedSeq.of=function of(){return IndexedSeq(arguments)};IndexedSeq.prototype.toIndexedSeq=function toIndexedSeq(){return this};IndexedSeq.prototype.toString=function toString(){return this.__toString("Seq [","]")};return IndexedSeq}(C);var M=function(e){function SetSeq(e){return(isCollection(e)&&!isAssociative(e)?e:A(e)).toSetSeq()}if(e)SetSeq.__proto__=e;SetSeq.prototype=Object.create(e&&e.prototype);SetSeq.prototype.constructor=SetSeq;SetSeq.of=function of(){return SetSeq(arguments)};SetSeq.prototype.toSetSeq=function toSetSeq(){return this};return SetSeq}(C);C.isSeq=isSeq;C.Keyed=E;C.Set=M;C.Indexed=A;C.prototype[h]=true;var I=function(e){function ArraySeq(e){this._array=e;this.size=e.length}if(e)ArraySeq.__proto__=e;ArraySeq.prototype=Object.create(e&&e.prototype);ArraySeq.prototype.constructor=ArraySeq;ArraySeq.prototype.get=function get(e,r){return this.has(e)?this._array[wrapIndex(this,e)]:r};ArraySeq.prototype.__iterate=function __iterate(e,r){var n=this._array;var i=n.length;var s=0;while(s!==i){var a=r?i-++s:s++;if(e(n[a],a,this)===false){break}}return s};ArraySeq.prototype.__iterator=function __iterator(e,r){var n=this._array;var i=n.length;var s=0;return new x((function(){if(s===i){return iteratorDone()}var a=r?i-++s:s++;return iteratorValue(e,a,n[a])}))};return ArraySeq}(A);var V=function(e){function ObjectSeq(e){var r=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e;this._keys=r;this.size=r.length}if(e)ObjectSeq.__proto__=e;ObjectSeq.prototype=Object.create(e&&e.prototype);ObjectSeq.prototype.constructor=ObjectSeq;ObjectSeq.prototype.get=function get(e,r){if(r!==undefined&&!this.has(e)){return r}return this._object[e]};ObjectSeq.prototype.has=function has(e){return w.call(this._object,e)};ObjectSeq.prototype.__iterate=function __iterate(e,r){var n=this._object;var i=this._keys;var s=i.length;var a=0;while(a!==s){var o=i[r?s-++a:a++];if(e(n[o],o,this)===false){break}}return a};ObjectSeq.prototype.__iterator=function __iterator(e,r){var n=this._object;var i=this._keys;var s=i.length;var a=0;return new x((function(){if(a===s){return iteratorDone()}var o=i[r?s-++a:a++];return iteratorValue(e,o,n[o])}))};return ObjectSeq}(E);V.prototype[m]=true;var L=function(e){function CollectionSeq(e){this._collection=e;this.size=e.length||e.size}if(e)CollectionSeq.__proto__=e;CollectionSeq.prototype=Object.create(e&&e.prototype);CollectionSeq.prototype.constructor=CollectionSeq;CollectionSeq.prototype.__iterateUncached=function __iterateUncached(e,r){if(r){return this.cacheResult().__iterate(e,r)}var n=this._collection;var i=getIterator(n);var s=0;if(isIterator(i)){var a;while(!(a=i.next()).done){if(e(a.value,s++,this)===false){break}}}return s};CollectionSeq.prototype.__iteratorUncached=function __iteratorUncached(e,r){if(r){return this.cacheResult().__iterator(e,r)}var n=this._collection;var i=getIterator(n);if(!isIterator(i)){return new x(iteratorDone)}var s=0;return new x((function(){var r=i.next();return r.done?r:iteratorValue(e,s++,r.value)}))};return CollectionSeq}(A);var R;function emptySequence(){return R||(R=new I([]))}function keyedSeqFromValue(e){var r=maybeIndexedSeqFromValue(e);if(r){return r.fromEntrySeq()}if(typeof e==="object"){return new V(e)}throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function indexedSeqFromValue(e){var r=maybeIndexedSeqFromValue(e);if(r){return r}throw new TypeError("Expected Array or collection object of values: "+e)}function seqFromValue(e){var r=maybeIndexedSeqFromValue(e);if(r){return isEntriesIterable(e)?r.fromEntrySeq():isKeysIterable(e)?r.toSetSeq():r}if(typeof e==="object"){return new V(e)}throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}function maybeIndexedSeqFromValue(e){return isArrayLike(e)?new I(e):hasIterator(e)?new L(e):undefined}var k="@@__IMMUTABLE_MAP__@@";function isMap(e){return Boolean(e&&e[k])}function isOrderedMap(e){return isMap(e)&&isOrdered(e)}function isValueObject(e){return Boolean(e&&typeof e.equals==="function"&&typeof e.hashCode==="function")}function is(e,r){if(e===r||e!==e&&r!==r){return true}if(!e||!r){return false}if(typeof e.valueOf==="function"&&typeof r.valueOf==="function"){e=e.valueOf();r=r.valueOf();if(e===r||e!==e&&r!==r){return true}if(!e||!r){return false}}return!!(isValueObject(e)&&isValueObject(r)&&e.equals(r))}var F=typeof Math.imul==="function"&&Math.imul(4294967295,2)===-2?Math.imul:function imul(e,r){e|=0;r|=0;var n=e&65535;var i=r&65535;return n*i+((e>>>16)*i+n*(r>>>16)<<16>>>0)|0};function smi(e){return e>>>1&1073741824|e&3221225471}var T=Object.prototype.valueOf;function hash(e){if(e==null){return hashNullish(e)}if(typeof e.hashCode==="function"){return smi(e.hashCode(e))}var r=valueOf(e);if(r==null){return hashNullish(r)}switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return hashNumber(r);case"string":return r.length>z?cachedHashString(r):hashString(r);case"object":case"function":return hashJSObj(r);case"symbol":return hashSymbol(r);default:if(typeof r.toString==="function"){return hashString(r.toString())}throw new Error("Value type "+typeof r+" cannot be hashed.")}}function hashNullish(e){return e===null?1108378658:1108378659}function hashNumber(e){if(e!==e||e===Infinity){return 0}var r=e|0;if(r!==e){r^=e*4294967295}while(e>4294967295){e/=4294967295;r^=e}return smi(r)}function cachedHashString(e){var r=W[e];if(r===undefined){r=hashString(e);if(q===H){q=0;W={}}q++;W[e]=r}return r}function hashString(e){var r=0;for(var n=0;n<e.length;n++){r=31*r+e.charCodeAt(n)|0}return smi(r)}function hashSymbol(e){var r=O[e];if(r!==undefined){return r}r=nextHash();O[e]=r;return r}function hashJSObj(e){var r;if(J){r=P.get(e);if(r!==undefined){return r}}r=e[D];if(r!==undefined){return r}if(!U){r=e.propertyIsEnumerable&&e.propertyIsEnumerable[D];if(r!==undefined){return r}r=getIENodeHash(e);if(r!==undefined){return r}}r=nextHash();if(J){P.set(e,r)}else if(N!==undefined&&N(e)===false){throw new Error("Non-extensible objects are not allowed as keys.")}else if(U){Object.defineProperty(e,D,{enumerable:false,configurable:false,writable:false,value:r})}else if(e.propertyIsEnumerable!==undefined&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable){e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)};e.propertyIsEnumerable[D]=r}else if(e.nodeType!==undefined){e[D]=r}else{throw new Error("Unable to set a non-enumerable property on object.")}return r}var N=Object.isExtensible;var U=function(){try{Object.defineProperty({},"@",{});return true}catch(e){return false}}();function getIENodeHash(e){if(e&&e.nodeType>0){switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}}function valueOf(e){return e.valueOf!==T&&typeof e.valueOf==="function"?e.valueOf(e):e}function nextHash(){var e=++B;if(B&1073741824){B=0}return e}var J=typeof WeakMap==="function";var P;if(J){P=new WeakMap}var O=Object.create(null);var B=0;var D="__immutablehash__";if(typeof Symbol==="function"){D=Symbol(D)}var z=16;var H=255;var q=0;var W={};var j=function(e){function ToKeyedSequence(e,r){this._iter=e;this._useKeys=r;this.size=e.size}if(e)ToKeyedSequence.__proto__=e;ToKeyedSequence.prototype=Object.create(e&&e.prototype);ToKeyedSequence.prototype.constructor=ToKeyedSequence;ToKeyedSequence.prototype.get=function get(e,r){return this._iter.get(e,r)};ToKeyedSequence.prototype.has=function has(e){return this._iter.has(e)};ToKeyedSequence.prototype.valueSeq=function valueSeq(){return this._iter.valueSeq()};ToKeyedSequence.prototype.reverse=function reverse(){var e=this;var r=reverseFactory(this,true);if(!this._useKeys){r.valueSeq=function(){return e._iter.toSeq().reverse()}}return r};ToKeyedSequence.prototype.map=function map(e,r){var n=this;var i=mapFactory(this,e,r);if(!this._useKeys){i.valueSeq=function(){return n._iter.toSeq().map(e,r)}}return i};ToKeyedSequence.prototype.__iterate=function __iterate(e,r){var n=this;return this._iter.__iterate((function(r,i){return e(r,i,n)}),r)};ToKeyedSequence.prototype.__iterator=function __iterator(e,r){return this._iter.__iterator(e,r)};return ToKeyedSequence}(E);j.prototype[m]=true;var K=function(e){function ToIndexedSequence(e){this._iter=e;this.size=e.size}if(e)ToIndexedSequence.__proto__=e;ToIndexedSequence.prototype=Object.create(e&&e.prototype);ToIndexedSequence.prototype.constructor=ToIndexedSequence;ToIndexedSequence.prototype.includes=function includes(e){return this._iter.includes(e)};ToIndexedSequence.prototype.__iterate=function __iterate(e,r){var n=this;var i=0;r&&ensureSize(this);return this._iter.__iterate((function(s){return e(s,r?n.size-++i:i++,n)}),r)};ToIndexedSequence.prototype.__iterator=function __iterator(e,r){var n=this;var i=this._iter.__iterator(f,r);var s=0;r&&ensureSize(this);return new x((function(){var a=i.next();return a.done?a:iteratorValue(e,r?n.size-++s:s++,a.value,a)}))};return ToIndexedSequence}(A);var Q=function(e){function ToSetSequence(e){this._iter=e;this.size=e.size}if(e)ToSetSequence.__proto__=e;ToSetSequence.prototype=Object.create(e&&e.prototype);ToSetSequence.prototype.constructor=ToSetSequence;ToSetSequence.prototype.has=function has(e){return this._iter.includes(e)};ToSetSequence.prototype.__iterate=function __iterate(e,r){var n=this;return this._iter.__iterate((function(r){return e(r,r,n)}),r)};ToSetSequence.prototype.__iterator=function __iterator(e,r){var n=this._iter.__iterator(f,r);return new x((function(){var r=n.next();return r.done?r:iteratorValue(e,r.value,r.value,r)}))};return ToSetSequence}(M);var G=function(e){function FromEntriesSequence(e){this._iter=e;this.size=e.size}if(e)FromEntriesSequence.__proto__=e;FromEntriesSequence.prototype=Object.create(e&&e.prototype);FromEntriesSequence.prototype.constructor=FromEntriesSequence;FromEntriesSequence.prototype.entrySeq=function entrySeq(){return this._iter.toSeq()};FromEntriesSequence.prototype.__iterate=function __iterate(e,r){var n=this;return this._iter.__iterate((function(r){if(r){validateEntry(r);var i=isCollection(r);return e(i?r.get(1):r[1],i?r.get(0):r[0],n)}}),r)};FromEntriesSequence.prototype.__iterator=function __iterator(e,r){var n=this._iter.__iterator(f,r);return new x((function(){while(true){var r=n.next();if(r.done){return r}var i=r.value;if(i){validateEntry(i);var s=isCollection(i);return iteratorValue(e,s?i.get(0):i[0],s?i.get(1):i[1],r)}}}))};return FromEntriesSequence}(E);K.prototype.cacheResult=j.prototype.cacheResult=Q.prototype.cacheResult=G.prototype.cacheResult=cacheResultThrough;function flipFactory(e){var r=makeSequence(e);r._iter=e;r.size=e.size;r.flip=function(){return e};r.reverse=function(){var r=e.reverse.apply(this);r.flip=function(){return e.reverse()};return r};r.has=function(r){return e.includes(r)};r.includes=function(r){return e.has(r)};r.cacheResult=cacheResultThrough;r.__iterateUncached=function(r,n){var i=this;return e.__iterate((function(e,n){return r(n,e,i)!==false}),n)};r.__iteratorUncached=function(r,n){if(r===y){var i=e.__iterator(r,n);return new x((function(){var e=i.next();if(!e.done){var r=e.value[0];e.value[0]=e.value[1];e.value[1]=r}return e}))}return e.__iterator(r===f?g:f,n)};return r}function mapFactory(e,r,n){var i=makeSequence(e);i.size=e.size;i.has=function(r){return e.has(r)};i.get=function(i,s){var o=e.get(i,a);return o===a?s:r.call(n,o,i,e)};i.__iterateUncached=function(i,s){var a=this;return e.__iterate((function(e,s,o){return i(r.call(n,e,s,o),s,a)!==false}),s)};i.__iteratorUncached=function(i,s){var a=e.__iterator(y,s);return new x((function(){var s=a.next();if(s.done){return s}var o=s.value;var l=o[0];return iteratorValue(i,l,r.call(n,o[1],l,e),s)}))};return i}function reverseFactory(e,r){var n=this;var i=makeSequence(e);i._iter=e;i.size=e.size;i.reverse=function(){return e};if(e.flip){i.flip=function(){var r=flipFactory(e);r.reverse=function(){return e.flip()};return r}}i.get=function(n,i){return e.get(r?n:-1-n,i)};i.has=function(n){return e.has(r?n:-1-n)};i.includes=function(r){return e.includes(r)};i.cacheResult=cacheResultThrough;i.__iterate=function(n,i){var s=this;var a=0;i&&ensureSize(e);return e.__iterate((function(e,o){return n(e,r?o:i?s.size-++a:a++,s)}),!i)};i.__iterator=function(i,s){var a=0;s&&ensureSize(e);var o=e.__iterator(y,!s);return new x((function(){var e=o.next();if(e.done){return e}var l=e.value;return iteratorValue(i,r?l[0]:s?n.size-++a:a++,l[1],e)}))};return i}function filterFactory(e,r,n,i){var s=makeSequence(e);if(i){s.has=function(i){var s=e.get(i,a);return s!==a&&!!r.call(n,s,i,e)};s.get=function(i,s){var o=e.get(i,a);return o!==a&&r.call(n,o,i,e)?o:s}}s.__iterateUncached=function(s,a){var o=this;var l=0;e.__iterate((function(e,a,u){if(r.call(n,e,a,u)){l++;return s(e,i?a:l-1,o)}}),a);return l};s.__iteratorUncached=function(s,a){var o=e.__iterator(y,a);var l=0;return new x((function(){while(true){var a=o.next();if(a.done){return a}var u=a.value;var _=u[0];var c=u[1];if(r.call(n,c,_,e)){return iteratorValue(s,i?_:l++,c,a)}}}))};return s}function countByFactory(e,r,n){var i=Y().asMutable();e.__iterate((function(s,a){i.update(r.call(n,s,a,e),0,(function(e){return e+1}))}));return i.asImmutable()}function groupByFactory(e,r,n){var i=isKeyed(e);var s=(isOrdered(e)?me():Y()).asMutable();e.__iterate((function(a,o){s.update(r.call(n,a,o,e),(function(e){return e=e||[],e.push(i?[o,a]:a),e}))}));var a=collectionClass(e);return s.map((function(r){return reify(e,a(r))})).asImmutable()}function sliceFactory(e,r,n,i){var s=e.size;if(wholeSlice(r,n,s)){return e}var a=resolveBegin(r,s);var o=resolveEnd(n,s);if(a!==a||o!==o){return sliceFactory(e.toSeq().cacheResult(),r,n,i)}var l=o-a;var u;if(l===l){u=l<0?0:l}var _=makeSequence(e);_.size=u===0?u:e.size&&u||undefined;if(!i&&isSeq(e)&&u>=0){_.get=function(r,n){r=wrapIndex(this,r);return r>=0&&r<u?e.get(r+a,n):n}}_.__iterateUncached=function(r,n){var s=this;if(u===0){return 0}if(n){return this.cacheResult().__iterate(r,n)}var o=0;var l=true;var _=0;e.__iterate((function(e,n){if(!(l&&(l=o++<a))){_++;return r(e,i?n:_-1,s)!==false&&_!==u}}));return _};_.__iteratorUncached=function(r,n){if(u!==0&&n){return this.cacheResult().__iterator(r,n)}if(u===0){return new x(iteratorDone)}var s=e.__iterator(r,n);var o=0;var l=0;return new x((function(){while(o++<a){s.next()}if(++l>u){return iteratorDone()}var e=s.next();if(i||r===f||e.done){return e}if(r===g){return iteratorValue(r,l-1,undefined,e)}return iteratorValue(r,l-1,e.value[1],e)}))};return _}function takeWhileFactory(e,r,n){var i=makeSequence(e);i.__iterateUncached=function(i,s){var a=this;if(s){return this.cacheResult().__iterate(i,s)}var o=0;e.__iterate((function(e,s,l){return r.call(n,e,s,l)&&++o&&i(e,s,a)}));return o};i.__iteratorUncached=function(i,s){var a=this;if(s){return this.cacheResult().__iterator(i,s)}var o=e.__iterator(y,s);var l=true;return new x((function(){if(!l){return iteratorDone()}var e=o.next();if(e.done){return e}var s=e.value;var u=s[0];var _=s[1];if(!r.call(n,_,u,a)){l=false;return iteratorDone()}return i===y?e:iteratorValue(i,u,_,e)}))};return i}function skipWhileFactory(e,r,n,i){var s=makeSequence(e);s.__iterateUncached=function(s,a){var o=this;if(a){return this.cacheResult().__iterate(s,a)}var l=true;var u=0;e.__iterate((function(e,a,_){if(!(l&&(l=r.call(n,e,a,_)))){u++;return s(e,i?a:u-1,o)}}));return u};s.__iteratorUncached=function(s,a){var o=this;if(a){return this.cacheResult().__iterator(s,a)}var l=e.__iterator(y,a);var u=true;var _=0;return new x((function(){var e;var a;var c;do{e=l.next();if(e.done){if(i||s===f){return e}if(s===g){return iteratorValue(s,_++,undefined,e)}return iteratorValue(s,_++,e.value[1],e)}var $=e.value;a=$[0];c=$[1];u&&(u=r.call(n,c,a,o))}while(u);return s===y?e:iteratorValue(s,a,c,e)}))};return s}function concatFactory(e,r){var n=isKeyed(e);var i=[e].concat(r).map((function(e){if(!isCollection(e)){e=n?keyedSeqFromValue(e):indexedSeqFromValue(Array.isArray(e)?e:[e])}else if(n){e=c(e)}return e})).filter((function(e){return e.size!==0}));if(i.length===0){return e}if(i.length===1){var s=i[0];if(s===e||n&&isKeyed(s)||isIndexed(e)&&isIndexed(s)){return s}}var a=new I(i);if(n){a=a.toKeyedSeq()}else if(!isIndexed(e)){a=a.toSetSeq()}a=a.flatten(true);a.size=i.reduce((function(e,r){if(e!==undefined){var n=r.size;if(n!==undefined){return e+n}}}),0);return a}function flattenFactory(e,r,n){var i=makeSequence(e);i.__iterateUncached=function(s,a){if(a){return this.cacheResult().__iterate(s,a)}var o=0;var l=false;function flatDeep(e,u){e.__iterate((function(e,a){if((!r||u<r)&&isCollection(e)){flatDeep(e,u+1)}else{o++;if(s(e,n?a:o-1,i)===false){l=true}}return!l}),a)}flatDeep(e,0);return o};i.__iteratorUncached=function(i,s){if(s){return this.cacheResult().__iterator(i,s)}var a=e.__iterator(i,s);var o=[];var l=0;return new x((function(){while(a){var e=a.next();if(e.done!==false){a=o.pop();continue}var u=e.value;if(i===y){u=u[1]}if((!r||o.length<r)&&isCollection(u)){o.push(a);a=u.__iterator(i,s)}else{return n?e:iteratorValue(i,l++,u,e)}}return iteratorDone()}))};return i}function flatMapFactory(e,r,n){var i=collectionClass(e);return e.toSeq().map((function(s,a){return i(r.call(n,s,a,e))})).flatten(true)}function interposeFactory(e,r){var n=makeSequence(e);n.size=e.size&&e.size*2-1;n.__iterateUncached=function(n,i){var s=this;var a=0;e.__iterate((function(e){return(!a||n(r,a++,s)!==false)&&n(e,a++,s)!==false}),i);return a};n.__iteratorUncached=function(n,i){var s=e.__iterator(f,i);var a=0;var o;return new x((function(){if(!o||a%2){o=s.next();if(o.done){return o}}return a%2?iteratorValue(n,a++,r):iteratorValue(n,a++,o.value,o)}))};return n}function sortFactory(e,r,n){if(!r){r=defaultComparator}var i=isKeyed(e);var s=0;var a=e.toSeq().map((function(r,i){return[i,r,s++,n?n(r,i,e):r]})).valueSeq().toArray();a.sort((function(e,n){return r(e[3],n[3])||e[2]-n[2]})).forEach(i?function(e,r){a[r].length=2}:function(e,r){a[r]=e[1]});return i?E(a):isIndexed(e)?A(a):M(a)}function maxFactory(e,r,n){if(!r){r=defaultComparator}if(n){var i=e.toSeq().map((function(r,i){return[r,n(r,i,e)]})).reduce((function(e,n){return maxCompare(r,e[1],n[1])?n:e}));return i&&i[0]}return e.reduce((function(e,n){return maxCompare(r,e,n)?n:e}))}function maxCompare(e,r,n){var i=e(n,r);return i===0&&n!==r&&(n===undefined||n===null||n!==n)||i>0}function zipWithFactory(e,r,n,i){var s=makeSequence(e);var a=new I(n).map((function(e){return e.size}));s.size=i?a.max():a.min();s.__iterate=function(e,r){var n=this.__iterator(f,r);var i;var s=0;while(!(i=n.next()).done){if(e(i.value,s++,this)===false){break}}return s};s.__iteratorUncached=function(e,s){var a=n.map((function(e){return e=_(e),getIterator(s?e.reverse():e)}));var o=0;var l=false;return new x((function(){var n;if(!l){n=a.map((function(e){return e.next()}));l=i?n.every((function(e){return e.done})):n.some((function(e){return e.done}))}if(l){return iteratorDone()}return iteratorValue(e,o++,r.apply(null,n.map((function(e){return e.value}))))}))};return s}function reify(e,r){return e===r?e:isSeq(e)?r:e.constructor(r)}function validateEntry(e){if(e!==Object(e)){throw new TypeError("Expected [K, V] tuple: "+e)}}function collectionClass(e){return isKeyed(e)?c:isIndexed(e)?$:p}function makeSequence(e){return Object.create((isKeyed(e)?E:isIndexed(e)?A:M).prototype)}function cacheResultThrough(){if(this._iter.cacheResult){this._iter.cacheResult();this.size=this._iter.size;return this}return C.prototype.cacheResult.call(this)}function defaultComparator(e,r){if(e===undefined&&r===undefined){return 0}if(e===undefined){return 1}if(r===undefined){return-1}return e>r?1:e<r?-1:0}function arrCopy(e,r){r=r||0;var n=Math.max(0,e.length-r);var i=new Array(n);for(var s=0;s<n;s++){i[s]=e[s+r]}return i}function invariant(e,r){if(!e){throw new Error(r)}}function assertNotInfinite(e){invariant(e!==Infinity,"Cannot perform this action with an infinite size.")}function coerceKeyPath(e){if(isArrayLike(e)&&typeof e!=="string"){return e}if(isOrdered(e)){return e.toArray()}throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}var Z=Object.prototype.toString;function isPlainObject(e){if(!e||typeof e!=="object"||Z.call(e)!=="[object Object]"){return false}var r=Object.getPrototypeOf(e);if(r===null){return true}var n=r;var i=Object.getPrototypeOf(r);while(i!==null){n=i;i=Object.getPrototypeOf(n)}return n===r}function isDataStructure(e){return typeof e==="object"&&(isImmutable(e)||Array.isArray(e)||isPlainObject(e))}function quoteString(e){try{return typeof e==="string"?JSON.stringify(e):String(e)}catch(r){return JSON.stringify(e)}}function has(e,r){return isImmutable(e)?e.has(r):isDataStructure(e)&&w.call(e,r)}function get(e,r,n){return isImmutable(e)?e.get(r,n):!has(e,r)?n:typeof e.get==="function"?e.get(r):e[r]}function shallowCopy(e){if(Array.isArray(e)){return arrCopy(e)}var r={};for(var n in e){if(w.call(e,n)){r[n]=e[n]}}return r}function remove(e,r){if(!isDataStructure(e)){throw new TypeError("Cannot update non-data-structure value: "+e)}if(isImmutable(e)){if(!e.remove){throw new TypeError("Cannot update immutable value without .remove() method: "+e)}return e.remove(r)}if(!w.call(e,r)){return e}var n=shallowCopy(e);if(Array.isArray(n)){n.splice(r,1)}else{delete n[r]}return n}function set(e,r,n){if(!isDataStructure(e)){throw new TypeError("Cannot update non-data-structure value: "+e)}if(isImmutable(e)){if(!e.set){throw new TypeError("Cannot update immutable value without .set() method: "+e)}return e.set(r,n)}if(w.call(e,r)&&n===e[r]){return e}var i=shallowCopy(e);i[r]=n;return i}function updateIn$1(e,r,n,i){if(!i){i=n;n=undefined}var s=updateInDeeply(isImmutable(e),e,coerceKeyPath(r),0,n,i);return s===a?n:s}function updateInDeeply(e,r,n,i,s,o){var l=r===a;if(i===n.length){var u=l?s:r;var _=o(u);return _===u?r:_}if(!l&&!isDataStructure(r)){throw new TypeError("Cannot update within non-data-structure value in path ["+n.slice(0,i).map(quoteString)+"]: "+r)}var c=n[i];var $=l?a:get(r,c,a);var p=updateInDeeply($===a?e:isImmutable($),$,n,i+1,s,o);return p===$?r:p===a?remove(r,c):set(l?e?emptyMap():{}:r,c,p)}function setIn$1(e,r,n){return updateIn$1(e,r,a,(function(){return n}))}function setIn(e,r){return setIn$1(this,e,r)}function removeIn(e,r){return updateIn$1(e,r,(function(){return a}))}function deleteIn(e){return removeIn(this,e)}function update$1(e,r,n,i){return updateIn$1(e,[r],n,i)}function update(e,r,n){return arguments.length===1?e(this):update$1(this,e,r,n)}function updateIn(e,r,n){return updateIn$1(this,e,r,n)}function merge$1(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];return mergeIntoKeyedWith(this,e)}function mergeWith$1(e){var r=[],n=arguments.length-1;while(n-- >0)r[n]=arguments[n+1];if(typeof e!=="function"){throw new TypeError("Invalid merger function: "+e)}return mergeIntoKeyedWith(this,r,e)}function mergeIntoKeyedWith(e,r,n){var i=[];for(var s=0;s<r.length;s++){var o=c(r[s]);if(o.size!==0){i.push(o)}}if(i.length===0){return e}if(e.toSeq().size===0&&!e.__ownerID&&i.length===1){return e.constructor(i[0])}return e.withMutations((function(e){var r=n?function(r,i){update$1(e,i,a,(function(e){return e===a?r:n(e,r,i)}))}:function(r,n){e.set(n,r)};for(var s=0;s<i.length;s++){i[s].forEach(r)}}))}function merge(e){var r=[],n=arguments.length-1;while(n-- >0)r[n]=arguments[n+1];return mergeWithSources(e,r)}function mergeWith(e,r){var n=[],i=arguments.length-2;while(i-- >0)n[i]=arguments[i+2];return mergeWithSources(r,n,e)}function mergeDeep$1(e){var r=[],n=arguments.length-1;while(n-- >0)r[n]=arguments[n+1];return mergeDeepWithSources(e,r)}function mergeDeepWith$1(e,r){var n=[],i=arguments.length-2;while(i-- >0)n[i]=arguments[i+2];return mergeDeepWithSources(r,n,e)}function mergeDeepWithSources(e,r,n){return mergeWithSources(e,r,deepMergerWith(n))}function mergeWithSources(e,r,n){if(!isDataStructure(e)){throw new TypeError("Cannot merge into non-data-structure value: "+e)}if(isImmutable(e)){return typeof n==="function"&&e.mergeWith?e.mergeWith.apply(e,[n].concat(r)):e.merge?e.merge.apply(e,r):e.concat.apply(e,r)}var i=Array.isArray(e);var s=e;var a=i?$:c;var o=i?function(r){if(s===e){s=shallowCopy(s)}s.push(r)}:function(r,i){var a=w.call(s,i);var o=a&&n?n(s[i],r,i):r;if(!a||o!==s[i]){if(s===e){s=shallowCopy(s)}s[i]=o}};for(var l=0;l<r.length;l++){a(r[l]).forEach(o)}return s}function deepMergerWith(e){function deepMerger(r,n,i){return isDataStructure(r)&&isDataStructure(n)&&areMergeable(r,n)?mergeWithSources(r,[n],deepMerger):e?e(r,n,i):n}return deepMerger}function areMergeable(e,r){var n=C(e);var i=C(r);return isIndexed(n)===isIndexed(i)&&isKeyed(n)===isKeyed(i)}function mergeDeep(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];return mergeDeepWithSources(this,e)}function mergeDeepWith(e){var r=[],n=arguments.length-1;while(n-- >0)r[n]=arguments[n+1];return mergeDeepWithSources(this,r,e)}function mergeIn(e){var r=[],n=arguments.length-1;while(n-- >0)r[n]=arguments[n+1];return updateIn$1(this,e,emptyMap(),(function(e){return mergeWithSources(e,r)}))}function mergeDeepIn(e){var r=[],n=arguments.length-1;while(n-- >0)r[n]=arguments[n+1];return updateIn$1(this,e,emptyMap(),(function(e){return mergeDeepWithSources(e,r)}))}function withMutations(e){var r=this.asMutable();e(r);return r.wasAltered()?r.__ensureOwner(this.__ownerID):this}function asMutable(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)}function asImmutable(){return this.__ensureOwner()}function wasAltered(){return this.__altered}var Y=function(e){function Map(r){return r===undefined||r===null?emptyMap():isMap(r)&&!isOrdered(r)?r:emptyMap().withMutations((function(n){var i=e(r);assertNotInfinite(i.size);i.forEach((function(e,r){return n.set(r,e)}))}))}if(e)Map.__proto__=e;Map.prototype=Object.create(e&&e.prototype);Map.prototype.constructor=Map;Map.of=function of(){var e=[],r=arguments.length;while(r--)e[r]=arguments[r];return emptyMap().withMutations((function(r){for(var n=0;n<e.length;n+=2){if(n+1>=e.length){throw new Error("Missing value for key: "+e[n])}r.set(e[n],e[n+1])}}))};Map.prototype.toString=function toString(){return this.__toString("Map {","}")};Map.prototype.get=function get(e,r){return this._root?this._root.get(0,undefined,e,r):r};Map.prototype.set=function set(e,r){return updateMap(this,e,r)};Map.prototype.remove=function remove(e){return updateMap(this,e,a)};Map.prototype.deleteAll=function deleteAll(e){var r=_(e);if(r.size===0){return this}return this.withMutations((function(e){r.forEach((function(r){return e.remove(r)}))}))};Map.prototype.clear=function clear(){if(this.size===0){return this}if(this.__ownerID){this.size=0;this._root=null;this.__hash=undefined;this.__altered=true;return this}return emptyMap()};Map.prototype.sort=function sort(e){return me(sortFactory(this,e))};Map.prototype.sortBy=function sortBy(e,r){return me(sortFactory(this,r,e))};Map.prototype.map=function map(e,r){var n=this;return this.withMutations((function(i){i.forEach((function(s,a){i.set(a,e.call(r,s,a,n))}))}))};Map.prototype.__iterator=function __iterator(e,r){return new se(this,e,r)};Map.prototype.__iterate=function __iterate(e,r){var n=this;var i=0;this._root&&this._root.iterate((function(r){i++;return e(r[1],r[0],n)}),r);return i};Map.prototype.__ensureOwner=function __ensureOwner(e){if(e===this.__ownerID){return this}if(!e){if(this.size===0){return emptyMap()}this.__ownerID=e;this.__altered=false;return this}return makeMap(this.size,this._root,e,this.__hash)};return Map}(c);Y.isMap=isMap;var X=Y.prototype;X[k]=true;X[r]=X.remove;X.removeAll=X.deleteAll;X.setIn=setIn;X.removeIn=X.deleteIn=deleteIn;X.update=update;X.updateIn=updateIn;X.merge=X.concat=merge$1;X.mergeWith=mergeWith$1;X.mergeDeep=mergeDeep;X.mergeDeepWith=mergeDeepWith;X.mergeIn=mergeIn;X.mergeDeepIn=mergeDeepIn;X.withMutations=withMutations;X.wasAltered=wasAltered;X.asImmutable=asImmutable;X["@@transducer/init"]=X.asMutable=asMutable;X["@@transducer/step"]=function(e,r){return e.set(r[0],r[1])};X["@@transducer/result"]=function(e){return e.asImmutable()};var ee=function ArrayMapNode(e,r){this.ownerID=e;this.entries=r};ee.prototype.get=function get(e,r,n,i){var s=this.entries;for(var a=0,o=s.length;a<o;a++){if(is(n,s[a][0])){return s[a][1]}}return i};ee.prototype.update=function update(e,r,n,i,s,o,l){var u=s===a;var _=this.entries;var c=0;var $=_.length;for(;c<$;c++){if(is(i,_[c][0])){break}}var p=c<$;if(p?_[c][1]===s:u){return this}SetRef(l);(u||!p)&&SetRef(o);if(u&&_.length===1){return}if(!p&&!u&&_.length>=oe){return createNodes(e,_,i,s)}var h=e&&e===this.ownerID;var d=h?_:arrCopy(_);if(p){if(u){c===$-1?d.pop():d[c]=d.pop()}else{d[c]=[i,s]}}else{d.push([i,s])}if(h){this.entries=d;return this}return new ee(e,d)};var te=function BitmapIndexedNode(e,r,n){this.ownerID=e;this.bitmap=r;this.nodes=n};te.prototype.get=function get(e,r,i,a){if(r===undefined){r=hash(i)}var o=1<<((e===0?r:r>>>e)&s);var l=this.bitmap;return(l&o)===0?a:this.nodes[popCount(l&o-1)].get(e+n,r,i,a)};te.prototype.update=function update(e,r,i,o,l,u,_){if(i===undefined){i=hash(o)}var c=(r===0?i:i>>>r)&s;var $=1<<c;var p=this.bitmap;var h=(p&$)!==0;if(!h&&l===a){return this}var d=popCount(p&$-1);var m=this.nodes;var g=h?m[d]:undefined;var f=updateNode(g,e,r+n,i,o,l,u,_);if(f===g){return this}if(!h&&f&&m.length>=le){return expandNodes(e,m,p,c,f)}if(h&&!f&&m.length===2&&isLeafNode(m[d^1])){return m[d^1]}if(h&&f&&m.length===1&&isLeafNode(f)){return f}var y=e&&e===this.ownerID;var S=h?f?p:p^$:p|$;var v=h?f?setAt(m,d,f,y):spliceOut(m,d,y):spliceIn(m,d,f,y);if(y){this.bitmap=S;this.nodes=v;return this}return new te(e,S,v)};var re=function HashArrayMapNode(e,r,n){this.ownerID=e;this.count=r;this.nodes=n};re.prototype.get=function get(e,r,i,a){if(r===undefined){r=hash(i)}var o=(e===0?r:r>>>e)&s;var l=this.nodes[o];return l?l.get(e+n,r,i,a):a};re.prototype.update=function update(e,r,i,o,l,u,_){if(i===undefined){i=hash(o)}var c=(r===0?i:i>>>r)&s;var $=l===a;var p=this.nodes;var h=p[c];if($&&!h){return this}var d=updateNode(h,e,r+n,i,o,l,u,_);if(d===h){return this}var m=this.count;if(!h){m++}else if(!d){m--;if(m<ue){return packNodes(e,p,m,c)}}var g=e&&e===this.ownerID;var f=setAt(p,c,d,g);if(g){this.count=m;this.nodes=f;return this}return new re(e,m,f)};var ne=function HashCollisionNode(e,r,n){this.ownerID=e;this.keyHash=r;this.entries=n};ne.prototype.get=function get(e,r,n,i){var s=this.entries;for(var a=0,o=s.length;a<o;a++){if(is(n,s[a][0])){return s[a][1]}}return i};ne.prototype.update=function update(e,r,n,i,s,o,l){if(n===undefined){n=hash(i)}var u=s===a;if(n!==this.keyHash){if(u){return this}SetRef(l);SetRef(o);return mergeIntoNode(this,e,r,n,[i,s])}var _=this.entries;var c=0;var $=_.length;for(;c<$;c++){if(is(i,_[c][0])){break}}var p=c<$;if(p?_[c][1]===s:u){return this}SetRef(l);(u||!p)&&SetRef(o);if(u&&$===2){return new ie(e,this.keyHash,_[c^1])}var h=e&&e===this.ownerID;var d=h?_:arrCopy(_);if(p){if(u){c===$-1?d.pop():d[c]=d.pop()}else{d[c]=[i,s]}}else{d.push([i,s])}if(h){this.entries=d;return this}return new ne(e,this.keyHash,d)};var ie=function ValueNode(e,r,n){this.ownerID=e;this.keyHash=r;this.entry=n};ie.prototype.get=function get(e,r,n,i){return is(n,this.entry[0])?this.entry[1]:i};ie.prototype.update=function update(e,r,n,i,s,o,l){var u=s===a;var _=is(i,this.entry[0]);if(_?s===this.entry[1]:u){return this}SetRef(l);if(u){SetRef(o);return}if(_){if(e&&e===this.ownerID){this.entry[1]=s;return this}return new ie(e,this.keyHash,[i,s])}SetRef(o);return mergeIntoNode(this,e,r,hash(i),[i,s])};ee.prototype.iterate=ne.prototype.iterate=function(e,r){var n=this.entries;for(var i=0,s=n.length-1;i<=s;i++){if(e(n[r?s-i:i])===false){return false}}};te.prototype.iterate=re.prototype.iterate=function(e,r){var n=this.nodes;for(var i=0,s=n.length-1;i<=s;i++){var a=n[r?s-i:i];if(a&&a.iterate(e,r)===false){return false}}};ie.prototype.iterate=function(e,r){return e(this.entry)};var se=function(e){function MapIterator(e,r,n){this._type=r;this._reverse=n;this._stack=e._root&&mapIteratorFrame(e._root)}if(e)MapIterator.__proto__=e;MapIterator.prototype=Object.create(e&&e.prototype);MapIterator.prototype.constructor=MapIterator;MapIterator.prototype.next=function next(){var e=this._type;var r=this._stack;while(r){var n=r.node;var i=r.index++;var s=void 0;if(n.entry){if(i===0){return mapIteratorValue(e,n.entry)}}else if(n.entries){s=n.entries.length-1;if(i<=s){return mapIteratorValue(e,n.entries[this._reverse?s-i:i])}}else{s=n.nodes.length-1;if(i<=s){var a=n.nodes[this._reverse?s-i:i];if(a){if(a.entry){return mapIteratorValue(e,a.entry)}r=this._stack=mapIteratorFrame(a,r)}continue}}r=this._stack=this._stack.__prev}return iteratorDone()};return MapIterator}(x);function mapIteratorValue(e,r){return iteratorValue(e,r[0],r[1])}function mapIteratorFrame(e,r){return{node:e,index:0,__prev:r}}function makeMap(e,r,n,i){var s=Object.create(X);s.size=e;s._root=r;s.__ownerID=n;s.__hash=i;s.__altered=false;return s}var ae;function emptyMap(){return ae||(ae=makeMap(0))}function updateMap(e,r,n){var i;var s;if(!e._root){if(n===a){return e}s=1;i=new ee(e.__ownerID,[[r,n]])}else{var o=MakeRef();var l=MakeRef();i=updateNode(e._root,e.__ownerID,0,undefined,r,n,o,l);if(!l.value){return e}s=e.size+(o.value?n===a?-1:1:0)}if(e.__ownerID){e.size=s;e._root=i;e.__hash=undefined;e.__altered=true;return e}return i?makeMap(s,i):emptyMap()}function updateNode(e,r,n,i,s,o,l,u){if(!e){if(o===a){return e}SetRef(u);SetRef(l);return new ie(r,i,[s,o])}return e.update(r,n,i,s,o,l,u)}function isLeafNode(e){return e.constructor===ie||e.constructor===ne}function mergeIntoNode(e,r,i,a,o){if(e.keyHash===a){return new ne(r,a,[e.entry,o])}var l=(i===0?e.keyHash:e.keyHash>>>i)&s;var u=(i===0?a:a>>>i)&s;var _;var c=l===u?[mergeIntoNode(e,r,i+n,a,o)]:(_=new ie(r,a,o),l<u?[e,_]:[_,e]);return new te(r,1<<l|1<<u,c)}function createNodes(e,r,n,i){if(!e){e=new OwnerID}var s=new ie(e,hash(n),[n,i]);for(var a=0;a<r.length;a++){var o=r[a];s=s.update(e,0,undefined,o[0],o[1])}return s}function packNodes(e,r,n,i){var s=0;var a=0;var o=new Array(n);for(var l=0,u=1,_=r.length;l<_;l++,u<<=1){var c=r[l];if(c!==undefined&&l!==i){s|=u;o[a++]=c}}return new te(e,s,o)}function expandNodes(e,r,n,s,a){var o=0;var l=new Array(i);for(var u=0;n!==0;u++,n>>>=1){l[u]=n&1?r[o++]:undefined}l[s]=a;return new re(e,o+1,l)}function popCount(e){e-=e>>1&1431655765;e=(e&858993459)+(e>>2&858993459);e=e+(e>>4)&252645135;e+=e>>8;e+=e>>16;return e&127}function setAt(e,r,n,i){var s=i?e:arrCopy(e);s[r]=n;return s}function spliceIn(e,r,n,i){var s=e.length+1;if(i&&r+1===s){e[r]=n;return e}var a=new Array(s);var o=0;for(var l=0;l<s;l++){if(l===r){a[l]=n;o=-1}else{a[l]=e[l+o]}}return a}function spliceOut(e,r,n){var i=e.length-1;if(n&&r===i){e.pop();return e}var s=new Array(i);var a=0;for(var o=0;o<i;o++){if(o===r){a=1}s[o]=e[o+a]}return s}var oe=i/4;var le=i/2;var ue=i/4;var _e="@@__IMMUTABLE_LIST__@@";function isList(e){return Boolean(e&&e[_e])}var ce=function(e){function List(r){var s=emptyList();if(r===undefined||r===null){return s}if(isList(r)){return r}var a=e(r);var o=a.size;if(o===0){return s}assertNotInfinite(o);if(o>0&&o<i){return makeList(0,o,n,null,new pe(a.toArray()))}return s.withMutations((function(e){e.setSize(o);a.forEach((function(r,n){return e.set(n,r)}))}))}if(e)List.__proto__=e;List.prototype=Object.create(e&&e.prototype);List.prototype.constructor=List;List.of=function of(){return this(arguments)};List.prototype.toString=function toString(){return this.__toString("List [","]")};List.prototype.get=function get(e,r){e=wrapIndex(this,e);if(e>=0&&e<this.size){e+=this._origin;var n=listNodeFor(this,e);return n&&n.array[e&s]}return r};List.prototype.set=function set(e,r){return updateList(this,e,r)};List.prototype.remove=function remove(e){return!this.has(e)?this:e===0?this.shift():e===this.size-1?this.pop():this.splice(e,1)};List.prototype.insert=function insert(e,r){return this.splice(e,0,r)};List.prototype.clear=function clear(){if(this.size===0){return this}if(this.__ownerID){this.size=this._origin=this._capacity=0;this._level=n;this._root=this._tail=this.__hash=undefined;this.__altered=true;return this}return emptyList()};List.prototype.push=function push(){var e=arguments;var r=this.size;return this.withMutations((function(n){setListBounds(n,0,r+e.length);for(var i=0;i<e.length;i++){n.set(r+i,e[i])}}))};List.prototype.pop=function pop(){return setListBounds(this,0,-1)};List.prototype.unshift=function unshift(){var e=arguments;return this.withMutations((function(r){setListBounds(r,-e.length);for(var n=0;n<e.length;n++){r.set(n,e[n])}}))};List.prototype.shift=function shift(){return setListBounds(this,1)};List.prototype.concat=function concat(){var r=arguments;var n=[];for(var i=0;i<arguments.length;i++){var s=r[i];var a=e(typeof s!=="string"&&hasIterator(s)?s:[s]);if(a.size!==0){n.push(a)}}if(n.length===0){return this}if(this.size===0&&!this.__ownerID&&n.length===1){return this.constructor(n[0])}return this.withMutations((function(e){n.forEach((function(r){return r.forEach((function(r){return e.push(r)}))}))}))};List.prototype.setSize=function setSize(e){return setListBounds(this,0,e)};List.prototype.map=function map(e,r){var n=this;return this.withMutations((function(i){for(var s=0;s<n.size;s++){i.set(s,e.call(r,i.get(s),s,n))}}))};List.prototype.slice=function slice(e,r){var n=this.size;if(wholeSlice(e,r,n)){return this}return setListBounds(this,resolveBegin(e,n),resolveEnd(r,n))};List.prototype.__iterator=function __iterator(e,r){var n=r?this.size:0;var i=iterateList(this,r);return new x((function(){var s=i();return s===he?iteratorDone():iteratorValue(e,r?--n:n++,s)}))};List.prototype.__iterate=function __iterate(e,r){var n=r?this.size:0;var i=iterateList(this,r);var s;while((s=i())!==he){if(e(s,r?--n:n++,this)===false){break}}return n};List.prototype.__ensureOwner=function __ensureOwner(e){if(e===this.__ownerID){return this}if(!e){if(this.size===0){return emptyList()}this.__ownerID=e;this.__altered=false;return this}return makeList(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash)};return List}($);ce.isList=isList;var $e=ce.prototype;$e[_e]=true;$e[r]=$e.remove;$e.merge=$e.concat;$e.setIn=setIn;$e.deleteIn=$e.removeIn=deleteIn;$e.update=update;$e.updateIn=updateIn;$e.mergeIn=mergeIn;$e.mergeDeepIn=mergeDeepIn;$e.withMutations=withMutations;$e.wasAltered=wasAltered;$e.asImmutable=asImmutable;$e["@@transducer/init"]=$e.asMutable=asMutable;$e["@@transducer/step"]=function(e,r){return e.push(r)};$e["@@transducer/result"]=function(e){return e.asImmutable()};var pe=function VNode(e,r){this.array=e;this.ownerID=r};pe.prototype.removeBefore=function removeBefore(e,r,i){if(i===r?1<<r:this.array.length===0){return this}var a=i>>>r&s;if(a>=this.array.length){return new pe([],e)}var o=a===0;var l;if(r>0){var u=this.array[a];l=u&&u.removeBefore(e,r-n,i);if(l===u&&o){return this}}if(o&&!l){return this}var _=editableVNode(this,e);if(!o){for(var c=0;c<a;c++){_.array[c]=undefined}}if(l){_.array[a]=l}return _};pe.prototype.removeAfter=function removeAfter(e,r,i){if(i===(r?1<<r:0)||this.array.length===0){return this}var a=i-1>>>r&s;if(a>=this.array.length){return this}var o;if(r>0){var l=this.array[a];o=l&&l.removeAfter(e,r-n,i);if(o===l&&a===this.array.length-1){return this}}var u=editableVNode(this,e);u.array.splice(a+1);if(o){u.array[a]=o}return u};var he={};function iterateList(e,r){var s=e._origin;var a=e._capacity;var o=getTailOffset(a);var l=e._tail;return iterateNodeOrLeaf(e._root,e._level,0);function iterateNodeOrLeaf(e,r,n){return r===0?iterateLeaf(e,n):iterateNode(e,r,n)}function iterateLeaf(e,n){var u=n===o?l&&l.array:e&&e.array;var _=n>s?0:s-n;var c=a-n;if(c>i){c=i}return function(){if(_===c){return he}var e=r?--c:_++;return u&&u[e]}}function iterateNode(e,o,l){var u;var _=e&&e.array;var c=l>s?0:s-l>>o;var $=(a-l>>o)+1;if($>i){$=i}return function(){while(true){if(u){var e=u();if(e!==he){return e}u=null}if(c===$){return he}var i=r?--$:c++;u=iterateNodeOrLeaf(_&&_[i],o-n,l+(i<<o))}}}}function makeList(e,r,n,i,s,a,o){var l=Object.create($e);l.size=r-e;l._origin=e;l._capacity=r;l._level=n;l._root=i;l._tail=s;l.__ownerID=a;l.__hash=o;l.__altered=false;return l}var de;function emptyList(){return de||(de=makeList(0,0,n))}function updateList(e,r,n){r=wrapIndex(e,r);if(r!==r){return e}if(r>=e.size||r<0){return e.withMutations((function(e){r<0?setListBounds(e,r).set(0,n):setListBounds(e,0,r+1).set(r,n)}))}r+=e._origin;var i=e._tail;var s=e._root;var a=MakeRef();if(r>=getTailOffset(e._capacity)){i=updateVNode(i,e.__ownerID,0,r,n,a)}else{s=updateVNode(s,e.__ownerID,e._level,r,n,a)}if(!a.value){return e}if(e.__ownerID){e._root=s;e._tail=i;e.__hash=undefined;e.__altered=true;return e}return makeList(e._origin,e._capacity,e._level,s,i)}function updateVNode(e,r,i,a,o,l){var u=a>>>i&s;var _=e&&u<e.array.length;if(!_&&o===undefined){return e}var c;if(i>0){var $=e&&e.array[u];var p=updateVNode($,r,i-n,a,o,l);if(p===$){return e}c=editableVNode(e,r);c.array[u]=p;return c}if(_&&e.array[u]===o){return e}if(l){SetRef(l)}c=editableVNode(e,r);if(o===undefined&&u===c.array.length-1){c.array.pop()}else{c.array[u]=o}return c}function editableVNode(e,r){if(r&&e&&r===e.ownerID){return e}return new pe(e?e.array.slice():[],r)}function listNodeFor(e,r){if(r>=getTailOffset(e._capacity)){return e._tail}if(r<1<<e._level+n){var i=e._root;var a=e._level;while(i&&a>0){i=i.array[r>>>a&s];a-=n}return i}}function setListBounds(e,r,i){if(r!==undefined){r|=0}if(i!==undefined){i|=0}var a=e.__ownerID||new OwnerID;var o=e._origin;var l=e._capacity;var u=o+r;var _=i===undefined?l:i<0?l+i:o+i;if(u===o&&_===l){return e}if(u>=_){return e.clear()}var c=e._level;var $=e._root;var p=0;while(u+p<0){$=new pe($&&$.array.length?[undefined,$]:[],a);c+=n;p+=1<<c}if(p){u+=p;o+=p;_+=p;l+=p}var h=getTailOffset(l);var d=getTailOffset(_);while(d>=1<<c+n){$=new pe($&&$.array.length?[$]:[],a);c+=n}var m=e._tail;var g=d<h?listNodeFor(e,_-1):d>h?new pe([],a):m;if(m&&d>h&&u<l&&m.array.length){$=editableVNode($,a);var f=$;for(var y=c;y>n;y-=n){var S=h>>>y&s;f=f.array[S]=editableVNode(f.array[S],a)}f.array[h>>>n&s]=m}if(_<l){g=g&&g.removeAfter(a,0,_)}if(u>=d){u-=d;_-=d;c=n;$=null;g=g&&g.removeBefore(a,0,u)}else if(u>o||d<h){p=0;while($){var v=u>>>c&s;if(v!==d>>>c&s){break}if(v){p+=(1<<c)*v}c-=n;$=$.array[v]}if($&&u>o){$=$.removeBefore(a,c,u-p)}if($&&d<h){$=$.removeAfter(a,c,d-p)}if(p){u-=p;_-=p}}if(e.__ownerID){e.size=_-u;e._origin=u;e._capacity=_;e._level=c;e._root=$;e._tail=g;e.__hash=undefined;e.__altered=true;return e}return makeList(u,_,c,$,g)}function getTailOffset(e){return e<i?0:e-1>>>n<<n}var me=function(e){function OrderedMap(e){return e===undefined||e===null?emptyOrderedMap():isOrderedMap(e)?e:emptyOrderedMap().withMutations((function(r){var n=c(e);assertNotInfinite(n.size);n.forEach((function(e,n){return r.set(n,e)}))}))}if(e)OrderedMap.__proto__=e;OrderedMap.prototype=Object.create(e&&e.prototype);OrderedMap.prototype.constructor=OrderedMap;OrderedMap.of=function of(){return this(arguments)};OrderedMap.prototype.toString=function toString(){return this.__toString("OrderedMap {","}")};OrderedMap.prototype.get=function get(e,r){var n=this._map.get(e);return n!==undefined?this._list.get(n)[1]:r};OrderedMap.prototype.clear=function clear(){if(this.size===0){return this}if(this.__ownerID){this.size=0;this._map.clear();this._list.clear();this.__altered=true;return this}return emptyOrderedMap()};OrderedMap.prototype.set=function set(e,r){return updateOrderedMap(this,e,r)};OrderedMap.prototype.remove=function remove(e){return updateOrderedMap(this,e,a)};OrderedMap.prototype.__iterate=function __iterate(e,r){var n=this;return this._list.__iterate((function(r){return r&&e(r[1],r[0],n)}),r)};OrderedMap.prototype.__iterator=function __iterator(e,r){return this._list.fromEntrySeq().__iterator(e,r)};OrderedMap.prototype.__ensureOwner=function __ensureOwner(e){if(e===this.__ownerID){return this}var r=this._map.__ensureOwner(e);var n=this._list.__ensureOwner(e);if(!e){if(this.size===0){return emptyOrderedMap()}this.__ownerID=e;this.__altered=false;this._map=r;this._list=n;return this}return makeOrderedMap(r,n,e,this.__hash)};return OrderedMap}(Y);me.isOrderedMap=isOrderedMap;me.prototype[m]=true;me.prototype[r]=me.prototype.remove;function makeOrderedMap(e,r,n,i){var s=Object.create(me.prototype);s.size=e?e.size:0;s._map=e;s._list=r;s.__ownerID=n;s.__hash=i;s.__altered=false;return s}var ge;function emptyOrderedMap(){return ge||(ge=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(e,r,n){var s=e._map;var o=e._list;var l=s.get(r);var u=l!==undefined;var _;var c;if(n===a){if(!u){re