Socket
Socket
Sign inDemoInstall

immutable

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

54

dist/immutable.min.js

@@ -9,28 +9,28 @@ /**

*/
function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=wr.create(u)}else i=t.prototype;return wr.keys(e).forEach(function(t){i[t]=e[t]}),wr.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return wr.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,"constructor",n)}function n(t,e){return t===e||t!==t&&e!==e?!0:t&&e?("function"==typeof t.valueOf&&"function"==typeof e.valueOf&&(t=t.valueOf(),e=e.valueOf()),"function"==typeof t.equals&&"function"==typeof e.equals?t.equals(e):t===e||t!==t&&e!==e):!1}function i(t,e){if(!t)throw Error(e)}function u(t){return t.value=!1,t}function s(t){t&&(t.value=!0)}function o(){}function a(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function h(t){i(1/0!==t,"Cannot perform this action with an infinite size.")}function c(t){return void 0===t.size&&(t.size=t.__iterate(_)),t.size}function f(t,e){return e>=0?+e:c(t)+ +e}function _(){return!0}function l(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function v(t,e){return d(t,e,0)}function p(t,e){return d(t,e,e)}function d(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function y(t){return t>>>1&1073741824|3221225471&t}function m(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){for(var r=0|t;t>4294967295;)t/=4294967295,r^=t;return y(r)}return"string"===e?t.length>jr?g(t):w(t):"function"==typeof t.hashCode?t.hashCode():S(t)}function g(t){var e=Ur[t];return void 0===e&&(e=w(t),Rr===Kr&&(Rr=0,Ur={}),Rr++,Ur[t]=e),e}function w(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)|0;return y(e)}function S(t){var e=Er&&Er.get(t);if(e)return e;if(e=t[Cr])return e;if(!xr){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Cr])return e;if(e=z(t))return e}if(Object.isExtensible&&!Object.isExtensible(t))throw Error("Non-extensible objects are not allowed as keys.");
if(e=++Ar,1073741824&Ar&&(Ar=0),Er)Er.set(t,e);else if(xr)Object.defineProperty(t,Cr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Cr]=e;else{if(!t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Cr]=e}return e}function z(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function I(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function b(){return{value:void 0,done:!0}}function q(t){return!!O(t)}function M(t){return t&&"function"==typeof t.next}function D(t){var e=O(t);return e&&e.call(t)}function O(t){var e=t&&(Jr&&t[Jr]||t[Wr]);return"function"==typeof e?e:void 0}function k(t){return!(!t||!t[Qr])}function x(t){return!(!t||!t[Xr])}function E(t){return!(!t||!t[Fr])}function A(t){return x(t)||E(t)}function C(t){return!(!t||!t[Gr])}function j(t,e){return e}function K(t,e){return[e,t]}function R(t){return function(){return!t.apply(this,arguments)}}function U(t){return function(){return-t.apply(this,arguments)}}function L(t){return"string"==typeof t?JSON.stringify(t):t}function T(t,e){return t>e?-1:e>t?1:0}function B(t,e){if(t===e)return!0;if(!k(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||x(t)!==x(e)||E(t)!==E(e)||C(t)!==C(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!A(t);if(C(t)){var i=t.entries();return e.every(function(t,e){var u=i.next().value;return u&&n(u[1],t)&&(r||n(u[0],e))})&&i.next().done}var u=!1;if(void 0===t.size)if(void 0===e.size)t.cacheResult();else{u=!0;var s=t;t=e,e=s}var o=!0,a=e.__iterate(function(e,i){return(r?t.has(e):u?n(e,t.get(i,Mr)):n(t.get(i,Mr),e))?void 0:(o=!1,!1)});return o&&t.size===a}function W(t){if(1/0===t.size)return 0;var e=C(t),r=x(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+P(m(t),m(e))|0
}:function(t,e){n=n+P(m(t),m(e))|0}:e?function(t){n=31*n+m(t)|0}:function(t){n=n+m(t)|0});return J(i,n)}function J(t,e){return e=kr(e,3432918353),e=kr(e<<15|e>>>-15,461845907),e=kr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=kr(e^e>>>16,2246822507),e=kr(e^e>>>13,3266489909),e=y(e^e>>>16)}function P(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}function H(t,e){var r=t.prototype,n=function(t){r[t]=e[t]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function V(t){return!(!t||!t[_n])}function N(){return yn||(yn=new ln([]))}function Y(t){var e=Array.isArray(t)?new ln(t).fromEntrySeq():M(t)?new dn(t).fromEntrySeq():q(t)?new pn(t).fromEntrySeq():"object"==typeof t?new vn(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function Q(t){var e=F(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function X(t){var e=F(t)||"object"==typeof t&&new vn(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function F(t){return G(t)?new ln(t):M(t)?new dn(t):q(t)?new pn(t):void 0}function G(t){return t&&"number"==typeof t.length}function Z(t,e,r,n){var i=t._cache;if(i){for(var u=i.length-1,s=0;u>=s;s++){var o=i[r?u-s:s];if(e(o[1],n?o[0]:s,t)===!1)return s+1}return s}return t.__iterateUncached(e,r)}function $(t,e,r,n){var i=t._cache;if(i){var u=i.length-1,s=0;return new Hr(function(){var t=i[r?u-s:s];return s++>u?b():I(e,n?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,r)}function te(t,e){return e?ee(e,t,"",{"":t}):re(t)}function ee(t,e,r,n){return Array.isArray(e)?t.call(n,r,an(e).map(function(r,n){return ee(t,r,n,e)})):ne(e)?t.call(n,r,sn(e).map(function(r,n){return ee(t,r,n,e)})):e}function re(t){return Array.isArray(t)?an(t).map(re).toList():ne(t)?sn(t).map(re).toMap():t}function ne(t){return t&&t.constructor===Object}function ie(t){return!(!t||!t[Mn])}function ue(t,e){return I(t,e[0],e[1])}function se(t,e){return{node:t,index:0,__prev:e}
}function oe(t,e,r,n){var i=Object.create(Dn);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ae(){return Tn||(Tn=oe(0))}function he(t,e,r){var n,i;if(t._root){var s=u(Dr),o=u(Or);if(n=ce(t._root,t.__ownerID,0,void 0,e,r,s,o),!o.value)return t;i=t.size+(s.value?r===Mr?-1:1:0)}else{if(r===Mr)return t;i=1,n=new On(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?oe(i,n):ae()}function ce(t,e,r,n,i,u,o,a){return t?t.update(e,r,n,i,u,o,a):u===Mr?t:(s(a),s(o),new Rn(e,n,[i,u]))}function fe(t){return t.constructor===Rn||t.constructor===jn}function _e(t,e,r,n,i){if(t.keyHash===n)return new jn(e,n,[t.entry,i]);var u,s=(0===r?t.keyHash:t.keyHash>>>r)&qr,o=(0===r?n:n>>>r)&qr,a=s===o?[_e(t,e,r+Ir,n,i)]:(u=new Rn(e,n,i),o>s?[t,u]:[u,t]);return new xn(e,1<<s|1<<o,a)}function le(t,e,r,n){t||(t=new o);for(var i=new Rn(t,m(r),[r,n]),u=0;e.length>u;u++){var s=e[u];i=i.update(t,0,void 0,s[0],s[1])}return i}function ve(t,e,r,n){for(var i=0,u=0,s=Array(r),o=0,a=1,h=e.length;h>o;o++,a<<=1){var c=e[o];void 0!==c&&o!==n&&(i|=a,s[u++]=c)}return new xn(t,i,s)}function pe(t,e,r,n,i){for(var u=0,s=Array(br),o=0;0!==r;o++,r>>>=1)s[o]=1&r?e[u++]:void 0;return s[n]=i,new An(t,u+1,s)}function de(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i],s=$r(u);k(u)||(s=s.map(function(t){return te(t)})),n.push(s)}return me(t,e,n)}function ye(t){return function(e,r){return e&&e.mergeDeepWith&&k(r)?e.mergeDeepWith(t,r):t?t(e,r):r}}function me(t,e,r){return r=r.filter(function(t){return 0!==t.size}),0===r.length?t:0===t.size&&1===r.length?t.constructor(r[0]):t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,Mr,function(t){return t===Mr?r:e(t,r)})}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function ge(t,e,r,n){var u=t===Mr,s=e.next();if(s.done){var o=u?r:t,a=n(o);return a===o?t:a}i(u||t&&t.set,"invalid keyPath");var h=s.value,c=u?Mr:t.get(h,Mr),f=ge(c,e,r,n);return f===c?t:f===Mr?t.remove(h):(u?ae():t).set(h,f)}function we(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t
}function Se(t,e,r,n){var i=n?t:a(t);return i[e]=r,i}function ze(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),s=0,o=0;i>o;o++)o===e?(u[o]=r,s=-1):u[o]=t[o+s];return u}function Ie(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,s=0;n>s;s++)s===e&&(u=1),i[s]=t[s+u];return i}function be(t){var e=He(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.contains(e)},e.contains=function(e){return t.has(e)},e.cacheResult=Ve,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Br){var n=t.__iterator(e,r);return new Hr(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===Tr?Lr:Tr,r)},e}function qe(t,e,r){var n=He(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var u=t.get(n,Mr);return u===Mr?i:e.call(r,u,n,t)},n.__iterateUncached=function(n,i){var u=this;return t.__iterate(function(t,i,s){return n(e.call(r,t,i,s),i,u)!==!1},i)},n.__iteratorUncached=function(n,i){var u=t.__iterator(Br,i);return new Hr(function(){var i=u.next();if(i.done)return i;var s=i.value,o=s[0];return I(n,o,e.call(r,s[1],o,t),i)})},n}function Me(t,e){var r=He(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=be(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.contains=function(e){return t.contains(e)},r.cacheResult=Ve,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function De(t,e,r,n){var i=He(t);return n&&(i.has=function(n){var i=t.get(n,Mr);return i!==Mr&&!!e.call(r,i,n,t)},i.get=function(n,i){var u=t.get(n,Mr);return u!==Mr&&e.call(r,u,n,t)?u:i
}),i.__iterateUncached=function(i,u){var s=this,o=0;return t.__iterate(function(t,u,a){return e.call(r,t,u,a)?(o++,i(t,n?u:o-1,s)):void 0},u),o},i.__iteratorUncached=function(i,u){var s=t.__iterator(Br,u),o=0;return new Hr(function(){for(;;){var u=s.next();if(u.done)return u;var a=u.value,h=a[0],c=a[1];if(e.call(r,c,h,t))return I(i,n?h:o++,c,u)}})},i}function Oe(t,e,r){var n=qn().asMutable();return t.__iterate(function(i,u){n.update(e.call(r,i,u,t),0,function(t){return t+1})}),n.asImmutable()}function ke(t,e,r){var n=x(t),i=qn().asMutable();t.__iterate(function(u,s){i.update(e.call(r,u,s,t),function(t){return t=t||[],t.push(n?[s,u]:u),t})});var u=Pe(t);return i.map(function(e){return Be(t,u(e))})}function xe(t,e){if(e>t.size)return t;0>e&&(e=0);var r=He(t);return r.size=t.size&&Math.min(t.size,e),r.__iterateUncached=function(r,n){var i=this;if(0===e)return 0;if(n)return this.cacheResult().__iterate(r,n);var u=0;return t.__iterate(function(t,n){return++u&&r(t,n,i)!==!1&&e>u}),u},r.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=e&&t.__iterator(r,n),u=0;return new Hr(function(){return u++>e?b():i.next()})},r}function Ee(t,e,r){var n=He(t);return n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0;return t.__iterate(function(t,i,o){return e.call(r,t,i,o)&&++s&&n(t,i,u)}),s},n.__iteratorUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterator(n,i);var s=t.__iterator(Br,i),o=!0;return new Hr(function(){if(!o)return b();var t=s.next();if(t.done)return t;var i=t.value,a=i[0],h=i[1];return e.call(r,h,a,u)?n===Br?t:I(n,a,h,t):(o=!1,b())})},n}function Ae(t,e,r){if(0>=e)return t;var n=He(t);return n.size=t.size&&Math.max(0,t.size-e),n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0,o=!0,a=0;return t.__iterate(function(t,i){return o&&(o=s++<e)?void 0:(a++,n(t,r?i:a-1,u))}),a},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var u=e&&t.__iterator(n,i),s=0,o=0;
return new Hr(function(){for(;e>s;)s++,u.next();var t=u.next();return r||n===Tr?t:n===Lr?I(n,o++,void 0,t):I(n,o++,t.value[1],t)})},n}function Ce(t,e,r,n){var i=He(t);return i.__iterateUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterate(i,u);var o=!0,a=0;return t.__iterate(function(t,u,h){return o&&(o=e.call(r,t,u,h))?void 0:(a++,i(t,n?u:a-1,s))}),a},i.__iteratorUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterator(i,u);var o=t.__iterator(Br,u),a=!0,h=0;return new Hr(function(){var t,u,c;do{if(t=o.next(),t.done)return n||i===Tr?t:i===Lr?I(i,h++,void 0,t):I(i,h++,t.value[1],t);var f=t.value;u=f[0],c=f[1],a&&(a=e.call(r,c,u,s))}while(a);return i===Br?t:I(i,u,c,t)})},i}function je(t,e){var r=x(t),n=[t].concat(e).map(function(t){return k(t)?r&&(t=$r(t)):t=r?Y(t):Q(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&x(i)||E(t)&&E(i))return i}var u=new ln(n);return r?u=u.toKeyedSeq():E(t)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),u}function Ke(t,e,r){var n=He(t);return n.__iterateUncached=function(n,i){function u(t,a){var h=this;t.__iterate(function(t,i){return(!e||e>a)&&k(t)?u(t,a+1):n(t,r?i:s++,h)===!1&&(o=!0),!o},i)}var s=0,o=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){var u=t.__iterator(n,i),s=[],o=0;return new Hr(function(){for(;u;){var t=u.next();if(t.done===!1){var a=t.value;if(n===Br&&(a=a[1]),e&&!(e>s.length)||!k(a))return r?t:I(n,o++,a,t);s.push(u),u=a.__iterator(n,i)}else u=s.pop()}return b()})},n}function Re(t,e,r){var n=Pe(t);return t.toSeq().map(function(i,u){return n(e.call(r,i,u,t))}).flatten(!0)}function Ue(t,e){var r=He(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,u=0;return t.__iterate(function(t){return(!u||r(e,u++,i)!==!1)&&r(t,u++,i)!==!1},n),u},r.__iteratorUncached=function(r,n){var i,u=t.__iterator(Tr,n),s=0;return new Hr(function(){return(!i||s%2)&&(i=u.next(),i.done)?i:s%2?I(r,s++,e):I(r,s++,i.value,i)
})},r}function Le(t,e,r){e||(e=Ne);var n=x(t),i=0,u=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return u.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){u[e].length=2}:function(t,e){u[e]=t[1]}),n?sn(u):E(t)?an(u):cn(u)}function Te(t,e,r){if(e||(e=Ne),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return e(r[1],t[1])>0?r:t});return n&&n[0]}return t.reduce(function(t,r){return e(r,t)>0?r:t})}function Be(t,e){return V(t)?e:t.constructor(e)}function We(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Je(t){return h(t.size),c(t)}function Pe(t){return x(t)?$r:E(t)?en:rn}function He(t){return Object.create((x(t)?sn:E(t)?an:cn).prototype)}function Ve(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):nn.prototype.cacheResult.call(this)}function Ne(t,e){return t>e?1:e>t?-1:0}function Ye(t){return!(!t||!t[Qn])}function Qe(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===o?a&&a.array:t&&t.array,i=r>u?0:u-r,h=s-r;return h>br&&(h=br),function(){if(i===h)return $n;var t=e?--h:i++;return n&&n[t]}}function i(t,n,i){var o,a=t&&t.array,h=i>u?0:u-i>>n,c=(s-i>>n)+1;return c>br&&(c=br),function(){for(;;){if(o){var t=o();if(t!==$n)return t;o=null}if(h===c)return $n;var u=e?--c:h++;o=r(a&&a[u],n-Ir,i+(u<<n))}}}var u=t._origin,s=t._capacity,o=nr(s),a=t._tail;return r(t._root,t._level,0)}function Xe(t,e,r,n,i,u,s){var o=Object.create(Xn);return o.size=e-t,o._origin=t,o._capacity=e,o._level=r,o._root=n,o._tail=i,o.__ownerID=u,o.__hash=s,o.__altered=!1,o}function Fe(){return Zn||(Zn=Xe(0,0,Ir))}function Ge(t,e,r){if(e=f(t,e),e>=t.size||0>e)return t.withMutations(function(t){0>e?er(t,e).set(0,r):er(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,s=u(Or);return e>=nr(t._capacity)?n=Ze(n,t.__ownerID,0,e,r,s):i=Ze(i,t.__ownerID,t._level,e,r,s),s.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Xe(t._origin,t._capacity,t._level,i,n):t
}function Ze(t,e,r,n,i,u){var o=n>>>r&qr,a=t&&t.array.length>o;if(!a&&void 0===i)return t;var h;if(r>0){var c=t&&t.array[o],f=Ze(c,e,r-Ir,n,i,u);return f===c?t:(h=$e(t,e),h.array[o]=f,h)}return a&&t.array[o]===i?t:(s(u),h=$e(t,e),void 0===i&&o===h.array.length-1?h.array.pop():h.array[o]=i,h)}function $e(t,e){return e&&t&&e===t.ownerID?t:new Fn(t?t.array.slice():[],e)}function tr(t,e){if(e>=nr(t._capacity))return t._tail;if(1<<t._level+Ir>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&qr],n-=Ir;return r}}function er(t,e,r){var n=t.__ownerID||new o,i=t._origin,u=t._capacity,s=i+e,a=void 0===r?u:0>r?u+r:i+r;if(s===i&&a===u)return t;if(s>=a)return t.clear();for(var h=t._level,c=t._root,f=0;0>s+f;)c=new Fn(c&&c.array.length?[void 0,c]:[],n),h+=Ir,f+=1<<h;f&&(s+=f,i+=f,a+=f,u+=f);for(var _=nr(u),l=nr(a);l>=1<<h+Ir;)c=new Fn(c&&c.array.length?[c]:[],n),h+=Ir;var v=t._tail,p=_>l?tr(t,a-1):l>_?new Fn([],n):v;if(v&&l>_&&u>s&&v.array.length){c=$e(c,n);for(var d=c,y=h;y>Ir;y-=Ir){var m=_>>>y&qr;d=d.array[m]=$e(d.array[m],n)}d.array[_>>>Ir&qr]=v}if(u>a&&(p=p&&p.removeAfter(n,0,a)),s>=l)s-=l,a-=l,h=Ir,c=null,p=p&&p.removeBefore(n,0,s);else if(s>i||_>l){for(f=0;c;){var g=s>>>h&qr;if(g!==l>>>h&qr)break;g&&(f+=(1<<h)*g),h-=Ir,c=c.array[g]}c&&s>i&&(c=c.removeBefore(n,h,s-f)),c&&_>l&&(c=c.removeAfter(n,h,l-f)),f&&(s-=f,a-=f)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=h,t._root=c,t._tail=p,t.__hash=void 0,t.__altered=!0,t):Xe(s,a,h,c,p)}function rr(t,e,r){for(var n=[],i=0,u=0;r.length>u;u++){var s=r[u],o=en(s);o.size>i&&(i=o.size),k(s)||(o=o.map(function(t){return te(t)})),n.push(o)}return i>t.size&&(t=t.setSize(i)),me(t,e,n)}function nr(t){return br>t?0:t-1>>>Ir<<Ir}function ir(t){return ie(t)&&C(t)}function ur(t,e,r,n){var i=Object.create(ti.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function sr(){return ei||(ei=ur(ae(),Fe()))}function or(t,e,r){var n,i,u=t._map,s=t._list,o=u.get(e),a=void 0!==o;if(r===Mr){if(!a)return t;s.size>=br&&s.size>=2*u.size?(i=s.filter(function(t,e){return void 0!==t&&o!==e
}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=u.remove(e),i=o===s.size-1?s.pop():s.set(o,void 0))}else if(a){if(r===s.get(o)[1])return t;n=u,i=s.set(o,[e,r])}else n=u.set(e,s.size),i=s.set(s.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):ur(n,i)}function ar(t){return!(!t||!t[ii])}function hr(t,e,r,n){var i=Object.create(ui);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function cr(){return si||(si=hr(0))}function fr(t){return!(!t||!t[ai])}function _r(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 lr(t,e){var r=Object.create(hi);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function vr(){return ci||(ci=lr(ae()))}function pr(t){return fr(t)&&C(t)}function dr(t,e){var r=Object.create(_i);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function yr(){return li||(li=dr(sr()))}function mr(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function gr(t){return t._name||t.constructor.name}var wr=Object,Sr={};Sr.createClass=t,Sr.superCall=e,Sr.defaultSuperCall=r;var zr="delete",Ir=5,br=1<<Ir,qr=br-1,Mr={},Dr={value:!1},Or={value:!1},kr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},xr=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),Er="function"==typeof WeakMap&&new WeakMap,Ar=0,Cr="__immutablehash__";"function"==typeof Symbol&&(Cr=Symbol(Cr));var jr=16,Kr=255,Rr=0,Ur={},Lr=0,Tr=1,Br=2,Wr="@@iterator",Jr="function"==typeof Symbol&&Symbol.iterator,Pr=Jr||Wr,Hr=function(t){this.next=t};Sr.createClass(Hr,{toString:function(){return"[Iterator]"}},{}),Hr.KEYS=Lr,Hr.VALUES=Tr,Hr.ENTRIES=Br;var Vr=Hr.prototype;Vr.inspect=Vr.toSource=function(){return""+this},Vr[Pr]=function(){return this};var Nr=function(t){return k(t)?t:nn(t)},Yr=Nr;Sr.createClass(Nr,{toArray:function(){h(this.size);
var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new Hn(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toKeyedSeq:function(){return new Pn(this,!0)},toMap:function(){return qn(this.toKeyedSeq())},toObject:function(){h(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return ti(this.toKeyedSeq())},toOrderedSet:function(){return fi(x(this)?this.valueSeq():this)},toSet:function(){return oi(x(this)?this.valueSeq():this)},toSetSeq:function(){return new Vn(this)},toSeq:function(){return E(this)?this.toIndexedSeq():x(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return ri(x(this)?this.valueSeq():this)},toList:function(){return Yn(x(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Be(this,je(this,t))},contains:function(t){return this.some(function(e){return n(e,t)})},entries:function(){return this.__iterator(Br)},every:function(t,e){h(this.size);var r=!0;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},filter:function(t,e){return Be(this,De(this,t,e,!0))},find:function(t,e,r){var n=r;return this.__iterate(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},forEach:function(t,e){return h(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){h(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?n:""}),e},keys:function(){return this.__iterator(Lr)},map:function(t,e){return Be(this,qe(this,t,e))},reduce:function(t,e,r){h(this.size);var n,i;return 2>arguments.length?i=!0:n=e,this.__iterate(function(e,u,s){i?(i=!1,n=e):n=t.call(r,n,e,u,s)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)
},reverse:function(){return Be(this,Me(this,!0))},slice:function(t,e){if(l(t,e,this.size))return this;var r=v(t,this.size),n=p(e,this.size);if(r!==r||n!==n)return this.toSeq().cacheResult().slice(t,e);var i=0===r?this:this.skip(r);return Be(this,void 0===n||n===this.size?i:i.take(n-r))},some:function(t,e){return!this.every(R(t),e)},sort:function(t){return Be(this,Le(this,t))},values:function(){return this.__iterator(Tr)},butLast:function(){return this.slice(0,-1)},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return Oe(this,t,e)},equals:function(t){return B(this,t)},entrySeq:function(){var t=this;if(t._cache)return new ln(t._cache);var e=t.toSeq().map(K).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(R(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(_)},flatMap:function(t,e){return Be(this,Re(this,t,e))},flatten:function(t){return Be(this,Ke(this,t,!0))},fromEntrySeq:function(){return new Nn(this)},get:function(t,e){return this.find(function(e,r){return n(r,t)},void 0,e)},getIn:function(t,e){var r=this;if(t)for(var n,i=D(t)||D(Yr(t));!(n=i.next()).done;){var u=n.value;if(r=r&&r.get?r.get(u,Mr):Mr,r===Mr)return e}return r},groupBy:function(t,e){return ke(this,t,e)},has:function(t){return this.get(t,Mr)!==Mr},hasIn:function(t){return this.getIn(t,Mr)!==Mr},isSubset:function(t){return t="function"==typeof t.contains?t:Yr(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){return t.isSubset(this)},keySeq:function(){return this.toSeq().map(j).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Te(this,t)},maxBy:function(t,e){return Te(this,e,t)},min:function(t){return Te(this,t?U(t):T)},minBy:function(t,e){return Te(this,e?U(e):T,t)},rest:function(){return this.slice(1)},skip:function(t){return Be(this,Ae(this,t,!0))},skipLast:function(t){return Be(this,this.toSeq().reverse().skip(t).reverse())
},skipWhile:function(t,e){return Be(this,Ce(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(R(t),e)},sortBy:function(t,e){return Be(this,Le(this,e,t))},take:function(t){return Be(this,xe(this,t))},takeLast:function(t){return Be(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Be(this,Ee(this,t,e))},takeUntil:function(t,e){return this.takeWhile(R(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=W(this))}},{});var Qr="@@__IMMUTABLE_ITERABLE__@@",Xr="@@__IMMUTABLE_KEYED__@@",Fr="@@__IMMUTABLE_INDEXED__@@",Gr="@@__IMMUTABLE_ORDERED__@@",Zr=Nr.prototype;Zr[Qr]=!0,Zr[Pr]=Zr.values,Zr.toJSON=Zr.toJS,Zr.__toJS=Zr.toArray,Zr.__toStringMapper=L,Zr.inspect=Zr.toSource=function(){return""+this},Zr.chain=Zr.flatMap,function(){try{Object.defineProperty(Zr,"length",{get:function(){if(!Nr.noLengthWarning){var t;try{throw Error()}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}();var $r=function(t){return x(t)?t:sn(t)};Sr.createClass($r,{flip:function(){return Be(this,be(this))},findKey:function(t,e){var r;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return n(e,t)})},lastKeyOf:function(t){return this.toSeq().reverse().keyOf(t)},mapEntries:function(t,e){var r=this,n=0;return Be(this,this.toSeq().map(function(i,u){return t.call(e,[u,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Be(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}},{},Nr);var tn=$r.prototype;tn[Xr]=!0,tn[Pr]=Zr.entries,tn.__toJS=Zr.toObject,tn.__toStringMapper=function(t,e){return e+": "+L(t)};var en=function(t){return E(t)?t:an(t)};Sr.createClass(en,{toKeyedSeq:function(){return new Pn(this,!1)
},filter:function(t,e){return Be(this,De(this,t,e,!1))},findIndex:function(t,e){var r=this.toKeyedSeq().findKey(t,e);return void 0===r?-1:r},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Be(this,Me(this,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=v(t,this.size);var n=this.slice(0,t);return Be(this,1===r?n:n.concat(a(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Be(this,Ke(this,t,!1))},get:function(t,e){return t=f(this,t),0>t||1/0===this.size||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=f(this,t),t>=0&&(void 0!==this.size?1/0===this.size||this.size>t:-1!==this.indexOf(t))},interpose:function(t){return Be(this,Ue(this,t))},last:function(){return this.get(-1)},skip:function(t){var e=this,r=Ae(e,t,!1);return V(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0?e.get(r+t,n):n}),Be(this,r)},skipWhile:function(t,e){return Be(this,Ce(this,t,e,!1))},take:function(t){var e=this,r=xe(e,t);return V(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0&&t>r?e.get(r,n):n}),Be(this,r)}},{},Nr),en.prototype[Fr]=!0,en.prototype[Gr]=!0;var rn=function(t){return k(t)&&!A(t)?t:cn(t)};Sr.createClass(rn,{get:function(t,e){return this.has(t)?t:e},contains:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}},{},Nr),rn.prototype.has=Zr.contains,Nr.isIterable=k,Nr.isKeyed=x,Nr.isIndexed=E,Nr.isAssociative=A,Nr.isOrdered=C,Nr.Keyed=$r,Nr.Indexed=en,Nr.Set=rn,Nr.Iterator=Hr;var nn=function(t){return null===t||void 0===t?N():k(t)?t.toSeq():X(t)},un=nn;Sr.createClass(nn,{toSeq:function(){return this},toString:function(){return this.__toString("Seq {","}")},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this
},__iterate:function(t,e){return Z(this,t,e,!0)},__iterator:function(t,e){return $(this,t,e,!0)}},{of:function(){return un(arguments)}},Nr);var sn=function(t){return null===t||void 0===t?N().toKeyedSeq():k(t)?x(t)?t.toSeq():t.fromEntrySeq():Y(t)},on=sn;Sr.createClass(sn,{toKeyedSeq:function(){return this},toSeq:function(){return this}},{of:function(){return on(arguments)}},nn),H(sn,$r.prototype);var an=function(t){return null===t||void 0===t?N():k(t)?x(t)?t.entrySeq():t.toIndexedSeq():Q(t)},hn=an;Sr.createClass(an,{toIndexedSeq:function(){return this},toString:function(){return this.__toString("Seq [","]")},__iterate:function(t,e){return Z(this,t,e,!1)},__iterator:function(t,e){return $(this,t,e,!1)}},{of:function(){return hn(arguments)}},nn),H(an,en.prototype);var cn=function(t){return(null===t||void 0===t?N():k(t)?x(t)?t.entrySeq():t:Q(t)).toSetSeq()},fn=cn;Sr.createClass(cn,{toSetSeq:function(){return this}},{of:function(){return fn(arguments)}},nn),H(cn,rn.prototype),nn.isSeq=V,nn.Keyed=sn,nn.Set=cn,nn.Indexed=an;var _n="@@__IMMUTABLE_SEQ__@@";nn.prototype[_n]=!0;var ln=function(t){this._array=t,this.size=t.length};Sr.createClass(ln,{get:function(t,e){return this.has(t)?this._array[f(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new Hr(function(){return i>n?b():I(t,i,r[e?n-i++:i++])})}},{},an);var vn=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length};Sr.createClass(vn,{get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var s=n[e?i-u:u];if(t(r[s],s,this)===!1)return u+1}return u},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,u=0;return new Hr(function(){var s=n[e?i-u:u];return u++>i?b():I(t,s,r[s])})}},{},sn),vn.prototype[Gr]=!0;var pn=function(t){this._iterable=t,this.size=t.length||t.size
};Sr.createClass(pn,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=D(r),i=0;if(M(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=D(r);if(!M(n))return new Hr(b);var i=0;return new Hr(function(){var e=n.next();return e.done?e:I(t,i++,e.value)})}},{},an);var dn=function(t){this._iterator=t,this._iteratorCache=[]};Sr.createClass(dn,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var s=u.value;if(n[i]=s,t(s,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Hr(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return I(t,i,n[i++])})}},{},an);var yn,mn=function(){throw TypeError("Abstract")};Sr.createClass(mn,{},{},Nr);var gn=function(){Sr.defaultSuperCall(this,wn.prototype,arguments)},wn=gn;Sr.createClass(gn,{},{},mn),H(gn,$r.prototype);var Sn=function(){Sr.defaultSuperCall(this,zn.prototype,arguments)},zn=Sn;Sr.createClass(Sn,{},{},mn),H(Sn,en.prototype);var In=function(){Sr.defaultSuperCall(this,bn.prototype,arguments)},bn=In;Sr.createClass(In,{},{},mn),H(In,rn.prototype),mn.Keyed=gn,mn.Indexed=Sn,mn.Set=In;var qn=function(t){return null===t||void 0===t?ae():ie(t)?t:ae().withMutations(function(e){var r=$r(t);h(r.size),r.forEach(function(t,r){return e.set(r,t)})})};Sr.createClass(qn,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,void 0,t,e):e},set:function(t,e){return he(this,t,e)},setIn:function(t,e){return this.updateIn(t,Mr,function(){return e})},remove:function(t){return he(this,t,Mr)},removeIn:function(t){return this.updateIn(t,function(){return Mr})},update:function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)
},updateIn:function(t,e,r){r||(r=e,e=void 0);var n=ge(this,D(t)||D(Nr(t)),e,r);return n===Mr?void 0:n},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ae()},merge:function(){return de(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return de(this,t,e)},mergeIn:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return this.updateIn(t,ae(),function(t){return t.merge.apply(t,e)})},mergeDeep:function(){return de(this,ye(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return de(this,ye(t),e)},mergeDeepIn:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return this.updateIn(t,ae(),function(t){return t.mergeDeep.apply(t,e)})},sort:function(t){return ti(Le(this,t))},sortBy:function(t,e){return ti(Le(this,e,t))},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new o)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterator:function(t,e){return new Ln(this,t,e)},__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},__ensureOwner:function(t){return t===this.__ownerID?this:t?oe(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{},gn),qn.isMap=ie;var Mn="@@__IMMUTABLE_MAP__@@",Dn=qn.prototype;Dn[Mn]=!0,Dn[zr]=Dn.remove;var On=function(t,e){this.ownerID=t,this.entries=e},kn=On;Sr.createClass(On,{get:function(t,e,r,i){for(var u=this.entries,s=0,o=u.length;o>s;s++)if(n(r,u[s][0]))return u[s][1];return i},update:function(t,e,r,i,u,o,h){for(var c=u===Mr,f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(v?f[_][1]===u:c)return this;if(s(h),(c||!v)&&s(o),!c||1!==f.length){if(!v&&!c&&f.length>=Bn)return le(t,f,i,u);
var p=t&&t===this.ownerID,d=p?f:a(f);return v?c?_===l-1?d.pop():d[_]=d.pop():d[_]=[i,u]:d.push([i,u]),p?(this.entries=d,this):new kn(t,d)}}},{});var xn=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},En=xn;Sr.createClass(xn,{get:function(t,e,r,n){void 0===e&&(e=m(r));var i=1<<((0===t?e:e>>>t)&qr),u=this.bitmap;return 0===(u&i)?n:this.nodes[we(u&i-1)].get(t+Ir,e,r,n)},update:function(t,e,r,n,i,u,s){void 0===r&&(r=m(n));var o=(0===e?r:r>>>e)&qr,a=1<<o,h=this.bitmap,c=0!==(h&a);if(!c&&i===Mr)return this;var f=we(h&a-1),_=this.nodes,l=c?_[f]:void 0,v=ce(l,t,e+Ir,r,n,i,u,s);if(v===l)return this;if(!c&&v&&_.length>=Wn)return pe(t,_,h,o,v);if(c&&!v&&2===_.length&&fe(_[1^f]))return _[1^f];if(c&&v&&1===_.length&&fe(v))return v;var p=t&&t===this.ownerID,d=c?v?h:h^a:h|a,y=c?v?Se(_,f,v,p):Ie(_,f,p):ze(_,f,v,p);return p?(this.bitmap=d,this.nodes=y,this):new En(t,d,y)}},{});var An=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},Cn=An;Sr.createClass(An,{get:function(t,e,r,n){void 0===e&&(e=m(r));var i=(0===t?e:e>>>t)&qr,u=this.nodes[i];return u?u.get(t+Ir,e,r,n):n},update:function(t,e,r,n,i,u,s){void 0===r&&(r=m(n));var o=(0===e?r:r>>>e)&qr,a=i===Mr,h=this.nodes,c=h[o];if(a&&!c)return this;var f=ce(c,t,e+Ir,r,n,i,u,s);if(f===c)return this;var _=this.count;if(c){if(!f&&(_--,Jn>_))return ve(t,h,_,o)}else _++;var l=t&&t===this.ownerID,v=Se(h,o,f,l);return l?(this.count=_,this.nodes=v,this):new Cn(t,_,v)}},{});var jn=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r},Kn=jn;Sr.createClass(jn,{get:function(t,e,r,i){for(var u=this.entries,s=0,o=u.length;o>s;s++)if(n(r,u[s][0]))return u[s][1];return i},update:function(t,e,r,i,u,o,h){void 0===r&&(r=m(i));var c=u===Mr;if(r!==this.keyHash)return c?this:(s(h),s(o),_e(this,t,e,r,[i,u]));for(var f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(v?f[_][1]===u:c)return this;if(s(h),(c||!v)&&s(o),c&&2===l)return new Rn(t,this.keyHash,f[1^_]);var p=t&&t===this.ownerID,d=p?f:a(f);return v?c?_===l-1?d.pop():d[_]=d.pop():d[_]=[i,u]:d.push([i,u]),p?(this.entries=d,this):new Kn(t,this.keyHash,d)
}},{});var Rn=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r},Un=Rn;Sr.createClass(Rn,{get:function(t,e,r,i){return n(r,this.entry[0])?this.entry[1]:i},update:function(t,e,r,i,u,o,a){var h=u===Mr,c=n(i,this.entry[0]);return(c?u===this.entry[1]:h)?this:(s(a),h?void s(o):c?t&&t===this.ownerID?(this.entry[1]=u,this):new Un(t,this.keyHash,[i,u]):(s(o),_e(this,t,e,m(i),[i,u])))}},{}),On.prototype.iterate=jn.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},xn.prototype.iterate=An.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}},Rn.prototype.iterate=function(t){return t(this.entry)};var Ln=function(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&se(t._root)};Sr.createClass(Ln,{next:function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return ue(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return ue(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var u=n.nodes[this._reverse?r-i:i];if(u){if(u.entry)return ue(t,u.entry);e=this._stack=se(u,e)}continue}e=this._stack=this._stack.__prev}return b()}},{},Hr);var Tn,Bn=br/4,Wn=br/2,Jn=br/4,Pn=function(t,e){this._iter=t,this._useKeys=e,this.size=t.size};Sr.createClass(Pn,{get:function(t,e){return this._iter.get(t,e)},has:function(t){return this._iter.has(t)},valueSeq:function(){return this._iter.valueSeq()},reverse:function(){var t=this,e=Me(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},map:function(t,e){var r=this,n=qe(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},__iterate:function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Je(this):0,function(i){return t(i,e?--r:r++,n)}),e)},__iterator:function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(Tr,e),n=e?Je(this):0;
return new Hr(function(){var i=r.next();return i.done?i:I(t,e?--n:n++,i.value,i)})}},{},sn),Pn.prototype[Gr]=!0;var Hn=function(t){this._iter=t,this.size=t.size};Sr.createClass(Hn,{contains:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(Tr,e),n=0;return new Hr(function(){var e=r.next();return e.done?e:I(t,n++,e.value,e)})}},{},an);var Vn=function(t){this._iter=t,this.size=t.size};Sr.createClass(Vn,{has:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(Tr,e);return new Hr(function(){var e=r.next();return e.done?e:I(t,e.value,e.value,e)})}},{},cn);var Nn=function(t){this._iter=t,this.size=t.size};Sr.createClass(Nn,{entrySeq:function(){return this._iter.toSeq()},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return e?(We(e),t(e[1],e[0],r)):void 0},e)},__iterator:function(t,e){var r=this._iter.__iterator(Tr,e);return new Hr(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return We(n),t===Br?e:I(t,n[0],n[1],e)}})}},{},sn),Hn.prototype.cacheResult=Pn.prototype.cacheResult=Vn.prototype.cacheResult=Nn.prototype.cacheResult=Ve;var Yn=function(t){var e=Fe();if(null===t||void 0===t)return e;if(Ye(t))return t;var r=en(t),n=r.size;return 0===n?e:(h(n),n>0&&br>n?Xe(0,n,Ir,null,new Fn(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))};Sr.createClass(Yn,{toString:function(){return this.__toString("List [","]")},get:function(t,e){if(t=f(this,t),0>t||t>=this.size)return e;t+=this._origin;var r=tr(this,t);return r&&r.array[t&qr]},set:function(t,e){return Ge(this,t,e)},remove:function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Ir,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Fe()
},push:function(){var t=arguments,e=this.size;return this.withMutations(function(r){er(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return er(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){er(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return er(this,1)},merge:function(){return rr(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return rr(this,t,e)},mergeDeep:function(){return rr(this,ye(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return rr(this,ye(t),e)},setSize:function(t){return er(this,0,t)},slice:function(t,e){var r=this.size;return l(t,e,r)?this:er(this,v(t,r),p(e,r))},__iterator:function(t,e){var r=0,n=Qe(this,e);return new Hr(function(){var e=n();return e===$n?b():I(t,r++,e)})},__iterate:function(t,e){for(var r,n=0,i=Qe(this,e);(r=i())!==$n&&t(r,n++,this)!==!1;);return n},__ensureOwner:function(t){return t===this.__ownerID?this:t?Xe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{of:function(){return this(arguments)}},Sn),Yn.isList=Ye;var Qn="@@__IMMUTABLE_LIST__@@",Xn=Yn.prototype;Xn[Qn]=!0,Xn[zr]=Xn.remove,Xn.setIn=Dn.setIn,Xn.deleteIn=Xn.removeIn=Dn.removeIn,Xn.update=Dn.update,Xn.updateIn=Dn.updateIn,Xn.mergeIn=Dn.mergeIn,Xn.mergeDeepIn=Dn.mergeDeepIn,Xn.withMutations=Dn.withMutations,Xn.asMutable=Dn.asMutable,Xn.asImmutable=Dn.asImmutable,Xn.wasAltered=Dn.wasAltered;var Fn=function(t,e){this.array=t,this.ownerID=e},Gn=Fn;Sr.createClass(Fn,{removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&qr;if(n>=this.array.length)return new Gn([],t);var i,u=0===n;if(e>0){var s=this.array[n];if(i=s&&s.removeBefore(t,e-Ir,r),i===s&&u)return this}if(u&&!i)return this;var o=$e(this,t);if(!u)for(var a=0;n>a;a++)o.array[a]=void 0;return i&&(o.array[n]=i),o},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;
var n=r-1>>>e&qr;if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var s=this.array[n];if(i=s&&s.removeAfter(t,e-Ir,r),i===s&&u)return this}if(u&&!i)return this;var o=$e(this,t);return u||o.array.pop(),i&&(o.array[n]=i),o}},{});var Zn,$n={},ti=function(t){return null===t||void 0===t?sr():ir(t)?t:sr().withMutations(function(e){var r=$r(t);h(r.size),r.forEach(function(t,r){return e.set(r,t)})})};Sr.createClass(ti,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):sr()},set:function(t,e){return or(this,t,e)},remove:function(t){return or(this,t,Mr)},wasAltered:function(){return this._map.wasAltered()||this._list.wasAltered()},__iterate:function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?ur(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)}},{of:function(){return this(arguments)}},qn),ti.isOrderedMap=ir,ti.prototype[Gr]=!0,ti.prototype[zr]=ti.prototype.remove;var ei,ri=function(t){return null===t||void 0===t?cr():ar(t)?t:cr().unshiftAll(t)},ni=ri;Sr.createClass(ri,{toString:function(){return this.__toString("Stack [","]")},get:function(t,e){for(var r=this._head;r&&t--;)r=r.next;return r?r.value:e},peek:function(){return this._head&&this._head.value},push:function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):hr(t,e)},pushAll:function(t){if(t=en(t),0===t.size)return this;h(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}
}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):hr(e,r)},pop:function(){return this.slice(1)},unshift:function(){return this.push.apply(this,arguments)},unshiftAll:function(t){return this.pushAll(t)},shift:function(){return this.pop.apply(this,arguments)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):cr()},slice:function(t,e){if(l(t,e,this.size))return this;var r=v(t,this.size),n=p(e,this.size);if(n!==this.size)return Sr.superCall(this,ni.prototype,"slice",[t,e]);for(var i=this.size-r,u=this._head;r--;)u=u.next;return this.__ownerID?(this.size=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):hr(i,u)},__ensureOwner:function(t){return t===this.__ownerID?this:t?hr(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},__iterate:function(t,e){if(e)return this.toSeq().cacheResult.__iterate(t,e);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},__iterator:function(t,e){if(e)return this.toSeq().cacheResult().__iterator(t,e);var r=0,n=this._head;return new Hr(function(){if(n){var e=n.value;return n=n.next,I(t,r++,e)}return b()})}},{of:function(){return this(arguments)}},Sn),ri.isStack=ar;var ii="@@__IMMUTABLE_STACK__@@",ui=ri.prototype;ui[ii]=!0,ui.withMutations=Dn.withMutations,ui.asMutable=Dn.asMutable,ui.asImmutable=Dn.asImmutable,ui.wasAltered=Dn.wasAltered;var si,oi=function(t){return null===t||void 0===t?vr():fr(t)?t:vr().withMutations(function(e){var r=rn(t);h(r.size),r.forEach(function(t){return e.add(t)})})};Sr.createClass(oi,{toString:function(){return this.__toString("Set {","}")},has:function(t){return this._map.has(t)},add:function(t){return _r(this,this._map.set(t,!0))},remove:function(t){return _r(this,this._map.remove(t))},clear:function(){return _r(this,this._map.clear())},union:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0===this.size&&1===t.length?this.constructor(t[0]):this.withMutations(function(e){for(var r=0;t.length>r;r++)rn(t[r]).forEach(function(t){return e.add(t)
})})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return rn(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.remove(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return rn(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.remove(r)})})},merge:function(){return this.union.apply(this,arguments)},mergeWith:function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.union.apply(this,t)},sort:function(t){return fi(Le(this,t))},sortBy:function(t,e){return fi(Le(this,e,t))},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__iterator:function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)}},{of:function(){return this(arguments)},fromKeys:function(t){return this($r(t).keySeq())}},In),oi.isSet=fr;var ai="@@__IMMUTABLE_SET__@@",hi=oi.prototype;hi[ai]=!0,hi[zr]=hi.remove,hi.mergeDeep=hi.merge,hi.mergeDeepWith=hi.mergeWith,hi.withMutations=Dn.withMutations,hi.asMutable=Dn.asMutable,hi.asImmutable=Dn.asImmutable,hi.__empty=vr,hi.__make=lr;var ci,fi=function(t){return null===t||void 0===t?yr():pr(t)?t:yr().withMutations(function(e){var r=rn(t);h(r.size),r.forEach(function(t){return e.add(t)})})};Sr.createClass(fi,{toString:function(){return this.__toString("OrderedSet {","}")}},{of:function(){return this(arguments)},fromKeys:function(t){return this($r(t).keySeq())}},oi),fi.isOrderedSet=pr;var _i=fi.prototype;_i[Gr]=!0,_i.__empty=yr,_i.__make=dr;var li,vi=function(t,e){var r=function(t){return this instanceof r?void(this._map=qn(t)):new r(t)
},n=Object.keys(t),u=r.prototype=Object.create(pi);u.constructor=r,e&&(u._name=e),u._defaultValues=t,u._keys=n,u.size=n.length;try{n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this.get(t)},set:function(e){i(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})})}catch(s){}return r};Sr.createClass(vi,{toString:function(){return this.__toString(gr(this)+" {","}")},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},clear:function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=mr(this,ae()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+gr(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:mr(this,r)},remove:function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:mr(this,e)},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){var r=this;return $r(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},__iterate:function(t,e){var r=this;return $r(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?mr(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},gn);var pi=vi.prototype;pi[zr]=pi.remove,pi.deleteIn=pi.removeIn=Dn.removeIn,pi.merge=Dn.merge,pi.mergeWith=Dn.mergeWith,pi.mergeIn=Dn.mergeIn,pi.mergeDeep=Dn.mergeDeep,pi.mergeDeepWith=Dn.mergeDeepWith,pi.mergeDeepIn=Dn.mergeDeepIn,pi.setIn=Dn.setIn,pi.update=Dn.update,pi.updateIn=Dn.updateIn,pi.withMutations=Dn.withMutations,pi.asMutable=Dn.asMutable,pi.asImmutable=Dn.asImmutable;var di=function(t,e,r){return this instanceof yi?(i(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),t===e&&gi?gi:(r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.size=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new yi(t,e,r)
},yi=di;Sr.createClass(di,{toString:function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return this.has(t)?this._start+f(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e)},slice:function(t,e){return l(t,e,this.size)?this:(t=v(t,this.size),e=p(e,this.size),t>=e?gi:new yi(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;r>=u;u++){if(t(i,u,this)===!1)return u+1;i+=e?-n:n}return u},__iterator:function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;return new Hr(function(){var s=i;return i+=e?-n:n,u>r?b():I(t,u++,s)})},equals:function(t){return t instanceof yi?this._start===t._start&&this._end===t._end&&this._step===t._step:B(this,t)}},{},an);var mi=di.prototype;mi.__toJS=mi.toArray,mi.first=Xn.first,mi.last=Xn.last;var gi=di(0,0),wi=function(t,e){return 0>=e&&Ii?Ii:this instanceof Si?(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),void(0===this.size&&(Ii=this))):new Si(t,e)},Si=wi;Sr.createClass(wi,{toString:function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return n(this._value,t)},slice:function(t,e){var r=this.size;return l(t,e,r)?this:new Si(this._value,p(e,r)-v(t,r))},reverse:function(){return this},indexOf:function(t){return n(this._value,t)?0:-1},lastIndexOf:function(t){return n(this._value,t)?this.size:-1},__iterate:function(t){for(var e=0;this.size>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;
return new Hr(function(){return e.size>r?I(t,r++,e._value):b()})},equals:function(t){return t instanceof Si?n(this._value,t._value):B(t)}},{},an);var zi=wi.prototype;zi.last=zi.first,zi.has=mi.has,zi.take=mi.take,zi.skip=mi.skip,zi.__toJS=mi.__toJS;var Ii,bi={Iterable:Nr,Seq:nn,Collection:mn,Map:qn,OrderedMap:ti,List:Yn,Stack:ri,Set:oi,OrderedSet:fi,Record:vi,Range:di,Repeat:wi,is:n,fromJS:te};return bi}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=Sr.create(u)}else i=t.prototype;return Sr.keys(e).forEach(function(t){i[t]=e[t]}),Sr.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return Sr.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,"constructor",n)}function n(t,e){return t===e||t!==t&&e!==e?!0:t&&e?("function"==typeof t.valueOf&&"function"==typeof e.valueOf&&(t=t.valueOf(),e=e.valueOf()),"function"==typeof t.equals&&"function"==typeof e.equals?t.equals(e):t===e||t!==t&&e!==e):!1}function i(t,e){if(!t)throw Error(e)}function u(t){return t.value=!1,t}function s(t){t&&(t.value=!0)}function o(){}function a(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function h(t){i(1/0!==t,"Cannot perform this action with an infinite size.")}function c(t){return void 0===t.size&&(t.size=t.__iterate(_)),t.size}function f(t,e){return e>=0?+e:c(t)+ +e}function _(){return!0}function l(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function v(t,e){return d(t,e,0)}function p(t,e){return d(t,e,e)}function d(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function y(t){return t>>>1&1073741824|3221225471&t}function m(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){for(var r=0|t;t>4294967295;)t/=4294967295,r^=t;return y(r)}return"string"===e?t.length>Kr?g(t):w(t):"function"==typeof t.hashCode?t.hashCode():S(t)}function g(t){var e=Lr[t];return void 0===e&&(e=w(t),Ur===Rr&&(Ur=0,Lr={}),Ur++,Lr[t]=e),e}function w(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)|0;return y(e)}function S(t){var e=Ar&&Ar.get(t);if(e)return e;if(e=t[jr])return e;if(!Er){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[jr])return e;if(e=z(t))return e}if(Object.isExtensible&&!Object.isExtensible(t))throw Error("Non-extensible objects are not allowed as keys.");
if(e=++Cr,1073741824&Cr&&(Cr=0),Ar)Ar.set(t,e);else if(Er)Object.defineProperty(t,jr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[jr]=e;else{if(!t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[jr]=e}return e}function z(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function I(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function b(){return{value:void 0,done:!0}}function q(t){return!!O(t)}function M(t){return t&&"function"==typeof t.next}function D(t){var e=O(t);return e&&e.call(t)}function O(t){var e=t&&(Pr&&t[Pr]||t[Jr]);return"function"==typeof e?e:void 0}function k(t){return!(!t||!t[Xr])}function x(t){return!(!t||!t[Fr])}function E(t){return!(!t||!t[Gr])}function A(t){return x(t)||E(t)}function C(t){return!(!t||!t[Zr])}function j(t,e){return e}function K(t,e){return[e,t]}function R(t){return function(){return!t.apply(this,arguments)}}function U(t){return function(){return-t.apply(this,arguments)}}function L(t){return"string"==typeof t?JSON.stringify(t):t}function T(t,e){return e>t?1:t>e?-1:0}function B(t,e){if(t===e)return!0;if(!k(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||x(t)!==x(e)||E(t)!==E(e)||C(t)!==C(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!A(t);if(C(t)){var i=t.entries();return e.every(function(t,e){var u=i.next().value;return u&&n(u[1],t)&&(r||n(u[0],e))})&&i.next().done}var u=!1;if(void 0===t.size)if(void 0===e.size)t.cacheResult();else{u=!0;var s=t;t=e,e=s}var o=!0,a=e.__iterate(function(e,i){return(r?t.has(e):u?n(e,t.get(i,Dr)):n(t.get(i,Dr),e))?void 0:(o=!1,!1)});return o&&t.size===a}function W(t){if(1/0===t.size)return 0;var e=C(t),r=x(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+P(m(t),m(e))|0
}:function(t,e){n=n+P(m(t),m(e))|0}:e?function(t){n=31*n+m(t)|0}:function(t){n=n+m(t)|0});return J(i,n)}function J(t,e){return e=xr(e,3432918353),e=xr(e<<15|e>>>-15,461845907),e=xr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=xr(e^e>>>16,2246822507),e=xr(e^e>>>13,3266489909),e=y(e^e>>>16)}function P(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}function H(t,e){var r=t.prototype,n=function(t){r[t]=e[t]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function V(t){return!(!t||!t[ln])}function N(){return mn||(mn=new vn([]))}function Y(t){var e=Array.isArray(t)?new vn(t).fromEntrySeq():M(t)?new yn(t).fromEntrySeq():q(t)?new dn(t).fromEntrySeq():"object"==typeof t?new pn(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function Q(t){var e=F(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function X(t){var e=F(t)||"object"==typeof t&&new pn(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function F(t){return G(t)?new vn(t):M(t)?new yn(t):q(t)?new dn(t):void 0}function G(t){return t&&"number"==typeof t.length}function Z(t,e,r,n){var i=t._cache;if(i){for(var u=i.length-1,s=0;u>=s;s++){var o=i[r?u-s:s];if(e(o[1],n?o[0]:s,t)===!1)return s+1}return s}return t.__iterateUncached(e,r)}function $(t,e,r,n){var i=t._cache;if(i){var u=i.length-1,s=0;return new Vr(function(){var t=i[r?u-s:s];return s++>u?b():I(e,n?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,r)}function te(t,e){return e?ee(e,t,"",{"":t}):re(t)}function ee(t,e,r,n){return Array.isArray(e)?t.call(n,r,hn(e).map(function(r,n){return ee(t,r,n,e)})):ne(e)?t.call(n,r,on(e).map(function(r,n){return ee(t,r,n,e)})):e}function re(t){return Array.isArray(t)?hn(t).map(re).toList():ne(t)?on(t).map(re).toMap():t}function ne(t){return t&&t.constructor===Object}function ie(t){return!(!t||!t[Dn])}function ue(t,e){return I(t,e[0],e[1])}function se(t,e){return{node:t,index:0,__prev:e}
}function oe(t,e,r,n){var i=Object.create(On);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ae(){return Bn||(Bn=oe(0))}function he(t,e,r){var n,i;if(t._root){var s=u(Or),o=u(kr);if(n=ce(t._root,t.__ownerID,0,void 0,e,r,s,o),!o.value)return t;i=t.size+(s.value?r===Dr?-1:1:0)}else{if(r===Dr)return t;i=1,n=new kn(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?oe(i,n):ae()}function ce(t,e,r,n,i,u,o,a){return t?t.update(e,r,n,i,u,o,a):u===Dr?t:(s(a),s(o),new Un(e,n,[i,u]))}function fe(t){return t.constructor===Un||t.constructor===Kn}function _e(t,e,r,n,i){if(t.keyHash===n)return new Kn(e,n,[t.entry,i]);var u,s=(0===r?t.keyHash:t.keyHash>>>r)&Mr,o=(0===r?n:n>>>r)&Mr,a=s===o?[_e(t,e,r+br,n,i)]:(u=new Un(e,n,i),o>s?[t,u]:[u,t]);return new En(e,1<<s|1<<o,a)}function le(t,e,r,n){t||(t=new o);for(var i=new Un(t,m(r),[r,n]),u=0;e.length>u;u++){var s=e[u];i=i.update(t,0,void 0,s[0],s[1])}return i}function ve(t,e,r,n){for(var i=0,u=0,s=Array(r),o=0,a=1,h=e.length;h>o;o++,a<<=1){var c=e[o];void 0!==c&&o!==n&&(i|=a,s[u++]=c)}return new En(t,i,s)}function pe(t,e,r,n,i){for(var u=0,s=Array(qr),o=0;0!==r;o++,r>>>=1)s[o]=1&r?e[u++]:void 0;return s[n]=i,new Cn(t,u+1,s)}function de(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i],s=tn(u);k(u)||(s=s.map(function(t){return te(t)})),n.push(s)}return me(t,e,n)}function ye(t){return function(e,r){return e&&e.mergeDeepWith&&k(r)?e.mergeDeepWith(t,r):t?t(e,r):r}}function me(t,e,r){return r=r.filter(function(t){return 0!==t.size}),0===r.length?t:0===t.size&&1===r.length?t.constructor(r[0]):t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,Dr,function(t){return t===Dr?r:e(t,r)})}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function ge(t,e,r,n){var u=t===Dr,s=e.next();if(s.done){var o=u?r:t,a=n(o);return a===o?t:a}i(u||t&&t.set,"invalid keyPath");var h=s.value,c=u?Dr:t.get(h,Dr),f=ge(c,e,r,n);return f===c?t:f===Dr?t.remove(h):(u?ae():t).set(h,f)}function we(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t
}function Se(t,e,r,n){var i=n?t:a(t);return i[e]=r,i}function ze(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),s=0,o=0;i>o;o++)o===e?(u[o]=r,s=-1):u[o]=t[o+s];return u}function Ie(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,s=0;n>s;s++)s===e&&(u=1),i[s]=t[s+u];return i}function be(t){var e=Ve(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.contains(e)},e.contains=function(e){return t.has(e)},e.cacheResult=Ne,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===Wr){var n=t.__iterator(e,r);return new Vr(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===Br?Tr:Br,r)},e}function qe(t,e,r){var n=Ve(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var u=t.get(n,Dr);return u===Dr?i:e.call(r,u,n,t)},n.__iterateUncached=function(n,i){var u=this;return t.__iterate(function(t,i,s){return n(e.call(r,t,i,s),i,u)!==!1},i)},n.__iteratorUncached=function(n,i){var u=t.__iterator(Wr,i);return new Vr(function(){var i=u.next();if(i.done)return i;var s=i.value,o=s[0];return I(n,o,e.call(r,s[1],o,t),i)})},n}function Me(t,e){var r=Ve(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=be(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.contains=function(e){return t.contains(e)},r.cacheResult=Ne,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function De(t,e,r,n){var i=Ve(t);return n&&(i.has=function(n){var i=t.get(n,Dr);return i!==Dr&&!!e.call(r,i,n,t)},i.get=function(n,i){var u=t.get(n,Dr);return u!==Dr&&e.call(r,u,n,t)?u:i
}),i.__iterateUncached=function(i,u){var s=this,o=0;return t.__iterate(function(t,u,a){return e.call(r,t,u,a)?(o++,i(t,n?u:o-1,s)):void 0},u),o},i.__iteratorUncached=function(i,u){var s=t.__iterator(Wr,u),o=0;return new Vr(function(){for(;;){var u=s.next();if(u.done)return u;var a=u.value,h=a[0],c=a[1];if(e.call(r,c,h,t))return I(i,n?h:o++,c,u)}})},i}function Oe(t,e,r){var n=Mn().asMutable();return t.__iterate(function(i,u){n.update(e.call(r,i,u,t),0,function(t){return t+1})}),n.asImmutable()}function ke(t,e,r){var n=x(t),i=Mn().asMutable();t.__iterate(function(u,s){i.update(e.call(r,u,s,t),function(t){return t=t||[],t.push(n?[s,u]:u),t})});var u=He(t);return i.map(function(e){return We(t,u(e))})}function xe(t,e){if(e>t.size)return t;0>e&&(e=0);var r=Ve(t);return r.size=t.size&&Math.min(t.size,e),r.__iterateUncached=function(r,n){var i=this;if(0===e)return 0;if(n)return this.cacheResult().__iterate(r,n);var u=0;return t.__iterate(function(t,n){return++u&&r(t,n,i)!==!1&&e>u}),u},r.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=e&&t.__iterator(r,n),u=0;return new Vr(function(){return u++>e?b():i.next()})},r}function Ee(t,e,r){var n=Ve(t);return n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0;return t.__iterate(function(t,i,o){return e.call(r,t,i,o)&&++s&&n(t,i,u)}),s},n.__iteratorUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterator(n,i);var s=t.__iterator(Wr,i),o=!0;return new Vr(function(){if(!o)return b();var t=s.next();if(t.done)return t;var i=t.value,a=i[0],h=i[1];return e.call(r,h,a,u)?n===Wr?t:I(n,a,h,t):(o=!1,b())})},n}function Ae(t,e,r){if(0>=e)return t;var n=Ve(t);return n.size=t.size&&Math.max(0,t.size-e),n.__iterateUncached=function(n,i){var u=this;if(i)return this.cacheResult().__iterate(n,i);var s=0,o=!0,a=0;return t.__iterate(function(t,i){return o&&(o=s++<e)?void 0:(a++,n(t,r?i:a-1,u))}),a},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var u=e&&t.__iterator(n,i),s=0,o=0;
return new Vr(function(){for(;e>s;)s++,u.next();var t=u.next();return r||n===Br?t:n===Tr?I(n,o++,void 0,t):I(n,o++,t.value[1],t)})},n}function Ce(t,e,r,n){var i=Ve(t);return i.__iterateUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterate(i,u);var o=!0,a=0;return t.__iterate(function(t,u,h){return o&&(o=e.call(r,t,u,h))?void 0:(a++,i(t,n?u:a-1,s))}),a},i.__iteratorUncached=function(i,u){var s=this;if(u)return this.cacheResult().__iterator(i,u);var o=t.__iterator(Wr,u),a=!0,h=0;return new Vr(function(){var t,u,c;do{if(t=o.next(),t.done)return n||i===Br?t:i===Tr?I(i,h++,void 0,t):I(i,h++,t.value[1],t);var f=t.value;u=f[0],c=f[1],a&&(a=e.call(r,c,u,s))}while(a);return i===Wr?t:I(i,u,c,t)})},i}function je(t,e){var r=x(t),n=[t].concat(e).map(function(t){return k(t)?r&&(t=tn(t)):t=r?Y(t):Q(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&x(i)||E(t)&&E(i))return i}var u=new vn(n);return r?u=u.toKeyedSeq():E(t)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),u}function Ke(t,e,r){var n=Ve(t);return n.__iterateUncached=function(n,i){function u(t,a){var h=this;t.__iterate(function(t,i){return(!e||e>a)&&k(t)?u(t,a+1):n(t,r?i:s++,h)===!1&&(o=!0),!o},i)}var s=0,o=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){var u=t.__iterator(n,i),s=[],o=0;return new Vr(function(){for(;u;){var t=u.next();if(t.done===!1){var a=t.value;if(n===Wr&&(a=a[1]),e&&!(e>s.length)||!k(a))return r?t:I(n,o++,a,t);s.push(u),u=a.__iterator(n,i)}else u=s.pop()}return b()})},n}function Re(t,e,r){var n=He(t);return t.toSeq().map(function(i,u){return n(e.call(r,i,u,t))}).flatten(!0)}function Ue(t,e){var r=Ve(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,u=0;return t.__iterate(function(t){return(!u||r(e,u++,i)!==!1)&&r(t,u++,i)!==!1},n),u},r.__iteratorUncached=function(r,n){var i,u=t.__iterator(Br,n),s=0;return new Vr(function(){return(!i||s%2)&&(i=u.next(),i.done)?i:s%2?I(r,s++,e):I(r,s++,i.value,i)
})},r}function Le(t,e,r){e||(e=Ye);var n=x(t),i=0,u=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return u.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){u[e].length=2}:function(t,e){u[e]=t[1]}),n?on(u):E(t)?hn(u):fn(u)}function Te(t,e,r){if(e||(e=Ye),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return Be(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return Be(e,t,r)?r:t})}function Be(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function We(t,e){return V(t)?e:t.constructor(e)}function Je(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Pe(t){return h(t.size),c(t)}function He(t){return x(t)?tn:E(t)?rn:nn}function Ve(t){return Object.create((x(t)?on:E(t)?hn:fn).prototype)}function Ne(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):un.prototype.cacheResult.call(this)}function Ye(t,e){return t>e?1:e>t?-1:0}function Qe(t){return!(!t||!t[Xn])}function Xe(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===o?a&&a.array:t&&t.array,i=r>u?0:u-r,h=s-r;return h>qr&&(h=qr),function(){if(i===h)return ti;var t=e?--h:i++;return n&&n[t]}}function i(t,n,i){var o,a=t&&t.array,h=i>u?0:u-i>>n,c=(s-i>>n)+1;return c>qr&&(c=qr),function(){for(;;){if(o){var t=o();if(t!==ti)return t;o=null}if(h===c)return ti;var u=e?--c:h++;o=r(a&&a[u],n-br,i+(u<<n))}}}var u=t._origin,s=t._capacity,o=ir(s),a=t._tail;return r(t._root,t._level,0)}function Fe(t,e,r,n,i,u,s){var o=Object.create(Fn);return o.size=e-t,o._origin=t,o._capacity=e,o._level=r,o._root=n,o._tail=i,o.__ownerID=u,o.__hash=s,o.__altered=!1,o}function Ge(){return $n||($n=Fe(0,0,br))}function Ze(t,e,r){if(e=f(t,e),e>=t.size||0>e)return t.withMutations(function(t){0>e?rr(t,e).set(0,r):rr(t,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,i=t._root,s=u(kr);return e>=ir(t._capacity)?n=$e(n,t.__ownerID,0,e,r,s):i=$e(i,t.__ownerID,t._level,e,r,s),s.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):Fe(t._origin,t._capacity,t._level,i,n):t
}function $e(t,e,r,n,i,u){var o=n>>>r&Mr,a=t&&t.array.length>o;if(!a&&void 0===i)return t;var h;if(r>0){var c=t&&t.array[o],f=$e(c,e,r-br,n,i,u);return f===c?t:(h=tr(t,e),h.array[o]=f,h)}return a&&t.array[o]===i?t:(s(u),h=tr(t,e),void 0===i&&o===h.array.length-1?h.array.pop():h.array[o]=i,h)}function tr(t,e){return e&&t&&e===t.ownerID?t:new Gn(t?t.array.slice():[],e)}function er(t,e){if(e>=ir(t._capacity))return t._tail;if(1<<t._level+br>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&Mr],n-=br;return r}}function rr(t,e,r){var n=t.__ownerID||new o,i=t._origin,u=t._capacity,s=i+e,a=void 0===r?u:0>r?u+r:i+r;if(s===i&&a===u)return t;if(s>=a)return t.clear();for(var h=t._level,c=t._root,f=0;0>s+f;)c=new Gn(c&&c.array.length?[void 0,c]:[],n),h+=br,f+=1<<h;f&&(s+=f,i+=f,a+=f,u+=f);for(var _=ir(u),l=ir(a);l>=1<<h+br;)c=new Gn(c&&c.array.length?[c]:[],n),h+=br;var v=t._tail,p=_>l?er(t,a-1):l>_?new Gn([],n):v;if(v&&l>_&&u>s&&v.array.length){c=tr(c,n);for(var d=c,y=h;y>br;y-=br){var m=_>>>y&Mr;d=d.array[m]=tr(d.array[m],n)}d.array[_>>>br&Mr]=v}if(u>a&&(p=p&&p.removeAfter(n,0,a)),s>=l)s-=l,a-=l,h=br,c=null,p=p&&p.removeBefore(n,0,s);else if(s>i||_>l){for(f=0;c;){var g=s>>>h&Mr;if(g!==l>>>h&Mr)break;g&&(f+=(1<<h)*g),h-=br,c=c.array[g]}c&&s>i&&(c=c.removeBefore(n,h,s-f)),c&&_>l&&(c=c.removeAfter(n,h,l-f)),f&&(s-=f,a-=f)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=h,t._root=c,t._tail=p,t.__hash=void 0,t.__altered=!0,t):Fe(s,a,h,c,p)}function nr(t,e,r){for(var n=[],i=0,u=0;r.length>u;u++){var s=r[u],o=rn(s);o.size>i&&(i=o.size),k(s)||(o=o.map(function(t){return te(t)})),n.push(o)}return i>t.size&&(t=t.setSize(i)),me(t,e,n)}function ir(t){return qr>t?0:t-1>>>br<<br}function ur(t){return ie(t)&&C(t)}function sr(t,e,r,n){var i=Object.create(ei.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function or(){return ri||(ri=sr(ae(),Ge()))}function ar(t,e,r){var n,i,u=t._map,s=t._list,o=u.get(e),a=void 0!==o;if(r===Dr){if(!a)return t;s.size>=qr&&s.size>=2*u.size?(i=s.filter(function(t,e){return void 0!==t&&o!==e
}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=u.remove(e),i=o===s.size-1?s.pop():s.set(o,void 0))}else if(a){if(r===s.get(o)[1])return t;n=u,i=s.set(o,[e,r])}else n=u.set(e,s.size),i=s.set(s.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):sr(n,i)}function hr(t){return!(!t||!t[ui])}function cr(t,e,r,n){var i=Object.create(si);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function fr(){return oi||(oi=cr(0))}function _r(t){return!(!t||!t[hi])}function lr(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 vr(t,e){var r=Object.create(ci);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function pr(){return fi||(fi=vr(ae()))}function dr(t){return _r(t)&&C(t)}function yr(t,e){var r=Object.create(li);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function mr(){return vi||(vi=yr(or()))}function gr(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function wr(t){return t._name||t.constructor.name}var Sr=Object,zr={};zr.createClass=t,zr.superCall=e,zr.defaultSuperCall=r;var Ir="delete",br=5,qr=1<<br,Mr=qr-1,Dr={},Or={value:!1},kr={value:!1},xr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Er=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}(),Ar="function"==typeof WeakMap&&new WeakMap,Cr=0,jr="__immutablehash__";"function"==typeof Symbol&&(jr=Symbol(jr));var Kr=16,Rr=255,Ur=0,Lr={},Tr=0,Br=1,Wr=2,Jr="@@iterator",Pr="function"==typeof Symbol&&Symbol.iterator,Hr=Pr||Jr,Vr=function(t){this.next=t};zr.createClass(Vr,{toString:function(){return"[Iterator]"}},{}),Vr.KEYS=Tr,Vr.VALUES=Br,Vr.ENTRIES=Wr;var Nr=Vr.prototype;Nr.inspect=Nr.toSource=function(){return""+this},Nr[Hr]=function(){return this};var Yr=function(t){return k(t)?t:un(t)},Qr=Yr;zr.createClass(Yr,{toArray:function(){h(this.size);
var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new Vn(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toKeyedSeq:function(){return new Hn(this,!0)},toMap:function(){return Mn(this.toKeyedSeq())},toObject:function(){h(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return ei(this.toKeyedSeq())},toOrderedSet:function(){return _i(x(this)?this.valueSeq():this)},toSet:function(){return ai(x(this)?this.valueSeq():this)},toSetSeq:function(){return new Nn(this)},toSeq:function(){return E(this)?this.toIndexedSeq():x(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return ni(x(this)?this.valueSeq():this)},toList:function(){return Qn(x(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return We(this,je(this,t))},contains:function(t){return this.some(function(e){return n(e,t)})},entries:function(){return this.__iterator(Wr)},every:function(t,e){h(this.size);var r=!0;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},filter:function(t,e){return We(this,De(this,t,e,!0))},find:function(t,e,r){var n=r;return this.__iterate(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},forEach:function(t,e){return h(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){h(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?n:""}),e},keys:function(){return this.__iterator(Tr)},map:function(t,e){return We(this,qe(this,t,e))},reduce:function(t,e,r){h(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,u,s){i?(i=!1,n=e):n=t.call(r,n,e,u,s)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)
},reverse:function(){return We(this,Me(this,!0))},slice:function(t,e){if(l(t,e,this.size))return this;var r=v(t,this.size),n=p(e,this.size);if(r!==r||n!==n)return this.toSeq().cacheResult().slice(t,e);var i=0===r?this:this.skip(r);return We(this,void 0===n||n===this.size?i:i.take(n-r))},some:function(t,e){return!this.every(R(t),e)},sort:function(t){return We(this,Le(this,t))},values:function(){return this.__iterator(Br)},butLast:function(){return this.slice(0,-1)},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return Oe(this,t,e)},equals:function(t){return B(this,t)},entrySeq:function(){var t=this;if(t._cache)return new vn(t._cache);var e=t.toSeq().map(K).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(R(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(_)},flatMap:function(t,e){return We(this,Re(this,t,e))},flatten:function(t){return We(this,Ke(this,t,!0))},fromEntrySeq:function(){return new Yn(this)},get:function(t,e){return this.find(function(e,r){return n(r,t)},void 0,e)},getIn:function(t,e){var r=this;if(t)for(var n,i=D(t)||D(Qr(t));!(n=i.next()).done;){var u=n.value;if(r=r&&r.get?r.get(u,Dr):Dr,r===Dr)return e}return r},groupBy:function(t,e){return ke(this,t,e)},has:function(t){return this.get(t,Dr)!==Dr},hasIn:function(t){return this.getIn(t,Dr)!==Dr},isSubset:function(t){return t="function"==typeof t.contains?t:Qr(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){return t.isSubset(this)},keySeq:function(){return this.toSeq().map(j).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Te(this,t)},maxBy:function(t,e){return Te(this,e,t)},min:function(t){return Te(this,t?U(t):T)},minBy:function(t,e){return Te(this,e?U(e):T,t)},rest:function(){return this.slice(1)},skip:function(t){return We(this,Ae(this,t,!0))},skipLast:function(t){return We(this,this.toSeq().reverse().skip(t).reverse())
},skipWhile:function(t,e){return We(this,Ce(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(R(t),e)},sortBy:function(t,e){return We(this,Le(this,e,t))},take:function(t){return We(this,xe(this,t))},takeLast:function(t){return We(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return We(this,Ee(this,t,e))},takeUntil:function(t,e){return this.takeWhile(R(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=W(this))}},{});var Xr="@@__IMMUTABLE_ITERABLE__@@",Fr="@@__IMMUTABLE_KEYED__@@",Gr="@@__IMMUTABLE_INDEXED__@@",Zr="@@__IMMUTABLE_ORDERED__@@",$r=Yr.prototype;$r[Xr]=!0,$r[Hr]=$r.values,$r.toJSON=$r.toJS,$r.__toJS=$r.toArray,$r.__toStringMapper=L,$r.inspect=$r.toSource=function(){return""+this},$r.chain=$r.flatMap,function(){try{Object.defineProperty($r,"length",{get:function(){if(!Yr.noLengthWarning){var t;try{throw Error()}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}();var tn=function(t){return x(t)?t:on(t)};zr.createClass(tn,{flip:function(){return We(this,be(this))},findKey:function(t,e){var r;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return n(e,t)})},lastKeyOf:function(t){return this.toSeq().reverse().keyOf(t)},mapEntries:function(t,e){var r=this,n=0;return We(this,this.toSeq().map(function(i,u){return t.call(e,[u,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return We(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}},{},Yr);var en=tn.prototype;en[Fr]=!0,en[Hr]=$r.entries,en.__toJS=$r.toObject,en.__toStringMapper=function(t,e){return e+": "+L(t)};var rn=function(t){return E(t)?t:hn(t)};zr.createClass(rn,{toKeyedSeq:function(){return new Hn(this,!1)
},filter:function(t,e){return We(this,De(this,t,e,!1))},findIndex:function(t,e){var r=this.toKeyedSeq().findKey(t,e);return void 0===r?-1:r},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return We(this,Me(this,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=v(t,this.size);var n=this.slice(0,t);return We(this,1===r?n:n.concat(a(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return We(this,Ke(this,t,!1))},get:function(t,e){return t=f(this,t),0>t||1/0===this.size||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=f(this,t),t>=0&&(void 0!==this.size?1/0===this.size||this.size>t:-1!==this.indexOf(t))},interpose:function(t){return We(this,Ue(this,t))},last:function(){return this.get(-1)},skip:function(t){var e=this,r=Ae(e,t,!1);return V(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0?e.get(r+t,n):n}),We(this,r)},skipWhile:function(t,e){return We(this,Ce(this,t,e,!1))},take:function(t){var e=this,r=xe(e,t);return V(e)&&r!==e&&(r.get=function(r,n){return r=f(this,r),r>=0&&t>r?e.get(r,n):n}),We(this,r)}},{},Yr),rn.prototype[Gr]=!0,rn.prototype[Zr]=!0;var nn=function(t){return k(t)&&!A(t)?t:fn(t)};zr.createClass(nn,{get:function(t,e){return this.has(t)?t:e},contains:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}},{},Yr),nn.prototype.has=$r.contains,Yr.isIterable=k,Yr.isKeyed=x,Yr.isIndexed=E,Yr.isAssociative=A,Yr.isOrdered=C,Yr.Keyed=tn,Yr.Indexed=rn,Yr.Set=nn,Yr.Iterator=Vr;var un=function(t){return null===t||void 0===t?N():k(t)?t.toSeq():X(t)},sn=un;zr.createClass(un,{toSeq:function(){return this},toString:function(){return this.__toString("Seq {","}")},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this
},__iterate:function(t,e){return Z(this,t,e,!0)},__iterator:function(t,e){return $(this,t,e,!0)}},{of:function(){return sn(arguments)}},Yr);var on=function(t){return null===t||void 0===t?N().toKeyedSeq():k(t)?x(t)?t.toSeq():t.fromEntrySeq():Y(t)},an=on;zr.createClass(on,{toKeyedSeq:function(){return this},toSeq:function(){return this}},{of:function(){return an(arguments)}},un),H(on,tn.prototype);var hn=function(t){return null===t||void 0===t?N():k(t)?x(t)?t.entrySeq():t.toIndexedSeq():Q(t)},cn=hn;zr.createClass(hn,{toIndexedSeq:function(){return this},toString:function(){return this.__toString("Seq [","]")},__iterate:function(t,e){return Z(this,t,e,!1)},__iterator:function(t,e){return $(this,t,e,!1)}},{of:function(){return cn(arguments)}},un),H(hn,rn.prototype);var fn=function(t){return(null===t||void 0===t?N():k(t)?x(t)?t.entrySeq():t:Q(t)).toSetSeq()},_n=fn;zr.createClass(fn,{toSetSeq:function(){return this}},{of:function(){return _n(arguments)}},un),H(fn,nn.prototype),un.isSeq=V,un.Keyed=on,un.Set=fn,un.Indexed=hn;var ln="@@__IMMUTABLE_SEQ__@@";un.prototype[ln]=!0;var vn=function(t){this._array=t,this.size=t.length};zr.createClass(vn,{get:function(t,e){return this.has(t)?this._array[f(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new Vr(function(){return i>n?b():I(t,i,r[e?n-i++:i++])})}},{},hn);var pn=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length};zr.createClass(pn,{get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var s=n[e?i-u:u];if(t(r[s],s,this)===!1)return u+1}return u},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,u=0;return new Vr(function(){var s=n[e?i-u:u];return u++>i?b():I(t,s,r[s])})}},{},on),pn.prototype[Zr]=!0;var dn=function(t){this._iterable=t,this.size=t.length||t.size
};zr.createClass(dn,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=D(r),i=0;if(M(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=D(r);if(!M(n))return new Vr(b);var i=0;return new Vr(function(){var e=n.next();return e.done?e:I(t,i++,e.value)})}},{},hn);var yn=function(t){this._iterator=t,this._iteratorCache=[]};zr.createClass(yn,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var s=u.value;if(n[i]=s,t(s,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Vr(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return I(t,i,n[i++])})}},{},hn);var mn,gn=function(){throw TypeError("Abstract")};zr.createClass(gn,{},{},Yr);var wn=function(){zr.defaultSuperCall(this,Sn.prototype,arguments)},Sn=wn;zr.createClass(wn,{},{},gn),H(wn,tn.prototype);var zn=function(){zr.defaultSuperCall(this,In.prototype,arguments)},In=zn;zr.createClass(zn,{},{},gn),H(zn,rn.prototype);var bn=function(){zr.defaultSuperCall(this,qn.prototype,arguments)},qn=bn;zr.createClass(bn,{},{},gn),H(bn,nn.prototype),gn.Keyed=wn,gn.Indexed=zn,gn.Set=bn;var Mn=function(t){return null===t||void 0===t?ae():ie(t)?t:ae().withMutations(function(e){var r=tn(t);h(r.size),r.forEach(function(t,r){return e.set(r,t)})})};zr.createClass(Mn,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,void 0,t,e):e},set:function(t,e){return he(this,t,e)},setIn:function(t,e){return this.updateIn(t,Dr,function(){return e})},remove:function(t){return he(this,t,Dr)},deleteIn:function(t){return this.updateIn(t,function(){return Dr})},update:function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)
},updateIn:function(t,e,r){r||(r=e,e=void 0);var n=ge(this,D(t)||D(Yr(t)),e,r);return n===Dr?void 0:n},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ae()},merge:function(){return de(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return de(this,t,e)},mergeIn:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.updateIn(t,ae(),function(t){return t.merge.apply(t,e)})},mergeDeep:function(){return de(this,ye(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return de(this,ye(t),e)},mergeDeepIn:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return this.updateIn(t,ae(),function(t){return t.mergeDeep.apply(t,e)})},sort:function(t){return ei(Le(this,t))},sortBy:function(t,e){return ei(Le(this,e,t))},withMutations:function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new o)},asImmutable:function(){return this.__ensureOwner()},wasAltered:function(){return this.__altered},__iterator:function(t,e){return new Tn(this,t,e)},__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},__ensureOwner:function(t){return t===this.__ownerID?this:t?oe(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)}},{},wn),Mn.isMap=ie;var Dn="@@__IMMUTABLE_MAP__@@",On=Mn.prototype;On[Dn]=!0,On[Ir]=On.remove,On.removeIn=On.deleteIn;var kn=function(t,e){this.ownerID=t,this.entries=e},xn=kn;zr.createClass(kn,{get:function(t,e,r,i){for(var u=this.entries,s=0,o=u.length;o>s;s++)if(n(r,u[s][0]))return u[s][1];return i},update:function(t,e,r,i,u,o,h){for(var c=u===Dr,f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(v?f[_][1]===u:c)return this;if(s(h),(c||!v)&&s(o),!c||1!==f.length){if(!v&&!c&&f.length>=Wn)return le(t,f,i,u);
var p=t&&t===this.ownerID,d=p?f:a(f);return v?c?_===l-1?d.pop():d[_]=d.pop():d[_]=[i,u]:d.push([i,u]),p?(this.entries=d,this):new xn(t,d)}}},{});var En=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},An=En;zr.createClass(En,{get:function(t,e,r,n){void 0===e&&(e=m(r));var i=1<<((0===t?e:e>>>t)&Mr),u=this.bitmap;return 0===(u&i)?n:this.nodes[we(u&i-1)].get(t+br,e,r,n)},update:function(t,e,r,n,i,u,s){void 0===r&&(r=m(n));var o=(0===e?r:r>>>e)&Mr,a=1<<o,h=this.bitmap,c=0!==(h&a);if(!c&&i===Dr)return this;var f=we(h&a-1),_=this.nodes,l=c?_[f]:void 0,v=ce(l,t,e+br,r,n,i,u,s);if(v===l)return this;if(!c&&v&&_.length>=Jn)return pe(t,_,h,o,v);if(c&&!v&&2===_.length&&fe(_[1^f]))return _[1^f];if(c&&v&&1===_.length&&fe(v))return v;var p=t&&t===this.ownerID,d=c?v?h:h^a:h|a,y=c?v?Se(_,f,v,p):Ie(_,f,p):ze(_,f,v,p);return p?(this.bitmap=d,this.nodes=y,this):new An(t,d,y)}},{});var Cn=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},jn=Cn;zr.createClass(Cn,{get:function(t,e,r,n){void 0===e&&(e=m(r));var i=(0===t?e:e>>>t)&Mr,u=this.nodes[i];return u?u.get(t+br,e,r,n):n},update:function(t,e,r,n,i,u,s){void 0===r&&(r=m(n));var o=(0===e?r:r>>>e)&Mr,a=i===Dr,h=this.nodes,c=h[o];if(a&&!c)return this;var f=ce(c,t,e+br,r,n,i,u,s);if(f===c)return this;var _=this.count;if(c){if(!f&&(_--,Pn>_))return ve(t,h,_,o)}else _++;var l=t&&t===this.ownerID,v=Se(h,o,f,l);return l?(this.count=_,this.nodes=v,this):new jn(t,_,v)}},{});var Kn=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r},Rn=Kn;zr.createClass(Kn,{get:function(t,e,r,i){for(var u=this.entries,s=0,o=u.length;o>s;s++)if(n(r,u[s][0]))return u[s][1];return i},update:function(t,e,r,i,u,o,h){void 0===r&&(r=m(i));var c=u===Dr;if(r!==this.keyHash)return c?this:(s(h),s(o),_e(this,t,e,r,[i,u]));for(var f=this.entries,_=0,l=f.length;l>_&&!n(i,f[_][0]);_++);var v=l>_;if(v?f[_][1]===u:c)return this;if(s(h),(c||!v)&&s(o),c&&2===l)return new Un(t,this.keyHash,f[1^_]);var p=t&&t===this.ownerID,d=p?f:a(f);return v?c?_===l-1?d.pop():d[_]=d.pop():d[_]=[i,u]:d.push([i,u]),p?(this.entries=d,this):new Rn(t,this.keyHash,d)
}},{});var Un=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r},Ln=Un;zr.createClass(Un,{get:function(t,e,r,i){return n(r,this.entry[0])?this.entry[1]:i},update:function(t,e,r,i,u,o,a){var h=u===Dr,c=n(i,this.entry[0]);return(c?u===this.entry[1]:h)?this:(s(a),h?void s(o):c?t&&t===this.ownerID?(this.entry[1]=u,this):new Ln(t,this.keyHash,[i,u]):(s(o),_e(this,t,e,m(i),[i,u])))}},{}),kn.prototype.iterate=Kn.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},En.prototype.iterate=Cn.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}},Un.prototype.iterate=function(t){return t(this.entry)};var Tn=function(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&se(t._root)};zr.createClass(Tn,{next:function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return ue(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,r>=i)return ue(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var u=n.nodes[this._reverse?r-i:i];if(u){if(u.entry)return ue(t,u.entry);e=this._stack=se(u,e)}continue}e=this._stack=this._stack.__prev}return b()}},{},Vr);var Bn,Wn=qr/4,Jn=qr/2,Pn=qr/4,Hn=function(t,e){this._iter=t,this._useKeys=e,this.size=t.size};zr.createClass(Hn,{get:function(t,e){return this._iter.get(t,e)},has:function(t){return this._iter.has(t)},valueSeq:function(){return this._iter.valueSeq()},reverse:function(){var t=this,e=Me(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},map:function(t,e){var r=this,n=qe(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},__iterate:function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?Pe(this):0,function(i){return t(i,e?--r:r++,n)}),e)},__iterator:function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(Br,e),n=e?Pe(this):0;
return new Vr(function(){var i=r.next();return i.done?i:I(t,e?--n:n++,i.value,i)})}},{},on),Hn.prototype[Zr]=!0;var Vn=function(t){this._iter=t,this.size=t.size};zr.createClass(Vn,{contains:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(Br,e),n=0;return new Vr(function(){var e=r.next();return e.done?e:I(t,n++,e.value,e)})}},{},hn);var Nn=function(t){this._iter=t,this.size=t.size};zr.createClass(Nn,{has:function(t){return this._iter.contains(t)},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},__iterator:function(t,e){var r=this._iter.__iterator(Br,e);return new Vr(function(){var e=r.next();return e.done?e:I(t,e.value,e.value,e)})}},{},fn);var Yn=function(t){this._iter=t,this.size=t.size};zr.createClass(Yn,{entrySeq:function(){return this._iter.toSeq()},__iterate:function(t,e){var r=this;return this._iter.__iterate(function(e){return e?(Je(e),t(e[1],e[0],r)):void 0},e)},__iterator:function(t,e){var r=this._iter.__iterator(Br,e);return new Vr(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return Je(n),t===Wr?e:I(t,n[0],n[1],e)}})}},{},on),Vn.prototype.cacheResult=Hn.prototype.cacheResult=Nn.prototype.cacheResult=Yn.prototype.cacheResult=Ne;var Qn=function(t){var e=Ge();if(null===t||void 0===t)return e;if(Qe(t))return t;var r=rn(t),n=r.size;return 0===n?e:(h(n),n>0&&qr>n?Fe(0,n,br,null,new Gn(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))};zr.createClass(Qn,{toString:function(){return this.__toString("List [","]")},get:function(t,e){if(t=f(this,t),0>t||t>=this.size)return e;t+=this._origin;var r=er(this,t);return r&&r.array[t&Mr]},set:function(t,e){return Ze(this,t,e)},remove:function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=br,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ge()
},push:function(){var t=arguments,e=this.size;return this.withMutations(function(r){rr(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return rr(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){rr(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return rr(this,1)},merge:function(){return nr(this,void 0,arguments)},mergeWith:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return nr(this,t,e)},mergeDeep:function(){return nr(this,ye(void 0),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return nr(this,ye(t),e)},setSize:function(t){return rr(this,0,t)},slice:function(t,e){var r=this.size;return l(t,e,r)?this:rr(this,v(t,r),p(e,r))},__iterator:function(t,e){var r=0,n=Xe(this,e);return new Vr(function(){var e=n();return e===ti?b():I(t,r++,e)})},__iterate:function(t,e){for(var r,n=0,i=Xe(this,e);(r=i())!==ti&&t(r,n++,this)!==!1;);return n},__ensureOwner:function(t){return t===this.__ownerID?this:t?Fe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)}},{of:function(){return this(arguments)}},zn),Qn.isList=Qe;var Xn="@@__IMMUTABLE_LIST__@@",Fn=Qn.prototype;Fn[Xn]=!0,Fn[Ir]=Fn.remove,Fn.setIn=On.setIn,Fn.deleteIn=Fn.removeIn=On.removeIn,Fn.update=On.update,Fn.updateIn=On.updateIn,Fn.mergeIn=On.mergeIn,Fn.mergeDeepIn=On.mergeDeepIn,Fn.withMutations=On.withMutations,Fn.asMutable=On.asMutable,Fn.asImmutable=On.asImmutable,Fn.wasAltered=On.wasAltered;var Gn=function(t,e){this.array=t,this.ownerID=e},Zn=Gn;zr.createClass(Gn,{removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&Mr;if(n>=this.array.length)return new Zn([],t);var i,u=0===n;if(e>0){var s=this.array[n];if(i=s&&s.removeBefore(t,e-br,r),i===s&&u)return this}if(u&&!i)return this;var o=tr(this,t);if(!u)for(var a=0;n>a;a++)o.array[a]=void 0;return i&&(o.array[n]=i),o},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;
var n=r-1>>>e&Mr;if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var s=this.array[n];if(i=s&&s.removeAfter(t,e-br,r),i===s&&u)return this}if(u&&!i)return this;var o=tr(this,t);return u||o.array.pop(),i&&(o.array[n]=i),o}},{});var $n,ti={},ei=function(t){return null===t||void 0===t?or():ur(t)?t:or().withMutations(function(e){var r=tn(t);h(r.size),r.forEach(function(t,r){return e.set(r,t)})})};zr.createClass(ei,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):or()},set:function(t,e){return ar(this,t,e)},remove:function(t){return ar(this,t,Dr)},wasAltered:function(){return this._map.wasAltered()||this._list.wasAltered()},__iterate:function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?sr(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)}},{of:function(){return this(arguments)}},Mn),ei.isOrderedMap=ur,ei.prototype[Zr]=!0,ei.prototype[Ir]=ei.prototype.remove;var ri,ni=function(t){return null===t||void 0===t?fr():hr(t)?t:fr().unshiftAll(t)},ii=ni;zr.createClass(ni,{toString:function(){return this.__toString("Stack [","]")},get:function(t,e){for(var r=this._head;r&&t--;)r=r.next;return r?r.value:e},peek:function(){return this._head&&this._head.value},push:function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):cr(t,e)},pushAll:function(t){if(t=rn(t),0===t.size)return this;h(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}
}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):cr(e,r)},pop:function(){return this.slice(1)},unshift:function(){return this.push.apply(this,arguments)},unshiftAll:function(t){return this.pushAll(t)},shift:function(){return this.pop.apply(this,arguments)},clear:function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):fr()},slice:function(t,e){if(l(t,e,this.size))return this;var r=v(t,this.size),n=p(e,this.size);if(n!==this.size)return zr.superCall(this,ii.prototype,"slice",[t,e]);for(var i=this.size-r,u=this._head;r--;)u=u.next;return this.__ownerID?(this.size=i,this._head=u,this.__hash=void 0,this.__altered=!0,this):cr(i,u)},__ensureOwner:function(t){return t===this.__ownerID?this:t?cr(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},__iterate:function(t,e){if(e)return this.toSeq().cacheResult.__iterate(t,e);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},__iterator:function(t,e){if(e)return this.toSeq().cacheResult().__iterator(t,e);var r=0,n=this._head;return new Vr(function(){if(n){var e=n.value;return n=n.next,I(t,r++,e)}return b()})}},{of:function(){return this(arguments)}},zn),ni.isStack=hr;var ui="@@__IMMUTABLE_STACK__@@",si=ni.prototype;si[ui]=!0,si.withMutations=On.withMutations,si.asMutable=On.asMutable,si.asImmutable=On.asImmutable,si.wasAltered=On.wasAltered;var oi,ai=function(t){return null===t||void 0===t?pr():_r(t)?t:pr().withMutations(function(e){var r=nn(t);h(r.size),r.forEach(function(t){return e.add(t)})})};zr.createClass(ai,{toString:function(){return this.__toString("Set {","}")},has:function(t){return this._map.has(t)},add:function(t){return lr(this,this._map.set(t,!0))},remove:function(t){return lr(this,this._map.remove(t))},clear:function(){return lr(this,this._map.clear())},union:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0===this.size&&1===t.length?this.constructor(t[0]):this.withMutations(function(e){for(var r=0;t.length>r;r++)nn(t[r]).forEach(function(t){return e.add(t)
})})},intersect:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return nn(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.remove(r)})})},subtract:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return nn(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.remove(r)})})},merge:function(){return this.union.apply(this,arguments)},mergeWith:function(){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return this.union.apply(this,t)},sort:function(t){return _i(Le(this,t))},sortBy:function(t,e){return _i(Le(this,e,t))},wasAltered:function(){return this._map.wasAltered()},__iterate:function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},__iterator:function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)}},{of:function(){return this(arguments)},fromKeys:function(t){return this(tn(t).keySeq())}},bn),ai.isSet=_r;var hi="@@__IMMUTABLE_SET__@@",ci=ai.prototype;ci[hi]=!0,ci[Ir]=ci.remove,ci.mergeDeep=ci.merge,ci.mergeDeepWith=ci.mergeWith,ci.withMutations=On.withMutations,ci.asMutable=On.asMutable,ci.asImmutable=On.asImmutable,ci.__empty=pr,ci.__make=vr;var fi,_i=function(t){return null===t||void 0===t?mr():dr(t)?t:mr().withMutations(function(e){var r=nn(t);h(r.size),r.forEach(function(t){return e.add(t)})})};zr.createClass(_i,{toString:function(){return this.__toString("OrderedSet {","}")}},{of:function(){return this(arguments)},fromKeys:function(t){return this(tn(t).keySeq())}},ai),_i.isOrderedSet=dr;var li=_i.prototype;li[Zr]=!0,li.__empty=mr,li.__make=yr;var vi,pi=function(t,e){var r=function(t){return this instanceof r?void(this._map=Mn(t)):new r(t)
},n=Object.keys(t),u=r.prototype=Object.create(di);u.constructor=r,e&&(u._name=e),u._defaultValues=t,u._keys=n,u.size=n.length;try{n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this.get(t)},set:function(e){i(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})})}catch(s){}return r};zr.createClass(pi,{toString:function(){return this.__toString(wr(this)+" {","}")},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},clear:function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=gr(this,ae()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+wr(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:gr(this,r)},remove:function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:gr(this,e)},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){var r=this;return tn(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},__iterate:function(t,e){var r=this;return tn(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?gr(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},wn);var di=pi.prototype;di[Ir]=di.remove,di.deleteIn=di.removeIn=On.removeIn,di.merge=On.merge,di.mergeWith=On.mergeWith,di.mergeIn=On.mergeIn,di.mergeDeep=On.mergeDeep,di.mergeDeepWith=On.mergeDeepWith,di.mergeDeepIn=On.mergeDeepIn,di.setIn=On.setIn,di.update=On.update,di.updateIn=On.updateIn,di.withMutations=On.withMutations,di.asMutable=On.asMutable,di.asImmutable=On.asImmutable;var yi=function(t,e,r){return this instanceof mi?(i(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),t===e&&wi?wi:(r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.size=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new mi(t,e,r)
},mi=yi;zr.createClass(yi,{toString:function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return this.has(t)?this._start+f(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e)},slice:function(t,e){return l(t,e,this.size)?this:(t=v(t,this.size),e=p(e,this.size),t>=e?wi:new mi(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;r>=u;u++){if(t(i,u,this)===!1)return u+1;i+=e?-n:n}return u},__iterator:function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,u=0;return new Vr(function(){var s=i;return i+=e?-n:n,u>r?b():I(t,u++,s)})},equals:function(t){return t instanceof mi?this._start===t._start&&this._end===t._end&&this._step===t._step:B(this,t)}},{},hn);var gi=yi.prototype;gi.__toJS=gi.toArray,gi.first=Fn.first,gi.last=Fn.last;var wi=yi(0,0),Si=function(t,e){return 0>=e&&bi?bi:this instanceof zi?(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),void(0===this.size&&(bi=this))):new zi(t,e)},zi=Si;zr.createClass(Si,{toString:function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return n(this._value,t)},slice:function(t,e){var r=this.size;return l(t,e,r)?this:new zi(this._value,p(e,r)-v(t,r))},reverse:function(){return this},indexOf:function(t){return n(this._value,t)?0:-1},lastIndexOf:function(t){return n(this._value,t)?this.size:-1},__iterate:function(t){for(var e=0;this.size>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;
return new Vr(function(){return e.size>r?I(t,r++,e._value):b()})},equals:function(t){return t instanceof zi?n(this._value,t._value):B(t)}},{},hn);var Ii=Si.prototype;Ii.last=Ii.first,Ii.has=gi.has,Ii.take=gi.take,Ii.skip=gi.skip,Ii.__toJS=gi.__toJS;var bi,qi={Iterable:Yr,Seq:un,Collection:gn,Map:Mn,OrderedMap:ei,List:Qn,Stack:ni,Set:ai,OrderedSet:_i,Record:pi,Range:yi,Repeat:Si,is:n,fromJS:te};return qi}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
{
"name": "immutable",
"version": "3.4.0",
"version": "3.4.1",
"description": "Immutable Data Collections",

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

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

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc