Socket
Socket
Sign inDemoInstall

immutable

Package Overview
Dependencies
0
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0-rc.9 to 4.0.0-rc.10

2

contrib/cursor/index.d.ts

@@ -17,3 +17,3 @@ /**

*
* This is particularly useful when used in conjuction with component-based UI
* This is particularly useful when used in conjunction with component-based UI
* libraries like [React](http://facebook.github.io/react/) or to simulate

@@ -20,0 +20,0 @@ * "state" throughout an application while maintaining a single flow of logic.

@@ -20,3 +20,3 @@ # DEPRECATED

This is particularly useful when used in conjuction with component-based UI
This is particularly useful when used in conjunction with component-based UI
libraries like [React](https://facebook.github.io/react/) or to simulate

@@ -23,0 +23,0 @@ "state" throughout an application while maintaining a single flow of logic.

@@ -7,33 +7,33 @@ /**

*/
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(t.Immutable={})}(this,function(t){"use strict";function r(t){return t.value=!1,t}function e(t){t&&(t.value=!0)}function n(){}function i(t){return void 0===t.size&&(t.size=t.__iterate(u)),t.size}function o(t,r){if("number"!=typeof r){var e=r>>>0;if(""+e!==r||4294967295===e)return NaN;r=e}return r<0?i(t)+r:r}function u(){return!0}function s(t,r,e){return(0===t&&!h(t)||void 0!==e&&t<=-e)&&(void 0===r||void 0!==e&&r>=e)}function a(t,r){return f(t,r,0)}function c(t,r){return f(t,r,r)}function f(t,r,e){return void 0===t?e:h(t)?r===1/0?r:0|Math.max(0,r+t):void 0===r||r===t?t:0|Math.min(r,t)}function h(t){return t<0||0===t&&1/t==-(1/0)}function p(t){return _(t)||g(t)}function _(t){return!(!t||!t[he])}function l(t){return!(!t||!t[pe])}function v(t){return!(!t||!t[_e])}function y(t){return l(t)||v(t)}function d(t){return!(!t||!t[le])}function g(t){return!(!t||!t[ve])}function m(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function w(t,r,e,n){var i=0===t?r:1===t?e:[r,e];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 r=O(t);return r&&r.call(t)}function O(t){var r=t&&(Ie&&t[Ie]||t[be]);if("function"==typeof r)return r}function E(t){return t&&"number"==typeof t.length}function q(t){return!(!t||!t[je])}function M(){return Ue||(Ue=new ke([]))}function D(t){var r=Array.isArray(t)?new ke(t):I(t)?new Ce(t):S(t)?new Te(t):void 0;if(r)return r.fromEntrySeq();if("object"==typeof t)return new Re(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function x(t){var r=j(t);if(r)return r;throw new TypeError("Expected Array or collection object of values: "+t)}function A(t){var r=j(t);if(r)return r;if("object"==typeof t)return new Re(t)
;throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function j(t){return E(t)?new ke(t):I(t)?new Ce(t):S(t)?new Te(t):void 0}function k(t,r){if(t===r||t!==t&&r!==r)return!0;if(!t||!r)return!1;if("function"==typeof t.valueOf&&"function"==typeof r.valueOf){if(t=t.valueOf(),r=r.valueOf(),t===r||t!==t&&r!==r)return!0;if(!t||!r)return!1}return!!(m(t)&&m(r)&&t.equals(r))}function R(t){return t>>>1&1073741824|3221225471&t}function U(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 r=typeof t;if("number"===r){if(t!==t||t===1/0)return 0;var e=0|t;for(e!==t&&(e^=4294967295*t);t>4294967295;)t/=4294967295,e^=t;return R(e)}if("string"===r)return t.length>He?K(t):T(t);if("function"==typeof t.hashCode)return R(t.hashCode());if("object"===r)return C(t);if("function"==typeof t.toString)return T(""+t);throw Error("Value type "+r+" cannot be hashed.")}function K(t){var r=Qe[t];return void 0===r&&(r=T(t),Ye===Ve&&(Ye=0,Qe={}),Ye++,Qe[t]=r),r}function T(t){for(var r=0,e=0;e<t.length;e++)r=31*r+t.charCodeAt(e)|0;return R(r)}function C(t){var r;if(Ne&&void 0!==(r=Ke.get(t)))return r;if(void 0!==(r=t[Je]))return r;if(!We){if(void 0!==(r=t.propertyIsEnumerable&&t.propertyIsEnumerable[Je]))return r;if(void 0!==(r=L(t)))return r}if(r=++Pe,1073741824&Pe&&(Pe=0),Ne)Ke.set(t,r);else{if(void 0!==Be&&Be(t)===!1)throw Error("Non-extensible objects are not allowed as keys.");if(We)Object.defineProperty(t,Je,{enumerable:!1,configurable:!1,writable:!1,value:r});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[Je]=r;else{if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Je]=r}}return r}function L(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:
return t.documentElement&&t.documentElement.uniqueID}}function B(t){var r=ut(t);return r._iter=t,r.size=t.size,r.flip=function(){return t},r.reverse=function(){var r=t.reverse.apply(this);return r.flip=function(){return t.reverse()},r},r.has=function(r){return t.includes(r)},r.includes=function(r){return t.has(r)},r.cacheResult=st,r.__iterateUncached=function(r,e){var n=this;return t.__iterate(function(t,e){return r(e,t,n)!==!1},e)},r.__iteratorUncached=function(r,e){if(r===Se){var n=t.__iterator(r,e);return new Ee(function(){var t=n.next();if(!t.done){var r=t.value[0];t.value[0]=t.value[1],t.value[1]=r}return t})}return t.__iterator(r===ze?we:ze,e)},r}function W(t,r,e){var n=ut(t);return n.size=t.size,n.has=function(r){return t.has(r)},n.get=function(n,i){var o=t.get(n,ae);return o===ae?i:r.call(e,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(r.call(e,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(Se,i);return new Ee(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return w(n,s,r.call(e,u[1],s,t),i)})},n}function N(t,r){var e=this,n=ut(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var r=B(t);return r.reverse=function(){return t.flip()},r}),n.get=function(e,n){return t.get(r?e:-1-e,n)},n.has=function(e){return t.has(r?e:-1-e)},n.includes=function(r){return t.includes(r)},n.cacheResult=st,n.__iterate=function(e,n){var o=this,u=0;return n&&i(t),t.__iterate(function(t,i){return e(t,r?i:n?o.size-++u:u++,o)},!n)},n.__iterator=function(n,o){var u=0;o&&i(t);var s=t.__iterator(Se,!o);return new Ee(function(){var t=s.next();if(t.done)return t;var i=t.value;return w(n,r?i[0]:o?e.size-++u:u++,i[1],t)})},n}function P(t,r,e,n){var i=ut(t);return n&&(i.has=function(n){var i=t.get(n,ae);return i!==ae&&!!r.call(e,i,n,t)},i.get=function(n,i){var o=t.get(n,ae);return o!==ae&&r.call(e,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){
if(r.call(e,t,o,a))return s++,i(t,n?o:s-1,u)},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(Se,o),s=0;return new Ee(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,c=a[0],f=a[1];if(r.call(e,f,c,t))return w(i,n?c:s++,f,o)}})},i}function J(t,r,e){var n=$e().asMutable();return t.__iterate(function(i,o){n.update(r.call(e,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function H(t,r,e){var n=l(t),i=(d(t)?mn():$e()).asMutable();t.__iterate(function(o,u){i.update(r.call(e,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=ot(t);return i.map(function(r){return nt(t,o(r))})}function V(t,r,e,n){var i=t.size;if(s(r,e,i))return t;var u=a(r,i),f=c(e,i);if(u!==u||f!==f)return V(t.toSeq().cacheResult(),r,e,n);var h,p=f-u;p===p&&(h=p<0?0:p);var _=ut(t);return _.size=0===h?h:t.size&&h||void 0,!n&&q(t)&&h>=0&&(_.get=function(r,e){return r=o(this,r),r>=0&&r<h?t.get(r+u,e):e}),_.__iterateUncached=function(r,e){var i=this;if(0===h)return 0;if(e)return this.cacheResult().__iterate(r,e);var o=0,s=!0,a=0;return t.__iterate(function(t,e){if(!s||!(s=o++<u))return a++,r(t,n?e:a-1,i)!==!1&&a!==h}),a},_.__iteratorUncached=function(r,e){if(0!==h&&e)return this.cacheResult().__iterator(r,e);if(0===h)return new Ee(z);var i=t.__iterator(r,e),o=0,s=0;return new Ee(function(){for(;o++<u;)i.next();if(++s>h)return z();var t=i.next();return n||r===ze||t.done?t:r===we?w(r,s-1,void 0,t):w(r,s-1,t.value[1],t)})},_}function Y(t,r,e){var n=ut(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 r.call(e,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(Se,i),s=!0;return new Ee(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 r.call(e,c,a,o)?n===Se?t:w(n,a,c,t):(s=!1,z())})},n}function Q(t,r,e,n){var i=ut(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=r.call(e,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(Se,o),a=!0,c=0;return new Ee(function(){var t,o,f;do{if(t=s.next(),t.done)return n||i===ze?t:i===we?w(i,c++,void 0,t):w(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],a&&(a=r.call(e,f,o,u))}while(a);return i===Se?t:w(i,o,f,t)})},i}function X(t,r){var e=l(t),n=[t].concat(r).map(function(t){return _(t)?e&&(t=de(t)):t=e?D(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||e&&l(i)||v(t)&&v(i))return i}var o=new ke(n);return e?o=o.toKeyedSeq():v(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,r){if(void 0!==t){var e=r.size;if(void 0!==e)return t+e}},0),o}function F(t,r,e){var n=ut(t);return n.__iterateUncached=function(i,o){function u(t,c){t.__iterate(function(t,o){return(!r||c<r)&&_(t)?u(t,c+1):(s++,i(t,e?o:s-1,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 Ee(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===Se&&(a=a[1]),r&&!(u.length<r)||!_(a))return e?t:w(n,s++,a,t);u.push(o),o=a.__iterator(n,i)}else o=u.pop()}return z()})},n}function G(t,r,e){var n=ot(t);return t.toSeq().map(function(i,o){return n(r.call(e,i,o,t))}).flatten(!0)}function Z(t,r){var e=ut(t);return e.size=t.size&&2*t.size-1,e.__iterateUncached=function(e,n){var i=this,o=0;return t.__iterate(function(t){return(!o||e(r,o++,i)!==!1)&&e(t,o++,i)!==!1},n),o},e.__iteratorUncached=function(e,n){var i,o=t.__iterator(ze,n),u=0;return new Ee(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?w(e,u++,r):w(e,u++,i.value,i)})},e}function $(t,r,e){r||(r=at);var n=l(t),i=0,o=t.toSeq().map(function(r,n){
return[n,r,i++,e?e(r,n,t):r]}).valueSeq().toArray();return o.sort(function(t,e){return r(t[3],e[3])||t[2]-e[2]}).forEach(n?function(t,r){o[r].length=2}:function(t,r){o[r]=t[1]}),n?De(o):v(t)?xe(o):Ae(o)}function tt(t,r,e){if(r||(r=at),e){var n=t.toSeq().map(function(r,n){return[r,e(r,n,t)]}).reduce(function(t,e){return rt(r,t[1],e[1])?e:t});return n&&n[0]}return t.reduce(function(t,e){return rt(r,t,e)?e:t})}function rt(t,r,e){var n=t(e,r);return 0===n&&e!==r&&(void 0===e||null===e||e!==e)||n>0}function et(t,r,e,n){var i=ut(t),o=new ke(e).map(function(t){return t.size});return i.size=n?o.max():o.min(),i.__iterate=function(t,r){for(var e,n=this,i=this.__iterator(ze,r),o=0;!(e=i.next()).done&&t(e.value,o++,n)!==!1;);return o},i.__iteratorUncached=function(t,i){var o=e.map(function(t){return t=ye(t),b(i?t.reverse():t)}),u=0,s=!1;return new Ee(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=n?e.every(function(t){return t.done}):e.some(function(t){return t.done})),s?z():w(t,u++,r.apply(null,e.map(function(t){return t.value})))})},i}function nt(t,r){return t===r?t:q(t)?r:t.constructor(r)}function it(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ot(t){return l(t)?de:v(t)?ge:me}function ut(t){return Object.create((l(t)?De:v(t)?xe:Ae).prototype)}function st(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Me.prototype.cacheResult.call(this)}function at(t,r){return void 0===t&&void 0===r?0:void 0===t?1:void 0===r?-1:t>r?1:t<r?-1:0}function ct(t,r){r=r||0;for(var e=Math.max(0,t.length-r),n=Array(e),i=0;i<e;i++)n[i]=t[i+r];return n}function ft(t,r){if(!t)throw Error(r)}function ht(t){ft(t!==1/0,"Cannot perform this action with an infinite size.")}function pt(t){if(E(t)&&"string"!=typeof t)return t;if(d(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function _t(t){return t&&(t.constructor===Object||void 0===t.constructor)}function lt(t){return p(t)||Array.isArray(t)||_t(t)}
function vt(t){try{return"string"==typeof t?JSON.stringify(t):t+""}catch(r){return JSON.stringify(t)}}function yt(t,r){return p(t)?t.has(r):lt(t)&&qe.call(t,r)}function dt(t,r,e){return p(t)?t.get(r,e):yt(t,r)?"function"==typeof t.get?t.get(r):t[r]:e}function gt(t){if(Array.isArray(t))return ct(t);var r={};for(var e in t)qe.call(t,e)&&(r[e]=t[e]);return r}function mt(t,r){if(!lt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(p(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(r)}if(!qe.call(t,r))return t;var e=gt(t);return Array.isArray(e)?e.splice(r,1):delete e[r],e}function wt(t,r,e){if(!lt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(p(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(r,e)}if(qe.call(t,r)&&e===t[r])return t;var n=gt(t);return n[r]=e,n}function zt(t,r,e,n){n||(n=e,e=void 0);var i=St(p(t),t,pt(r),0,e,n);return i===ae?e:i}function St(t,r,e,n,i,o){var u=r===ae;if(n===e.length){var s=u?i:r,a=o(s);return a===s?r:a}if(!u&&!lt(r))throw new TypeError("Cannot update within non-data-structure value in path ["+e.slice(0,n).map(vt)+"]: "+r);var c=e[n],f=u?ae:dt(r,c,ae),h=St(f===ae?t:p(f),f,e,n+1,i,o);return h===f?r:h===ae?mt(r,c):wt(u?t?Zt():{}:r,c,h)}function It(t,r,e){return zt(t,r,ae,function(){return e})}function bt(t,r){return It(this,t,r)}function Ot(t,r){return zt(t,r,function(){return ae})}function Et(t){return Ot(this,t)}function qt(t,r,e,n){return zt(t,[r],e,n)}function Mt(t,r,e){return 1===arguments.length?t(this):qt(this,t,r,e)}function Dt(t,r,e){return zt(this,t,r,e)}function xt(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return jt(this,t)}function At(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return jt(this,r,t)}function jt(t,r,e){for(var n=[],i=0;i<r.length;i++){var o=de(r[i]);0!==o.size&&n.push(o)}return 0===n.length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations(function(t){
for(var r=e?function(r,n){qt(t,n,ae,function(t){return t===ae?r:e(t,r,n)})}:function(r,e){t.set(e,r)},i=0;i<n.length;i++)n[i].forEach(r)}):t.constructor(n[0])}function kt(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return Ct(t,r)}function Rt(t,r){for(var e=[],n=arguments.length-2;n-- >0;)e[n]=arguments[n+2];return Ct(r,e,t)}function Ut(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return Tt(t,r)}function Kt(t,r){for(var e=[],n=arguments.length-2;n-- >0;)e[n]=arguments[n+2];return Tt(r,e,t)}function Tt(t,r,e){return Ct(t,r,Lt(e))}function Ct(t,r,e){if(!lt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(p(t))return t.mergeWith?t.mergeWith.apply(t,[e].concat(r)):t.concat.apply(t,r);for(var n=Array.isArray(t),i=t,o=n?ge:de,u=n?function(r){i===t&&(i=gt(i)),i.push(r)}:function(r,n){var o=qe.call(i,n),u=o&&e?e(i[n],r,n):r;o&&u===i[n]||(i===t&&(i=gt(i)),i[n]=u)},s=0;s<r.length;s++)o(r[s]).forEach(u);return i}function Lt(t){function r(e,n,i){return lt(e)&&lt(n)?Ct(e,[n],r):t?t(e,n,i):n}return r}function Bt(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Tt(this,t)}function Wt(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return Tt(this,r,t)}function Nt(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return zt(this,t,Zt(),function(t){return Ct(t,r)})}function Pt(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return zt(this,t,Zt(),function(t){return Tt(t,r)})}function Jt(t){var r=this.asMutable();return t(r),r.wasAltered()?r.__ensureOwner(this.__ownerID):this}function Ht(){return this.__ownerID?this:this.__ensureOwner(new n)}function Vt(){return this.__ensureOwner()}function Yt(){return this.__altered}function Qt(t){return!(!t||!t[tn])}function Xt(t,r){return w(t,r[0],r[1])}function Ft(t,r){return{node:t,index:0,__prev:r}}function Gt(t,r,e,n){var i=Object.create(rn);return i.size=t,i._root=r,i.__ownerID=e,i.__hash=n,i.__altered=!1,i}function Zt(){return an||(an=Gt(0))}function $t(t,e,n){
var i,o;if(t._root){var u=r(ce),s=r(fe);if(i=tr(t._root,t.__ownerID,0,void 0,e,n,u,s),!s.value)return t;o=t.size+(u.value?n===ae?-1:1:0)}else{if(n===ae)return t;o=1,i=new en(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Gt(o,i):Zt()}function tr(t,r,n,i,o,u,s,a){return t?t.update(r,n,i,o,u,s,a):u===ae?t:(e(a),e(s),new sn(r,i,[o,u]))}function rr(t){return t.constructor===sn||t.constructor===un}function er(t,r,e,n,i){if(t.keyHash===n)return new un(r,n,[t.entry,i]);var o,u=(0===e?t.keyHash:t.keyHash>>>e)&se,s=(0===e?n:n>>>e)&se;return new nn(r,1<<u|1<<s,u===s?[er(t,r,e+oe,n,i)]:(o=new sn(r,n,i),u<s?[t,o]:[o,t]))}function nr(t,r,e,i){t||(t=new n);for(var o=new sn(t,U(e),[e,i]),u=0;u<r.length;u++){var s=r[u];o=o.update(t,0,void 0,s[0],s[1])}return o}function ir(t,r,e,n){for(var i=0,o=0,u=Array(e),s=0,a=1,c=r.length;s<c;s++,a<<=1){var f=r[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new nn(t,i,u)}function or(t,r,e,n,i){for(var o=0,u=Array(ue),s=0;0!==e;s++,e>>>=1)u[s]=1&e?r[o++]:void 0;return u[n]=i,new on(t,o+1,u)}function ur(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 sr(t,r,e,n){var i=n?t:ct(t);return i[r]=e,i}function ar(t,r,e,n){var i=t.length+1;if(n&&r+1===i)return t[r]=e,t;for(var o=Array(i),u=0,s=0;s<i;s++)s===r?(o[s]=e,u=-1):o[s]=t[s+u];return o}function cr(t,r,e){var n=t.length-1;if(e&&r===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u<n;u++)u===r&&(o=1),i[u]=t[u+o];return i}function fr(t){return!(!t||!t[ln])}function hr(t,r){function e(t,r,e){return 0===r?n(t,e):i(t,r,e)}function n(t,e){var n=e===s?a&&a.array:t&&t.array,i=e>o?0:o-e,c=u-e;return c>ue&&(c=ue),function(){if(i===c)return gn;var t=r?--c:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,c=i>o?0:o-i>>n,f=1+(u-i>>n);return f>ue&&(f=ue),function(){for(;;){if(s){var t=s();if(t!==gn)return t;s=null}if(c===f)return gn;var o=r?--f:c++;s=e(a&&a[o],n-oe,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=mr(u),a=t._tail
;return e(t._root,t._level,0)}function pr(t,r,e,n,i,o,u){var s=Object.create(vn);return s.size=r-t,s._origin=t,s._capacity=r,s._level=e,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function _r(){return dn||(dn=pr(0,0,oe))}function lr(t,e,n){if((e=o(t,e))!==e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?gr(t,e).set(0,n):gr(t,0,e+1).set(e,n)});e+=t._origin;var i=t._tail,u=t._root,s=r(fe);return e>=mr(t._capacity)?i=vr(i,t.__ownerID,0,e,n,s):u=vr(u,t.__ownerID,t._level,e,n,s),s.value?t.__ownerID?(t._root=u,t._tail=i,t.__hash=void 0,t.__altered=!0,t):pr(t._origin,t._capacity,t._level,u,i):t}function vr(t,r,n,i,o,u){var s=i>>>n&se,a=t&&s<t.array.length;if(!a&&void 0===o)return t;var c;if(n>0){var f=t&&t.array[s],h=vr(f,r,n-oe,i,o,u);return h===f?t:(c=yr(t,r),c.array[s]=h,c)}return a&&t.array[s]===o?t:(e(u),c=yr(t,r),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function yr(t,r){return r&&t&&r===t.ownerID?t:new yn(t?t.array.slice():[],r)}function dr(t,r){if(r>=mr(t._capacity))return t._tail;if(r<1<<t._level+oe){for(var e=t._root,n=t._level;e&&n>0;)e=e.array[r>>>n&se],n-=oe;return e}}function gr(t,r,e){void 0!==r&&(r|=0),void 0!==e&&(e|=0);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+r,a=void 0===e?u:e<0?u+e:o+e;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var c=t._level,f=t._root,h=0;s+h<0;)f=new yn(f&&f.array.length?[void 0,f]:[],i),c+=oe,h+=1<<c;h&&(s+=h,o+=h,a+=h,u+=h);for(var p=mr(u),_=mr(a);_>=1<<c+oe;)f=new yn(f&&f.array.length?[f]:[],i),c+=oe;var l=t._tail,v=_<p?dr(t,a-1):_>p?new yn([],i):l;if(l&&_>p&&s<u&&l.array.length){f=yr(f,i);for(var y=f,d=c;d>oe;d-=oe){var g=p>>>d&se;y=y.array[g]=yr(y.array[g],i)}y.array[p>>>oe&se]=l}if(a<u&&(v=v&&v.removeAfter(i,0,a)),s>=_)s-=_,a-=_,c=oe,f=null,v=v&&v.removeBefore(i,0,s);else if(s>o||_<p){for(h=0;f;){var m=s>>>c&se;if(m!==_>>>c&se)break;m&&(h+=(1<<c)*m),c-=oe,f=f.array[m]}f&&s>o&&(f=f.removeBefore(i,c,s-h)),f&&_<p&&(f=f.removeAfter(i,c,_-h)),h&&(s-=h,a-=h)}return t.__ownerID?(t.size=a-s,
t._origin=s,t._capacity=a,t._level=c,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):pr(s,a,c,f,v)}function mr(t){return t<ue?0:t-1>>>oe<<oe}function wr(t){return Qt(t)&&d(t)}function zr(t,r,e,n){var i=Object.create(mn.prototype);return i.size=t?t.size:0,i._map=t,i._list=r,i.__ownerID=e,i.__hash=n,i}function Sr(){return wn||(wn=zr(Zt(),_r()))}function Ir(t,r,e){var n,i,o=t._map,u=t._list,s=o.get(r),a=void 0!==s;if(e===ae){if(!a)return t;u.size>=ue&&u.size>=2*o.size?(i=u.filter(function(t,r){return void 0!==t&&s!==r}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(r),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(e===u.get(s)[1])return t;n=o,i=u.set(s,[r,e])}else n=o.set(r,u.size),i=u.set(u.size,[r,e]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):zr(n,i)}function br(t){return!(!t||!t[Sn])}function Or(t,r,e,n){var i=Object.create(In);return i.size=t,i._head=r,i.__ownerID=e,i.__hash=n,i.__altered=!1,i}function Er(){return bn||(bn=Or(0))}function qr(t,r){if(t===r)return!0;if(!_(r)||void 0!==t.size&&void 0!==r.size&&t.size!==r.size||void 0!==t.__hash&&void 0!==r.__hash&&t.__hash!==r.__hash||l(t)!==l(r)||v(t)!==v(r)||d(t)!==d(r))return!1;if(0===t.size&&0===r.size)return!0;var e=!y(t);if(d(t)){var n=t.entries();return r.every(function(t,r){var i=n.next().value;return i&&k(i[1],t)&&(e||k(i[0],r))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===r.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=r,r=o}var u=!0,s=r.__iterate(function(r,n){if(e?!t.has(r):i?!k(r,t.get(n,ae)):!k(t.get(n,ae),r))return u=!1,!1});return u&&t.size===s}function Mr(t,r){var e=function(e){t.prototype[e]=r[e]};return Object.keys(r).forEach(e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(r).forEach(e),t}function Dr(t){return lt(t)?Me(t).map(Dr).toJSON():t}function xr(t){return!(!t||!t[En])}function Ar(t,r){return t.__ownerID?(t.size=r.size,t._map=r,
t):r===t._map?t:0===r.size?t.__empty():t.__make(r)}function jr(t,r){var e=Object.create(qn);return e.size=t?t.size:0,e._map=t,e.__ownerID=r,e}function kr(){return Mn||(Mn=jr(Zt()))}function Rr(t,r,e){for(var n=pt(r),i=0;i!==n.length;)if((t=dt(t,n[i++],ae))===ae)return e;return t}function Ur(t,r){return Rr(this,t,r)}function Kr(t,r){return Rr(t,r,ae)!==ae}function Tr(t){return Kr(this,t)}function Cr(){ht(this.size);var t={};return this.__iterate(function(r,e){t[e]=r}),t}function Lr(t,r,e,n,i,o){return ht(t.size),t.__iterate(function(t,o,u){i?(i=!1,e=t):e=r.call(n,e,t,o,u)},o),e}function Br(t,r){return r}function Wr(t,r){return[r,t]}function Nr(t){return function(){return!t.apply(this,arguments)}}function Pr(t){return function(){return-t.apply(this,arguments)}}function Jr(){return ct(arguments)}function Hr(t,r){return t<r?1:t>r?-1:0}function Vr(t){if(t.size===1/0)return 0;var r=d(t),e=l(t),n=r?1:0;return Yr(t.__iterate(e?r?function(t,r){n=31*n+Qr(U(t),U(r))|0}:function(t,r){n=n+Qr(U(t),U(r))|0}:r?function(t){n=31*n+U(t)|0}:function(t){n=n+U(t)|0}),n)}function Yr(t,r){return r=Le(r,3432918353),r=Le(r<<15|r>>>-15,461845907),r=Le(r<<13|r>>>-13,5),r=(r+3864292196|0)^t,r=Le(r^r>>>16,2246822507),r=Le(r^r>>>13,3266489909),r=R(r^r>>>16)}function Qr(t,r){return t^r+2654435769+(t<<6)+(t>>2)|0}function Xr(t){return xr(t)&&d(t)}function Fr(t,r){var e=Object.create(Un);return e.size=t?t.size:0,e._map=t,e.__ownerID=r,e}function Gr(){return Kn||(Kn=Fr(Sr()))}function Zr(t,r,e){var n=Object.create(Object.getPrototypeOf(t));return n._values=r,n.__ownerID=e,n}function $r(t){return t._name||t.constructor.name||"Record"}function te(t){return D(t._keys.map(function(r){return[r,t.get(r)]}))}function re(t,r){try{Object.defineProperty(t,r,{get:function(){return this.get(r)},set:function(t){ft(this.__ownerID,"Cannot set on an immutable record."),this.set(r,t)}})}catch(t){}}function ee(t,r){return ne([],r||ie,t,"",r&&r.length>2?[]:void 0,{"":t})}function ne(t,r,e,n,i,o){var u=Array.isArray(e)?xe:_t(e)?De:null;if(u){
if(~t.indexOf(e))throw new TypeError("Cannot convert circular structure to Immutable");t.push(e),i&&""!==n&&i.push(n);var s=r.call(o,n,u(e).map(function(n,o){return ne(t,r,n,o,i,e)}),i&&i.slice());return t.pop(),i&&i.pop(),s}return e}function ie(t,r){return l(r)?r.toMap():r.toList()}var oe=5,ue=1<<oe,se=ue-1,ae={},ce={value:!1},fe={value:!1},he="@@__IMMUTABLE_ITERABLE__@@",pe="@@__IMMUTABLE_KEYED__@@",_e="@@__IMMUTABLE_INDEXED__@@",le="@@__IMMUTABLE_ORDERED__@@",ve="@@__IMMUTABLE_RECORD__@@",ye=function(t){return _(t)?t:Me(t)},de=function(t){function r(t){return l(t)?t:De(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(ye),ge=function(t){function r(t){return v(t)?t:xe(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(ye),me=function(t){function r(t){return _(t)&&!y(t)?t:Ae(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(ye);ye.Keyed=de,ye.Indexed=ge,ye.Set=me;var we=0,ze=1,Se=2,Ie="function"==typeof Symbol&&Symbol.iterator,be="@@iterator",Oe=Ie||be,Ee=function(t){this.next=t};Ee.prototype.toString=function(){return"[Iterator]"},Ee.KEYS=we,Ee.VALUES=ze,Ee.ENTRIES=Se,Ee.prototype.inspect=Ee.prototype.toSource=function(){return""+this},Ee.prototype[Oe]=function(){return this};var qe=Object.prototype.hasOwnProperty,Me=function(t){function r(t){return null===t||void 0===t?M():p(t)?t.toSeq():A(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toSeq=function(){return this},r.prototype.toString=function(){return this.__toString("Seq {","}")},r.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},r.prototype.__iterate=function(t,r){var e=this,n=this._cache;if(n){for(var i=n.length,o=0;o!==i;){var u=n[r?i-++o:o++];if(t(u[1],u[0],e)===!1)break}return o}return this.__iterateUncached(t,r)},
r.prototype.__iterator=function(t,r){var e=this._cache;if(e){var n=e.length,i=0;return new Ee(function(){if(i===n)return z();var o=e[r?n-++i:i++];return w(t,o[0],o[1])})}return this.__iteratorUncached(t,r)},r}(ye),De=function(t){function r(t){return null===t||void 0===t?M().toKeyedSeq():_(t)?l(t)?t.toSeq():t.fromEntrySeq():g(t)?t.toSeq():D(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toKeyedSeq=function(){return this},r}(Me),xe=function(t){function r(t){return null===t||void 0===t?M():_(t)?l(t)?t.entrySeq():t.toIndexedSeq():g(t)?t.toSeq().entrySeq():x(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return r(arguments)},r.prototype.toIndexedSeq=function(){return this},r.prototype.toString=function(){return this.__toString("Seq [","]")},r}(Me),Ae=function(t){function r(t){return(_(t)&&!y(t)?t:xe(t)).toSetSeq()}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return r(arguments)},r.prototype.toSetSeq=function(){return this},r}(Me);Me.isSeq=q,Me.Keyed=De,Me.Set=Ae,Me.Indexed=xe;var je="@@__IMMUTABLE_SEQ__@@";Me.prototype[je]=!0;var ke=function(t){function r(t){this._array=t,this.size=t.length}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return this.has(t)?this._array[o(this,t)]:r},r.prototype.__iterate=function(t,r){for(var e=this,n=this._array,i=n.length,o=0;o!==i;){var u=r?i-++o:o++;if(t(n[u],u,e)===!1)break}return o},r.prototype.__iterator=function(t,r){var e=this._array,n=e.length,i=0;return new Ee(function(){if(i===n)return z();var o=r?n-++i:i++;return w(t,o,e[o])})},r}(xe),Re=function(t){function r(t){var r=Object.keys(t);this._object=t,this._keys=r,this.size=r.length}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return void 0===r||this.has(t)?this._object[t]:r},
r.prototype.has=function(t){return qe.call(this._object,t)},r.prototype.__iterate=function(t,r){for(var e=this,n=this._object,i=this._keys,o=i.length,u=0;u!==o;){var s=i[r?o-++u:u++];if(t(n[s],s,e)===!1)break}return u},r.prototype.__iterator=function(t,r){var e=this._object,n=this._keys,i=n.length,o=0;return new Ee(function(){if(o===i)return z();var u=n[r?i-++o:o++];return w(t,u,e[u])})},r}(De);Re.prototype[le]=!0;var Ue,Ke,Te=function(t){function r(t){this._collection=t,this.size=t.length||t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.__iterateUncached=function(t,r){var e=this;if(r)return this.cacheResult().__iterate(t,r);var n=this._collection,i=b(n),o=0;if(I(i))for(var u;!(u=i.next()).done&&t(u.value,o++,e)!==!1;);return o},r.prototype.__iteratorUncached=function(t,r){if(r)return this.cacheResult().__iterator(t,r);var e=this._collection,n=b(e);if(!I(n))return new Ee(z);var i=0;return new Ee(function(){var r=n.next();return r.done?r:w(t,i++,r.value)})},r}(xe),Ce=function(t){function r(t){this._iterator=t,this._iteratorCache=[]}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.__iterateUncached=function(t,r){var e=this;if(r)return this.cacheResult().__iterate(t,r);for(var n=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(t(i[o],o++,e)===!1)return o;for(var u;!(u=n.next()).done;){var s=u.value;if(i[o]=s,t(s,o++,e)===!1)break}return o},r.prototype.__iteratorUncached=function(t,r){if(r)return this.cacheResult().__iterator(t,r);var e=this._iterator,n=this._iteratorCache,i=0;return new Ee(function(){if(i>=n.length){var r=e.next();if(r.done)return r;n[i]=r.value}return w(t,i,n[i++])})},r}(xe),Le="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(t,r){t|=0,r|=0;var e=65535&t,n=65535&r;return e*n+((t>>>16)*n+e*(r>>>16)<<16>>>0)|0},Be=Object.isExtensible,We=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Ne="function"==typeof WeakMap
;Ne&&(Ke=new WeakMap);var Pe=0,Je="__immutablehash__";"function"==typeof Symbol&&(Je=Symbol(Je));var He=16,Ve=255,Ye=0,Qe={},Xe=function(t){function r(t,r){this._iter=t,this._useKeys=r,this.size=t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return this._iter.get(t,r)},r.prototype.has=function(t){return this._iter.has(t)},r.prototype.valueSeq=function(){return this._iter.valueSeq()},r.prototype.reverse=function(){var t=this,r=N(this,!0);return this._useKeys||(r.valueSeq=function(){return t._iter.toSeq().reverse()}),r},r.prototype.map=function(t,r){var e=this,n=W(this,t,r);return this._useKeys||(n.valueSeq=function(){return e._iter.toSeq().map(t,r)}),n},r.prototype.__iterate=function(t,r){var e=this;return this._iter.__iterate(function(r,n){return t(r,n,e)},r)},r.prototype.__iterator=function(t,r){return this._iter.__iterator(t,r)},r}(De);Xe.prototype[le]=!0;var Fe=function(t){function r(t){this._iter=t,this.size=t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.includes=function(t){return this._iter.includes(t)},r.prototype.__iterate=function(t,r){var e=this,n=0;return r&&i(this),this._iter.__iterate(function(i){return t(i,r?e.size-++n:n++,e)},r)},r.prototype.__iterator=function(t,r){var e=this,n=this._iter.__iterator(ze,r),o=0;return r&&i(this),new Ee(function(){var i=n.next();return i.done?i:w(t,r?e.size-++o:o++,i.value,i)})},r}(xe),Ge=function(t){function r(t){this._iter=t,this.size=t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.has=function(t){return this._iter.includes(t)},r.prototype.__iterate=function(t,r){var e=this;return this._iter.__iterate(function(r){return t(r,r,e)},r)},r.prototype.__iterator=function(t,r){var e=this._iter.__iterator(ze,r);return new Ee(function(){var r=e.next();return r.done?r:w(t,r.value,r.value,r)})},r}(Ae),Ze=function(t){function r(t){this._iter=t,this.size=t.size}
return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.entrySeq=function(){return this._iter.toSeq()},r.prototype.__iterate=function(t,r){var e=this;return this._iter.__iterate(function(r){if(r){it(r);var n=_(r);return t(n?r.get(1):r[1],n?r.get(0):r[0],e)}},r)},r.prototype.__iterator=function(t,r){var e=this._iter.__iterator(ze,r);return new Ee(function(){for(;;){var r=e.next();if(r.done)return r;var n=r.value;if(n){it(n);var i=_(n);return w(t,i?n.get(0):n[0],i?n.get(1):n[1],r)}}})},r}(De);Fe.prototype.cacheResult=Xe.prototype.cacheResult=Ge.prototype.cacheResult=Ze.prototype.cacheResult=st;var $e=function(t){function r(r){return null===r||void 0===r?Zt():Qt(r)&&!d(r)?r:Zt().withMutations(function(e){var n=t(r);ht(n.size),n.forEach(function(t,r){return e.set(r,t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Zt().withMutations(function(r){for(var e=0;e<t.length;e+=2){if(e+1>=t.length)throw Error("Missing value for key: "+t[e]);r.set(t[e],t[e+1])}})},r.prototype.toString=function(){return this.__toString("Map {","}")},r.prototype.get=function(t,r){return this._root?this._root.get(0,void 0,t,r):r},r.prototype.set=function(t,r){return $t(this,t,r)},r.prototype.remove=function(t){return $t(this,t,ae)},r.prototype.deleteAll=function(t){var r=ye(t);return 0===r.size?this:this.withMutations(function(t){r.forEach(function(r){return t.remove(r)})})},r.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()},r.prototype.sort=function(t){return mn($(this,t))},r.prototype.sortBy=function(t,r){return mn($(this,r,t))},r.prototype.__iterator=function(t,r){return new cn(this,t,r)},r.prototype.__iterate=function(t,r){var e=this,n=0;return this._root&&this._root.iterate(function(r){return n++,t(r[1],r[0],e)},r),n},r.prototype.__ensureOwner=function(t){
return t===this.__ownerID?this:t?Gt(this.size,this._root,t,this.__hash):0===this.size?Zt():(this.__ownerID=t,this.__altered=!1,this)},r}(de);$e.isMap=Qt;var tn="@@__IMMUTABLE_MAP__@@",rn=$e.prototype;rn[tn]=!0,rn.delete=rn.remove,rn.removeAll=rn.deleteAll,rn.concat=rn.merge,rn.setIn=bt,rn.removeIn=rn.deleteIn=Et,rn.update=Mt,rn.updateIn=Dt,rn.merge=xt,rn.mergeWith=At,rn.mergeDeep=Bt,rn.mergeDeepWith=Wt,rn.mergeIn=Nt,rn.mergeDeepIn=Pt,rn.withMutations=Jt,rn.wasAltered=Yt,rn.asImmutable=Vt,rn["@@transducer/init"]=rn.asMutable=Ht,rn["@@transducer/step"]=function(t,r){return t.set(r[0],r[1])},rn["@@transducer/result"]=function(t){return t.asImmutable()};var en=function(t,r){this.ownerID=t,this.entries=r};en.prototype.get=function(t,r,e,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(k(e,i[o][0]))return i[o][1];return n},en.prototype.update=function(t,r,n,i,o,u,s){for(var a=o===ae,c=this.entries,f=0,h=c.length;f<h&&!k(i,c[f][0]);f++);var p=f<h;if(p?c[f][1]===o:a)return this;if(e(s),(a||!p)&&e(u),!a||1!==c.length){if(!p&&!a&&c.length>=fn)return nr(t,c,i,o);var _=t&&t===this.ownerID,l=_?c:ct(c);return p?a?f===h-1?l.pop():l[f]=l.pop():l[f]=[i,o]:l.push([i,o]),_?(this.entries=l,this):new en(t,l)}};var nn=function(t,r,e){this.ownerID=t,this.bitmap=r,this.nodes=e};nn.prototype.get=function(t,r,e,n){void 0===r&&(r=U(e));var i=1<<((0===t?r:r>>>t)&se),o=this.bitmap;return 0==(o&i)?n:this.nodes[ur(o&i-1)].get(t+oe,r,e,n)},nn.prototype.update=function(t,r,e,n,i,o,u){void 0===e&&(e=U(n));var s=(0===r?e:e>>>r)&se,a=1<<s,c=this.bitmap,f=0!=(c&a);if(!f&&i===ae)return this;var h=ur(c&a-1),p=this.nodes,_=f?p[h]:void 0,l=tr(_,t,r+oe,e,n,i,o,u);if(l===_)return this;if(!f&&l&&p.length>=hn)return or(t,p,c,s,l);if(f&&!l&&2===p.length&&rr(p[1^h]))return p[1^h];if(f&&l&&1===p.length&&rr(l))return l;var v=t&&t===this.ownerID,y=f?l?c:c^a:c|a,d=f?l?sr(p,h,l,v):cr(p,h,v):ar(p,h,l,v);return v?(this.bitmap=y,this.nodes=d,this):new nn(t,y,d)};var on=function(t,r,e){this.ownerID=t,this.count=r,this.nodes=e};on.prototype.get=function(t,r,e,n){
void 0===r&&(r=U(e));var i=(0===t?r:r>>>t)&se,o=this.nodes[i];return o?o.get(t+oe,r,e,n):n},on.prototype.update=function(t,r,e,n,i,o,u){void 0===e&&(e=U(n));var s=(0===r?e:e>>>r)&se,a=i===ae,c=this.nodes,f=c[s];if(a&&!f)return this;var h=tr(f,t,r+oe,e,n,i,o,u);if(h===f)return this;var p=this.count;if(f){if(!h&&--p<pn)return ir(t,c,p,s)}else p++;var _=t&&t===this.ownerID,l=sr(c,s,h,_);return _?(this.count=p,this.nodes=l,this):new on(t,p,l)};var un=function(t,r,e){this.ownerID=t,this.keyHash=r,this.entries=e};un.prototype.get=function(t,r,e,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(k(e,i[o][0]))return i[o][1];return n},un.prototype.update=function(t,r,n,i,o,u,s){void 0===n&&(n=U(i));var a=o===ae;if(n!==this.keyHash)return a?this:(e(s),e(u),er(this,t,r,n,[i,o]));for(var c=this.entries,f=0,h=c.length;f<h&&!k(i,c[f][0]);f++);var p=f<h;if(p?c[f][1]===o:a)return this;if(e(s),(a||!p)&&e(u),a&&2===h)return new sn(t,this.keyHash,c[1^f]);var _=t&&t===this.ownerID,l=_?c:ct(c);return p?a?f===h-1?l.pop():l[f]=l.pop():l[f]=[i,o]:l.push([i,o]),_?(this.entries=l,this):new un(t,this.keyHash,l)};var sn=function(t,r,e){this.ownerID=t,this.keyHash=r,this.entry=e};sn.prototype.get=function(t,r,e,n){return k(e,this.entry[0])?this.entry[1]:n},sn.prototype.update=function(t,r,n,i,o,u,s){var a=o===ae,c=k(i,this.entry[0]);return(c?o===this.entry[1]:a)?this:(e(s),a?void e(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new sn(t,this.keyHash,[i,o]):(e(u),er(this,t,r,U(i),[i,o])))},en.prototype.iterate=un.prototype.iterate=function(t,r){for(var e=this.entries,n=0,i=e.length-1;n<=i;n++)if(t(e[r?i-n:n])===!1)return!1},nn.prototype.iterate=on.prototype.iterate=function(t,r){for(var e=this.nodes,n=0,i=e.length-1;n<=i;n++){var o=e[r?i-n:n];if(o&&o.iterate(t,r)===!1)return!1}},sn.prototype.iterate=function(t,r){return t(this.entry)};var an,cn=function(t){function r(t,r,e){this._type=r,this._reverse=e,this._stack=t._root&&Ft(t._root)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,
r.prototype.next=function(){for(var t=this,r=this._type,e=this._stack;e;){var n=e.node,i=e.index++,o=void 0;if(n.entry){if(0===i)return Xt(r,n.entry)}else if(n.entries){if(o=n.entries.length-1,i<=o)return Xt(r,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 Xt(r,u.entry);e=t._stack=Ft(u,e)}continue}e=t._stack=t._stack.__prev}return z()},r}(Ee),fn=ue/4,hn=ue/2,pn=ue/4,_n=function(t){function r(r){var e=_r();if(null===r||void 0===r)return e;if(fr(r))return r;var n=t(r),i=n.size;return 0===i?e:(ht(i),i>0&&i<ue?pr(0,i,oe,null,new yn(n.toArray())):e.withMutations(function(t){t.setSize(i),n.forEach(function(r,e){return t.set(e,r)})}))}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.prototype.toString=function(){return this.__toString("List [","]")},r.prototype.get=function(t,r){if((t=o(this,t))>=0&&t<this.size){t+=this._origin;var e=dr(this,t);return e&&e.array[t&se]}return r},r.prototype.set=function(t,r){return lr(this,t,r)},r.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},r.prototype.insert=function(t,r){return this.splice(t,0,r)},r.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=oe,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):_r()},r.prototype.push=function(){var t=arguments,r=this.size;return this.withMutations(function(e){gr(e,0,r+t.length);for(var n=0;n<t.length;n++)e.set(r+n,t[n])})},r.prototype.pop=function(){return gr(this,0,-1)},r.prototype.unshift=function(){var t=arguments;return this.withMutations(function(r){gr(r,-t.length);for(var e=0;e<t.length;e++)r.set(e,t[e])})},r.prototype.shift=function(){return gr(this,1)},r.prototype.concat=function(){for(var r=arguments,e=[],n=0;n<arguments.length;n++){var i=r[n],o=t("string"!=typeof i&&S(i)?i:[i]);0!==o.size&&e.push(o)}
return 0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){e.forEach(function(r){return r.forEach(function(r){return t.push(r)})})}):this.constructor(e[0])},r.prototype.setSize=function(t){return gr(this,0,t)},r.prototype.slice=function(t,r){var e=this.size;return s(t,r,e)?this:gr(this,a(t,e),c(r,e))},r.prototype.__iterator=function(t,r){var e=r?this.size:0,n=hr(this,r);return new Ee(function(){var i=n();return i===gn?z():w(t,r?--e:e++,i)})},r.prototype.__iterate=function(t,r){for(var e,n=this,i=r?this.size:0,o=hr(this,r);(e=o())!==gn&&t(e,r?--i:i++,n)!==!1;);return i},r.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?pr(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?_r():(this.__ownerID=t,this.__altered=!1,this)},r}(ge);_n.isList=fr;var ln="@@__IMMUTABLE_LIST__@@",vn=_n.prototype;vn[ln]=!0,vn.delete=vn.remove,vn.merge=vn.concat,vn.setIn=bt,vn.deleteIn=vn.removeIn=Et,vn.update=Mt,vn.updateIn=Dt,vn.mergeIn=Nt,vn.mergeDeepIn=Pt,vn.withMutations=Jt,vn.wasAltered=Yt,vn.asImmutable=Vt,vn["@@transducer/init"]=vn.asMutable=Ht,vn["@@transducer/step"]=function(t,r){return t.push(r)},vn["@@transducer/result"]=function(t){return t.asImmutable()};var yn=function(t,r){this.array=t,this.ownerID=r};yn.prototype.removeBefore=function(t,r,e){if(e===r?1<<r:0===this.array.length)return this;var n=e>>>r&se;if(n>=this.array.length)return new yn([],t);var i,o=0===n;if(r>0){var u=this.array[n];if((i=u&&u.removeBefore(t,r-oe,e))===u&&o)return this}if(o&&!i)return this;var s=yr(this,t);if(!o)for(var a=0;a<n;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},yn.prototype.removeAfter=function(t,r,e){if(e===(r?1<<r:0)||0===this.array.length)return this;var n=e-1>>>r&se;if(n>=this.array.length)return this;var i;if(r>0){var o=this.array[n];if((i=o&&o.removeAfter(t,r-oe,e))===o&&n===this.array.length-1)return this}var u=yr(this,t);return u.array.splice(n+1),i&&(u.array[n]=i),u};var dn,gn={},mn=function(t){function r(t){
return null===t||void 0===t?Sr():wr(t)?t:Sr().withMutations(function(r){var e=de(t);ht(e.size),e.forEach(function(t,e){return r.set(e,t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.prototype.toString=function(){return this.__toString("OrderedMap {","}")},r.prototype.get=function(t,r){var e=this._map.get(t);return void 0!==e?this._list.get(e)[1]:r},r.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Sr()},r.prototype.set=function(t,r){return Ir(this,t,r)},r.prototype.remove=function(t){return Ir(this,t,ae)},r.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},r.prototype.__iterate=function(t,r){var e=this;return this._list.__iterate(function(r){return r&&t(r[1],r[0],e)},r)},r.prototype.__iterator=function(t,r){return this._list.fromEntrySeq().__iterator(t,r)},r.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._map.__ensureOwner(t),e=this._list.__ensureOwner(t);return t?zr(r,e,t,this.__hash):0===this.size?Sr():(this.__ownerID=t,this._map=r,this._list=e,this)},r}($e);mn.isOrderedMap=wr,mn.prototype[le]=!0,mn.prototype.delete=mn.prototype.remove;var wn,zn=function(t){function r(t){return null===t||void 0===t?Er():br(t)?t:Er().pushAll(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.prototype.toString=function(){return this.__toString("Stack [","]")},r.prototype.get=function(t,r){var e=this._head;for(t=o(this,t);e&&t--;)e=e.next;return e?e.value:r},r.prototype.peek=function(){return this._head&&this._head.value},r.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var r=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:t[n],next:e};return this.__ownerID?(this.size=r,this._head=e,this.__hash=void 0,this.__altered=!0,this):Or(r,e)},
r.prototype.pushAll=function(r){if(r=t(r),0===r.size)return this;if(0===this.size&&br(r))return r;ht(r.size);var e=this.size,n=this._head;return r.__iterate(function(t){e++,n={value:t,next:n}},!0),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Or(e,n)},r.prototype.pop=function(){return this.slice(1)},r.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):Er()},r.prototype.slice=function(r,e){if(s(r,e,this.size))return this;var n=a(r,this.size);if(c(e,this.size)!==this.size)return t.prototype.slice.call(this,r,e);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):Or(i,o)},r.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Or(this.size,this._head,t,this.__hash):0===this.size?Er():(this.__ownerID=t,this.__altered=!1,this)},r.prototype.__iterate=function(t,r){var e=this;if(r)return new ke(this.toArray()).__iterate(function(r,n){return t(r,n,e)},r);for(var n=0,i=this._head;i&&t(i.value,n++,e)!==!1;)i=i.next;return n},r.prototype.__iterator=function(t,r){if(r)return new ke(this.toArray()).__iterator(t,r);var e=0,n=this._head;return new Ee(function(){if(n){var r=n.value;return n=n.next,w(t,e++,r)}return z()})},r}(ge);zn.isStack=br;var Sn="@@__IMMUTABLE_STACK__@@",In=zn.prototype;In[Sn]=!0,In.shift=In.pop,In.unshift=In.push,In.unshiftAll=In.pushAll,In.withMutations=Jt,In.wasAltered=Yt,In.asImmutable=Vt,In["@@transducer/init"]=In.asMutable=Ht,In["@@transducer/step"]=function(t,r){return t.unshift(r)},In["@@transducer/result"]=function(t){return t.asImmutable()};var bn,On=function(t){function r(r){return null===r||void 0===r?kr():xr(r)&&!d(r)?r:kr().withMutations(function(e){var n=t(r);ht(n.size),n.forEach(function(t){return e.add(t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.fromKeys=function(t){
return this(de(t).keySeq())},r.intersect=function(t){return t=ye(t).toArray(),t.length?qn.intersect.apply(r(t.pop()),t):kr()},r.union=function(t){return t=ye(t).toArray(),t.length?qn.union.apply(r(t.pop()),t):kr()},r.prototype.toString=function(){return this.__toString("Set {","}")},r.prototype.has=function(t){return this._map.has(t)},r.prototype.add=function(t){return Ar(this,this._map.set(t,t))},r.prototype.remove=function(t){return Ar(this,this._map.remove(t))},r.prototype.clear=function(){return Ar(this,this._map.clear())},r.prototype.union=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return r=r.filter(function(t){return 0!==t.size}),0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(e){for(var n=0;n<r.length;n++)t(r[n]).forEach(function(t){return e.add(t)})}):this.constructor(r[0])},r.prototype.intersect=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(0===r.length)return this;r=r.map(function(r){return t(r)});var n=[];return this.forEach(function(t){r.every(function(r){return r.includes(t)})||n.push(t)}),this.withMutations(function(t){n.forEach(function(r){t.remove(r)})})},r.prototype.subtract=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(0===r.length)return this;r=r.map(function(r){return t(r)});var n=[];return this.forEach(function(t){r.some(function(r){return r.includes(t)})&&n.push(t)}),this.withMutations(function(t){n.forEach(function(r){t.remove(r)})})},r.prototype.sort=function(t){return Rn($(this,t))},r.prototype.sortBy=function(t,r){return Rn($(this,r,t))},r.prototype.wasAltered=function(){return this._map.wasAltered()},r.prototype.__iterate=function(t,r){var e=this;return this._map.__iterate(function(r){return t(r,r,e)},r)},r.prototype.__iterator=function(t,r){return this._map.__iterator(t,r)},r.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._map.__ensureOwner(t);return t?this.__make(r,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=r,this)},r}(me)
;On.isSet=xr;var En="@@__IMMUTABLE_SET__@@",qn=On.prototype;qn[En]=!0,qn.delete=qn.remove,qn.merge=qn.concat=qn.union,qn.withMutations=Jt,qn.asImmutable=Vt,qn["@@transducer/init"]=qn.asMutable=Ht,qn["@@transducer/step"]=function(t,r){return t.add(r)},qn["@@transducer/result"]=function(t){return t.asImmutable()},qn.__empty=kr,qn.__make=jr;var Mn,Dn,xn=function(t){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);if(ft(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,0===(this.size=Math.max(0,Math.ceil((e-t)/n-1)+1))){if(Dn)return Dn;Dn=this}}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},r.prototype.get=function(t,r){return this.has(t)?this._start+o(this,t)*this._step:r},r.prototype.includes=function(t){var r=(t-this._start)/this._step;return r>=0&&r<this.size&&r===Math.floor(r)},r.prototype.slice=function(t,e){return s(t,e,this.size)?this:(t=a(t,this.size),e=c(e,this.size),e<=t?new r(0,0):new r(this.get(t,this._end),this.get(e,this._end),this._step))},r.prototype.indexOf=function(t){var r=t-this._start;if(r%this._step==0){var e=r/this._step;if(e>=0&&e<this.size)return e}return-1},r.prototype.lastIndexOf=function(t){return this.indexOf(t)},r.prototype.__iterate=function(t,r){for(var e=this,n=this.size,i=this._step,o=r?this._start+(n-1)*i:this._start,u=0;u!==n&&t(o,r?n-++u:u++,e)!==!1;)o+=r?-i:i;return u},r.prototype.__iterator=function(t,r){var e=this.size,n=this._step,i=r?this._start+(e-1)*n:this._start,o=0;return new Ee(function(){if(o===e)return z();var u=i;return i+=r?-n:n,w(t,r?e-++o:o++,u)})},r.prototype.equals=function(t){return t instanceof r?this._start===t._start&&this._end===t._end&&this._step===t._step:qr(this,t)},r}(xe);ye.isIterable=_,ye.isKeyed=l,ye.isIndexed=v,ye.isAssociative=y,ye.isOrdered=d,
ye.Iterator=Ee,Mr(ye,{toArray:function(){ht(this.size);var t=Array(this.size||0),r=l(this),e=0;return this.__iterate(function(n,i){t[e++]=r?[i,n]:n}),t},toIndexedSeq:function(){return new Fe(this)},toJS:function(){return Dr(this)},toKeyedSeq:function(){return new Xe(this,!0)},toMap:function(){return $e(this.toKeyedSeq())},toObject:Cr,toOrderedMap:function(){return mn(this.toKeyedSeq())},toOrderedSet:function(){return Rn(l(this)?this.valueSeq():this)},toSet:function(){return On(l(this)?this.valueSeq():this)},toSetSeq:function(){return new Ge(this)},toSeq:function(){return v(this)?this.toIndexedSeq():l(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return zn(l(this)?this.valueSeq():this)},toList:function(){return _n(l(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,r){return 0===this.size?t+r:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+r},concat:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return nt(this,X(this,t))},includes:function(t){return this.some(function(r){return k(r,t)})},entries:function(){return this.__iterator(Se)},every:function(t,r){ht(this.size);var e=!0;return this.__iterate(function(n,i,o){if(!t.call(r,n,i,o))return e=!1,!1}),e},filter:function(t,r){return nt(this,P(this,t,r,!0))},find:function(t,r,e){var n=this.findEntry(t,r);return n?n[1]:e},forEach:function(t,r){return ht(this.size),this.__iterate(r?t.bind(r):t)},join:function(t){ht(this.size),t=void 0!==t?""+t:",";var r="",e=!0;return this.__iterate(function(n){e?e=!1:r+=t,r+=null!==n&&void 0!==n?""+n:""}),r},keys:function(){return this.__iterator(we)},map:function(t,r){return nt(this,W(this,t,r))},reduce:function(t,r,e){return Lr(this,t,r,e,arguments.length<2,!1)},reduceRight:function(t,r,e){return Lr(this,t,r,e,arguments.length<2,!0)},reverse:function(){return nt(this,N(this,!0))},slice:function(t,r){return nt(this,V(this,t,r,!0))},some:function(t,r){return!this.every(Nr(t),r)},sort:function(t){return nt(this,$(this,t))},values:function(){
return this.__iterator(ze)},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,r){return i(t?this.toSeq().filter(t,r):this)},countBy:function(t,r){return J(this,t,r)},equals:function(t){return qr(this,t)},entrySeq:function(){var t=this;if(t._cache)return new ke(t._cache);var r=t.toSeq().map(Wr).toIndexedSeq();return r.fromEntrySeq=function(){return t.toSeq()},r},filterNot:function(t,r){return this.filter(Nr(t),r)},findEntry:function(t,r,e){var n=e;return this.__iterate(function(e,i,o){if(t.call(r,e,i,o))return n=[i,e],!1}),n},findKey:function(t,r){var e=this.findEntry(t,r);return e&&e[0]},findLast:function(t,r,e){return this.toKeyedSeq().reverse().find(t,r,e)},findLastEntry:function(t,r,e){return this.toKeyedSeq().reverse().findEntry(t,r,e)},findLastKey:function(t,r){return this.toKeyedSeq().reverse().findKey(t,r)},first:function(){return this.find(u)},flatMap:function(t,r){return nt(this,G(this,t,r))},flatten:function(t){return nt(this,F(this,t,!0))},fromEntrySeq:function(){return new Ze(this)},get:function(t,r){return this.find(function(r,e){return k(e,t)},void 0,r)},getIn:Ur,groupBy:function(t,r){return H(this,t,r)},has:function(t){return this.get(t,ae)!==ae},hasIn:Tr,isSubset:function(t){return t="function"==typeof t.includes?t:ye(t),this.every(function(r){return t.includes(r)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:ye(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(r){return k(r,t)})},keySeq:function(){return this.toSeq().map(Br).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return tt(this,t)},maxBy:function(t,r){return tt(this,r,t)},min:function(t){return tt(this,t?Pr(t):Hr)},minBy:function(t,r){return tt(this,r?Pr(r):Hr,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,r){return nt(this,Q(this,t,r,!0))},skipUntil:function(t,r){return this.skipWhile(Nr(t),r)},sortBy:function(t,r){return nt(this,$(this,r,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,r){return nt(this,Y(this,t,r))},takeUntil:function(t,r){return this.takeWhile(Nr(t),r)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Vr(this))}});var An=ye.prototype;An[he]=!0,An[Oe]=An.values,An.toJSON=An.toArray,An.__toStringMapper=vt,An.inspect=An.toSource=function(){return""+this},An.chain=An.flatMap,An.contains=An.includes,Mr(de,{flip:function(){return nt(this,B(this))},mapEntries:function(t,r){var e=this,n=0;return nt(this,this.toSeq().map(function(i,o){return t.call(r,[o,i],n++,e)}).fromEntrySeq())},mapKeys:function(t,r){var e=this;return nt(this,this.toSeq().flip().map(function(n,i){return t.call(r,n,i,e)}).flip())}});var jn=de.prototype;jn[pe]=!0,jn[Oe]=An.entries,jn.toJSON=Cr,jn.__toStringMapper=function(t,r){return vt(r)+": "+vt(t)},Mr(ge,{toKeyedSeq:function(){return new Xe(this,!1)},filter:function(t,r){return nt(this,P(this,t,r,!1))},findIndex:function(t,r){var e=this.findEntry(t,r);return e?e[0]:-1},indexOf:function(t){var r=this.keyOf(t);return void 0===r?-1:r},lastIndexOf:function(t){var r=this.lastKeyOf(t);return void 0===r?-1:r},reverse:function(){return nt(this,N(this,!1))},slice:function(t,r){return nt(this,V(this,t,r,!1))},splice:function(t,r){var e=arguments.length;if(r=Math.max(r||0,0),0===e||2===e&&!r)return this;t=a(t,t<0?this.count():this.size);var n=this.slice(0,t);return nt(this,1===e?n:n.concat(ct(arguments,2),this.slice(t+r)))},findLastIndex:function(t,r){var e=this.findLastEntry(t,r);return e?e[0]:-1},first:function(){return this.get(0)},flatten:function(t){return nt(this,F(this,t,!1))},get:function(t,r){return t=o(this,t),
t<0||this.size===1/0||void 0!==this.size&&t>this.size?r:this.find(function(r,e){return e===t},void 0,r)},has:function(t){return(t=o(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return nt(this,Z(this,t))},interleave:function(){var t=[this].concat(ct(arguments)),r=et(this.toSeq(),xe.of,t),e=r.flatten(!0);return r.size&&(e.size=r.size*t.length),nt(this,e)},keySeq:function(){return xn(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,r){return nt(this,Q(this,t,r,!1))},zip:function(){return nt(this,et(this,Jr,[this].concat(ct(arguments))))},zipAll:function(){return nt(this,et(this,Jr,[this].concat(ct(arguments)),!0))},zipWith:function(t){var r=ct(arguments);return r[0]=this,nt(this,et(this,t,r))}});var kn=ge.prototype;kn[_e]=!0,kn[le]=!0,Mr(me,{get:function(t,r){return this.has(t)?t:r},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),me.prototype.has=An.includes,me.prototype.contains=me.prototype.includes,Mr(De,de.prototype),Mr(xe,ge.prototype),Mr(Ae,me.prototype);var Rn=function(t){function r(t){return null===t||void 0===t?Gr():Xr(t)?t:Gr().withMutations(function(r){var e=me(t);ht(e.size),e.forEach(function(t){return r.add(t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.fromKeys=function(t){return this(de(t).keySeq())},r.prototype.toString=function(){return this.__toString("OrderedSet {","}")},r}(On);Rn.isOrderedSet=Xr;var Un=Rn.prototype;Un[le]=!0,Un.zip=kn.zip,Un.zipWith=kn.zipWith,Un.__empty=Gr,Un.__make=Fr;var Kn,Tn=function(t,r){var e,n=function(o){var u=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!e){e=!0;var s=Object.keys(t),a=i._indices={};i._name=r,i._keys=s,i._defaultValues=t;for(var c=0;c<s.length;c++){var f=s[c];a[f]=c,
i[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+$r(u)+' with property "'+f+'" since that property name is part of the Record API.'):re(i,f)}}this.__ownerID=void 0,this._values=_n().withMutations(function(t){t.setSize(u._keys.length),de(o).forEach(function(r,e){t.set(u._indices[e],r===u._defaultValues[e]?void 0:r)})})},i=n.prototype=Object.create(Cn);return i.constructor=n,n};Tn.prototype.toString=function(){for(var t,r=this,e=$r(this)+" { ",n=this._keys,i=0,o=n.length;i!==o;i++)t=n[i],e+=(i?", ":"")+t+": "+vt(r.get(t));return e+" }"},Tn.prototype.equals=function(t){return this===t||t&&this._keys===t._keys&&te(this).equals(te(t))},Tn.prototype.hashCode=function(){return te(this).hashCode()},Tn.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Tn.prototype.get=function(t,r){if(!this.has(t))return r;var e=this._indices[t],n=this._values.get(e);return void 0===n?this._defaultValues[t]:n},Tn.prototype.set=function(t,r){if(this.has(t)){var e=this._values.set(this._indices[t],r===this._defaultValues[t]?void 0:r);if(e!==this._values&&!this.__ownerID)return Zr(this,e)}return this},Tn.prototype.remove=function(t){return this.set(t)},Tn.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Zr(this,t)},Tn.prototype.wasAltered=function(){return this._values.wasAltered()},Tn.prototype.toSeq=function(){return te(this)},Tn.prototype.toJS=function(){return Dr(this)},Tn.prototype.entries=function(){return this.__iterator(Se)},Tn.prototype.__iterator=function(t,r){return te(this).__iterator(t,r)},Tn.prototype.__iterate=function(t,r){return te(this).__iterate(t,r)},Tn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._values.__ensureOwner(t);return t?Zr(this,r,t):(this.__ownerID=t,this._values=r,this)},Tn.isRecord=g,Tn.getDescriptiveName=$r;var Cn=Tn.prototype;Cn[ve]=!0,Cn.delete=Cn.remove,Cn.deleteIn=Cn.removeIn=Et,Cn.getIn=Ur,Cn.hasIn=An.hasIn,Cn.merge=xt,Cn.mergeWith=At,Cn.mergeIn=Nt,Cn.mergeDeep=Bt,
Cn.mergeDeepWith=Wt,Cn.mergeDeepIn=Pt,Cn.setIn=bt,Cn.update=Mt,Cn.updateIn=Dt,Cn.withMutations=Jt,Cn.asMutable=Ht,Cn.asImmutable=Vt,Cn[Oe]=Cn.entries,Cn.toJSON=Cn.toObject=An.toObject,Cn.inspect=Cn.toSource=function(){return""+this};var Ln,Bn=function(t){function r(t,e){if(!(this instanceof r))return new r(t,e);if(this._value=t,0===(this.size=void 0===e?1/0:Math.max(0,e))){if(Ln)return Ln;Ln=this}}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},r.prototype.get=function(t,r){return this.has(t)?this._value:r},r.prototype.includes=function(t){return k(this._value,t)},r.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new r(this._value,c(e,n)-a(t,n))},r.prototype.reverse=function(){return this},r.prototype.indexOf=function(t){return k(this._value,t)?0:-1},r.prototype.lastIndexOf=function(t){return k(this._value,t)?this.size:-1},r.prototype.__iterate=function(t,r){for(var e=this,n=this.size,i=0;i!==n&&t(e._value,r?n-++i:i++,e)!==!1;);return i},r.prototype.__iterator=function(t,r){var e=this,n=this.size,i=0;return new Ee(function(){return i===n?z():w(t,r?n-++i:i++,e._value)})},r.prototype.equals=function(t){return t instanceof r?k(this._value,t._value):qr(t)},r}(xe),Wn={version:"4.0.0-rc.9",Collection:ye,Iterable:ye,Seq:Me,Map:$e,OrderedMap:mn,List:_n,Stack:zn,Set:On,OrderedSet:Rn,Record:Tn,Range:xn,Repeat:Bn,is:k,fromJS:ee,hash:U,isImmutable:p,isCollection:_,isKeyed:l,isIndexed:v,isAssociative:y,isOrdered:d,isValueObject:m,get:dt,getIn:Rr,has:yt,hasIn:Kr,merge:kt,mergeDeep:Ut,mergeWith:Rt,mergeDeepWith:Kt,remove:mt,removeIn:Ot,set:wt,setIn:It,update:qt,updateIn:zt},Nn=ye;t.default=Wn,t.version="4.0.0-rc.9",t.Collection=ye,t.Iterable=Nn,t.Seq=Me,t.Map=$e,t.OrderedMap=mn,t.List=_n,t.Stack=zn,t.Set=On,t.OrderedSet=Rn,t.Record=Tn,t.Range=xn,t.Repeat=Bn,t.is=k,t.fromJS=ee,t.hash=U,t.isImmutable=p,t.isCollection=_,t.isKeyed=l,t.isIndexed=v,
t.isAssociative=y,t.isOrdered=d,t.isValueObject=m,t.get=dt,t.getIn=Rr,t.has=yt,t.hasIn=Kr,t.merge=kt,t.mergeDeep=Ut,t.mergeWith=Rt,t.mergeDeepWith=Kt,t.remove=mt,t.removeIn=Ot,t.set=wt,t.setIn=It,t.update=qt,t.updateIn=zt,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(t.Immutable={})}(this,function(t){"use strict";function r(){return{value:!1}}function e(t){t&&(t.value=!0)}function n(){}function i(t){return void 0===t.size&&(t.size=t.__iterate(u)),t.size}function o(t,r){if("number"!=typeof r){var e=r>>>0;if(""+e!==r||4294967295===e)return NaN;r=e}return r<0?i(t)+r:r}function u(){return!0}function s(t,r,e){return(0===t&&!h(t)||void 0!==e&&t<=-e)&&(void 0===r||void 0!==e&&r>=e)}function a(t,r){return f(t,r,0)}function c(t,r){return f(t,r,r)}function f(t,r,e){return void 0===t?e:h(t)?r===1/0?r:0|Math.max(0,r+t):void 0===r||r===t?t:0|Math.min(r,t)}function h(t){return t<0||0===t&&1/t==-(1/0)}function p(t){return!(!t||!t[ce])}function _(t){return!(!t||!t[fe])}function l(t){return!(!t||!t[he])}function v(t){return _(t)||l(t)}function y(t){return!(!t||!t[ye])}function d(t){return!(!t||!t[de])}function g(t){return p(t)||d(t)}function m(t){return!(!t||!t[ge])}function w(t,r,e,n){var i=0===t?r:1===t?e:[r,e];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 r=O(t);return r&&r.call(t)}function O(t){var r=t&&(Se&&t[Se]||t[Ie]);if("function"==typeof r)return r}function E(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}function q(){return ke||(ke=new xe([]))}function M(t){var r=Array.isArray(t)?new xe(t):S(t)?new Ue(t):void 0;if(r)return r.fromEntrySeq();if("object"==typeof t)return new je(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function D(t){var r=x(t);if(r)return r;throw new TypeError("Expected Array or collection object of values: "+t)}function A(t){var r=x(t);if(r)return r;if("object"==typeof t)return new je(t)
;throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function x(t){return E(t)?new xe(t):S(t)?new Ue(t):void 0}function j(t){return!(!t||!t[Ke])}function k(t){return j(t)&&m(t)}function R(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function U(t,r){if(t===r||t!==t&&r!==r)return!0;if(!t||!r)return!1;if("function"==typeof t.valueOf&&"function"==typeof r.valueOf){if(t=t.valueOf(),r=r.valueOf(),t===r||t!==t&&r!==r)return!0;if(!t||!r)return!1}return!!(R(t)&&R(r)&&t.equals(r))}function K(t){return t>>>1&1073741824|3221225471&t}function T(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 r=typeof t;if("number"===r){if(t!==t||t===1/0)return 0;var e=0|t;for(e!==t&&(e^=4294967295*t);t>4294967295;)t/=4294967295,e^=t;return K(e)}if("string"===r)return t.length>Pe?L(t):C(t);if("function"==typeof t.hashCode)return K(t.hashCode());if("object"===r||"function"===r)return B(t);if("function"==typeof t.toString)return C(""+t);throw Error("Value type "+r+" cannot be hashed.")}function L(t){var r=Ve[t];return void 0===r&&(r=C(t),Je===He&&(Je=0,Ve={}),Je++,Ve[t]=r),r}function C(t){for(var r=0,e=0;e<t.length;e++)r=31*r+t.charCodeAt(e)|0;return K(r)}function B(t){var r;if(Be&&void 0!==(r=Re.get(t)))return r;if(void 0!==(r=t[Ne]))return r;if(!Ce){if(void 0!==(r=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ne]))return r;if(void 0!==(r=W(t)))return r}if(r=++We,1073741824&We&&(We=0),Be)Re.set(t,r);else{if(void 0!==Le&&Le(t)===!1)throw Error("Non-extensible objects are not allowed as keys.");if(Ce)Object.defineProperty(t,Ne,{enumerable:!1,configurable:!1,writable:!1,value:r});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[Ne]=r;else{
if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Ne]=r}}return r}function W(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 r=at(t);return r._iter=t,r.size=t.size,r.flip=function(){return t},r.reverse=function(){var r=t.reverse.apply(this);return r.flip=function(){return t.reverse()},r},r.has=function(r){return t.includes(r)},r.includes=function(r){return t.has(r)},r.cacheResult=ct,r.__iterateUncached=function(r,e){var n=this;return t.__iterate(function(t,e){return r(e,t,n)!==!1},e)},r.__iteratorUncached=function(r,e){if(r===ze){var n=t.__iterator(r,e);return new Oe(function(){var t=n.next();if(!t.done){var r=t.value[0];t.value[0]=t.value[1],t.value[1]=r}return t})}return t.__iterator(r===we?me:we,e)},r}function P(t,r,e){var n=at(t);return n.size=t.size,n.has=function(r){return t.has(r)},n.get=function(n,i){var o=t.get(n,ae);return o===ae?i:r.call(e,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(r.call(e,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(ze,i);return new Oe(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return w(n,s,r.call(e,u[1],s,t),i)})},n}function H(t,r){var e=this,n=at(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var r=N(t);return r.reverse=function(){return t.flip()},r}),n.get=function(e,n){return t.get(r?e:-1-e,n)},n.has=function(e){return t.has(r?e:-1-e)},n.includes=function(r){return t.includes(r)},n.cacheResult=ct,n.__iterate=function(e,n){var o=this,u=0;return n&&i(t),t.__iterate(function(t,i){return e(t,r?i:n?o.size-++u:u++,o)},!n)},n.__iterator=function(n,o){var u=0;o&&i(t);var s=t.__iterator(ze,!o);return new Oe(function(){var t=s.next();if(t.done)return t;var i=t.value;return w(n,r?i[0]:o?e.size-++u:u++,i[1],t)})},n}function J(t,r,e,n){var i=at(t);return n&&(i.has=function(n){var i=t.get(n,ae)
;return i!==ae&&!!r.call(e,i,n,t)},i.get=function(n,i){var o=t.get(n,ae);return o!==ae&&r.call(e,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){if(r.call(e,t,o,a))return s++,i(t,n?o:s-1,u)},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(ze,o),s=0;return new Oe(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,c=a[0],f=a[1];if(r.call(e,f,c,t))return w(i,n?c:s++,f,o)}})},i}function V(t,r,e){var n=Ge().asMutable();return t.__iterate(function(i,o){n.update(r.call(e,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function Y(t,r,e){var n=_(t),i=(m(t)?yn():Ge()).asMutable();t.__iterate(function(o,u){i.update(r.call(e,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=st(t);return i.map(function(r){return ot(t,o(r))}).asImmutable()}function Q(t,r,e,n){var i=t.size;if(s(r,e,i))return t;var u=a(r,i),f=c(e,i);if(u!==u||f!==f)return Q(t.toSeq().cacheResult(),r,e,n);var h,p=f-u;p===p&&(h=p<0?0:p);var _=at(t);return _.size=0===h?h:t.size&&h||void 0,!n&&y(t)&&h>=0&&(_.get=function(r,e){return r=o(this,r),r>=0&&r<h?t.get(r+u,e):e}),_.__iterateUncached=function(r,e){var i=this;if(0===h)return 0;if(e)return this.cacheResult().__iterate(r,e);var o=0,s=!0,a=0;return t.__iterate(function(t,e){if(!s||!(s=o++<u))return a++,r(t,n?e:a-1,i)!==!1&&a!==h}),a},_.__iteratorUncached=function(r,e){if(0!==h&&e)return this.cacheResult().__iterator(r,e);if(0===h)return new Oe(z);var i=t.__iterator(r,e),o=0,s=0;return new Oe(function(){for(;o++<u;)i.next();if(++s>h)return z();var t=i.next();return n||r===we||t.done?t:r===me?w(r,s-1,void 0,t):w(r,s-1,t.value[1],t)})},_}function X(t,r,e){var n=at(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 r.call(e,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(ze,i),s=!0;return new Oe(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 r.call(e,c,a,o)?n===ze?t:w(n,a,c,t):(s=!1,z())})},n}function F(t,r,e,n){var i=at(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=r.call(e,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(ze,o),a=!0,c=0;return new Oe(function(){var t,o,f;do{if(t=s.next(),t.done)return n||i===we?t:i===me?w(i,c++,void 0,t):w(i,c++,t.value[1],t);var h=t.value;o=h[0],f=h[1],a&&(a=r.call(e,f,o,u))}while(a);return i===ze?t:w(i,o,f,t)})},i}function G(t,r){var e=_(t),n=[t].concat(r).map(function(t){return p(t)?e&&(t=_e(t)):t=e?M(t):D(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||e&&_(i)||l(t)&&l(i))return i}var o=new xe(n);return e?o=o.toKeyedSeq():l(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,r){if(void 0!==t){var e=r.size;if(void 0!==e)return t+e}},0),o}function Z(t,r,e){var n=at(t);return n.__iterateUncached=function(i,o){function u(t,c){t.__iterate(function(t,o){return(!r||c<r)&&p(t)?u(t,c+1):(s++,i(t,e?o:s-1,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 Oe(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===ze&&(a=a[1]),r&&!(u.length<r)||!p(a))return e?t:w(n,s++,a,t);u.push(o),o=a.__iterator(n,i)}else o=u.pop()}return z()})},n}function $(t,r,e){var n=st(t);return t.toSeq().map(function(i,o){return n(r.call(e,i,o,t))}).flatten(!0)}function tt(t,r){var e=at(t);return e.size=t.size&&2*t.size-1,e.__iterateUncached=function(e,n){var i=this,o=0;return t.__iterate(function(t){return(!o||e(r,o++,i)!==!1)&&e(t,o++,i)!==!1},n),o},e.__iteratorUncached=function(e,n){
var i,o=t.__iterator(we,n),u=0;return new Oe(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?w(e,u++,r):w(e,u++,i.value,i)})},e}function rt(t,r,e){r||(r=ft);var n=_(t),i=0,o=t.toSeq().map(function(r,n){return[n,r,i++,e?e(r,n,t):r]}).valueSeq().toArray();return o.sort(function(t,e){return r(t[3],e[3])||t[2]-e[2]}).forEach(n?function(t,r){o[r].length=2}:function(t,r){o[r]=t[1]}),n?Me(o):l(t)?De(o):Ae(o)}function et(t,r,e){if(r||(r=ft),e){var n=t.toSeq().map(function(r,n){return[r,e(r,n,t)]}).reduce(function(t,e){return nt(r,t[1],e[1])?e:t});return n&&n[0]}return t.reduce(function(t,e){return nt(r,t,e)?e:t})}function nt(t,r,e){var n=t(e,r);return 0===n&&e!==r&&(void 0===e||null===e||e!==e)||n>0}function it(t,r,e,n){var i=at(t),o=new xe(e).map(function(t){return t.size});return i.size=n?o.max():o.min(),i.__iterate=function(t,r){for(var e,n=this,i=this.__iterator(we,r),o=0;!(e=i.next()).done&&t(e.value,o++,n)!==!1;);return o},i.__iteratorUncached=function(t,i){var o=e.map(function(t){return t=pe(t),b(i?t.reverse():t)}),u=0,s=!1;return new Oe(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=n?e.every(function(t){return t.done}):e.some(function(t){return t.done})),s?z():w(t,u++,r.apply(null,e.map(function(t){return t.value})))})},i}function ot(t,r){return t===r?t:y(t)?r:t.constructor(r)}function ut(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function st(t){return _(t)?_e:l(t)?le:ve}function at(t){return Object.create((_(t)?Me:l(t)?De:Ae).prototype)}function ct(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):qe.prototype.cacheResult.call(this)}function ft(t,r){return void 0===t&&void 0===r?0:void 0===t?1:void 0===r?-1:t>r?1:t<r?-1:0}function ht(t,r){r=r||0;for(var e=Math.max(0,t.length-r),n=Array(e),i=0;i<e;i++)n[i]=t[i+r];return n}function pt(t,r){if(!t)throw Error(r)}function _t(t){pt(t!==1/0,"Cannot perform this action with an infinite size.")}function lt(t){if(E(t)&&"string"!=typeof t)return t;if(m(t))return t.toArray()
;throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}function vt(t){return t&&(t.constructor&&"Object"===t.constructor.name||void 0===t.constructor)}function yt(t){return"object"==typeof t&&(g(t)||Array.isArray(t)||vt(t))}function dt(t){try{return"string"==typeof t?JSON.stringify(t):t+""}catch(r){return JSON.stringify(t)}}function gt(t,r){return g(t)?t.has(r):yt(t)&&Ee.call(t,r)}function mt(t,r,e){return g(t)?t.get(r,e):gt(t,r)?"function"==typeof t.get?t.get(r):t[r]:e}function wt(t){if(Array.isArray(t))return ht(t);var r={};for(var e in t)Ee.call(t,e)&&(r[e]=t[e]);return r}function zt(t,r){if(!yt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(g(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(r)}if(!Ee.call(t,r))return t;var e=wt(t);return Array.isArray(e)?e.splice(r,1):delete e[r],e}function St(t,r,e){if(!yt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(g(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(r,e)}if(Ee.call(t,r)&&e===t[r])return t;var n=wt(t);return n[r]=e,n}function It(t,r,e,n){n||(n=e,e=void 0);var i=bt(g(t),t,lt(r),0,e,n);return i===ae?e:i}function bt(t,r,e,n,i,o){var u=r===ae;if(n===e.length){var s=u?i:r,a=o(s);return a===s?r:a}if(!u&&!yt(r))throw new TypeError("Cannot update within non-data-structure value in path ["+e.slice(0,n).map(dt)+"]: "+r);var c=e[n],f=u?ae:mt(r,c,ae),h=bt(f===ae?t:g(f),f,e,n+1,i,o);return h===f?r:h===ae?zt(r,c):St(u?t?$t():{}:r,c,h)}function Ot(t,r,e){return It(t,r,ae,function(){return e})}function Et(t,r){return Ot(this,t,r)}function qt(t,r){return It(t,r,function(){return ae})}function Mt(t){return qt(this,t)}function Dt(t,r,e,n){return It(t,[r],e,n)}function At(t,r,e){return 1===arguments.length?t(this):Dt(this,t,r,e)}function xt(t,r,e){return It(this,t,r,e)}function jt(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Rt(this,t)}function kt(t){
for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return Rt(this,r,t)}function Rt(t,r,e){for(var n=[],i=0;i<r.length;i++){var o=_e(r[i]);0!==o.size&&n.push(o)}return 0===n.length?t:0!==t.toSeq().size||t.__ownerID||1!==n.length?t.withMutations(function(t){for(var r=e?function(r,n){Dt(t,n,ae,function(t){return t===ae?r:e(t,r,n)})}:function(r,e){t.set(e,r)},i=0;i<n.length;i++)n[i].forEach(r)}):t.constructor(n[0])}function Ut(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return Bt(t,r)}function Kt(t,r){for(var e=[],n=arguments.length-2;n-- >0;)e[n]=arguments[n+2];return Bt(r,e,t)}function Tt(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return Ct(t,r)}function Lt(t,r){for(var e=[],n=arguments.length-2;n-- >0;)e[n]=arguments[n+2];return Ct(r,e,t)}function Ct(t,r,e){return Bt(t,r,Wt(e))}function Bt(t,r,e){if(!yt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(g(t))return"function"==typeof e&&t.mergeWith?t.mergeWith.apply(t,[e].concat(r)):t.merge?t.merge.apply(t,r):t.concat.apply(t,r);for(var n=Array.isArray(t),i=t,o=n?le:_e,u=n?function(r){i===t&&(i=wt(i)),i.push(r)}:function(r,n){var o=Ee.call(i,n),u=o&&e?e(i[n],r,n):r;o&&u===i[n]||(i===t&&(i=wt(i)),i[n]=u)},s=0;s<r.length;s++)o(r[s]).forEach(u);return i}function Wt(t){function r(e,n,i){return yt(e)&&yt(n)?Bt(e,[n],r):t?t(e,n,i):n}return r}function Nt(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return Ct(this,t)}function Pt(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return Ct(this,r,t)}function Ht(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return It(this,t,$t(),function(t){return Bt(t,r)})}function Jt(t){for(var r=[],e=arguments.length-1;e-- >0;)r[e]=arguments[e+1];return It(this,t,$t(),function(t){return Ct(t,r)})}function Vt(t){var r=this.asMutable();return t(r),r.wasAltered()?r.__ensureOwner(this.__ownerID):this}function Yt(){
return this.__ownerID?this:this.__ensureOwner(new n)}function Qt(){return this.__ensureOwner()}function Xt(){return this.__altered}function Ft(t,r){return w(t,r[0],r[1])}function Gt(t,r){return{node:t,index:0,__prev:r}}function Zt(t,r,e,n){var i=Object.create(Ze);return i.size=t,i._root=r,i.__ownerID=e,i.__hash=n,i.__altered=!1,i}function $t(){return on||(on=Zt(0))}function tr(t,e,n){var i,o;if(t._root){var u=r(),s=r();if(i=rr(t._root,t.__ownerID,0,void 0,e,n,u,s),!s.value)return t;o=t.size+(u.value?n===ae?-1:1:0)}else{if(n===ae)return t;o=1,i=new $e(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Zt(o,i):$t()}function rr(t,r,n,i,o,u,s,a){return t?t.update(r,n,i,o,u,s,a):u===ae?t:(e(a),e(s),new nn(r,i,[o,u]))}function er(t){return t.constructor===nn||t.constructor===en}function nr(t,r,e,n,i){if(t.keyHash===n)return new en(r,n,[t.entry,i]);var o,u=(0===e?t.keyHash:t.keyHash>>>e)&se,s=(0===e?n:n>>>e)&se;return new tn(r,1<<u|1<<s,u===s?[nr(t,r,e+oe,n,i)]:(o=new nn(r,n,i),u<s?[t,o]:[o,t]))}function ir(t,r,e,i){t||(t=new n);for(var o=new nn(t,T(e),[e,i]),u=0;u<r.length;u++){var s=r[u];o=o.update(t,0,void 0,s[0],s[1])}return o}function or(t,r,e,n){for(var i=0,o=0,u=Array(e),s=0,a=1,c=r.length;s<c;s++,a<<=1){var f=r[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new tn(t,i,u)}function ur(t,r,e,n,i){for(var o=0,u=Array(ue),s=0;0!==e;s++,e>>>=1)u[s]=1&e?r[o++]:void 0;return u[n]=i,new rn(t,o+1,u)}function sr(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 ar(t,r,e,n){var i=n?t:ht(t);return i[r]=e,i}function cr(t,r,e,n){var i=t.length+1;if(n&&r+1===i)return t[r]=e,t;for(var o=Array(i),u=0,s=0;s<i;s++)s===r?(o[s]=e,u=-1):o[s]=t[s+u];return o}function fr(t,r,e){var n=t.length-1;if(e&&r===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u<n;u++)u===r&&(o=1),i[u]=t[u+o];return i}function hr(t){return!(!t||!t[fn])}function pr(t,r){function e(t,r,e){return 0===r?n(t,e):i(t,r,e)}function n(t,e){
var n=e===s?a&&a.array:t&&t.array,i=e>o?0:o-e,c=u-e;return c>ue&&(c=ue),function(){if(i===c)return vn;var t=r?--c:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,c=i>o?0:o-i>>n,f=1+(u-i>>n);return f>ue&&(f=ue),function(){for(;;){if(s){var t=s();if(t!==vn)return t;s=null}if(c===f)return vn;var o=r?--f:c++;s=e(a&&a[o],n-oe,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=wr(u),a=t._tail;return e(t._root,t._level,0)}function _r(t,r,e,n,i,o,u){var s=Object.create(pn);return s.size=r-t,s._origin=t,s._capacity=r,s._level=e,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function lr(){return ln||(ln=_r(0,0,oe))}function vr(t,e,n){if((e=o(t,e))!==e)return t;if(e>=t.size||e<0)return t.withMutations(function(t){e<0?mr(t,e).set(0,n):mr(t,0,e+1).set(e,n)});e+=t._origin;var i=t._tail,u=t._root,s=r();return e>=wr(t._capacity)?i=yr(i,t.__ownerID,0,e,n,s):u=yr(u,t.__ownerID,t._level,e,n,s),s.value?t.__ownerID?(t._root=u,t._tail=i,t.__hash=void 0,t.__altered=!0,t):_r(t._origin,t._capacity,t._level,u,i):t}function yr(t,r,n,i,o,u){var s=i>>>n&se,a=t&&s<t.array.length;if(!a&&void 0===o)return t;var c;if(n>0){var f=t&&t.array[s],h=yr(f,r,n-oe,i,o,u);return h===f?t:(c=dr(t,r),c.array[s]=h,c)}return a&&t.array[s]===o?t:(u&&e(u),c=dr(t,r),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function dr(t,r){return r&&t&&r===t.ownerID?t:new _n(t?t.array.slice():[],r)}function gr(t,r){if(r>=wr(t._capacity))return t._tail;if(r<1<<t._level+oe){for(var e=t._root,n=t._level;e&&n>0;)e=e.array[r>>>n&se],n-=oe;return e}}function mr(t,r,e){void 0!==r&&(r|=0),void 0!==e&&(e|=0);var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+r,a=void 0===e?u:e<0?u+e:o+e;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var c=t._level,f=t._root,h=0;s+h<0;)f=new _n(f&&f.array.length?[void 0,f]:[],i),c+=oe,h+=1<<c;h&&(s+=h,o+=h,a+=h,u+=h);for(var p=wr(u),_=wr(a);_>=1<<c+oe;)f=new _n(f&&f.array.length?[f]:[],i),c+=oe;var l=t._tail,v=_<p?gr(t,a-1):_>p?new _n([],i):l;if(l&&_>p&&s<u&&l.array.length){f=dr(f,i)
;for(var y=f,d=c;d>oe;d-=oe){var g=p>>>d&se;y=y.array[g]=dr(y.array[g],i)}y.array[p>>>oe&se]=l}if(a<u&&(v=v&&v.removeAfter(i,0,a)),s>=_)s-=_,a-=_,c=oe,f=null,v=v&&v.removeBefore(i,0,s);else if(s>o||_<p){for(h=0;f;){var m=s>>>c&se;if(m!==_>>>c&se)break;m&&(h+=(1<<c)*m),c-=oe,f=f.array[m]}f&&s>o&&(f=f.removeBefore(i,c,s-h)),f&&_<p&&(f=f.removeAfter(i,c,_-h)),h&&(s-=h,a-=h)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=c,t._root=f,t._tail=v,t.__hash=void 0,t.__altered=!0,t):_r(s,a,c,f,v)}function wr(t){return t<ue?0:t-1>>>oe<<oe}function zr(t,r,e,n){var i=Object.create(yn.prototype);return i.size=t?t.size:0,i._map=t,i._list=r,i.__ownerID=e,i.__hash=n,i}function Sr(){return dn||(dn=zr($t(),lr()))}function Ir(t,r,e){var n,i,o=t._map,u=t._list,s=o.get(r),a=void 0!==s;if(e===ae){if(!a)return t;u.size>=ue&&u.size>=2*o.size?(i=u.filter(function(t,r){return void 0!==t&&s!==r}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(r),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(e===u.get(s)[1])return t;n=o,i=u.set(s,[r,e])}else n=o.set(r,u.size),i=u.set(u.size,[r,e]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):zr(n,i)}function br(t){return!(!t||!t[gn])}function Or(t,r,e,n){var i=Object.create(wn);return i.size=t,i._head=r,i.__ownerID=e,i.__hash=n,i.__altered=!1,i}function Er(){return zn||(zn=Or(0))}function qr(t){return!(!t||!t[Sn])}function Mr(t){return qr(t)&&m(t)}function Dr(t,r){if(t===r)return!0;if(!p(r)||void 0!==t.size&&void 0!==r.size&&t.size!==r.size||void 0!==t.__hash&&void 0!==r.__hash&&t.__hash!==r.__hash||_(t)!==_(r)||l(t)!==l(r)||m(t)!==m(r))return!1;if(0===t.size&&0===r.size)return!0;var e=!v(t);if(m(t)){var n=t.entries();return r.every(function(t,r){var i=n.next().value;return i&&U(i[1],t)&&(e||U(i[0],r))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===r.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=r,r=o}var u=!0,s=r.__iterate(function(r,n){
if(e?!t.has(r):i?!U(r,t.get(n,ae)):!U(t.get(n,ae),r))return u=!1,!1});return u&&t.size===s}function Ar(t,r){var e=function(e){t.prototype[e]=r[e]};return Object.keys(r).forEach(e),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(r).forEach(e),t}function xr(t){if(!t||"object"!=typeof t)return t;if(!p(t)){if(!yt(t))return t;t=qe(t)}if(_(t)){var r={};return t.__iterate(function(t,e){r[e]=xr(t)}),r}var e=[];return t.__iterate(function(t){e.push(xr(t))}),e}function jr(t,r){return t.__ownerID?(t.size=r.size,t._map=r,t):r===t._map?t:0===r.size?t.__empty():t.__make(r)}function kr(t,r){var e=Object.create(bn);return e.size=t?t.size:0,e._map=t,e.__ownerID=r,e}function Rr(){return On||(On=kr($t()))}function Ur(t,r,e){for(var n=lt(r),i=0;i!==n.length;)if((t=mt(t,n[i++],ae))===ae)return e;return t}function Kr(t,r){return Ur(this,t,r)}function Tr(t,r){return Ur(t,r,ae)!==ae}function Lr(t){return Tr(this,t)}function Cr(){_t(this.size);var t={};return this.__iterate(function(r,e){t[e]=r}),t}function Br(t,r,e,n,i,o){return _t(t.size),t.__iterate(function(t,o,u){i?(i=!1,e=t):e=r.call(n,e,t,o,u)},o),e}function Wr(t,r){return r}function Nr(t,r){return[r,t]}function Pr(t){return function(){return!t.apply(this,arguments)}}function Hr(t){return function(){return-t.apply(this,arguments)}}function Jr(){return ht(arguments)}function Vr(t,r){return t<r?1:t>r?-1:0}function Yr(t){if(t.size===1/0)return 0;var r=m(t),e=_(t),n=r?1:0;return Qr(t.__iterate(e?r?function(t,r){n=31*n+Xr(T(t),T(r))|0}:function(t,r){n=n+Xr(T(t),T(r))|0}:r?function(t){n=31*n+T(t)|0}:function(t){n=n+T(t)|0}),n)}function Qr(t,r){return r=Te(r,3432918353),r=Te(r<<15|r>>>-15,461845907),r=Te(r<<13|r>>>-13,5),r=(r+3864292196|0)^t,r=Te(r^r>>>16,2246822507),r=Te(r^r>>>13,3266489909),r=K(r^r>>>16)}function Xr(t,r){return t^r+2654435769+(t<<6)+(t>>2)|0}function Fr(t,r){var e=Object.create(jn);return e.size=t?t.size:0,e._map=t,e.__ownerID=r,e}function Gr(){return kn||(kn=Fr(Sr()))}function Zr(t,r,e){var n=Object.create(Object.getPrototypeOf(t));return n._values=r,
n.__ownerID=e,n}function $r(t){return t._name||t.constructor.name||"Record"}function te(t){return M(t._keys.map(function(r){return[r,t.get(r)]}))}function re(t,r){try{Object.defineProperty(t,r,{get:function(){return this.get(r)},set:function(t){pt(this.__ownerID,"Cannot set on an immutable record."),this.set(r,t)}})}catch(t){}}function ee(t,r){return ne([],r||ie,t,"",r&&r.length>2?[]:void 0,{"":t})}function ne(t,r,e,n,i,o){var u=Array.isArray(e)?De:vt(e)?Me:null;if(u){if(~t.indexOf(e))throw new TypeError("Cannot convert circular structure to Immutable");t.push(e),i&&""!==n&&i.push(n);var s=r.call(o,n,u(e).map(function(n,o){return ne(t,r,n,o,i,e)}),i&&i.slice());return t.pop(),i&&i.pop(),s}return e}function ie(t,r){return _(r)?r.toMap():r.toList()}var oe=5,ue=1<<oe,se=ue-1,ae={},ce="@@__IMMUTABLE_ITERABLE__@@",fe="@@__IMMUTABLE_KEYED__@@",he="@@__IMMUTABLE_INDEXED__@@",pe=function(t){return p(t)?t:qe(t)},_e=function(t){function r(t){return _(t)?t:Me(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(pe),le=function(t){function r(t){return l(t)?t:De(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(pe),ve=function(t){function r(t){return p(t)&&!v(t)?t:Ae(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r}(pe);pe.Keyed=_e,pe.Indexed=le,pe.Set=ve;var ye="@@__IMMUTABLE_SEQ__@@",de="@@__IMMUTABLE_RECORD__@@",ge="@@__IMMUTABLE_ORDERED__@@",me=0,we=1,ze=2,Se="function"==typeof Symbol&&Symbol.iterator,Ie="@@iterator",be=Se||Ie,Oe=function(t){this.next=t};Oe.prototype.toString=function(){return"[Iterator]"},Oe.KEYS=me,Oe.VALUES=we,Oe.ENTRIES=ze,Oe.prototype.inspect=Oe.prototype.toSource=function(){return""+this},Oe.prototype[be]=function(){return this};var Ee=Object.prototype.hasOwnProperty,qe=function(t){function r(t){return null===t||void 0===t?q():g(t)?t.toSeq():A(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,
r.prototype.toSeq=function(){return this},r.prototype.toString=function(){return this.__toString("Seq {","}")},r.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},r.prototype.__iterate=function(t,r){var e=this,n=this._cache;if(n){for(var i=n.length,o=0;o!==i;){var u=n[r?i-++o:o++];if(t(u[1],u[0],e)===!1)break}return o}return this.__iterateUncached(t,r)},r.prototype.__iterator=function(t,r){var e=this._cache;if(e){var n=e.length,i=0;return new Oe(function(){if(i===n)return z();var o=e[r?n-++i:i++];return w(t,o[0],o[1])})}return this.__iteratorUncached(t,r)},r}(pe),Me=function(t){function r(t){return null===t||void 0===t?q().toKeyedSeq():p(t)?_(t)?t.toSeq():t.fromEntrySeq():d(t)?t.toSeq():M(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toKeyedSeq=function(){return this},r}(qe),De=function(t){function r(t){return null===t||void 0===t?q():p(t)?_(t)?t.entrySeq():t.toIndexedSeq():d(t)?t.toSeq().entrySeq():D(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return r(arguments)},r.prototype.toIndexedSeq=function(){return this},r.prototype.toString=function(){return this.__toString("Seq [","]")},r}(qe),Ae=function(t){function r(t){return(p(t)&&!v(t)?t:De(t)).toSetSeq()}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return r(arguments)},r.prototype.toSetSeq=function(){return this},r}(qe);qe.isSeq=y,qe.Keyed=Me,qe.Set=Ae,qe.Indexed=De,qe.prototype[ye]=!0;var xe=function(t){function r(t){this._array=t,this.size=t.length}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return this.has(t)?this._array[o(this,t)]:r},r.prototype.__iterate=function(t,r){for(var e=this,n=this._array,i=n.length,o=0;o!==i;){var u=r?i-++o:o++;if(t(n[u],u,e)===!1)break}return o},
r.prototype.__iterator=function(t,r){var e=this._array,n=e.length,i=0;return new Oe(function(){if(i===n)return z();var o=r?n-++i:i++;return w(t,o,e[o])})},r}(De),je=function(t){function r(t){var r=Object.keys(t);this._object=t,this._keys=r,this.size=r.length}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return void 0===r||this.has(t)?this._object[t]:r},r.prototype.has=function(t){return Ee.call(this._object,t)},r.prototype.__iterate=function(t,r){for(var e=this,n=this._object,i=this._keys,o=i.length,u=0;u!==o;){var s=i[r?o-++u:u++];if(t(n[s],s,e)===!1)break}return u},r.prototype.__iterator=function(t,r){var e=this._object,n=this._keys,i=n.length,o=0;return new Oe(function(){if(o===i)return z();var u=n[r?i-++o:o++];return w(t,u,e[u])})},r}(Me);je.prototype[ge]=!0;var ke,Re,Ue=function(t){function r(t){this._collection=t,this.size=t.length||t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.__iterateUncached=function(t,r){var e=this;if(r)return this.cacheResult().__iterate(t,r);var n=this._collection,i=b(n),o=0;if(I(i))for(var u;!(u=i.next()).done&&t(u.value,o++,e)!==!1;);return o},r.prototype.__iteratorUncached=function(t,r){if(r)return this.cacheResult().__iterator(t,r);var e=this._collection,n=b(e);if(!I(n))return new Oe(z);var i=0;return new Oe(function(){var r=n.next();return r.done?r:w(t,i++,r.value)})},r}(De),Ke="@@__IMMUTABLE_MAP__@@",Te="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(t,r){t|=0,r|=0;var e=65535&t,n=65535&r;return e*n+((t>>>16)*n+e*(r>>>16)<<16>>>0)|0},Le=Object.isExtensible,Ce=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Be="function"==typeof WeakMap;Be&&(Re=new WeakMap);var We=0,Ne="__immutablehash__";"function"==typeof Symbol&&(Ne=Symbol(Ne));var Pe=16,He=255,Je=0,Ve={},Ye=function(t){function r(t,r){this._iter=t,this._useKeys=r,this.size=t.size}return t&&(r.__proto__=t),
r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.get=function(t,r){return this._iter.get(t,r)},r.prototype.has=function(t){return this._iter.has(t)},r.prototype.valueSeq=function(){return this._iter.valueSeq()},r.prototype.reverse=function(){var t=this,r=H(this,!0);return this._useKeys||(r.valueSeq=function(){return t._iter.toSeq().reverse()}),r},r.prototype.map=function(t,r){var e=this,n=P(this,t,r);return this._useKeys||(n.valueSeq=function(){return e._iter.toSeq().map(t,r)}),n},r.prototype.__iterate=function(t,r){var e=this;return this._iter.__iterate(function(r,n){return t(r,n,e)},r)},r.prototype.__iterator=function(t,r){return this._iter.__iterator(t,r)},r}(Me);Ye.prototype[ge]=!0;var Qe=function(t){function r(t){this._iter=t,this.size=t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.includes=function(t){return this._iter.includes(t)},r.prototype.__iterate=function(t,r){var e=this,n=0;return r&&i(this),this._iter.__iterate(function(i){return t(i,r?e.size-++n:n++,e)},r)},r.prototype.__iterator=function(t,r){var e=this,n=this._iter.__iterator(we,r),o=0;return r&&i(this),new Oe(function(){var i=n.next();return i.done?i:w(t,r?e.size-++o:o++,i.value,i)})},r}(De),Xe=function(t){function r(t){this._iter=t,this.size=t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.has=function(t){return this._iter.includes(t)},r.prototype.__iterate=function(t,r){var e=this;return this._iter.__iterate(function(r){return t(r,r,e)},r)},r.prototype.__iterator=function(t,r){var e=this._iter.__iterator(we,r);return new Oe(function(){var r=e.next();return r.done?r:w(t,r.value,r.value,r)})},r}(Ae),Fe=function(t){function r(t){this._iter=t,this.size=t.size}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.entrySeq=function(){return this._iter.toSeq()},r.prototype.__iterate=function(t,r){var e=this
;return this._iter.__iterate(function(r){if(r){ut(r);var n=p(r);return t(n?r.get(1):r[1],n?r.get(0):r[0],e)}},r)},r.prototype.__iterator=function(t,r){var e=this._iter.__iterator(we,r);return new Oe(function(){for(;;){var r=e.next();if(r.done)return r;var n=r.value;if(n){ut(n);var i=p(n);return w(t,i?n.get(0):n[0],i?n.get(1):n[1],r)}}})},r}(Me);Qe.prototype.cacheResult=Ye.prototype.cacheResult=Xe.prototype.cacheResult=Fe.prototype.cacheResult=ct;var Ge=function(t){function r(r){return null===r||void 0===r?$t():j(r)&&!m(r)?r:$t().withMutations(function(e){var n=t(r);_t(n.size),n.forEach(function(t,r){return e.set(r,t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return $t().withMutations(function(r){for(var e=0;e<t.length;e+=2){if(e+1>=t.length)throw Error("Missing value for key: "+t[e]);r.set(t[e],t[e+1])}})},r.prototype.toString=function(){return this.__toString("Map {","}")},r.prototype.get=function(t,r){return this._root?this._root.get(0,void 0,t,r):r},r.prototype.set=function(t,r){return tr(this,t,r)},r.prototype.remove=function(t){return tr(this,t,ae)},r.prototype.deleteAll=function(t){var r=pe(t);return 0===r.size?this:this.withMutations(function(t){r.forEach(function(r){return t.remove(r)})})},r.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):$t()},r.prototype.sort=function(t){return yn(rt(this,t))},r.prototype.sortBy=function(t,r){return yn(rt(this,r,t))},r.prototype.map=function(t,r){return this.withMutations(function(e){e.forEach(function(n,i){e.set(i,t.call(r,n,i,e))})})},r.prototype.__iterator=function(t,r){return new un(this,t,r)},r.prototype.__iterate=function(t,r){var e=this,n=0;return this._root&&this._root.iterate(function(r){return n++,t(r[1],r[0],e)},r),n},r.prototype.__ensureOwner=function(t){
return t===this.__ownerID?this:t?Zt(this.size,this._root,t,this.__hash):0===this.size?$t():(this.__ownerID=t,this.__altered=!1,this)},r}(_e);Ge.isMap=j;var Ze=Ge.prototype;Ze[Ke]=!0,Ze.delete=Ze.remove,Ze.removeAll=Ze.deleteAll,Ze.setIn=Et,Ze.removeIn=Ze.deleteIn=Mt,Ze.update=At,Ze.updateIn=xt,Ze.merge=Ze.concat=jt,Ze.mergeWith=kt,Ze.mergeDeep=Nt,Ze.mergeDeepWith=Pt,Ze.mergeIn=Ht,Ze.mergeDeepIn=Jt,Ze.withMutations=Vt,Ze.wasAltered=Xt,Ze.asImmutable=Qt,Ze["@@transducer/init"]=Ze.asMutable=Yt,Ze["@@transducer/step"]=function(t,r){return t.set(r[0],r[1])},Ze["@@transducer/result"]=function(t){return t.asImmutable()};var $e=function(t,r){this.ownerID=t,this.entries=r};$e.prototype.get=function(t,r,e,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(U(e,i[o][0]))return i[o][1];return n},$e.prototype.update=function(t,r,n,i,o,u,s){for(var a=o===ae,c=this.entries,f=0,h=c.length;f<h&&!U(i,c[f][0]);f++);var p=f<h;if(p?c[f][1]===o:a)return this;if(e(s),(a||!p)&&e(u),!a||1!==c.length){if(!p&&!a&&c.length>=sn)return ir(t,c,i,o);var _=t&&t===this.ownerID,l=_?c:ht(c);return p?a?f===h-1?l.pop():l[f]=l.pop():l[f]=[i,o]:l.push([i,o]),_?(this.entries=l,this):new $e(t,l)}};var tn=function(t,r,e){this.ownerID=t,this.bitmap=r,this.nodes=e};tn.prototype.get=function(t,r,e,n){void 0===r&&(r=T(e));var i=1<<((0===t?r:r>>>t)&se),o=this.bitmap;return 0==(o&i)?n:this.nodes[sr(o&i-1)].get(t+oe,r,e,n)},tn.prototype.update=function(t,r,e,n,i,o,u){void 0===e&&(e=T(n));var s=(0===r?e:e>>>r)&se,a=1<<s,c=this.bitmap,f=0!=(c&a);if(!f&&i===ae)return this;var h=sr(c&a-1),p=this.nodes,_=f?p[h]:void 0,l=rr(_,t,r+oe,e,n,i,o,u);if(l===_)return this;if(!f&&l&&p.length>=an)return ur(t,p,c,s,l);if(f&&!l&&2===p.length&&er(p[1^h]))return p[1^h];if(f&&l&&1===p.length&&er(l))return l;var v=t&&t===this.ownerID,y=f?l?c:c^a:c|a,d=f?l?ar(p,h,l,v):fr(p,h,v):cr(p,h,l,v);return v?(this.bitmap=y,this.nodes=d,this):new tn(t,y,d)};var rn=function(t,r,e){this.ownerID=t,this.count=r,this.nodes=e};rn.prototype.get=function(t,r,e,n){void 0===r&&(r=T(e))
;var i=(0===t?r:r>>>t)&se,o=this.nodes[i];return o?o.get(t+oe,r,e,n):n},rn.prototype.update=function(t,r,e,n,i,o,u){void 0===e&&(e=T(n));var s=(0===r?e:e>>>r)&se,a=i===ae,c=this.nodes,f=c[s];if(a&&!f)return this;var h=rr(f,t,r+oe,e,n,i,o,u);if(h===f)return this;var p=this.count;if(f){if(!h&&--p<cn)return or(t,c,p,s)}else p++;var _=t&&t===this.ownerID,l=ar(c,s,h,_);return _?(this.count=p,this.nodes=l,this):new rn(t,p,l)};var en=function(t,r,e){this.ownerID=t,this.keyHash=r,this.entries=e};en.prototype.get=function(t,r,e,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(U(e,i[o][0]))return i[o][1];return n},en.prototype.update=function(t,r,n,i,o,u,s){void 0===n&&(n=T(i));var a=o===ae;if(n!==this.keyHash)return a?this:(e(s),e(u),nr(this,t,r,n,[i,o]));for(var c=this.entries,f=0,h=c.length;f<h&&!U(i,c[f][0]);f++);var p=f<h;if(p?c[f][1]===o:a)return this;if(e(s),(a||!p)&&e(u),a&&2===h)return new nn(t,this.keyHash,c[1^f]);var _=t&&t===this.ownerID,l=_?c:ht(c);return p?a?f===h-1?l.pop():l[f]=l.pop():l[f]=[i,o]:l.push([i,o]),_?(this.entries=l,this):new en(t,this.keyHash,l)};var nn=function(t,r,e){this.ownerID=t,this.keyHash=r,this.entry=e};nn.prototype.get=function(t,r,e,n){return U(e,this.entry[0])?this.entry[1]:n},nn.prototype.update=function(t,r,n,i,o,u,s){var a=o===ae,c=U(i,this.entry[0]);return(c?o===this.entry[1]:a)?this:(e(s),a?void e(u):c?t&&t===this.ownerID?(this.entry[1]=o,this):new nn(t,this.keyHash,[i,o]):(e(u),nr(this,t,r,T(i),[i,o])))},$e.prototype.iterate=en.prototype.iterate=function(t,r){for(var e=this.entries,n=0,i=e.length-1;n<=i;n++)if(t(e[r?i-n:n])===!1)return!1},tn.prototype.iterate=rn.prototype.iterate=function(t,r){for(var e=this.nodes,n=0,i=e.length-1;n<=i;n++){var o=e[r?i-n:n];if(o&&o.iterate(t,r)===!1)return!1}},nn.prototype.iterate=function(t,r){return t(this.entry)};var on,un=function(t){function r(t,r,e){this._type=r,this._reverse=e,this._stack=t._root&&Gt(t._root)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.next=function(){
for(var t=this,r=this._type,e=this._stack;e;){var n=e.node,i=e.index++,o=void 0;if(n.entry){if(0===i)return Ft(r,n.entry)}else if(n.entries){if(o=n.entries.length-1,i<=o)return Ft(r,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 Ft(r,u.entry);e=t._stack=Gt(u,e)}continue}e=t._stack=t._stack.__prev}return z()},r}(Oe),sn=ue/4,an=ue/2,cn=ue/4,fn="@@__IMMUTABLE_LIST__@@",hn=function(t){function r(r){var e=lr();if(null===r||void 0===r)return e;if(hr(r))return r;var n=t(r),i=n.size;return 0===i?e:(_t(i),i>0&&i<ue?_r(0,i,oe,null,new _n(n.toArray())):e.withMutations(function(t){t.setSize(i),n.forEach(function(r,e){return t.set(e,r)})}))}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.prototype.toString=function(){return this.__toString("List [","]")},r.prototype.get=function(t,r){if((t=o(this,t))>=0&&t<this.size){t+=this._origin;var e=gr(this,t);return e&&e.array[t&se]}return r},r.prototype.set=function(t,r){return vr(this,t,r)},r.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},r.prototype.insert=function(t,r){return this.splice(t,0,r)},r.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=oe,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):lr()},r.prototype.push=function(){var t=arguments,r=this.size;return this.withMutations(function(e){mr(e,0,r+t.length);for(var n=0;n<t.length;n++)e.set(r+n,t[n])})},r.prototype.pop=function(){return mr(this,0,-1)},r.prototype.unshift=function(){var t=arguments;return this.withMutations(function(r){mr(r,-t.length);for(var e=0;e<t.length;e++)r.set(e,t[e])})},r.prototype.shift=function(){return mr(this,1)},r.prototype.concat=function(){for(var r=arguments,e=[],n=0;n<arguments.length;n++){var i=r[n],o=t("string"!=typeof i&&S(i)?i:[i]);0!==o.size&&e.push(o)}
return 0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){e.forEach(function(r){return r.forEach(function(r){return t.push(r)})})}):this.constructor(e[0])},r.prototype.setSize=function(t){return mr(this,0,t)},r.prototype.map=function(t,r){var e=this;return this.withMutations(function(n){for(var i=0;i<e.size;i++)n.set(i,t.call(r,n.get(i),i,n))})},r.prototype.slice=function(t,r){var e=this.size;return s(t,r,e)?this:mr(this,a(t,e),c(r,e))},r.prototype.__iterator=function(t,r){var e=r?this.size:0,n=pr(this,r);return new Oe(function(){var i=n();return i===vn?z():w(t,r?--e:e++,i)})},r.prototype.__iterate=function(t,r){for(var e,n=this,i=r?this.size:0,o=pr(this,r);(e=o())!==vn&&t(e,r?--i:i++,n)!==!1;);return i},r.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?_r(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?lr():(this.__ownerID=t,this.__altered=!1,this)},r}(le);hn.isList=hr;var pn=hn.prototype;pn[fn]=!0,pn.delete=pn.remove,pn.merge=pn.concat,pn.setIn=Et,pn.deleteIn=pn.removeIn=Mt,pn.update=At,pn.updateIn=xt,pn.mergeIn=Ht,pn.mergeDeepIn=Jt,pn.withMutations=Vt,pn.wasAltered=Xt,pn.asImmutable=Qt,pn["@@transducer/init"]=pn.asMutable=Yt,pn["@@transducer/step"]=function(t,r){return t.push(r)},pn["@@transducer/result"]=function(t){return t.asImmutable()};var _n=function(t,r){this.array=t,this.ownerID=r};_n.prototype.removeBefore=function(t,r,e){if(e===r?1<<r:0===this.array.length)return this;var n=e>>>r&se;if(n>=this.array.length)return new _n([],t);var i,o=0===n;if(r>0){var u=this.array[n];if((i=u&&u.removeBefore(t,r-oe,e))===u&&o)return this}if(o&&!i)return this;var s=dr(this,t);if(!o)for(var a=0;a<n;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},_n.prototype.removeAfter=function(t,r,e){if(e===(r?1<<r:0)||0===this.array.length)return this;var n=e-1>>>r&se;if(n>=this.array.length)return this;var i;if(r>0){var o=this.array[n];if((i=o&&o.removeAfter(t,r-oe,e))===o&&n===this.array.length-1)return this}var u=dr(this,t)
;return u.array.splice(n+1),i&&(u.array[n]=i),u};var ln,vn={},yn=function(t){function r(t){return null===t||void 0===t?Sr():k(t)?t:Sr().withMutations(function(r){var e=_e(t);_t(e.size),e.forEach(function(t,e){return r.set(e,t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.prototype.toString=function(){return this.__toString("OrderedMap {","}")},r.prototype.get=function(t,r){var e=this._map.get(t);return void 0!==e?this._list.get(e)[1]:r},r.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Sr()},r.prototype.set=function(t,r){return Ir(this,t,r)},r.prototype.remove=function(t){return Ir(this,t,ae)},r.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},r.prototype.__iterate=function(t,r){var e=this;return this._list.__iterate(function(r){return r&&t(r[1],r[0],e)},r)},r.prototype.__iterator=function(t,r){return this._list.fromEntrySeq().__iterator(t,r)},r.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._map.__ensureOwner(t),e=this._list.__ensureOwner(t);return t?zr(r,e,t,this.__hash):0===this.size?Sr():(this.__ownerID=t,this._map=r,this._list=e,this)},r}(Ge);yn.isOrderedMap=k,yn.prototype[ge]=!0,yn.prototype.delete=yn.prototype.remove;var dn,gn="@@__IMMUTABLE_STACK__@@",mn=function(t){function r(t){return null===t||void 0===t?Er():br(t)?t:Er().pushAll(t)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.prototype.toString=function(){return this.__toString("Stack [","]")},r.prototype.get=function(t,r){var e=this._head;for(t=o(this,t);e&&t--;)e=e.next;return e?e.value:r},r.prototype.peek=function(){return this._head&&this._head.value},r.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var r=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={
value:t[n],next:e};return this.__ownerID?(this.size=r,this._head=e,this.__hash=void 0,this.__altered=!0,this):Or(r,e)},r.prototype.pushAll=function(r){if(r=t(r),0===r.size)return this;if(0===this.size&&br(r))return r;_t(r.size);var e=this.size,n=this._head;return r.__iterate(function(t){e++,n={value:t,next:n}},!0),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Or(e,n)},r.prototype.pop=function(){return this.slice(1)},r.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):Er()},r.prototype.slice=function(r,e){if(s(r,e,this.size))return this;var n=a(r,this.size);if(c(e,this.size)!==this.size)return t.prototype.slice.call(this,r,e);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):Or(i,o)},r.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Or(this.size,this._head,t,this.__hash):0===this.size?Er():(this.__ownerID=t,this.__altered=!1,this)},r.prototype.__iterate=function(t,r){var e=this;if(r)return new xe(this.toArray()).__iterate(function(r,n){return t(r,n,e)},r);for(var n=0,i=this._head;i&&t(i.value,n++,e)!==!1;)i=i.next;return n},r.prototype.__iterator=function(t,r){if(r)return new xe(this.toArray()).__iterator(t,r);var e=0,n=this._head;return new Oe(function(){if(n){var r=n.value;return n=n.next,w(t,e++,r)}return z()})},r}(le);mn.isStack=br;var wn=mn.prototype;wn[gn]=!0,wn.shift=wn.pop,wn.unshift=wn.push,wn.unshiftAll=wn.pushAll,wn.withMutations=Vt,wn.wasAltered=Xt,wn.asImmutable=Qt,wn["@@transducer/init"]=wn.asMutable=Yt,wn["@@transducer/step"]=function(t,r){return t.unshift(r)},wn["@@transducer/result"]=function(t){return t.asImmutable()};var zn,Sn="@@__IMMUTABLE_SET__@@",In=function(t){function r(r){return null===r||void 0===r?Rr():qr(r)&&!m(r)?r:Rr().withMutations(function(e){var n=t(r);_t(n.size),n.forEach(function(t){return e.add(t)})})}return t&&(r.__proto__=t),
r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.fromKeys=function(t){return this(_e(t).keySeq())},r.intersect=function(t){return t=pe(t).toArray(),t.length?bn.intersect.apply(r(t.pop()),t):Rr()},r.union=function(t){return t=pe(t).toArray(),t.length?bn.union.apply(r(t.pop()),t):Rr()},r.prototype.toString=function(){return this.__toString("Set {","}")},r.prototype.has=function(t){return this._map.has(t)},r.prototype.add=function(t){return jr(this,this._map.set(t,t))},r.prototype.remove=function(t){return jr(this,this._map.remove(t))},r.prototype.clear=function(){return jr(this,this._map.clear())},r.prototype.map=function(t,r){var e=this;return jr(this,this._map.map(function(r){return t(r,r,e)},r))},r.prototype.union=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return r=r.filter(function(t){return 0!==t.size}),0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(e){for(var n=0;n<r.length;n++)t(r[n]).forEach(function(t){return e.add(t)})}):this.constructor(r[0])},r.prototype.intersect=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(0===r.length)return this;r=r.map(function(r){return t(r)});var n=[];return this.forEach(function(t){r.every(function(r){return r.includes(t)})||n.push(t)}),this.withMutations(function(t){n.forEach(function(r){t.remove(r)})})},r.prototype.subtract=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(0===r.length)return this;r=r.map(function(r){return t(r)});var n=[];return this.forEach(function(t){r.some(function(r){return r.includes(t)})&&n.push(t)}),this.withMutations(function(t){n.forEach(function(r){t.remove(r)})})},r.prototype.sort=function(t){return xn(rt(this,t))},r.prototype.sortBy=function(t,r){return xn(rt(this,r,t))},r.prototype.wasAltered=function(){return this._map.wasAltered()},r.prototype.__iterate=function(t,r){var e=this;return this._map.__iterate(function(r){return t(r,r,e)},r)},r.prototype.__iterator=function(t,r){
return this._map.__iterator(t,r)},r.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._map.__ensureOwner(t);return t?this.__make(r,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=r,this)},r}(ve);In.isSet=qr;var bn=In.prototype;bn[Sn]=!0,bn.delete=bn.remove,bn.merge=bn.concat=bn.union,bn.withMutations=Vt,bn.asImmutable=Qt,bn["@@transducer/init"]=bn.asMutable=Yt,bn["@@transducer/step"]=function(t,r){return t.add(r)},bn["@@transducer/result"]=function(t){return t.asImmutable()},bn.__empty=Rr,bn.__make=kr;var On,En,qn=function(t){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);if(pt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,0===(this.size=Math.max(0,Math.ceil((e-t)/n-1)+1))){if(En)return En;En=this}}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},r.prototype.get=function(t,r){return this.has(t)?this._start+o(this,t)*this._step:r},r.prototype.includes=function(t){var r=(t-this._start)/this._step;return r>=0&&r<this.size&&r===Math.floor(r)},r.prototype.slice=function(t,e){return s(t,e,this.size)?this:(t=a(t,this.size),e=c(e,this.size),e<=t?new r(0,0):new r(this.get(t,this._end),this.get(e,this._end),this._step))},r.prototype.indexOf=function(t){var r=t-this._start;if(r%this._step==0){var e=r/this._step;if(e>=0&&e<this.size)return e}return-1},r.prototype.lastIndexOf=function(t){return this.indexOf(t)},r.prototype.__iterate=function(t,r){for(var e=this,n=this.size,i=this._step,o=r?this._start+(n-1)*i:this._start,u=0;u!==n&&t(o,r?n-++u:u++,e)!==!1;)o+=r?-i:i;return u},r.prototype.__iterator=function(t,r){var e=this.size,n=this._step,i=r?this._start+(e-1)*n:this._start,o=0;return new Oe(function(){if(o===e)return z();var u=i;return i+=r?-n:n,w(t,r?e-++o:o++,u)})},
r.prototype.equals=function(t){return t instanceof r?this._start===t._start&&this._end===t._end&&this._step===t._step:Dr(this,t)},r}(De);pe.isIterable=p,pe.isKeyed=_,pe.isIndexed=l,pe.isAssociative=v,pe.isOrdered=m,pe.Iterator=Oe,Ar(pe,{toArray:function(){_t(this.size);var t=Array(this.size||0),r=_(this),e=0;return this.__iterate(function(n,i){t[e++]=r?[i,n]:n}),t},toIndexedSeq:function(){return new Qe(this)},toJS:function(){return xr(this)},toKeyedSeq:function(){return new Ye(this,!0)},toMap:function(){return Ge(this.toKeyedSeq())},toObject:Cr,toOrderedMap:function(){return yn(this.toKeyedSeq())},toOrderedSet:function(){return xn(_(this)?this.valueSeq():this)},toSet:function(){return In(_(this)?this.valueSeq():this)},toSetSeq:function(){return new Xe(this)},toSeq:function(){return l(this)?this.toIndexedSeq():_(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return mn(_(this)?this.valueSeq():this)},toList:function(){return hn(_(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,r){return 0===this.size?t+r:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+r},concat:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return ot(this,G(this,t))},includes:function(t){return this.some(function(r){return U(r,t)})},entries:function(){return this.__iterator(ze)},every:function(t,r){_t(this.size);var e=!0;return this.__iterate(function(n,i,o){if(!t.call(r,n,i,o))return e=!1,!1}),e},filter:function(t,r){return ot(this,J(this,t,r,!0))},find:function(t,r,e){var n=this.findEntry(t,r);return n?n[1]:e},forEach:function(t,r){return _t(this.size),this.__iterate(r?t.bind(r):t)},join:function(t){_t(this.size),t=void 0!==t?""+t:",";var r="",e=!0;return this.__iterate(function(n){e?e=!1:r+=t,r+=null!==n&&void 0!==n?""+n:""}),r},keys:function(){return this.__iterator(me)},map:function(t,r){return ot(this,P(this,t,r))},reduce:function(t,r,e){return Br(this,t,r,e,arguments.length<2,!1)},reduceRight:function(t,r,e){return Br(this,t,r,e,arguments.length<2,!0)},
reverse:function(){return ot(this,H(this,!0))},slice:function(t,r){return ot(this,Q(this,t,r,!0))},some:function(t,r){return!this.every(Pr(t),r)},sort:function(t){return ot(this,rt(this,t))},values:function(){return this.__iterator(we)},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,r){return i(t?this.toSeq().filter(t,r):this)},countBy:function(t,r){return V(this,t,r)},equals:function(t){return Dr(this,t)},entrySeq:function(){var t=this;if(t._cache)return new xe(t._cache);var r=t.toSeq().map(Nr).toIndexedSeq();return r.fromEntrySeq=function(){return t.toSeq()},r},filterNot:function(t,r){return this.filter(Pr(t),r)},findEntry:function(t,r,e){var n=e;return this.__iterate(function(e,i,o){if(t.call(r,e,i,o))return n=[i,e],!1}),n},findKey:function(t,r){var e=this.findEntry(t,r);return e&&e[0]},findLast:function(t,r,e){return this.toKeyedSeq().reverse().find(t,r,e)},findLastEntry:function(t,r,e){return this.toKeyedSeq().reverse().findEntry(t,r,e)},findLastKey:function(t,r){return this.toKeyedSeq().reverse().findKey(t,r)},first:function(t){return this.find(u,null,t)},flatMap:function(t,r){return ot(this,$(this,t,r))},flatten:function(t){return ot(this,Z(this,t,!0))},fromEntrySeq:function(){return new Fe(this)},get:function(t,r){return this.find(function(r,e){return U(e,t)},void 0,r)},getIn:Kr,groupBy:function(t,r){return Y(this,t,r)},has:function(t){return this.get(t,ae)!==ae},hasIn:Lr,isSubset:function(t){return t="function"==typeof t.includes?t:pe(t),this.every(function(r){return t.includes(r)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:pe(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(r){return U(r,t)})},keySeq:function(){return this.toSeq().map(Wr).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return et(this,t)},maxBy:function(t,r){return et(this,r,t)},
min:function(t){return et(this,t?Hr(t):Vr)},minBy:function(t,r){return et(this,r?Hr(r):Vr,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,r){return ot(this,F(this,t,r,!0))},skipUntil:function(t,r){return this.skipWhile(Pr(t),r)},sortBy:function(t,r){return ot(this,rt(this,r,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,r){return ot(this,X(this,t,r))},takeUntil:function(t,r){return this.takeWhile(Pr(t),r)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Yr(this))}});var Mn=pe.prototype;Mn[ce]=!0,Mn[be]=Mn.values,Mn.toJSON=Mn.toArray,Mn.__toStringMapper=dt,Mn.inspect=Mn.toSource=function(){return""+this},Mn.chain=Mn.flatMap,Mn.contains=Mn.includes,Ar(_e,{flip:function(){return ot(this,N(this))},mapEntries:function(t,r){var e=this,n=0;return ot(this,this.toSeq().map(function(i,o){return t.call(r,[o,i],n++,e)}).fromEntrySeq())},mapKeys:function(t,r){var e=this;return ot(this,this.toSeq().flip().map(function(n,i){return t.call(r,n,i,e)}).flip())}});var Dn=_e.prototype;Dn[fe]=!0,Dn[be]=Mn.entries,Dn.toJSON=Cr,Dn.__toStringMapper=function(t,r){return dt(r)+": "+dt(t)},Ar(le,{toKeyedSeq:function(){return new Ye(this,!1)},filter:function(t,r){return ot(this,J(this,t,r,!1))},findIndex:function(t,r){var e=this.findEntry(t,r);return e?e[0]:-1},indexOf:function(t){var r=this.keyOf(t);return void 0===r?-1:r},lastIndexOf:function(t){var r=this.lastKeyOf(t);return void 0===r?-1:r},reverse:function(){return ot(this,H(this,!1))},slice:function(t,r){return ot(this,Q(this,t,r,!1))},splice:function(t,r){var e=arguments.length;if(r=Math.max(r||0,0),0===e||2===e&&!r)return this;t=a(t,t<0?this.count():this.size);var n=this.slice(0,t);return ot(this,1===e?n:n.concat(ht(arguments,2),this.slice(t+r)))},
findLastIndex:function(t,r){var e=this.findLastEntry(t,r);return e?e[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ot(this,Z(this,t,!1))},get:function(t,r){return t=o(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?r:this.find(function(r,e){return e===t},void 0,r)},has:function(t){return(t=o(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return ot(this,tt(this,t))},interleave:function(){var t=[this].concat(ht(arguments)),r=it(this.toSeq(),De.of,t),e=r.flatten(!0);return r.size&&(e.size=r.size*t.length),ot(this,e)},keySeq:function(){return qn(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,r){return ot(this,F(this,t,r,!1))},zip:function(){return ot(this,it(this,Jr,[this].concat(ht(arguments))))},zipAll:function(){return ot(this,it(this,Jr,[this].concat(ht(arguments)),!0))},zipWith:function(t){var r=ht(arguments);return r[0]=this,ot(this,it(this,t,r))}});var An=le.prototype;An[he]=!0,An[ge]=!0,Ar(ve,{get:function(t,r){return this.has(t)?t:r},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),ve.prototype.has=Mn.includes,ve.prototype.contains=ve.prototype.includes,Ar(Me,_e.prototype),Ar(De,le.prototype),Ar(Ae,ve.prototype);var xn=function(t){function r(t){return null===t||void 0===t?Gr():Mr(t)?t:Gr().withMutations(function(r){var e=ve(t);_t(e.size),e.forEach(function(t){return r.add(t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.fromKeys=function(t){return this(_e(t).keySeq())},r.prototype.toString=function(){return this.__toString("OrderedSet {","}")},r}(In);xn.isOrderedSet=Mr;var jn=xn.prototype;jn[ge]=!0,jn.zip=An.zip,jn.zipWith=An.zipWith,jn.__empty=Gr,jn.__make=Fr;var kn,Rn=function(t,r){var e,n=function(o){var u=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!e){e=!0;var s=Object.keys(t),a=i._indices={};i._name=r,i._keys=s,
i._defaultValues=t;for(var c=0;c<s.length;c++){var f=s[c];a[f]=c,i[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+$r(u)+' with property "'+f+'" since that property name is part of the Record API.'):re(i,f)}}this.__ownerID=void 0,this._values=hn().withMutations(function(t){t.setSize(u._keys.length),_e(o).forEach(function(r,e){t.set(u._indices[e],r===u._defaultValues[e]?void 0:r)})})},i=n.prototype=Object.create(Un);return i.constructor=n,n};Rn.prototype.toString=function(){for(var t,r=this,e=$r(this)+" { ",n=this._keys,i=0,o=n.length;i!==o;i++)t=n[i],e+=(i?", ":"")+t+": "+dt(r.get(t));return e+" }"},Rn.prototype.equals=function(t){return this===t||t&&this._keys===t._keys&&te(this).equals(te(t))},Rn.prototype.hashCode=function(){return te(this).hashCode()},Rn.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Rn.prototype.get=function(t,r){if(!this.has(t))return r;var e=this._indices[t],n=this._values.get(e);return void 0===n?this._defaultValues[t]:n},Rn.prototype.set=function(t,r){if(this.has(t)){var e=this._values.set(this._indices[t],r===this._defaultValues[t]?void 0:r);if(e!==this._values&&!this.__ownerID)return Zr(this,e)}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:Zr(this,t)},Rn.prototype.wasAltered=function(){return this._values.wasAltered()},Rn.prototype.toSeq=function(){return te(this)},Rn.prototype.toJS=function(){return xr(this)},Rn.prototype.entries=function(){return this.__iterator(ze)},Rn.prototype.__iterator=function(t,r){return te(this).__iterator(t,r)},Rn.prototype.__iterate=function(t,r){return te(this).__iterate(t,r)},Rn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._values.__ensureOwner(t);return t?Zr(this,r,t):(this.__ownerID=t,this._values=r,this)},Rn.isRecord=d,Rn.getDescriptiveName=$r;var Un=Rn.prototype;Un[de]=!0,Un.delete=Un.remove,Un.deleteIn=Un.removeIn=Mt,Un.getIn=Kr,
Un.hasIn=Mn.hasIn,Un.merge=jt,Un.mergeWith=kt,Un.mergeIn=Ht,Un.mergeDeep=Nt,Un.mergeDeepWith=Pt,Un.mergeDeepIn=Jt,Un.setIn=Et,Un.update=At,Un.updateIn=xt,Un.withMutations=Vt,Un.asMutable=Yt,Un.asImmutable=Qt,Un[be]=Un.entries,Un.toJSON=Un.toObject=Mn.toObject,Un.inspect=Un.toSource=function(){return""+this};var Kn,Tn=function(t){function r(t,e){if(!(this instanceof r))return new r(t,e);if(this._value=t,0===(this.size=void 0===e?1/0:Math.max(0,e))){if(Kn)return Kn;Kn=this}}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},r.prototype.get=function(t,r){return this.has(t)?this._value:r},r.prototype.includes=function(t){return U(this._value,t)},r.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new r(this._value,c(e,n)-a(t,n))},r.prototype.reverse=function(){return this},r.prototype.indexOf=function(t){return U(this._value,t)?0:-1},r.prototype.lastIndexOf=function(t){return U(this._value,t)?this.size:-1},r.prototype.__iterate=function(t,r){for(var e=this,n=this.size,i=0;i!==n&&t(e._value,r?n-++i:i++,e)!==!1;);return i},r.prototype.__iterator=function(t,r){var e=this,n=this.size,i=0;return new Oe(function(){return i===n?z():w(t,r?n-++i:i++,e._value)})},r.prototype.equals=function(t){return t instanceof r?U(this._value,t._value):Dr(t)},r}(De),Ln={version:"4.0.0-rc.10",Collection:pe,Iterable:pe,Seq:qe,Map:Ge,OrderedMap:yn,List:hn,Stack:mn,Set:In,OrderedSet:xn,Record:Rn,Range:qn,Repeat:Tn,is:U,fromJS:ee,hash:T,isImmutable:g,isCollection:p,isKeyed:_,isIndexed:l,isAssociative:v,isOrdered:m,isValueObject:R,isSeq:y,isList:hr,isMap:j,isOrderedMap:k,isStack:br,isSet:qr,isOrderedSet:Mr,isRecord:d,get:mt,getIn:Ur,has:gt,hasIn:Tr,merge:Ut,mergeDeep:Tt,mergeWith:Kt,mergeDeepWith:Lt,remove:zt,removeIn:qt,set:St,setIn:Ot,update:Dt,updateIn:It},Cn=pe;t.default=Ln,t.version="4.0.0-rc.10",t.Collection=pe,t.Iterable=Cn,t.Seq=qe,t.Map=Ge,t.OrderedMap=yn,t.List=hn,
t.Stack=mn,t.Set=In,t.OrderedSet=xn,t.Record=Rn,t.Range=qn,t.Repeat=Tn,t.is=U,t.fromJS=ee,t.hash=T,t.isImmutable=g,t.isCollection=p,t.isKeyed=_,t.isIndexed=l,t.isAssociative=v,t.isOrdered=m,t.isValueObject=R,t.get=mt,t.getIn=Ur,t.has=gt,t.hasIn=Tr,t.merge=Ut,t.mergeDeep=Tt,t.mergeWith=Kt,t.mergeDeepWith=Lt,t.remove=zt,t.removeIn=qt,t.set=St,t.setIn=Ot,t.update=Dt,t.updateIn=It,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "immutable",
"version": "4.0.0-rc.9",
"version": "4.0.0-rc.10",
"description": "Immutable Data Collections",

@@ -24,88 +24,2 @@ "license": "MIT",

},
"scripts": {
"build": "run-s build:*",
"build:dist": "run-s clean:dist bundle:dist bundle:es copy:dist stats:dist",
"build:pages": "gulp --gulpfile gulpfile.js default",
"stats:dist": "node ./resources/dist-stats.js",
"clean:dist": "rimraf dist",
"bundle:dist": "rollup -c ./resources/rollup-config.js",
"bundle:es": "rollup -c ./resources/rollup-config-es.js",
"copy:dist": "node ./resources/copy-dist-typedefs.js",
"lint": "run-s lint:*",
"lint:ts": "tslint \"__tests__/**/*.ts\"",
"lint:js": "eslint \"{__tests__,src,pages/src,pages/lib}/**/*.js\"",
"format": "prettier --single-quote --write \"{__tests__,src,pages/src,pages/lib}/**/*.js\"",
"testonly": "./resources/jest",
"test": "run-s format build lint testonly test:types:*",
"test:travis": "npm run test && ./resources/check-changes",
"test:types:ts": "dtslint type-definitions/ts-tests",
"test:types:flow": "flow check type-definitions/tests --include-warnings",
"perf": "node ./resources/bench.js",
"start": "gulp --gulpfile gulpfile.js dev",
"deploy": "./resources/deploy-ghpages.sh",
"gitpublish": "./resources/gitpublish.sh"
},
"jest": {
"moduleFileExtensions": [
"js",
"ts"
],
"transform": {
"^.+\\.ts$": "<rootDir>/resources/jestPreprocessor.js"
},
"testRegex": "/__tests__/.*\\.(ts|js)$",
"unmockedModulePathPatterns": [
"./node_modules/react"
]
},
"devDependencies": {
"benchmark": "2.1.4",
"browser-sync": "2.18.13",
"browserify": "14.4.0",
"colors": "1.1.2",
"del": "3.0.0",
"dtslint": "0.1.2",
"eslint": "4.8.0",
"eslint-config-airbnb": "15.1.0",
"eslint-config-prettier": "2.6.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "5.1.1",
"eslint-plugin-prettier": "2.3.1",
"eslint-plugin-react": "7.4.0",
"flow-bin": "0.56.0",
"gulp": "3.9.1",
"gulp-concat": "2.6.1",
"gulp-filter": "5.0.1",
"gulp-header": "1.8.9",
"gulp-less": "3.3.2",
"gulp-size": "2.1.0",
"gulp-sourcemaps": "2.6.1",
"gulp-uglify": "2.1.0",
"gulp-util": "3.0.8",
"jasmine-check": "0.1.5",
"jest": "21.2.1",
"marked": "0.3.6",
"microtime": "2.1.6",
"mkdirp": "0.5.1",
"npm-run-all": "4.1.1",
"prettier": "1.7.4",
"react": "^0.12.0",
"react-router": "^0.11.2",
"react-tools": "0.13.3",
"rimraf": "2.6.2",
"rollup": "0.50.0",
"rollup-plugin-buble": "0.16.0",
"rollup-plugin-commonjs": "8.2.1",
"rollup-plugin-json": "2.3.0",
"rollup-plugin-strip-banner": "0.2.0",
"run-sequence": "2.2.0",
"through2": "2.0.3",
"transducers-js": "^0.4.174",
"tslint": "5.7.0",
"typescript": "2.5.3",
"uglify-js": "2.8.11",
"uglify-save-license": "0.4.1",
"vinyl-buffer": "1.0.0",
"vinyl-source-stream": "1.1.0"
},
"files": [

@@ -130,2 +44,2 @@ "dist",

"dependencies": {}
}
}
Immutable collections for JavaScript
====================================
[![Build Status](https://travis-ci.org/facebook/immutable-js.svg?branch=master)](https://travis-ci.org/facebook/immutable-js)
[![Build Status](https://travis-ci.org/facebook/immutable-js.svg?branch=master)](https://travis-ci.org/facebook/immutable-js) [![Join the chat at https://gitter.im/immutable-js/Lobby](https://badges.gitter.im/immutable-js/Lobby.svg)](https://gitter.im/immutable-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

@@ -46,6 +46,6 @@ [Immutable][] data cannot be changed once created, leading to much simpler

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

@@ -72,3 +72,3 @@

<script>
var map1 = Immutable.Map({a:1, b:2, c:3});
var map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
var map2 = map1.set('b', 50);

@@ -84,3 +84,3 @@ map1.get('b'); // 2

require(['./immutable.min.js'], function (Immutable) {
var map1 = Immutable.Map({a:1, b:2, c:3});
var map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
var map2 = map1.set('b', 50);

@@ -114,3 +114,3 @@ map1.get('b'); // 2

const map2 = map1.set('b', 50);
map1.get('b') + " vs. " + map2.get('b') // 2 vs. 50
map1.get('b') + " vs. " + map2.get('b'); // 2 vs. 50
```

@@ -127,3 +127,3 @@

var map1: Immutable.Map<string, number>;
map1 = Immutable.Map({a:1, b:2, c:3});
map1 = Immutable.Map({ a: 1, b: 2, c: 3 });
var map2 = map1.set('b', 50);

@@ -160,14 +160,12 @@ map1.get('b'); // 2

treat Immutable.js collections as values, it's important to use the
`Immutable.is()` function or `.equals()` method to determine value equality
instead of the `===` operator which determines object reference identity.
`Immutable.is()` function or `.equals()` method to determine *value equality*
instead of the `===` operator which determines object *reference identity*.
<!-- runkit:activate -->
```js
const { Map } = require('immutable')
const map1 = Map( {a: 1, b: 2, c: 3 })
const map2 = map1.set('b', 2)
assert.equal(map1, map2) // uses map1.equals
assert.strictEqual(map1, map2) // uses ===
const map3 = map1.set('b', 50)
assert.notEqual(map1, map3) // uses map1.equals
const { Map } = require('immutable');
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = Map({ a: 1, b: 2, c: 3 });
map1.equals(map2); // true
map1 === map2; // false
```

@@ -183,2 +181,10 @@

<!-- runkit:activate -->
```js
const { Map } = require('immutable');
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = map1.set('b', 2); // Set to same value
map1 === map2; // true
```
If an object is immutable, it can be "copied" simply by making another reference

@@ -191,5 +197,5 @@ to it instead of copying the entire object. Because a reference is much smaller

```js
const { Map } = require('immutable')
const map1 = Map({ a: 1, b: 2, c: 3 })
const clone = map1;
const { Map } = require('immutable');
const map = Map({ a: 1, b: 2, c: 3 });
const mapCopy = map; // Look, "copies" are free!
```

@@ -221,3 +227,3 @@

```js
const { List } = require('immutable')
const { List } = require('immutable');
const list1 = List([ 1, 2 ]);

@@ -241,3 +247,3 @@ const list2 = list1.push(3, 4, 5);

```js
const { Map } = require('immutable')
const { Map } = require('immutable');
const alpha = Map({ a: 1, b: 2, c: 3, d: 4 });

@@ -251,3 +257,3 @@ alpha.map((v, k) => k.toUpperCase()).join();

Designed to inter-operate with your existing JavaScript, Immutable.js
accepts plain JavaScript Arrays and Objects anywhere a method expects an
accepts plain JavaScript Arrays and Objects anywhere a method expects a
`Collection`.

@@ -257,12 +263,12 @@

```js
const { Map, List } = 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 { Map, List } = 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 }
const list1 = List([ 1, 2, 3 ])
const list2 = List([ 4, 5, 6 ])
const array = [ 7, 8, 9 ]
const list3 = list1.concat(list2, array)
const list1 = List([ 1, 2, 3 ]);
const list2 = List([ 4, 5, 6 ]);
const array = [ 7, 8, 9 ];
const list3 = list1.concat(list2, array);
// List [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]

@@ -279,4 +285,4 @@ ```

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

@@ -292,10 +298,10 @@ // { a: 1, b: 4, c: 9 }

```js
const { fromJS } = require('immutable')
const { fromJS } = require('immutable');
const obj = { 1: "one" }
Object.keys(obj) // [ "1" ]
assert.equal(obj["1"], obj[1]) // "one" === "one"
const obj = { 1: "one" };
console.log(Object.keys(obj)); // [ "1" ]
console.log(obj["1"], obj[1]); // "one", "one"
const map = fromJS(obj)
assert.notEqual(map.get("1"), map.get(1)) // "one" !== undefined
const map = fromJS(obj);
console.log(map.get("1"), map.get(1)); // "one", undefined
```

@@ -313,12 +319,13 @@

All Immutable Collections also implement `toJSON()` allowing them to be passed
to `JSON.stringify` directly.
to `JSON.stringify` directly. They also respect the custom `toJSON()` methods of
nested objects.
<!-- runkit:activate -->
```js
const { Map, List } = require('immutable')
const deep = Map({ a: 1, b: 2, c: List([ 3, 4, 5 ]) })
console.log(deep.toObject()) // { a: 1, b: 2, c: List [ 3, 4, 5 ] }
console.log(deep.toArray()) // [ 1, 2, List [ 3, 4, 5 ] ]
console.log(deep.toJS()) // { a: 1, b: 2, c: [ 3, 4, 5 ] }
JSON.stringify(deep) // '{"a":1,"b":2,"c":[3,4,5]}'
const { Map, List } = require('immutable');
const deep = Map({ a: 1, b: 2, c: List([ 3, 4, 5 ]) });
console.log(deep.toObject()); // { a: 1, b: 2, c: List [ 3, 4, 5 ] }
console.log(deep.toArray()); // [ 1, 2, List [ 3, 4, 5 ] ]
console.log(deep.toJS()); // { a: 1, b: 2, c: [ 3, 4, 5 ] }
JSON.stringify(deep); // '{"a":1,"b":2,"c":[3,4,5]}'
```

@@ -349,5 +356,5 @@

```js
const { List } = require('immutable')
const aList = List([ 1, 2, 3 ])
const anArray = [ 0, ...aList, 4, 5 ] // [ 0, 1, 2, 3, 4, 5 ]
const { List } = require('immutable');
const aList = List([ 1, 2, 3 ]);
const anArray = [ 0, ...aList, 4, 5 ]; // [ 0, 1, 2, 3, 4, 5 ]
```

@@ -372,4 +379,4 @@

```js
const { fromJS } = require('immutable')
const nested = fromJS({ a: { b: { c: [ 3, 4, 5 ] } } })
const { fromJS } = require('immutable');
const nested = fromJS({ a: { b: { c: [ 3, 4, 5 ] } } });
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ] } } }

@@ -384,15 +391,15 @@ ```

```js
const { fromJS } = require('immutable')
const nested = fromJS({ a: { b: { c: [ 3, 4, 5 ] } } })
const { fromJS } = require('immutable');
const nested = fromJS({ a: { b: { c: [ 3, 4, 5 ] } } });
const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } })
const nested2 = nested.mergeDeep({ a: { b: { d: 6 } } });
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 6 } } }
console.log(nested2.getIn([ 'a', 'b', 'd' ])) // 6
console.log(nested2.getIn([ 'a', 'b', 'd' ])); // 6
const nested3 = nested2.updateIn([ 'a', 'b', 'd' ], value => value + 1)
const nested3 = nested2.updateIn([ 'a', 'b', 'd' ], value => value + 1);
console.log(nested3);
// Map { a: Map { b: Map { c: List [ 3, 4, 5 ], d: 7 } } }
const 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 } } }

@@ -417,12 +424,12 @@ ```

// First consider:
const obj1 = { a: 1, b: 2, c: 3 }
const obj2 = { a: 1, b: 2, c: 3 }
obj1 !== obj2 // two different instances are always not equal with ===
const obj1 = { a: 1, b: 2, c: 3 };
const obj2 = { a: 1, b: 2, c: 3 };
obj1 !== obj2; // two different instances are always not equal with ===
const { Map, is } = require('immutable')
const map1 = Map({ a: 1, b: 2, c: 3 })
const map2 = Map({ a: 1, b: 2, c: 3 })
map1 !== map2 // two different instances are not reference-equal
map1.equals(map2) // but are value-equal if they have the same values
is(map1, map2) // alternatively can use the is() function
const { Map, is } = require('immutable');
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = Map({ a: 1, b: 2, c: 3 });
map1 !== map2; // two different instances are not reference-equal
map1.equals(map2); // but are value-equal if they have the same values
is(map1, map2); // alternatively can use the is() function
```

@@ -435,7 +442,7 @@

```js
const { Map, Set } = require('immutable')
const map1 = Map({ a: 1, b: 2, c: 3 })
const map2 = Map({ a: 1, b: 2, c: 3 })
const set = Set().add(map1)
set.has(map2) // true because these are value-equal
const { Map, Set } = require('immutable');
const map1 = Map({ a: 1, b: 2, c: 3 });
const map2 = Map({ a: 1, b: 2, c: 3 });
const set = Set().add(map1);
set.has(map2); // true because these are value-equal
```

@@ -475,6 +482,6 @@

```js
const { Map } = require('immutable')
const originalMap = Map({ a: 1, b: 2, c: 3 })
const updatedMap = originalMap.set('b', 2)
updatedMap === originalMap // No-op .set() returned the original reference.
const { Map } = require('immutable');
const originalMap = Map({ a: 1, b: 2, c: 3 });
const updatedMap = originalMap.set('b', 2);
updatedMap === originalMap; // No-op .set() returned the original reference.
```

@@ -488,12 +495,12 @@

```js
const { Map } = require('immutable')
const originalMap = Map({ a: 1, b: 2, c: 3 })
const updatedMap = originalMap.set('b', 1000)
const { Map } = require('immutable');
const originalMap = Map({ a: 1, b: 2, c: 3 });
const updatedMap = originalMap.set('b', 1000);
// New instance, leaving the original immutable.
updatedMap !== originalMap
const anotherUpdatedMap = originalMap.set('b', 1000)
updatedMap !== originalMap;
const anotherUpdatedMap = originalMap.set('b', 1000);
// Despite both the results of the same operation, each created a new reference.
anotherUpdatedMap !== updatedMap
anotherUpdatedMap !== updatedMap;
// However the two are value equal.
anotherUpdatedMap.equals(updatedMap)
anotherUpdatedMap.equals(updatedMap);
```

@@ -523,3 +530,3 @@

```js
const { List } = require('immutable')
const { List } = require('immutable');
const list1 = List([ 1, 2, 3 ]);

@@ -564,6 +571,6 @@ const list2 = list1.withMutations(function (list) {

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

@@ -583,5 +590,5 @@

```js
const { Map } = require('immutable')
const map = Map({ a: 1, b: 2, c: 3 }
const lazySeq = Seq(map)
const { Map, Seq } = require('immutable');
const map = Map({ a: 1, b: 2, c: 3 });
const lazySeq = Seq(map);
```

@@ -596,3 +603,3 @@

.map(key => key.toUpperCase())
.flip()
.flip();
// Seq { A: 1, B: 1, C: 1 }

@@ -606,3 +613,3 @@ ```

```js
const { Range } = require('immutable')
const { Range } = require('immutable');
Range(1, Infinity)

@@ -613,3 +620,3 @@ .skip(1000)

.take(2)
.reduce((r, n) => r * n, 1)
.reduce((r, n) => r * n, 1);
// 1006008

@@ -642,3 +649,3 @@ ```

We actively welcome pull requests, learn how to [contribute](./.github/CONTRIBUTING.md).
We actively welcome pull requests, learn how to [contribute](https://github.com/facebook/immutable-js/blob/master/.github/CONTRIBUTING.md).

@@ -645,0 +652,0 @@

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 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc