@bbc/react-transcript-editor
Version:
A React component to make transcribing audio and video easier and faster.
1 lines • 1.66 MB
JavaScript
module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=80)}([function(e,n){e.exports=require("react")},function(e,n,t){e.exports=t(31)()},function(e,n,t){"use strict";var r=t(119),o=t(37),A=t(19),i=t(135),s=t(29),l=t(61),a=t(64),c=t(91),u=t(136),m=t(93),C=t(52),d=t(16),p=t(89),f=t(7),h=t(71),g=t(107),I=t(34),b=t(196),y={Editor:u,EditorBlock:m,EditorState:f,CompositeDecorator:i,Entity:C,EntityInstance:p,BlockMapBuilder:o,CharacterMetadata:A,ContentBlock:s,ContentState:l,SelectionState:I,AtomicBlockUtils:r,KeyBindingUtil:h,Modifier:d,RichUtils:g,DefaultDraftBlockRenderMap:a,DefaultDraftInlineStyle:c,convertFromHTML:t(105),convertFromRaw:t(199),convertToRaw:b,genKey:t(25),getDefaultKeyBinding:t(108),getVisibleSelectionRect:t(204)};e.exports=y},function(e,n,t){e.exports=function(){"use strict";var e=Array.prototype.slice;function n(e,n){n&&(e.prototype=Object.create(n.prototype)),e.prototype.constructor=e}function t(e){return i(e)?e:N(e)}function r(e){return s(e)?e:L(e)}function o(e){return l(e)?e:W(e)}function A(e){return i(e)&&!a(e)?e:j(e)}function i(e){return!(!e||!e[u])}function s(e){return!(!e||!e[m])}function l(e){return!(!e||!e[C])}function a(e){return s(e)||l(e)}function c(e){return!(!e||!e[d])}n(r,t),n(o,t),n(A,t),t.isIterable=i,t.isKeyed=s,t.isIndexed=l,t.isAssociative=a,t.isOrdered=c,t.Keyed=r,t.Indexed=o,t.Set=A;var u="@@__IMMUTABLE_ITERABLE__@@",m="@@__IMMUTABLE_KEYED__@@",C="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",p={},f={value:!1},h={value:!1};function g(e){return e.value=!1,e}function I(e){e&&(e.value=!0)}function b(){}function y(e,n){n=n||0;for(var t=Math.max(0,e.length-n),r=new Array(t),o=0;o<t;o++)r[o]=e[o+n];return r}function E(e){return void 0===e.size&&(e.size=e.__iterate(v)),e.size}function w(e,n){if("number"!=typeof n){var t=n>>>0;if(""+t!==n||4294967295===t)return NaN;n=t}return n<0?E(e)+n:n}function v(){return!0}function x(e,n,t){return(0===e||void 0!==t&&e<=-t)&&(void 0===n||void 0!==t&&n>=t)}function B(e,n){return _(e,n,0)}function D(e,n){return _(e,n,n)}function _(e,n,t){return void 0===e?t:e<0?Math.max(0,n+e):void 0===n?e:Math.min(n,e)}var S,M,O,K="function"==typeof Symbol&&Symbol.iterator,T=K||"@@iterator";function Q(e){this.next=e}function k(e,n,t,r){var o=0===e?n:1===e?t:[n,t];return r?r.value=o:r={value:o,done:!1},r}function P(){return{value:void 0,done:!0}}function U(e){return!!Y(e)}function G(e){return e&&"function"==typeof e.next}function R(e){var n=Y(e);return n&&n.call(e)}function Y(e){var n=e&&(K&&e[K]||e["@@iterator"]);if("function"==typeof n)return n}function F(e){return e&&"number"==typeof e.length}function N(e){return null==e?J():i(e)?e.toSeq():function(e){var n=ee(e)||"object"==typeof e&&new z(e);if(!n)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return n}(e)}function L(e){return null==e?J().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():Z(e)}function W(e){return null==e?J():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():$(e)}function j(e){return(null==e?J():i(e)?s(e)?e.entrySeq():e:$(e)).toSetSeq()}function X(e){this._array=e,this.size=e.length}function z(e){var n=Object.keys(e);this._object=e,this._keys=n,this.size=n.length}function H(e){this._iterable=e,this.size=e.length||e.size}function q(e){this._iterator=e,this._iteratorCache=[]}function V(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function J(){return S||(S=new X([]))}function Z(e){var n=Array.isArray(e)?new X(e).fromEntrySeq():G(e)?new q(e).fromEntrySeq():U(e)?new H(e).fromEntrySeq():"object"==typeof e?new z(e):void 0;if(!n)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return n}function $(e){var n=ee(e);if(!n)throw new TypeError("Expected Array or iterable object of values: "+e);return n}function ee(e){return F(e)?new X(e):G(e)?new q(e):U(e)?new H(e):void 0}function ne(e,n,t,r){var o=e._cache;if(o){for(var A=o.length-1,i=0;i<=A;i++){var s=o[t?A-i:i];if(!1===n(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(n,t)}function te(e,n,t,r){var o=e._cache;if(o){var A=o.length-1,i=0;return new Q((function(){var e=o[t?A-i:i];return i++>A?{value:void 0,done:!0}:k(n,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(n,t)}function re(e,n){return n?function e(n,t,r,o){return Array.isArray(t)?n.call(o,r,W(t).map((function(r,o){return e(n,r,o,t)}))):Ae(t)?n.call(o,r,L(t).map((function(r,o){return e(n,r,o,t)}))):t}(n,e,"",{"":e}):oe(e)}function oe(e){return Array.isArray(e)?W(e).map(oe).toList():Ae(e)?L(e).map(oe).toMap():e}function Ae(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ie(e,n){if(e===n||e!=e&&n!=n)return!0;if(!e||!n)return!1;if("function"==typeof e.valueOf&&"function"==typeof n.valueOf){if((e=e.valueOf())===(n=n.valueOf())||e!=e&&n!=n)return!0;if(!e||!n)return!1}return!("function"!=typeof e.equals||"function"!=typeof n.equals||!e.equals(n))}function se(e,n){if(e===n)return!0;if(!i(n)||void 0!==e.size&&void 0!==n.size&&e.size!==n.size||void 0!==e.__hash&&void 0!==n.__hash&&e.__hash!==n.__hash||s(e)!==s(n)||l(e)!==l(n)||c(e)!==c(n))return!1;if(0===e.size&&0===n.size)return!0;var t=!a(e);if(c(e)){var r=e.entries();return n.every((function(e,n){var o=r.next().value;return o&&ie(o[1],e)&&(t||ie(o[0],n))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===n.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var A=e;e=n,n=A}var u=!0,m=n.__iterate((function(n,r){if(t?!e.has(n):o?!ie(n,e.get(r,p)):!ie(e.get(r,p),n))return u=!1,!1}));return u&&e.size===m}function le(e,n){if(!(this instanceof le))return new le(e,n);if(this._value=e,this.size=void 0===n?1/0:Math.max(0,n),0===this.size){if(M)return M;M=this}}function ae(e,n){if(!e)throw new Error(n)}function ce(e,n,t){if(!(this instanceof ce))return new ce(e,n,t);if(ae(0!==t,"Cannot step a Range by 0"),e=e||0,void 0===n&&(n=1/0),t=void 0===t?1:Math.abs(t),n<e&&(t=-t),this._start=e,this._end=n,this._step=t,this.size=Math.max(0,Math.ceil((n-e)/t-1)+1),0===this.size){if(O)return O;O=this}}function ue(){throw TypeError("Abstract")}function me(){}function Ce(){}function de(){}Q.prototype.toString=function(){return"[Iterator]"},Q.KEYS=0,Q.VALUES=1,Q.ENTRIES=2,Q.prototype.inspect=Q.prototype.toSource=function(){return this.toString()},Q.prototype[T]=function(){return this},n(N,t),N.of=function(){return N(arguments)},N.prototype.toSeq=function(){return this},N.prototype.toString=function(){return this.__toString("Seq {","}")},N.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},N.prototype.__iterate=function(e,n){return ne(this,e,n,!0)},N.prototype.__iterator=function(e,n){return te(this,e,n,!0)},n(L,N),L.prototype.toKeyedSeq=function(){return this},n(W,N),W.of=function(){return W(arguments)},W.prototype.toIndexedSeq=function(){return this},W.prototype.toString=function(){return this.__toString("Seq [","]")},W.prototype.__iterate=function(e,n){return ne(this,e,n,!1)},W.prototype.__iterator=function(e,n){return te(this,e,n,!1)},n(j,N),j.of=function(){return j(arguments)},j.prototype.toSetSeq=function(){return this},N.isSeq=V,N.Keyed=L,N.Set=j,N.Indexed=W,N.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,n(X,W),X.prototype.get=function(e,n){return this.has(e)?this._array[w(this,e)]:n},X.prototype.__iterate=function(e,n){for(var t=this._array,r=t.length-1,o=0;o<=r;o++)if(!1===e(t[n?r-o:o],o,this))return o+1;return o},X.prototype.__iterator=function(e,n){var t=this._array,r=t.length-1,o=0;return new Q((function(){return o>r?{value:void 0,done:!0}:k(e,o,t[n?r-o++:o++])}))},n(z,L),z.prototype.get=function(e,n){return void 0===n||this.has(e)?this._object[e]:n},z.prototype.has=function(e){return this._object.hasOwnProperty(e)},z.prototype.__iterate=function(e,n){for(var t=this._object,r=this._keys,o=r.length-1,A=0;A<=o;A++){var i=r[n?o-A:A];if(!1===e(t[i],i,this))return A+1}return A},z.prototype.__iterator=function(e,n){var t=this._object,r=this._keys,o=r.length-1,A=0;return new Q((function(){var i=r[n?o-A:A];return A++>o?{value:void 0,done:!0}:k(e,i,t[i])}))},z.prototype[d]=!0,n(H,W),H.prototype.__iterateUncached=function(e,n){if(n)return this.cacheResult().__iterate(e,n);var t=R(this._iterable),r=0;if(G(t))for(var o;!(o=t.next()).done&&!1!==e(o.value,r++,this););return r},H.prototype.__iteratorUncached=function(e,n){if(n)return this.cacheResult().__iterator(e,n);var t=R(this._iterable);if(!G(t))return new Q(P);var r=0;return new Q((function(){var n=t.next();return n.done?n:k(e,r++,n.value)}))},n(q,W),q.prototype.__iterateUncached=function(e,n){if(n)return this.cacheResult().__iterate(e,n);for(var t,r=this._iterator,o=this._iteratorCache,A=0;A<o.length;)if(!1===e(o[A],A++,this))return A;for(;!(t=r.next()).done;){var i=t.value;if(o[A]=i,!1===e(i,A++,this))break}return A},q.prototype.__iteratorUncached=function(e,n){if(n)return this.cacheResult().__iterator(e,n);var t=this._iterator,r=this._iteratorCache,o=0;return new Q((function(){if(o>=r.length){var n=t.next();if(n.done)return n;r[o]=n.value}return k(e,o,r[o++])}))},n(le,W),le.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},le.prototype.get=function(e,n){return this.has(e)?this._value:n},le.prototype.includes=function(e){return ie(this._value,e)},le.prototype.slice=function(e,n){var t=this.size;return x(e,n,t)?this:new le(this._value,D(n,t)-B(e,t))},le.prototype.reverse=function(){return this},le.prototype.indexOf=function(e){return ie(this._value,e)?0:-1},le.prototype.lastIndexOf=function(e){return ie(this._value,e)?this.size:-1},le.prototype.__iterate=function(e,n){for(var t=0;t<this.size;t++)if(!1===e(this._value,t,this))return t+1;return t},le.prototype.__iterator=function(e,n){var t=this,r=0;return new Q((function(){return r<t.size?k(e,r++,t._value):{value:void 0,done:!0}}))},le.prototype.equals=function(e){return e instanceof le?ie(this._value,e._value):se(e)},n(ce,W),ce.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},ce.prototype.get=function(e,n){return this.has(e)?this._start+w(this,e)*this._step:n},ce.prototype.includes=function(e){var n=(e-this._start)/this._step;return n>=0&&n<this.size&&n===Math.floor(n)},ce.prototype.slice=function(e,n){return x(e,n,this.size)?this:(e=B(e,this.size),(n=D(n,this.size))<=e?new ce(0,0):new ce(this.get(e,this._end),this.get(n,this._end),this._step))},ce.prototype.indexOf=function(e){var n=e-this._start;if(n%this._step==0){var t=n/this._step;if(t>=0&&t<this.size)return t}return-1},ce.prototype.lastIndexOf=function(e){return this.indexOf(e)},ce.prototype.__iterate=function(e,n){for(var t=this.size-1,r=this._step,o=n?this._start+t*r:this._start,A=0;A<=t;A++){if(!1===e(o,A,this))return A+1;o+=n?-r:r}return A},ce.prototype.__iterator=function(e,n){var t=this.size-1,r=this._step,o=n?this._start+t*r:this._start,A=0;return new Q((function(){var i=o;return o+=n?-r:r,A>t?{value:void 0,done:!0}:k(e,A++,i)}))},ce.prototype.equals=function(e){return e instanceof ce?this._start===e._start&&this._end===e._end&&this._step===e._step:se(this,e)},n(ue,t),n(me,ue),n(Ce,ue),n(de,ue),ue.Keyed=me,ue.Indexed=Ce,ue.Set=de;var pe="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,n){var t=65535&(e|=0),r=65535&(n|=0);return t*r+((e>>>16)*r+t*(n>>>16)<<16>>>0)|0};function fe(e){return e>>>1&1073741824|3221225471&e}function he(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var n=typeof e;if("number"===n){var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return fe(t)}if("string"===n)return e.length>xe?function(e){var n=_e[e];return void 0===n&&(n=ge(e),De===Be&&(De=0,_e={}),De++,_e[e]=n),n}(e):ge(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===n)return function(e){var n;if(Ee&&void 0!==(n=Ie.get(e)))return n;if(void 0!==(n=e[ve]))return n;if(!ye){if(void 0!==(n=e.propertyIsEnumerable&&e.propertyIsEnumerable[ve]))return n;if(void 0!==(n=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return n}if(n=++we,1073741824&we&&(we=0),Ee)Ie.set(e,n);else{if(void 0!==be&&!1===be(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ye)Object.defineProperty(e,ve,{enumerable:!1,configurable:!1,writable:!1,value:n});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[ve]=n;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[ve]=n}}return n}(e);if("function"==typeof e.toString)return ge(e.toString());throw new Error("Value type "+n+" cannot be hashed.")}function ge(e){for(var n=0,t=0;t<e.length;t++)n=31*n+e.charCodeAt(t)|0;return fe(n)}var Ie,be=Object.isExtensible,ye=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Ee="function"==typeof WeakMap;Ee&&(Ie=new WeakMap);var we=0,ve="__immutablehash__";"function"==typeof Symbol&&(ve=Symbol(ve));var xe=16,Be=255,De=0,_e={};function Se(e){ae(e!==1/0,"Cannot perform this action with an infinite size.")}function Me(e){return null==e?We():Oe(e)&&!c(e)?e:We().withMutations((function(n){var t=r(e);Se(t.size),t.forEach((function(e,t){return n.set(t,e)}))}))}function Oe(e){return!(!e||!e[Te])}n(Me,me),Me.prototype.toString=function(){return this.__toString("Map {","}")},Me.prototype.get=function(e,n){return this._root?this._root.get(0,void 0,e,n):n},Me.prototype.set=function(e,n){return je(this,e,n)},Me.prototype.setIn=function(e,n){return this.updateIn(e,p,(function(){return n}))},Me.prototype.remove=function(e){return je(this,e,p)},Me.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return p}))},Me.prototype.update=function(e,n,t){return 1===arguments.length?e(this):this.updateIn([e],n,t)},Me.prototype.updateIn=function(e,n,t){t||(t=n,n=void 0);var r=function e(n,t,r,o){var A=n===p,i=t.next();if(i.done){var s=A?r:n,l=o(s);return l===s?n:l}ae(A||n&&n.set,"invalid keyPath");var a=i.value,c=A?p:n.get(a,p),u=e(c,t,r,o);return u===c?n:u===p?n.remove(a):(A?We():n).set(a,u)}(this,Vn(e),n,t);return r===p?void 0:r},Me.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):We()},Me.prototype.merge=function(){return qe(this,void 0,arguments)},Me.prototype.mergeWith=function(n){var t=e.call(arguments,1);return qe(this,n,t)},Me.prototype.mergeIn=function(n){var t=e.call(arguments,1);return this.updateIn(n,We(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]}))},Me.prototype.mergeDeep=function(){return qe(this,Ve,arguments)},Me.prototype.mergeDeepWith=function(n){var t=e.call(arguments,1);return qe(this,Je(n),t)},Me.prototype.mergeDeepIn=function(n){var t=e.call(arguments,1);return this.updateIn(n,We(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]}))},Me.prototype.sort=function(e){return En(Rn(this,e))},Me.prototype.sortBy=function(e,n){return En(Rn(this,n,e))},Me.prototype.withMutations=function(e){var n=this.asMutable();return e(n),n.wasAltered()?n.__ensureOwner(this.__ownerID):this},Me.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new b)},Me.prototype.asImmutable=function(){return this.__ensureOwner()},Me.prototype.wasAltered=function(){return this.__altered},Me.prototype.__iterator=function(e,n){return new Ye(this,e,n)},Me.prototype.__iterate=function(e,n){var t=this,r=0;return this._root&&this._root.iterate((function(n){return r++,e(n[1],n[0],t)}),n),r},Me.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Le(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Me.isMap=Oe;var Ke,Te="@@__IMMUTABLE_MAP__@@",Qe=Me.prototype;function ke(e,n){this.ownerID=e,this.entries=n}function Pe(e,n,t){this.ownerID=e,this.bitmap=n,this.nodes=t}function Ue(e,n,t){this.ownerID=e,this.count=n,this.nodes=t}function Ge(e,n,t){this.ownerID=e,this.keyHash=n,this.entries=t}function Re(e,n,t){this.ownerID=e,this.keyHash=n,this.entry=t}function Ye(e,n,t){this._type=n,this._reverse=t,this._stack=e._root&&Ne(e._root)}function Fe(e,n){return k(e,n[0],n[1])}function Ne(e,n){return{node:e,index:0,__prev:n}}function Le(e,n,t,r){var o=Object.create(Qe);return o.size=e,o._root=n,o.__ownerID=t,o.__hash=r,o.__altered=!1,o}function We(){return Ke||(Ke=Le(0))}function je(e,n,t){var r,o;if(e._root){var A=g(f),i=g(h);if(r=Xe(e._root,e.__ownerID,0,void 0,n,t,A,i),!i.value)return e;o=e.size+(A.value?t===p?-1:1:0)}else{if(t===p)return e;o=1,r=new ke(e.__ownerID,[[n,t]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Le(o,r):We()}function Xe(e,n,t,r,o,A,i,s){return e?e.update(n,t,r,o,A,i,s):A===p?e:(I(s),I(i),new Re(n,r,[o,A]))}function ze(e){return e.constructor===Re||e.constructor===Ge}function He(e,n,t,r,o){if(e.keyHash===r)return new Ge(n,r,[e.entry,o]);var A,i=31&(0===t?e.keyHash:e.keyHash>>>t),s=31&(0===t?r:r>>>t);return new Pe(n,1<<i|1<<s,i===s?[He(e,n,t+5,r,o)]:(A=new Re(n,r,o),i<s?[e,A]:[A,e]))}function qe(e,n,t){for(var o=[],A=0;A<t.length;A++){var s=t[A],l=r(s);i(s)||(l=l.map((function(e){return re(e)}))),o.push(l)}return Ze(e,n,o)}function Ve(e,n,t){return e&&e.mergeDeep&&i(n)?e.mergeDeep(n):ie(e,n)?e:n}function Je(e){return function(n,t,r){if(n&&n.mergeDeepWith&&i(t))return n.mergeDeepWith(e,t);var o=e(n,t,r);return ie(n,o)?n:o}}function Ze(e,n,t){return 0===(t=t.filter((function(e){return 0!==e.size}))).length?e:0!==e.size||e.__ownerID||1!==t.length?e.withMutations((function(e){for(var r=n?function(t,r){e.update(r,p,(function(e){return e===p?t:n(e,t,r)}))}:function(n,t){e.set(t,n)},o=0;o<t.length;o++)t[o].forEach(r)})):e.constructor(t[0])}function $e(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function en(e,n,t,r){var o=r?e:y(e);return o[n]=t,o}Qe[Te]=!0,Qe.delete=Qe.remove,Qe.removeIn=Qe.deleteIn,ke.prototype.get=function(e,n,t,r){for(var o=this.entries,A=0,i=o.length;A<i;A++)if(ie(t,o[A][0]))return o[A][1];return r},ke.prototype.update=function(e,n,t,r,o,A,i){for(var s=o===p,l=this.entries,a=0,c=l.length;a<c&&!ie(r,l[a][0]);a++);var u=a<c;if(u?l[a][1]===o:s)return this;if(I(i),(s||!u)&&I(A),!s||1!==l.length){if(!u&&!s&&l.length>=nn)return function(e,n,t,r){e||(e=new b);for(var o=new Re(e,he(t),[t,r]),A=0;A<n.length;A++){var i=n[A];o=o.update(e,0,void 0,i[0],i[1])}return o}(e,l,r,o);var m=e&&e===this.ownerID,C=m?l:y(l);return u?s?a===c-1?C.pop():C[a]=C.pop():C[a]=[r,o]:C.push([r,o]),m?(this.entries=C,this):new ke(e,C)}},Pe.prototype.get=function(e,n,t,r){void 0===n&&(n=he(t));var o=1<<(31&(0===e?n:n>>>e)),A=this.bitmap;return 0==(A&o)?r:this.nodes[$e(A&o-1)].get(e+5,n,t,r)},Pe.prototype.update=function(e,n,t,r,o,A,i){void 0===t&&(t=he(r));var s=31&(0===n?t:t>>>n),l=1<<s,a=this.bitmap,c=0!=(a&l);if(!c&&o===p)return this;var u=$e(a&l-1),m=this.nodes,C=c?m[u]:void 0,d=Xe(C,e,n+5,t,r,o,A,i);if(d===C)return this;if(!c&&d&&m.length>=tn)return function(e,n,t,r,o){for(var A=0,i=new Array(32),s=0;0!==t;s++,t>>>=1)i[s]=1&t?n[A++]:void 0;return i[r]=o,new Ue(e,A+1,i)}(e,m,a,s,d);if(c&&!d&&2===m.length&&ze(m[1^u]))return m[1^u];if(c&&d&&1===m.length&&ze(d))return d;var f=e&&e===this.ownerID,h=c?d?a:a^l:a|l,g=c?d?en(m,u,d,f):function(e,n,t){var r=e.length-1;if(t&&n===r)return e.pop(),e;for(var o=new Array(r),A=0,i=0;i<r;i++)i===n&&(A=1),o[i]=e[i+A];return o}(m,u,f):function(e,n,t,r){var o=e.length+1;if(r&&n+1===o)return e[n]=t,e;for(var A=new Array(o),i=0,s=0;s<o;s++)s===n?(A[s]=t,i=-1):A[s]=e[s+i];return A}(m,u,d,f);return f?(this.bitmap=h,this.nodes=g,this):new Pe(e,h,g)},Ue.prototype.get=function(e,n,t,r){void 0===n&&(n=he(t));var o=31&(0===e?n:n>>>e),A=this.nodes[o];return A?A.get(e+5,n,t,r):r},Ue.prototype.update=function(e,n,t,r,o,A,i){void 0===t&&(t=he(r));var s=31&(0===n?t:t>>>n),l=o===p,a=this.nodes,c=a[s];if(l&&!c)return this;var u=Xe(c,e,n+5,t,r,o,A,i);if(u===c)return this;var m=this.count;if(c){if(!u&&--m<rn)return function(e,n,t,r){for(var o=0,A=0,i=new Array(t),s=0,l=1,a=n.length;s<a;s++,l<<=1){var c=n[s];void 0!==c&&s!==r&&(o|=l,i[A++]=c)}return new Pe(e,o,i)}(e,a,m,s)}else m++;var C=e&&e===this.ownerID,d=en(a,s,u,C);return C?(this.count=m,this.nodes=d,this):new Ue(e,m,d)},Ge.prototype.get=function(e,n,t,r){for(var o=this.entries,A=0,i=o.length;A<i;A++)if(ie(t,o[A][0]))return o[A][1];return r},Ge.prototype.update=function(e,n,t,r,o,A,i){void 0===t&&(t=he(r));var s=o===p;if(t!==this.keyHash)return s?this:(I(i),I(A),He(this,e,n,t,[r,o]));for(var l=this.entries,a=0,c=l.length;a<c&&!ie(r,l[a][0]);a++);var u=a<c;if(u?l[a][1]===o:s)return this;if(I(i),(s||!u)&&I(A),s&&2===c)return new Re(e,this.keyHash,l[1^a]);var m=e&&e===this.ownerID,C=m?l:y(l);return u?s?a===c-1?C.pop():C[a]=C.pop():C[a]=[r,o]:C.push([r,o]),m?(this.entries=C,this):new Ge(e,this.keyHash,C)},Re.prototype.get=function(e,n,t,r){return ie(t,this.entry[0])?this.entry[1]:r},Re.prototype.update=function(e,n,t,r,o,A,i){var s=o===p,l=ie(r,this.entry[0]);return(l?o===this.entry[1]:s)?this:(I(i),s?void I(A):l?e&&e===this.ownerID?(this.entry[1]=o,this):new Re(e,this.keyHash,[r,o]):(I(A),He(this,e,n,he(r),[r,o])))},ke.prototype.iterate=Ge.prototype.iterate=function(e,n){for(var t=this.entries,r=0,o=t.length-1;r<=o;r++)if(!1===e(t[n?o-r:r]))return!1},Pe.prototype.iterate=Ue.prototype.iterate=function(e,n){for(var t=this.nodes,r=0,o=t.length-1;r<=o;r++){var A=t[n?o-r:r];if(A&&!1===A.iterate(e,n))return!1}},Re.prototype.iterate=function(e,n){return e(this.entry)},n(Ye,Q),Ye.prototype.next=function(){for(var e=this._type,n=this._stack;n;){var t,r=n.node,o=n.index++;if(r.entry){if(0===o)return Fe(e,r.entry)}else if(r.entries){if(o<=(t=r.entries.length-1))return Fe(e,r.entries[this._reverse?t-o:o])}else if(o<=(t=r.nodes.length-1)){var A=r.nodes[this._reverse?t-o:o];if(A){if(A.entry)return Fe(e,A.entry);n=this._stack=Ne(A,n)}continue}n=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var nn=8,tn=16,rn=8;function on(e){var n=pn();if(null==e)return n;if(An(e))return e;var t=o(e),r=t.size;return 0===r?n:(Se(r),r>0&&r<32?dn(0,r,5,null,new an(t.toArray())):n.withMutations((function(e){e.setSize(r),t.forEach((function(n,t){return e.set(t,n)}))})))}function An(e){return!(!e||!e[sn])}n(on,Ce),on.of=function(){return this(arguments)},on.prototype.toString=function(){return this.__toString("List [","]")},on.prototype.get=function(e,n){if((e=w(this,e))>=0&&e<this.size){var t=gn(this,e+=this._origin);return t&&t.array[31&e]}return n},on.prototype.set=function(e,n){return function(e,n,t){if((n=w(e,n))!=n)return e;if(n>=e.size||n<0)return e.withMutations((function(e){n<0?In(e,n).set(0,t):In(e,0,n+1).set(n,t)}));n+=e._origin;var r=e._tail,o=e._root,A=g(h);return n>=yn(e._capacity)?r=fn(r,e.__ownerID,0,n,t,A):o=fn(o,e.__ownerID,e._level,n,t,A),A.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):dn(e._origin,e._capacity,e._level,o,r):e}(this,e,n)},on.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},on.prototype.insert=function(e,n){return this.splice(e,0,n)},on.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):pn()},on.prototype.push=function(){var e=arguments,n=this.size;return this.withMutations((function(t){In(t,0,n+e.length);for(var r=0;r<e.length;r++)t.set(n+r,e[r])}))},on.prototype.pop=function(){return In(this,0,-1)},on.prototype.unshift=function(){var e=arguments;return this.withMutations((function(n){In(n,-e.length);for(var t=0;t<e.length;t++)n.set(t,e[t])}))},on.prototype.shift=function(){return In(this,1)},on.prototype.merge=function(){return bn(this,void 0,arguments)},on.prototype.mergeWith=function(n){var t=e.call(arguments,1);return bn(this,n,t)},on.prototype.mergeDeep=function(){return bn(this,Ve,arguments)},on.prototype.mergeDeepWith=function(n){var t=e.call(arguments,1);return bn(this,Je(n),t)},on.prototype.setSize=function(e){return In(this,0,e)},on.prototype.slice=function(e,n){var t=this.size;return x(e,n,t)?this:In(this,B(e,t),D(n,t))},on.prototype.__iterator=function(e,n){var t=0,r=Cn(this,n);return new Q((function(){var n=r();return n===mn?{value:void 0,done:!0}:k(e,t++,n)}))},on.prototype.__iterate=function(e,n){for(var t,r=0,o=Cn(this,n);(t=o())!==mn&&!1!==e(t,r++,this););return r},on.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?dn(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},on.isList=An;var sn="@@__IMMUTABLE_LIST__@@",ln=on.prototype;function an(e,n){this.array=e,this.ownerID=n}ln[sn]=!0,ln.delete=ln.remove,ln.setIn=Qe.setIn,ln.deleteIn=ln.removeIn=Qe.removeIn,ln.update=Qe.update,ln.updateIn=Qe.updateIn,ln.mergeIn=Qe.mergeIn,ln.mergeDeepIn=Qe.mergeDeepIn,ln.withMutations=Qe.withMutations,ln.asMutable=Qe.asMutable,ln.asImmutable=Qe.asImmutable,ln.wasAltered=Qe.wasAltered,an.prototype.removeBefore=function(e,n,t){if(t===n?1<<n:0===this.array.length)return this;var r=t>>>n&31;if(r>=this.array.length)return new an([],e);var o,A=0===r;if(n>0){var i=this.array[r];if((o=i&&i.removeBefore(e,n-5,t))===i&&A)return this}if(A&&!o)return this;var s=hn(this,e);if(!A)for(var l=0;l<r;l++)s.array[l]=void 0;return o&&(s.array[r]=o),s},an.prototype.removeAfter=function(e,n,t){if(t===(n?1<<n:0)||0===this.array.length)return this;var r,o=t-1>>>n&31;if(o>=this.array.length)return this;if(n>0){var A=this.array[o];if((r=A&&A.removeAfter(e,n-5,t))===A&&o===this.array.length-1)return this}var i=hn(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var cn,un,mn={};function Cn(e,n){var t=e._origin,r=e._capacity,o=yn(r),A=e._tail;return i(e._root,e._level,0);function i(e,s,l){return 0===s?function(e,i){var s=i===o?A&&A.array:e&&e.array,l=i>t?0:t-i,a=r-i;return a>32&&(a=32),function(){if(l===a)return mn;var e=n?--a:l++;return s&&s[e]}}(e,l):function(e,o,A){var s,l=e&&e.array,a=A>t?0:t-A>>o,c=1+(r-A>>o);return c>32&&(c=32),function(){for(;;){if(s){var e=s();if(e!==mn)return e;s=null}if(a===c)return mn;var t=n?--c:a++;s=i(l&&l[t],o-5,A+(t<<o))}}}(e,s,l)}}function dn(e,n,t,r,o,A,i){var s=Object.create(ln);return s.size=n-e,s._origin=e,s._capacity=n,s._level=t,s._root=r,s._tail=o,s.__ownerID=A,s.__hash=i,s.__altered=!1,s}function pn(){return cn||(cn=dn(0,0,5))}function fn(e,n,t,r,o,A){var i,s=r>>>t&31,l=e&&s<e.array.length;if(!l&&void 0===o)return e;if(t>0){var a=e&&e.array[s],c=fn(a,n,t-5,r,o,A);return c===a?e:((i=hn(e,n)).array[s]=c,i)}return l&&e.array[s]===o?e:(I(A),i=hn(e,n),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function hn(e,n){return n&&e&&n===e.ownerID?e:new an(e?e.array.slice():[],n)}function gn(e,n){if(n>=yn(e._capacity))return e._tail;if(n<1<<e._level+5){for(var t=e._root,r=e._level;t&&r>0;)t=t.array[n>>>r&31],r-=5;return t}}function In(e,n,t){void 0!==n&&(n|=0),void 0!==t&&(t|=0);var r=e.__ownerID||new b,o=e._origin,A=e._capacity,i=o+n,s=void 0===t?A:t<0?A+t:o+t;if(i===o&&s===A)return e;if(i>=s)return e.clear();for(var l=e._level,a=e._root,c=0;i+c<0;)a=new an(a&&a.array.length?[void 0,a]:[],r),c+=1<<(l+=5);c&&(i+=c,o+=c,s+=c,A+=c);for(var u=yn(A),m=yn(s);m>=1<<l+5;)a=new an(a&&a.array.length?[a]:[],r),l+=5;var C=e._tail,d=m<u?gn(e,s-1):m>u?new an([],r):C;if(C&&m>u&&i<A&&C.array.length){for(var p=a=hn(a,r),f=l;f>5;f-=5){var h=u>>>f&31;p=p.array[h]=hn(p.array[h],r)}p.array[u>>>5&31]=C}if(s<A&&(d=d&&d.removeAfter(r,0,s)),i>=m)i-=m,s-=m,l=5,a=null,d=d&&d.removeBefore(r,0,i);else if(i>o||m<u){for(c=0;a;){var g=i>>>l&31;if(g!==m>>>l&31)break;g&&(c+=(1<<l)*g),l-=5,a=a.array[g]}a&&i>o&&(a=a.removeBefore(r,l,i-c)),a&&m<u&&(a=a.removeAfter(r,l,m-c)),c&&(i-=c,s-=c)}return e.__ownerID?(e.size=s-i,e._origin=i,e._capacity=s,e._level=l,e._root=a,e._tail=d,e.__hash=void 0,e.__altered=!0,e):dn(i,s,l,a,d)}function bn(e,n,t){for(var r=[],A=0,s=0;s<t.length;s++){var l=t[s],a=o(l);a.size>A&&(A=a.size),i(l)||(a=a.map((function(e){return re(e)}))),r.push(a)}return A>e.size&&(e=e.setSize(A)),Ze(e,n,r)}function yn(e){return e<32?0:e-1>>>5<<5}function En(e){return null==e?xn():wn(e)?e:xn().withMutations((function(n){var t=r(e);Se(t.size),t.forEach((function(e,t){return n.set(t,e)}))}))}function wn(e){return Oe(e)&&c(e)}function vn(e,n,t,r){var o=Object.create(En.prototype);return o.size=e?e.size:0,o._map=e,o._list=n,o.__ownerID=t,o.__hash=r,o}function xn(){return un||(un=vn(We(),pn()))}function Bn(e,n,t){var r,o,A=e._map,i=e._list,s=A.get(n),l=void 0!==s;if(t===p){if(!l)return e;i.size>=32&&i.size>=2*A.size?(r=(o=i.filter((function(e,n){return void 0!==e&&s!==n}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=A.remove(n),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(l){if(t===i.get(s)[1])return e;r=A,o=i.set(s,[n,t])}else r=A.set(n,i.size),o=i.set(i.size,[n,t]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):vn(r,o)}function Dn(e,n){this._iter=e,this._useKeys=n,this.size=e.size}function _n(e){this._iter=e,this.size=e.size}function Sn(e){this._iter=e,this.size=e.size}function Mn(e){this._iter=e,this.size=e.size}function On(e){var n=zn(e);return n._iter=e,n.size=e.size,n.flip=function(){return e},n.reverse=function(){var n=e.reverse.apply(this);return n.flip=function(){return e.reverse()},n},n.has=function(n){return e.includes(n)},n.includes=function(n){return e.has(n)},n.cacheResult=Hn,n.__iterateUncached=function(n,t){var r=this;return e.__iterate((function(e,t){return!1!==n(t,e,r)}),t)},n.__iteratorUncached=function(n,t){if(2===n){var r=e.__iterator(n,t);return new Q((function(){var e=r.next();if(!e.done){var n=e.value[0];e.value[0]=e.value[1],e.value[1]=n}return e}))}return e.__iterator(1===n?0:1,t)},n}function Kn(e,n,t){var r=zn(e);return r.size=e.size,r.has=function(n){return e.has(n)},r.get=function(r,o){var A=e.get(r,p);return A===p?o:n.call(t,A,r,e)},r.__iterateUncached=function(r,o){var A=this;return e.__iterate((function(e,o,i){return!1!==r(n.call(t,e,o,i),o,A)}),o)},r.__iteratorUncached=function(r,o){var A=e.__iterator(2,o);return new Q((function(){var o=A.next();if(o.done)return o;var i=o.value,s=i[0];return k(r,s,n.call(t,i[1],s,e),o)}))},r}function Tn(e,n){var t=zn(e);return t._iter=e,t.size=e.size,t.reverse=function(){return e},e.flip&&(t.flip=function(){var n=On(e);return n.reverse=function(){return e.flip()},n}),t.get=function(t,r){return e.get(n?t:-1-t,r)},t.has=function(t){return e.has(n?t:-1-t)},t.includes=function(n){return e.includes(n)},t.cacheResult=Hn,t.__iterate=function(n,t){var r=this;return e.__iterate((function(e,t){return n(e,t,r)}),!t)},t.__iterator=function(n,t){return e.__iterator(n,!t)},t}function Qn(e,n,t,r){var o=zn(e);return r&&(o.has=function(r){var o=e.get(r,p);return o!==p&&!!n.call(t,o,r,e)},o.get=function(r,o){var A=e.get(r,p);return A!==p&&n.call(t,A,r,e)?A:o}),o.__iterateUncached=function(o,A){var i=this,s=0;return e.__iterate((function(e,A,l){if(n.call(t,e,A,l))return s++,o(e,r?A:s-1,i)}),A),s},o.__iteratorUncached=function(o,A){var i=e.__iterator(2,A),s=0;return new Q((function(){for(;;){var A=i.next();if(A.done)return A;var l=A.value,a=l[0],c=l[1];if(n.call(t,c,a,e))return k(o,r?a:s++,c,A)}}))},o}function kn(e,n,t,r){var o=e.size;if(void 0!==n&&(n|=0),void 0!==t&&(t|=0),x(n,t,o))return e;var A=B(n,o),i=D(t,o);if(A!=A||i!=i)return kn(e.toSeq().cacheResult(),n,t,r);var s,l=i-A;l==l&&(s=l<0?0:l);var a=zn(e);return a.size=0===s?s:e.size&&s||void 0,!r&&V(e)&&s>=0&&(a.get=function(n,t){return(n=w(this,n))>=0&&n<s?e.get(n+A,t):t}),a.__iterateUncached=function(n,t){var o=this;if(0===s)return 0;if(t)return this.cacheResult().__iterate(n,t);var i=0,l=!0,a=0;return e.__iterate((function(e,t){if(!l||!(l=i++<A))return a++,!1!==n(e,r?t:a-1,o)&&a!==s})),a},a.__iteratorUncached=function(n,t){if(0!==s&&t)return this.cacheResult().__iterator(n,t);var o=0!==s&&e.__iterator(n,t),i=0,l=0;return new Q((function(){for(;i++<A;)o.next();if(++l>s)return{value:void 0,done:!0};var e=o.next();return r||1===n?e:k(n,l-1,0===n?void 0:e.value[1],e)}))},a}function Pn(e,n,t,r){var o=zn(e);return o.__iterateUncached=function(o,A){var i=this;if(A)return this.cacheResult().__iterate(o,A);var s=!0,l=0;return e.__iterate((function(e,A,a){if(!s||!(s=n.call(t,e,A,a)))return l++,o(e,r?A:l-1,i)})),l},o.__iteratorUncached=function(o,A){var i=this;if(A)return this.cacheResult().__iterator(o,A);var s=e.__iterator(2,A),l=!0,a=0;return new Q((function(){var e,A,c;do{if((e=s.next()).done)return r||1===o?e:k(o,a++,0===o?void 0:e.value[1],e);var u=e.value;A=u[0],c=u[1],l&&(l=n.call(t,c,A,i))}while(l);return 2===o?e:k(o,A,c,e)}))},o}function Un(e,n){var t=s(e),o=[e].concat(n).map((function(e){return i(e)?t&&(e=r(e)):e=t?Z(e):$(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var A=o[0];if(A===e||t&&s(A)||l(e)&&l(A))return A}var a=new X(o);return t?a=a.toKeyedSeq():l(e)||(a=a.toSetSeq()),(a=a.flatten(!0)).size=o.reduce((function(e,n){if(void 0!==e){var t=n.size;if(void 0!==t)return e+t}}),0),a}function Gn(e,n,t){var r=zn(e);return r.__iterateUncached=function(r,o){var A=0,s=!1;return function e(l,a){var c=this;l.__iterate((function(o,l){return(!n||a<n)&&i(o)?e(o,a+1):!1===r(o,t?l:A++,c)&&(s=!0),!s}),o)}(e,0),A},r.__iteratorUncached=function(r,o){var A=e.__iterator(r,o),s=[],l=0;return new Q((function(){for(;A;){var e=A.next();if(!1===e.done){var a=e.value;if(2===r&&(a=a[1]),n&&!(s.length<n)||!i(a))return t?e:k(r,l++,a,e);s.push(A),A=a.__iterator(r,o)}else A=s.pop()}return{value:void 0,done:!0}}))},r}function Rn(e,n,t){n||(n=qn);var r=s(e),o=0,A=e.toSeq().map((function(n,r){return[r,n,o++,t?t(n,r,e):n]})).toArray();return A.sort((function(e,t){return n(e[3],t[3])||e[2]-t[2]})).forEach(r?function(e,n){A[n].length=2}:function(e,n){A[n]=e[1]}),r?L(A):l(e)?W(A):j(A)}function Yn(e,n,t){if(n||(n=qn),t){var r=e.toSeq().map((function(n,r){return[n,t(n,r,e)]})).reduce((function(e,t){return Fn(n,e[1],t[1])?t:e}));return r&&r[0]}return e.reduce((function(e,t){return Fn(n,e,t)?t:e}))}function Fn(e,n,t){var r=e(t,n);return 0===r&&t!==n&&(null==t||t!=t)||r>0}function Nn(e,n,r){var o=zn(e);return o.size=new X(r).map((function(e){return e.size})).min(),o.__iterate=function(e,n){for(var t,r=this.__iterator(1,n),o=0;!(t=r.next()).done&&!1!==e(t.value,o++,this););return o},o.__iteratorUncached=function(e,o){var A=r.map((function(e){return e=t(e),R(o?e.reverse():e)})),i=0,s=!1;return new Q((function(){var t;return s||(t=A.map((function(e){return e.next()})),s=t.some((function(e){return e.done}))),s?{value:void 0,done:!0}:k(e,i++,n.apply(null,t.map((function(e){return e.value}))))}))},o}function Ln(e,n){return V(e)?n:e.constructor(n)}function Wn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function jn(e){return Se(e.size),E(e)}function Xn(e){return s(e)?r:l(e)?o:A}function zn(e){return Object.create((s(e)?L:l(e)?W:j).prototype)}function Hn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):N.prototype.cacheResult.call(this)}function qn(e,n){return e>n?1:e<n?-1:0}function Vn(e){var n=R(e);if(!n){if(!F(e))throw new TypeError("Expected iterable or array-like: "+e);n=R(t(e))}return n}function Jn(e,n){var t,r=function(A){if(A instanceof r)return A;if(!(this instanceof r))return new r(A);if(!t){t=!0;var i=Object.keys(e);!function(e,n){try{n.forEach(nt.bind(void 0,e))}catch(e){}}(o,i),o.size=i.length,o._name=n,o._keys=i,o._defaultValues=e}this._map=Me(A)},o=r.prototype=Object.create(Zn);return o.constructor=r,r}n(En,Me),En.of=function(){return this(arguments)},En.prototype.toString=function(){return this.__toString("OrderedMap {","}")},En.prototype.get=function(e,n){var t=this._map.get(e);return void 0!==t?this._list.get(t)[1]:n},En.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):xn()},En.prototype.set=function(e,n){return Bn(this,e,n)},En.prototype.remove=function(e){return Bn(this,e,p)},En.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},En.prototype.__iterate=function(e,n){var t=this;return this._list.__iterate((function(n){return n&&e(n[1],n[0],t)}),n)},En.prototype.__iterator=function(e,n){return this._list.fromEntrySeq().__iterator(e,n)},En.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var n=this._map.__ensureOwner(e),t=this._list.__ensureOwner(e);return e?vn(n,t,e,this.__hash):(this.__ownerID=e,this._map=n,this._list=t,this)},En.isOrderedMap=wn,En.prototype[d]=!0,En.prototype.delete=En.prototype.remove,n(Dn,L),Dn.prototype.get=function(e,n){return this._iter.get(e,n)},Dn.prototype.has=function(e){return this._iter.has(e)},Dn.prototype.valueSeq=function(){return this._iter.valueSeq()},Dn.prototype.reverse=function(){var e=this,n=Tn(this,!0);return this._useKeys||(n.valueSeq=function(){return e._iter.toSeq().reverse()}),n},Dn.prototype.map=function(e,n){var t=this,r=Kn(this,e,n);return this._useKeys||(r.valueSeq=function(){return t._iter.toSeq().map(e,n)}),r},Dn.prototype.__iterate=function(e,n){var t,r=this;return this._iter.__iterate(this._useKeys?function(n,t){return e(n,t,r)}:(t=n?jn(this):0,function(o){return e(o,n?--t:t++,r)}),n)},Dn.prototype.__iterator=function(e,n){if(this._useKeys)return this._iter.__iterator(e,n);var t=this._iter.__iterator(1,n),r=n?jn(this):0;return new Q((function(){var o=t.next();return o.done?o:k(e,n?--r:r++,o.value,o)}))},Dn.prototype[d]=!0,n(_n,W),_n.prototype.includes=function(e){return this._iter.includes(e)},_n.prototype.__iterate=function(e,n){var t=this,r=0;return this._iter.__iterate((function(n){return e(n,r++,t)}),n)},_n.prototype.__iterator=function(e,n){var t=this._iter.__iterator(1,n),r=0;return new Q((function(){var n=t.next();return n.done?n:k(e,r++,n.value,n)}))},n(Sn,j),Sn.prototype.has=function(e){return this._iter.includes(e)},Sn.prototype.__iterate=function(e,n){var t=this;return this._iter.__iterate((function(n){return e(n,n,t)}),n)},Sn.prototype.__iterator=function(e,n){var t=this._iter.__iterator(1,n);return new Q((function(){var n=t.next();return n.done?n:k(e,n.value,n.value,n)}))},n(Mn,L),Mn.prototype.entrySeq=function(){return this._iter.toSeq()},Mn.prototype.__iterate=function(e,n){var t=this;return this._iter.__iterate((function(n){if(n){Wn(n);var r=i(n);return e(r?n.get(1):n[1],r?n.get(0):n[0],t)}}),n)},Mn.prototype.__iterator=function(e,n){var t=this._iter.__iterator(1,n);return new Q((function(){for(;;){var n=t.next();if(n.done)return n;var r=n.value;if(r){Wn(r);var o=i(r);return k(e,o?r.get(0):r[0],o?r.get(1):r[1],n)}}}))},_n.prototype.cacheResult=Dn.prototype.cacheResult=Sn.prototype.cacheResult=Mn.prototype.cacheResult=Hn,n(Jn,me),Jn.prototype.toString=function(){return this.__toString(et(this)+" {","}")},Jn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Jn.prototype.get=function(e,n){if(!this.has(e))return n;var t=this._defaultValues[e];return this._map?this._map.get(e,t):t},Jn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=$n(this,We()))},Jn.prototype.set=function(e,n){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+et(this));var t=this._map&&this._map.set(e,n);return this.__ownerID||t===this._map?this:$n(this,t)},Jn.prototype.remove=function(e){if(!this.has(e))return this;var n=this._map&&this._map.remove(e);return this.__ownerID||n===this._map?this:$n(this,n)},Jn.prototype.wasAltered=function(){return this._map.wasAltered()},Jn.prototype.__iterator=function(e,n){var t=this;return r(this._defaultValues).map((function(e,n){return t.get(n)})).__iterator(e,n)},Jn.prototype.__iterate=function(e,n){var t=this;return r(this._defaultValues).map((function(e,n){return t.get(n)})).__iterate(e,n)},Jn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var n=this._map&&this._map.__ensureOwner(e);return e?$n(this,n,e):(this.__ownerID=e,this._map=n,this)};var Zn=Jn.prototype;function $n(e,n,t){var r=Object.create(Object.getPrototypeOf(e));return r._map=n,r.__ownerID=t,r}function et(e){return e._name||e.constructor.name||"Record"}function nt(e,n){Object.defineProperty(e,n,{get:function(){return this.get(n)},set:function(e){ae(this.__ownerID,"Cannot set on an immutable record."),this.set(n,e)}})}function tt(e){return null==e?at():rt(e)&&!c(e)?e:at().withMutations((function(n){var t=A(e);Se(t.size),t.forEach((function(e){return n.add(e)}))}))}function rt(e){return!(!e||!e[At])}Zn.delete=Zn.remove,Zn.deleteIn=Zn.removeIn=Qe.removeIn,Zn.merge=Qe.merge,Zn.mergeWith=Qe.mergeWith,Zn.mergeIn=Qe.mergeIn,Zn.mergeDeep=Qe.mergeDeep,Zn.mergeDeepWith=Qe.mergeDeepWith,Zn.mergeDeepIn=Qe.mergeDeepIn,Zn.setIn=Qe.setIn,Zn.update=Qe.update,Zn.updateIn=Qe.updateIn,Zn.withMutations=Qe.withMutations,Zn.asMutable=Qe.asMutable,Zn.asImmutable=Qe.asImmutable,n(tt,de),tt.of=function(){return this(arguments)},tt.fromKeys=function(e){return this(r(e).keySeq())},tt.prototype.toString=function(){return this.__toString("Set {","}")},tt.prototype.has=function(e){return this._map.has(e)},tt.prototype.add=function(e){return st(this,this._map.set(e,!0))},tt.prototype.remove=function(e){return st(this,this._map.remove(e))},tt.prototype.clear=function(){return st(this,this._map.clear())},tt.prototype.union=function(){var n=e.call(arguments,0);return 0===(n=n.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==n.length?this.withMutations((function(e){for(var t=0;t<n.length;t++)A(n[t]).forEach((function(n){return e.add(n)}))})):this.constructor(n[0])},tt.prototype.intersect=function(){var n=e.call(arguments,0);if(0===n.length)return this;n=n.map((function(e){return A(e)}));var t=this;return this.withMutations((function(e){t.forEach((function(t){n.every((function(e){return e.includes(t)}))||e.remove(t)}))}))},tt.prototype.subtract=function(){var n=e.call(arguments,0);if(0===n.length)return this;n=n.map((function(e){return A(e)}));var t=this;return this.withMutations((function(e){t.forEach((function(t){n.some((function(e){return e.includes(t)}))&&e.remove(t)}))}))},tt.prototype.merge=function(){return this.union.apply(this,arguments)},tt.prototype.mergeWith=function(n){var t=e.call(arguments,1);return this.union.apply(this,t)},tt.prototype.sort=function(e){return ct(Rn(this,e))},tt.prototype.sortBy=function(e,n){return ct(Rn(this,n,e))},tt.prototype.wasAltered=function(){return this._map.wasAltered()},tt.prototype.__iterate=function(e,n){var t=this;return this._map.__iterate((function(n,r){return e(r,r,t)}),n)},tt.prototype.__iterator=function(e,n){return this._map.map((function(e,n){return n})).__iterator(e,n)},tt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var n=this._map.__ensureOwner(e);return e?this.__make(n,e):(this.__ownerID=e,this._map=n,this)},tt.isSet=rt;var ot,At="@@__IMMUTABLE_SET__@@",it=tt.prototype;function st(e,n){return e.__ownerID?(e.size=n.size,e._map=n,e):n===e._map?e:0===n.size?e.__empty():e.__make(n)}function lt(e,n){var t=Object.create(it);return t.size=e?e.size:0,t._map=e,t.__ownerID=n,t}function at(){return ot||(ot=lt(We()))}function ct(e){return null==e?pt():ut(e)?e:pt().withMutations((function(n){var t=A(e);Se(t.size),t.forEach((function(e){return n.add(e)}))}))}function ut(e){return rt(e)&&c(e)}it[At]=!0,it.delete=it.remove,it.mergeDeep=it.merge,it.mergeDeepWith=it.mergeWith,it.withMutations=Qe.withMutations,it.asMutable=Qe.asMutable,it.asImmutable=Qe.asImmutable,it.__empty=at,it.__make=lt,n(ct,tt),ct.of=function(){return this(arguments)},ct.fromKeys=function(e){return this(r(e).keySeq())},ct.prototype.toString=function(){return this.__toString("OrderedSet {","}")},ct.isOrderedSet=ut;var mt,Ct=ct.prototype;function dt(e,n){var t=Object.create(Ct);return t.size=e?e.size:0,t._map=e,t.__ownerID=n,t}function pt(){return mt||(mt=dt(xn()))}function ft(e){return null==e?Et():ht(e)?e:Et().unshiftAll(e)}function ht(e){return!(!e||!e[It])}Ct[d]=!0,Ct.__empty=pt,Ct.__make=dt,n(ft,Ce),ft.of=function(){return this(arguments)},ft.prototype.toString=function(){return this.__toString("Stack [","]")},ft.prototype.get=function(e,n){var t=this._head;for(e=w(this,e);t&&e--;)t=t.next;return t?t.value:n},ft.prototype.peek=function(){return this._head&&this._head.value},ft.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,n=this._head,t=arguments.length-1;t>=0;t--)n={value:arguments[t],next:n};return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):yt(e,n)},ft.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Se(e.size);var n=this.size,t=this._head;return e.reverse().forEach((function(e){n++,t={value:e,next:t}})),this.__ownerID?(this.size=n,this._head=t,this.__hash=void 0,this.__altered=!0,this):yt(n,t)},ft.prototype.pop=function(){return this.slice(1)},ft.prototype.unshift=function(){return this.push.apply(this,arguments)},ft.prototype.unshiftAll=function(e){return this.pushAll(e)},ft.prototype.shift=function(){return this.pop.apply(this,arguments)},ft.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):Et()},ft.prototype.slice=function(e,n){if(x(e,n,this.size))return this;var t=B(e,this.size);if(D(n,this.size)!==this.size)return Ce.prototype.slice.call(this,e,n);for(var r=this.size-t,o=this._head;t--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):yt(r,o)},ft.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?yt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},ft.prototype.__iterate=function(e,n){if(n)return this.reverse().__iterate(e);for(var t=0,r=this._head;r&&!1!==e(r.value,t++,this);)r=r.next;return t},ft.prototype.__iterator=function(e,n){if(n)return this.reverse().__iterator(e);var t=0,r=this._head;return new Q((function(){if(r){var n=r.value;return r=r.next,k(e,t++,n)}return{value:void 0,done:!0}}))},ft.isStack=ht;var gt,It="@@__IMMUTABLE_STACK__@@",bt=ft.prototype;function yt(e,n,t,r){var o=Object.create(bt);return o.size=e,o._head=n,o.__ownerID=t,o.__hash=r,o.__altered=!1,o}function Et(){return gt||(gt=yt(0))}function wt(e,n){var t=function(t){e.prototype[t]=n[t]};return Object.keys(n).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(n).forEach(t),e}bt[It]=!0,bt.withMutations=Qe.withMutations,bt.asMutable=Qe.asMutable,bt.asImmutable=Qe.asImmutable,bt.wasAltered=Qe.wasAltered,t.Iterator=Q,wt(t,{toArray:function(){Se(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(n,t){e[t]=n})),e},toIndexedSeq:function(){return new _n(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Dn(this,!0)},toMap:function(){return Me(this.toKeyedSeq())},toObject:function(){Se(this.size);var e={};return this.__iterate((function(n,t){e[t]=n})),e},toOrderedMap:function(){return En(this.toKeyedSeq())},toOrderedSet:function(){return ct(s(this)?this.valueSeq():this)},toSet:function(){return tt(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Sn(this)},toSeq:function(){return l(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return ft(s(this)?this.valueSeq():this)},toList:function(){return on(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,n){return 0===this.size?e+n:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+n},concat:function(){var n=e.call(arguments,0);return Ln(this,Un(this,n))},includes:function(e){return this.some((function(n){return ie(n,e)}))},entries:function(){return this.__iterator(2)},every:function(e,n){Se(this.size);var t=!0;return this.__iterate((function(r,o,A){if(!e.call(n,r,o,A))return t=!1,!1})),t},filter:function(e,n){return Ln(this,Qn(this,e,n,!0))},find:function(e,n,t){var r=this.findEntry(e,n);return r?r[1]:t},findEntry:function(e,n){var t;return this.__iterate((function(r,o,A){if(e.call(n,r,o,A))return t=[o,r],!1})),t},findLastEntry:function(e,n){return this.toSeq().reverse().findEntry(e,n)},forEach:function(e,n){return Se(this.size),this.__iterate(n?e.bind(n):e)},join:function(e){Se(this.size),e=void 0!==e?""+e:",";var n="",t=!0;return this.__iterate((function(r){t?t=!1:n+=e,n+=null!=r?r.toString():""})),n},keys:function(){return this.__iterator(0)},map:function(