UNPKG

@nutrient-sdk/node

Version:

Convert documents in your Node.js apps.

3 lines (2 loc) 335 kB
let e,t,n,r,i,a,s,o,u,l,c,d,h,p;var f,m,g,y,_,b,v,E,w,I,A,S,k,x,F,D,O,N,C,R,T,B,P,Z,U,L,V,j,M,G,z,W,$,q,X,J,K,Y,Q,H,ee,et,en,er,ei,ea,es=Object.create,eo=Object.defineProperty,eu=Object.getOwnPropertyDescriptor,el=Object.getOwnPropertyNames,ec=Object.getPrototypeOf,ed=Object.prototype.hasOwnProperty;e=function(e){if("u">typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},"u">typeof require?require:"u">typeof Proxy&&new Proxy(e,{get:(e,t)=>("u">typeof require?require:e)[t]});var eh,ep,ef,em=(e,t)=>()=>(e&&(t=e(e=0)),t),eg=(e,t)=>{for(var n in t)eo(e,n,{get:t[n],enumerable:!0})},ey=em(()=>{eh={BUNDLE:"/vendor",BACKEND_BUILD:"true",GDPICTURE_HASH:"8e92a3a0c7efdc706e0ff54984a2a8e3047b97e5"}}),e_=em(()=>{"use strict";ey(),(ep=function e(t){let n;return Object.setPrototypeOf(n=t instanceof Error?t:Error(t),e.prototype),n}).prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}}),ef=ep});function eb(e,t){if(!e)throw new ef(`Assertion failed: ${t||"Condition not met"} For further assistance, please go to: https://pspdfkit.com/support/request`)}var ev=em(()=>{"use strict";ey(),e_()}),eE=em(()=>{"use strict";ey()}),ew=em(()=>{"use strict";ey()}),eI=em(()=>{"use strict";ey()}),eA=em(()=>{"use strict";ey()}),eS=em(()=>{"use strict";ey()});function ek(e){console.log(e)}var ex,eF=em(()=>{"use strict";ey()}),eD=em(()=>{"use strict";ey()}),eO=em(()=>{"use strict";ey()}),eN=em(()=>{"use strict";ey()}),eC=em(()=>{"use strict";ey()}),eR=em(()=>{"use strict";ey()}),eT=em(()=>{"use strict";ey(),ev()}),eB=em(()=>{"use strict";ey()}),eP=em(()=>{"use strict";ey()}),eZ=em(()=>{"use strict";ey()}),eU=em(()=>{"use strict";ey(),ex=">=1.4"}),eL=em(()=>{"use strict";ey(),ev(),e_(),eE(),ew(),eI(),eA(),eS(),eF(),eD(),eO(),eN(),eC(),eR(),eT(),eB(),eP(),eZ(),eU()});async function eV(e){try{let t=await fetch(e).catch(t=>{throw new ef(`Error fetching dynamic fonts file ${e}. ${t}`)});if(200!==t.status)throw new ef(`Error fetching dynamic fonts file ${e}. Status code: ${t.status}`);return t}catch(e){throw e}}async function ej(e){return(await eV(e)).json().catch(t=>{throw new ef(`Error parsing dynamic fonts file ${e}. ${t}`)})}var eM=em(()=>{"use strict";ey(),eL()}),eG,ez=(t=(e,t)=>{var n;ey(),n=function(e){"use strict";var t="delete",n={};function r(){return{value:!1}}function i(e){e&&(e.value=!0)}function a(){}function s(e){return void 0===e.size&&(e.size=e.__iterate(u)),e.size}function o(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||0xffffffff===n)return NaN;t=n}return t<0?s(e)+t:t}function u(){return!0}function l(e,t,n){return(0===e&&!d(e)||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function c(e,t,n){return void 0===e?n:d(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function d(e){return e<0||0===e&&1/e==-1/0}var h="@@__IMMUTABLE_ITERABLE__@@";function p(e){return!!(e&&e[h])}var f="@@__IMMUTABLE_KEYED__@@";function m(e){return!!(e&&e[f])}var g="@@__IMMUTABLE_INDEXED__@@";function y(e){return!!(e&&e[g])}function _(e){return m(e)||y(e)}var b=function(e){return p(e)?e:j(e)},v=function(e){function t(e){return m(e)?e:M(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(b),E=function(e){function t(e){return y(e)?e:G(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(b),w=function(e){function t(e){return p(e)&&!_(e)?e:z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(b);b.Keyed=v,b.Indexed=E,b.Set=w;var I="@@__IMMUTABLE_SEQ__@@";function A(e){return!!(e&&e[I])}var S="@@__IMMUTABLE_RECORD__@@";function k(e){return!!(e&&e[S])}function x(e){return p(e)||k(e)}var F="@@__IMMUTABLE_ORDERED__@@";function D(e){return!!(e&&e[F])}var O="function"==typeof Symbol&&Symbol.iterator,N="@@iterator",C=O||N,R=function(e){this.next=e};function T(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function B(){return{value:void 0,done:!0}}function P(e){return e&&"function"==typeof e.next}function Z(e){var t=U(e);return t&&t.call(e)}function U(e){var t=e&&(O&&e[O]||e[N]);if("function"==typeof t)return t}R.prototype.toString=function(){return"[Iterator]"},R.KEYS=0,R.VALUES=1,R.ENTRIES=2,R.prototype.inspect=R.prototype.toSource=function(){return this.toString()},R.prototype[C]=function(){return this};var L=Object.prototype.hasOwnProperty;function V(e){return!!Array.isArray(e)||"string"==typeof e||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var j=function(e){function t(e){return null==e?J():x(e)?e.toSeq():function(e){var t=Q(e);if(t)return t;if("object"==typeof e)return new $(e);throw TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var n=this._cache;if(n){for(var r=n.length,i=0;i!==r;){var a=n[t?r-++i:i++];if(!1===e(a[1],a[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var n=this._cache;if(n){var r=n.length,i=0;return new R(function(){if(i===r)return B();var a=n[t?r-++i:i++];return T(e,a[0],a[1])})}return this.__iteratorUncached(e,t)},t}(b),M=function(e){function t(e){return null==e?J().toKeyedSeq():p(e)?m(e)?e.toSeq():e.fromEntrySeq():k(e)?e.toSeq():K(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(j),G=function(e){function t(e){return null==e?J():p(e)?m(e)?e.entrySeq():e.toIndexedSeq():k(e)?e.toSeq().entrySeq():Y(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(j),z=function(e){function t(e){return(p(e)&&!_(e)?e:G(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(j);j.isSeq=A,j.Keyed=M,j.Set=z,j.Indexed=G,j.prototype[I]=!0;var W=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[o(this,e)]:t},t.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length,i=0;i!==r;){var a=t?r-++i:i++;if(!1===e(n[a],a,this))break}return i},t.prototype.__iterator=function(e,t){var n=this._array,r=n.length,i=0;return new R(function(){if(i===r)return B();var a=t?r-++i:i++;return T(e,a,n[a])})},t}(G),$=function(e){function t(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return L.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length,a=0;a!==i;){var s=r[t?i-++a:a++];if(!1===e(n[s],s,this))break}return a},t.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length,a=0;return new R(function(){if(a===i)return B();var s=r[t?i-++a:a++];return T(e,s,n[s])})},t}(M);$.prototype[F]=!0;var q,X=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n,r=Z(this._collection),i=0;if(P(r))for(;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=Z(this._collection);if(!P(n))return new R(B);var r=0;return new R(function(){var t=n.next();return t.done?t:T(e,r++,t.value)})},t}(G);function J(){return q||(q=new W([]))}function K(e){var t=Array.isArray(e)?new W(e):U(e)?new X(e):void 0;if(t)return t.fromEntrySeq();if("object"==typeof e)return new $(e);throw TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function Y(e){var t=Q(e);if(t)return t;throw TypeError("Expected Array or collection object of values: "+e)}function Q(e){return V(e)?new W(e):U(e)?new X(e):void 0}var H="@@__IMMUTABLE_MAP__@@";function ee(e){return!!(e&&e[H])}function et(e){return ee(e)&&D(e)}function en(e){return!!(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function er(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(en(e)&&en(t)&&e.equals(t))}var ei="function"==typeof Math.imul&&-2===Math.imul(0xffffffff,2)?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ea(e){return e>>>1&0x40000000|0xbfffffff&e}function es(e){if(!1===e||null==e||"function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=0xffffffff*e);e>0xffffffff;)e/=0xffffffff,n^=e;return ea(n)}if("string"===t)return e.length>ef?(void 0===(i=ey[r=e])&&(i=eo(r),eg===em&&(eg=0,ey={}),eg++,ey[r]=i),i):eo(e);if("function"==typeof e.hashCode)return ea(e.hashCode());if("object"===t||"function"===t){var r,i,a,s=e;if(ed&&void 0!==(a=eu.get(s))||void 0!==(a=s[ep])||!ec&&(void 0!==(a=s.propertyIsEnumerable&&s.propertyIsEnumerable[ep])||void 0!==(a=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(s))))return a;if(a=++eh,0x40000000&eh&&(eh=0),ed)eu.set(s,a);else{if(void 0!==el&&!1===el(s))throw Error("Non-extensible objects are not allowed as keys.");if(ec)Object.defineProperty(s,ep,{enumerable:!1,configurable:!1,writable:!1,value:a});else if(void 0!==s.propertyIsEnumerable&&s.propertyIsEnumerable===s.constructor.prototype.propertyIsEnumerable)s.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},s.propertyIsEnumerable[ep]=a;else if(void 0!==s.nodeType)s[ep]=a;else throw Error("Unable to set a non-enumerable property on object.")}return a}if("function"==typeof e.toString)return eo(e.toString());throw Error("Value type "+t+" cannot be hashed.")}function eo(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return ea(t)}var eu,el=Object.isExtensible,ec=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}(),ed="function"==typeof WeakMap;ed&&(eu=new WeakMap);var eh=0,ep="__immutablehash__";"function"==typeof Symbol&&(ep=Symbol(ep));var ef=16,em=255,eg=0,ey={},e_=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=eA(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var n=this,r=eI(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t,r){return e(t,r,n)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(M);e_.prototype[F]=!0;var eb=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this,r=0;return t&&s(this),this._iter.__iterate(function(i){return e(i,t?n.size-++r:r++,n)},t)},t.prototype.__iterator=function(e,t){var n=this,r=this._iter.__iterator(1,t),i=0;return t&&s(this),new R(function(){var a=r.next();return a.done?a:T(e,t?n.size-++i:i++,a.value,a)})},t}(G),ev=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new R(function(){var t=n.next();return t.done?t:T(e,t.value,t.value,t)})},t}(z),eE=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){eT(t);var r=p(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},t.prototype.__iterator=function(e,t){var n=this._iter.__iterator(1,t);return new R(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){eT(r);var i=p(r);return T(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},t}(M);function ew(e){var t=eP(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=eZ,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new R(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(+(1!==t),n)},t}function eI(e,t,r){var i=eP(e);return i.size=e.size,i.has=function(t){return e.has(t)},i.get=function(i,a){var s=e.get(i,n);return s===n?a:t.call(r,s,i,e)},i.__iterateUncached=function(n,i){var a=this;return e.__iterate(function(e,i,s){return!1!==n(t.call(r,e,i,s),i,a)},i)},i.__iteratorUncached=function(n,i){var a=e.__iterator(2,i);return new R(function(){var i=a.next();if(i.done)return i;var s=i.value,o=s[0];return T(n,o,t.call(r,s[1],o,e),i)})},i}function eA(e,t){var n=this,r=eP(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var t=ew(e);return t.reverse=function(){return e.flip()},t}),r.get=function(n,r){return e.get(t?n:-1-n,r)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(t){return e.includes(t)},r.cacheResult=eZ,r.__iterate=function(n,r){var i=this,a=0;return r&&s(e),e.__iterate(function(e,s){return n(e,t?s:r?i.size-++a:a++,i)},!r)},r.__iterator=function(r,i){var a=0;i&&s(e);var o=e.__iterator(2,!i);return new R(function(){var e=o.next();if(e.done)return e;var s=e.value;return T(r,t?s[0]:i?n.size-++a:a++,s[1],e)})},r}function eS(e,t,r,i){var a=eP(e);return i&&(a.has=function(i){var a=e.get(i,n);return a!==n&&!!t.call(r,a,i,e)},a.get=function(i,a){var s=e.get(i,n);return s!==n&&t.call(r,s,i,e)?s:a}),a.__iterateUncached=function(n,a){var s=this,o=0;return e.__iterate(function(e,a,u){if(t.call(r,e,a,u))return o++,n(e,i?a:o-1,s)},a),o},a.__iteratorUncached=function(n,a){var s=e.__iterator(2,a),o=0;return new R(function(){for(;;){var a=s.next();if(a.done)return a;var u=a.value,l=u[0],c=u[1];if(t.call(r,c,l,e))return T(n,i?l:o++,c,a)}})},a}function ek(e,t,n,r){var i=e.size;if(l(t,n,i))return e;var a=c(t,i,0),s=c(n,i,i);if(a!=a||s!=s)return ek(e.toSeq().cacheResult(),t,n,r);var u,d=s-a;d==d&&(u=d<0?0:d);var h=eP(e);return h.size=0===u?u:e.size&&u||void 0,!r&&A(e)&&u>=0&&(h.get=function(t,n){return(t=o(this,t))>=0&&t<u?e.get(t+a,n):n}),h.__iterateUncached=function(t,n){var i=this;if(0===u)return 0;if(n)return this.cacheResult().__iterate(t,n);var s=0,o=!0,l=0;return e.__iterate(function(e,n){if(!(o&&(o=s++<a)))return l++,!1!==t(e,r?n:l-1,i)&&l!==u}),l},h.__iteratorUncached=function(t,n){if(0!==u&&n)return this.cacheResult().__iterator(t,n);if(0===u)return new R(B);var i=e.__iterator(t,n),s=0,o=0;return new R(function(){for(;s++<a;)i.next();if(++o>u)return B();var e=i.next();return r||1===t||e.done?e:0===t?T(t,o-1,void 0,e):T(t,o-1,e.value[1],e)})},h}function ex(e,t,n,r){var i=eP(e);return i.__iterateUncached=function(i,a){var s=this;if(a)return this.cacheResult().__iterate(i,a);var o=!0,u=0;return e.__iterate(function(e,a,l){if(!(o&&(o=t.call(n,e,a,l))))return u++,i(e,r?a:u-1,s)}),u},i.__iteratorUncached=function(i,a){var s=this;if(a)return this.cacheResult().__iterator(i,a);var o=e.__iterator(2,a),u=!0,l=0;return new R(function(){var e,a,c;do{if((e=o.next()).done)return r||1===i?e:0===i?T(i,l++,void 0,e):T(i,l++,e.value[1],e);var d=e.value;a=d[0],c=d[1],u&&(u=t.call(n,c,a,s))}while(u);return 2===i?e:T(i,a,c,e)})},i}function eF(e,t,n){var r=eP(e);return r.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var s=0,o=!1;return function e(u,l){u.__iterate(function(a,u){return(!t||l<t)&&p(a)?e(a,l+1):(s++,!1===i(a,n?u:s-1,r)&&(o=!0)),!o},a)}(e,0),s},r.__iteratorUncached=function(r,i){if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(r,i),s=[],o=0;return new R(function(){for(;a;){var e=a.next();if(!1!==e.done){a=s.pop();continue}var u=e.value;if(2===r&&(u=u[1]),!((!t||s.length<t)&&p(u)))return n?e:T(r,o++,u,e);s.push(a),a=u.__iterator(r,i)}return B()})},r}function eD(e,t,n){t||(t=eU);var r=m(e),i=0,a=e.toSeq().map(function(t,r){return[r,t,i++,n?n(t,r,e):t]}).valueSeq().toArray();return a.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){a[t].length=2}:function(e,t){a[t]=e[1]}),r?M(a):y(e)?G(a):z(a)}function eO(e,t,n){if(t||(t=eU),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return eN(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return eN(t,e,n)?n:e})}function eN(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(null==n||n!=n)||r>0}function eC(e,t,n,r){var i=eP(e),a=new W(n).map(function(e){return e.size});return i.size=r?a.max():a.min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var a=n.map(function(e){return e=b(e),Z(i?e.reverse():e)}),s=0,o=!1;return new R(function(){var n;return o||(n=a.map(function(e){return e.next()}),o=r?n.every(function(e){return e.done}):n.some(function(e){return e.done})),o?B():T(e,s++,t.apply(null,n.map(function(e){return e.value})))})},i}function eR(e,t){return e===t?e:A(e)?t:e.constructor(t)}function eT(e){if(e!==Object(e))throw TypeError("Expected [K, V] tuple: "+e)}function eB(e){return m(e)?v:y(e)?E:w}function eP(e){return Object.create((m(e)?M:y(e)?G:z).prototype)}function eZ(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):j.prototype.cacheResult.call(this)}function eU(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function eL(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=Array(n),i=0;i<n;i++)r[i]=e[i+t];return r}function eV(e,t){if(!e)throw Error(t)}function ej(e){eV(e!==1/0,"Cannot perform this action with an infinite size.")}function eM(e){if(V(e)&&"string"!=typeof e)return e;if(D(e))return e.toArray();throw TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function eG(e){return e&&(e.constructor&&"Object"===e.constructor.name||void 0===e.constructor)}function ez(e){return"object"==typeof e&&(x(e)||Array.isArray(e)||eG(e))}function eW(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch{return JSON.stringify(e)}}function e$(e,t){return x(e)?e.has(t):ez(e)&&L.call(e,t)}function eq(e,t,n){return x(e)?e.get(t,n):e$(e,t)?"function"==typeof e.get?e.get(t):e[t]:n}function eX(e){if(Array.isArray(e))return eL(e);var t={};for(var n in e)L.call(e,n)&&(t[n]=e[n]);return t}function eJ(e,t){if(!ez(e))throw TypeError("Cannot update non-data-structure value: "+e);if(x(e)){if(!e.remove)throw TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!L.call(e,t))return e;var n=eX(e);return Array.isArray(n)?n.splice(t,1):delete n[t],n}function eK(e,t,n){if(!ez(e))throw TypeError("Cannot update non-data-structure value: "+e);if(x(e)){if(!e.set)throw TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,n)}if(L.call(e,t)&&n===e[t])return e;var r=eX(e);return r[t]=n,r}function eY(e,t,r,i){i||(i=r,r=void 0);var a=function e(t,r,i,a,s,o){var u=r===n;if(a===i.length){var l=u?s:r,c=o(l);return c===l?r:c}if(!u&&!ez(r))throw TypeError("Cannot update within non-data-structure value in path ["+i.slice(0,a).map(eW)+"]: "+r);var d=i[a],h=u?n:eq(r,d,n),p=e(h===n?t:x(h),h,i,a+1,s,o);return p===h?r:p===n?eJ(r,d):eK(u?t?tI():{}:r,d,p)}(x(e),e,eM(t),0,r,i);return a===n?r:a}function eQ(e,t,r){return eY(e,t,n,function(){return r})}function eH(e,t){return eQ(this,e,t)}function e0(e,t){return eY(e,t,function(){return n})}function e1(e){return e0(this,e)}function e2(e,t,n,r){return eY(e,[t],n,r)}function e3(e,t,n){return 1==arguments.length?e(this):e2(this,e,t,n)}function e9(e,t,n){return eY(this,e,t,n)}function e5(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e6(this,e)}function e4(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if("function"!=typeof e)throw TypeError("Invalid merger function: "+e);return e6(this,t,e)}function e6(e,t,r){for(var i=[],a=0;a<t.length;a++){var s=v(t[a]);0!==s.size&&i.push(s)}return 0===i.length?e:0!==e.toSeq().size||e.__ownerID||1!==i.length?e.withMutations(function(e){for(var t=r?function(t,i){e2(e,i,n,function(e){return e===n?t:r(e,t,i)})}:function(t,n){e.set(n,t)},a=0;a<i.length;a++)i[a].forEach(t)}):e.constructor(i[0])}function e8(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return tr(e,t)}function e7(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return tr(t,n,e)}function te(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return tn(e,t)}function tt(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];return tn(t,n,e)}function tn(e,t,n){return tr(e,t,function e(t,r,i){return ez(t)&&ez(r)?tr(t,[r],e):n?n(t,r,i):r})}function tr(e,t,n){if(!ez(e))throw TypeError("Cannot merge into non-data-structure value: "+e);if(x(e))return"function"==typeof n&&e.mergeWith?e.mergeWith.apply(e,[n].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var r=Array.isArray(e),i=e,a=r?E:v,s=r?function(t){i===e&&(i=eX(i)),i.push(t)}:function(t,r){var a=L.call(i,r),s=a&&n?n(i[r],t,r):t;a&&s===i[r]||(i===e&&(i=eX(i)),i[r]=s)},o=0;o<t.length;o++)a(t[o]).forEach(s);return i}function ti(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return tn(this,e)}function ta(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return tn(this,t,e)}function ts(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return eY(this,e,tI(),function(e){return tr(e,t)})}function to(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return eY(this,e,tI(),function(e){return tn(e,t)})}function tu(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function tl(){return this.__ownerID?this:this.__ensureOwner(new a)}function tc(){return this.__ensureOwner()}function td(){return this.__altered}eb.prototype.cacheResult=e_.prototype.cacheResult=ev.prototype.cacheResult=eE.prototype.cacheResult=eZ;var th=function(e){function t(t){return null==t?tI():ee(t)&&!D(t)?t:tI().withMutations(function(n){var r=e(t);ej(r.size),r.forEach(function(e,t){return n.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return tI().withMutations(function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return tA(this,e,t)},t.prototype.remove=function(e){return tA(this,e,n)},t.prototype.deleteAll=function(e){var t=b(e);return 0===t.size?this:this.withMutations(function(e){t.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):tI()},t.prototype.sort=function(e){return tq(eD(this,e))},t.prototype.sortBy=function(e,t){return tq(eD(this,t,e))},t.prototype.map=function(e,t){return this.withMutations(function(n){n.forEach(function(r,i){n.set(i,e.call(t,r,i,n))})})},t.prototype.__iterator=function(e,t){return new tb(this,e,t)},t.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?tw(this.size,this._root,e,this.__hash):0===this.size?tI():(this.__ownerID=e,this.__altered=!1,this)},t}(v);th.isMap=ee;var tp=th.prototype;tp[H]=!0,tp[t]=tp.remove,tp.removeAll=tp.deleteAll,tp.setIn=eH,tp.removeIn=tp.deleteIn=e1,tp.update=e3,tp.updateIn=e9,tp.merge=tp.concat=e5,tp.mergeWith=e4,tp.mergeDeep=ti,tp.mergeDeepWith=ta,tp.mergeIn=ts,tp.mergeDeepIn=to,tp.withMutations=tu,tp.wasAltered=td,tp.asImmutable=tc,tp["@@transducer/init"]=tp.asMutable=tl,tp["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},tp["@@transducer/result"]=function(e){return e.asImmutable()};var tf=function(e,t){this.ownerID=e,this.entries=t};tf.prototype.get=function(e,t,n,r){for(var i=this.entries,a=0,s=i.length;a<s;a++)if(er(n,i[a][0]))return i[a][1];return r},tf.prototype.update=function(e,t,r,s,o,u,l){for(var c=o===n,d=this.entries,h=0,p=d.length;h<p&&!er(s,d[h][0]);h++);var f=h<p;if(f?d[h][1]===o:c)return this;if(i(l),(c||!f)&&i(u),!(c&&1===d.length)){if(!f&&!c&&d.length>=tO){var m=e;m||(m=new a);for(var g=new t_(m,es(s),[s,o]),y=0;y<d.length;y++){var _=d[y];g=g.update(m,0,void 0,_[0],_[1])}return g}var b=e&&e===this.ownerID,v=b?d:eL(d);return f?c?h===p-1?v.pop():v[h]=v.pop():v[h]=[s,o]:v.push([s,o]),b?(this.entries=v,this):new tf(e,v)}};var tm=function(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n};tm.prototype.get=function(e,t,n,r){void 0===t&&(t=es(n));var i=1<<((0===e?t:t>>>e)&31),a=this.bitmap;return(a&i)==0?r:this.nodes[tF(a&i-1)].get(e+5,t,n,r)},tm.prototype.update=function(e,t,r,i,a,s,o){void 0===r&&(r=es(i));var u=(0===t?r:r>>>t)&31,l=1<<u,c=this.bitmap,d=(c&l)!=0;if(!d&&a===n)return this;var h=tF(c&l-1),p=this.nodes,f=d?p[h]:void 0,m=tS(f,e,t+5,r,i,a,s,o);if(m===f)return this;if(!d&&m&&p.length>=tN){for(var g=c,y=0,_=Array(32),b=0;0!==g;b++,g>>>=1)_[b]=1&g?p[y++]:void 0;return _[u]=m,new tg(e,y+1,_)}if(d&&!m&&2===p.length&&tk(p[1^h]))return p[1^h];if(d&&m&&1===p.length&&tk(m))return m;var v=e&&e===this.ownerID,E=d?m?c:c^l:c|l,w=d?m?tD(p,h,m,v):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=Array(r),a=0,s=0;s<r;s++)s===t&&(a=1),i[s]=e[s+a];return i}(p,h,v):function(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var a=Array(i),s=0,o=0;o<i;o++)o===t?(a[o]=n,s=-1):a[o]=e[o+s];return a}(p,h,m,v);return v?(this.bitmap=E,this.nodes=w,this):new tm(e,E,w)};var tg=function(e,t,n){this.ownerID=e,this.count=t,this.nodes=n};tg.prototype.get=function(e,t,n,r){void 0===t&&(t=es(n));var i=(0===e?t:t>>>e)&31,a=this.nodes[i];return a?a.get(e+5,t,n,r):r},tg.prototype.update=function(e,t,r,i,a,s,o){void 0===r&&(r=es(i));var u=(0===t?r:r>>>t)&31,l=a===n,c=this.nodes,d=c[u];if(l&&!d)return this;var h=tS(d,e,t+5,r,i,a,s,o);if(h===d)return this;var p=this.count;if(d){if(!h&&--p<tC)return function(e,t,n,r){for(var i=0,a=0,s=Array(n),o=0,u=1,l=t.length;o<l;o++,u<<=1){var c=t[o];void 0!==c&&o!==r&&(i|=u,s[a++]=c)}return new tm(e,i,s)}(e,c,p,u)}else p++;var f=e&&e===this.ownerID,m=tD(c,u,h,f);return f?(this.count=p,this.nodes=m,this):new tg(e,p,m)};var ty=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n};ty.prototype.get=function(e,t,n,r){for(var i=this.entries,a=0,s=i.length;a<s;a++)if(er(n,i[a][0]))return i[a][1];return r},ty.prototype.update=function(e,t,r,a,s,o,u){void 0===r&&(r=es(a));var l=s===n;if(r!==this.keyHash)return l?this:(i(u),i(o),tx(this,e,t,r,[a,s]));for(var c=this.entries,d=0,h=c.length;d<h&&!er(a,c[d][0]);d++);var p=d<h;if(p?c[d][1]===s:l)return this;if(i(u),(l||!p)&&i(o),l&&2===h)return new t_(e,this.keyHash,c[1^d]);var f=e&&e===this.ownerID,m=f?c:eL(c);return p?l?d===h-1?m.pop():m[d]=m.pop():m[d]=[a,s]:m.push([a,s]),f?(this.entries=m,this):new ty(e,this.keyHash,m)};var t_=function(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n};t_.prototype.get=function(e,t,n,r){return er(n,this.entry[0])?this.entry[1]:r},t_.prototype.update=function(e,t,r,a,s,o,u){var l=s===n,c=er(a,this.entry[0]);return(c?s===this.entry[1]:l)?this:(i(u),l)?void i(o):c?e&&e===this.ownerID?(this.entry[1]=s,this):new t_(e,this.keyHash,[a,s]):(i(o),tx(this,e,t,es(a),[a,s]))},tf.prototype.iterate=ty.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===e(n[t?i-r:r]))return!1},tm.prototype.iterate=tg.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var a=n[t?i-r:r];if(a&&!1===a.iterate(e,t))return!1}},t_.prototype.iterate=function(e,t){return e(this.entry)};var tb=function(e){function t(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&tE(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n=t.node,r=t.index++,i=void 0;if(n.entry){if(0===r)return tv(e,n.entry)}else if(n.entries){if(r<=(i=n.entries.length-1))return tv(e,n.entries[this._reverse?i-r:r])}else if(r<=(i=n.nodes.length-1)){var a=n.nodes[this._reverse?i-r:r];if(a){if(a.entry)return tv(e,a.entry);t=this._stack=tE(a,t)}continue}t=this._stack=this._stack.__prev}return B()},t}(R);function tv(e,t){return T(e,t[0],t[1])}function tE(e,t){return{node:e,index:0,__prev:t}}function tw(e,t,n,r){var i=Object.create(tp);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function tI(){return ni||(ni=tw(0))}function tA(e,t,i){var a,s;if(e._root){var o=r(),u=r();if(a=tS(e._root,e.__ownerID,0,void 0,t,i,o,u),!u.value)return e;s=e.size+(o.value?i===n?-1:1:0)}else{if(i===n)return e;s=1,a=new tf(e.__ownerID,[[t,i]])}return e.__ownerID?(e.size=s,e._root=a,e.__hash=void 0,e.__altered=!0,e):a?tw(s,a):tI()}function tS(e,t,r,a,s,o,u,l){return e?e.update(t,r,a,s,o,u,l):o===n?e:(i(l),i(u),new t_(t,a,[s,o]))}function tk(e){return e.constructor===t_||e.constructor===ty}function tx(e,t,n,r,i){if(e.keyHash===r)return new ty(t,r,[e.entry,i]);var a,s=(0===n?e.keyHash:e.keyHash>>>n)&31,o=(0===n?r:r>>>n)&31,u=s===o?[tx(e,t,n+5,r,i)]:(a=new t_(t,r,i),s<o?[e,a]:[a,e]);return new tm(t,1<<s|1<<o,u)}function tF(e){return e-=e>>1&0x55555555,e=(e=(0x33333333&e)+(e>>2&0x33333333))+(e>>4)&0xf0f0f0f,e+=e>>8,127&(e+=e>>16)}function tD(e,t,n,r){var i=r?e:eL(e);return i[t]=n,i}var tO=8,tN=16,tC=8,tR="@@__IMMUTABLE_LIST__@@";function tT(e){return!!(e&&e[tR])}var tB=function(e){function t(t){var n=tj();if(null==t)return n;if(tT(t))return t;var r=e(t),i=r.size;return 0===i?n:(ej(i),i>0&&i<32?tV(0,i,5,null,new tZ(r.toArray())):n.withMutations(function(e){e.setSize(i),r.forEach(function(t,n){return e.set(n,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=o(this,e))>=0&&e<this.size){var n=tz(this,e+=this._origin);return n&&n.array[31&e]}return t},t.prototype.set=function(e,t){return function(e,t,n){if((t=o(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?tW(e,t).set(0,n):tW(e,0,t+1).set(t,n)});t+=e._origin;var i=e._tail,a=e._root,s=r();return t>=t$(e._capacity)?i=tM(i,e.__ownerID,0,t,n,s):a=tM(a,e.__ownerID,e._level,t,n,s),s.value?e.__ownerID?(e._root=a,e._tail=i,e.__hash=void 0,e.__altered=!0,e):tV(e._origin,e._capacity,e._level,a,i):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):tj()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){tW(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},t.prototype.pop=function(){return tW(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){tW(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},t.prototype.shift=function(){return tW(this,1)},t.prototype.concat=function(){for(var t=arguments,n=[],r=0;r<arguments.length;r++){var i=t[r],a=e("string"!=typeof i&&U(i)?i:[i]);0!==a.size&&n.push(a)}return 0===n.length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations(function(e){n.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(n[0])},t.prototype.setSize=function(e){return tW(this,0,e)},t.prototype.map=function(e,t){var n=this;return this.withMutations(function(r){for(var i=0;i<n.size;i++)r.set(i,e.call(t,r.get(i),i,r))})},t.prototype.slice=function(e,t){var n=this.size;return l(e,t,n)?this:tW(this,c(e,n,0),c(t,n,n))},t.prototype.__iterator=function(e,t){var n=t?this.size:0,r=tL(this,t);return new R(function(){var i=r();return i===tU?B():T(e,t?--n:n++,i)})},t.prototype.__iterate=function(e,t){for(var n,r=t?this.size:0,i=tL(this,t);(n=i())!==tU&&!1!==e(n,t?--r:r++,this););return r},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?tV(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?tj():(this.__ownerID=e,this.__altered=!1,this)},t}(E);tB.isList=tT;var tP=tB.prototype;tP[tR]=!0,tP[t]=tP.remove,tP.merge=tP.concat,tP.setIn=eH,tP.deleteIn=tP.removeIn=e1,tP.update=e3,tP.updateIn=e9,tP.mergeIn=ts,tP.mergeDeepIn=to,tP.withMutations=tu,tP.wasAltered=td,tP.asImmutable=tc,tP["@@transducer/init"]=tP.asMutable=tl,tP["@@transducer/step"]=function(e,t){return e.push(t)},tP["@@transducer/result"]=function(e){return e.asImmutable()};var tZ=function(e,t){this.array=e,this.ownerID=t};tZ.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&31;if(r>=this.array.length)return new tZ([],e);var i,a=0===r;if(t>0){var s=this.array[r];if((i=s&&s.removeBefore(e,t-5,n))===s&&a)return this}if(a&&!i)return this;var o=tG(this,e);if(!a)for(var u=0;u<r;u++)o.array[u]=void 0;return i&&(o.array[r]=i),o},tZ.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,i=n-1>>>t&31;if(i>=this.array.length)return this;if(t>0){var a=this.array[i];if((r=a&&a.removeAfter(e,t-5,n))===a&&i===this.array.length-1)return this}var s=tG(this,e);return s.array.splice(i+1),r&&(s.array[i]=r),s};var tU={};function tL(e,t){var n=e._origin,r=e._capacity,i=t$(r),a=e._tail;return function e(s,o,u){var l,c,d,h,p,f,m;return 0===o?(l=u===i?a&&a.array:s&&s.array,c=u>n?0:n-u,(d=r-u)>32&&(d=32),function(){if(c===d)return tU;var e=t?--d:c++;return l&&l[e]}):(p=s&&s.array,f=u>n?0:n-u>>o,(m=(r-u>>o)+1)>32&&(m=32),function(){for(;;){if(h){var n=h();if(n!==tU)return n;h=null}if(f===m)return tU;var r=t?--m:f++;h=e(p&&p[r],o-5,u+(r<<o))}})}(e._root,e._level,0)}function tV(e,t,n,r,i,a,s){var o=Object.create(tP);return o.size=t-e,o._origin=e,o._capacity=t,o._level=n,o._root=r,o._tail=i,o.__ownerID=a,o.__hash=s,o.__altered=!1,o}function tj(){return na||(na=tV(0,0,5))}function tM(e,t,n,r,a,s){var o,u=r>>>n&31,l=e&&u<e.array.length;if(!l&&void 0===a)return e;if(n>0){var c=e&&e.array[u],d=tM(c,t,n-5,r,a,s);return d===c?e:((o=tG(e,t)).array[u]=d,o)}return l&&e.array[u]===a?e:(s&&i(s),o=tG(e,t),void 0===a&&u===o.array.length-1?o.array.pop():o.array[u]=a,o)}function tG(e,t){return t&&e&&t===e.ownerID?e:new tZ(e?e.array.slice():[],t)}function tz(e,t){if(t>=t$(e._capacity))return e._tail;if(t<1<<e._level+5){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&31],r-=5;return n}}function tW(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new a,i=e._origin,s=e._capacity,o=i+t,u=void 0===n?s:n<0?s+n:i+n;if(o===i&&u===s)return e;if(o>=u)return e.clear();for(var l=e._level,c=e._root,d=0;o+d<0;)c=new tZ(c&&c.array.length?[void 0,c]:[],r),l+=5,d+=1<<l;d&&(o+=d,i+=d,u+=d,s+=d);for(var h=t$(s),p=t$(u);p>=1<<l+5;)c=new tZ(c&&c.array.length?[c]:[],r),l+=5;var f=e._tail,m=p<h?tz(e,u-1):p>h?new tZ([],r):f;if(f&&p>h&&o<s&&f.array.length){c=tG(c,r);for(var g=c,y=l;y>5;y-=5){var _=h>>>y&31;g=g.array[_]=tG(g.array[_],r)}g.array[h>>>5&31]=f}if(u<s&&(m=m&&m.removeAfter(r,0,u)),o>=p)o-=p,u-=p,l=5,c=null,m=m&&m.removeBefore(r,0,o);else if(o>i||p<h){for(d=0;c;){var b=o>>>l&31;if(b!==p>>>l&31)break;b&&(d+=(1<<l)*b),l-=5,c=c.array[b]}c&&o>i&&(c=c.removeBefore(r,l,o-d)),c&&p<h&&(c=c.removeAfter(r,l,p-d)),d&&(o-=d,u-=d)}return e.__ownerID?(e.size=u-o,e._origin=o,e._capacity=u,e._level=l,e._root=c,e._tail=m,e.__hash=void 0,e.__altered=!0,e):tV(o,u,l,c,m)}function t$(e){return e<32?0:e-1>>>5<<5}var tq=function(e){function t(e){return null==e?tJ():et(e)?e:tJ().withMutations(function(t){var n=v(e);ej(n.size),n.forEach(function(e,n){return t.set(n,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tJ()},t.prototype.set=function(e,t){return tK(this,e,t)},t.prototype.remove=function(e){return tK(this,e,n)},t.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?tX(t,n,e,this.__hash):0===this.size?tJ():(this.__ownerID=e,this._map=t,this._list=n,this)},t}(th);function tX(e,t,n,r){var i=Object.create(tq.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=n,i.__hash=r,i}function tJ(){return ns||(ns=tX(tI(),tj()))}function tK(e,t,r){var i,a,s=e._map,o=e._list,u=s.get(t),l=void 0!==u;if(r===n){if(!l)return e;o.size>=32&&o.size>=2*s.size?(i=(a=o.filter(function(e,t){return void 0!==e&&u!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(i.__ownerID=a.__ownerID=e.__ownerID)):(i=s.remove(t),a=u===o.size-1?o.pop():o.set(u,void 0))}else if(l){if(r===o.get(u)[1])return e;i=s,a=o.set(u,[t,r])}else i=s.set(t,o.size),a=o.set(o.size,[t,r]);return e.__ownerID?(e.size=i.size,e._map=i,e._list=a,e.__hash=void 0,e):tX(i,a)}tq.isOrderedMap=et,tq.prototype[F]=!0,tq.prototype[t]=tq.prototype.remove;var tY="@@__IMMUTABLE_STACK__@@";function tQ(e){return!!(e&&e[tY])}var tH=function(e){function t(e){return null==e?t2():tQ(e)?e:t2().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var n=this._head;for(e=o(this,e);n&&e--;)n=n.next;return n?n.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0==arguments.length)return this;for(var t=this.size+arguments.length,n=this._head,r=arguments.length-1;r>=0;r--)n={value:e[r],next:n};return this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):t1(t,n)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&tQ(t))return t;ej(t.size);var n=this.size,r=this._head;return t.__iterate(function(e){n++,r={value:e,next:r}},!0),this.__ownerID?(this.size=n,this._head=r,this.__hash=void 0,this.__altered=!0,this):t1(n,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):t2()},t.prototype.slice=function(t,n){if(l(t,n,this.size))return this;var r,i=c(t,this.size,0);if(c(n,r=this.size,r)!==this.size)return e.prototype.slice.call(this,t,n);for(var a=this.size-i,s=this._head;i--;)s=s.next;return this.__ownerID?(this.size=a,this._head=s,this.__hash=void 0,this.__altered=!0,this):t1(a,s)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?t1(this.size,this._head,e,this.__hash):0===this.size?t2():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var n=this;if(t)return new W(this.toArray()).__iterate(function(t,r){return e(t,r,n)},t);for(var r=0,i=this._head;i&&!1!==e(i.value,r++,n);)i=i.next;return r},t.prototype.__iterator=function(e,t){if(t)return new W(this.toArray()).__iterator(e,t);var n=0,r=this._head;return new R(function(){if(r){var t=r.value;return r=r.next,T(e,n++,t)}return B()})},t}(E);tH.isStack=tQ;var t0=tH.prototype;function t1(e,t,n,r){var i=Object.create(t0);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function t2(){return no||(no=t1(0))}t0[tY]=!0,t0.shift=t0.pop,t0.unshift=t0.push,t0.unshiftAll=t0.pushAll,t0.withMutations=tu,t0.wasAltered=td,t0.asImmutable=tc,t0["@@transducer/init"]=t0.asMutable=tl,t0["@@transducer/step"]=function(e,t){return e.unshift(t)},t0["@@transducer/result"]=function(e){return e.asImmutable()};var t3="@@__IMMUTABLE_SET__@@";function t9(e){return!!(e&&e[t3])}function t5(e){return t9(e)&&D(e)}function t4(e,t){if(e===t)return!0;if(!p(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||m(e)!==m(t)||y(e)!==y(t)||D(e)!==D(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!_(e);if(D(e)){var i=e.entries();return t.every(function(e,t){var n=i.next().value;return n&&er(n[1],e)&&(r||er(n[0],t))})&&i.next().done}var a=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{a=!0;var s=e;e=t,t=s}var o=!0,u=t.__iterate(function(t,i){if(r?!e.has(t):a?!er(t,e.get(i,n)):!er(e.get(i,n),t))return o=!1,!1});return o&&e.size===u}function t6(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function t8(e){if(!e||"object"!=typeof e)return e;if(!p(e)){if(!ez(e))return e;e=j(e)}if(m(e)){var t={};return e.__iterate(function(e,n){t[n]=t8(e)}),t}var n=[];return e.__iterate(function(e){n.push(t8(e))}),n}var t7=function(e){function t(t){return null==t?nr():t9(t)&&!D(t)?t:nr().withMutations(function(n){var r=e(t);ej(r.size),r.forEach(function(e){return n.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(v(e).keySeq())},t.intersect=function(e){return(e=b(e).toArray()).length?ne.intersect.apply(t(e.pop()),e):nr()},t.union=function(e){return(e=b(e).toArray()).length?ne.union.apply(t(e.pop()),e):nr()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return nt(this,this._map.set(e,e))},t.prototype.remove=function(e){return nt(this,this._map.remove(e))},t.prototype.clear=function(){return nt(this,this._map.clear())},t.prototype.map=function(e,t){var n=this;return nt(this,this._map.map(function(t){return e(t,t,n)},t))},t.prototype.union=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(n){for(var r=0;r<t.length;r++)e(t[r]).forEach(function(e){return n.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(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)})})},t.prototype.subtract=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(0===t.length)return this;t=t.map(function(t){return e(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)})})},t.prototype.sort=function(e){return nk(eD(this,e))},t.prototype.sortBy=function(e,t){return nk(eD(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t){return e(t,t,n)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(w);t7.isSet=t9;var ne=t7.prototype;function nt(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function nn(e,t){var n=Object.create(ne);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function nr(){return nu||(nu=nn(tI()))}ne[t3]=!0,ne[t]=ne.remove,ne.merge=ne.concat=ne.union,ne.withMutations=tu,ne.asImmutable=tc,ne["@@transducer/init"]=ne.asMutable=tl,ne["@@transducer/step"]=function(e,t){return e.add(t)},ne["@@transducer/result"]=function(e){return e.asImmutable()},ne.__empty=nr,ne.__make=nn;var ni,na,ns,no,nu,nl,nc=function(e){function t(e,n,r){if(!(this instanceof t))return new t(e,n,r);if(eV(0!==r,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),r=void 0===r?1:Math.abs(r),n<e&&(r=-r),this._start=e,this._end=n,this._step=r,this.size=Math.max(0,Math.ceil((n-e)/r-1)+1),0===this.size){if(nl)return nl;nl=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+o(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,n){var r;return l(e,n,this.size)?this:(e=c(e,this.size,0),(n=c(n,r=this.size,r))<=e?new t(0,0):new t(this.get(e,this._end),this.get(n,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return -1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,a=0;a!==n&&!1!==e(i,t?n-++a:a++,this);)i+=t?-r:r;return a},t.prototype.__iterator=function(e,t){var n=this.size,r=this._step,i=t?this._start+(n-1)*r:this._start,a=0;return new R(function(){if(a===n)return B();var s=i;return i+=t?-r:r,T(e,t?n-++a:a++,s)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:t4(this,e)},t}(G);function nd(e,t,r){for(var i=eM(t),a=0;a!==i.length;)if((e=eq(e,i[a++],n))===n)return r;return e}function nh(e,t){return nd(this,e,t)}function np(e,t){return nd(e,t,n)!==n}function nf(){ej(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e}b.isIterable=p,b.isKeyed=m,b.isIndexed=y,b.isAssociative=_,b.isOrdered=D,b.Iterator=R,t6(b,{toArray:function(){ej(this.size);var e=Array(this.size||0),t=m(this),n=0;return this.__iterate(function(r,i){e[n++]=t?[i,r]:r}),e},toIndexedSeq:function(){return new eb(this)},toJS:function(){return t8(this)},toKeyedSeq:function(){return new e_(this,!0)},toMap:function(){return th(this.toKeyedSeq())},toObject:nf,toOrderedMap:function(){return tq(this.toKeyedSeq())},toOrderedSet:function(){return nk(m(this)?this.valueSeq():this)},toSet:function(){return t7(m(this)?this.valueSeq():this)},toSetSeq:function(){return new ev(this)},toSeq:function(){return y(this)?this.toIndexedSeq():m(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return tH(m(this)?this.valueSeq():this)},toList:function(){return tB(m(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return eR(this,function(e,t){var n=m(e),r=[e].concat(t).map(function(e){return p(e)?n&&(e=v(e)):e=n?K(e):Y(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&m(i)||y(e)&&y(i))r