immutable 4.0.0-rc.8 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,38 +1,55 @@
1
1
  /**
2
- * Copyright (c) 2014-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
2
+ * MIT License
3
+ *
4
+ * Copyright (c) 2014-present, Lee Byron and other contributors.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
6
23
  */
7
- !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)
8
- ;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:
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){
10
- 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
11
- ;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){
12
- 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)}
13
- 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){
14
- 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){
15
- 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
16
- ;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,
17
- 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,
18
- 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){
19
- 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)},
20
- 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},
21
- 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
22
- ;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}
23
- 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){
24
- 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){
25
- 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,
26
- 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)}
27
- 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){
28
- 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)},
29
- 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){
30
- 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)
31
- ;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,
32
- 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(){
33
- 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){
34
- 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),
35
- 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,
36
- 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,
37
- 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.8",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.8",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,
38
- 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})});
24
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Immutable={})}(this,function(t){"use strict";var e="delete",d=5,l=1<<d,g=l-1,v={};function u(){return{value:!1}}function _(t){t&&(t.value=!0)}function m(){}function c(t){return void 0===t.size&&(t.size=t.__iterate(r)),t.size}function h(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295==r)return NaN;e=r}return e<0?c(t)+e:e}function r(){return!0}function p(t,e,r){return(0===t&&!i(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&r<=e)}function y(t,e){return n(t,e,0)}function w(t,e){return n(t,e,e)}function n(t,e,r){return void 0===t?r:i(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function i(t){return t<0||0===t&&1/t==-1/0}var o="@@__IMMUTABLE_ITERABLE__@@";function f(t){return!(!t||!t[o])}var s="@@__IMMUTABLE_KEYED__@@";function a(t){return!(!t||!t[s])}var S="@@__IMMUTABLE_INDEXED__@@";function z(t){return!(!t||!t[S])}function b(t){return a(t)||z(t)}function I(t){return f(t)?t:F(t)}var O=function(t){function e(t){return a(t)?t:G(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I),E=function(t){function e(t){return z(t)?t:Z(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I),j=function(t){function e(t){return f(t)&&!b(t)?t:$(t)}return e.__proto__=t,(e.prototype=Object.create(t.prototype)).constructor=e}(I);I.Keyed=O,I.Indexed=E,I.Set=j;var q="@@__IMMUTABLE_SEQ__@@";function M(t){return!(!t||!t[q])}var D="@@__IMMUTABLE_RECORD__@@";function x(t){return!(!t||!t[D])}function A(t){return f(t)||x(t)}var k="@@__IMMUTABLE_ORDERED__@@";function R(t){return!(!t||!t[k])}var U=0,K=1,T=2,C="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=C||L,P=function(t){this.next=t};function W(t,e,r,n){r=0===t?e:1===t?r:[e,r];return n?n.value=r:n={value:r,done:!1},n}function N(){return{value:void 0,done:!0}}function H(t){return Array.isArray(t
25
+ )||Y(t)}function J(t){return t&&"function"==typeof t.next}function V(t){var e=Y(t);return e&&e.call(t)}function Y(t){t=t&&(C&&t[C]||t[L]);if("function"==typeof t)return t}P.prototype.toString=function(){return"[Iterator]"},P.KEYS=U,P.VALUES=K,P.ENTRIES=T,P.prototype.inspect=P.prototype.toSource=function(){return""+this},P.prototype[B]=function(){return this};var Q=Object.prototype.hasOwnProperty;function X(t){return Array.isArray(t)||"string"==typeof t||t&&"object"==typeof t&&Number.isInteger(t.length)&&0<=t.length&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var F=function(t){function e(t){return null==t?it():A(t)?t.toSeq():function(t){var e=st(t);if(e)return function(t){var e=Y(t);return e&&e===t.entries}(t)?e.fromEntrySeq():function(t){var e=Y(t);return e&&e===t.keys}(t)?e.toSetSeq():e;if("object"!=typeof t)throw new TypeError("Expected Array or collection object of values, or keyed object: "+t);return new et(t)}(t)}return e.__proto__=t,((e.prototype=Object.create(t.prototype)).constructor=e).prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(e,r){var n=this._cache;if(n){var i=n.length,o=0;return new P(function(){if(o===i)return N();var t=n[r?i-++o:o++];return W(e,t[0],t[1])})}return this.__iteratorUncached(e,r)},e}(I),G=function(t){function e(t){return null==t?it().toKeyedSeq():f(t)?a(t)?t.toSeq():t.fromEntrySeq():x(t)?t.toSeq():ot(t)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.toKeyedSeq=function(){return this},e}(F),Z=function(t){function e(t){return null==t?it():f(t)?a(t)?t.entrySeq():t.toIndexedSeq():x(t
26
+ )?t.toSeq().entrySeq():ut(t)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(F),$=function(t){function e(t){return(f(t)&&!b(t)?t:Z(t)).toSetSeq()}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(F);F.isSeq=M,F.Keyed=G,F.Set=$,F.Indexed=Z,F.prototype[q]=!0;var tt=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.get=function(t,e){return this.has(t)?this._array[h(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(e,r){var n=this._array,i=n.length,o=0;return new P(function(){if(o===i)return N();var t=r?i-++o:o++;return W(e,t,n[t])})},e}(Z),et=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return Q.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var u=n[e?i-++o:o++];if(!1===t(r[u],u,this))break}return o},e.prototype.__iterator=function(e,r){var n=this._object,i=this._keys,o=i.length,u=0;return new P(function(){if(u===o)return N();var t=i[r?o-++u:u++];return W(e,t,n[t])})},e}(G);et.prototype[k]=!0;var rt,nt=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__iterateUncached=function(t,e){
27
+ if(e)return this.cacheResult().__iterate(t,e);var r,n=V(this._collection),i=0;if(J(n))for(;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},e.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=V(this._collection);if(!J(r))return new P(N);var n=0;return new P(function(){var t=r.next();return t.done?t:W(e,n++,t.value)})},e}(Z);function it(){return rt=rt||new tt([])}function ot(t){var e=st(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new et(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function ut(t){var e=st(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function st(t){return X(t)?new tt(t):H(t)?new nt(t):void 0}var at="@@__IMMUTABLE_MAP__@@";function ct(t){return!(!t||!t[at])}function ft(t){return ct(t)&&R(t)}function ht(t){return!(!t||"function"!=typeof t.equals||"function"!=typeof t.hashCode)}function _t(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(ht(t)&&ht(e)&&t.equals(e))}var pt="function"==typeof Math.imul&&-2==Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function lt(t){return t>>>1&1073741824|3221225471&t}var vt=Object.prototype.valueOf;function yt(t){if(null==t)return dt(t);if("function"==typeof t.hashCode)return lt(t.hashCode(t));var e,r=(e=t).valueOf!==vt&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return dt(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;4294967295<t;)e^=t/=4294967295;return lt(e)}(r);case"string":return(jt<r.length?function(t){var e=Dt[t];void 0===e&&(e=gt(t),Mt===qt&&(Mt=0,Dt={}),Mt++,Dt[t]=e);return e}:gt)(r);case"object":case"function":return function(t){
28
+ var e;if(bt&&void 0!==(e=zt.get(t)))return e;if(void 0!==(e=t[Et]))return e;if(!wt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Et]))return e;if(void 0!==(e=function(t){if(t&&0<t.nodeType)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=St(),bt)zt.set(t,e);else{if(void 0!==mt&&!1===mt(t))throw Error("Non-extensible objects are not allowed as keys.");if(wt)Object.defineProperty(t,Et,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Et]=e;else{if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[Et]=e}}return e}(r);case"symbol":return void 0===(e=It[t=r])?(e=St(),It[t]=e):e;default:if("function"==typeof r.toString)return gt(""+r);throw Error("Value type "+typeof r+" cannot be hashed.")}}function dt(t){return null===t?1108378658:1108378659}function gt(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return lt(e)}var mt=Object.isExtensible,wt=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function St(){var t=++Ot;return 1073741824&Ot&&(Ot=0),t}var zt,bt="function"==typeof WeakMap;bt&&(zt=new WeakMap);var It=Object.create(null),Ot=0,Et="__immutablehash__";"function"==typeof Symbol&&(Et=Symbol(Et));var jt=16,qt=255,Mt=0,Dt={},xt=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=Tt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},
29
+ e.prototype.map=function(t,e){var r=this,n=Kt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(r,t){var n=this;return this._iter.__iterate(function(t,e){return r(t,e,n)},t)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(G);xt.prototype[k]=!0;var At=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(e,r){var n=this,i=0;return r&&c(this),this._iter.__iterate(function(t){return e(t,r?n.size-++i:i++,n)},r)},e.prototype.__iterator=function(e,r){var n=this,i=this._iter.__iterator(K,r),o=0;return r&&c(this),new P(function(){var t=i.next();return t.done?t:W(e,r?n.size-++o:o++,t.value,t)})},e}(Z),kt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t){return e(t,t,r)},t)},e.prototype.__iterator=function(e,t){var r=this._iter.__iterator(K,t);return new P(function(){var t=r.next();return t.done?t:W(e,t.value,t.value,t)})},e}($),Rt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(r,t){var n=this;return this._iter.__iterate(function(t){if(t){Yt(t);var e=f(t);return r(e?t.get(1):t[1],e?t.get(0):t[0],n)}},t)},e.prototype.__iterator=function(n,t){var i=this._iter.__iterator(K,t);return new P(function(){for(;;){var t=i.next();if(t.done)return t;var e=t.value;if(e){Yt(e);var r=f(e);return W(n,r?e.get(0):e[0],r?e.get(1):e[1],t)}}})},e}(G);function Ut(i){var t=Xt(i);return t._iter=i,t.size=i.size,t.flip=function(){return i},t.reverse=function(){
30
+ var t=i.reverse.apply(this);return t.flip=function(){return i.reverse()},t},t.has=function(t){return i.includes(t)},t.includes=function(t){return i.has(t)},t.cacheResult=Ft,t.__iterateUncached=function(r,t){var n=this;return i.__iterate(function(t,e){return!1!==r(e,t,n)},t)},t.__iteratorUncached=function(t,e){if(t!==T)return i.__iterator(t===K?U:K,e);var r=i.__iterator(t,e);return new P(function(){var t,e=r.next();return e.done||(t=e.value[0],e.value[0]=e.value[1],e.value[1]=t),e})},t}function Kt(o,u,s){var t=Xt(o);return t.size=o.size,t.has=function(t){return o.has(t)},t.get=function(t,e){var r=o.get(t,v);return r===v?e:u.call(s,r,t,o)},t.__iterateUncached=function(n,t){var i=this;return o.__iterate(function(t,e,r){return!1!==n(u.call(s,t,e,r),e,i)},t)},t.__iteratorUncached=function(n,t){var i=o.__iterator(T,t);return new P(function(){var t=i.next();if(t.done)return t;var e=t.value,r=e[0];return W(n,r,u.call(s,e[1],r,o),t)})},t}function Tt(u,s){var a=this,t=Xt(u);return t._iter=u,t.size=u.size,t.reverse=function(){return u},u.flip&&(t.flip=function(){var t=Ut(u);return t.reverse=function(){return u.flip()},t}),t.get=function(t,e){return u.get(s?t:-1-t,e)},t.has=function(t){return u.has(s?t:-1-t)},t.includes=function(t){return u.includes(t)},t.cacheResult=Ft,t.__iterate=function(r,n){var i=this,o=0;return n&&c(u),u.__iterate(function(t,e){return r(t,s?e:n?i.size-++o:o++,i)},!n)},t.__iterator=function(r,n){var i=0;n&&c(u);var o=u.__iterator(T,!n);return new P(function(){var t=o.next();if(t.done)return t;var e=t.value;return W(r,s?e[0]:n?a.size-++i:i++,e[1],t)})},t}function Ct(u,s,a,c){var t=Xt(u);return c&&(t.has=function(t){var e=u.get(t,v);return e!==v&&!!s.call(a,e,t,u)},t.get=function(t,e){var r=u.get(t,v);return r!==v&&s.call(a,r,t,u)?r:e}),t.__iterateUncached=function(n,t){var i=this,o=0;return u.__iterate(function(t,e,r){if(s.call(a,t,e,r))return o++,n(t,c?e:o-1,i)},t),o},t.__iteratorUncached=function(n,t){var i=u.__iterator(T,t),o=0;return new P(function(){for(;;){var t=i.next();if(t.done)return t
31
+ ;var e=t.value,r=e[0],e=e[1];if(s.call(a,e,r,u))return W(n,c?r:o++,e,t)}})},t}function Lt(s,t,e,a){var r=s.size;if(p(t,e,r))return s;var c=y(t,r),r=w(e,r);if(c!=c||r!=r)return Lt(s.toSeq().cacheResult(),t,e,a);var f,r=r-c;r==r&&(f=r<0?0:r);r=Xt(s);return r.size=0===f?f:s.size&&f||void 0,!a&&M(s)&&0<=f&&(r.get=function(t,e){return 0<=(t=h(this,t))&&t<f?s.get(t+c,e):e}),r.__iterateUncached=function(r,t){var n=this;if(0===f)return 0;if(t)return this.cacheResult().__iterate(r,t);var i=0,o=!0,u=0;return s.__iterate(function(t,e){if(!(o=o&&i++<c))return u++,!1!==r(t,a?e:u-1,n)&&u!==f}),u},r.__iteratorUncached=function(e,t){if(0!==f&&t)return this.cacheResult().__iterator(e,t);if(0===f)return new P(N);var r=s.__iterator(e,t),n=0,i=0;return new P(function(){for(;n++<c;)r.next();if(++i>f)return N();var t=r.next();return a||e===K||t.done?t:W(e,i-1,e===U?void 0:t.value[1],t)})},r}function Bt(e,c,f,h){var t=Xt(e);return t.__iterateUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterate(n,t);var o=!0,u=0;return e.__iterate(function(t,e,r){if(!(o=o&&c.call(f,t,e,r)))return u++,n(t,h?e:u-1,i)}),u},t.__iteratorUncached=function(i,t){var o=this;if(t)return this.cacheResult().__iterator(i,t);var u=e.__iterator(T,t),s=!0,a=0;return new P(function(){var t;do{if((t=u.next()).done)return h||i===K?t:W(i,a++,i===U?void 0:t.value[1],t);var e=t.value,r=e[0],n=e[1];s=s&&c.call(f,n,r,o)}while(s);return i===T?t:W(i,r,n,t)})},t}function Pt(t,s,a){var c=Xt(t);return c.__iterateUncached=function(i,e){if(e)return this.cacheResult().__iterate(i,e);var o=0,u=!1;return function r(t,n){t.__iterate(function(t,e){return(!s||n<s)&&f(t)?r(t,n+1):(o++,!1===i(t,a?e:o-1,c)&&(u=!0)),!u},e)}(t,0),o},c.__iteratorUncached=function(r,n){if(n)return this.cacheResult().__iterator(r,n);var i=t.__iterator(r,n),o=[],u=0;return new P(function(){for(;i;){var t=i.next();if(!1===t.done){var e=t.value;if(r===T&&(e=e[1]),s&&!(o.length<s)||!f(e))return a?t:W(r,u++,e,t);o.push(i),i=e.__iterator(r,n)}else i=o.pop()}return N()})},c}function Wt(r,n,i){
32
+ n=n||Gt;var t=a(r),o=0,u=r.toSeq().map(function(t,e){return[e,t,o++,i?i(t,e,r):t]}).valueSeq().toArray();return u.sort(function(t,e){return n(t[3],e[3])||t[2]-e[2]}).forEach(t?function(t,e){u[e].length=2}:function(t,e){u[e]=t[1]}),(t?G:z(r)?Z:$)(u)}function Nt(r,n,i){if(n=n||Gt,i){var t=r.toSeq().map(function(t,e){return[t,i(t,e,r)]}).reduce(function(t,e){return Ht(n,t[1],e[1])?e:t});return t&&t[0]}return r.reduce(function(t,e){return Ht(n,t,e)?e:t})}function Ht(t,e,r){t=t(r,e);return 0===t&&r!==e&&(null==r||r!=r)||0<t}function Jt(t,u,s,a){var e=Xt(t),t=new tt(s).map(function(t){return t.size});return e.size=a?t.max():t.min(),e.__iterate=function(t,e){for(var r,n=this.__iterator(K,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},e.__iteratorUncached=function(e,r){var n=s.map(function(t){return t=I(t),V(r?t.reverse():t)}),i=0,o=!1;return new P(function(){var t;return o||(t=n.map(function(t){return t.next()}),o=a?t.every(function(t){return t.done}):t.some(function(t){return t.done})),o?N():W(e,i++,u.apply(null,t.map(function(t){return t.value})))})},e}function Vt(t,e){return t===e?t:M(t)?e:t.constructor(e)}function Yt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Qt(t){return a(t)?O:z(t)?E:j}function Xt(t){return Object.create((a(t)?G:z(t)?Z:$).prototype)}function Ft(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):F.prototype.cacheResult.call(this)}function Gt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:e<t?1:t<e?-1:0}function Zt(t,e){for(var r=Math.max(0,t.length-(e=e||0)),n=Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function $t(t,e){if(!t)throw Error(e)}function te(t){$t(t!==1/0,"Cannot perform this action with an infinite size.")}function ee(t){if(X(t)&&"string"!=typeof t)return t;if(R(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}At.prototype.cacheResult=xt.prototype.cacheResult=kt.prototype.cacheResult=Rt.prototype.cacheResult=Ft
33
+ ;var re=Object.prototype.toString;function ne(t){if(!t||"object"!=typeof t||"[object Object]"!==re.call(t))return!1;t=Object.getPrototypeOf(t);if(null===t)return!0;for(var e=t,r=Object.getPrototypeOf(t);null!==r;)r=Object.getPrototypeOf(e=r);return e===t}function ie(t){return"object"==typeof t&&(A(t)||Array.isArray(t)||ne(t))}function oe(e){try{return"string"==typeof e?JSON.stringify(e):e+""}catch(t){return JSON.stringify(e)}}function ue(t,e){return A(t)?t.has(e):ie(t)&&Q.call(t,e)}function se(t,e,r){return A(t)?t.get(e,r):ue(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function ae(t){if(Array.isArray(t))return Zt(t);var e,r={};for(e in t)Q.call(t,e)&&(r[e]=t[e]);return r}function ce(t,e){if(!ie(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(A(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!Q.call(t,e))return t;t=ae(t);return Array.isArray(t)?t.splice(e,1):delete t[e],t}function fe(t,e,r){if(!ie(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(A(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(Q.call(t,e)&&r===t[e])return t;t=ae(t);return t[e]=r,t}function he(t,e,r,n){n||(n=r,r=void 0);n=function t(e,r,n,i,o,u){var s=r===v;if(i===n.length){var a=s?o:r,c=u(a);return c===a?r:c}if(!s&&!ie(r))throw new TypeError("Cannot update within non-data-structure value in path ["+n.slice(0,i).map(oe)+"]: "+r);var a=n[i];var c=s?v:se(r,a,v);var u=t(c===v?e:A(c),c,n,i+1,o,u);return u===c?r:u===v?ce(r,a):fe(s?e?Qe():{}:r,a,u)}(A(t),t,ee(e),0,r,n);return n===v?r:n}function _e(t,e,r){return he(t,e,v,function(){return r})}function pe(t,e){return _e(this,t,e)}function le(t,e){return he(t,e,function(){return v})}function ve(t){return le(this,t)}function ye(t,e,r,n){return he(t,[e],r,n)}function de(t,e,r){return 1===arguments.length?t(this):ye(this,t,e,r)}function ge(t,e,r){return he(this,t,e,r)}function me(){for(var t=[],e=arguments.length;e--;
34
+ )t[e]=arguments[e];return Se(this,t)}function we(t){for(var e=[],r=arguments.length-1;0<r--;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return Se(this,e,t)}function Se(t,e,i){for(var r=[],n=0;n<e.length;n++){var o=O(e[n]);0!==o.size&&r.push(o)}return 0===r.length?t:0!==t.toSeq().size||t.__ownerID||1!==r.length?t.withMutations(function(n){for(var t=i?function(e,r){ye(n,r,v,function(t){return t===v?e:i(t,e,r)})}:function(t,e){n.set(e,t)},e=0;e<r.length;e++)r[e].forEach(t)}):t.constructor(r[0])}function ze(t){for(var e=[],r=arguments.length-1;0<r--;)e[r]=arguments[r+1];return je(t,e)}function be(t,e){for(var r=[],n=arguments.length-2;0<n--;)r[n]=arguments[n+2];return je(e,r,t)}function Ie(t){for(var e=[],r=arguments.length-1;0<r--;)e[r]=arguments[r+1];return Ee(t,e)}function Oe(t,e){for(var r=[],n=arguments.length-2;0<n--;)r[n]=arguments[n+2];return Ee(e,r,t)}function Ee(t,e,r){return je(t,e,(i=r,function t(e,r,n){return ie(e)&&ie(r)&&function(t,e){return t=F(t),e=F(e),z(t)===z(e)&&a(t)===a(e)}(e,r)?je(e,[r],t):i?i(e,r,n):r}));var i}function je(n,t,i){if(!ie(n))throw new TypeError("Cannot merge into non-data-structure value: "+n);if(A(n))return"function"==typeof i&&n.mergeWith?n.mergeWith.apply(n,[i].concat(t)):(n.merge?n.merge:n.concat).apply(n,t);for(var e=Array.isArray(n),o=n,r=e?E:O,u=e?function(t){o===n&&(o=ae(o)),o.push(t)}:function(t,e){var r=Q.call(o,e),t=r&&i?i(o[e],t,e):t;r&&t===o[e]||(o===n&&(o=ae(o)),o[e]=t)},s=0;s<t.length;s++)r(t[s]).forEach(u);return o}function qe(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Ee(this,t)}function Me(t){for(var e=[],r=arguments.length-1;0<r--;)e[r]=arguments[r+1];return Ee(this,e,t)}function De(t){for(var e=[],r=arguments.length-1;0<r--;)e[r]=arguments[r+1];return he(this,t,Qe(),function(t){return je(t,e)})}function xe(t){for(var e=[],r=arguments.length-1;0<r--;)e[r]=arguments[r+1];return he(this,t,Qe(),function(t){return Ee(t,e)})}function Ae(t){var e=this.asMutable();return t(e),e.wasAltered(
35
+ )?e.__ensureOwner(this.__ownerID):this}function ke(){return this.__ownerID?this:this.__ensureOwner(new m)}function Re(){return this.__ensureOwner()}function Ue(){return this.__altered}var Ke=function(n){function t(e){return null==e?Qe():ct(e)&&!R(e)?e:Qe().withMutations(function(r){var t=n(e);te(t.size),t.forEach(function(t,e){return r.set(e,t)})})}return n&&(t.__proto__=n),((t.prototype=Object.create(n&&n.prototype)).constructor=t).of=function(){for(var r=[],t=arguments.length;t--;)r[t]=arguments[t];return Qe().withMutations(function(t){for(var e=0;e<r.length;e+=2){if(r.length<=e+1)throw Error("Missing value for key: "+r[e]);t.set(r[e],r[e+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},t.prototype.set=function(t,e){return Xe(this,t,e)},t.prototype.remove=function(t){return Xe(this,t,v)},t.prototype.deleteAll=function(t){var r=I(t);return 0===r.size?this:this.withMutations(function(e){r.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Qe()},t.prototype.sort=function(t){return wr(Wt(this,t))},t.prototype.sortBy=function(t,e){return wr(Wt(this,e,t))},t.prototype.map=function(n,i){var o=this;return this.withMutations(function(r){r.forEach(function(t,e){r.set(e,n.call(i,t,e,o))})})},t.prototype.__iterator=function(t,e){return new He(this,t,e)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate(function(t){return n++,e(t[1],t[0],r)},t),n},t.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ye(this.size,this._root,t,this.__hash):0===this.size?Qe():(this.__ownerID=t,this.__altered=!1,this)},t}(O);Ke.isMap=ct;var Te=Ke.prototype;Te[at]=!0,Te[e]=Te.remove,Te.removeAll=Te.deleteAll,Te.setIn=pe,Te.removeIn=Te.deleteIn=ve,Te.update=de,Te.updateIn=ge,Te.merge=Te.concat=me,Te.mergeWith=we,Te.mergeDeep=qe,Te.mergeDeepWith=Me,
36
+ Te.mergeIn=De,Te.mergeDeepIn=xe,Te.withMutations=Ae,Te.wasAltered=Ue,Te.asImmutable=Re,Te["@@transducer/init"]=Te.asMutable=ke,Te["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Te["@@transducer/result"]=function(t){return t.asImmutable()};var Ce=function(t,e){this.ownerID=t,this.entries=e};Ce.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(_t(r,i[o][0]))return i[o][1];return n},Ce.prototype.update=function(t,e,r,n,i,o,u){for(var s=i===v,a=this.entries,c=0,f=a.length;c<f&&!_t(n,a[c][0]);c++);var h=c<f;if(h?a[c][1]===i:s)return this;if(_(u),!s&&h||_(o),!s||1!==a.length){if(!h&&!s&&er<=a.length)return function(t,e,r,n){t=t||new m;for(var i=new We(t,yt(r),[r,n]),o=0;o<e.length;o++){var u=e[o];i=i.update(t,0,void 0,u[0],u[1])}return i}(t,a,n,i);u=t&&t===this.ownerID,o=u?a:Zt(a);return h?s?c===f-1?o.pop():o[c]=o.pop():o[c]=[n,i]:o.push([n,i]),u?(this.entries=o,this):new Ce(t,o)}};var Le=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};Le.prototype.get=function(t,e,r,n){void 0===e&&(e=yt(r));var i=1<<((0===t?e:e>>>t)&g),o=this.bitmap;return 0==(o&i)?n:this.nodes[$e(o&i-1)].get(t+d,e,r,n)},Le.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=yt(n));var s=(0===e?r:r>>>e)&g,a=1<<s,c=this.bitmap,f=0!=(c&a);if(!f&&i===v)return this;var h=$e(c&a-1),_=this.nodes,p=f?_[h]:void 0,u=Fe(p,t,e+d,r,n,i,o,u);if(u===p)return this;if(!f&&u&&rr<=_.length)return function(t,e,r,n,i){for(var o=0,u=Array(l),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new Be(t,o+1,u)}(t,_,c,s,u);if(f&&!u&&2===_.length&&Ge(_[1^h]))return _[1^h];if(f&&u&&1===_.length&&Ge(u))return u;s=t&&t===this.ownerID,a=f?u?c:c^a:c|a,u=f?u?tr(_,h,u,s):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;u<n;u++)u===e&&(o=1),i[u]=t[u+o];return i}(_,h,s):function(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=Array(i),u=0,s=0;s<i;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}(_,h,u,s);return s?(this.bitmap=a,this.nodes=u,this):new Le(t,a,u)}
37
+ ;var Be=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};Be.prototype.get=function(t,e,r,n){void 0===e&&(e=yt(r));var i=this.nodes[(0===t?e:e>>>t)&g];return i?i.get(t+d,e,r,n):n},Be.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=yt(n));var s=(0===e?r:r>>>e)&g,a=this.nodes,c=a[s];if(i===v&&!c)return this;o=Fe(c,t,e+d,r,n,i,o,u);if(o===c)return this;u=this.count;if(c){if(!o&&--u<nr)return function(t,e,r,n){for(var i=0,o=0,u=Array(r),s=0,a=1,c=e.length;s<c;s++,a<<=1){var f=e[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new Le(t,i,u)}(t,a,u,s)}else u++;c=t&&t===this.ownerID,o=tr(a,s,o,c);return c?(this.count=u,this.nodes=o,this):new Be(t,u,o)};var Pe=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Pe.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;o<u;o++)if(_t(r,i[o][0]))return i[o][1];return n},Pe.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=yt(n));var s=i===v;if(r!==this.keyHash)return s?this:(_(u),_(o),Ze(this,t,e,r,[n,i]));for(var a=this.entries,c=0,f=a.length;c<f&&!_t(n,a[c][0]);c++);r=c<f;if(r?a[c][1]===i:s)return this;if(_(u),!s&&r||_(o),s&&2===f)return new We(t,this.keyHash,a[1^c]);u=t&&t===this.ownerID,o=u?a:Zt(a);return r?s?c===f-1?o.pop():o[c]=o.pop():o[c]=[n,i]:o.push([n,i]),u?(this.entries=o,this):new Pe(t,this.keyHash,o)};var We=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};We.prototype.get=function(t,e,r,n){return _t(r,this.entry[0])?this.entry[1]:n},We.prototype.update=function(t,e,r,n,i,o,u){var s=i===v,a=_t(n,this.entry[0]);return(a?i===this.entry[1]:s)?this:(_(u),s?void _(o):a?t&&t===this.ownerID?(this.entry[1]=i,this):new We(t,this.keyHash,[n,i]):(_(o),Ze(this,t,e,yt(n),[n,i])))},Ce.prototype.iterate=Pe.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===t(r[e?i-n:n]))return!1},Le.prototype.iterate=Be.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&!1===o.iterate(t,e))return!1}},We.prototype.iterate=function(t,e){return t(
38
+ this.entry)};var Ne,He=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Ve(t._root)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,i=void 0;if(r.entry){if(0==n)return Je(t,r.entry)}else if(r.entries){if(n<=(i=r.entries.length-1))return Je(t,r.entries[this._reverse?i-n:n])}else if(n<=(i=r.nodes.length-1)){n=r.nodes[this._reverse?i-n:n];if(n){if(n.entry)return Je(t,n.entry);e=this._stack=Ve(n,e)}continue}e=this._stack=this._stack.__prev}return N()},e}(P);function Je(t,e){return W(t,e[0],e[1])}function Ve(t,e){return{node:t,index:0,__prev:e}}function Ye(t,e,r,n){var i=Object.create(Te);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Qe(){return Ne=Ne||Ye(0)}function Xe(t,e,r){if(t._root){var n=u(),i=u(),o=Fe(t._root,t.__ownerID,0,void 0,e,r,n,i);if(!i.value)return t;n=t.size+(n.value?r===v?-1:1:0)}else{if(r===v)return t;n=1,o=new Ce(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=n,t._root=o,t.__hash=void 0,t.__altered=!0,t):o?Ye(n,o):Qe()}function Fe(t,e,r,n,i,o,u,s){return t?t.update(e,r,n,i,o,u,s):o===v?t:(_(s),_(u),new We(e,n,[i,o]))}function Ge(t){return t.constructor===We||t.constructor===Pe}function Ze(t,e,r,n,i){if(t.keyHash===n)return new Pe(e,n,[t.entry,i]);var o=(0===r?t.keyHash:t.keyHash>>>r)&g,u=(0===r?n:n>>>r)&g,t=o==u?[Ze(t,e,r+d,n,i)]:(i=new We(e,n,i),o<u?[t,i]:[i,t]);return new Le(e,1<<o|1<<u,t)}function $e(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function tr(t,e,r,n){t=n?t:Zt(t);return t[e]=r,t}var er=l/4,rr=l/2,nr=l/4,ir="@@__IMMUTABLE_LIST__@@";function or(t){return!(!t||!t[ir])}var ur=function(o){function t(t){var e=pr();if(null==t)return e;if(or(t))return t;var n=o(t),i=n.size;return 0===i?e:(te(i),0<i&&i<l?_r(0,i,d,null,new ar(n.toArray())):e.withMutations(function(r){r.setSize(i),n.forEach(function(t,e){return r.set(e,t)})}))}return o&&(
39
+ t.__proto__=o),((t.prototype=Object.create(o&&o.prototype)).constructor=t).of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(t,e){if(0<=(t=h(this,t))&&t<this.size){var r=yr(this,t+=this._origin);return r&&r.array[t&g]}return e},t.prototype.set=function(t,e){return function(t,e,r){if((e=h(t,e))!==e)return t;if(t.size<=e||e<0)return t.withMutations(function(t){e<0?dr(t,e).set(0,r):dr(t,0,e+1).set(e,r)});var n=t._tail,i=t._root,o=u();(e+=t._origin)>=gr(t._capacity)?n=lr(n,t.__ownerID,0,e,r,o):i=lr(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return _r(t._origin,t._capacity,t._level,i,n)}(this,t,e)},t.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},t.prototype.insert=function(t,e){return this.splice(t,0,e)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=d,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):pr()},t.prototype.push=function(){var r=arguments,n=this.size;return this.withMutations(function(t){dr(t,0,n+r.length);for(var e=0;e<r.length;e++)t.set(n+e,r[e])})},t.prototype.pop=function(){return dr(this,0,-1)},t.prototype.unshift=function(){var r=arguments;return this.withMutations(function(t){dr(t,-r.length);for(var e=0;e<r.length;e++)t.set(e,r[e])})},t.prototype.shift=function(){return dr(this,1)},t.prototype.concat=function(){for(var t=arguments,r=[],e=0;e<arguments.length;e++){var n=t[e],n=o("string"!=typeof n&&H(n)?n:[n]);0!==n.size&&r.push(n)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(e){r.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(r[0])},t.prototype.setSize=function(t){return dr(this,0,t)},t.prototype.map=function(r,n){var i=this;return this.withMutations(function(t){for(
40
+ var e=0;e<i.size;e++)t.set(e,r.call(n,t.get(e),e,i))})},t.prototype.slice=function(t,e){var r=this.size;return p(t,e,r)?this:dr(this,y(t,r),w(e,r))},t.prototype.__iterator=function(e,r){var n=r?this.size:0,i=hr(this,r);return new P(function(){var t=i();return t===fr?N():W(e,r?--n:n++,t)})},t.prototype.__iterate=function(t,e){for(var r,n=e?this.size:0,i=hr(this,e);(r=i())!==fr&&!1!==t(r,e?--n:n++,this););return n},t.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?pr():(this.__ownerID=t,this.__altered=!1,this)},t}(E);ur.isList=or;var sr=ur.prototype;sr[ir]=!0,sr[e]=sr.remove,sr.merge=sr.concat,sr.setIn=pe,sr.deleteIn=sr.removeIn=ve,sr.update=de,sr.updateIn=ge,sr.mergeIn=De,sr.mergeDeepIn=xe,sr.withMutations=Ae,sr.wasAltered=Ue,sr.asImmutable=Re,sr["@@transducer/init"]=sr.asMutable=ke,sr["@@transducer/step"]=function(t,e){return t.push(e)},sr["@@transducer/result"]=function(t){return t.asImmutable()};var ar=function(t,e){this.array=t,this.ownerID=e};ar.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&g;if(this.array.length<=n)return new ar([],t);var i=0==n;if(0<e){var o,u=this.array[n];if((o=u&&u.removeBefore(t,e-d,r))===u&&i)return this}if(i&&!o)return this;var s=vr(this,t);if(!i)for(var a=0;a<n;a++)s.array[a]=void 0;return o&&(s.array[n]=o),s},ar.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n=r-1>>>e&g;if(this.array.length<=n)return this;if(0<e){var i,o=this.array[n];if((i=o&&o.removeAfter(t,e-d,r))===o&&n==this.array.length-1)return this}t=vr(this,t);return t.array.splice(1+n),i&&(t.array[n]=i),t};var cr,fr={};function hr(t,s){var a=t._origin,c=t._capacity,o=gr(c),u=t._tail;return f(t._root,t._level,0);function f(t,e,r){return 0===e?function(t,e){var r=e===o?u&&u.array:t&&t.array,n=a<e?0:a-e,i=c-e;l<i&&(i=l);return function(){if(n===i)return fr;var t=s?--i:n++;return r&&r[t]}}(t,r):function(t,e,r){
41
+ var n,i=t&&t.array,o=a<r?0:a-r>>e,u=1+(c-r>>e);l<u&&(u=l);return function(){for(;;){if(n){var t=n();if(t!==fr)return t;n=null}if(o===u)return fr;t=s?--u:o++;n=f(i&&i[t],e-d,r+(t<<e))}}}(t,e,r)}}function _r(t,e,r,n,i,o,u){var s=Object.create(sr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function pr(){return cr=cr||_r(0,0,d)}function lr(t,e,r,n,i,o){var u,s=n>>>r&g,a=t&&s<t.array.length;if(!a&&void 0===i)return t;if(0<r){var c=t&&t.array[s],n=lr(c,e,r-d,n,i,o);return n===c?t:((u=vr(t,e)).array[s]=n,u)}return a&&t.array[s]===i?t:(o&&_(o),u=vr(t,e),void 0===i&&s==u.array.length-1?u.array.pop():u.array[s]=i,u)}function vr(t,e){return e&&t&&e===t.ownerID?t:new ar(t?t.array.slice():[],e)}function yr(t,e){if(e>=gr(t._capacity))return t._tail;if(e<1<<t._level+d){for(var r=t._root,n=t._level;r&&0<n;)r=r.array[e>>>n&g],n-=d;return r}}function dr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new m,i=t._origin,o=t._capacity,u=i+e,s=void 0===r?o:r<0?o+r:i+r;if(u===i&&s===o)return t;if(s<=u)return t.clear();for(var a=t._level,c=t._root,f=0;u+f<0;)c=new ar(c&&c.array.length?[void 0,c]:[],n),f+=1<<(a+=d);f&&(u+=f,i+=f,s+=f,o+=f);for(var h=gr(o),_=gr(s);1<<a+d<=_;)c=new ar(c&&c.array.length?[c]:[],n),a+=d;e=t._tail,r=_<h?yr(t,s-1):h<_?new ar([],n):e;if(e&&h<_&&u<o&&e.array.length){for(var p=c=vr(c,n),l=a;d<l;l-=d)var v=h>>>l&g,p=p.array[v]=vr(p.array[v],n);p.array[h>>>d&g]=e}if(s<o&&(r=r&&r.removeAfter(n,0,s)),_<=u)u-=_,s-=_,a=d,c=null,r=r&&r.removeBefore(n,0,u);else if(i<u||_<h){for(f=0;c;){var y=u>>>a&g;if(y!=_>>>a&g)break;y&&(f+=(1<<a)*y),a-=d,c=c.array[y]}c&&i<u&&(c=c.removeBefore(n,a,u-f)),c&&_<h&&(c=c.removeAfter(n,a,_-f)),f&&(u-=f,s-=f)}return t.__ownerID?(t.size=s-u,t._origin=u,t._capacity=s,t._level=a,t._root=c,t._tail=r,t.__hash=void 0,t.__altered=!0,t):_r(u,s,a,c,r)}function gr(t){return t<l?0:t-1>>>d<<d}var mr,wr=function(t){function e(e){return null==e?zr():ft(e)?e:zr().withMutations(function(r){var t=O(e);te(t.size),
42
+ t.forEach(function(t,e){return r.set(e,t)})})}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){t=this._map.get(t);return void 0!==t?this._list.get(t)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):zr()},e.prototype.set=function(t,e){return br(this,t,e)},e.prototype.remove=function(t){return br(this,t,v)},e.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],r)},t)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Sr(e,r,t,this.__hash):0===this.size?zr():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=r,this)},e}(Ke);function Sr(t,e,r,n){var i=Object.create(wr.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zr(){return mr=mr||Sr(Qe(),pr())}function br(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===v){if(!a)return t;l<=u.size&&2*o.size<=u.size?(n=(i=u.filter(function(t,e){return void 0!==t&&s!==e})).toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t.__altered=!0,t):Sr(n,i)}wr.isOrderedMap=ft,wr.prototype[k]=!0,wr.prototype[e]=wr.prototype.remove;var Ir="@@__IMMUTABLE_STACK__@@";function Or(t){return!(!t||!t[Ir])}var Er=function(i){function t(t){return null==t?Dr():Or(t)?t:Dr().pushAll(t)}return i&&(t.__proto__=i),((
43
+ t.prototype=Object.create(i&&i.prototype)).constructor=t).of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(t,e){var r=this._head;for(t=h(this,t);r&&t--;)r=r.next;return r?r.value:e},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;0<=n;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Mr(e,r)},t.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;if(0===this.size&&Or(t))return t;te(t.size);var e=this.size,r=this._head;return t.__iterate(function(t){e++,r={value:t,next:r}},!0),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Mr(e,r)},t.prototype.pop=function(){return this.slice(1)},t.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):Dr()},t.prototype.slice=function(t,e){if(p(t,e,this.size))return this;var r=y(t,this.size);if(w(e,this.size)!==this.size)return i.prototype.slice.call(this,t,e);for(var e=this.size-r,n=this._head;r--;)n=n.next;return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Mr(e,n)},t.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Mr(this.size,this._head,t,this.__hash):0===this.size?Dr():(this.__ownerID=t,this.__altered=!1,this)},t.prototype.__iterate=function(r,t){var n=this;if(t)return new tt(this.toArray()).__iterate(function(t,e){return r(t,e,n)},t);for(var e=0,i=this._head;i&&!1!==r(i.value,e++,this);)i=i.next;return e},t.prototype.__iterator=function(e,t){if(t)return new tt(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new P(function(){if(n){var t=n.value;return n=n.next,W(e,r++,t)}return N()})},t}(E);Er.isStack=Or;var jr,qr=Er.prototype;function Mr(t,e,r,n){
44
+ var i=Object.create(qr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Dr(){return jr=jr||Mr(0)}qr[Ir]=!0,qr.shift=qr.pop,qr.unshift=qr.push,qr.unshiftAll=qr.pushAll,qr.withMutations=Ae,qr.wasAltered=Ue,qr.asImmutable=Re,qr["@@transducer/init"]=qr.asMutable=ke,qr["@@transducer/step"]=function(t,e){return t.unshift(e)},qr["@@transducer/result"]=function(t){return t.asImmutable()};var xr="@@__IMMUTABLE_SET__@@";function Ar(t){return!(!t||!t[xr])}function kr(t){return Ar(t)&&R(t)}function Rr(r,t){if(r===t)return!0;if(!f(t)||void 0!==r.size&&void 0!==t.size&&r.size!==t.size||void 0!==r.__hash&&void 0!==t.__hash&&r.__hash!==t.__hash||a(r)!==a(t)||z(r)!==z(t)||R(r)!==R(t))return!1;if(0===r.size&&0===t.size)return!0;var n=!b(r);if(R(r)){var i=r.entries();return t.every(function(t,e){var r=i.next().value;return r&&_t(r[1],t)&&(n||_t(r[0],e))})&&i.next().done}var e,o=!1;void 0===r.size&&(void 0===t.size?"function"==typeof r.cacheResult&&r.cacheResult():(o=!0,e=r,r=t,t=e));var u=!0,t=t.__iterate(function(t,e){if(n?!r.has(t):o?!_t(t,r.get(e,v)):!_t(r.get(e,v),t))return u=!1});return u&&r.size===t}function Ur(e,r){function t(t){e.prototype[t]=r[t]}return Object.keys(r).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(r).forEach(t),e}function Kr(t){if(!t||"object"!=typeof t)return t;if(!f(t)){if(!ie(t))return t;t=F(t)}if(a(t)){var r={};return t.__iterate(function(t,e){r[e]=Kr(t)}),r}var e=[];return t.__iterate(function(t){e.push(Kr(t))}),e}var Tr=function(n){function e(r){return null==r?Wr():Ar(r)&&!R(r)?r:Wr().withMutations(function(e){var t=n(r);te(t.size),t.forEach(function(t){return e.add(t)})})}return n&&(e.__proto__=n),((e.prototype=Object.create(n&&n.prototype)).constructor=e).of=function(){return this(arguments)},e.fromKeys=function(t){return this(O(t).keySeq())},e.intersect=function(t){return(t=I(t).toArray()).length?Lr.intersect.apply(e(t.pop()),t):Wr()},e.union=function(t){return(t=I(t).toArray()).length?Lr.union.apply(e(t.pop()),t):Wr()},
45
+ e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Br(this,this._map.set(t,t))},e.prototype.remove=function(t){return Br(this,this._map.remove(t))},e.prototype.clear=function(){return Br(this,this._map.clear())},e.prototype.map=function(r,n){var i=this,o=!1,t=Br(this,this._map.mapEntries(function(t){var e=t[1],t=r.call(n,e,e,i);return t!==e&&(o=!0),[t,t]},n));return o?t:this},e.prototype.union=function(){for(var r=[],t=arguments.length;t--;)r[t]=arguments[t];return 0===(r=r.filter(function(t){return 0!==t.size})).length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(e){for(var t=0;t<r.length;t++)n(r[t]).forEach(function(t){return e.add(t)})}):this.constructor(r[0])},e.prototype.intersect=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return n(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},e.prototype.subtract=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return n(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},e.prototype.sort=function(t){return an(Wt(this,t))},e.prototype.sortBy=function(t,e){return an(Wt(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate(function(t){return e(t,t,r)},t)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(j);Tr.isSet=Ar;var Cr,Lr=Tr.prototype;function Br(t,
46
+ e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Pr(t,e){var r=Object.create(Lr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Wr(){return Cr=Cr||Pr(Qe())}Lr[xr]=!0,Lr[e]=Lr.remove,Lr.merge=Lr.concat=Lr.union,Lr.withMutations=Ae,Lr.asImmutable=Re,Lr["@@transducer/init"]=Lr.asMutable=ke,Lr["@@transducer/step"]=function(t,e){return t.add(e)},Lr["@@transducer/result"]=function(t){return t.asImmutable()},Lr.__empty=Wr,Lr.__make=Pr;var Nr,Hr=function(t){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);if($t(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,1+Math.ceil((e-t)/r-1)),0===this.size){if(Nr)return Nr;Nr=this}}return t&&(n.__proto__=t),((n.prototype=Object.create(t&&t.prototype)).constructor=n).prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},n.prototype.get=function(t,e){return this.has(t)?this._start+h(this,t)*this._step:e},n.prototype.includes=function(t){t=(t-this._start)/this._step;return 0<=t&&t<this.size&&t==Math.floor(t)},n.prototype.slice=function(t,e){return p(t,e,this.size)?this:(t=y(t,this.size),(e=w(e,this.size))<=t?new n(0,0):new n(this.get(t,this._end),this.get(e,this._end),this._step))},n.prototype.indexOf=function(t){t-=this._start;if(t%this._step==0){t=t/this._step;if(0<=t&&t<this.size)return t}return-1},n.prototype.lastIndexOf=function(t){return this.indexOf(t)},n.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;o!==r&&!1!==t(i,e?r-++o:o++,this);)i+=e?-n:n;return o},n.prototype.__iterator=function(e,r){var n=this.size,i=this._step,o=r?this._start+(n-1)*i:this._start,u=0;return new P(function(){if(u===n)return N();var t=o;return o+=r?-i:i,W(e,r?n-++u:u++,t)})},n.prototype.equals=function(t){
47
+ return t instanceof n?this._start===t._start&&this._end===t._end&&this._step===t._step:Rr(this,t)},n}(Z);function Jr(t,e,r){for(var n=ee(e),i=0;i!==n.length;)if((t=se(t,n[i++],v))===v)return r;return t}function Vr(t,e){return Jr(this,t,e)}function Yr(t,e){return Jr(t,e,v)!==v}function Qr(){te(this.size);var r={};return this.__iterate(function(t,e){r[e]=t}),r}I.isIterable=f,I.isKeyed=a,I.isIndexed=z,I.isAssociative=b,I.isOrdered=R,I.Iterator=P,Ur(I,{toArray:function(){te(this.size);var r=Array(this.size||0),n=a(this),i=0;return this.__iterate(function(t,e){r[i++]=n?[e,t]:t}),r},toIndexedSeq:function(){return new At(this)},toJS:function(){return Kr(this)},toKeyedSeq:function(){return new xt(this,!0)},toMap:function(){return Ke(this.toKeyedSeq())},toObject:Qr,toOrderedMap:function(){return wr(this.toKeyedSeq())},toOrderedSet:function(){return an(a(this)?this.valueSeq():this)},toSet:function(){return Tr(a(this)?this.valueSeq():this)},toSetSeq:function(){return new kt(this)},toSeq:function(){return z(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Er(a(this)?this.valueSeq():this)},toList:function(){return ur(a(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Vt(this,function(t,e){var r=a(t);if(0===(e=[t].concat(e).map(function(t){return f(t)?r&&(t=O(t)):t=r?ot(t):ut(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size})).length)return t;if(1===e.length){var n=e[0];if(n===t||r&&a(n)||z(t)&&z(n))return n}return n=new tt(e),r?n=n.toKeyedSeq():z(t)||(n=n.toSetSeq()),(n=n.flatten(!0)).size=e.reduce(function(t,e){if(void 0!==t){e=e.size;if(void 0!==e)return t+e}},0),n}(this,t))},includes:function(e){return this.some(function(t){return _t(t,e)})},entries:function(){return this.__iterator(T)},every:function(n,i){te(this.size);var o=!0
48
+ ;return this.__iterate(function(t,e,r){if(!n.call(i,t,e,r))return o=!1}),o},filter:function(t,e){return Vt(this,Ct(this,t,e,!0))},find:function(t,e,r){e=this.findEntry(t,e);return e?e[1]:r},forEach:function(t,e){return te(this.size),this.__iterate(e?t.bind(e):t)},join:function(e){te(this.size),e=void 0!==e?""+e:",";var r="",n=!0;return this.__iterate(function(t){n?n=!1:r+=e,r+=null!=t?""+t:""}),r},keys:function(){return this.__iterator(U)},map:function(t,e){return Vt(this,Kt(this,t,e))},reduce:function(t,e,r){return $r(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return $r(this,t,e,r,arguments.length<2,!0)},reverse:function(){return Vt(this,Tt(this,!0))},slice:function(t,e){return Vt(this,Lt(this,t,e,!0))},some:function(t,e){return!this.every(rn(t),e)},sort:function(t){return Vt(this,Wt(this,t))},values:function(){return this.__iterator(K)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return r=this,n=t,i=e,o=Ke().asMutable(),r.__iterate(function(t,e){o.update(n.call(i,t,e,r),0,function(t){return t+1})}),o.asImmutable();var r,n,i,o},equals:function(t){return Rr(this,t)},entrySeq:function(){var t=this;if(t._cache)return new tt(t._cache);var e=t.toSeq().map(en).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(rn(t),e)},findEntry:function(n,i,t){var o=t;return this.__iterate(function(t,e,r){if(n.call(i,t,e,r))return!(o=[e,t])}),o},findKey:function(t,e){e=this.findEntry(t,e);return e&&e[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(r,null,t)},flatMap:function(t,e){return Vt(this,(n=t,i=e,o=Qt(r=this),r.toSeq().map(function(t,e){return o(n.call(i
49
+ ,t,e,r))}).flatten(!0)));var r,n,i,o},flatten:function(t){return Vt(this,Pt(this,t,!0))},fromEntrySeq:function(){return new Rt(this)},get:function(r,t){return this.find(function(t,e){return _t(e,r)},void 0,t)},getIn:Vr,groupBy:function(t,e){return function(n,t,i){var o=a(n),u=(R(n)?wr:Ke)().asMutable();n.__iterate(function(e,r){u.update(t.call(i,e,r,n),function(t){return(t=t||[]).push(o?[r,e]:e),t})});var e=Qt(n);return u.map(function(t){return Vt(n,e(t))}).asImmutable()}(this,t,e)},has:function(t){return this.get(t,v)!==v},hasIn:function(t){return Yr(this,t)},isSubset:function(e){return e="function"==typeof e.includes?e:I(e),this.every(function(t){return e.includes(t)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:I(t)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return _t(t,e)})},keySeq:function(){return this.toSeq().map(tn).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Nt(this,t)},maxBy:function(t,e){return Nt(this,e,t)},min:function(t){return Nt(this,t?nn(t):un)},minBy:function(t,e){return Nt(this,e?nn(e):un,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Vt(this,Bt(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(rn(t),e)},sortBy:function(t,e){return Vt(this,Wt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Vt(this,(s=t,a=e,(e=Xt(r=this)).__iterateUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterate(n,t);var o=0;return r.__iterate(function(t,e,r){return s.call(a,t,e,r)&&++o&&n(t,e,i)}),o},e.__iteratorUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterator(n,t);var o=r.__iterator(T,t),u=!0;return new P(function(){if(!u)return N();var t=o.next()
50
+ ;if(t.done)return t;var e=t.value,r=e[0],e=e[1];return s.call(a,e,r,i)?n===T?t:W(n,r,e,t):(u=!1,N())})},e));var r,s,a},takeUntil:function(t,e){return this.takeWhile(rn(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=R(t),r=a(t),n=e?1:0;return function(t,e){return e=pt(e,3432918353),e=pt(e<<15|e>>>-15,461845907),e=pt(e<<13|e>>>-13,5),e=pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=lt((e=pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+sn(yt(t),yt(e))|0}:function(t,e){n=n+sn(yt(t),yt(e))|0}:e?function(t){n=31*n+yt(t)|0}:function(t){n=n+yt(t)|0}),n)}(this))}});var Xr=I.prototype;Xr[o]=!0,Xr[B]=Xr.values,Xr.toJSON=Xr.toArray,Xr.__toStringMapper=oe,Xr.inspect=Xr.toSource=function(){return""+this},Xr.chain=Xr.flatMap,Xr.contains=Xr.includes,Ur(O,{flip:function(){return Vt(this,Ut(this))},mapEntries:function(r,n){var i=this,o=0;return Vt(this,this.toSeq().map(function(t,e){return r.call(n,[e,t],o++,i)}).fromEntrySeq())},mapKeys:function(r,n){var i=this;return Vt(this,this.toSeq().flip().map(function(t,e){return r.call(n,t,e,i)}).flip())}});var Fr=O.prototype;Fr[s]=!0,Fr[B]=Xr.entries,Fr.toJSON=Qr,Fr.__toStringMapper=function(t,e){return oe(e)+": "+oe(t)},Ur(E,{toKeyedSeq:function(){return new xt(this,!1)},filter:function(t,e){return Vt(this,Ct(this,t,e,!1))},findIndex:function(t,e){e=this.findEntry(t,e);return e?e[0]:-1},indexOf:function(t){t=this.keyOf(t);return void 0===t?-1:t},lastIndexOf:function(t){t=this.lastKeyOf(t);return void 0===t?-1:t},reverse:function(){return Vt(this,Tt(this,!1))},slice:function(t,e){return Vt(this,Lt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=y(t,t<0?this.count():this.size);var n=this.slice(0,t);return Vt(this,1===r?n:n.concat(Zt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){e=this.findLastEntry(t,e);return e?e[0]:-1},first:function(t){
51
+ return this.get(0,t)},flatten:function(t){return Vt(this,Pt(this,t,!1))},get:function(r,t){return(r=h(this,r))<0||this.size===1/0||void 0!==this.size&&this.size<r?t:this.find(function(t,e){return e===r},void 0,t)},has:function(t){return 0<=(t=h(this,t))&&(void 0!==this.size?this.size===1/0||t<this.size:!!~this.indexOf(t))},interpose:function(t){return Vt(this,(u=t,(t=Xt(o=this)).size=o.size&&2*o.size-1,t.__iterateUncached=function(e,t){var r=this,n=0;return o.__iterate(function(t){return(!n||!1!==e(u,n++,r))&&!1!==e(t,n++,r)},t),n},t.__iteratorUncached=function(t,e){var r,n=o.__iterator(K,e),i=0;return new P(function(){return(!r||i%2)&&(r=n.next()).done?r:i%2?W(t,i++,u):W(t,i++,r.value,r)})},t));var o,u},interleave:function(){var t=[this].concat(Zt(arguments)),e=Jt(this.toSeq(),Z.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Vt(this,r)},keySeq:function(){return Hr(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Vt(this,Bt(this,t,e,!1))},zip:function(){var t=[this].concat(Zt(arguments));return Vt(this,Jt(this,on,t))},zipAll:function(){var t=[this].concat(Zt(arguments));return Vt(this,Jt(this,on,t,!0))},zipWith:function(t){var e=Zt(arguments);return Vt(e[0]=this,Jt(this,t,e))}});var Gr=E.prototype;Gr[S]=!0,Gr[k]=!0,Ur(j,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Zr=j.prototype;function $r(t,n,i,o,u,e){return te(t.size),t.__iterate(function(t,e,r){i=u?(u=!1,t):n.call(o,i,t,e,r)},e),i}function tn(t,e){return e}function en(t,e){return[e,t]}function rn(t){return function(){return!t.apply(this,arguments)}}function nn(t){return function(){return-t.apply(this,arguments)}}function on(){return Zt(arguments)}function un(t,e){return t<e?1:e<t?-1:0}function sn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Zr.has=Xr.includes,Zr.contains=Zr.includes,Zr.keys=Zr.values,Ur(G,Fr),Ur(Z,Gr),Ur($,Zr);var an=function(t){function e(r){return null==r?_n():kr(r)?r:_n().withMutations(function(e){var t=j(
52
+ r);te(t.size),t.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return this(arguments)},e.fromKeys=function(t){return this(O(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Tr);an.isOrderedSet=kr;var cn,fn=an.prototype;function hn(t,e){var r=Object.create(fn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function _n(){return cn=cn||hn(zr())}fn[k]=!0,fn.zip=Gr.zip,fn.zipWith=Gr.zipWith,fn.zipAll=Gr.zipAll,fn.__empty=_n,fn.__make=hn;Gr=function(u,s){var a;!function(t){if(x(t))throw Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(A(t))throw Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(u);var c=function(t){var n=this;if(t instanceof c)return t;if(!(this instanceof c))return new c(t);if(!a){a=!0;var e=Object.keys(u),r=f._indices={};f._name=s,f._keys=e,f._defaultValues=u;for(var i=0;i<e.length;i++){var o=e[i];r[o]=i,f[o]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+vn(this)+' with property "'+o+'" since that property name is part of the Record API.'):function(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){$t(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}(f,o)}}return this.__ownerID=void 0,this._values=ur().withMutations(function(r){r.setSize(n._keys.length),O(t).forEach(function(t,e){r.set(n._indices[e],t===n._defaultValues[e]?void 0:t)})}),this},f=c.prototype=Object.create(pn);return f.constructor=c,s&&(c.displayName=s),c};Gr.prototype.toString=function(){for(var t,e=vn(this)+" { ",r=this._keys,n=0,i=r.length;n!==i;n++)e+=(n?", ":"")+(t=r[n])+": "+oe(this.get(t));return e+" }"},
53
+ Gr.prototype.equals=function(t){return this===t||x(t)&&yn(this).equals(yn(t))},Gr.prototype.hashCode=function(){return yn(this).hashCode()},Gr.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Gr.prototype.get=function(t,e){if(!this.has(t))return e;e=this._values.get(this._indices[t]);return void 0===e?this._defaultValues[t]:e},Gr.prototype.set=function(t,e){if(this.has(t)){e=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(e!==this._values&&!this.__ownerID)return ln(this,e)}return this},Gr.prototype.remove=function(t){return this.set(t)},Gr.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:ln(this,t)},Gr.prototype.wasAltered=function(){return this._values.wasAltered()},Gr.prototype.toSeq=function(){return yn(this)},Gr.prototype.toJS=function(){return Kr(this)},Gr.prototype.entries=function(){return this.__iterator(T)},Gr.prototype.__iterator=function(t,e){return yn(this).__iterator(t,e)},Gr.prototype.__iterate=function(t,e){return yn(this).__iterate(t,e)},Gr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?ln(this,e,t):(this.__ownerID=t,this._values=e,this)},Gr.isRecord=x,Gr.getDescriptiveName=vn;var pn=Gr.prototype;function ln(t,e,r){t=Object.create(Object.getPrototypeOf(t));return t._values=e,t.__ownerID=r,t}function vn(t){return t.constructor.displayName||t.constructor.name||"Record"}function yn(e){return ot(e._keys.map(function(t){return[t,e.get(t)]}))}pn[D]=!0,pn[e]=pn.remove,pn.deleteIn=pn.removeIn=ve,pn.getIn=Vr,pn.hasIn=Xr.hasIn,pn.merge=me,pn.mergeWith=we,pn.mergeIn=De,pn.mergeDeep=qe,pn.mergeDeepWith=Me,pn.mergeDeepIn=xe,pn.setIn=pe,pn.update=de,pn.updateIn=ge,pn.withMutations=Ae,pn.asMutable=ke,pn.asImmutable=Re,pn[B]=pn.entries,pn.toJSON=pn.toObject=Xr.toObject,pn.inspect=pn.toSource=function(){return""+this};var dn,e=function(t){function n(t,e){if(!(this instanceof n))return new n(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0
54
+ ,e),0===this.size){if(dn)return dn;dn=this}}return t&&(n.__proto__=t),((n.prototype=Object.create(t&&t.prototype)).constructor=n).prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},n.prototype.get=function(t,e){return this.has(t)?this._value:e},n.prototype.includes=function(t){return _t(this._value,t)},n.prototype.slice=function(t,e){var r=this.size;return p(t,e,r)?this:new n(this._value,w(e,r)-y(t,r))},n.prototype.reverse=function(){return this},n.prototype.indexOf=function(t){return _t(this._value,t)?0:-1},n.prototype.lastIndexOf=function(t){return _t(this._value,t)?this.size:-1},n.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},n.prototype.__iterator=function(t,e){var r=this,n=this.size,i=0;return new P(function(){return i===n?N():W(t,e?n-++i:i++,r._value)})},n.prototype.equals=function(t){return t instanceof n?_t(this._value,t._value):Rr(t)},n}(Z);function gn(t,e){return function r(n,i,o,t,u,e){if("string"!=typeof o&&!A(o)&&(X(o)||H(o)||ne(o))){if(~n.indexOf(o))throw new TypeError("Cannot convert circular structure to Immutable");n.push(o),u&&""!==t&&u.push(t);var t=i.call(e,t,F(o).map(function(t,e){return r(n,i,t,e,u,o)}),u&&u.slice());return n.pop(),u&&u.pop(),t}return o}([],e||mn,t,"",e&&2<e.length?[]:void 0,{"":t})}function mn(t,e){return z(e)?e.toList():a(e)?e.toMap():e.toSet()}B={version:"4.1.0",Collection:I,Iterable:I,Seq:F,Map:Ke,OrderedMap:wr,List:ur,Stack:Er,Set:Tr,OrderedSet:an,Record:Gr,Range:Hr,Repeat:e,is:_t,fromJS:gn,hash:yt,isImmutable:A,isCollection:f,isKeyed:a,isIndexed:z,isAssociative:b,isOrdered:R,isValueObject:ht,isPlainObject:ne,isSeq:M,isList:or,isMap:ct,isOrderedMap:ft,isStack:Or,isSet:Ar,isOrderedSet:kr,isRecord:x,get:se,getIn:Jr,has:ue,hasIn:Yr,merge:ze,mergeDeep:Ie,mergeWith:be,mergeDeepWith:Oe,remove:ce,removeIn:le,set:fe,setIn:_e,update:ye,updateIn:he},Xr=I;t.Collection=I,t.Iterable=Xr,t.List=ur,t.Map=Ke,t.OrderedMap=wr,t.OrderedSet=an,t.Range=Hr,
55
+ t.Record=Gr,t.Repeat=e,t.Seq=F,t.Set=Tr,t.Stack=Er,t.default=B,t.fromJS=gn,t.get=se,t.getIn=Jr,t.has=ue,t.hasIn=Yr,t.hash=yt,t.is=_t,t.isAssociative=b,t.isCollection=f,t.isImmutable=A,t.isIndexed=z,t.isKeyed=a,t.isList=or,t.isMap=ct,t.isOrdered=R,t.isOrderedMap=ft,t.isOrderedSet=kr,t.isPlainObject=ne,t.isRecord=x,t.isSeq=M,t.isSet=Ar,t.isStack=Or,t.isValueObject=ht,t.merge=ze,t.mergeDeep=Ie,t.mergeDeepWith=Oe,t.mergeWith=be,t.remove=ce,t.removeIn=le,t.set=fe,t.setIn=_e,t.update=ye,t.updateIn=he,t.version="4.1.0",Object.defineProperty(t,"__esModule",{value:!0})});