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

immutable

Package Overview
Dependencies
Maintainers
1
Versions
107
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 4.0.0-rc.1 to 4.0.0-rc.2

42

dist/immutable.min.js

@@ -9,22 +9,22 @@ /**

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.Immutable=t.Immutable||{})}(this,function(t){"use strict";function e(t){return t.value=!1,t}function r(t){t&&(t.value=!0)}function n(){}function i(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?o(t)+e:e}function s(){return!0}function a(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function c(t,e){return f(t,e,0)}function h(t,e){return f(t,e,e)}function f(t,e,r){return void 0===t?r:t<0?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function p(t){return(_(t)||g(t))&&!t.__ownerID}function _(t){return!(!t||!t[ke])}function l(t){return!(!t||!t[Ae])}function v(t){return!(!t||!t[Re])}function y(t){return l(t)||v(t)}function d(t){return!(!t||!t[Ue])}function g(t){return!(!t||!t[Ke])}function m(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function w(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 z(){return{value:void 0,done:!0}}function S(t){return!!O(t)}function I(t){return t&&"function"==typeof t.next}function b(t){var e=O(t);return e&&e.call(t)}function O(t){var e=t&&(Ne&&t[Ne]||t[Ve]);if("function"==typeof e)return e}function M(t){return t&&"number"==typeof t.length}function q(t){return!(!t||!t[Ze])}function D(){return er||(er=new $e([]))}function E(t){var e=Array.isArray(t)?new $e(t):I(t)?new ir(t):S(t)?new nr(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new tr(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function x(t){var e=k(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function j(t){var e=k(t);if(e)return e
;if("object"==typeof t)return new tr(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function k(t){return M(t)?new $e(t):I(t)?new ir(t):S(t)?new nr(t):void 0}function A(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(m(t)&&m(e)&&t.equals(e))}function R(t,e){return U([],e||K,t,"",e&&e.length>2?[]:void 0,{"":t})}function U(t,e,r,n,i,o){var u=Array.isArray(r)?Fe:L(r)?Xe:null;if(u){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),i&&""!==n&&i.push(n);var s=e.call(o,n,u(r).map(function(n,o){return U(t,e,n,o,i,r)}),i&&i.slice());return t.pop(),i&&i.pop(),s}return r}function K(t,e){return l(e)?e.toMap():e.toList()}function L(t){return t&&(t.constructor===Object||void 0===t.constructor)}function T(t){return t>>>1&1073741824|3221225471&t}function C(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&((t=t.valueOf())===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return T(r)}if("string"===e)return t.length>fr?W(t):B(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return J(t);if("function"==typeof t.toString)return B(""+t);throw Error("Value type "+e+" cannot be hashed.")}function W(t){var e=lr[t];return void 0===e&&(e=B(t),_r===pr&&(_r=0,lr={}),_r++,lr[t]=e),e}function B(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return T(e)}function J(t){var e;if(ar&&void 0!==(e=rr.get(t)))return e;if(void 0!==(e=t[hr]))return e;if(!sr){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[hr]))return e;if(void 0!==(e=P(t)))return e}if(e=++cr,1073741824&cr&&(cr=0),ar)rr.set(t,e);else{if(void 0!==ur&&ur(t)===!1)throw Error("Non-extensible objects are not allowed as keys.")
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.Immutable=t.Immutable||{})}(this,function(t){"use strict";function e(t){return t.value=!1,t}function r(t){t&&(t.value=!0)}function n(){}function i(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?o(t)+e:e}function s(){return!0}function a(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function c(t,e){return f(t,e,0)}function h(t,e){return f(t,e,e)}function f(t,e,r){return void 0===t?r:t<0?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function p(t){return(_(t)||g(t))&&!t.__ownerID}function _(t){return!(!t||!t[je])}function l(t){return!(!t||!t[Ae])}function v(t){return!(!t||!t[Re])}function y(t){return l(t)||v(t)}function d(t){return!(!t||!t[Ue])}function g(t){return!(!t||!t[Ke])}function m(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function w(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 z(){return{value:void 0,done:!0}}function S(t){return!!O(t)}function I(t){return t&&"function"==typeof t.next}function b(t){var e=O(t);return e&&e.call(t)}function O(t){var e=t&&(Ne&&t[Ne]||t[Ve]);if("function"==typeof e)return e}function M(t){return t&&"number"==typeof t.length}function D(t){return!(!t||!t[Ze])}function q(){return er||(er=new $e([]))}function E(t){var e=Array.isArray(t)?new $e(t):I(t)?new ir(t):S(t)?new nr(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new tr(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function x(t){var e=j(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function k(t){var e=j(t);if(e)return e
;if("object"==typeof t)return new tr(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function j(t){return M(t)?new $e(t):I(t)?new ir(t):S(t)?new nr(t):void 0}function A(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(m(t)&&m(e)&&t.equals(e))}function R(t,e){return U([],e||K,t,"",e&&e.length>2?[]:void 0,{"":t})}function U(t,e,r,n,i,o){var u=Array.isArray(r)?Fe:L(r)?Xe:null;if(u){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),i&&""!==n&&i.push(n);var s=e.call(o,n,u(r).map(function(n,o){return U(t,e,n,o,i,r)}),i&&i.slice());return t.pop(),i&&i.pop(),s}return r}function K(t,e){return l(e)?e.toMap():e.toList()}function L(t){return t&&(t.constructor===Object||void 0===t.constructor)}function T(t){return t>>>1&1073741824|3221225471&t}function C(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&((t=t.valueOf())===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return T(r)}if("string"===e)return t.length>fr?W(t):B(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return J(t);if("function"==typeof t.toString)return B(""+t);throw Error("Value type "+e+" cannot be hashed.")}function W(t){var e=lr[t];return void 0===e&&(e=B(t),_r===pr&&(_r=0,lr={}),_r++,lr[t]=e),e}function B(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return T(e)}function J(t){var e;if(ar&&void 0!==(e=rr.get(t)))return e;if(void 0!==(e=t[hr]))return e;if(!sr){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[hr]))return e;if(void 0!==(e=P(t)))return e}if(e=++cr,1073741824&cr&&(cr=0),ar)rr.set(t,e);else{if(void 0!==ur&&ur(t)===!1)throw Error("Non-extensible objects are not allowed as keys.")
;if(sr)Object.defineProperty(t,hr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[hr]=e;else{if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[hr]=e}}return e}function P(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function N(t){var e=ht(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=ft,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===Pe){var n=t.__iterator(e,r);return new Ye(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===Je?Be:Je,r)},e}function V(t,e,r){var n=ht(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,Ee);return o===Ee?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(Pe,i);return new Ye(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return w(n,s,e.call(r,u[1],s,t),i)})},n}function H(t,e){var r=this,n=ht(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=N(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=ft,n.__iterate=function(r,n){var i=this,u=0;return n&&o(t),
t.__iterate(function(t,o){return r(t,e?o:n?i.size-++u:u++,i)},!n)},n.__iterator=function(n,i){var u=0;i&&o(t);var s=t.__iterator(Pe,!i);return new Ye(function(){var t=s.next();if(t.done)return t;var o=t.value;return w(n,e?o[0]:i?r.size-++u:u++,o[1],t)})},n}function Y(t,e,r,n){var i=ht(t);return n&&(i.has=function(n){var i=t.get(n,Ee);return i!==Ee&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,Ee);return o!==Ee&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){if(e.call(r,t,o,a))return i(t,n?o:s++,u)},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(Pe,o),s=0;return new Ye(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,c=a[0],h=a[1];if(e.call(r,h,c,t))return w(i,n?c:s++,h,o)}})},i}function Q(t,e,r){var n=mr().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function X(t,e,r){var n=l(t),i=(d(t)?Tr():mr()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=ct(t);return i.map(function(e){return st(t,o(e))})}function F(t,e,r,n){var i=t.size;if(a(e,r,i))return t;var o=c(e,i),s=h(r,i);if(o!==o||s!==s)return F(t.toSeq().cacheResult(),e,r,n);var f,p=s-o;p===p&&(f=p<0?0:p);var _=ht(t);return _.size=0===f?f:t.size&&f||void 0,!n&&q(t)&&f>=0&&(_.get=function(e,r){return e=u(this,e),e>=0&&e<f?t.get(e+o,r):r}),_.__iterateUncached=function(e,r){var i=this;if(0===f)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,s=!0,a=0;return t.__iterate(function(t,r){if(!s||!(s=u++<o))return a++,e(t,n?r:a-1,i)!==!1&&a!==f}),a},_.__iteratorUncached=function(e,r){if(0!==f&&r)return this.cacheResult().__iterator(e,r);var i=0!==f&&t.__iterator(e,r),u=0,s=0;return new Ye(function(){for(;u++<o;)i.next();if(++s>f)return z();var t=i.next();return n||e===Je?t:e===Be?w(e,s-1,void 0,t):w(e,s-1,t.value[1],t)})},_}function G(t,e,r){var n=ht(t);return n.__iterateUncached=function(n,i){var o=this
t.__iterate(function(t,o){return r(t,e?o:n?i.size-++u:u++,i)},!n)},n.__iterator=function(n,i){var u=0;i&&o(t);var s=t.__iterator(Pe,!i);return new Ye(function(){var t=s.next();if(t.done)return t;var o=t.value;return w(n,e?o[0]:i?r.size-++u:u++,o[1],t)})},n}function Y(t,e,r,n){var i=ht(t);return n&&(i.has=function(n){var i=t.get(n,Ee);return i!==Ee&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,Ee);return o!==Ee&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){if(e.call(r,t,o,a))return i(t,n?o:s++,u)},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(Pe,o),s=0;return new Ye(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,c=a[0],h=a[1];if(e.call(r,h,c,t))return w(i,n?c:s++,h,o)}})},i}function Q(t,e,r){var n=mr().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function X(t,e,r){var n=l(t),i=(d(t)?Tr():mr()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=ct(t);return i.map(function(e){return st(t,o(e))})}function F(t,e,r,n){var i=t.size;if(a(e,r,i))return t;var o=c(e,i),s=h(r,i);if(o!==o||s!==s)return F(t.toSeq().cacheResult(),e,r,n);var f,p=s-o;p===p&&(f=p<0?0:p);var _=ht(t);return _.size=0===f?f:t.size&&f||void 0,!n&&D(t)&&f>=0&&(_.get=function(e,r){return e=u(this,e),e>=0&&e<f?t.get(e+o,r):r}),_.__iterateUncached=function(e,r){var i=this;if(0===f)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,s=!0,a=0;return t.__iterate(function(t,r){if(!s||!(s=u++<o))return a++,e(t,n?r:a-1,i)!==!1&&a!==f}),a},_.__iteratorUncached=function(e,r){if(0!==f&&r)return this.cacheResult().__iterator(e,r);var i=0!==f&&t.__iterator(e,r),u=0,s=0;return new Ye(function(){for(;u++<o;)i.next();if(++s>f)return z();var t=i.next();return n||e===Je?t:e===Be?w(e,s-1,void 0,t):w(e,s-1,t.value[1],t)})},_}function G(t,e,r){var n=ht(t);return n.__iterateUncached=function(n,i){var o=this
;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(Pe,i),s=!0;return new Ye(function(){if(!s)return z();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],c=i[1];return e.call(r,c,a,o)?n===Pe?t:w(n,a,c,t):(s=!1,z())})},n}function Z(t,e,r,n){var i=ht(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate(function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return a++,i(t,n?o:a-1,u)}),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(Pe,o),a=!0,c=0;return new Ye(function(){var t,o,h;do{if(t=s.next(),t.done)return n||i===Je?t:i===Be?w(i,c++,void 0,t):w(i,c++,t.value[1],t);var f=t.value;o=f[0],h=f[1],a&&(a=e.call(r,h,o,u))}while(a);return i===Pe?t:w(i,o,h,t)})},i}function $(t,e){var r=l(t),n=[t].concat(e).map(function(t){return _(t)?r&&(t=Te(t)):t=r?E(t):x(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&&l(i)||v(t)&&v(i))return i}var o=new $e(n);return r?o=o.toKeyedSeq():v(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function tt(t,e,r){var n=ht(t);return n.__iterateUncached=function(i,o){function u(t,c){t.__iterate(function(t,o){return(!e||c<e)&&_(t)?u(t,c+1):i(t,r?o:s++,n)===!1&&(a=!0),!a},o)}if(o)return this.cacheResult().__iterate(i,o);var s=0,a=!1;return u(t,0),s},n.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=t.__iterator(n,i),u=[],s=0;return new Ye(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===Pe&&(a=a[1]),e&&!(u.length<e)||!_(a))return r?t:w(n,s++,a,t);u.push(o),o=a.__iterator(n,i)}else o=u.pop()}return z()})},n}function et(t,e,r){var n=ct(t)
;return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function rt(t,e){var r=ht(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(Je,n),u=0;return new Ye(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?w(r,u++,e):w(r,u++,i.value,i)})},r}function nt(t,e,r){e||(e=pt);var n=l(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?Xe(o):v(t)?Fe(o):Ge(o)}function it(t,e,r){if(e||(e=pt),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return ot(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return ot(e,t,r)?r:t})}function ot(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function ut(t,e,r){var n=ht(t);return n.size=new $e(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this,i=this.__iterator(Je,e),o=0;!(r=i.next()).done&&t(r.value,o++,n)!==!1;);return o},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=Le(t),b(n?t.reverse():t)}),o=0,u=!1;return new Ye(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?z():w(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function st(t,e){return t===e?t:q(t)?e:t.constructor(e)}function at(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ct(t){return l(t)?Te:v(t)?Ce:We}function ht(t){return Object.create((l(t)?Xe:v(t)?Fe:Ge).prototype)}function ft(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Qe.prototype.cacheResult.call(this)}function pt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function _t(t){if(M(t)&&"string"!=typeof t)return t
;if(d(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function lt(t,e){if(!t)throw Error(e)}function vt(t){lt(t!==1/0,"Cannot perform this action with an infinite size.")}function yt(t){return"string"==typeof t?JSON.stringify(t):t+""}function dt(t){return!(!t||!t[wr])}function gt(t,e){return w(t,e[0],e[1])}function mt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,r,n){var i=Object.create(zr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zt(){return qr||(qr=wt(0))}function St(t,r,n){var i,o;if(t._root){var u=e(xe),s=e(je);if(i=It(t._root,t.__ownerID,0,void 0,r,n,u,s),!s.value)return t;o=t.size+(u.value?n===Ee?-1:1:0)}else{if(n===Ee)return t;o=1,i=new Sr(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?wt(o,i):zt()}function It(t,e,n,i,o,u,s,a){return t?t.update(e,n,i,o,u,s,a):u===Ee?t:(r(a),r(s),new Mr(e,i,[o,u]))}function bt(t){return t.constructor===Mr||t.constructor===Or}function Ot(t,e,r,n,i){if(t.keyHash===n)return new Or(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&De,s=(0===r?n:n>>>r)&De;return new Ir(e,1<<u|1<<s,u===s?[Ot(t,e,r+Me,n,i)]:(o=new Mr(e,n,i),u<s?[t,o]:[o,t]))}function Mt(t,e,r,i){t||(t=new n);for(var o=new Mr(t,C(r),[r,i]),u=0;u<e.length;u++){var s=e[u];o=o.update(t,0,void 0,s[0],s[1])}return o}function qt(t,e,r,n){for(var i=0,o=0,u=Array(r),s=0,a=1,c=e.length;s<c;s++,a<<=1){var h=e[s];void 0!==h&&s!==n&&(i|=a,u[o++]=h)}return new Ir(t,i,u)}function Dt(t,e,r,n,i){for(var o=0,u=Array(qe),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new br(t,o+1,u)}function Et(t,e,r){for(var n=[],i=0;i<r.length;i++){var o=r[i],u=Te(o);_(o)||(u=u.map(function(t){return R(t)})),n.push(u)}return kt(t,e,n)}function xt(t,e){return t&&t.mergeDeep&&_(e)?t.mergeDeep(e):A(t,e)?t:e}function jt(t){return function(e,r,n){if(e&&e.mergeDeepWith&&_(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return A(e,i)?e:i}}function kt(t,e,r){return r=r.filter(function(t){
return 0!==t.size}),0===r.length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,Ee,function(t){return t===Ee?r:e(t,r,n)})}:function(e,r){t.set(r,e)},i=0;i<r.length;i++)r[i].forEach(n)}):t.constructor(r[0])}function At(t,e,r,n,i){var o=t===Ee;if(r===e.length){var u=o?n:t,s=i(u);return s===u?t:s}if(!(o||t&&t.set))throw new TypeError("Invalid keyPath: Value at ["+e.slice(0,r).map(yt)+"] does not have a .set() method and cannot be updated: "+t);var a=e[r],c=o?Ee:t.get(a,Ee),h=At(c,e,r+1,n,i);return h===c?t:h===Ee?t.remove(a):(o?zt():t).set(a,h)}function Rt(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Ut(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function Kt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=Array(i),u=0,s=0;s<i;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function Lt(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u<n;u++)u===e&&(o=1),i[u]=t[u+o];return i}function Tt(t){return!(!t||!t[Ar])}function Ct(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===s?a&&a.array:t&&t.array,i=r>o?0:o-r,c=u-r;return c>qe&&(c=qe),function(){if(i===c)return Lr;var t=e?--c:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,c=i>o?0:o-i>>n,h=1+(u-i>>n);return h>qe&&(h=qe),function(){for(;;){if(s){var t=s();if(t!==Lr)return t;s=null}if(c===h)return Lr;var o=e?--h:c++;s=r(a&&a[o],n-Me,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=Qt(u),a=t._tail;return r(t._root,t._level,0)}function Wt(t,e,r,n,i,o,u){var s=Object.create(Rr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function Bt(){return Kr||(Kr=Wt(0,0,Me))}function Jt(t,r,n){if((r=u(t,r))!==r)return t;if(r>=t.size||r<0)return t.withMutations(function(t){r<0?Ht(t,r).set(0,n):Ht(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,s=e(je)
;return r>=Qt(t._capacity)?i=Pt(i,t.__ownerID,0,r,n,s):o=Pt(o,t.__ownerID,t._level,r,n,s),s.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):Wt(t._origin,t._capacity,t._level,o,i):t}function Pt(t,e,n,i,o,u){var s=i>>>n&De,a=t&&s<t.array.length;if(!a&&void 0===o)return t;var c;if(n>0){var h=t&&t.array[s],f=Pt(h,e,n-Me,i,o,u);return f===h?t:(c=Nt(t,e),c.array[s]=f,c)}return a&&t.array[s]===o?t:(r(u),c=Nt(t,e),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function Nt(t,e){return e&&t&&e===t.ownerID?t:new Ur(t?t.array.slice():[],e)}function Vt(t,e){if(e>=Qt(t._capacity))return t._tail;if(e<1<<t._level+Me){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&De],n-=Me;return r}}function Ht(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+e,a=void 0===r?u:r<0?u+r:o+r;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var c=t._level,h=t._root,f=0;s+f<0;)h=new Ur(h&&h.array.length?[void 0,h]:[],i),c+=Me,f+=1<<c;f&&(s+=f,o+=f,a+=f,u+=f);for(var p=Qt(u),_=Qt(a);_>=1<<c+Me;)h=new Ur(h&&h.array.length?[h]:[],i),c+=Me;var l=t._tail,v=_<p?Vt(t,a-1):_>p?new Ur([],i):l;if(l&&_>p&&s<u&&l.array.length){h=Nt(h,i);for(var y=h,d=c;d>Me;d-=Me){var g=p>>>d&De;y=y.array[g]=Nt(y.array[g],i)}y.array[p>>>Me&De]=l}if(a<u&&(v=v&&v.removeAfter(i,0,a)),s>=_)s-=_,a-=_,c=Me,h=null,v=v&&v.removeBefore(i,0,s);else if(s>o||_<p){for(f=0;h;){var m=s>>>c&De;if(m!==_>>>c&De)break;m&&(f+=(1<<c)*m),c-=Me,h=h.array[m]}h&&s>o&&(h=h.removeBefore(i,c,s-f)),h&&_<p&&(h=h.removeAfter(i,c,_-f)),f&&(s-=f,a-=f)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=c,t._root=h,t._tail=v,t.__hash=void 0,t.__altered=!0,t):Wt(s,a,c,h,v)}function Yt(t,e,r){for(var n=[],i=0,o=0;o<r.length;o++){var u=r[o],s=Ce(u);s.size>i&&(i=s.size),_(u)||(s=s.map(function(t){return R(t)})),n.push(s)}return i>t.size&&(t=t.setSize(i)),kt(t,e,n)}function Qt(t){return t<qe?0:t-1>>>Me<<Me}function Xt(t){return dt(t)&&d(t)}function Ft(t,e,r,n){var i=Object.create(Tr.prototype)
;return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Gt(){return Cr||(Cr=Ft(zt(),Bt()))}function Zt(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===Ee){if(!a)return t;u.size>=qe&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Ft(n,i)}function $t(t){return!(!t||!t[Br])}function te(t,e,r,n){var i=Object.create(Jr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ee(){return Pr||(Pr=te(0))}function re(t,e){if(t===e)return!0;if(!_(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||l(t)!==l(e)||v(t)!==v(e)||d(t)!==d(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!y(t);if(d(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&A(i[1],t)&&(r||A(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,s=e.__iterate(function(e,n){if(r?!t.has(e):i?!A(e,t.get(n,Ee)):!A(t.get(n,Ee),e))return u=!1,!1});return u&&t.size===s}function ne(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function ie(t){return!(!t||!t[Vr])}function oe(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 ue(t,e){var r=Object.create(Hr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function se(){return Yr||(Yr=ue(zt()))}function ae(t,e,r,n,i,o){return vt(t.size),t.__iterate(function(t,o,u){i?(i=!1,r=t):r=e.call(n,r,t,o,u)},o),r}function ce(t,e){return e}
function he(t,e){return[e,t]}function fe(t){return t&&"function"==typeof t.toJS?t.toJS():t}function pe(t){return function(){return!t.apply(this,arguments)}}function _e(t){return function(){return-t.apply(this,arguments)}}function le(){return i(arguments)}function ve(t,e){return t<e?1:t>e?-1:0}function ye(t){if(t.size===1/0)return 0;var e=d(t),r=l(t),n=e?1:0;return de(t.__iterate(r?e?function(t,e){n=31*n+ge(C(t),C(e))|0}:function(t,e){n=n+ge(C(t),C(e))|0}:e?function(t){n=31*n+C(t)|0}:function(t){n=n+C(t)|0}),n)}function de(t,e){return e=or(e,3432918353),e=or(e<<15|e>>>-15,461845907),e=or(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=or(e^e>>>16,2246822507),e=or(e^e>>>13,3266489909),e=T(e^e>>>16)}function ge(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}function me(t){return ie(t)&&d(t)}function we(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function ze(){return en||(en=we(Gt()))}function Se(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function Ie(t){return t._name||t.constructor.name||"Record"}function be(t){return E(t._keys.map(function(e){return[e,t.get(e)]}))}function Oe(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){lt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}var Me=5,qe=1<<Me,De=qe-1,Ee={},xe={value:!1},je={value:!1},ke="@@__IMMUTABLE_ITERABLE__@@",Ae="@@__IMMUTABLE_KEYED__@@",Re="@@__IMMUTABLE_INDEXED__@@",Ue="@@__IMMUTABLE_ORDERED__@@",Ke="@@__IMMUTABLE_RECORD__@@",Le=function(t){return _(t)?t:Qe(t)},Te=function(t){function e(t){return l(t)?t:Xe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Le),Ce=function(t){function e(t){return v(t)?t:Fe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Le),We=function(t){function e(t){return _(t)&&!y(t)?t:Ge(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Le);Le.Keyed=Te,
Le.Indexed=Ce,Le.Set=We;var Be=0,Je=1,Pe=2,Ne="function"==typeof Symbol&&Symbol.iterator,Ve="@@iterator",He=Ne||Ve,Ye=function(t){this.next=t};Ye.prototype.toString=function(){return"[Iterator]"},Ye.KEYS=Be,Ye.VALUES=Je,Ye.ENTRIES=Pe,Ye.prototype.inspect=Ye.prototype.toSource=function(){return""+this},Ye.prototype[He]=function(){return this};var Qe=function(t){function e(t){return null===t||void 0===t?D():_(t)||g(t)?t.toSeq():j(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this,n=this._cache;if(n){for(var i=n.length,o=0;o!==i;){var u=n[e?i-++o:o++];if(t(u[1],u[0],r)===!1)break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new Ye(function(){if(i===n)return z();var o=r[e?n-++i:i++];return w(t,o[0],o[1])})}return this.__iteratorUncached(t,e)},e}(Le),Xe=function(t){function e(t){return null===t||void 0===t?D().toKeyedSeq():_(t)?l(t)?t.toSeq():t.fromEntrySeq():g(t)?t.toSeq():E(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(Qe),Fe=function(t){function e(t){return null===t||void 0===t?D():_(t)?l(t)?t.entrySeq():t.toIndexedSeq():g(t)?t.toSeq().entrySeq():x(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(Qe),Ge=function(t){function e(t){return(_(t)&&!y(t)?t:Fe(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),
e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(Qe);Qe.isSeq=q,Qe.Keyed=Xe,Qe.Set=Ge,Qe.Indexed=Fe;var Ze="@@__IMMUTABLE_SEQ__@@";Qe.prototype[Ze]=!0;var $e=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[u(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this,n=this._array,i=n.length,o=0;o!==i;){var u=e?i-++o:o++;if(t(n[u],u,r)===!1)break}return o},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new Ye(function(){if(i===n)return z();var o=e?n-++i:i++;return w(t,o,r[o])})},e}(Fe),tr=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return this._object.hasOwnProperty(t)},e.prototype.__iterate=function(t,e){for(var r=this,n=this._object,i=this._keys,o=i.length,u=0;u!==o;){var s=i[e?o-++u:u++];if(t(n[s],s,r)===!1)break}return u},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new Ye(function(){if(o===i)return z();var u=n[e?i-++o:o++];return w(t,u,r[u])})},e}(Xe);tr.prototype[Ue]=!0;var er,rr,nr=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){var r=this;if(e)return this.cacheResult().__iterate(t,e);var n=this._collection,i=b(n),o=0;if(I(i))for(var u;!(u=i.next()).done&&t(u.value,o++,r)!==!1;);return o},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._collection,n=b(r);if(!I(n))return new Ye(z);var i=0;return new Ye(function(){var e=n.next()
;return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function rt(t,e){var r=ht(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(Je,n),u=0;return new Ye(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?w(r,u++,e):w(r,u++,i.value,i)})},r}function nt(t,e,r){e||(e=pt);var n=l(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?Xe(o):v(t)?Fe(o):Ge(o)}function it(t,e,r){if(e||(e=pt),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return ot(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return ot(e,t,r)?r:t})}function ot(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function ut(t,e,r){var n=ht(t);return n.size=new $e(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this,i=this.__iterator(Je,e),o=0;!(r=i.next()).done&&t(r.value,o++,n)!==!1;);return o},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=Le(t),b(n?t.reverse():t)}),o=0,u=!1;return new Ye(function(){var r;return u||(r=i.map(function(t){return t.next()}),u=r.some(function(t){return t.done})),u?z():w(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function st(t,e){return t===e?t:D(t)?e:t.constructor(e)}function at(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ct(t){return l(t)?Te:v(t)?Ce:We}function ht(t){return Object.create((l(t)?Xe:v(t)?Fe:Ge).prototype)}function ft(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Qe.prototype.cacheResult.call(this)}function pt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function _t(t){if(M(t)&&"string"!=typeof t)return t
;if(d(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function lt(t,e){if(!t)throw Error(e)}function vt(t){lt(t!==1/0,"Cannot perform this action with an infinite size.")}function yt(t){return"string"==typeof t?JSON.stringify(t):t+""}function dt(t){return!(!t||!t[wr])}function gt(t,e){return w(t,e[0],e[1])}function mt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,r,n){var i=Object.create(zr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zt(){return Dr||(Dr=wt(0))}function St(t,r,n){var i,o;if(t._root){var u=e(xe),s=e(ke);if(i=It(t._root,t.__ownerID,0,void 0,r,n,u,s),!s.value)return t;o=t.size+(u.value?n===Ee?-1:1:0)}else{if(n===Ee)return t;o=1,i=new Sr(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?wt(o,i):zt()}function It(t,e,n,i,o,u,s,a){return t?t.update(e,n,i,o,u,s,a):u===Ee?t:(r(a),r(s),new Mr(e,i,[o,u]))}function bt(t){return t.constructor===Mr||t.constructor===Or}function Ot(t,e,r,n,i){if(t.keyHash===n)return new Or(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&qe,s=(0===r?n:n>>>r)&qe;return new Ir(e,1<<u|1<<s,u===s?[Ot(t,e,r+Me,n,i)]:(o=new Mr(e,n,i),u<s?[t,o]:[o,t]))}function Mt(t,e,r,i){t||(t=new n);for(var o=new Mr(t,C(r),[r,i]),u=0;u<e.length;u++){var s=e[u];o=o.update(t,0,void 0,s[0],s[1])}return o}function Dt(t,e,r,n){for(var i=0,o=0,u=Array(r),s=0,a=1,c=e.length;s<c;s++,a<<=1){var h=e[s];void 0!==h&&s!==n&&(i|=a,u[o++]=h)}return new Ir(t,i,u)}function qt(t,e,r,n,i){for(var o=0,u=Array(De),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new br(t,o+1,u)}function Et(t,e,r){for(var n=[],i=0;i<r.length;i++){var o=r[i],u=Te(o);_(o)||(u=u.map(function(t){return R(t)})),n.push(u)}return jt(t,e,n)}function xt(t,e){return t&&t.mergeDeep&&_(e)?t.mergeDeep(e):A(t,e)?t:e}function kt(t){return function(e,r,n){if(e&&e.mergeDeepWith&&_(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return A(e,i)?e:i}}function jt(t,e,r){return r=r.filter(function(t){
return 0!==t.size}),0===r.length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,Ee,function(t){return t===Ee?r:e(t,r,n)})}:function(e,r){t.set(r,e)},i=0;i<r.length;i++)r[i].forEach(n)}):t.constructor(r[0])}function At(t,e,r,n,i){var o=t===Ee;if(r===e.length){var u=o?n:t,s=i(u);return s===u?t:s}if(!(o||t&&t.set))throw new TypeError("Invalid keyPath: Value at ["+e.slice(0,r).map(yt)+"] does not have a .set() method and cannot be updated: "+t);var a=e[r],c=o?Ee:t.get(a,Ee),h=At(c,e,r+1,n,i);return h===c?t:h===Ee?t.remove(a):(o?zt():t).set(a,h)}function Rt(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Ut(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function Kt(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=Array(i),u=0,s=0;s<i;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function Lt(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u<n;u++)u===e&&(o=1),i[u]=t[u+o];return i}function Tt(t){return!(!t||!t[Ar])}function Ct(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r)}function n(t,r){var n=r===s?a&&a.array:t&&t.array,i=r>o?0:o-r,c=u-r;return c>De&&(c=De),function(){if(i===c)return Lr;var t=e?--c:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,c=i>o?0:o-i>>n,h=1+(u-i>>n);return h>De&&(h=De),function(){for(;;){if(s){var t=s();if(t!==Lr)return t;s=null}if(c===h)return Lr;var o=e?--h:c++;s=r(a&&a[o],n-Me,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=Qt(u),a=t._tail;return r(t._root,t._level,0)}function Wt(t,e,r,n,i,o,u){var s=Object.create(Rr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function Bt(){return Kr||(Kr=Wt(0,0,Me))}function Jt(t,r,n){if((r=u(t,r))!==r)return t;if(r>=t.size||r<0)return t.withMutations(function(t){r<0?Ht(t,r).set(0,n):Ht(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,s=e(ke)
;return r>=Qt(t._capacity)?i=Pt(i,t.__ownerID,0,r,n,s):o=Pt(o,t.__ownerID,t._level,r,n,s),s.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):Wt(t._origin,t._capacity,t._level,o,i):t}function Pt(t,e,n,i,o,u){var s=i>>>n&qe,a=t&&s<t.array.length;if(!a&&void 0===o)return t;var c;if(n>0){var h=t&&t.array[s],f=Pt(h,e,n-Me,i,o,u);return f===h?t:(c=Nt(t,e),c.array[s]=f,c)}return a&&t.array[s]===o?t:(r(u),c=Nt(t,e),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function Nt(t,e){return e&&t&&e===t.ownerID?t:new Ur(t?t.array.slice():[],e)}function Vt(t,e){if(e>=Qt(t._capacity))return t._tail;if(e<1<<t._level+Me){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&qe],n-=Me;return r}}function Ht(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+e,a=void 0===r?u:r<0?u+r:o+r;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var c=t._level,h=t._root,f=0;s+f<0;)h=new Ur(h&&h.array.length?[void 0,h]:[],i),c+=Me,f+=1<<c;f&&(s+=f,o+=f,a+=f,u+=f);for(var p=Qt(u),_=Qt(a);_>=1<<c+Me;)h=new Ur(h&&h.array.length?[h]:[],i),c+=Me;var l=t._tail,v=_<p?Vt(t,a-1):_>p?new Ur([],i):l;if(l&&_>p&&s<u&&l.array.length){h=Nt(h,i);for(var y=h,d=c;d>Me;d-=Me){var g=p>>>d&qe;y=y.array[g]=Nt(y.array[g],i)}y.array[p>>>Me&qe]=l}if(a<u&&(v=v&&v.removeAfter(i,0,a)),s>=_)s-=_,a-=_,c=Me,h=null,v=v&&v.removeBefore(i,0,s);else if(s>o||_<p){for(f=0;h;){var m=s>>>c&qe;if(m!==_>>>c&qe)break;m&&(f+=(1<<c)*m),c-=Me,h=h.array[m]}h&&s>o&&(h=h.removeBefore(i,c,s-f)),h&&_<p&&(h=h.removeAfter(i,c,_-f)),f&&(s-=f,a-=f)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=c,t._root=h,t._tail=v,t.__hash=void 0,t.__altered=!0,t):Wt(s,a,c,h,v)}function Yt(t,e,r){for(var n=[],i=0,o=0;o<r.length;o++){var u=r[o],s=Ce(u);s.size>i&&(i=s.size),_(u)||(s=s.map(function(t){return R(t)})),n.push(s)}return i>t.size&&(t=t.setSize(i)),jt(t,e,n)}function Qt(t){return t<De?0:t-1>>>Me<<Me}function Xt(t){return dt(t)&&d(t)}function Ft(t,e,r,n){var i=Object.create(Tr.prototype)
;return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Gt(){return Cr||(Cr=Ft(zt(),Bt()))}function Zt(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===Ee){if(!a)return t;u.size>=De&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Ft(n,i)}function $t(t){return!(!t||!t[Br])}function te(t,e,r,n){var i=Object.create(Jr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ee(){return Pr||(Pr=te(0))}function re(t,e){if(t===e)return!0;if(!_(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||l(t)!==l(e)||v(t)!==v(e)||d(t)!==d(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!y(t);if(d(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&A(i[1],t)&&(r||A(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,s=e.__iterate(function(e,n){if(r?!t.has(e):i?!A(e,t.get(n,Ee)):!A(t.get(n,Ee),e))return u=!1,!1});return u&&t.size===s}function ne(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function ie(t){return!(!t||!t[Vr])}function oe(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 ue(t,e){var r=Object.create(Hr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function se(){return Yr||(Yr=ue(zt()))}function ae(t,e,r,n,i,o){return vt(t.size),t.__iterate(function(t,o,u){i?(i=!1,r=t):r=e.call(n,r,t,o,u)},o),r}function ce(t,e){return e}
function he(t,e){return[e,t]}function fe(t){return t&&"function"==typeof t.toJS?t.toJS():t}function pe(t){return function(){return!t.apply(this,arguments)}}function _e(t){return function(){return-t.apply(this,arguments)}}function le(){return i(arguments)}function ve(t,e){return t<e?1:t>e?-1:0}function ye(t){if(t.size===1/0)return 0;var e=d(t),r=l(t),n=e?1:0;return de(t.__iterate(r?e?function(t,e){n=31*n+ge(C(t),C(e))|0}:function(t,e){n=n+ge(C(t),C(e))|0}:e?function(t){n=31*n+C(t)|0}:function(t){n=n+C(t)|0}),n)}function de(t,e){return e=or(e,3432918353),e=or(e<<15|e>>>-15,461845907),e=or(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=or(e^e>>>16,2246822507),e=or(e^e>>>13,3266489909),e=T(e^e>>>16)}function ge(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}function me(t){return ie(t)&&d(t)}function we(t,e){var r=Object.create(tn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function ze(){return en||(en=we(Gt()))}function Se(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function Ie(t){return t._name||t.constructor.name||"Record"}function be(t){return E(t._keys.map(function(e){return[e,t.get(e)]}))}function Oe(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){lt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}var Me=5,De=1<<Me,qe=De-1,Ee={},xe={value:!1},ke={value:!1},je="@@__IMMUTABLE_ITERABLE__@@",Ae="@@__IMMUTABLE_KEYED__@@",Re="@@__IMMUTABLE_INDEXED__@@",Ue="@@__IMMUTABLE_ORDERED__@@",Ke="@@__IMMUTABLE_RECORD__@@",Le=function(t){return _(t)?t:Qe(t)},Te=function(t){function e(t){return l(t)?t:Xe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Le),Ce=function(t){function e(t){return v(t)?t:Fe(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Le),We=function(t){function e(t){return _(t)&&!y(t)?t:Ge(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Le);Le.Keyed=Te,
Le.Indexed=Ce,Le.Set=We;var Be=0,Je=1,Pe=2,Ne="function"==typeof Symbol&&Symbol.iterator,Ve="@@iterator",He=Ne||Ve,Ye=function(t){this.next=t};Ye.prototype.toString=function(){return"[Iterator]"},Ye.KEYS=Be,Ye.VALUES=Je,Ye.ENTRIES=Pe,Ye.prototype.inspect=Ye.prototype.toSource=function(){return""+this},Ye.prototype[He]=function(){return this};var Qe=function(t){function e(t){return null===t||void 0===t?q():_(t)||g(t)?t.toSeq():k(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this,n=this._cache;if(n){for(var i=n.length,o=0;o!==i;){var u=n[e?i-++o:o++];if(t(u[1],u[0],r)===!1)break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new Ye(function(){if(i===n)return z();var o=r[e?n-++i:i++];return w(t,o[0],o[1])})}return this.__iteratorUncached(t,e)},e}(Le),Xe=function(t){function e(t){return null===t||void 0===t?q().toKeyedSeq():_(t)?l(t)?t.toSeq():t.fromEntrySeq():g(t)?t.toSeq():E(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(Qe),Fe=function(t){function e(t){return null===t||void 0===t?q():_(t)?l(t)?t.entrySeq():t.toIndexedSeq():g(t)?t.toSeq().entrySeq():x(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(Qe),Ge=function(t){function e(t){return(_(t)&&!y(t)?t:Fe(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),
e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(Qe);Qe.isSeq=D,Qe.Keyed=Xe,Qe.Set=Ge,Qe.Indexed=Fe;var Ze="@@__IMMUTABLE_SEQ__@@";Qe.prototype[Ze]=!0;var $e=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[u(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this,n=this._array,i=n.length,o=0;o!==i;){var u=e?i-++o:o++;if(t(n[u],u,r)===!1)break}return o},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new Ye(function(){if(i===n)return z();var o=e?n-++i:i++;return w(t,o,r[o])})},e}(Fe),tr=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return this._object.hasOwnProperty(t)},e.prototype.__iterate=function(t,e){for(var r=this,n=this._object,i=this._keys,o=i.length,u=0;u!==o;){var s=i[e?o-++u:u++];if(t(n[s],s,r)===!1)break}return u},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new Ye(function(){if(o===i)return z();var u=n[e?i-++o:o++];return w(t,u,r[u])})},e}(Xe);tr.prototype[Ue]=!0;var er,rr,nr=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){var r=this;if(e)return this.cacheResult().__iterate(t,e);var n=this._collection,i=b(n),o=0;if(I(i))for(var u;!(u=i.next()).done&&t(u.value,o++,r)!==!1;);return o},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._collection,n=b(r);if(!I(n))return new Ye(z);var i=0;return new Ye(function(){var e=n.next()
;return e.done?e:w(t,i++,e.value)})},e}(Fe),ir=function(t){function e(t){this._iterator=t,this._iteratorCache=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){var r=this;if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(t(i[o],o++,r)===!1)return o;for(var u;!(u=n.next()).done;){var s=u.value;if(i[o]=s,t(s,o++,r)===!1)break}return o},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Ye(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return w(t,i,n[i++])})},e}(Fe),or="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(t,e){t|=0,e|=0;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},ur=Object.isExtensible,sr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),ar="function"==typeof WeakMap;ar&&(rr=new WeakMap);var cr=0,hr="__immutablehash__";"function"==typeof Symbol&&(hr=Symbol(hr));var fr=16,pr=255,_r=0,lr={},vr=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=H(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var r=this,n=V(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e,n){return t(e,n,r)},e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(Xe);vr.prototype[Ue]=!0;var yr=function(t){function e(t){this._iter=t,
this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this,n=0;return e&&o(this),this._iter.__iterate(function(i){return t(i,e?r.size-++n:n++,r)},e)},e.prototype.__iterator=function(t,e){var r=this,n=this._iter.__iterator(Je,e),i=0;return e&&o(this),new Ye(function(){var o=n.next();return o.done?o:w(t,e?r.size-++i:i++,o.value,o)})},e}(Fe),dr=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(Je,e);return new Ye(function(){var e=r.next();return e.done?e:w(t,e.value,e.value,e)})},e}(Ge),gr=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){at(e);var n=_(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(Je,e);return new Ye(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){at(n);var i=_(n);return w(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},e}(Xe);yr.prototype.cacheResult=vr.prototype.cacheResult=dr.prototype.cacheResult=gr.prototype.cacheResult=ft;var mr=function(t){function e(e){return null===e||void 0===e?zt():dt(e)&&!d(e)?e:zt().withMutations(function(r){var n=t(e);vt(n.size),n.forEach(function(t,e){return r.set(e,t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e]
;return zt().withMutations(function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}})},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return St(this,t,e)},e.prototype.setIn=function(t,e){return this.updateIn(t,Ee,function(){return e})},e.prototype.remove=function(t){return St(this,t,Ee)},e.prototype.deleteIn=function(t){if(t=[].concat(_t(t)),t.length){var e=t.pop();return this.updateIn(t,function(t){return t&&t.remove(e)})}},e.prototype.deleteAll=function(t){var e=Le(t);return 0===e.size?this:this.withMutations(function(t){e.forEach(function(e){return t.remove(e)})})},e.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},e.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=At(this,_t(t),0,e,r);return n===Ee?e:n},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):zt()},e.prototype.merge=function(){return Et(this,void 0,arguments)},e.prototype.mergeWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Et(this,t,e)},e.prototype.mergeIn=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return this.updateIn(t,zt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},e.prototype.mergeDeep=function(){return Et(this,xt,arguments)},e.prototype.mergeDeepWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Et(this,jt(t),e)},e.prototype.mergeDeepIn=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return this.updateIn(t,zt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},e.prototype.sort=function(t){return Tr(nt(this,t))},e.prototype.sortBy=function(t,e){return Tr(nt(this,e,t))},
e.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},e.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},e.prototype.asImmutable=function(){return this.__ensureOwner()},e.prototype.wasAltered=function(){return this.__altered},e.prototype.__iterator=function(t,e){return new Dr(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):0===this.size?zt():(this.__ownerID=t,this.__altered=!1,this)},e}(Te);mr.isMap=dt;var wr="@@__IMMUTABLE_MAP__@@",zr=mr.prototype;zr[wr]=!0,zr.delete=zr.remove,zr.removeIn=zr.deleteIn,zr.removeAll=zr.deleteAll;var Sr=function(t,e){this.ownerID=t,this.entries=e};Sr.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(A(r,i[o][0]))return i[o][1];return n},Sr.prototype.update=function(t,e,n,o,u,s,a){for(var c=u===Ee,h=this.entries,f=0,p=h.length;f<p&&!A(o,h[f][0]);f++);var _=f<p;if(_?h[f][1]===u:c)return this;if(r(a),(c||!_)&&r(s),!c||1!==h.length){if(!_&&!c&&h.length>=Er)return Mt(t,h,o,u);var l=t&&t===this.ownerID,v=l?h:i(h);return _?c?f===p-1?v.pop():v[f]=v.pop():v[f]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Sr(t,v)}};var Ir=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};Ir.prototype.get=function(t,e,r,n){void 0===e&&(e=C(r));var i=1<<((0===t?e:e>>>t)&De),o=this.bitmap;return 0==(o&i)?n:this.nodes[Rt(o&i-1)].get(t+Me,e,r,n)},Ir.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=C(n));var s=(0===e?r:r>>>e)&De,a=1<<s,c=this.bitmap,h=0!=(c&a);if(!h&&i===Ee)return this;var f=Rt(c&a-1),p=this.nodes,_=h?p[f]:void 0,l=It(_,t,e+Me,r,n,i,o,u);if(l===_)return this;if(!h&&l&&p.length>=xr)return Dt(t,p,c,s,l);if(h&&!l&&2===p.length&&bt(p[1^f]))return p[1^f];if(h&&l&&1===p.length&&bt(l))return l
;var v=t&&t===this.ownerID,y=h?l?c:c^a:c|a,d=h?l?Ut(p,f,l,v):Lt(p,f,v):Kt(p,f,l,v);return v?(this.bitmap=y,this.nodes=d,this):new Ir(t,y,d)};var br=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};br.prototype.get=function(t,e,r,n){void 0===e&&(e=C(r));var i=(0===t?e:e>>>t)&De,o=this.nodes[i];return o?o.get(t+Me,e,r,n):n},br.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=C(n));var s=(0===e?r:r>>>e)&De,a=i===Ee,c=this.nodes,h=c[s];if(a&&!h)return this;var f=It(h,t,e+Me,r,n,i,o,u);if(f===h)return this;var p=this.count;if(h){if(!f&&--p<jr)return qt(t,c,p,s)}else p++;var _=t&&t===this.ownerID,l=Ut(c,s,f,_);return _?(this.count=p,this.nodes=l,this):new br(t,p,l)};var Or=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Or.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(A(r,i[o][0]))return i[o][1];return n},Or.prototype.update=function(t,e,n,o,u,s,a){void 0===n&&(n=C(o));var c=u===Ee;if(n!==this.keyHash)return c?this:(r(a),r(s),Ot(this,t,e,n,[o,u]));for(var h=this.entries,f=0,p=h.length;f<p&&!A(o,h[f][0]);f++);var _=f<p;if(_?h[f][1]===u:c)return this;if(r(a),(c||!_)&&r(s),c&&2===p)return new Mr(t,this.keyHash,h[1^f]);var l=t&&t===this.ownerID,v=l?h:i(h);return _?c?f===p-1?v.pop():v[f]=v.pop():v[f]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Or(t,this.keyHash,v)};var Mr=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};Mr.prototype.get=function(t,e,r,n){return A(r,this.entry[0])?this.entry[1]:n},Mr.prototype.update=function(t,e,n,i,o,u,s){var a=o===Ee,c=A(i,this.entry[0]);return(c?o===this.entry[1]:a)?this:(r(s),a?void r(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Mr(t,this.keyHash,[i,o]):(r(u),Ot(this,t,e,C(i),[i,o])))},Sr.prototype.iterate=Or.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(t(r[e?i-n:n])===!1)return!1},Ir.prototype.iterate=br.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},
Mr.prototype.iterate=function(t,e){return t(this.entry)};var qr,Dr=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&mt(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this,e=this._type,r=this._stack;r;){var n=r.node,i=r.index++,o=void 0;if(n.entry){if(0===i)return gt(e,n.entry)}else if(n.entries){if(o=n.entries.length-1,i<=o)return gt(e,n.entries[t._reverse?o-i:i])}else if(o=n.nodes.length-1,i<=o){var u=n.nodes[t._reverse?o-i:i];if(u){if(u.entry)return gt(e,u.entry);r=t._stack=mt(u,r)}continue}r=t._stack=t._stack.__prev}return z()},e}(Ye),Er=qe/4,xr=qe/2,jr=qe/4,kr=function(t){function e(e){var r=Bt();if(null===e||void 0===e)return r;if(Tt(e))return e;var n=t(e),i=n.size;return 0===i?r:(vt(i),i>0&&i<qe?Wt(0,i,Me,null,new Ur(n.toArray())):r.withMutations(function(t){t.setSize(i),n.forEach(function(e,r){return t.set(r,e)})}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=u(this,t))>=0&&t<this.size){t+=this._origin;var r=Vt(this,t);return r&&r.array[t&De]}return e},e.prototype.set=function(t,e){return Jt(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Me,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Bt()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){Ht(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])})},e.prototype.pop=function(){return Ht(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){Ht(e,-t.length)
;for(var r=0;r<t.length;r++)e.set(r,t[r])})},e.prototype.shift=function(){return Ht(this,1)},e.prototype.merge=function(){return Yt(this,void 0,arguments)},e.prototype.mergeWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yt(this,t,e)},e.prototype.mergeDeep=function(){return Yt(this,xt,arguments)},e.prototype.mergeDeepWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yt(this,jt(t),e)},e.prototype.setSize=function(t){return Ht(this,0,t)},e.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:Ht(this,c(t,r),h(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=Ct(this,e);return new Ye(function(){var i=n();return i===Lr?z():w(t,e?--r:r++,i)})},e.prototype.__iterate=function(t,e){for(var r,n=this,i=e?this.size:0,o=Ct(this,e);(r=o())!==Lr&&t(r,e?--i:i++,n)!==!1;);return i},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Wt(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?Bt():(this.__ownerID=t,this)},e}(Ce);kr.isList=Tt;var Ar="@@__IMMUTABLE_LIST__@@",Rr=kr.prototype;Rr[Ar]=!0,Rr.delete=Rr.remove,Rr.setIn=zr.setIn,Rr.deleteIn=Rr.removeIn=zr.removeIn,Rr.update=zr.update,Rr.updateIn=zr.updateIn,Rr.mergeIn=zr.mergeIn,Rr.mergeDeepIn=zr.mergeDeepIn,Rr.withMutations=zr.withMutations,Rr.asMutable=zr.asMutable,Rr.asImmutable=zr.asImmutable,Rr.wasAltered=zr.wasAltered;var Ur=function(t,e){this.array=t,this.ownerID=e};Ur.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&De;if(n>=this.array.length)return new Ur([],t);var i,o=0===n;if(e>0){var u=this.array[n];if((i=u&&u.removeBefore(t,e-Me,r))===u&&o)return this}if(o&&!i)return this;var s=Nt(this,t);if(!o)for(var a=0;a<n;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},Ur.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&De;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n]
;return zt().withMutations(function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}})},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return St(this,t,e)},e.prototype.setIn=function(t,e){return this.updateIn(t,Ee,function(){return e})},e.prototype.remove=function(t){return St(this,t,Ee)},e.prototype.deleteIn=function(t){if(t=[].concat(_t(t)),t.length){var e=t.pop();return this.updateIn(t,function(t){return t&&t.remove(e)})}},e.prototype.deleteAll=function(t){var e=Le(t);return 0===e.size?this:this.withMutations(function(t){e.forEach(function(e){return t.remove(e)})})},e.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},e.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=At(this,_t(t),0,e,r);return n===Ee?e:n},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):zt()},e.prototype.merge=function(){return Et(this,void 0,arguments)},e.prototype.mergeWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Et(this,t,e)},e.prototype.mergeIn=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return this.updateIn(t,zt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},e.prototype.mergeDeep=function(){return Et(this,xt,arguments)},e.prototype.mergeDeepWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Et(this,kt(t),e)},e.prototype.mergeDeepIn=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return this.updateIn(t,zt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},e.prototype.sort=function(t){return Tr(nt(this,t))},e.prototype.sortBy=function(t,e){return Tr(nt(this,e,t))},
e.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},e.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},e.prototype.asImmutable=function(){return this.__ensureOwner()},e.prototype.wasAltered=function(){return this.__altered},e.prototype.__iterator=function(t,e){return new qr(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):0===this.size?zt():(this.__ownerID=t,this.__altered=!1,this)},e}(Te);mr.isMap=dt;var wr="@@__IMMUTABLE_MAP__@@",zr=mr.prototype;zr[wr]=!0,zr.delete=zr.remove,zr.removeIn=zr.deleteIn,zr.removeAll=zr.deleteAll;var Sr=function(t,e){this.ownerID=t,this.entries=e};Sr.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(A(r,i[o][0]))return i[o][1];return n},Sr.prototype.update=function(t,e,n,o,u,s,a){for(var c=u===Ee,h=this.entries,f=0,p=h.length;f<p&&!A(o,h[f][0]);f++);var _=f<p;if(_?h[f][1]===u:c)return this;if(r(a),(c||!_)&&r(s),!c||1!==h.length){if(!_&&!c&&h.length>=Er)return Mt(t,h,o,u);var l=t&&t===this.ownerID,v=l?h:i(h);return _?c?f===p-1?v.pop():v[f]=v.pop():v[f]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Sr(t,v)}};var Ir=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};Ir.prototype.get=function(t,e,r,n){void 0===e&&(e=C(r));var i=1<<((0===t?e:e>>>t)&qe),o=this.bitmap;return 0==(o&i)?n:this.nodes[Rt(o&i-1)].get(t+Me,e,r,n)},Ir.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=C(n));var s=(0===e?r:r>>>e)&qe,a=1<<s,c=this.bitmap,h=0!=(c&a);if(!h&&i===Ee)return this;var f=Rt(c&a-1),p=this.nodes,_=h?p[f]:void 0,l=It(_,t,e+Me,r,n,i,o,u);if(l===_)return this;if(!h&&l&&p.length>=xr)return qt(t,p,c,s,l);if(h&&!l&&2===p.length&&bt(p[1^f]))return p[1^f];if(h&&l&&1===p.length&&bt(l))return l
;var v=t&&t===this.ownerID,y=h?l?c:c^a:c|a,d=h?l?Ut(p,f,l,v):Lt(p,f,v):Kt(p,f,l,v);return v?(this.bitmap=y,this.nodes=d,this):new Ir(t,y,d)};var br=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};br.prototype.get=function(t,e,r,n){void 0===e&&(e=C(r));var i=(0===t?e:e>>>t)&qe,o=this.nodes[i];return o?o.get(t+Me,e,r,n):n},br.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=C(n));var s=(0===e?r:r>>>e)&qe,a=i===Ee,c=this.nodes,h=c[s];if(a&&!h)return this;var f=It(h,t,e+Me,r,n,i,o,u);if(f===h)return this;var p=this.count;if(h){if(!f&&--p<kr)return Dt(t,c,p,s)}else p++;var _=t&&t===this.ownerID,l=Ut(c,s,f,_);return _?(this.count=p,this.nodes=l,this):new br(t,p,l)};var Or=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Or.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(A(r,i[o][0]))return i[o][1];return n},Or.prototype.update=function(t,e,n,o,u,s,a){void 0===n&&(n=C(o));var c=u===Ee;if(n!==this.keyHash)return c?this:(r(a),r(s),Ot(this,t,e,n,[o,u]));for(var h=this.entries,f=0,p=h.length;f<p&&!A(o,h[f][0]);f++);var _=f<p;if(_?h[f][1]===u:c)return this;if(r(a),(c||!_)&&r(s),c&&2===p)return new Mr(t,this.keyHash,h[1^f]);var l=t&&t===this.ownerID,v=l?h:i(h);return _?c?f===p-1?v.pop():v[f]=v.pop():v[f]=[o,u]:v.push([o,u]),l?(this.entries=v,this):new Or(t,this.keyHash,v)};var Mr=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};Mr.prototype.get=function(t,e,r,n){return A(r,this.entry[0])?this.entry[1]:n},Mr.prototype.update=function(t,e,n,i,o,u,s){var a=o===Ee,c=A(i,this.entry[0]);return(c?o===this.entry[1]:a)?this:(r(s),a?void r(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new Mr(t,this.keyHash,[i,o]):(r(u),Ot(this,t,e,C(i),[i,o])))},Sr.prototype.iterate=Or.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(t(r[e?i-n:n])===!1)return!1},Ir.prototype.iterate=br.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},
Mr.prototype.iterate=function(t,e){return t(this.entry)};var Dr,qr=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&mt(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this,e=this._type,r=this._stack;r;){var n=r.node,i=r.index++,o=void 0;if(n.entry){if(0===i)return gt(e,n.entry)}else if(n.entries){if(o=n.entries.length-1,i<=o)return gt(e,n.entries[t._reverse?o-i:i])}else if(o=n.nodes.length-1,i<=o){var u=n.nodes[t._reverse?o-i:i];if(u){if(u.entry)return gt(e,u.entry);r=t._stack=mt(u,r)}continue}r=t._stack=t._stack.__prev}return z()},e}(Ye),Er=De/4,xr=De/2,kr=De/4,jr=function(t){function e(e){var r=Bt();if(null===e||void 0===e)return r;if(Tt(e))return e;var n=t(e),i=n.size;return 0===i?r:(vt(i),i>0&&i<De?Wt(0,i,Me,null,new Ur(n.toArray())):r.withMutations(function(t){t.setSize(i),n.forEach(function(e,r){return t.set(r,e)})}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=u(this,t))>=0&&t<this.size){t+=this._origin;var r=Vt(this,t);return r&&r.array[t&qe]}return e},e.prototype.set=function(t,e){return Jt(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Me,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Bt()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){Ht(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])})},e.prototype.pop=function(){return Ht(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){Ht(e,-t.length)
;for(var r=0;r<t.length;r++)e.set(r,t[r])})},e.prototype.shift=function(){return Ht(this,1)},e.prototype.merge=function(){return Yt(this,void 0,arguments)},e.prototype.mergeWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yt(this,t,e)},e.prototype.mergeDeep=function(){return Yt(this,xt,arguments)},e.prototype.mergeDeepWith=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yt(this,kt(t),e)},e.prototype.setSize=function(t){return Ht(this,0,t)},e.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:Ht(this,c(t,r),h(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=Ct(this,e);return new Ye(function(){var i=n();return i===Lr?z():w(t,e?--r:r++,i)})},e.prototype.__iterate=function(t,e){for(var r,n=this,i=e?this.size:0,o=Ct(this,e);(r=o())!==Lr&&t(r,e?--i:i++,n)!==!1;);return i},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Wt(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?Bt():(this.__ownerID=t,this)},e}(Ce);jr.isList=Tt;var Ar="@@__IMMUTABLE_LIST__@@",Rr=jr.prototype;Rr[Ar]=!0,Rr.delete=Rr.remove,Rr.setIn=zr.setIn,Rr.deleteIn=Rr.removeIn=zr.removeIn,Rr.update=zr.update,Rr.updateIn=zr.updateIn,Rr.mergeIn=zr.mergeIn,Rr.mergeDeepIn=zr.mergeDeepIn,Rr.withMutations=zr.withMutations,Rr.asMutable=zr.asMutable,Rr.asImmutable=zr.asImmutable,Rr.wasAltered=zr.wasAltered;var Ur=function(t,e){this.array=t,this.ownerID=e};Ur.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&qe;if(n>=this.array.length)return new Ur([],t);var i,o=0===n;if(e>0){var u=this.array[n];if((i=u&&u.removeBefore(t,e-Me,r))===u&&o)return this}if(o&&!i)return this;var s=Nt(this,t);if(!o)for(var a=0;a<n;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},Ur.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&qe;if(n>=this.array.length)return this;var i;if(e>0){var o=this.array[n]
;if((i=o&&o.removeAfter(t,e-Me,r))===o&&n===this.array.length-1)return this}var u=Nt(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var Kr,Lr={},Tr=function(t){function e(t){return null===t||void 0===t?Gt():Xt(t)?t:Gt().withMutations(function(e){var r=Te(t);vt(r.size),r.forEach(function(t,r){return e.set(r,t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Gt()},e.prototype.set=function(t,e){return Zt(this,t,e)},e.prototype.remove=function(t){return Zt(this,t,Ee)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Ft(e,r,t,this.__hash):0===this.size?Gt():(this.__ownerID=t,this._map=e,this._list=r,this)},e}(mr);Tr.isOrderedMap=Xt,Tr.prototype[Ue]=!0,Tr.prototype.delete=Tr.prototype.remove;var Cr,Wr=function(t){function e(t){return null===t||void 0===t?ee():$t(t)?t:ee().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this

@@ -34,8 +34,8 @@ ;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):te(e,r)},e.prototype.pushAll=function(e){if(e=t(e),0===e.size)return this;if(0===this.size&&$t(e))return e;vt(e.size);var r=this.size,n=this._head;return e.__iterate(function(t){r++,n={value:t,next:n}},!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):te(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):ee()},e.prototype.slice=function(e,r){if(a(e,r,this.size))return this;var n=c(e,this.size);if(h(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):te(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?te(this.size,this._head,t,this.__hash):0===this.size?ee():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new $e(this.toArray()).__iterate(function(e,n){return t(e,n,r)},e);for(var n=0,i=this._head;i&&t(i.value,n++,r)!==!1;)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new $e(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new Ye(function(){if(n){var e=n.value;return n=n.next,w(t,r++,e)}return z()})},e}(Ce);Wr.isStack=$t;var Br="@@__IMMUTABLE_STACK__@@",Jr=Wr.prototype;Jr[Br]=!0,Jr.withMutations=zr.withMutations,Jr.asMutable=zr.asMutable,Jr.asImmutable=zr.asImmutable,Jr.wasAltered=zr.wasAltered,Jr.shift=Jr.pop,Jr.unshift=Jr.push,Jr.unshiftAll=Jr.pushAll;var Pr,Nr=function(t){function e(e){return null===e||void 0===e?se():ie(e)&&!d(e)?e:se().withMutations(function(r){var n=t(e);vt(n.size),n.forEach(function(t){return r.add(t)})})}return t&&(e.__proto__=t),

;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},e.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?se():(this.__ownerID=t,this._map=e,this)},e}(We);Nr.isSet=ie;var Vr="@@__IMMUTABLE_SET__@@",Hr=Nr.prototype;Hr[Vr]=!0,Hr.delete=Hr.remove,Hr.mergeDeep=Hr.merge,Hr.mergeDeepWith=Hr.mergeWith,Hr.withMutations=zr.withMutations,Hr.asMutable=zr.asMutable,Hr.asImmutable=zr.asImmutable,Hr.__empty=se,Hr.__make=ue;var Yr,Qr,Xr=function(t){function e(t,r,n){if(!(this instanceof e))return new e(t,r,n);if(lt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<t&&(n=-n),this._start=t,this._end=r,this._step=n,0===(this.size=Math.max(0,Math.ceil((r-t)/n-1)+1))){if(Qr)return Qr;Qr=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,r){return a(t,r,this.size)?this:(t=c(t,this.size),r=h(r,this.size),r<=t?new e(0,0):new e(this.get(t,this._end),this.get(r,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var r=this,n=this.size,i=this._step,o=e?this._start+(n-1)*i:this._start,u=0;u!==n&&t(o,e?n-++u:u++,r)!==!1;)o+=e?-i:i;return u},e.prototype.__iterator=function(t,e){var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;return new Ye(function(){if(o===r)return z()
;var u=i;return i+=e?-n:n,w(t,e?r-++o:o++,u)})},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:re(this,t)},e}(Fe);Le.isIterable=_,Le.isKeyed=l,Le.isIndexed=v,Le.isAssociative=y,Le.isOrdered=d,Le.Iterator=Ye,ne(Le,{toArray:function(){vt(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new yr(this)},toJS:function(){return this.toSeq().map(fe).toJSON()},toKeyedSeq:function(){return new vr(this,!0)},toMap:function(){return mr(this.toKeyedSeq())},toObject:function(){vt(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return Tr(this.toKeyedSeq())},toOrderedSet:function(){return $r(l(this)?this.valueSeq():this)},toSet:function(){return Nr(l(this)?this.valueSeq():this)},toSetSeq:function(){return new dr(this)},toSeq:function(){return v(this)?this.toIndexedSeq():l(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Wr(l(this)?this.valueSeq():this)},toList:function(){return kr(l(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return st(this,$(this,t))},includes:function(t){return this.some(function(e){return A(e,t)})},entries:function(){return this.__iterator(Pe)},every:function(t,e){vt(this.size);var r=!0;return this.__iterate(function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1}),r},filter:function(t,e){return st(this,Y(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return vt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){vt(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(Be)},map:function(t,e){return st(this,V(this,t,e))},
;var u=i;return i+=e?-n:n,w(t,e?r-++o:o++,u)})},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:re(this,t)},e}(Fe);Le.isIterable=_,Le.isKeyed=l,Le.isIndexed=v,Le.isAssociative=y,Le.isOrdered=d,Le.Iterator=Ye,ne(Le,{toArray:function(){vt(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new yr(this)},toJS:function(){return this.toSeq().map(fe).toJSON()},toKeyedSeq:function(){return new vr(this,!0)},toMap:function(){return mr(this.toKeyedSeq())},toObject:function(){vt(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return Tr(this.toKeyedSeq())},toOrderedSet:function(){return $r(l(this)?this.valueSeq():this)},toSet:function(){return Nr(l(this)?this.valueSeq():this)},toSetSeq:function(){return new dr(this)},toSeq:function(){return v(this)?this.toIndexedSeq():l(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Wr(l(this)?this.valueSeq():this)},toList:function(){return jr(l(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return st(this,$(this,t))},includes:function(t){return this.some(function(e){return A(e,t)})},entries:function(){return this.__iterator(Pe)},every:function(t,e){vt(this.size);var r=!0;return this.__iterate(function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1}),r},filter:function(t,e){return st(this,Y(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return vt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){vt(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(Be)},map:function(t,e){return st(this,V(this,t,e))},
reduce:function(t,e,r){return ae(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return ae(this,t,e,r,arguments.length<2,!0)},reverse:function(){return st(this,H(this,!0))},slice:function(t,e){return st(this,F(this,t,e,!0))},some:function(t,e){return!this.every(pe(t),e)},sort:function(t){return st(this,nt(this,t))},values:function(){return this.__iterator(Je)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return o(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return Q(this,t,e)},equals:function(t){return re(this,t)},entrySeq:function(){var t=this;if(t._cache)return new $e(t._cache);var e=t.toSeq().map(he).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e.toJS=function(){return this.map(function(t){return[fe(t[0]),fe(t[1])]}).toJSON()},e},filterNot:function(t,e){return this.filter(pe(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate(function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1}),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(s)},flatMap:function(t,e){return st(this,et(this,t,e))},flatten:function(t){return st(this,tt(this,t,!0))},fromEntrySeq:function(){return new gr(this)},get:function(t,e){return this.find(function(e,r){return A(r,t)},void 0,e)},getIn:function(t,e){for(var r=this,n=_t(t),i=0;i!==n.length;){if(!r||!r.get)throw new TypeError("Invalid keyPath: Value at ["+n.slice(0,i).map(yt)+"] does not have a .get() method: "+r);if((r=r.get(n[i++],Ee))===Ee)return e}return r},groupBy:function(t,e){return X(this,t,e)},has:function(t){return this.get(t,Ee)!==Ee},hasIn:function(t){return this.getIn(t,Ee)!==Ee},isSubset:function(t){
return t="function"==typeof t.includes?t:Le(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:Le(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return A(e,t)})},keySeq:function(){return this.toSeq().map(ce).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return it(this,t)},maxBy:function(t,e){return it(this,e,t)},min:function(t){return it(this,t?_e(t):ve)},minBy:function(t,e){return it(this,e?_e(e):ve,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return st(this,Z(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(pe(t),e)},sortBy:function(t,e){return st(this,nt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return st(this,G(this,t,e))},takeUntil:function(t,e){return this.takeWhile(pe(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ye(this))}});var Fr=Le.prototype;Fr[ke]=!0,Fr[He]=Fr.values,Fr.toJSON=Fr.toArray,Fr.__toStringMapper=yt,Fr.inspect=Fr.toSource=function(){return""+this},Fr.chain=Fr.flatMap,Fr.contains=Fr.includes,ne(Te,{flip:function(){return st(this,N(this))},mapEntries:function(t,e){var r=this,n=0;return st(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return st(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var Gr=Te.prototype;Gr[Ae]=!0,Gr[He]=Fr.entries,Gr.toJSON=Fr.toObject,Gr.__toStringMapper=function(t,e){return yt(e)+": "+yt(t)},ne(Ce,{toKeyedSeq:function(){return new vr(this,!1)},filter:function(t,e){return st(this,Y(this,t,e,!1))},
return t="function"==typeof t.includes?t:Le(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:Le(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return A(e,t)})},keySeq:function(){return this.toSeq().map(ce).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return it(this,t)},maxBy:function(t,e){return it(this,e,t)},min:function(t){return it(this,t?_e(t):ve)},minBy:function(t,e){return it(this,e?_e(e):ve,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return st(this,Z(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(pe(t),e)},sortBy:function(t,e){return st(this,nt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return st(this,G(this,t,e))},takeUntil:function(t,e){return this.takeWhile(pe(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ye(this))}});var Fr=Le.prototype;Fr[je]=!0,Fr[He]=Fr.values,Fr.toJSON=Fr.toArray,Fr.__toStringMapper=yt,Fr.inspect=Fr.toSource=function(){return""+this},Fr.chain=Fr.flatMap,Fr.contains=Fr.includes,ne(Te,{flip:function(){return st(this,N(this))},mapEntries:function(t,e){var r=this,n=0;return st(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return st(this,this.toSeq().flip().map(function(n,i){return t.call(e,n,i,r)}).flip())}});var Gr=Te.prototype;Gr[Ae]=!0,Gr[He]=Fr.entries,Gr.toJSON=Fr.toObject,Gr.__toStringMapper=function(t,e){return yt(e)+": "+yt(t)},ne(Ce,{toKeyedSeq:function(){return new vr(this,!1)},filter:function(t,e){return st(this,Y(this,t,e,!1))},
findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return st(this,H(this,!1))},slice:function(t,e){return st(this,F(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=c(t,t<0?this.count():this.size);var n=this.slice(0,t);return st(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(t){return st(this,tt(this,t,!1))},get:function(t,e){return t=u(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return(t=u(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return st(this,rt(this,t))},interleave:function(){var t=[this].concat(i(arguments)),e=ut(this.toSeq(),Fe.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),st(this,r)},keySeq:function(){return Xr(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return st(this,Z(this,t,e,!1))},zip:function(){return st(this,ut(this,le,[this].concat(i(arguments))))},zipWith:function(t){var e=i(arguments);return e[0]=this,st(this,ut(this,t,e))}});var Zr=Ce.prototype;Zr[Re]=!0,Zr[Ue]=!0,ne(We,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),We.prototype.has=Fr.includes,We.prototype.contains=We.prototype.includes,ne(Xe,Te.prototype),ne(Fe,Ce.prototype),ne(Ge,We.prototype);var $r=function(t){function e(t){return null===t||void 0===t?ze():me(t)?t:ze().withMutations(function(e){var r=We(t);vt(r.size),r.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},
e.fromKeys=function(t){return this(Te(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Nr);$r.isOrderedSet=me;var tn=$r.prototype;tn[Ue]=!0,tn.zip=Zr.zip,tn.zipWith=Zr.zipWith,tn.__empty=ze,tn.__make=we;var en,rn=function(t,e){var r,n=function(o){var u=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),a=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c<s.length;c++){var h=s[c];a[h]=c,i[h]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+Ie(u)+' with property "'+h+'" since that property name is part of the Record API.'):Oe(i,h)}}this.__ownerID=void 0,this._values=kr().withMutations(function(t){t.setSize(u._keys.length),Te(o).forEach(function(e,r){t.set(u._indices[r],e===u._defaultValues[r]?void 0:e)})})},i=n.prototype=Object.create(nn);return i.constructor=n,n};rn.prototype.toString=function(){for(var t,e=this,r=Ie(this)+" { ",n=this._keys,i=0,o=n.length;i!==o;i++)t=n[i],r+=(i?", ":"")+t+": "+yt(e.get(t));return r+" }"},rn.prototype.equals=function(t){return this===t||this._keys===t._keys&&this._values.equals(t._values)},rn.prototype.hashCode=function(){return this._values.hashCode()},rn.prototype.has=function(t){return this._indices.hasOwnProperty(t)},rn.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},rn.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return Se(this,r)}return this},rn.prototype.wasAltered=function(){return this._values.wasAltered()},rn.prototype.toSeq=function(){return be(this)},rn.prototype.toJS=function(){return be(this).toJS()},rn.prototype.__iterator=function(t,e){return be(this).__iterator(t,e)},rn.prototype.__iterate=function(t,e){return be(this).__iterate(t,e)},rn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this
;var e=this._values.__ensureOwner(t);return t?Se(this,e,t):(this.__ownerID=t,this._values=e,this)},rn.isRecord=g,rn.getDescriptiveName=Ie;var nn=rn.prototype;nn[Ke]=!0,nn.getIn=Fr.getIn,nn.hasIn=Fr.hasIn,nn.merge=zr.merge,nn.mergeWith=zr.mergeWith,nn.mergeIn=zr.mergeIn,nn.mergeDeep=zr.mergeDeep,nn.mergeDeepWith=zr.mergeDeepWith,nn.mergeDeepIn=zr.mergeDeepIn,nn.setIn=zr.setIn,nn.update=zr.update,nn.updateIn=zr.updateIn,nn.withMutations=zr.withMutations,nn.asMutable=zr.asMutable,nn.asImmutable=zr.asImmutable,nn[He]=Fr.entries,nn.toJSON=nn.toObject=Fr.toObject,nn.inspect=nn.toSource=Fr.toSource;var on,un=function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,0===(this.size=void 0===r?1/0:Math.max(0,r))){if(on)return on;on=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return A(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return a(t,r,n)?this:new e(this._value,h(r,n)-c(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return A(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return A(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this,n=this.size,i=0;i!==n&&t(r._value,e?n-++i:i++,r)!==!1;);return i},e.prototype.__iterator=function(t,e){var r=this,n=this.size,i=0;return new Ye(function(){return i===n?z():w(t,e?n-++i:i++,r._value)})},e.prototype.equals=function(t){return t instanceof e?A(this._value,t._value):re(t)},e}(Fe),sn={Collection:Le,Iterable:Le,Seq:Qe,Map:mr,OrderedMap:Tr,List:kr,Stack:Wr,Set:Nr,OrderedSet:$r,Record:rn,Range:Xr,Repeat:un,is:A,fromJS:R,hash:C,isImmutable:p,isCollection:_,isKeyed:l,isIndexed:v,isAssociative:y,isOrdered:d,isValueObject:m},an=Le;t.default=sn,t.Collection=Le,t.Iterable=an,t.Seq=Qe,t.Map=mr,
t.OrderedMap=Tr,t.List=kr,t.Stack=Wr,t.Set=Nr,t.OrderedSet=$r,t.Record=rn,t.Range=Xr,t.Repeat=un,t.is=A,t.fromJS=R,t.hash=C,t.isImmutable=p,t.isCollection=_,t.isKeyed=l,t.isIndexed=v,t.isAssociative=y,t.isOrdered=d,t.isValueObject=m,Object.defineProperty(t,"__esModule",{value:!0})});
e.fromKeys=function(t){return this(Te(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Nr);$r.isOrderedSet=me;var tn=$r.prototype;tn[Ue]=!0,tn.zip=Zr.zip,tn.zipWith=Zr.zipWith,tn.__empty=ze,tn.__make=we;var en,rn=function(t,e){var r,n=function(o){var u=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),a=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c<s.length;c++){var h=s[c];a[h]=c,i[h]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+Ie(u)+' with property "'+h+'" since that property name is part of the Record API.'):Oe(i,h)}}this.__ownerID=void 0,this._values=jr().withMutations(function(t){t.setSize(u._keys.length),Te(o).forEach(function(e,r){t.set(u._indices[r],e===u._defaultValues[r]?void 0:e)})})},i=n.prototype=Object.create(nn);return i.constructor=n,n};rn.prototype.toString=function(){for(var t,e=this,r=Ie(this)+" { ",n=this._keys,i=0,o=n.length;i!==o;i++)t=n[i],r+=(i?", ":"")+t+": "+yt(e.get(t));return r+" }"},rn.prototype.equals=function(t){return this===t||this._keys===t._keys&&be(this).equals(be(t))},rn.prototype.hashCode=function(){return be(this).hashCode()},rn.prototype.has=function(t){return this._indices.hasOwnProperty(t)},rn.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},rn.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return Se(this,r)}return this},rn.prototype.remove=function(t){return this.set(t)},rn.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Se(this,t)},rn.prototype.wasAltered=function(){return this._values.wasAltered()},rn.prototype.toSeq=function(){return be(this)},rn.prototype.toJS=function(){return be(this).toJS()},rn.prototype.__iterator=function(t,e){return be(this).__iterator(t,e)},
rn.prototype.__iterate=function(t,e){return be(this).__iterate(t,e)},rn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?Se(this,e,t):(this.__ownerID=t,this._values=e,this)},rn.isRecord=g,rn.getDescriptiveName=Ie;var nn=rn.prototype;nn[Ke]=!0,nn.delete=nn.remove,nn.getIn=Fr.getIn,nn.hasIn=Fr.hasIn,nn.merge=zr.merge,nn.mergeWith=zr.mergeWith,nn.mergeIn=zr.mergeIn,nn.mergeDeep=zr.mergeDeep,nn.mergeDeepWith=zr.mergeDeepWith,nn.mergeDeepIn=zr.mergeDeepIn,nn.setIn=zr.setIn,nn.update=zr.update,nn.updateIn=zr.updateIn,nn.withMutations=zr.withMutations,nn.asMutable=zr.asMutable,nn.asImmutable=zr.asImmutable,nn[He]=Fr.entries,nn.toJSON=nn.toObject=Fr.toObject,nn.inspect=nn.toSource=Fr.toSource;var on,un=function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,0===(this.size=void 0===r?1/0:Math.max(0,r))){if(on)return on;on=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return A(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return a(t,r,n)?this:new e(this._value,h(r,n)-c(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return A(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return A(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this,n=this.size,i=0;i!==n&&t(r._value,e?n-++i:i++,r)!==!1;);return i},e.prototype.__iterator=function(t,e){var r=this,n=this.size,i=0;return new Ye(function(){return i===n?z():w(t,e?n-++i:i++,r._value)})},e.prototype.equals=function(t){return t instanceof e?A(this._value,t._value):re(t)},e}(Fe),sn={Collection:Le,Iterable:Le,Seq:Qe,Map:mr,OrderedMap:Tr,List:jr,Stack:Wr,Set:Nr,OrderedSet:$r,Record:rn,Range:Xr,Repeat:un,is:A,fromJS:R,hash:C,isImmutable:p,
isCollection:_,isKeyed:l,isIndexed:v,isAssociative:y,isOrdered:d,isValueObject:m},an=Le;t.default=sn,t.Collection=Le,t.Iterable=an,t.Seq=Qe,t.Map=mr,t.OrderedMap=Tr,t.List=jr,t.Stack=Wr,t.Set=Nr,t.OrderedSet=$r,t.Record=rn,t.Range=Xr,t.Repeat=un,t.is=A,t.fromJS=R,t.hash=C,t.isImmutable=p,t.isCollection=_,t.isKeyed=l,t.isIndexed=v,t.isAssociative=y,t.isOrdered=d,t.isValueObject=m,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "immutable",
"version": "4.0.0-rc.1",
"version": "4.0.0-rc.2",
"description": "Immutable Data Collections",

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

@@ -19,3 +19,3 @@ Immutable collections for JavaScript

`Immutable` also provides a lazy `Seq`, allowing efficient
Immutable.js also provides a lazy `Seq`, allowing efficient
chaining of collection methods like `map` and `filter` without creating

@@ -45,8 +45,8 @@ intermediate representations. Create some `Seq` with `Range` and `Repeat`.

```javascript
var Immutable = require('immutable');
var map1 = Immutable.Map({a:1, b:2, c:3});
var map2 = map1.set('b', 50);
map1.get('b'); // 2
map2.get('b'); // 50
```js
const { Map } = require('immutable')
const map1 = Map({ a: 1, b: 2, c: 3 })
const map2 = map1.set('b', 50)
map1.get('b') // 2
map2.get('b') // 50
```

@@ -56,3 +56,3 @@

To use `immutable` from a browser, download [dist/immutable.min.js](https://github.com/facebook/immutable-js/blob/master/dist/immutable.min.js)
To use Immutable.js from a browser, download [dist/immutable.min.js](https://github.com/facebook/immutable-js/blob/master/dist/immutable.min.js)
or use a CDN such as [CDNJS](https://cdnjs.com/libraries/immutable)

@@ -75,3 +75,3 @@ or [jsDelivr](http://www.jsdelivr.com/#!immutable.js).

```javascript
```js
require(['./immutable.min.js'], function (Immutable) {

@@ -85,15 +85,37 @@ var map1 = Immutable.Map({a:1, b:2, c:3});

If you're using [browserify](http://browserify.org/), the `immutable` npm module
also works from the browser.
If you're using [webpack](https://webpack.github.io/) or
[browserify](http://browserify.org/), the `immutable` npm module also works
from the browser.
### TypeScript
### Flow & TypeScript
Use these Immutable collections and sequences as you would use native
collections in your [TypeScript](http://typescriptlang.org) programs while still taking
collections in your [Flowtype](https://flowtype.org/) or [TypeScript](http://typescriptlang.org) programs while still taking
advantage of type generics, error detection, and auto-complete in your IDE.
Just add a reference with a relative path to the type declarations at the top
of your file.
Installing `immutable` via npm brings with it type definitions for Flow (v0.39.0 or higher)
and TypeScript (v2.1.0 or higher), so you shouldn't need to do anything at all!
```javascript
#### Using TypeScript with Immutable.js v4
Immutable.js type definitions embrace ES2015. While Immutable.js itself supports
legacy browsers and environments, its type definitions require TypeScript's 2015
lib. Include either `"target": "es2015"` or `"lib": "es2015"` in your
`tsconfig.json`, or provide `--target es2015` or `--lib es2015` to the
`tsc` command.
```js
import { Map } from "immutable";
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = map1.set('b', 50);
map1.get('b'); // 2
map2.get('b'); // 50
```
#### Using TypeScript with Immutable.js v3 and earlier:
Previous versions of Immutable.js include a reference file which you can include
via relative path to the type definitions at the top of your file.
```js
///<reference path='./node_modules/immutable/dist/immutable.d.ts'/>

@@ -137,11 +159,12 @@ import Immutable = require('immutable');

```javascript
var map1 = Immutable.Map({a:1, b:2, c:3});
var map2 = map1.set('b', 2);
assert(map1.equals(map2) === true);
var map3 = map1.set('b', 50);
assert(map1.equals(map3) === false);
```js
const { Map } = require('immutable')
const map1 = Map( {a: 1, b: 2, c: 3 })
const map2 = map1.set('b', 2)
assert(map1.equals(map2) === true)
const map3 = map1.set('b', 50)
assert(map1.equals(map3) === false)
```
Note: As a performance optimization `Immutable` attempts to return the existing
Note: As a performance optimization Immutable.js attempts to return the existing
collection when an operation would result in an identical collection, allowing

@@ -159,5 +182,6 @@ for using `===` reference equality to determine if something definitely has not

```javascript
var map1 = Immutable.Map({a:1, b:2, c:3});
var clone = map1;
```js
const { Map } = require('immutable')
const map1 = Map({ a: 1, b: 2, c: 3 })
const clone = map1;
```

@@ -172,8 +196,8 @@

While `immutable` is inspired by Clojure, Scala, Haskell and other functional
While Immutable.js is inspired by Clojure, Scala, Haskell and other functional
programming environments, it's designed to bring these powerful concepts to
JavaScript, and therefore has an Object-Oriented API that closely mirrors that
of [ES6][] [Array][], [Map][], and [Set][].
of [ES2015][] [Array][], [Map][], and [Set][].
[ES6]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla
[ES2015]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla
[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array

@@ -188,7 +212,8 @@ [Map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map

```javascript
var list1 = Immutable.List.of(1, 2);
var list2 = list1.push(3, 4, 5);
var list3 = list2.unshift(0);
var list4 = list1.concat(list2, list3);
```js
const { List } = require('immutable')
const list1 = List([ 1, 2 ]);
const list2 = list1.push(3, 4, 5);
const list3 = list2.unshift(0);
const list4 = list1.concat(list2, list3);
assert(list1.size === 2);

@@ -206,4 +231,5 @@ assert(list2.size === 5);

```javascript
var alpha = Immutable.Map({a:1, b:2, c:3, d:4});
```js
const { Map } = require('immutable')
const alpha = Map({ a: 1, b: 2, c: 3, d: 4 });
alpha.map((v, k) => k.toUpperCase()).join();

@@ -215,16 +241,17 @@ // 'A,B,C,D'

Designed to inter-operate with your existing JavaScript, `immutable`
Designed to inter-operate with your existing JavaScript, Immutable.js
accepts plain JavaScript Arrays and Objects anywhere a method expects an
`Iterable` with no performance penalty.
`Collection`.
```javascript
var map1 = Immutable.Map({a:1, b:2, c:3, d:4});
var map2 = Immutable.Map({c:10, a:20, t:30});
var obj = {d:100, o:200, g:300};
var map3 = map1.merge(map2, obj);
```js
const { Map } = require('immutable')
const map1 = Map({ a: 1, b: 2, c: 3, d: 4 })
const map2 = Map({ c: 10, a: 20, t: 30 })
const obj = { d: 100, o: 200, g: 300 }
const map3 = map1.merge(map2, obj);
// Map { a: 20, b: 2, c: 10, d: 100, t: 30, o: 200, g: 300 }
```
This is possible because `immutable` can treat any JavaScript Array or Object
as an Iterable. You can take advantage of this in order to get sophisticated
This is possible because Immutable.js can treat any JavaScript Array or Object
as a Collection. You can take advantage of this in order to get sophisticated
collection methods on JavaScript Objects, which otherwise have a very sparse

@@ -234,5 +261,6 @@ native API. Because Seq evaluates lazily and does not cache intermediate

```javascript
var myObject = {a:1,b:2,c:3};
Immutable.Seq(myObject).map(x => x * x).toObject();
```js
const { Seq } = require('immutable')
const myObject = { a: 1, b: 2, c: 3 }
Seq(myObject).map(x => x * x).toObject();
// { a: 1, b: 4, c: 9 }

@@ -246,10 +274,12 @@ ```

```js
var obj = { 1: "one" };
Object.keys(obj); // [ "1" ]
obj["1"]; // "one"
obj[1]; // "one"
const { fromJS } = require('immutable')
var map = Immutable.fromJS(obj);
map.get("1"); // "one"
map.get(1); // undefined
const obj = { 1: "one" }
Object.keys(obj) // [ "1" ]
obj["1"] // "one"
obj[1] // "one"
const map = fromJS(obj)
map.get("1") // "one"
map.get(1) // undefined
```

@@ -264,9 +294,10 @@

All `immutable` Iterables can be converted to plain JavaScript Arrays and
All Immutable.js Collections can be converted to plain JavaScript Arrays and
Objects shallowly with `toArray()` and `toObject()` or deeply with `toJS()`.
All Immutable Iterables also implement `toJSON()` allowing them to be passed to
`JSON.stringify` directly.
All Immutable Collections also implement `toJSON()` allowing them to be passed
to `JSON.stringify` directly.
```javascript
var deep = Immutable.Map({ a: 1, b: 2, c: Immutable.List.of(3, 4, 5) });
```js
const { Map, List } = require('immutable')
const deep = Map({ a: 1, b: 2, c: List([ 3, 4, 5 ]) })
deep.toObject() // { a: 1, b: 2, c: List [ 3, 4, 5 ] }

@@ -278,18 +309,18 @@ deep.toArray() // [ 1, 2, List [ 3, 4, 5 ] ]

### Embraces ES6
### Embraces ES2015
`Immutable` takes advantage of features added to JavaScript in [ES6][],
the latest standard version of ECMAScript (JavaScript), including [Iterators][],
[Arrow Functions][], [Classes][], and [Modules][]. It's also inspired by the
[Map][] and [Set][] collections added to ES6. The library is "transpiled" to ES3
in order to support all modern browsers.
Immutable.js supports all JavaScript environments, including legacy
browsers (even IE8). However it also takes advantage of features added to
JavaScript in [ES2015][], the latest standard version of JavaScript, including
[Iterators][], [Arrow Functions][], [Classes][], and [Modules][]. It's inspired
by the native [Map][] and [Set][] collections added to ES2015.
All examples are presented in ES6. To run in all browsers, they need to be
translated to ES3.
All examples in the Documentation are presented in ES2015. To run in all
browsers, they need to be translated to ES3.
```js
// ES6
foo.map(x => x * x);
// ES2015
const mapped = foo.map(x => x * x);
// ES3
foo.map(function (x) { return x * x; });
var mapped = foo.map(function (x) { return x * x; });
```

@@ -306,7 +337,8 @@

The collections in `immutable` are intended to be nested, allowing for deep
The collections in Immutable.js are intended to be nested, allowing for deep
trees of data, similar to JSON.
```javascript
var nested = Immutable.fromJS({a:{b:{c:[3,4,5]}}});
```js
const { fromJS } = require('immutable')
const nested = fromJS({ a: { b: { c: [ 3, 4, 5 ] } } })
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ] } } }

@@ -319,12 +351,12 @@ ```

```javascript
var nested2 = nested.mergeDeep({a:{b:{d:6}}});
```js
const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } })
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 6 } } }
nested2.getIn(['a', 'b', 'd']); // 6
nested2.getIn([ 'a', 'b', 'd' ]) // 6
var nested3 = nested2.updateIn(['a', 'b', 'd'], value => value + 1);
const nested3 = nested2.updateIn([ 'a', 'b', 'd' ], value => value + 1)
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 7 } } }
var nested4 = nested3.updateIn(['a', 'b', 'c'], list => list.push(6));
const nested4 = nested3.updateIn([ 'a', 'b', 'c' ], list => list.push(6))
// Map { a: Map { b: Map { c: List [ 3, 4, 5, 6 ], d: 7 } } }

@@ -338,3 +370,3 @@ ```

`Seq` describes a lazy operation, allowing them to efficiently chain
use of all the Iterable methods (such as `map` and `filter`).
use of all the sequence methods (such as `map` and `filter`).

@@ -351,4 +383,8 @@ **Seq is immutable** — Once a Seq is created, it cannot be

var oddSquares = Immutable.Seq.of(1,2,3,4,5,6,7,8)
.filter(x => x % 2).map(x => x * x);
```js
const { Seq } = require('immutable')
const oddSquares = Seq([ 1, 2, 3, 4, 5, 6, 7, 8 ])
.filter(x => x % 2)
.map(x => x * x)
```

@@ -359,7 +395,12 @@ Once the Seq is used, it performs only the work necessary. In this

console.log(oddSquares.get(1)); // 9
```js
console.log(oddSquares.get(1)); // 9
```
Any collection can be converted to a lazy Seq with `.toSeq()`.
var seq = Immutable.Map({a:1, b:1, c:1}).toSeq();
```js
const { Map } = require('immutable')
const seq = Map({ a: 1, b: 2, c: 3 }).toSeq()
```

@@ -369,16 +410,21 @@ Seq allows for the efficient chaining of sequence operations, especially when

seq.flip().map(key => key.toUpperCase()).flip().toObject();
// { A: 1, B: 1, C: 1 }
```js
seq.flip().map(key => key.toUpperCase()).flip().toObject();
// { A: 1, B: 1, C: 1 }
```
As well as expressing logic that would otherwise seem memory-limited:
Immutable.Range(1, Infinity)
.skip(1000)
.map(n => -n)
.filter(n => n % 2 === 0)
.take(2)
.reduce((r, n) => r * n, 1);
// 1006008
```js
const { Range } = require('immutable')
Range(1, Infinity)
.skip(1000)
.map(n => -n)
.filter(n => n % 2 === 0)
.take(2)
.reduce((r, n) => r * n, 1);
// 1006008
```
Note: An iterable is always iterated in the same order, however that order may
Note: A Collection is always iterated in the same order, however that order may
not always be well defined, as is the case for the `Map`.

@@ -390,11 +436,12 @@

`Immutable` provides equality which treats immutable data structures as pure
Immutable.js provides equality which treats immutable data structures as pure
data, performing a deep equality check if necessary.
```javascript
var map1 = Immutable.Map({a:1, b:1, c:1});
var map2 = Immutable.Map({a:1, b:1, c:1});
assert(map1 !== map2); // two different instances
assert(Immutable.is(map1, map2)); // have equivalent values
assert(map1.equals(map2)); // alternatively use the equals method
```js
const { Map, is } = require('immutable')
const map1 = Map({ a: 1, b: 2, c: 3 })
const map2 = Map({ a: 1, b: 2, c: 3 })
assert(map1 !== map2) // two different instances
assert(is(map1, map2)) // have equivalent values
assert(map1.equals(map2)) // alternatively use the equals method
```

@@ -421,6 +468,6 @@

which can add up to a minor performance penalty. If you need to apply a series
of mutations locally before returning, `Immutable` gives you the ability to
of mutations locally before returning, Immutable.js gives you the ability to
create a temporary mutable (transient) copy of a collection and apply a batch of
mutations in a performant manner by using `withMutations`. In fact, this is
exactly how `Immutable` applies complex mutations itself.
exactly how Immutable.js applies complex mutations itself.

@@ -430,5 +477,6 @@ As an example, building `list2` results in the creation of 1, not 3, new

```javascript
var list1 = Immutable.List.of(1,2,3);
var list2 = list1.withMutations(function (list) {
```js
const { List } = require('immutable')
const list1 = List([ 1, 2, 3 ]);
const list2 = list1.withMutations(function (list) {
list.push(4).push(5).push(6);

@@ -440,3 +488,3 @@ });

Note: `immutable` also provides `asMutable` and `asImmutable`, but only
Note: Immutable.js also provides `asMutable` and `asImmutable`, but only
encourages their use when `withMutations` will not suffice. Use caution to not

@@ -467,3 +515,3 @@ return a mutable copy, which could result in undesired behavior.

If you are using the [Chai Assertion Library](http://chaijs.com/), [Chai Immutable](https://github.com/astorije/chai-immutable) provides a set of assertions to use against `Immutable` collections.
If you are using the [Chai Assertion Library](http://chaijs.com/), [Chai Immutable](https://github.com/astorije/chai-immutable) provides a set of assertions to use against Immutable.js collections.

@@ -498,2 +546,2 @@

`Immutable` is [BSD-licensed](https://github.com/facebook/immutable-js/blob/master/LICENSE). We also provide an additional [patent grant](https://github.com/facebook/immutable-js/blob/master/PATENTS).
Immutable.js is [BSD-licensed](https://github.com/facebook/immutable-js/blob/master/LICENSE). We also provide an additional [patent grant](https://github.com/facebook/immutable-js/blob/master/PATENTS).

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

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

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

Sorry, the diff of this file is not supported yet

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