• File: replacementVariableEditor.js
  • Full Path: /home/matthif/www/wp-content/plugins/wordpress-seo/js/dist/externals/replacementVariableEditor.js
  • Date Modified: 02/24/2024 11:29 PM
  • File size: 181.2 KB
  • MIME-type: text/plain
  • Charset: utf-8
(()=>{var t={6581:function(t){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return s(t)?t:J(t)}function r(t){return a(t)?t:$(t)}function i(t){return u(t)?t:Y(t)}function o(t){return s(t)&&!c(t)?t:X(t)}function s(t){return!(!t||!t[h])}function a(t){return!(!t||!t[p])}function u(t){return!(!t||!t[l])}function c(t){return a(t)||u(t)}function f(t){return!(!t||!t[d])}e(r,n),e(i,n),e(o,n),n.isIterable=s,n.isKeyed=a,n.isIndexed=u,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=i,n.Set=o;var h="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",l="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",v="delete",_=5,y=1<<_,g=y-1,m={},w={value:!1},b={value:!1};function S(t){return t.value=!1,t}function E(t){t&&(t.value=!0)}function O(){}function I(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function x(t){return void 0===t.size&&(t.size=t.__iterate(D)),t.size}function z(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?x(t)+e:e}function D(){return!0}function M(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function k(t,e){return R(t,e,0)}function C(t,e){return R(t,e,e)}function R(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var A=0,q=1,B=2,j="function"==typeof Symbol&&Symbol.iterator,P="@@iterator",F=j||P;function K(t){this.next=t}function T(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function L(){return{value:void 0,done:!0}}function V(t){return!!N(t)}function U(t){return t&&"function"==typeof t.next}function W(t){var e=N(t);return e&&e.call(t)}function N(t){var e=t&&(j&&t[j]||t[P]);if("function"==typeof e)return e}function H(t){return t&&"number"==typeof t.length}function J(t){return null==t?st():s(t)?t.toSeq():function(t){var e=ct(t)||"object"==typeof t&&new nt(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function $(t){return null==t?st().toKeyedSeq():s(t)?a(t)?t.toSeq():t.fromEntrySeq():at(t)}function Y(t){return null==t?st():s(t)?a(t)?t.entrySeq():t.toIndexedSeq():ut(t)}function X(t){return(null==t?st():s(t)?a(t)?t.entrySeq():t:ut(t)).toSetSeq()}K.prototype.toString=function(){return"[Iterator]"},K.KEYS=A,K.VALUES=q,K.ENTRIES=B,K.prototype.inspect=K.prototype.toSource=function(){return this.toString()},K.prototype[F]=function(){return this},e(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(t,e){return ft(this,t,e,!0)},J.prototype.__iterator=function(t,e){return ht(this,t,e,!0)},e($,J),$.prototype.toKeyedSeq=function(){return this},e(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(t,e){return ft(this,t,e,!1)},Y.prototype.__iterator=function(t,e){return ht(this,t,e,!1)},e(X,J),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},J.isSeq=ot,J.Keyed=$,J.Set=X,J.Indexed=Y;var G,Q,Z,tt="@@__IMMUTABLE_SEQ__@@";function et(t){this._array=t,this.size=t.length}function nt(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function rt(t){this._iterable=t,this.size=t.length||t.size}function it(t){this._iterator=t,this._iteratorCache=[]}function ot(t){return!(!t||!t[tt])}function st(){return G||(G=new et([]))}function at(t){var e=Array.isArray(t)?new et(t).fromEntrySeq():U(t)?new it(t).fromEntrySeq():V(t)?new rt(t).fromEntrySeq():"object"==typeof t?new nt(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function ut(t){var e=ct(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function ct(t){return H(t)?new et(t):U(t)?new it(t):V(t)?new rt(t):void 0}function ft(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,s=0;s<=o;s++){var a=i[n?o-s:s];if(!1===e(a[1],r?a[0]:s,t))return s+1}return s}return t.__iterateUncached(e,n)}function ht(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,s=0;return new K((function(){var t=i[n?o-s:s];return s++>o?{value:void 0,done:!0}:T(e,r?t[0]:s-1,t[1])}))}return t.__iteratorUncached(e,n)}function pt(t,e){return e?lt(e,t,"",{"":t}):dt(t)}function lt(t,e,n,r){return Array.isArray(e)?t.call(r,n,Y(e).map((function(n,r){return lt(t,n,r,e)}))):vt(e)?t.call(r,n,$(e).map((function(n,r){return lt(t,n,r,e)}))):e}function dt(t){return Array.isArray(t)?Y(t).map(dt).toList():vt(t)?$(t).map(dt).toMap():t}function vt(t){return t&&(t.constructor===Object||void 0===t.constructor)}function _t(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function yt(t,e){if(t===e)return!0;if(!s(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!c(t);if(f(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&_t(i[1],t)&&(n||_t(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var h=!0,p=e.__iterate((function(e,r){if(n?!t.has(e):i?!_t(e,t.get(r,m)):!_t(t.get(r,m),e))return h=!1,!1}));return h&&t.size===p}function gt(t,e){if(!(this instanceof gt))return new gt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Q)return Q;Q=this}}function mt(t,e){if(!t)throw new Error(e)}function wt(t,e,n){if(!(this instanceof wt))return new wt(t,e,n);if(mt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(Z)return Z;Z=this}}function bt(){throw TypeError("Abstract")}function St(){}function Et(){}function Ot(){}J.prototype[tt]=!0,e(et,Y),et.prototype.get=function(t,e){return this.has(t)?this._array[z(this,t)]:e},et.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===t(n[e?r-i:i],i,this))return i+1;return i},et.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new K((function(){return i>r?{value:void 0,done:!0}:T(t,i,n[e?r-i++:i++])}))},e(nt,$),nt.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},nt.prototype.has=function(t){return this._object.hasOwnProperty(t)},nt.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var s=r[e?i-o:o];if(!1===t(n[s],s,this))return o+1}return o},nt.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new K((function(){var s=r[e?i-o:o];return o++>i?{value:void 0,done:!0}:T(t,s,n[s])}))},nt.prototype[d]=!0,e(rt,Y),rt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=W(this._iterable),r=0;if(U(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},rt.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=W(this._iterable);if(!U(n))return new K(L);var r=0;return new K((function(){var e=n.next();return e.done?e:T(t,r++,e.value)}))},e(it,Y),it.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===t(i[o],o++,this))return o;for(;!(n=r.next()).done;){var s=n.value;if(i[o]=s,!1===t(s,o++,this))break}return o},it.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,i=0;return new K((function(){if(i>=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return T(t,i,r[i++])}))},e(gt,Y),gt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},gt.prototype.get=function(t,e){return this.has(t)?this._value:e},gt.prototype.includes=function(t){return _t(this._value,t)},gt.prototype.slice=function(t,e){var n=this.size;return M(t,e,n)?this:new gt(this._value,C(e,n)-k(t,n))},gt.prototype.reverse=function(){return this},gt.prototype.indexOf=function(t){return _t(this._value,t)?0:-1},gt.prototype.lastIndexOf=function(t){return _t(this._value,t)?this.size:-1},gt.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(!1===t(this._value,n,this))return n+1;return n},gt.prototype.__iterator=function(t,e){var n=this,r=0;return new K((function(){return r<n.size?T(t,r++,n._value):{value:void 0,done:!0}}))},gt.prototype.equals=function(t){return t instanceof gt?_t(this._value,t._value):yt(t)},e(wt,Y),wt.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},wt.prototype.get=function(t,e){return this.has(t)?this._start+z(this,t)*this._step:e},wt.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},wt.prototype.slice=function(t,e){return M(t,e,this.size)?this:(t=k(t,this.size),(e=C(e,this.size))<=t?new wt(0,0):new wt(this.get(t,this._end),this.get(e,this._end),this._step))},wt.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},wt.prototype.lastIndexOf=function(t){return this.indexOf(t)},wt.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===t(i,o,this))return o+1;i+=e?-r:r}return o},wt.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new K((function(){var s=i;return i+=e?-r:r,o>n?{value:void 0,done:!0}:T(t,o++,s)}))},wt.prototype.equals=function(t){return t instanceof wt?this._start===t._start&&this._end===t._end&&this._step===t._step:yt(this,t)},e(bt,n),e(St,bt),e(Et,bt),e(Ot,bt),bt.Keyed=St,bt.Indexed=Et,bt.Set=Ot;var It="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function xt(t){return t>>>1&1073741824|3221225471&t}function zt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)n^=t/=4294967295;return xt(n)}if("string"===e)return t.length>Bt?function(t){var e=Ft[t];return void 0===e&&(e=Dt(t),Pt===jt&&(Pt=0,Ft={}),Pt++,Ft[t]=e),e}(t):Dt(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(Rt&&void 0!==(e=Ct.get(t)))return e;if(void 0!==(e=t[qt]))return e;if(!kt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[qt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++At,1073741824&At&&(At=0),Rt)Ct.set(t,e);else{if(void 0!==Mt&&!1===Mt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(kt)Object.defineProperty(t,qt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[qt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[qt]=e}}return e}(t);if("function"==typeof t.toString)return Dt(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Dt(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return xt(e)}var Mt=Object.isExtensible,kt=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();var Ct,Rt="function"==typeof WeakMap;Rt&&(Ct=new WeakMap);var At=0,qt="__immutablehash__";"function"==typeof Symbol&&(qt=Symbol(qt));var Bt=16,jt=255,Pt=0,Ft={};function Kt(t){mt(t!==1/0,"Cannot perform this action with an infinite size.")}function Tt(t){return null==t?te():Lt(t)&&!f(t)?t:te().withMutations((function(e){var n=r(t);Kt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Lt(t){return!(!t||!t[Ut])}e(Tt,St),Tt.of=function(){var e=t.call(arguments,0);return te().withMutations((function(t){for(var n=0;n<e.length;n+=2){if(n+1>=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}}))},Tt.prototype.toString=function(){return this.__toString("Map {","}")},Tt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Tt.prototype.set=function(t,e){return ee(this,t,e)},Tt.prototype.setIn=function(t,e){return this.updateIn(t,m,(function(){return e}))},Tt.prototype.remove=function(t){return ee(this,t,m)},Tt.prototype.deleteIn=function(t){return this.updateIn(t,(function(){return m}))},Tt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Tt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=ce(this,sn(t),e,n);return r===m?void 0:r},Tt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):te()},Tt.prototype.merge=function(){return oe(this,void 0,arguments)},Tt.prototype.mergeWith=function(e){return oe(this,e,t.call(arguments,1))},Tt.prototype.mergeIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,te(),(function(t){return"function"==typeof t.merge?t.merge.apply(t,n):n[n.length-1]}))},Tt.prototype.mergeDeep=function(){return oe(this,se,arguments)},Tt.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return oe(this,ae(e),n)},Tt.prototype.mergeDeepIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,te(),(function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,n):n[n.length-1]}))},Tt.prototype.sort=function(t){return Re($e(this,t))},Tt.prototype.sortBy=function(t,e){return Re($e(this,e,t))},Tt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Tt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new O)},Tt.prototype.asImmutable=function(){return this.__ensureOwner()},Tt.prototype.wasAltered=function(){return this.__altered},Tt.prototype.__iterator=function(t,e){return new Xt(this,t,e)},Tt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},Tt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Zt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Tt.isMap=Lt;var Vt,Ut="@@__IMMUTABLE_MAP__@@",Wt=Tt.prototype;function Nt(t,e){this.ownerID=t,this.entries=e}function Ht(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Jt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function $t(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Xt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Qt(t._root)}function Gt(t,e){return T(t,e[0],e[1])}function Qt(t,e){return{node:t,index:0,__prev:e}}function Zt(t,e,n,r){var i=Object.create(Wt);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function te(){return Vt||(Vt=Zt(0))}function ee(t,e,n){var r,i;if(t._root){var o=S(w),s=S(b);if(r=ne(t._root,t.__ownerID,0,void 0,e,n,o,s),!s.value)return t;i=t.size+(o.value?n===m?-1:1:0)}else{if(n===m)return t;i=1,r=new Nt(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?Zt(i,r):te()}function ne(t,e,n,r,i,o,s,a){return t?t.update(e,n,r,i,o,s,a):o===m?t:(E(a),E(s),new Yt(e,r,[i,o]))}function re(t){return t.constructor===Yt||t.constructor===$t}function ie(t,e,n,r,i){if(t.keyHash===r)return new $t(e,r,[t.entry,i]);var o,s=(0===n?t.keyHash:t.keyHash>>>n)&g,a=(0===n?r:r>>>n)&g;return new Ht(e,1<<s|1<<a,s===a?[ie(t,e,n+_,r,i)]:(o=new Yt(e,r,i),s<a?[t,o]:[o,t]))}function oe(t,e,n){for(var i=[],o=0;o<n.length;o++){var a=n[o],u=r(a);s(a)||(u=u.map((function(t){return pt(t)}))),i.push(u)}return ue(t,e,i)}function se(t,e,n){return t&&t.mergeDeep&&s(e)?t.mergeDeep(e):_t(t,e)?t:e}function ae(t){return function(e,n,r){if(e&&e.mergeDeepWith&&s(n))return e.mergeDeepWith(t,n);var i=t(e,n,r);return _t(e,i)?e:i}}function ue(t,e,n){return 0===(n=n.filter((function(t){return 0!==t.size}))).length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations((function(t){for(var r=e?function(n,r){t.update(r,m,(function(t){return t===m?n:e(t,n,r)}))}:function(e,n){t.set(n,e)},i=0;i<n.length;i++)n[i].forEach(r)})):t.constructor(n[0])}function ce(t,e,n,r){var i=t===m,o=e.next();if(o.done){var s=i?n:t,a=r(s);return a===s?t:a}mt(i||t&&t.set,"invalid keyPath");var u=o.value,c=i?m:t.get(u,m),f=ce(c,e,n,r);return f===c?t:f===m?t.remove(u):(i?te():t).set(u,f)}function fe(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function he(t,e,n,r){var i=r?t:I(t);return i[e]=n,i}Wt[Ut]=!0,Wt[v]=Wt.remove,Wt.removeIn=Wt.deleteIn,Nt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(_t(n,i[o][0]))return i[o][1];return r},Nt.prototype.update=function(t,e,n,r,i,o,s){for(var a=i===m,u=this.entries,c=0,f=u.length;c<f&&!_t(r,u[c][0]);c++);var h=c<f;if(h?u[c][1]===i:a)return this;if(E(s),(a||!h)&&E(o),!a||1!==u.length){if(!h&&!a&&u.length>=pe)return function(t,e,n,r){t||(t=new O);for(var i=new Yt(t,zt(n),[n,r]),o=0;o<e.length;o++){var s=e[o];i=i.update(t,0,void 0,s[0],s[1])}return i}(t,u,r,i);var p=t&&t===this.ownerID,l=p?u:I(u);return h?a?c===f-1?l.pop():l[c]=l.pop():l[c]=[r,i]:l.push([r,i]),p?(this.entries=l,this):new Nt(t,l)}},Ht.prototype.get=function(t,e,n,r){void 0===e&&(e=zt(n));var i=1<<((0===t?e:e>>>t)&g),o=this.bitmap;return 0==(o&i)?r:this.nodes[fe(o&i-1)].get(t+_,e,n,r)},Ht.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=zt(r));var a=(0===e?n:n>>>e)&g,u=1<<a,c=this.bitmap,f=0!=(c&u);if(!f&&i===m)return this;var h=fe(c&u-1),p=this.nodes,l=f?p[h]:void 0,d=ne(l,t,e+_,n,r,i,o,s);if(d===l)return this;if(!f&&d&&p.length>=le)return function(t,e,n,r,i){for(var o=0,s=new Array(y),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[o++]:void 0;return s[r]=i,new Jt(t,o+1,s)}(t,p,c,a,d);if(f&&!d&&2===p.length&&re(p[1^h]))return p[1^h];if(f&&d&&1===p.length&&re(d))return d;var v=t&&t===this.ownerID,w=f?d?c:c^u:c|u,b=f?d?he(p,h,d,v):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,s=0;s<r;s++)s===e&&(o=1),i[s]=t[s+o];return i}(p,h,v):function(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),s=0,a=0;a<i;a++)a===e?(o[a]=n,s=-1):o[a]=t[a+s];return o}(p,h,d,v);return v?(this.bitmap=w,this.nodes=b,this):new Ht(t,w,b)},Jt.prototype.get=function(t,e,n,r){void 0===e&&(e=zt(n));var i=(0===t?e:e>>>t)&g,o=this.nodes[i];return o?o.get(t+_,e,n,r):r},Jt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=zt(r));var a=(0===e?n:n>>>e)&g,u=i===m,c=this.nodes,f=c[a];if(u&&!f)return this;var h=ne(f,t,e+_,n,r,i,o,s);if(h===f)return this;var p=this.count;if(f){if(!h&&--p<de)return function(t,e,n,r){for(var i=0,o=0,s=new Array(n),a=0,u=1,c=e.length;a<c;a++,u<<=1){var f=e[a];void 0!==f&&a!==r&&(i|=u,s[o++]=f)}return new Ht(t,i,s)}(t,c,p,a)}else p++;var l=t&&t===this.ownerID,d=he(c,a,h,l);return l?(this.count=p,this.nodes=d,this):new Jt(t,p,d)},$t.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(_t(n,i[o][0]))return i[o][1];return r},$t.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=zt(r));var a=i===m;if(n!==this.keyHash)return a?this:(E(s),E(o),ie(this,t,e,n,[r,i]));for(var u=this.entries,c=0,f=u.length;c<f&&!_t(r,u[c][0]);c++);var h=c<f;if(h?u[c][1]===i:a)return this;if(E(s),(a||!h)&&E(o),a&&2===f)return new Yt(t,this.keyHash,u[1^c]);var p=t&&t===this.ownerID,l=p?u:I(u);return h?a?c===f-1?l.pop():l[c]=l.pop():l[c]=[r,i]:l.push([r,i]),p?(this.entries=l,this):new $t(t,this.keyHash,l)},Yt.prototype.get=function(t,e,n,r){return _t(n,this.entry[0])?this.entry[1]:r},Yt.prototype.update=function(t,e,n,r,i,o,s){var a=i===m,u=_t(r,this.entry[0]);return(u?i===this.entry[1]:a)?this:(E(s),a?void E(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new Yt(t,this.keyHash,[r,i]):(E(o),ie(this,t,e,zt(r),[r,i])))},Nt.prototype.iterate=$t.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===t(n[e?i-r:r]))return!1},Ht.prototype.iterate=Jt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[e?i-r:r];if(o&&!1===o.iterate(t,e))return!1}},Yt.prototype.iterate=function(t,e){return t(this.entry)},e(Xt,K),Xt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return Gt(t,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return Gt(t,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Gt(t,o.entry);e=this._stack=Qt(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var pe=y/4,le=y/2,de=y/4;function ve(t){var e=Ie();if(null==t)return e;if(_e(t))return t;var n=i(t),r=n.size;return 0===r?e:(Kt(r),r>0&&r<y?Oe(0,r,_,null,new me(n.toArray())):e.withMutations((function(t){t.setSize(r),n.forEach((function(e,n){return t.set(n,e)}))})))}function _e(t){return!(!t||!t[ye])}e(ve,Et),ve.of=function(){return this(arguments)},ve.prototype.toString=function(){return this.__toString("List [","]")},ve.prototype.get=function(t,e){if((t=z(this,t))>=0&&t<this.size){var n=De(this,t+=this._origin);return n&&n.array[t&g]}return e},ve.prototype.set=function(t,e){return function(t,e,n){if((e=z(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?Me(t,e).set(0,n):Me(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o=S(b);return e>=Ce(t._capacity)?r=xe(r,t.__ownerID,0,e,n,o):i=xe(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Oe(t._origin,t._capacity,t._level,i,r):t}(this,t,e)},ve.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},ve.prototype.insert=function(t,e){return this.splice(t,0,e)},ve.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=_,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ie()},ve.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){Me(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])}))},ve.prototype.pop=function(){return Me(this,0,-1)},ve.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){Me(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])}))},ve.prototype.shift=function(){return Me(this,1)},ve.prototype.merge=function(){return ke(this,void 0,arguments)},ve.prototype.mergeWith=function(e){return ke(this,e,t.call(arguments,1))},ve.prototype.mergeDeep=function(){return ke(this,se,arguments)},ve.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return ke(this,ae(e),n)},ve.prototype.setSize=function(t){return Me(this,0,t)},ve.prototype.slice=function(t,e){var n=this.size;return M(t,e,n)?this:Me(this,k(t,n),C(e,n))},ve.prototype.__iterator=function(t,e){var n=0,r=Ee(this,e);return new K((function(){var e=r();return e===Se?{value:void 0,done:!0}:T(t,n++,e)}))},ve.prototype.__iterate=function(t,e){for(var n,r=0,i=Ee(this,e);(n=i())!==Se&&!1!==t(n,r++,this););return r},ve.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Oe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},ve.isList=_e;var ye="@@__IMMUTABLE_LIST__@@",ge=ve.prototype;function me(t,e){this.array=t,this.ownerID=e}ge[ye]=!0,ge[v]=ge.remove,ge.setIn=Wt.setIn,ge.deleteIn=ge.removeIn=Wt.removeIn,ge.update=Wt.update,ge.updateIn=Wt.updateIn,ge.mergeIn=Wt.mergeIn,ge.mergeDeepIn=Wt.mergeDeepIn,ge.withMutations=Wt.withMutations,ge.asMutable=Wt.asMutable,ge.asImmutable=Wt.asImmutable,ge.wasAltered=Wt.wasAltered,me.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&g;if(r>=this.array.length)return new me([],t);var i,o=0===r;if(e>0){var s=this.array[r];if((i=s&&s.removeBefore(t,e-_,n))===s&&o)return this}if(o&&!i)return this;var a=ze(this,t);if(!o)for(var u=0;u<r;u++)a.array[u]=void 0;return i&&(a.array[r]=i),a},me.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r,i=n-1>>>e&g;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-_,n))===o&&i===this.array.length-1)return this}var s=ze(this,t);return s.array.splice(i+1),r&&(s.array[i]=r),s};var we,be,Se={};function Ee(t,e){var n=t._origin,r=t._capacity,i=Ce(r),o=t._tail;return s(t._root,t._level,0);function s(t,a,u){return 0===a?function(t,s){var a=s===i?o&&o.array:t&&t.array,u=s>n?0:n-s,c=r-s;return c>y&&(c=y),function(){if(u===c)return Se;var t=e?--c:u++;return a&&a[t]}}(t,u):function(t,i,o){var a,u=t&&t.array,c=o>n?0:n-o>>i,f=1+(r-o>>i);return f>y&&(f=y),function(){for(;;){if(a){var t=a();if(t!==Se)return t;a=null}if(c===f)return Se;var n=e?--f:c++;a=s(u&&u[n],i-_,o+(n<<i))}}}(t,a,u)}}function Oe(t,e,n,r,i,o,s){var a=Object.create(ge);return a.size=e-t,a._origin=t,a._capacity=e,a._level=n,a._root=r,a._tail=i,a.__ownerID=o,a.__hash=s,a.__altered=!1,a}function Ie(){return we||(we=Oe(0,0,_))}function xe(t,e,n,r,i,o){var s,a=r>>>n&g,u=t&&a<t.array.length;if(!u&&void 0===i)return t;if(n>0){var c=t&&t.array[a],f=xe(c,e,n-_,r,i,o);return f===c?t:((s=ze(t,e)).array[a]=f,s)}return u&&t.array[a]===i?t:(E(o),s=ze(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function ze(t,e){return e&&t&&e===t.ownerID?t:new me(t?t.array.slice():[],e)}function De(t,e){if(e>=Ce(t._capacity))return t._tail;if(e<1<<t._level+_){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&g],r-=_;return n}}function Me(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new O,i=t._origin,o=t._capacity,s=i+e,a=void 0===n?o:n<0?o+n:i+n;if(s===i&&a===o)return t;if(s>=a)return t.clear();for(var u=t._level,c=t._root,f=0;s+f<0;)c=new me(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=_);f&&(s+=f,i+=f,a+=f,o+=f);for(var h=Ce(o),p=Ce(a);p>=1<<u+_;)c=new me(c&&c.array.length?[c]:[],r),u+=_;var l=t._tail,d=p<h?De(t,a-1):p>h?new me([],r):l;if(l&&p>h&&s<o&&l.array.length){for(var v=c=ze(c,r),y=u;y>_;y-=_){var m=h>>>y&g;v=v.array[m]=ze(v.array[m],r)}v.array[h>>>_&g]=l}if(a<o&&(d=d&&d.removeAfter(r,0,a)),s>=p)s-=p,a-=p,u=_,c=null,d=d&&d.removeBefore(r,0,s);else if(s>i||p<h){for(f=0;c;){var w=s>>>u&g;if(w!==p>>>u&g)break;w&&(f+=(1<<u)*w),u-=_,c=c.array[w]}c&&s>i&&(c=c.removeBefore(r,u,s-f)),c&&p<h&&(c=c.removeAfter(r,u,p-f)),f&&(s-=f,a-=f)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=u,t._root=c,t._tail=d,t.__hash=void 0,t.__altered=!0,t):Oe(s,a,u,c,d)}function ke(t,e,n){for(var r=[],o=0,a=0;a<n.length;a++){var u=n[a],c=i(u);c.size>o&&(o=c.size),s(u)||(c=c.map((function(t){return pt(t)}))),r.push(c)}return o>t.size&&(t=t.setSize(o)),ue(t,e,r)}function Ce(t){return t<y?0:t-1>>>_<<_}function Re(t){return null==t?Be():Ae(t)?t:Be().withMutations((function(e){var n=r(t);Kt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Ae(t){return Lt(t)&&f(t)}function qe(t,e,n,r){var i=Object.create(Re.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function Be(){return be||(be=qe(te(),Ie()))}function je(t,e,n){var r,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(n===m){if(!u)return t;s.size>=y&&s.size>=2*o.size?(r=(i=s.filter((function(t,e){return void 0!==t&&a!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===s.size-1?s.pop():s.set(a,void 0))}else if(u){if(n===s.get(a)[1])return t;r=o,i=s.set(a,[e,n])}else r=o.set(e,s.size),i=s.set(s.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):qe(r,i)}function Pe(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function Fe(t){this._iter=t,this.size=t.size}function Ke(t){this._iter=t,this.size=t.size}function Te(t){this._iter=t,this.size=t.size}function Le(t){var e=nn(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=rn,e.__iterateUncached=function(e,n){var r=this;return t.__iterate((function(t,n){return!1!==e(n,t,r)}),n)},e.__iteratorUncached=function(e,n){if(e===B){var r=t.__iterator(e,n);return new K((function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(e===q?A:q,n)},e}function Ve(t,e,n){var r=nn(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,m);return o===m?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate((function(t,i,s){return!1!==r(e.call(n,t,i,s),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(B,i);return new K((function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return T(r,a,e.call(n,s[1],a,t),i)}))},r}function Ue(t,e){var n=nn(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Le(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=rn,n.__iterate=function(e,n){var r=this;return t.__iterate((function(t,n){return e(t,n,r)}),!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function We(t,e,n,r){var i=nn(t);return r&&(i.has=function(r){var i=t.get(r,m);return i!==m&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,m);return o!==m&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return t.__iterate((function(t,o,u){if(e.call(n,t,o,u))return a++,i(t,r?o:a-1,s)}),o),a},i.__iteratorUncached=function(i,o){var s=t.__iterator(B,o),a=0;return new K((function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,c=u[0],f=u[1];if(e.call(n,f,c,t))return T(i,r?c:a++,f,o)}}))},i}function Ne(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),M(e,n,i))return t;var o=k(e,i),s=C(n,i);if(o!=o||s!=s)return Ne(t.toSeq().cacheResult(),e,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var c=nn(t);return c.size=0===a?a:t.size&&a||void 0,!r&&ot(t)&&a>=0&&(c.get=function(e,n){return(e=z(this,e))>=0&&e<a?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(e,n);var s=0,u=!0,c=0;return t.__iterate((function(t,n){if(!u||!(u=s++<o))return c++,!1!==e(t,r?n:c-1,i)&&c!==a})),c},c.__iteratorUncached=function(e,n){if(0!==a&&n)return this.cacheResult().__iterator(e,n);var i=0!==a&&t.__iterator(e,n),s=0,u=0;return new K((function(){for(;s++<o;)i.next();if(++u>a)return{value:void 0,done:!0};var t=i.next();return r||e===q?t:T(e,u-1,e===A?void 0:t.value[1],t)}))},c}function He(t,e,n,r){var i=nn(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return t.__iterate((function(t,o,c){if(!a||!(a=e.call(n,t,o,c)))return u++,i(t,r?o:u-1,s)})),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(B,o),u=!0,c=0;return new K((function(){var t,o,f;do{if((t=a.next()).done)return r||i===q?t:T(i,c++,i===A?void 0:t.value[1],t);var h=t.value;o=h[0],f=h[1],u&&(u=e.call(n,f,o,s))}while(u);return i===B?t:T(i,o,f,t)}))},i}function Je(t,e,n){var r=nn(t);return r.__iterateUncached=function(r,i){var o=0,a=!1;return function t(u,c){var f=this;u.__iterate((function(i,u){return(!e||c<e)&&s(i)?t(i,c+1):!1===r(i,n?u:o++,f)&&(a=!0),!a}),i)}(t,0),o},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),a=[],u=0;return new K((function(){for(;o;){var t=o.next();if(!1===t.done){var c=t.value;if(r===B&&(c=c[1]),e&&!(a.length<e)||!s(c))return n?t:T(r,u++,c,t);a.push(o),o=c.__iterator(r,i)}else o=a.pop()}return{value:void 0,done:!0}}))},r}function $e(t,e,n){e||(e=on);var r=a(t),i=0,o=t.toSeq().map((function(e,r){return[r,e,i++,n?n(e,r,t):e]})).toArray();return o.sort((function(t,n){return e(t[3],n[3])||t[2]-n[2]})).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?$(o):u(t)?Y(o):X(o)}function Ye(t,e,n){if(e||(e=on),n){var r=t.toSeq().map((function(e,r){return[e,n(e,r,t)]})).reduce((function(t,n){return Xe(e,t[1],n[1])?n:t}));return r&&r[0]}return t.reduce((function(t,n){return Xe(e,t,n)?n:t}))}function Xe(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(null==n||n!=n)||r>0}function Ge(t,e,r){var i=nn(t);return i.size=new et(r).map((function(t){return t.size})).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(q,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=n(t),W(i?t.reverse():t)})),s=0,a=!1;return new K((function(){var n;return a||(n=o.map((function(t){return t.next()})),a=n.some((function(t){return t.done}))),a?{value:void 0,done:!0}:T(t,s++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Qe(t,e){return ot(t)?e:t.constructor(e)}function Ze(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function tn(t){return Kt(t.size),x(t)}function en(t){return a(t)?r:u(t)?i:o}function nn(t){return Object.create((a(t)?$:u(t)?Y:X).prototype)}function rn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function on(t,e){return t>e?1:t<e?-1:0}function sn(t){var e=W(t);if(!e){if(!H(t))throw new TypeError("Expected iterable or array-like: "+t);e=W(n(t))}return e}function an(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t);(function(t,e){try{e.forEach(hn.bind(void 0,t))}catch(t){}})(i,s),i.size=s.length,i._name=e,i._keys=s,i._defaultValues=t}this._map=Tt(o)},i=r.prototype=Object.create(un);return i.constructor=r,r}e(Re,Tt),Re.of=function(){return this(arguments)},Re.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Re.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Re.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Be()},Re.prototype.set=function(t,e){return je(this,t,e)},Re.prototype.remove=function(t){return je(this,t,m)},Re.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Re.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},Re.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Re.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?qe(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Re.isOrderedMap=Ae,Re.prototype[d]=!0,Re.prototype[v]=Re.prototype.remove,e(Pe,$),Pe.prototype.get=function(t,e){return this._iter.get(t,e)},Pe.prototype.has=function(t){return this._iter.has(t)},Pe.prototype.valueSeq=function(){return this._iter.valueSeq()},Pe.prototype.reverse=function(){var t=this,e=Ue(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},Pe.prototype.map=function(t,e){var n=this,r=Ve(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},Pe.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?tn(this):0,function(i){return t(i,e?--n:n++,r)}),e)},Pe.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(q,e),r=e?tn(this):0;return new K((function(){var i=n.next();return i.done?i:T(t,e?--r:r++,i.value,i)}))},Pe.prototype[d]=!0,e(Fe,Y),Fe.prototype.includes=function(t){return this._iter.includes(t)},Fe.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate((function(e){return t(e,r++,n)}),e)},Fe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(q,e),r=0;return new K((function(){var e=n.next();return e.done?e:T(t,r++,e.value,e)}))},e(Ke,X),Ke.prototype.has=function(t){return this._iter.includes(t)},Ke.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){return t(e,e,n)}),e)},Ke.prototype.__iterator=function(t,e){var n=this._iter.__iterator(q,e);return new K((function(){var e=n.next();return e.done?e:T(t,e.value,e.value,e)}))},e(Te,$),Te.prototype.entrySeq=function(){return this._iter.toSeq()},Te.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){if(e){Ze(e);var r=s(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}}),e)},Te.prototype.__iterator=function(t,e){var n=this._iter.__iterator(q,e);return new K((function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Ze(r);var i=s(r);return T(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}}))},Fe.prototype.cacheResult=Pe.prototype.cacheResult=Ke.prototype.cacheResult=Te.prototype.cacheResult=rn,e(an,St),an.prototype.toString=function(){return this.__toString(fn(this)+" {","}")},an.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},an.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},an.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=cn(this,te()))},an.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+fn(this));if(this._map&&!this._map.has(t)&&e===this._defaultValues[t])return this;var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:cn(this,n)},an.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:cn(this,e)},an.prototype.wasAltered=function(){return this._map.wasAltered()},an.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map((function(t,e){return n.get(e)})).__iterator(t,e)},an.prototype.__iterate=function(t,e){var n=this;return r(this._defaultValues).map((function(t,e){return n.get(e)})).__iterate(t,e)},an.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?cn(this,e,t):(this.__ownerID=t,this._map=e,this)};var un=an.prototype;function cn(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function fn(t){return t._name||t.constructor.name||"Record"}function hn(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){mt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function pn(t){return null==t?wn():ln(t)&&!f(t)?t:wn().withMutations((function(e){var n=o(t);Kt(n.size),n.forEach((function(t){return e.add(t)}))}))}function ln(t){return!(!t||!t[vn])}un[v]=un.remove,un.deleteIn=un.removeIn=Wt.removeIn,un.merge=Wt.merge,un.mergeWith=Wt.mergeWith,un.mergeIn=Wt.mergeIn,un.mergeDeep=Wt.mergeDeep,un.mergeDeepWith=Wt.mergeDeepWith,un.mergeDeepIn=Wt.mergeDeepIn,un.setIn=Wt.setIn,un.update=Wt.update,un.updateIn=Wt.updateIn,un.withMutations=Wt.withMutations,un.asMutable=Wt.asMutable,un.asImmutable=Wt.asImmutable,e(pn,Ot),pn.of=function(){return this(arguments)},pn.fromKeys=function(t){return this(r(t).keySeq())},pn.prototype.toString=function(){return this.__toString("Set {","}")},pn.prototype.has=function(t){return this._map.has(t)},pn.prototype.add=function(t){return gn(this,this._map.set(t,!0))},pn.prototype.remove=function(t){return gn(this,this._map.remove(t))},pn.prototype.clear=function(){return gn(this,this._map.clear())},pn.prototype.union=function(){var e=t.call(arguments,0);return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(t){for(var n=0;n<e.length;n++)o(e[n]).forEach((function(e){return t.add(e)}))})):this.constructor(e[0])},pn.prototype.intersect=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var n=this;return this.withMutations((function(t){n.forEach((function(n){e.every((function(t){return t.includes(n)}))||t.remove(n)}))}))},pn.prototype.subtract=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var n=this;return this.withMutations((function(t){n.forEach((function(n){e.some((function(t){return t.includes(n)}))&&t.remove(n)}))}))},pn.prototype.merge=function(){return this.union.apply(this,arguments)},pn.prototype.mergeWith=function(e){var n=t.call(arguments,1);return this.union.apply(this,n)},pn.prototype.sort=function(t){return bn($e(this,t))},pn.prototype.sortBy=function(t,e){return bn($e(this,e,t))},pn.prototype.wasAltered=function(){return this._map.wasAltered()},pn.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate((function(e,r){return t(r,r,n)}),e)},pn.prototype.__iterator=function(t,e){return this._map.map((function(t,e){return e})).__iterator(t,e)},pn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},pn.isSet=ln;var dn,vn="@@__IMMUTABLE_SET__@@",yn=pn.prototype;function gn(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function mn(t,e){var n=Object.create(yn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function wn(){return dn||(dn=mn(te()))}function bn(t){return null==t?xn():Sn(t)?t:xn().withMutations((function(e){var n=o(t);Kt(n.size),n.forEach((function(t){return e.add(t)}))}))}function Sn(t){return ln(t)&&f(t)}yn[vn]=!0,yn[v]=yn.remove,yn.mergeDeep=yn.merge,yn.mergeDeepWith=yn.mergeWith,yn.withMutations=Wt.withMutations,yn.asMutable=Wt.asMutable,yn.asImmutable=Wt.asImmutable,yn.__empty=wn,yn.__make=mn,e(bn,pn),bn.of=function(){return this(arguments)},bn.fromKeys=function(t){return this(r(t).keySeq())},bn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},bn.isOrderedSet=Sn;var En,On=bn.prototype;function In(t,e){var n=Object.create(On);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function xn(){return En||(En=In(Be()))}function zn(t){return null==t?An():Dn(t)?t:An().unshiftAll(t)}function Dn(t){return!(!t||!t[kn])}On[d]=!0,On.__empty=xn,On.__make=In,e(zn,Et),zn.of=function(){return this(arguments)},zn.prototype.toString=function(){return this.__toString("Stack [","]")},zn.prototype.get=function(t,e){var n=this._head;for(t=z(this,t);n&&t--;)n=n.next;return n?n.value:e},zn.prototype.peek=function(){return this._head&&this._head.value},zn.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Rn(t,e)},zn.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;Kt(t.size);var e=this.size,n=this._head;return t.reverse().forEach((function(t){e++,n={value:t,next:n}})),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Rn(e,n)},zn.prototype.pop=function(){return this.slice(1)},zn.prototype.unshift=function(){return this.push.apply(this,arguments)},zn.prototype.unshiftAll=function(t){return this.pushAll(t)},zn.prototype.shift=function(){return this.pop.apply(this,arguments)},zn.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):An()},zn.prototype.slice=function(t,e){if(M(t,e,this.size))return this;var n=k(t,this.size);if(C(e,this.size)!==this.size)return Et.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Rn(r,i)},zn.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Rn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},zn.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},zn.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new K((function(){if(r){var e=r.value;return r=r.next,T(t,n++,e)}return{value:void 0,done:!0}}))},zn.isStack=Dn;var Mn,kn="@@__IMMUTABLE_STACK__@@",Cn=zn.prototype;function Rn(t,e,n,r){var i=Object.create(Cn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function An(){return Mn||(Mn=Rn(0))}function qn(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}Cn[kn]=!0,Cn.withMutations=Wt.withMutations,Cn.asMutable=Wt.asMutable,Cn.asImmutable=Wt.asImmutable,Cn.wasAltered=Wt.wasAltered,n.Iterator=K,qn(n,{toArray:function(){Kt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,n){t[n]=e})),t},toIndexedSeq:function(){return new Fe(this)},toJS:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJS?t.toJS():t})).__toJS()},toJSON:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t})).__toJS()},toKeyedSeq:function(){return new Pe(this,!0)},toMap:function(){return Tt(this.toKeyedSeq())},toObject:function(){Kt(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t},toOrderedMap:function(){return Re(this.toKeyedSeq())},toOrderedSet:function(){return bn(a(this)?this.valueSeq():this)},toSet:function(){return pn(a(this)?this.valueSeq():this)},toSetSeq:function(){return new Ke(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return zn(a(this)?this.valueSeq():this)},toList:function(){return ve(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return Qe(this,function(t,e){var n=a(t),i=[t].concat(e).map((function(t){return s(t)?n&&(t=r(t)):t=n?at(t):ut(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===i.length)return t;if(1===i.length){var o=i[0];if(o===t||n&&a(o)||u(t)&&u(o))return o}var c=new et(i);return n?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),c}(this,t.call(arguments,0)))},includes:function(t){return this.some((function(e){return _t(e,t)}))},entries:function(){return this.__iterator(B)},every:function(t,e){Kt(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1})),n},filter:function(t,e){return Qe(this,We(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return Kt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Kt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate((function(r){n?n=!1:e+=t,e+=null!=r?r.toString():""})),e},keys:function(){return this.__iterator(A)},map:function(t,e){return Qe(this,Ve(this,t,e))},reduce:function(t,e,n){var r,i;return Kt(this.size),arguments.length<2?i=!0:r=e,this.__iterate((function(e,o,s){i?(i=!1,r=e):r=t.call(n,r,e,o,s)})),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Qe(this,Ue(this,!0))},slice:function(t,e){return Qe(this,Ne(this,t,e,!0))},some:function(t,e){return!this.every(Kn(t),e)},sort:function(t){return Qe(this,$e(this,t))},values:function(){return this.__iterator(q)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return x(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=Tt().asMutable();return t.__iterate((function(i,o){r.update(e.call(n,i,o,t),0,(function(t){return t+1}))})),r.asImmutable()}(this,t,e)},equals:function(t){return yt(this,t)},entrySeq:function(){var t=this;if(t._cache)return new et(t._cache);var e=t.toSeq().map(Fn).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Kn(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate((function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1})),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(D)},flatMap:function(t,e){return Qe(this,function(t,e,n){var r=en(t);return t.toSeq().map((function(i,o){return r(e.call(n,i,o,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Qe(this,Je(this,t,!0))},fromEntrySeq:function(){return new Te(this)},get:function(t,e){return this.find((function(e,n){return _t(n,t)}),void 0,e)},getIn:function(t,e){for(var n,r=this,i=sn(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,m):m)===m)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=a(t),i=(f(t)?Re():Tt()).asMutable();t.__iterate((function(o,s){i.update(e.call(n,o,s,t),(function(t){return(t=t||[]).push(r?[s,o]:o),t}))}));var o=en(t);return i.map((function(e){return Qe(t,o(e))}))}(this,t,e)},has:function(t){return this.get(t,m)!==m},hasIn:function(t){return this.getIn(t,m)!==m},isSubset:function(t){return t="function"==typeof t.includes?t:n(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:n(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return _t(e,t)}))},keySeq:function(){return this.toSeq().map(Pn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Ye(this,t)},maxBy:function(t,e){return Ye(this,e,t)},min:function(t){return Ye(this,t?Tn(t):Un)},minBy:function(t,e){return Ye(this,e?Tn(e):Un,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Qe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Qe(this,He(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Kn(t),e)},sortBy:function(t,e){return Qe(this,$e(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Qe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Qe(this,function(t,e,n){var r=nn(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var s=0;return t.__iterate((function(t,i,a){return e.call(n,t,i,a)&&++s&&r(t,i,o)})),s},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var s=t.__iterator(B,i),a=!0;return new K((function(){if(!a)return{value:void 0,done:!0};var t=s.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?r===B?t:T(r,u,c,t):(a=!1,{value:void 0,done:!0})}))},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Kn(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=f(t),n=a(t),r=e?1:0;return function(t,e){return e=It(e,3432918353),e=It(e<<15|e>>>-15,461845907),e=It(e<<13|e>>>-13,5),e=It((e=(e+3864292196|0)^t)^e>>>16,2246822507),xt((e=It(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+Wn(zt(t),zt(e))|0}:function(t,e){r=r+Wn(zt(t),zt(e))|0}:e?function(t){r=31*r+zt(t)|0}:function(t){r=r+zt(t)|0}),r)}(this))}});var Bn=n.prototype;Bn[h]=!0,Bn[F]=Bn.values,Bn.__toJS=Bn.toArray,Bn.__toStringMapper=Ln,Bn.inspect=Bn.toSource=function(){return this.toString()},Bn.chain=Bn.flatMap,Bn.contains=Bn.includes,qn(r,{flip:function(){return Qe(this,Le(this))},mapEntries:function(t,e){var n=this,r=0;return Qe(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Qe(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var jn=r.prototype;function Pn(t,e){return e}function Fn(t,e){return[e,t]}function Kn(t){return function(){return!t.apply(this,arguments)}}function Tn(t){return function(){return-t.apply(this,arguments)}}function Ln(t){return"string"==typeof t?JSON.stringify(t):String(t)}function Vn(){return I(arguments)}function Un(t,e){return t<e?1:t>e?-1:0}function Wn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return jn[p]=!0,jn[F]=Bn.entries,jn.__toJS=Bn.toObject,jn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Ln(t)},qn(i,{toKeyedSeq:function(){return new Pe(this,!1)},filter:function(t,e){return Qe(this,We(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Qe(this,Ue(this,!1))},slice:function(t,e){return Qe(this,Ne(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=k(t,t<0?this.count():this.size);var r=this.slice(0,t);return Qe(this,1===n?r:r.concat(I(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return Qe(this,Je(this,t,!1))},get:function(t,e){return(t=z(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=z(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Qe(this,function(t,e){var n=nn(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate((function(t,r){return(!o||!1!==n(e,o++,i))&&!1!==n(t,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(q,r),s=0;return new K((function(){return(!i||s%2)&&(i=o.next()).done?i:s%2?T(n,s++,e):T(n,s++,i.value,i)}))},n}(this,t))},interleave:function(){var t=[this].concat(I(arguments)),e=Ge(this.toSeq(),Y.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),Qe(this,n)},keySeq:function(){return wt(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Qe(this,He(this,t,e,!1))},zip:function(){return Qe(this,Ge(this,Vn,[this].concat(I(arguments))))},zipWith:function(t){var e=I(arguments);return e[0]=this,Qe(this,Ge(this,t,e))}}),i.prototype[l]=!0,i.prototype[d]=!0,qn(o,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Bn.includes,o.prototype.contains=o.prototype.includes,qn($,r.prototype),qn(Y,i.prototype),qn(X,o.prototype),qn(St,r.prototype),qn(Et,i.prototype),qn(Ot,o.prototype),{Iterable:n,Seq:J,Collection:bt,Map:Tt,OrderedMap:Re,List:ve,Stack:zn,Set:pn,OrderedSet:bn,Record:an,Range:wt,Repeat:gt,is:_t,fromJS:pt}}()},3393:function(t){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return s(t)?t:J(t)}function r(t){return a(t)?t:$(t)}function i(t){return u(t)?t:Y(t)}function o(t){return s(t)&&!c(t)?t:X(t)}function s(t){return!(!t||!t[h])}function a(t){return!(!t||!t[p])}function u(t){return!(!t||!t[l])}function c(t){return a(t)||u(t)}function f(t){return!(!t||!t[d])}e(r,n),e(i,n),e(o,n),n.isIterable=s,n.isKeyed=a,n.isIndexed=u,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=i,n.Set=o;var h="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",l="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",v="delete",_=5,y=1<<_,g=y-1,m={},w={value:!1},b={value:!1};function S(t){return t.value=!1,t}function E(t){t&&(t.value=!0)}function O(){}function I(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i<n;i++)r[i]=t[i+e];return r}function x(t){return void 0===t.size&&(t.size=t.__iterate(D)),t.size}function z(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?x(t)+e:e}function D(){return!0}function M(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function k(t,e){return R(t,e,0)}function C(t,e){return R(t,e,e)}function R(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var A=0,q=1,B=2,j="function"==typeof Symbol&&Symbol.iterator,P="@@iterator",F=j||P;function K(t){this.next=t}function T(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function L(){return{value:void 0,done:!0}}function V(t){return!!N(t)}function U(t){return t&&"function"==typeof t.next}function W(t){var e=N(t);return e&&e.call(t)}function N(t){var e=t&&(j&&t[j]||t[P]);if("function"==typeof e)return e}function H(t){return t&&"number"==typeof t.length}function J(t){return null==t?st():s(t)?t.toSeq():function(t){var e=ct(t)||"object"==typeof t&&new nt(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function $(t){return null==t?st().toKeyedSeq():s(t)?a(t)?t.toSeq():t.fromEntrySeq():at(t)}function Y(t){return null==t?st():s(t)?a(t)?t.entrySeq():t.toIndexedSeq():ut(t)}function X(t){return(null==t?st():s(t)?a(t)?t.entrySeq():t:ut(t)).toSetSeq()}K.prototype.toString=function(){return"[Iterator]"},K.KEYS=A,K.VALUES=q,K.ENTRIES=B,K.prototype.inspect=K.prototype.toSource=function(){return this.toString()},K.prototype[F]=function(){return this},e(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(t,e){return ft(this,t,e,!0)},J.prototype.__iterator=function(t,e){return ht(this,t,e,!0)},e($,J),$.prototype.toKeyedSeq=function(){return this},e(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(t,e){return ft(this,t,e,!1)},Y.prototype.__iterator=function(t,e){return ht(this,t,e,!1)},e(X,J),X.of=function(){return X(arguments)},X.prototype.toSetSeq=function(){return this},J.isSeq=ot,J.Keyed=$,J.Set=X,J.Indexed=Y;var G,Q,Z,tt="@@__IMMUTABLE_SEQ__@@";function et(t){this._array=t,this.size=t.length}function nt(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function rt(t){this._iterable=t,this.size=t.length||t.size}function it(t){this._iterator=t,this._iteratorCache=[]}function ot(t){return!(!t||!t[tt])}function st(){return G||(G=new et([]))}function at(t){var e=Array.isArray(t)?new et(t).fromEntrySeq():U(t)?new it(t).fromEntrySeq():V(t)?new rt(t).fromEntrySeq():"object"==typeof t?new nt(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function ut(t){var e=ct(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function ct(t){return H(t)?new et(t):U(t)?new it(t):V(t)?new rt(t):void 0}function ft(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,s=0;s<=o;s++){var a=i[n?o-s:s];if(!1===e(a[1],r?a[0]:s,t))return s+1}return s}return t.__iterateUncached(e,n)}function ht(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,s=0;return new K((function(){var t=i[n?o-s:s];return s++>o?{value:void 0,done:!0}:T(e,r?t[0]:s-1,t[1])}))}return t.__iteratorUncached(e,n)}function pt(t,e){return e?lt(e,t,"",{"":t}):dt(t)}function lt(t,e,n,r){return Array.isArray(e)?t.call(r,n,Y(e).map((function(n,r){return lt(t,n,r,e)}))):vt(e)?t.call(r,n,$(e).map((function(n,r){return lt(t,n,r,e)}))):e}function dt(t){return Array.isArray(t)?Y(t).map(dt).toList():vt(t)?$(t).map(dt).toMap():t}function vt(t){return t&&(t.constructor===Object||void 0===t.constructor)}function _t(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function yt(t,e){if(t===e)return!0;if(!s(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!c(t);if(f(t)){var r=t.entries();return e.every((function(t,e){var i=r.next().value;return i&&_t(i[1],t)&&(n||_t(i[0],e))}))&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var h=!0,p=e.__iterate((function(e,r){if(n?!t.has(e):i?!_t(e,t.get(r,m)):!_t(t.get(r,m),e))return h=!1,!1}));return h&&t.size===p}function gt(t,e){if(!(this instanceof gt))return new gt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(Q)return Q;Q=this}}function mt(t,e){if(!t)throw new Error(e)}function wt(t,e,n){if(!(this instanceof wt))return new wt(t,e,n);if(mt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e<t&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(Z)return Z;Z=this}}function bt(){throw TypeError("Abstract")}function St(){}function Et(){}function Ot(){}J.prototype[tt]=!0,e(et,Y),et.prototype.get=function(t,e){return this.has(t)?this._array[z(this,t)]:e},et.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;i<=r;i++)if(!1===t(n[e?r-i:i],i,this))return i+1;return i},et.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new K((function(){return i>r?{value:void 0,done:!0}:T(t,i,n[e?r-i++:i++])}))},e(nt,$),nt.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},nt.prototype.has=function(t){return this._object.hasOwnProperty(t)},nt.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var s=r[e?i-o:o];if(!1===t(n[s],s,this))return o+1}return o},nt.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new K((function(){var s=r[e?i-o:o];return o++>i?{value:void 0,done:!0}:T(t,s,n[s])}))},nt.prototype[d]=!0,e(rt,Y),rt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=W(this._iterable),r=0;if(U(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},rt.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=W(this._iterable);if(!U(n))return new K(L);var r=0;return new K((function(){var e=n.next();return e.done?e:T(t,r++,e.value)}))},e(it,Y),it.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===t(i[o],o++,this))return o;for(;!(n=r.next()).done;){var s=n.value;if(i[o]=s,!1===t(s,o++,this))break}return o},it.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterator,r=this._iteratorCache,i=0;return new K((function(){if(i>=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return T(t,i,r[i++])}))},e(gt,Y),gt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},gt.prototype.get=function(t,e){return this.has(t)?this._value:e},gt.prototype.includes=function(t){return _t(this._value,t)},gt.prototype.slice=function(t,e){var n=this.size;return M(t,e,n)?this:new gt(this._value,C(e,n)-k(t,n))},gt.prototype.reverse=function(){return this},gt.prototype.indexOf=function(t){return _t(this._value,t)?0:-1},gt.prototype.lastIndexOf=function(t){return _t(this._value,t)?this.size:-1},gt.prototype.__iterate=function(t,e){for(var n=0;n<this.size;n++)if(!1===t(this._value,n,this))return n+1;return n},gt.prototype.__iterator=function(t,e){var n=this,r=0;return new K((function(){return r<n.size?T(t,r++,n._value):{value:void 0,done:!0}}))},gt.prototype.equals=function(t){return t instanceof gt?_t(this._value,t._value):yt(t)},e(wt,Y),wt.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},wt.prototype.get=function(t,e){return this.has(t)?this._start+z(this,t)*this._step:e},wt.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},wt.prototype.slice=function(t,e){return M(t,e,this.size)?this:(t=k(t,this.size),(e=C(e,this.size))<=t?new wt(0,0):new wt(this.get(t,this._end),this.get(e,this._end),this._step))},wt.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var n=e/this._step;if(n>=0&&n<this.size)return n}return-1},wt.prototype.lastIndexOf=function(t){return this.indexOf(t)},wt.prototype.__iterate=function(t,e){for(var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;o<=n;o++){if(!1===t(i,o,this))return o+1;i+=e?-r:r}return o},wt.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new K((function(){var s=i;return i+=e?-r:r,o>n?{value:void 0,done:!0}:T(t,o++,s)}))},wt.prototype.equals=function(t){return t instanceof wt?this._start===t._start&&this._end===t._end&&this._step===t._step:yt(this,t)},e(bt,n),e(St,bt),e(Et,bt),e(Ot,bt),bt.Keyed=St,bt.Indexed=Et,bt.Set=Ot;var It="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function xt(t){return t>>>1&1073741824|3221225471&t}function zt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)n^=t/=4294967295;return xt(n)}if("string"===e)return t.length>Bt?function(t){var e=Ft[t];return void 0===e&&(e=Dt(t),Pt===jt&&(Pt=0,Ft={}),Pt++,Ft[t]=e),e}(t):Dt(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(Rt&&void 0!==(e=Ct.get(t)))return e;if(void 0!==(e=t[qt]))return e;if(!kt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[qt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++At,1073741824&At&&(At=0),Rt)Ct.set(t,e);else{if(void 0!==Mt&&!1===Mt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(kt)Object.defineProperty(t,qt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[qt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[qt]=e}}return e}(t);if("function"==typeof t.toString)return Dt(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Dt(t){for(var e=0,n=0;n<t.length;n++)e=31*e+t.charCodeAt(n)|0;return xt(e)}var Mt=Object.isExtensible,kt=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();var Ct,Rt="function"==typeof WeakMap;Rt&&(Ct=new WeakMap);var At=0,qt="__immutablehash__";"function"==typeof Symbol&&(qt=Symbol(qt));var Bt=16,jt=255,Pt=0,Ft={};function Kt(t){mt(t!==1/0,"Cannot perform this action with an infinite size.")}function Tt(t){return null==t?te():Lt(t)&&!f(t)?t:te().withMutations((function(e){var n=r(t);Kt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Lt(t){return!(!t||!t[Ut])}e(Tt,St),Tt.prototype.toString=function(){return this.__toString("Map {","}")},Tt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Tt.prototype.set=function(t,e){return ee(this,t,e)},Tt.prototype.setIn=function(t,e){return this.updateIn(t,m,(function(){return e}))},Tt.prototype.remove=function(t){return ee(this,t,m)},Tt.prototype.deleteIn=function(t){return this.updateIn(t,(function(){return m}))},Tt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Tt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=ce(this,sn(t),e,n);return r===m?void 0:r},Tt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):te()},Tt.prototype.merge=function(){return oe(this,void 0,arguments)},Tt.prototype.mergeWith=function(e){return oe(this,e,t.call(arguments,1))},Tt.prototype.mergeIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,te(),(function(t){return"function"==typeof t.merge?t.merge.apply(t,n):n[n.length-1]}))},Tt.prototype.mergeDeep=function(){return oe(this,se,arguments)},Tt.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return oe(this,ae(e),n)},Tt.prototype.mergeDeepIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,te(),(function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,n):n[n.length-1]}))},Tt.prototype.sort=function(t){return Re($e(this,t))},Tt.prototype.sortBy=function(t,e){return Re($e(this,e,t))},Tt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Tt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new O)},Tt.prototype.asImmutable=function(){return this.__ensureOwner()},Tt.prototype.wasAltered=function(){return this.__altered},Tt.prototype.__iterator=function(t,e){return new Xt(this,t,e)},Tt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate((function(e){return r++,t(e[1],e[0],n)}),e),r},Tt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Zt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Tt.isMap=Lt;var Vt,Ut="@@__IMMUTABLE_MAP__@@",Wt=Tt.prototype;function Nt(t,e){this.ownerID=t,this.entries=e}function Ht(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Jt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function $t(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Xt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Qt(t._root)}function Gt(t,e){return T(t,e[0],e[1])}function Qt(t,e){return{node:t,index:0,__prev:e}}function Zt(t,e,n,r){var i=Object.create(Wt);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function te(){return Vt||(Vt=Zt(0))}function ee(t,e,n){var r,i;if(t._root){var o=S(w),s=S(b);if(r=ne(t._root,t.__ownerID,0,void 0,e,n,o,s),!s.value)return t;i=t.size+(o.value?n===m?-1:1:0)}else{if(n===m)return t;i=1,r=new Nt(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?Zt(i,r):te()}function ne(t,e,n,r,i,o,s,a){return t?t.update(e,n,r,i,o,s,a):o===m?t:(E(a),E(s),new Yt(e,r,[i,o]))}function re(t){return t.constructor===Yt||t.constructor===$t}function ie(t,e,n,r,i){if(t.keyHash===r)return new $t(e,r,[t.entry,i]);var o,s=(0===n?t.keyHash:t.keyHash>>>n)&g,a=(0===n?r:r>>>n)&g;return new Ht(e,1<<s|1<<a,s===a?[ie(t,e,n+_,r,i)]:(o=new Yt(e,r,i),s<a?[t,o]:[o,t]))}function oe(t,e,n){for(var i=[],o=0;o<n.length;o++){var a=n[o],u=r(a);s(a)||(u=u.map((function(t){return pt(t)}))),i.push(u)}return ue(t,e,i)}function se(t,e,n){return t&&t.mergeDeep&&s(e)?t.mergeDeep(e):_t(t,e)?t:e}function ae(t){return function(e,n,r){if(e&&e.mergeDeepWith&&s(n))return e.mergeDeepWith(t,n);var i=t(e,n,r);return _t(e,i)?e:i}}function ue(t,e,n){return 0===(n=n.filter((function(t){return 0!==t.size}))).length?t:0!==t.size||t.__ownerID||1!==n.length?t.withMutations((function(t){for(var r=e?function(n,r){t.update(r,m,(function(t){return t===m?n:e(t,n,r)}))}:function(e,n){t.set(n,e)},i=0;i<n.length;i++)n[i].forEach(r)})):t.constructor(n[0])}function ce(t,e,n,r){var i=t===m,o=e.next();if(o.done){var s=i?n:t,a=r(s);return a===s?t:a}mt(i||t&&t.set,"invalid keyPath");var u=o.value,c=i?m:t.get(u,m),f=ce(c,e,n,r);return f===c?t:f===m?t.remove(u):(i?te():t).set(u,f)}function fe(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function he(t,e,n,r){var i=r?t:I(t);return i[e]=n,i}Wt[Ut]=!0,Wt[v]=Wt.remove,Wt.removeIn=Wt.deleteIn,Nt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(_t(n,i[o][0]))return i[o][1];return r},Nt.prototype.update=function(t,e,n,r,i,o,s){for(var a=i===m,u=this.entries,c=0,f=u.length;c<f&&!_t(r,u[c][0]);c++);var h=c<f;if(h?u[c][1]===i:a)return this;if(E(s),(a||!h)&&E(o),!a||1!==u.length){if(!h&&!a&&u.length>=pe)return function(t,e,n,r){t||(t=new O);for(var i=new Yt(t,zt(n),[n,r]),o=0;o<e.length;o++){var s=e[o];i=i.update(t,0,void 0,s[0],s[1])}return i}(t,u,r,i);var p=t&&t===this.ownerID,l=p?u:I(u);return h?a?c===f-1?l.pop():l[c]=l.pop():l[c]=[r,i]:l.push([r,i]),p?(this.entries=l,this):new Nt(t,l)}},Ht.prototype.get=function(t,e,n,r){void 0===e&&(e=zt(n));var i=1<<((0===t?e:e>>>t)&g),o=this.bitmap;return 0==(o&i)?r:this.nodes[fe(o&i-1)].get(t+_,e,n,r)},Ht.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=zt(r));var a=(0===e?n:n>>>e)&g,u=1<<a,c=this.bitmap,f=0!=(c&u);if(!f&&i===m)return this;var h=fe(c&u-1),p=this.nodes,l=f?p[h]:void 0,d=ne(l,t,e+_,n,r,i,o,s);if(d===l)return this;if(!f&&d&&p.length>=le)return function(t,e,n,r,i){for(var o=0,s=new Array(y),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[o++]:void 0;return s[r]=i,new Jt(t,o+1,s)}(t,p,c,a,d);if(f&&!d&&2===p.length&&re(p[1^h]))return p[1^h];if(f&&d&&1===p.length&&re(d))return d;var v=t&&t===this.ownerID,w=f?d?c:c^u:c|u,b=f?d?he(p,h,d,v):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,s=0;s<r;s++)s===e&&(o=1),i[s]=t[s+o];return i}(p,h,v):function(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),s=0,a=0;a<i;a++)a===e?(o[a]=n,s=-1):o[a]=t[a+s];return o}(p,h,d,v);return v?(this.bitmap=w,this.nodes=b,this):new Ht(t,w,b)},Jt.prototype.get=function(t,e,n,r){void 0===e&&(e=zt(n));var i=(0===t?e:e>>>t)&g,o=this.nodes[i];return o?o.get(t+_,e,n,r):r},Jt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=zt(r));var a=(0===e?n:n>>>e)&g,u=i===m,c=this.nodes,f=c[a];if(u&&!f)return this;var h=ne(f,t,e+_,n,r,i,o,s);if(h===f)return this;var p=this.count;if(f){if(!h&&--p<de)return function(t,e,n,r){for(var i=0,o=0,s=new Array(n),a=0,u=1,c=e.length;a<c;a++,u<<=1){var f=e[a];void 0!==f&&a!==r&&(i|=u,s[o++]=f)}return new Ht(t,i,s)}(t,c,p,a)}else p++;var l=t&&t===this.ownerID,d=he(c,a,h,l);return l?(this.count=p,this.nodes=d,this):new Jt(t,p,d)},$t.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o<s;o++)if(_t(n,i[o][0]))return i[o][1];return r},$t.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=zt(r));var a=i===m;if(n!==this.keyHash)return a?this:(E(s),E(o),ie(this,t,e,n,[r,i]));for(var u=this.entries,c=0,f=u.length;c<f&&!_t(r,u[c][0]);c++);var h=c<f;if(h?u[c][1]===i:a)return this;if(E(s),(a||!h)&&E(o),a&&2===f)return new Yt(t,this.keyHash,u[1^c]);var p=t&&t===this.ownerID,l=p?u:I(u);return h?a?c===f-1?l.pop():l[c]=l.pop():l[c]=[r,i]:l.push([r,i]),p?(this.entries=l,this):new $t(t,this.keyHash,l)},Yt.prototype.get=function(t,e,n,r){return _t(n,this.entry[0])?this.entry[1]:r},Yt.prototype.update=function(t,e,n,r,i,o,s){var a=i===m,u=_t(r,this.entry[0]);return(u?i===this.entry[1]:a)?this:(E(s),a?void E(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new Yt(t,this.keyHash,[r,i]):(E(o),ie(this,t,e,zt(r),[r,i])))},Nt.prototype.iterate=$t.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;r<=i;r++)if(!1===t(n[e?i-r:r]))return!1},Ht.prototype.iterate=Jt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;r<=i;r++){var o=n[e?i-r:r];if(o&&!1===o.iterate(t,e))return!1}},Yt.prototype.iterate=function(t,e){return t(this.entry)},e(Xt,K),Xt.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return Gt(t,r.entry)}else if(r.entries){if(i<=(n=r.entries.length-1))return Gt(t,r.entries[this._reverse?n-i:i])}else if(i<=(n=r.nodes.length-1)){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Gt(t,o.entry);e=this._stack=Qt(o,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var pe=y/4,le=y/2,de=y/4;function ve(t){var e=Ie();if(null==t)return e;if(_e(t))return t;var n=i(t),r=n.size;return 0===r?e:(Kt(r),r>0&&r<y?Oe(0,r,_,null,new me(n.toArray())):e.withMutations((function(t){t.setSize(r),n.forEach((function(e,n){return t.set(n,e)}))})))}function _e(t){return!(!t||!t[ye])}e(ve,Et),ve.of=function(){return this(arguments)},ve.prototype.toString=function(){return this.__toString("List [","]")},ve.prototype.get=function(t,e){if((t=z(this,t))>=0&&t<this.size){var n=De(this,t+=this._origin);return n&&n.array[t&g]}return e},ve.prototype.set=function(t,e){return function(t,e,n){if((e=z(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?Me(t,e).set(0,n):Me(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o=S(b);return e>=Ce(t._capacity)?r=xe(r,t.__ownerID,0,e,n,o):i=xe(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Oe(t._origin,t._capacity,t._level,i,r):t}(this,t,e)},ve.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},ve.prototype.insert=function(t,e){return this.splice(t,0,e)},ve.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=_,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ie()},ve.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){Me(n,0,e+t.length);for(var r=0;r<t.length;r++)n.set(e+r,t[r])}))},ve.prototype.pop=function(){return Me(this,0,-1)},ve.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){Me(e,-t.length);for(var n=0;n<t.length;n++)e.set(n,t[n])}))},ve.prototype.shift=function(){return Me(this,1)},ve.prototype.merge=function(){return ke(this,void 0,arguments)},ve.prototype.mergeWith=function(e){return ke(this,e,t.call(arguments,1))},ve.prototype.mergeDeep=function(){return ke(this,se,arguments)},ve.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return ke(this,ae(e),n)},ve.prototype.setSize=function(t){return Me(this,0,t)},ve.prototype.slice=function(t,e){var n=this.size;return M(t,e,n)?this:Me(this,k(t,n),C(e,n))},ve.prototype.__iterator=function(t,e){var n=0,r=Ee(this,e);return new K((function(){var e=r();return e===Se?{value:void 0,done:!0}:T(t,n++,e)}))},ve.prototype.__iterate=function(t,e){for(var n,r=0,i=Ee(this,e);(n=i())!==Se&&!1!==t(n,r++,this););return r},ve.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Oe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},ve.isList=_e;var ye="@@__IMMUTABLE_LIST__@@",ge=ve.prototype;function me(t,e){this.array=t,this.ownerID=e}ge[ye]=!0,ge[v]=ge.remove,ge.setIn=Wt.setIn,ge.deleteIn=ge.removeIn=Wt.removeIn,ge.update=Wt.update,ge.updateIn=Wt.updateIn,ge.mergeIn=Wt.mergeIn,ge.mergeDeepIn=Wt.mergeDeepIn,ge.withMutations=Wt.withMutations,ge.asMutable=Wt.asMutable,ge.asImmutable=Wt.asImmutable,ge.wasAltered=Wt.wasAltered,me.prototype.removeBefore=function(t,e,n){if(n===e?1<<e:0===this.array.length)return this;var r=n>>>e&g;if(r>=this.array.length)return new me([],t);var i,o=0===r;if(e>0){var s=this.array[r];if((i=s&&s.removeBefore(t,e-_,n))===s&&o)return this}if(o&&!i)return this;var a=ze(this,t);if(!o)for(var u=0;u<r;u++)a.array[u]=void 0;return i&&(a.array[r]=i),a},me.prototype.removeAfter=function(t,e,n){if(n===(e?1<<e:0)||0===this.array.length)return this;var r,i=n-1>>>e&g;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-_,n))===o&&i===this.array.length-1)return this}var s=ze(this,t);return s.array.splice(i+1),r&&(s.array[i]=r),s};var we,be,Se={};function Ee(t,e){var n=t._origin,r=t._capacity,i=Ce(r),o=t._tail;return s(t._root,t._level,0);function s(t,a,u){return 0===a?function(t,s){var a=s===i?o&&o.array:t&&t.array,u=s>n?0:n-s,c=r-s;return c>y&&(c=y),function(){if(u===c)return Se;var t=e?--c:u++;return a&&a[t]}}(t,u):function(t,i,o){var a,u=t&&t.array,c=o>n?0:n-o>>i,f=1+(r-o>>i);return f>y&&(f=y),function(){for(;;){if(a){var t=a();if(t!==Se)return t;a=null}if(c===f)return Se;var n=e?--f:c++;a=s(u&&u[n],i-_,o+(n<<i))}}}(t,a,u)}}function Oe(t,e,n,r,i,o,s){var a=Object.create(ge);return a.size=e-t,a._origin=t,a._capacity=e,a._level=n,a._root=r,a._tail=i,a.__ownerID=o,a.__hash=s,a.__altered=!1,a}function Ie(){return we||(we=Oe(0,0,_))}function xe(t,e,n,r,i,o){var s,a=r>>>n&g,u=t&&a<t.array.length;if(!u&&void 0===i)return t;if(n>0){var c=t&&t.array[a],f=xe(c,e,n-_,r,i,o);return f===c?t:((s=ze(t,e)).array[a]=f,s)}return u&&t.array[a]===i?t:(E(o),s=ze(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function ze(t,e){return e&&t&&e===t.ownerID?t:new me(t?t.array.slice():[],e)}function De(t,e){if(e>=Ce(t._capacity))return t._tail;if(e<1<<t._level+_){for(var n=t._root,r=t._level;n&&r>0;)n=n.array[e>>>r&g],r-=_;return n}}function Me(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new O,i=t._origin,o=t._capacity,s=i+e,a=void 0===n?o:n<0?o+n:i+n;if(s===i&&a===o)return t;if(s>=a)return t.clear();for(var u=t._level,c=t._root,f=0;s+f<0;)c=new me(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=_);f&&(s+=f,i+=f,a+=f,o+=f);for(var h=Ce(o),p=Ce(a);p>=1<<u+_;)c=new me(c&&c.array.length?[c]:[],r),u+=_;var l=t._tail,d=p<h?De(t,a-1):p>h?new me([],r):l;if(l&&p>h&&s<o&&l.array.length){for(var v=c=ze(c,r),y=u;y>_;y-=_){var m=h>>>y&g;v=v.array[m]=ze(v.array[m],r)}v.array[h>>>_&g]=l}if(a<o&&(d=d&&d.removeAfter(r,0,a)),s>=p)s-=p,a-=p,u=_,c=null,d=d&&d.removeBefore(r,0,s);else if(s>i||p<h){for(f=0;c;){var w=s>>>u&g;if(w!==p>>>u&g)break;w&&(f+=(1<<u)*w),u-=_,c=c.array[w]}c&&s>i&&(c=c.removeBefore(r,u,s-f)),c&&p<h&&(c=c.removeAfter(r,u,p-f)),f&&(s-=f,a-=f)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=u,t._root=c,t._tail=d,t.__hash=void 0,t.__altered=!0,t):Oe(s,a,u,c,d)}function ke(t,e,n){for(var r=[],o=0,a=0;a<n.length;a++){var u=n[a],c=i(u);c.size>o&&(o=c.size),s(u)||(c=c.map((function(t){return pt(t)}))),r.push(c)}return o>t.size&&(t=t.setSize(o)),ue(t,e,r)}function Ce(t){return t<y?0:t-1>>>_<<_}function Re(t){return null==t?Be():Ae(t)?t:Be().withMutations((function(e){var n=r(t);Kt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Ae(t){return Lt(t)&&f(t)}function qe(t,e,n,r){var i=Object.create(Re.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function Be(){return be||(be=qe(te(),Ie()))}function je(t,e,n){var r,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(n===m){if(!u)return t;s.size>=y&&s.size>=2*o.size?(r=(i=s.filter((function(t,e){return void 0!==t&&a!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===s.size-1?s.pop():s.set(a,void 0))}else if(u){if(n===s.get(a)[1])return t;r=o,i=s.set(a,[e,n])}else r=o.set(e,s.size),i=s.set(s.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):qe(r,i)}function Pe(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function Fe(t){this._iter=t,this.size=t.size}function Ke(t){this._iter=t,this.size=t.size}function Te(t){this._iter=t,this.size=t.size}function Le(t){var e=nn(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=rn,e.__iterateUncached=function(e,n){var r=this;return t.__iterate((function(t,n){return!1!==e(n,t,r)}),n)},e.__iteratorUncached=function(e,n){if(e===B){var r=t.__iterator(e,n);return new K((function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(e===q?A:q,n)},e}function Ve(t,e,n){var r=nn(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,m);return o===m?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate((function(t,i,s){return!1!==r(e.call(n,t,i,s),i,o)}),i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(B,i);return new K((function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return T(r,a,e.call(n,s[1],a,t),i)}))},r}function Ue(t,e){var n=nn(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Le(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=rn,n.__iterate=function(e,n){var r=this;return t.__iterate((function(t,n){return e(t,n,r)}),!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function We(t,e,n,r){var i=nn(t);return r&&(i.has=function(r){var i=t.get(r,m);return i!==m&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,m);return o!==m&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return t.__iterate((function(t,o,u){if(e.call(n,t,o,u))return a++,i(t,r?o:a-1,s)}),o),a},i.__iteratorUncached=function(i,o){var s=t.__iterator(B,o),a=0;return new K((function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,c=u[0],f=u[1];if(e.call(n,f,c,t))return T(i,r?c:a++,f,o)}}))},i}function Ne(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n|=0),M(e,n,i))return t;var o=k(e,i),s=C(n,i);if(o!=o||s!=s)return Ne(t.toSeq().cacheResult(),e,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var c=nn(t);return c.size=0===a?a:t.size&&a||void 0,!r&&ot(t)&&a>=0&&(c.get=function(e,n){return(e=z(this,e))>=0&&e<a?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===a)return 0;if(n)return this.cacheResult().__iterate(e,n);var s=0,u=!0,c=0;return t.__iterate((function(t,n){if(!u||!(u=s++<o))return c++,!1!==e(t,r?n:c-1,i)&&c!==a})),c},c.__iteratorUncached=function(e,n){if(0!==a&&n)return this.cacheResult().__iterator(e,n);var i=0!==a&&t.__iterator(e,n),s=0,u=0;return new K((function(){for(;s++<o;)i.next();if(++u>a)return{value:void 0,done:!0};var t=i.next();return r||e===q?t:T(e,u-1,e===A?void 0:t.value[1],t)}))},c}function He(t,e,n,r){var i=nn(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return t.__iterate((function(t,o,c){if(!a||!(a=e.call(n,t,o,c)))return u++,i(t,r?o:u-1,s)})),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(B,o),u=!0,c=0;return new K((function(){var t,o,f;do{if((t=a.next()).done)return r||i===q?t:T(i,c++,i===A?void 0:t.value[1],t);var h=t.value;o=h[0],f=h[1],u&&(u=e.call(n,f,o,s))}while(u);return i===B?t:T(i,o,f,t)}))},i}function Je(t,e,n){var r=nn(t);return r.__iterateUncached=function(r,i){var o=0,a=!1;return function t(u,c){var f=this;u.__iterate((function(i,u){return(!e||c<e)&&s(i)?t(i,c+1):!1===r(i,n?u:o++,f)&&(a=!0),!a}),i)}(t,0),o},r.__iteratorUncached=function(r,i){var o=t.__iterator(r,i),a=[],u=0;return new K((function(){for(;o;){var t=o.next();if(!1===t.done){var c=t.value;if(r===B&&(c=c[1]),e&&!(a.length<e)||!s(c))return n?t:T(r,u++,c,t);a.push(o),o=c.__iterator(r,i)}else o=a.pop()}return{value:void 0,done:!0}}))},r}function $e(t,e,n){e||(e=on);var r=a(t),i=0,o=t.toSeq().map((function(e,r){return[r,e,i++,n?n(e,r,t):e]})).toArray();return o.sort((function(t,n){return e(t[3],n[3])||t[2]-n[2]})).forEach(r?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),r?$(o):u(t)?Y(o):X(o)}function Ye(t,e,n){if(e||(e=on),n){var r=t.toSeq().map((function(e,r){return[e,n(e,r,t)]})).reduce((function(t,n){return Xe(e,t[1],n[1])?n:t}));return r&&r[0]}return t.reduce((function(t,n){return Xe(e,t,n)?n:t}))}function Xe(t,e,n){var r=t(n,e);return 0===r&&n!==e&&(null==n||n!=n)||r>0}function Ge(t,e,r){var i=nn(t);return i.size=new et(r).map((function(t){return t.size})).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(q,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=n(t),W(i?t.reverse():t)})),s=0,a=!1;return new K((function(){var n;return a||(n=o.map((function(t){return t.next()})),a=n.some((function(t){return t.done}))),a?{value:void 0,done:!0}:T(t,s++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Qe(t,e){return ot(t)?e:t.constructor(e)}function Ze(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function tn(t){return Kt(t.size),x(t)}function en(t){return a(t)?r:u(t)?i:o}function nn(t){return Object.create((a(t)?$:u(t)?Y:X).prototype)}function rn(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function on(t,e){return t>e?1:t<e?-1:0}function sn(t){var e=W(t);if(!e){if(!H(t))throw new TypeError("Expected iterable or array-like: "+t);e=W(n(t))}return e}function an(t,e){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var s=Object.keys(t);(function(t,e){try{e.forEach(hn.bind(void 0,t))}catch(t){}})(i,s),i.size=s.length,i._name=e,i._keys=s,i._defaultValues=t}this._map=Tt(o)},i=r.prototype=Object.create(un);return i.constructor=r,r}e(Re,Tt),Re.of=function(){return this(arguments)},Re.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Re.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Re.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Be()},Re.prototype.set=function(t,e){return je(this,t,e)},Re.prototype.remove=function(t){return je(this,t,m)},Re.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Re.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],n)}),e)},Re.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Re.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?qe(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Re.isOrderedMap=Ae,Re.prototype[d]=!0,Re.prototype[v]=Re.prototype.remove,e(Pe,$),Pe.prototype.get=function(t,e){return this._iter.get(t,e)},Pe.prototype.has=function(t){return this._iter.has(t)},Pe.prototype.valueSeq=function(){return this._iter.valueSeq()},Pe.prototype.reverse=function(){var t=this,e=Ue(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},Pe.prototype.map=function(t,e){var n=this,r=Ve(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},Pe.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?tn(this):0,function(i){return t(i,e?--n:n++,r)}),e)},Pe.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(q,e),r=e?tn(this):0;return new K((function(){var i=n.next();return i.done?i:T(t,e?--r:r++,i.value,i)}))},Pe.prototype[d]=!0,e(Fe,Y),Fe.prototype.includes=function(t){return this._iter.includes(t)},Fe.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate((function(e){return t(e,r++,n)}),e)},Fe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(q,e),r=0;return new K((function(){var e=n.next();return e.done?e:T(t,r++,e.value,e)}))},e(Ke,X),Ke.prototype.has=function(t){return this._iter.includes(t)},Ke.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){return t(e,e,n)}),e)},Ke.prototype.__iterator=function(t,e){var n=this._iter.__iterator(q,e);return new K((function(){var e=n.next();return e.done?e:T(t,e.value,e.value,e)}))},e(Te,$),Te.prototype.entrySeq=function(){return this._iter.toSeq()},Te.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate((function(e){if(e){Ze(e);var r=s(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}}),e)},Te.prototype.__iterator=function(t,e){var n=this._iter.__iterator(q,e);return new K((function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Ze(r);var i=s(r);return T(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}}))},Fe.prototype.cacheResult=Pe.prototype.cacheResult=Ke.prototype.cacheResult=Te.prototype.cacheResult=rn,e(an,St),an.prototype.toString=function(){return this.__toString(fn(this)+" {","}")},an.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},an.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},an.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=cn(this,te()))},an.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+fn(this));var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:cn(this,n)},an.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:cn(this,e)},an.prototype.wasAltered=function(){return this._map.wasAltered()},an.prototype.__iterator=function(t,e){var n=this;return r(this._defaultValues).map((function(t,e){return n.get(e)})).__iterator(t,e)},an.prototype.__iterate=function(t,e){var n=this;return r(this._defaultValues).map((function(t,e){return n.get(e)})).__iterate(t,e)},an.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?cn(this,e,t):(this.__ownerID=t,this._map=e,this)};var un=an.prototype;function cn(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function fn(t){return t._name||t.constructor.name||"Record"}function hn(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){mt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function pn(t){return null==t?wn():ln(t)&&!f(t)?t:wn().withMutations((function(e){var n=o(t);Kt(n.size),n.forEach((function(t){return e.add(t)}))}))}function ln(t){return!(!t||!t[vn])}un[v]=un.remove,un.deleteIn=un.removeIn=Wt.removeIn,un.merge=Wt.merge,un.mergeWith=Wt.mergeWith,un.mergeIn=Wt.mergeIn,un.mergeDeep=Wt.mergeDeep,un.mergeDeepWith=Wt.mergeDeepWith,un.mergeDeepIn=Wt.mergeDeepIn,un.setIn=Wt.setIn,un.update=Wt.update,un.updateIn=Wt.updateIn,un.withMutations=Wt.withMutations,un.asMutable=Wt.asMutable,un.asImmutable=Wt.asImmutable,e(pn,Ot),pn.of=function(){return this(arguments)},pn.fromKeys=function(t){return this(r(t).keySeq())},pn.prototype.toString=function(){return this.__toString("Set {","}")},pn.prototype.has=function(t){return this._map.has(t)},pn.prototype.add=function(t){return gn(this,this._map.set(t,!0))},pn.prototype.remove=function(t){return gn(this,this._map.remove(t))},pn.prototype.clear=function(){return gn(this,this._map.clear())},pn.prototype.union=function(){var e=t.call(arguments,0);return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(t){for(var n=0;n<e.length;n++)o(e[n]).forEach((function(e){return t.add(e)}))})):this.constructor(e[0])},pn.prototype.intersect=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var n=this;return this.withMutations((function(t){n.forEach((function(n){e.every((function(t){return t.includes(n)}))||t.remove(n)}))}))},pn.prototype.subtract=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return o(t)}));var n=this;return this.withMutations((function(t){n.forEach((function(n){e.some((function(t){return t.includes(n)}))&&t.remove(n)}))}))},pn.prototype.merge=function(){return this.union.apply(this,arguments)},pn.prototype.mergeWith=function(e){var n=t.call(arguments,1);return this.union.apply(this,n)},pn.prototype.sort=function(t){return bn($e(this,t))},pn.prototype.sortBy=function(t,e){return bn($e(this,e,t))},pn.prototype.wasAltered=function(){return this._map.wasAltered()},pn.prototype.__iterate=function(t,e){var n=this;return this._map.__iterate((function(e,r){return t(r,r,n)}),e)},pn.prototype.__iterator=function(t,e){return this._map.map((function(t,e){return e})).__iterator(t,e)},pn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},pn.isSet=ln;var dn,vn="@@__IMMUTABLE_SET__@@",yn=pn.prototype;function gn(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function mn(t,e){var n=Object.create(yn);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function wn(){return dn||(dn=mn(te()))}function bn(t){return null==t?xn():Sn(t)?t:xn().withMutations((function(e){var n=o(t);Kt(n.size),n.forEach((function(t){return e.add(t)}))}))}function Sn(t){return ln(t)&&f(t)}yn[vn]=!0,yn[v]=yn.remove,yn.mergeDeep=yn.merge,yn.mergeDeepWith=yn.mergeWith,yn.withMutations=Wt.withMutations,yn.asMutable=Wt.asMutable,yn.asImmutable=Wt.asImmutable,yn.__empty=wn,yn.__make=mn,e(bn,pn),bn.of=function(){return this(arguments)},bn.fromKeys=function(t){return this(r(t).keySeq())},bn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},bn.isOrderedSet=Sn;var En,On=bn.prototype;function In(t,e){var n=Object.create(On);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function xn(){return En||(En=In(Be()))}function zn(t){return null==t?An():Dn(t)?t:An().unshiftAll(t)}function Dn(t){return!(!t||!t[kn])}On[d]=!0,On.__empty=xn,On.__make=In,e(zn,Et),zn.of=function(){return this(arguments)},zn.prototype.toString=function(){return this.__toString("Stack [","]")},zn.prototype.get=function(t,e){var n=this._head;for(t=z(this,t);n&&t--;)n=n.next;return n?n.value:e},zn.prototype.peek=function(){return this._head&&this._head.value},zn.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,n=arguments.length-1;n>=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Rn(t,e)},zn.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;Kt(t.size);var e=this.size,n=this._head;return t.reverse().forEach((function(t){e++,n={value:t,next:n}})),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Rn(e,n)},zn.prototype.pop=function(){return this.slice(1)},zn.prototype.unshift=function(){return this.push.apply(this,arguments)},zn.prototype.unshiftAll=function(t){return this.pushAll(t)},zn.prototype.shift=function(){return this.pop.apply(this,arguments)},zn.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):An()},zn.prototype.slice=function(t,e){if(M(t,e,this.size))return this;var n=k(t,this.size);if(C(e,this.size)!==this.size)return Et.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Rn(r,i)},zn.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Rn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},zn.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},zn.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new K((function(){if(r){var e=r.value;return r=r.next,T(t,n++,e)}return{value:void 0,done:!0}}))},zn.isStack=Dn;var Mn,kn="@@__IMMUTABLE_STACK__@@",Cn=zn.prototype;function Rn(t,e,n,r){var i=Object.create(Cn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function An(){return Mn||(Mn=Rn(0))}function qn(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}Cn[kn]=!0,Cn.withMutations=Wt.withMutations,Cn.asMutable=Wt.asMutable,Cn.asImmutable=Wt.asImmutable,Cn.wasAltered=Wt.wasAltered,n.Iterator=K,qn(n,{toArray:function(){Kt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,n){t[n]=e})),t},toIndexedSeq:function(){return new Fe(this)},toJS:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJS?t.toJS():t})).__toJS()},toJSON:function(){return this.toSeq().map((function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t})).__toJS()},toKeyedSeq:function(){return new Pe(this,!0)},toMap:function(){return Tt(this.toKeyedSeq())},toObject:function(){Kt(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t},toOrderedMap:function(){return Re(this.toKeyedSeq())},toOrderedSet:function(){return bn(a(this)?this.valueSeq():this)},toSet:function(){return pn(a(this)?this.valueSeq():this)},toSetSeq:function(){return new Ke(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return zn(a(this)?this.valueSeq():this)},toList:function(){return ve(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return Qe(this,function(t,e){var n=a(t),i=[t].concat(e).map((function(t){return s(t)?n&&(t=r(t)):t=n?at(t):ut(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===i.length)return t;if(1===i.length){var o=i[0];if(o===t||n&&a(o)||u(t)&&u(o))return o}var c=new et(i);return n?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce((function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}}),0),c}(this,t.call(arguments,0)))},includes:function(t){return this.some((function(e){return _t(e,t)}))},entries:function(){return this.__iterator(B)},every:function(t,e){Kt(this.size);var n=!0;return this.__iterate((function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1})),n},filter:function(t,e){return Qe(this,We(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},findEntry:function(t,e){var n;return this.__iterate((function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1})),n},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return Kt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Kt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate((function(r){n?n=!1:e+=t,e+=null!=r?r.toString():""})),e},keys:function(){return this.__iterator(A)},map:function(t,e){return Qe(this,Ve(this,t,e))},reduce:function(t,e,n){var r,i;return Kt(this.size),arguments.length<2?i=!0:r=e,this.__iterate((function(e,o,s){i?(i=!1,r=e):r=t.call(n,r,e,o,s)})),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Qe(this,Ue(this,!0))},slice:function(t,e){return Qe(this,Ne(this,t,e,!0))},some:function(t,e){return!this.every(Kn(t),e)},sort:function(t){return Qe(this,$e(this,t))},values:function(){return this.__iterator(q)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return x(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=Tt().asMutable();return t.__iterate((function(i,o){r.update(e.call(n,i,o,t),0,(function(t){return t+1}))})),r.asImmutable()}(this,t,e)},equals:function(t){return yt(this,t)},entrySeq:function(){var t=this;if(t._cache)return new et(t._cache);var e=t.toSeq().map(Fn).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Kn(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(D)},flatMap:function(t,e){return Qe(this,function(t,e,n){var r=en(t);return t.toSeq().map((function(i,o){return r(e.call(n,i,o,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Qe(this,Je(this,t,!0))},fromEntrySeq:function(){return new Te(this)},get:function(t,e){return this.find((function(e,n){return _t(n,t)}),void 0,e)},getIn:function(t,e){for(var n,r=this,i=sn(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,m):m)===m)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=a(t),i=(f(t)?Re():Tt()).asMutable();t.__iterate((function(o,s){i.update(e.call(n,o,s,t),(function(t){return(t=t||[]).push(r?[s,o]:o),t}))}));var o=en(t);return i.map((function(e){return Qe(t,o(e))}))}(this,t,e)},has:function(t){return this.get(t,m)!==m},hasIn:function(t){return this.getIn(t,m)!==m},isSubset:function(t){return t="function"==typeof t.includes?t:n(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:n(t)).isSubset(this)},keySeq:function(){return this.toSeq().map(Pn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Ye(this,t)},maxBy:function(t,e){return Ye(this,e,t)},min:function(t){return Ye(this,t?Tn(t):Un)},minBy:function(t,e){return Ye(this,e?Tn(e):Un,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Qe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Qe(this,He(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Kn(t),e)},sortBy:function(t,e){return Qe(this,$e(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Qe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Qe(this,function(t,e,n){var r=nn(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var s=0;return t.__iterate((function(t,i,a){return e.call(n,t,i,a)&&++s&&r(t,i,o)})),s},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var s=t.__iterator(B,i),a=!0;return new K((function(){if(!a)return{value:void 0,done:!0};var t=s.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?r===B?t:T(r,u,c,t):(a=!1,{value:void 0,done:!0})}))},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Kn(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=f(t),n=a(t),r=e?1:0;return function(t,e){return e=It(e,3432918353),e=It(e<<15|e>>>-15,461845907),e=It(e<<13|e>>>-13,5),e=It((e=(e+3864292196|0)^t)^e>>>16,2246822507),xt((e=It(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+Wn(zt(t),zt(e))|0}:function(t,e){r=r+Wn(zt(t),zt(e))|0}:e?function(t){r=31*r+zt(t)|0}:function(t){r=r+zt(t)|0}),r)}(this))}});var Bn=n.prototype;Bn[h]=!0,Bn[F]=Bn.values,Bn.__toJS=Bn.toArray,Bn.__toStringMapper=Ln,Bn.inspect=Bn.toSource=function(){return this.toString()},Bn.chain=Bn.flatMap,Bn.contains=Bn.includes,function(){try{Object.defineProperty(Bn,"length",{get:function(){if(!n.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),qn(r,{flip:function(){return Qe(this,Le(this))},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey((function(e){return _t(e,t)}))},lastKeyOf:function(t){return this.findLastKey((function(e){return _t(e,t)}))},mapEntries:function(t,e){var n=this,r=0;return Qe(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Qe(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var jn=r.prototype;function Pn(t,e){return e}function Fn(t,e){return[e,t]}function Kn(t){return function(){return!t.apply(this,arguments)}}function Tn(t){return function(){return-t.apply(this,arguments)}}function Ln(t){return"string"==typeof t?JSON.stringify(t):t}function Vn(){return I(arguments)}function Un(t,e){return t<e?1:t>e?-1:0}function Wn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return jn[p]=!0,jn[F]=Bn.entries,jn.__toJS=Bn.toObject,jn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Ln(t)},qn(i,{toKeyedSeq:function(){return new Pe(this,!1)},filter:function(t,e){return Qe(this,We(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return Qe(this,Ue(this,!1))},slice:function(t,e){return Qe(this,Ne(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=k(t,t<0?this.count():this.size);var r=this.slice(0,t);return Qe(this,1===n?r:r.concat(I(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return Qe(this,Je(this,t,!1))},get:function(t,e){return(t=z(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,n){return n===t}),void 0,e)},has:function(t){return(t=z(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Qe(this,function(t,e){var n=nn(t);return n.size=t.size&&2*t.size-1,n.__iterateUncached=function(n,r){var i=this,o=0;return t.__iterate((function(t,r){return(!o||!1!==n(e,o++,i))&&!1!==n(t,o++,i)}),r),o},n.__iteratorUncached=function(n,r){var i,o=t.__iterator(q,r),s=0;return new K((function(){return(!i||s%2)&&(i=o.next()).done?i:s%2?T(n,s++,e):T(n,s++,i.value,i)}))},n}(this,t))},interleave:function(){var t=[this].concat(I(arguments)),e=Ge(this.toSeq(),Y.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),Qe(this,n)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Qe(this,He(this,t,e,!1))},zip:function(){return Qe(this,Ge(this,Vn,[this].concat(I(arguments))))},zipWith:function(t){var e=I(arguments);return e[0]=this,Qe(this,Ge(this,t,e))}}),i.prototype[l]=!0,i.prototype[d]=!0,qn(o,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),o.prototype.has=Bn.includes,qn($,r.prototype),qn(Y,i.prototype),qn(X,o.prototype),qn(St,r.prototype),qn(Et,i.prototype),qn(Ot,o.prototype),{Iterable:n,Seq:J,Collection:bt,Map:Tt,OrderedMap:Re,List:ve,Stack:zn,Set:pn,OrderedSet:bn,Record:an,Range:wt,Repeat:gt,is:_t,fromJS:pt}}()},9590:t=>{var e="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(t,s){if(t===s)return!0;if(t&&s&&"object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;var a,u,c,f;if(Array.isArray(t)){if((a=t.length)!=s.length)return!1;for(u=a;0!=u--;)if(!o(t[u],s[u]))return!1;return!0}if(n&&t instanceof Map&&s instanceof Map){if(t.size!==s.size)return!1;for(f=t.entries();!(u=f.next()).done;)if(!s.has(u.value[0]))return!1;for(f=t.entries();!(u=f.next()).done;)if(!o(u.value[1],s.get(u.value[0])))return!1;return!0}if(r&&t instanceof Set&&s instanceof Set){if(t.size!==s.size)return!1;for(f=t.entries();!(u=f.next()).done;)if(!s.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(s)){if((a=t.length)!=s.length)return!1;for(u=a;0!=u--;)if(t[u]!==s[u])return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if((a=(c=Object.keys(t)).length)!==Object.keys(s).length)return!1;for(u=a;0!=u--;)if(!Object.prototype.hasOwnProperty.call(s,c[u]))return!1;if(e&&t instanceof Element)return!1;for(u=a;0!=u--;)if(("_owner"!==c[u]&&"__v"!==c[u]&&"__o"!==c[u]||!t.$$typeof)&&!o(t[c[u]],s[c[u]]))return!1;return!0}return t!=t&&s!=s}t.exports=function(t,e){try{return o(t,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}},602:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var o=typeof n;if("string"===o||"number"===o)t.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&t.push(s)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){t.push(n.toString());continue}for(var a in n)r.call(n,a)&&n[a]&&t.push(a)}}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{ReplacementVariableEditor:()=>vn,ReplacementVariableEditorStandalone:()=>rn,SettingsSnippetEditor:()=>bn,StandardButton:()=>hn,StyledEditor:()=>yn,TriggerReplacementVariableSuggestionsButton:()=>pn,recommendedReplacementVariablesShape:()=>qe,replacementVariablesShape:()=>Ae});const t=window.React;var e=n.n(t);const i=window.wp.hooks,o=window.yoast.propTypes;var s=n.n(o);const a=window.lodash.uniqueId;var u=n.n(a);const c=window.wp.i18n,f=window.wp.components,h=window.yoast.draftJs;var p=n(3393),l=n.n(p);function d(){return d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},d.apply(this,arguments)}function v(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function _(t){var e=t.getCurrentContent().getBlockMap(),n=e.last().getKey(),r=e.last().getLength(),i=new h.SelectionState({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r});return h.EditorState.acceptSelection(t,i)}var y="-",g=function(){function t(t){this.decorators=void 0,this.decorators=l().List(t)}var e=t.prototype;return e.getDecorations=function(t,e){var n=new Array(t.getText().length).fill(null);return this.decorators.forEach((function(r,i){r.getDecorations(t,e).forEach((function(t,e){t&&(n[e]=i+y+t)}))})),l().List(n)},e.getComponentForKey=function(e){return this.getDecoratorForKey(e).getComponentForKey(t.getInnerKey(e))},e.getPropsForKey=function(e){return this.getDecoratorForKey(e).getPropsForKey(t.getInnerKey(e))},e.getDecoratorForKey=function(t){var e=t.split(y),n=Number(e[0]);return this.decorators.get(n)},t.getInnerKey=function(t){return t.split(y).slice(1).join(y)},t}(),m=function(t){return"function"==typeof t.getDecorations&&"function"==typeof t.getComponentForKey&&"function"==typeof t.getPropsForKey};function w(t){return(0,h.getDefaultKeyBinding)(t)}function b(t,e,n,r){var i,o=r.setEditorState;switch(t){case"backspace":case"backspace-word":case"backspace-to-start-of-line":i=h.RichUtils.onBackspace(e);break;case"delete":case"delete-word":case"delete-to-end-of-block":i=h.RichUtils.onDelete(e);break;default:return"not-handled"}return null!=i?(o(i),"handled"):"not-handled"}var S=function(t){var e,n;return null!=(null==t?void 0:t.decorators)?null==(e=t.decorators)?void 0:e.size:null!=(null==t?void 0:t._decorators)?null==(n=t._decorators)?void 0:n.length:void 0},E=function(t){var n,r;function i(e){var n;return(n=t.call(this,e)||this).editor=null,n.state={readOnly:!1},n.onChange=function(t){var e=t;n.resolvePlugins().forEach((function(t){t.onChange&&(e=t.onChange(e,n.getPluginMethods()))})),n.props.onChange&&n.props.onChange(e)},n.getPlugins=function(){return[].concat(n.props.plugins)},n.getProps=function(){return d({},n.props)},n.getReadOnly=function(){return n.props.readOnly||n.state.readOnly},n.setReadOnly=function(t){t!==n.state.readOnly&&n.setState({readOnly:t})},n.getEditorRef=function(){return n.editor},n.getEditorState=function(){return n.props.editorState},n.getPluginMethods=function(){return{getPlugins:n.getPlugins,getProps:n.getProps,setEditorState:n.onChange,getEditorState:n.getEditorState,getReadOnly:n.getReadOnly,setReadOnly:n.setReadOnly,getEditorRef:n.getEditorRef}},n.createPluginHooks=function(){return t=[n.props].concat(n.resolvePlugins()),e=n.getPluginMethods(),r={},i=new Set(["onChange"]),t.forEach((function(n){Object.keys(n).forEach((function(n){i.has(n)||(i.add(n),n.startsWith("on")?r[n]=function(t,e,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.some((function(e){var r=e[t];return"function"==typeof r&&!0===r.apply(void 0,i.concat([n]))}))}}(n,t,e):n.startsWith("handle")?r[n]=function(t,e,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e.some((function(e){var r=e[t];return"function"==typeof r&&"handled"===r.apply(void 0,i.concat([n]))}))?"handled":"not-handled"}}(n,t,e):n.endsWith("Fn")&&("blockRendererFn"===n?r.blockRendererFn=function(t,e){return function(n){var r={props:{}};return t.forEach((function(t){if("function"==typeof t.blockRendererFn){var i=t.blockRendererFn(n,e);if(null!=i){var o=i.props,s=v(i,["props"]),a=r,u=a.props,c=v(a,["props"]);r=d({},c,s,{props:d({},u,o)})}}})),!!r.component&&r}}(t,e):"blockStyleFn"===n?r.blockStyleFn=function(t,e){return function(n){var r=[];return t.forEach((function(t){if("function"==typeof t.blockStyleFn){var i=t.blockStyleFn(n,e);null!=i&&r.push(i)}})),r.join(" ")}}(t,e):"customStyleFn"===n?r.customStyleFn=function(t,e){return function(n,r){var i;return t.some((function(t){return"function"==typeof t.customStyleFn&&void 0!==(i=t.customStyleFn(n,r,e))}))&&i?i:{}}}(t,e):"keyBindingFn"===n&&(r.keyBindingFn=function(t,e){return function(n){var r=null;return t.some((function(t){return"function"==typeof t.keyBindingFn&&void 0!==(r=t.keyBindingFn(n,e))}))?r:null}}(t,e))))}))})),r;var t,e,r,i},n.resolvePlugins=function(){var t=n.getPlugins();return!0===n.props.defaultKeyBindings&&t.push({keyBindingFn:w}),!0===n.props.defaultKeyCommands&&t.push({handleKeyCommand:b}),t},n.resolveCustomStyleMap=function(){return n.props.plugins.filter((function(t){return void 0!==t.customStyleMap})).map((function(t){return t.customStyleMap})).concat([n.props.customStyleMap]).reduce((function(t,e){return d({},t,e)}),{})},n.resolveblockRenderMap=function(){var t=n.props.plugins.filter((function(t){return void 0!==t.blockRenderMap})).reduce((function(t,e){return t.merge(e.blockRenderMap)}),(0,p.Map)({}));return n.props.defaultBlockRenderMap&&(t=h.DefaultDraftBlockRenderMap.merge(t)),n.props.blockRenderMap&&(t=t.merge(n.props.blockRenderMap)),t},n.resolveAccessibilityProps=function(){var t={};return n.resolvePlugins().forEach((function(e){if("function"==typeof e.getAccessibilityProps){var n=e.getAccessibilityProps(),r={};void 0===t.ariaHasPopup?r.ariaHasPopup=n.ariaHasPopup:"true"===n.ariaHasPopup&&(r.ariaHasPopup="true"),void 0===t.ariaExpanded?r.ariaExpanded=n.ariaExpanded:!0===n.ariaExpanded&&(r.ariaExpanded=!0),t=d({},t,n,r)}})),t},[n.props].concat(n.resolvePlugins()).forEach((function(t){t&&"function"==typeof t.initialize&&t.initialize(n.getPluginMethods())})),n}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var o=i.prototype;return o.focus=function(){this.editor&&this.editor.focus()},o.blur=function(){this.editor&&this.editor.blur()},o.componentDidMount=function(){var t,n,r,i,o,s,a=(t=this.props,n=this.getEditorState,r=this.onChange,i=function(t){var e=t.decorators,n=t.plugins,r=void 0===n?[]:n;return(0,p.List)([{decorators:e}].concat(r)).filter((function(t){return void 0!==(null==t?void 0:t.decorators)})).flatMap((function(t){return null==t?void 0:t.decorators}))}(t),o=function(t,n,r){var i=(0,p.List)(t).map((function(t){var i=t.component;return d({},t,{component:function(t){return e().createElement(i,d({},t,{getEditorState:n,setEditorState:r}))}})})).toJS();return new h.CompositeDecorator(i)}(i.filter((function(t){return!m(t)})),n,r),s=i.filter((function(t){return m(t)})),new g(s.push(o))),u=h.EditorState.set(this.props.editorState,{decorator:a});this.onChange(_(u))},o.componentDidUpdate=function(t){var e=this.props,n=t.editorState.getDecorator(),r=e.editorState.getDecorator();if(n&&!(n===r||n&&r&&S(n)===S(r))){var i=h.EditorState.set(e.editorState,{decorator:n});this.onChange(_(i))}},o.componentWillUnmount=function(){var t=this;this.resolvePlugins().forEach((function(e){e.willUnmount&&e.willUnmount({getEditorState:t.getEditorState,setEditorState:t.onChange})}))},o.render=function(){var t=this,n=this.createPluginHooks(),r=this.resolveCustomStyleMap(),i=this.resolveAccessibilityProps(),o=this.resolveblockRenderMap(),s=this.props;s.keyBindingFn;var a=v(s,["keyBindingFn"]);return e().createElement(h.Editor,d({},a,i,n,{readOnly:this.props.readOnly||this.state.readOnly,customStyleMap:r,blockRenderMap:o,onChange:this.onChange,editorState:this.props.editorState,ref:function(e){t.editor=e}}))},i}(t.Component);E.propTypes={editorState:s().object.isRequired,onChange:s().func.isRequired,plugins:s().array,defaultKeyBindings:s().bool,defaultKeyCommands:s().bool,defaultBlockRenderMap:s().bool,customStyleMap:s().object,decorators:s().array},E.defaultProps={defaultBlockRenderMap:!0,defaultKeyBindings:!0,defaultKeyCommands:!0,customStyleMap:{},plugins:[],decorators:[]};const O=E;function I(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=I(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function x(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=I(t))&&(r&&(r+=" "),r+=e);return r}const z=window.lodash.escapeRegExp;var D=n.n(z);function M(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function k(t){return t instanceof M(t).Element||t instanceof Element}function C(t){return t instanceof M(t).HTMLElement||t instanceof HTMLElement}function R(t){return"undefined"!=typeof ShadowRoot&&(t instanceof M(t).ShadowRoot||t instanceof ShadowRoot)}var A=Math.max,q=Math.min,B=Math.round;function j(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(C(t)&&e){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(r=B(n.width)/s||1),o>0&&(i=B(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function P(t){var e=M(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function F(t){return t?(t.nodeName||"").toLowerCase():null}function K(t){return((k(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return j(K(t)).left+P(t).scrollLeft}function L(t){return M(t).getComputedStyle(t)}function V(t){var e=L(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function U(t,e,n){void 0===n&&(n=!1);var r,i,o=C(e),s=C(e)&&function(t){var e=t.getBoundingClientRect(),n=B(e.width)/t.offsetWidth||1,r=B(e.height)/t.offsetHeight||1;return 1!==n||1!==r}(e),a=K(e),u=j(t,s),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!n)&&(("body"!==F(e)||V(a))&&(c=(r=e)!==M(r)&&C(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:P(r)),C(e)?((f=j(e,!0)).x+=e.clientLeft,f.y+=e.clientTop):a&&(f.x=T(a))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function W(t){var e=j(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function N(t){return"html"===F(t)?t:t.assignedSlot||t.parentNode||(R(t)?t.host:null)||K(t)}function H(t){return["html","body","#document"].indexOf(F(t))>=0?t.ownerDocument.body:C(t)&&V(t)?t:H(N(t))}function J(t,e){var n;void 0===e&&(e=[]);var r=H(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=M(r),s=i?[o].concat(o.visualViewport||[],V(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(J(N(s)))}function $(t){return["table","td","th"].indexOf(F(t))>=0}function Y(t){return C(t)&&"fixed"!==L(t).position?t.offsetParent:null}function X(t){for(var e=M(t),n=Y(t);n&&$(n)&&"static"===L(n).position;)n=Y(n);return n&&("html"===F(n)||"body"===F(n)&&"static"===L(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&C(t)&&"fixed"===L(t).position)return null;for(var n=N(t);C(n)&&["html","body"].indexOf(F(n))<0;){var r=L(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}var G="top",Q="bottom",Z="right",tt="left",et="auto",nt=[G,Q,Z,tt],rt="start",it="end",ot="viewport",st="popper",at=nt.reduce((function(t,e){return t.concat([e+"-"+rt,e+"-"+it])}),[]),ut=[].concat(nt,[et]).reduce((function(t,e){return t.concat([e,e+"-"+rt,e+"-"+it])}),[]),ct=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ft(t){var e=new Map,n=new Set,r=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var r=e.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),r}var ht={placement:"bottom",modifiers:[],strategy:"absolute"};function pt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function lt(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,i=e.defaultOptions,o=void 0===i?ht:i;return function(t,e,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},ht,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},u=[],c=!1,f={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;h(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:k(t)?J(t):t.contextElement?J(t.contextElement):[],popper:J(e)};var s,c,p=function(t){var e=ft(t);return ct.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((s=[].concat(r,a.options.modifiers),c=s.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=p.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,r=void 0===n?{}:n,i=t.effect;if("function"==typeof i){var o=i({state:a,name:e,instance:f,options:r});u.push(o||function(){})}})),f.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,n=t.popper;if(pt(e,n)){a.rects={reference:U(e,X(n),"fixed"===a.options.strategy),popper:W(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,u=void 0===s?{}:s,h=i.name;"function"==typeof o&&(a=o({state:a,options:u,name:h,instance:f})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){f.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(i())}))}))),s}),destroy:function(){h(),c=!0}};if(!pt(t,e))return f;function h(){u.forEach((function(t){return t()})),u=[]}return f.setOptions(n).then((function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)})),f}}var dt={passive:!0};function vt(t){return t.split("-")[0]}function _t(t){return t.split("-")[1]}function yt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function gt(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?vt(i):null,s=i?_t(i):null,a=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case G:e={x:a,y:n.y-r.height};break;case Q:e={x:a,y:n.y+n.height};break;case Z:e={x:n.x+n.width,y:u};break;case tt:e={x:n.x-r.width,y:u};break;default:e={x:n.x,y:n.y}}var c=o?yt(o):null;if(null!=c){var f="y"===c?"height":"width";switch(s){case rt:e[c]=e[c]-(n[f]/2-r[f]/2);break;case it:e[c]=e[c]+(n[f]/2-r[f]/2)}}return e}var mt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wt(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,h=t.isFixed,p=!0===f?function(t){var e=t.x,n=t.y,r=window.devicePixelRatio||1;return{x:B(e*r)/r||0,y:B(n*r)/r||0}}(s):"function"==typeof f?f(s):s,l=p.x,d=void 0===l?0:l,v=p.y,_=void 0===v?0:v,y=s.hasOwnProperty("x"),g=s.hasOwnProperty("y"),m=tt,w=G,b=window;if(c){var S=X(n),E="clientHeight",O="clientWidth";S===M(n)&&"static"!==L(S=K(n)).position&&"absolute"===a&&(E="scrollHeight",O="scrollWidth"),(i===G||(i===tt||i===Z)&&o===it)&&(w=Q,_-=(h&&b.visualViewport?b.visualViewport.height:S[E])-r.height,_*=u?1:-1),i!==tt&&(i!==G&&i!==Q||o!==it)||(m=Z,d-=(h&&b.visualViewport?b.visualViewport.width:S[O])-r.width,d*=u?1:-1)}var I,x=Object.assign({position:a},c&&mt);return u?Object.assign({},x,((I={})[w]=g?"0":"",I[m]=y?"0":"",I.transform=(b.devicePixelRatio||1)<=1?"translate("+d+"px, "+_+"px)":"translate3d("+d+"px, "+_+"px, 0)",I)):Object.assign({},x,((e={})[w]=g?_+"px":"",e[m]=y?d+"px":"",e.transform="",e))}var bt={left:"right",right:"left",bottom:"top",top:"bottom"};function St(t){return t.replace(/left|right|bottom|top/g,(function(t){return bt[t]}))}var Et={start:"end",end:"start"};function Ot(t){return t.replace(/start|end/g,(function(t){return Et[t]}))}function It(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&R(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function zt(t,e){return e===ot?xt(function(t){var e=M(t),n=K(t),r=e.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+T(t),y:a}}(t)):k(e)?function(t){var e=j(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):xt(function(t){var e,n=K(t),r=P(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=A(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=A(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+T(t),u=-r.scrollTop;return"rtl"===L(i||n).direction&&(a+=A(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(K(t)))}function Dt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Mt(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function kt(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=void 0===r?t.placement:r,o=n.boundary,s=void 0===o?"clippingParents":o,a=n.rootBoundary,u=void 0===a?ot:a,c=n.elementContext,f=void 0===c?st:c,h=n.altBoundary,p=void 0!==h&&h,l=n.padding,d=void 0===l?0:l,v=Dt("number"!=typeof d?d:Mt(d,nt)),_=f===st?"reference":st,y=t.rects.popper,g=t.elements[p?_:f],m=function(t,e,n){var r="clippingParents"===e?function(t){var e=J(N(t)),n=["absolute","fixed"].indexOf(L(t).position)>=0,r=n&&C(t)?X(t):t;return k(r)?e.filter((function(t){return k(t)&&It(t,r)&&"body"!==F(t)&&(!n||"static"!==L(t).position)})):[]}(t):[].concat(e),i=[].concat(r,[n]),o=i[0],s=i.reduce((function(e,n){var r=zt(t,n);return e.top=A(r.top,e.top),e.right=q(r.right,e.right),e.bottom=q(r.bottom,e.bottom),e.left=A(r.left,e.left),e}),zt(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(k(g)?g:g.contextElement||K(t.elements.popper),s,u),w=j(t.elements.reference),b=gt({reference:w,element:y,strategy:"absolute",placement:i}),S=xt(Object.assign({},y,b)),E=f===st?S:w,O={top:m.top-E.top+v.top,bottom:E.bottom-m.bottom+v.bottom,left:m.left-E.left+v.left,right:E.right-m.right+v.right},I=t.modifiersData.offset;if(f===st&&I){var x=I[i];Object.keys(O).forEach((function(t){var e=[Z,Q].indexOf(t)>=0?1:-1,n=[G,Q].indexOf(t)>=0?"y":"x";O[t]+=x[n]*e}))}return O}function Ct(t,e,n){return A(t,q(e,n))}function Rt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function At(t){return[G,Z,Q,tt].some((function(e){return t[e]>=0}))}var qt=lt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,u=M(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,dt)})),a&&u.addEventListener("resize",n.update,dt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,dt)})),a&&u.removeEventListener("resize",n.update,dt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,u=void 0===a||a,c={placement:vt(e.placement),variation:_t(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,wt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:u})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,wt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},i=e.elements[t];C(i)&&F(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(t){var e=r[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var r=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});C(r)&&F(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=void 0===i?[0,0]:i,s=ut.reduce((function(t,n){return t[n]=function(t,e,n){var r=vt(t),i=[tt,G].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[tt,Z].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,o),t}),{}),a=s[e.placement],u=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,u=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,l=n.flipVariations,d=void 0===l||l,v=n.allowedAutoPlacements,_=e.options.placement,y=vt(_),g=u||(y!==_&&d?function(t){if(vt(t)===et)return[];var e=St(t);return[Ot(t),e,Ot(e)]}(_):[St(_)]),m=[_].concat(g).reduce((function(t,n){return t.concat(vt(n)===et?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?ut:u,f=_t(r),h=f?a?at:at.filter((function(t){return _t(t)===f})):nt,p=h.filter((function(t){return c.indexOf(t)>=0}));0===p.length&&(p=h);var l=p.reduce((function(e,n){return e[n]=kt(t,{placement:n,boundary:i,rootBoundary:o,padding:s})[vt(n)],e}),{});return Object.keys(l).sort((function(t,e){return l[t]-l[e]}))}(e,{placement:n,boundary:f,rootBoundary:h,padding:c,flipVariations:d,allowedAutoPlacements:v}):n)}),[]),w=e.rects.reference,b=e.rects.popper,S=new Map,E=!0,O=m[0],I=0;I<m.length;I++){var x=m[I],z=vt(x),D=_t(x)===rt,M=[G,Q].indexOf(z)>=0,k=M?"width":"height",C=kt(e,{placement:x,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),R=M?D?Z:tt:D?Q:G;w[k]>b[k]&&(R=St(R));var A=St(R),q=[];if(o&&q.push(C[z]<=0),a&&q.push(C[R]<=0,C[A]<=0),q.every((function(t){return t}))){O=x,E=!1;break}S.set(x,q)}if(E)for(var B=function(t){var e=m.find((function(e){var n=S.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return O=e,"break"},j=d?3:1;j>0&&"break"!==B(j);j--);e.placement!==O&&(e.modifiersData[r]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,u=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,l=void 0===p||p,d=n.tetherOffset,v=void 0===d?0:d,_=kt(e,{boundary:u,rootBoundary:c,padding:h,altBoundary:f}),y=vt(e.placement),g=_t(e.placement),m=!g,w=yt(y),b="x"===w?"y":"x",S=e.modifiersData.popperOffsets,E=e.rects.reference,O=e.rects.popper,I="function"==typeof v?v(Object.assign({},e.rects,{placement:e.placement})):v,x="number"==typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),z=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(S){if(o){var M,k="y"===w?G:tt,C="y"===w?Q:Z,R="y"===w?"height":"width",B=S[w],j=B+_[k],P=B-_[C],F=l?-O[R]/2:0,K=g===rt?E[R]:O[R],T=g===rt?-O[R]:-E[R],L=e.elements.arrow,V=l&&L?W(L):{width:0,height:0},U=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},N=U[k],H=U[C],J=Ct(0,E[R],V[R]),$=m?E[R]/2-F-J-N-x.mainAxis:K-J-N-x.mainAxis,Y=m?-E[R]/2+F+J+H+x.mainAxis:T+J+H+x.mainAxis,et=e.elements.arrow&&X(e.elements.arrow),nt=et?"y"===w?et.clientTop||0:et.clientLeft||0:0,it=null!=(M=null==z?void 0:z[w])?M:0,ot=B+Y-it,st=Ct(l?q(j,B+$-it-nt):j,B,l?A(P,ot):P);S[w]=st,D[w]=st-B}if(a){var at,ut="x"===w?G:tt,ct="x"===w?Q:Z,ft=S[b],ht="y"===b?"height":"width",pt=ft+_[ut],lt=ft-_[ct],dt=-1!==[G,tt].indexOf(y),gt=null!=(at=null==z?void 0:z[b])?at:0,mt=dt?pt:ft-E[ht]-O[ht]-gt+x.altAxis,wt=dt?ft+E[ht]+O[ht]-gt-x.altAxis:lt,bt=l&&dt?function(t,e,n){var r=Ct(t,e,n);return r>n?n:r}(mt,ft,wt):Ct(l?mt:pt,ft,l?wt:lt);S[b]=bt,D[b]=bt-ft}e.modifiersData[r]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=vt(n.placement),u=yt(a),c=[tt,Z].indexOf(a)>=0?"height":"width";if(o&&s){var f=function(t,e){return Dt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Mt(t,nt))}(i.padding,n),h=W(o),p="y"===u?G:tt,l="y"===u?Q:Z,d=n.rects.reference[c]+n.rects.reference[u]-s[u]-n.rects.popper[c],v=s[u]-n.rects.reference[u],_=X(o),y=_?"y"===u?_.clientHeight||0:_.clientWidth||0:0,g=d/2-v/2,m=f[p],w=y-h[c]-f[l],b=y/2-h[c]/2+g,S=Ct(m,b,w),E=u;n.modifiersData[r]=((e={})[E]=S,e.centerOffset=S-b,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&It(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=kt(e,{elementContext:"reference"}),a=kt(e,{altBoundary:!0}),u=Rt(s,r),c=Rt(a,i,o),f=At(u),h=At(c);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}}]}),Bt=n(9590),jt=n.n(Bt),Pt=function(t){return t.reduce((function(t,e){var n=e[0],r=e[1];return t[n]=r,t}),{})},Ft="undefined"!=typeof window&&window.document&&window.document.createElement?t.useLayoutEffect:t.useEffect,Kt=[];const Tt=window.lodash;function Lt(){return Lt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lt.apply(this,arguments)}function Vt(t,e){return Vt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Vt(t,e)}function Ut(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Nt(t){var n=t.mention,r=t.children,i=t.className;return e().createElement("a",{href:n.link,className:i,spellCheck:!1,"data-testid":"mentionLink"},r)}function Ht(t){var n=t.children,r=t.className;return e().createElement("span",{className:r,spellCheck:!1,"data-testid":"mentionText"},n)}function Jt(t){var n=t.entityKey,r=t.theme,i=void 0===r?{}:r,o=t.mentionComponent,s=t.children,a=t.decoratedText,u=t.className,c=t.contentState,f=x(i.mention,u),h=c.getEntity(n).getData().mention,p=o||(h.link?Nt:Ht);return e().createElement(p,{entityKey:n,mention:h,theme:i,className:f,decoratedText:a},s)}var $t=function(n){var r=n.onMentionSelect,i=n.mention,o=n.theme,s=n.index,a=n.onMentionFocus,u=n.isFocused,c=n.id,f=n.searchValue,h=n.entryComponent,p=(0,t.useRef)(!1),l=(0,t.useRef)(null);(0,t.useEffect)((function(){u&&requestAnimationFrame((function(){var t;return null==(t=l.current)?void 0:t.scrollIntoView({behavior:"smooth",block:"nearest"})}))}),[u]),(0,t.useEffect)((function(){p.current=!1}));var d=u?o.mentionSuggestionsEntryFocused:o.mentionSuggestionsEntry;return e().createElement("div",{ref:l},e().createElement(h,{className:d,onMouseDown:function(t){t.preventDefault(),p.current=!0},onMouseUp:function(){p.current&&(r(i),p.current=!1)},onMouseEnter:function(){a(s)},role:"option",id:c,"aria-selected":u?"true":void 0,theme:o,mention:i,isFocused:u,searchValue:f,selectMention:r}))};$t.propTypes={entryComponent:s().any.isRequired,searchValue:s().string,onMentionSelect:s().func};var Yt=$t,Xt=function(t,e,n){var r=e.getAnchorKey(),i=e.getAnchorOffset();return function(t,e,n){for(var r,i=t.substr(0,e),o=n.map((function(t){return D()(t)})).join("|"),s=new RegExp("(\\s|^)("+o+")","g"),a=0,u=0,c=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Wt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i.matchAll(s));!(r=c()).done;){var f=r.value,h=f[1].length,p=f[2].length;u=(a=(f.index||0)+h)+p}var l=i.slice(u);return{begin:a,end:i.length,matchingString:l}}(t.getCurrentContent().getBlockForKey(r).getText(),i,n)};function Gt(t){return"@"===t?"mention":t+"mention"}function Qt(t){var n=t.mention,r=t.theme,i=void 0===r?{}:r;return n.avatar?e().createElement("img",{src:n.avatar,className:i.mentionSuggestionsEntryAvatar,role:"presentation"}):null}var Zt=["mention","theme","isFocused","searchValue","selectMention"];function te(t){var n=t.mention,r=t.theme;t.isFocused,t.searchValue,t.selectMention;var i=Ut(t,Zt);return e().createElement("div",i,e().createElement(Qt,{mention:n,theme:r}),e().createElement("span",{className:null==r?void 0:r.mentionSuggestionsEntryText},n.name))}var ee=function t(e){return e?"static"!==window.getComputedStyle(e).getPropertyValue("position")?e:t(e.parentElement):null};function ne(t){var e,n=t.decoratorRect,r=t.popover,i=t.props,o=ee(r.parentElement);if(o){var s=o.getBoundingClientRect();e={scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,left:n.left-s.left,top:n.bottom-s.top}}else e={scrollTop:window.pageYOffset||document.documentElement.scrollTop,scrollLeft:window.pageXOffset||document.documentElement.scrollLeft,top:n.bottom,left:n.left};var a,u,c=e.left+e.scrollLeft,f=e.top+e.scrollTop;return i.open&&(i.suggestions.length>0?(a="scale(1)",u="all 0.25s cubic-bezier(.3,1.2,.2,1)"):(a="scale(0)",u="all 0.35s cubic-bezier(.3,1,.2,1)")),{left:c+"px",top:f+"px",transform:a,transformOrigin:"1em 0%",transition:u}}function re(t){return void 0!==t}function ie(n){var r=n.store,i=n.children,o=n.theme,s=n.popperOptions,a=void 0===s?{placement:"bottom-start"}:s,u=(0,t.useState)((function(){return x(o.mentionSuggestions,o.mentionSuggestionsPopup)})),c=u[0],f=u[1],h=(0,t.useState)(null),p=h[0],l=h[1],d=function(e,n,r){void 0===r&&(r={});var i=t.useRef(null),o={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||Kt},s=t.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=s[0],u=s[1],c=t.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(t){var e=t.state,n=Object.keys(e.elements);u({styles:Pt(n.map((function(t){return[t,e.styles[t]||{}]}))),attributes:Pt(n.map((function(t){return[t,e.attributes[t]]})))})},requires:["computeStyles"]}}),[]),f=t.useMemo((function(){var t={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[c,{name:"applyStyles",enabled:!1}])};return jt()(i.current,t)?i.current||t:(i.current=t,t)}),[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,c]),h=t.useRef();return Ft((function(){h.current&&h.current.setOptions(f)}),[f]),Ft((function(){if(null!=e&&null!=n){var t=(r.createPopper||qt)(e,n,f);return h.current=t,function(){t.destroy(),h.current=null}}}),[e,n,r.createPopper]),{state:h.current?h.current.state:null,styles:a.styles,attributes:a.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}}(r.getReferenceElement(),p,a),v=d.styles,_=d.attributes;return(0,t.useEffect)((function(){requestAnimationFrame((function(){return f(x(o.mentionSuggestions,o.mentionSuggestionsPopup,o.mentionSuggestionsPopupVisible))}))}),[o]),e().createElement("div",Lt({ref:l,style:v.popper},_.popper,{className:c}),i)}var oe=(0,Tt.once)((function(t){})),se=["entryComponent","popoverComponent","popperOptions","popoverContainer","onOpenChange","onAddMention","onSearchChange","suggestions","ariaProps","callbacks","theme","store","entityMutability","positionSuggestions","mentionTriggers","mentionPrefix"],ae=function(t){var n,r;function i(e){var n;return(n=t.call(this,e)||this).state={focusedOptionIndex:0},n.key=(0,h.genKey)(),n.popover=void 0,n.activeOffsetKey=void 0,n.lastSearchValue=void 0,n.lastActiveTrigger="",n.lastSelectionIsInsideWord=void 0,n.onEditorStateChange=function(t){var e=n.props.store.getAllSearches();if(0===e.size)return t;var r=function(t,e,n){var r=t.getSelection(),i=r.getAnchorKey(),o=r.getAnchorOffset();if(!r.isCollapsed()||!r.getHasFocus())return null;var s=e.map((function(t){return function(t){var e=t.split("-"),n=e[0],r=e[1],i=e[2];return{blockKey:n,decoratorKey:parseInt(r,10),leafKey:parseInt(i,10)}}(t)})).filter((function(t){return t.blockKey===i})).map((function(e){return t.getBlockTree(e.blockKey).getIn([e.decoratorKey])}));if(s.every((function(t){return void 0===t})))return null;var a=t.getCurrentContent().getBlockForKey(i).getText(),u=s.filter(re).map((function(t){var e=t.start,r=t.end;return n.map((function(t){return 0===e&&o>=e+t.length&&a.substr(0,t.length)===t&&o<=r||n.length>1&&o>=e+t.length&&(a.substr(e+1,t.length)===t||a.substr(e,t.length)===t)&&o<=r||1===n.length&&o>=e+t.length&&o<=r?t:void 0})).filter(re)[0]})).filter(re);if(u.isEmpty())return null;var c=u.entrySeq().first();return{activeOffsetKey:c[0],activeTrigger:c[1]}}(t,e,n.props.mentionTriggers);if(!r)return n.props.store.resetEscapedSearch(),n.closeDropdown(),t;var i=n.activeOffsetKey;return n.activeOffsetKey=r.activeOffsetKey,n.onSearchChange(t,t.getSelection(),n.activeOffsetKey,i,r.activeTrigger),n.props.store.isEscaped(n.activeOffsetKey||"")||n.props.store.resetEscapedSearch(),n.props.open||n.props.store.isEscaped(n.activeOffsetKey||"")||n.openDropdown(),i!==n.activeOffsetKey&&n.setState({focusedOptionIndex:0}),t},n.onSearchChange=function(t,e,r,i,o){var s=Xt(t,e,[o]).matchingString;n.lastActiveTrigger===o&&n.lastSearchValue===s&&r===i||(n.lastActiveTrigger=o,n.lastSearchValue=s,n.props.onSearchChange({trigger:o,value:s}),n.setState({focusedOptionIndex:0}))},n.onDownArrow=function(t){t.preventDefault();var e=n.state.focusedOptionIndex+1;n.onMentionFocus(e>=n.props.suggestions.length?0:e)},n.onTab=function(t){t.preventDefault(),n.commitSelection()},n.onUpArrow=function(t){if(t.preventDefault(),n.props.suggestions.length>0){var e=n.state.focusedOptionIndex-1;n.onMentionFocus(e<0?n.props.suggestions.length-1:e)}},n.onEscape=function(t){t.preventDefault(),n.props.store.escapeSearch(n.activeOffsetKey||""),n.closeDropdown(),n.props.store.setEditorState(n.props.store.getEditorState())},n.onMentionSelect=function(t){if(t){n.props.onAddMention&&n.props.onAddMention(t),n.closeDropdown();var e=function(t,e,n,r,i){var o=t.getCurrentContent().createEntity(Gt(r),i,{mention:e}).getLastCreatedEntityKey(),s=t.getSelection(),a=Xt(t,s,[r]),u=a.begin,c=a.end,f=s.merge({anchorOffset:u,focusOffset:c}),p=h.Modifier.replaceText(t.getCurrentContent(),f,""+n+e.name,void 0,o),l=f.getAnchorKey();t.getCurrentContent().getBlockForKey(l).getLength()===c&&(p=h.Modifier.insertText(p,p.getSelectionAfter()," "));var d=h.EditorState.push(t,p,"insert-fragment");return h.EditorState.forceSelection(d,p.getSelectionAfter())}(n.props.store.getEditorState(),t,n.props.mentionPrefix,n.lastActiveTrigger||"",n.props.entityMutability);n.props.store.setEditorState(e)}},n.onMentionFocus=function(t){var e="mention-option-"+n.key+"-"+t;n.props.ariaProps.ariaActiveDescendantID=e,n.setState({focusedOptionIndex:t}),n.props.store.setEditorState(n.props.store.getEditorState())},n.commitSelection=function(){var t=n.props.suggestions[n.state.focusedOptionIndex];return n.props.store.getIsOpened()&&t?(n.onMentionSelect(t),"handled"):"not-handled"},n.openDropdown=function(){n.props.callbacks.handleReturn=n.commitSelection,n.props.callbacks.keyBindingFn=function(t){40===t.keyCode&&n.onDownArrow(t),38===t.keyCode&&n.onUpArrow(t),27===t.keyCode&&n.onEscape(t),9===t.keyCode&&n.onTab(t)};var t="mention-option-"+n.key+"-"+n.state.focusedOptionIndex;n.props.ariaProps.ariaActiveDescendantID=t,n.props.ariaProps.ariaOwneeID="mentions-list-"+n.key,n.props.ariaProps.ariaHasPopup="true",n.props.ariaProps.ariaExpanded=!0,n.props.onOpenChange(!0)},n.closeDropdown=function(){n.props.callbacks.handleReturn=void 0,n.props.callbacks.keyBindingFn=void 0,n.props.ariaProps.ariaHasPopup="false",n.props.ariaProps.ariaExpanded=!1,n.props.ariaProps.ariaActiveDescendantID=void 0,n.props.ariaProps.ariaOwneeID=void 0,n.props.onOpenChange(!1)},n.props.callbacks.onChange=n.onEditorStateChange,n}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,Vt(n,r);var o=i.prototype;return o.componentDidUpdate=function(){if(this.popover){var t=this.props.suggestions.length;if(t>0&&this.state.focusedOptionIndex>=t&&this.setState({focusedOptionIndex:t-1}),!this.props.store.getAllSearches().has(this.activeOffsetKey))return;for(var e=this.props.store.getPortalClientRect(this.activeOffsetKey),n=(this.props.positionSuggestions||ne)({decoratorRect:e,props:this.props,popover:this.popover}),r=0,i=Object.entries(n);r<i.length;r++){var o=i[r],s=o[0],a=o[1];this.popover.style[s]=a}}},o.componentWillUnmount=function(){this.props.callbacks.onChange=void 0},o.render=function(){var t=this;if(!this.props.open)return null;var n=this.props,r=n.entryComponent,i=n.popoverComponent,o=n.popperOptions,s=n.popoverContainer,a=void 0===s?ie:s;n.onOpenChange,n.onAddMention,n.onSearchChange,n.suggestions,n.ariaProps,n.callbacks;var u=n.theme,c=void 0===u?{}:u;n.store,n.entityMutability;var f=n.positionSuggestions;n.mentionTriggers,n.mentionPrefix;var h=Ut(n,se);return i||f?(oe("The properties `popoverComponent` and `positionSuggestions` are deprecated and will be removed in @draft-js-plugins/mentions 6.0 . Use `popperOptions` instead"),e().cloneElement(i||e().createElement("div",null),Lt({},h,{className:c.mentionSuggestions,role:"listbox",id:"mentions-list-"+this.key,ref:function(e){t.popover=e}}),this.props.suggestions.map((function(n,i){return e().createElement(Yt,{key:null!=n.id?n.id:n.name,onMentionSelect:t.onMentionSelect,onMentionFocus:t.onMentionFocus,isFocused:t.state.focusedOptionIndex===i,mention:n,index:i,id:"mention-option-"+t.key+"-"+i,theme:c,searchValue:t.lastSearchValue,entryComponent:r||te})})))):this.props.renderEmptyPopup||0!==this.props.suggestions.length?e().createElement(a,{store:this.props.store,popperOptions:o,theme:c},this.props.suggestions.map((function(n,i){return e().createElement(Yt,{key:null!=n.id?n.id:n.name,onMentionSelect:t.onMentionSelect,onMentionFocus:t.onMentionFocus,isFocused:t.state.focusedOptionIndex===i,mention:n,index:i,id:"mention-option-"+t.key+"-"+i,theme:c,searchValue:t.lastSearchValue,entryComponent:r||te})}))):null},i}(t.Component);ae.propTypes={open:s().bool.isRequired,onOpenChange:s().func.isRequired,entityMutability:s().oneOf(["SEGMENTED","IMMUTABLE","MUTABLE"]),entryComponent:s().func,onAddMention:s().func,suggestions:s().array.isRequired};var ue=ae,ce="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function fe(n){var r=(0,t.useRef)(),i=function(t){t.store.updatePortalClientRect(t.offsetKey,(function(){return r.current.getBoundingClientRect()}))};return ce((function(){return n.store.register(n.offsetKey),n.store.setIsOpened(!0),i(n),n.store.setEditorState(n.store.getEditorState()),function(){n.store.unregister(n.offsetKey),n.store.setIsOpened(!1),n.store.setReferenceElement(null)}}),[]),(0,t.useEffect)((function(){i(n)})),e().createElement("span",{ref:function(t){r.current=t,n.store.setReferenceElement(t)}},n.children)}var he={mention:"m6zwb4v",mentionSuggestions:"mnw6qvm",mentionSuggestionsPopup:"m1ymsnxd",mentionSuggestionsPopupVisible:"m126ak5t",mentionSuggestionsEntry:"mtiwdxc",mentionSuggestionsEntryFocused:"myz2dw1",mentionSuggestionsEntryText:"mpqdcgq",mentionSuggestionsEntryAvatar:"m1mfvffo"},pe=function(t){return function(e,n,r){e.findEntityRanges((function(e){var n=e.getEntity();return null!==n&&t.some((function(t){return r.getEntity(n).getType()===Gt(t)}))}),n)}},le=/\s/;function de(t,e){return 0===e||le.test(t[e-1])}var ve=n(6581),_e=/\n/g;function ye(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t.replace(_e,e)}function ge(t){return t.set("entity",null)}var me={stripEntities:!0};const we=window.lodash.debounce;var be=n.n(we);const Se=window.lodash.isEmpty;var Ee=n.n(Se);const Oe=window.lodash.filter;var Ie=n.n(Oe);const xe=window.lodash.includes;var ze=n.n(xe);const De=window.lodash.get;var Me=n.n(De);const ke=window.wp.a11y,Ce=window.yoast.styledComponents;var Re=n.n(Ce);const Ae=s().arrayOf(s().shape({name:s().string.isRequired,value:s().string.isRequired,label:s().string,description:s().string,hidden:s().bool})),qe=s().arrayOf(s().string);var Be=n(602),je=n.n(Be);const Pe=Re().span`
	color: rgb(15 23 42);
	background-color: rgb(226 232 240);
	padding: 0.125rem 0.5rem;
	margin: 0 0.125rem;
	border-radius: 17px;
  	font-size: .75rem;
  	font-weight: 500;
  	line-height: 1.25;
}
	&:hover {
      color: rgb(15 23 42);
	  background-color: rgb(226 232 240);
	  cursor: auto;
	}
`,Fe=({children:e,className:n})=>(0,t.createElement)(Pe,{className:je()("yst-replacevar__mention",n),spellCheck:!1},e);Fe.propTypes={children:s().node.isRequired,className:s().string.isRequired};const Ke=window.yoast.helpers,Te=/%%([A-Za-z0-9_]+)%%/g,Le="%mention",Ve="IMMUTABLE";function Ue(t,e,n){return t>=e&&t<=n}function We(t,e,{start:n=0,end:r=t.getText().length}={}){const i=t.getText().slice(n,r),o=[];return t.findEntityRanges((t=>!!t.getEntity()),((i,s)=>{if(Ue(i,n,r)&&Ue(s,n,r)){const r=e(t.getEntityAt(i));r.data.mention&&o.push({start:i-n,end:s-n,replacementText:(a=r.data.mention.replaceName,"%%"+a+"%%")})}var a})),function(t,e=[]){return[...e].reverse().forEach((e=>{const{start:n,end:r,replacementText:i}=e,o=t.slice(0,n),s=t.slice(r,t.length);t=o+i+s})),t}(i,o)}function Ne(t,e){let n=e;return t.forEach((t=>{t.name===e&&t.label&&(n=t.label)})),n}function He(t,e){const n=t.getCurrentContent().getBlockMap();let r=t;return n.forEach((t=>{const{text:n,key:i}=t;[...function(t){const e=[];let n;for(;n=Te.exec(t);){const[t,r]=n;e.push({name:r,start:n.index,length:t.length})}return e}(n)].reverse().forEach((t=>{t=function(t,e){return{...t,label:Ne(e,t.name)}}(t,e),t=function(t){return{...t,start:t.start,end:t.start+t.length,delta:t.label.length-t.length}}(t);let n=r.getSelection();n=function(t,e,n){const{start:r,end:i,delta:o}=n;if(t.hasEdgeWithin(e,r,i)){const e=i+o;t=t.merge({anchorOffset:e,focusOffset:e})}else t.focusOffset>i&&(t=t.merge({anchorOffset:t.anchorOffset+o,focusOffset:t.focusOffset+o}));return t}(n,i,t);const o=function(t,e,n,r){const i=t.getCurrentContent(),o=function(t,e){const n=e.getAnchorKey(),r=t.getCurrentContent().getBlockForKey(n),i=e.getStartOffset(),o=e.getEndOffset();return r.getText().slice(i,o)}(t,h.SelectionState.createEmpty(n).merge({anchorOffset:r.end,focusOffset:r.end+1}));if(!(0,Ke.getWordBoundaries)().includes(o)){const o=h.SelectionState.createEmpty(n).merge({anchorOffset:r.end,focusOffset:r.end}),s=h.Modifier.insertText(i,o," ");t=h.EditorState.push(t,s,"insert-characters"),e.getAnchorOffset()>=r.start&&(e=e.merge({anchorOffset:e.getAnchorOffset()+1,focusOffset:e.getFocusOffset()+1}))}return{editorState:t,selection:e}}(r,n,i,t);r=function(t,e,n){let r=t.getCurrentContent();const i=h.SelectionState.createEmpty(n).merge({anchorOffset:e.start,focusOffset:e.end});r=function(t,e){const n={mention:{replaceName:e.name}};return t.createEntity(Le,Ve,n)}(r,e);const o=h.Modifier.replaceText(r,i,e.label,null,r.getLastCreatedEntityKey());return h.EditorState.push(t,o,"apply-entity")}(o.editorState,t,i),r=h.EditorState.acceptSelection(r,o.selection)}))})),r}function Je(t,e){return He(h.EditorState.createWithContent(h.ContentState.createFromText(t)),e)}const $e=(t,e)=>{const n=t.charAt(e);return 0===n.length||/\s/.test(n)},Ye=(t,e)=>{const n=e.getAnchorKey();return t.getBlockForKey(n)},Xe=t=>{const e=t.getCurrentContent(),n=t.getSelection(),r=h.Modifier.removeRange(e,n,"backward");return h.EditorState.push(t,r,"remove-range")};function Ge(t,e,n){const r=t.getBlockForKey(e);let i=null;return r.findEntityRanges((t=>t.getEntity()===n),((t,e)=>{i={start:t,end:e}})),i}function Qe(t,e,n){const r=t.getBlockForKey(e).getEntityAt(n),i=Ge(t,e,r);return null===i||i.start===n?null:r}function Ze(t,e){const{start:n,end:r}=e;return t.getStartOffset()<=n&&t.getEndOffset()>=r}const tn=Re().div`
	div {
		z-index: 10995;
	}
	> div {
		max-height: 450px;
		overflow-y: auto;
	}
`,en=new RegExp("(?:\\p{RI}\\p{RI}|\\p{Emoji}(?:\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(?:\\u{200D}\\p{Emoji}(?:\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*)","gu");class nn extends e().Component{constructor(t){super(t);const{content:e,replacementVariables:n,recommendedReplacementVariables:r}=this.props,i=Je(e,n),o=this.determineCurrentReplacementVariables(n,r);this.state={editorState:i,searchValue:"",isSuggestionsOpen:!1,editorKey:this.props.fieldId,suggestions:this.mapReplacementVariablesToSuggestions(o)},this._serializedContent=e,this.initializeBinds(),this.initializeDraftJsPlugins()}initializeBinds(){this.onChange=this.onChange.bind(this),this.handleKeyCommand=this.handleKeyCommand.bind(this),this.onSearchChange=this.onSearchChange.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.handleCopyCutEvent=this.handleCopyCutEvent.bind(this),this.debouncedA11ySpeak=be()(ke.speak.bind(this),500),this.onSuggestionsOpenChange=this.onSuggestionsOpenChange.bind(this)}initializeDraftJsPlugins(){const t=function(t){void 0===t&&(t={});var n,r,i,o,s,a,u,c={keyBindingFn:void 0,handleKeyCommand:void 0,handleReturn:void 0,onChange:void 0},f={ariaHasPopup:"false",ariaExpanded:!1,ariaOwneeID:void 0,ariaActiveDescendantID:void 0},h=(0,p.Map)(),l=(0,p.Map)(),d=!1,v={getEditorState:void 0,setEditorState:void 0,getPortalClientRect:function(t){return l.get(t)()},getAllSearches:function(){return h},isEscaped:function(t){return n===t},escapeSearch:function(t){n=t},resetEscapedSearch:function(){n=void 0},register:function(t){h=h.set(t,t)},updatePortalClientRect:function(t,e){l=l.set(t,e)},unregister:function(t){h=h.delete(t),l=l.delete(t)},getIsOpened:function(){return d},setIsOpened:function(t){d=t},getReferenceElement:function(){return r},setReferenceElement:function(t){r=t}},_=t,y=_.mentionPrefix,g=void 0===y?"":y,m=_.theme,w=void 0===m?he:m,b=_.positionSuggestions,S=_.mentionComponent,E=_.mentionSuggestionsComponent,O=void 0===E?ue:E,I=_.entityMutability,x=void 0===I?"SEGMENTED":I,z=_.mentionTrigger,M=void 0===z?"@":z,k=_.mentionRegExp,C=void 0===k?"[\\w-À-ÖØ-öø-ÿĀ-ňŊ-ſА-я぀-ゟ゠-ヿ㄰-㆏가-힣一-龥؀-ۿÀ-ỹ]":k,R=_.supportWhitespace,A=void 0!==R&&R,q=_.popperOptions,B="string"==typeof M?[M]:M,j={ariaProps:f,callbacks:c,theme:w,store:v,entityMutability:x,positionSuggestions:b,mentionTriggers:B,mentionPrefix:g,popperOptions:q};return{MentionSuggestions:function(t){return e().createElement(O,Lt({},t,j))},decorators:[{strategy:pe(B),component:function(t){return e().createElement(Jt,Lt({},t,{theme:w,mentionComponent:S}))}},{strategy:(i=B,o=A,s=C,a="("+i.map((function(t){return D()(t)})).join("|")+")",u=o?new RegExp(a+"("+s+"|\\s)*","g"):new RegExp("(\\s|^)"+a+s+"*","g"),function(t,e){!function(t,e,n,r){var i=e.getText();e.findEntityRanges((function(t){return!t.getEntity()}),(function(e,o){var s=i.slice(e,o);n?function(t,e,n,r){for(var i,o,s=t.lastIndex;null!==(i=t.exec(e))&&t.lastIndex!==s;){s=t.lastIndex;var a=(o=n+i.index)+i[0].length;de(e,i.index)&&r(o,a)}}(t,s,e,r):function(t,e,n,r){for(var i,o,s=t.lastIndex;null!==(i=t.exec(e))&&t.lastIndex!==s;){s=t.lastIndex;var a=(o=n+i.index)+i[0].length;le.test(e[o])&&(o+=1),r(o,a)}}(t,s,e,r)}))}(u,t,o,e)}),component:function(t){return e().createElement(fe,Lt({},t,{store:v}))}}],getAccessibilityProps:function(){return{role:"combobox",ariaAutoComplete:"list",ariaHasPopup:f.ariaHasPopup,ariaExpanded:f.ariaExpanded,ariaActiveDescendantID:f.ariaActiveDescendantID,ariaOwneeID:f.ariaOwneeID}},initialize:function(t){var e=t.getEditorState,n=t.setEditorState;v.getEditorState=e,v.setEditorState=n},keyBindingFn:function(t){return c.keyBindingFn&&c.keyBindingFn(t)},handleReturn:function(t){return c.handleReturn&&c.handleReturn(t)},onChange:function(t){return c.onChange?c.onChange(t):t}}}({mentionTrigger:"%",entityMutability:"IMMUTABLE",mentionComponent:Fe}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object.assign({},me,t),{blockRenderMap:(0,ve.Map)({unstyled:{element:"div"}}),onChange:function(e){var n=e.getCurrentContent().getBlocksAsArray();if(n.length>1)e=function(t,e,n){e=e||t.getCurrentContent().getBlocksAsArray();var r=(0,ve.List)(),i=(0,ve.List)();e.forEach((function(t){"atomic"!==t.getType()&&(r=r.push(ye(t.getText())),i=i.concat(t.getCharacterList()))})),n.stripEntities&&(i=i.map(ge));var o=new h.ContentBlock({key:(0,h.genKey)(),text:r.join(""),type:"unstyled",characterList:i,depth:0}),s=h.ContentState.createFromBlockArray([o]);return t=h.EditorState.push(t,s,"remove-range"),h.EditorState.moveFocusToEnd(t)}(e,n,t);else{var r=n[0],i=r.getText(),o=r.getCharacterList(),s=t.stripEntities&&function(t){var e=!1;return t.forEach((function(t){null!==t.get("entity")&&(e=!0)})),e}(o);if(_e.test(i)||s){i=ye(i),t.stripEntities&&(o=o.map(ge)),r=new h.ContentBlock({key:(0,h.genKey)(),text:i,type:"unstyled",characterList:o,depth:0});var a=h.ContentState.createFromBlockArray([r]);e=h.EditorState.push(e,a,"insert-characters")}}return e},handleReturn:function(t){return"handled"}}}({stripEntities:!1});this.pluginList={mentionsPlugin:t,singleLinePlugin:{...n,handleReturn:()=>{}}},this.pluginList=(0,i.applyFilters)("yoast.replacementVariableEditor.pluginList",this.pluginList)}serializeContent(t){const e=function(t,e=" "){return t.getBlockMap().map((e=>We(e,(e=>t.getEntity(e))))).join(e)}(t.getCurrentContent());this._serializedContent!==e&&(this._serializedContent=e,this.props.onChange(this._serializedContent))}onChange(t){return new Promise((e=>{t=function(t,e){const n=t.getSelection(),r=e.getSelection(),i=t.getCurrentContent();if(n===r)return t;const o=function(t,e,n){const r=t.getStartOffset(),i=t.getStartKey(),o=t.getEndOffset(),s=t.getEndKey(),{startOffsetProperty:a,endOffsetProperty:u}=function(t){let e="anchorOffset",n="focusOffset";return t&&(e="focusOffset",n="anchorOffset"),{startOffsetProperty:e,endOffsetProperty:n}}(t.getIsBackward()),c=Qe(n,i,r);if(null!==c){const r=Ge(n,i,c),{start:o,end:s}=r;t=Ze(e,r)?t.merge({[a]:s}):t.merge({[a]:o})}const f=Qe(n,s,o);if(null!==f){const r=Ge(n,i,f),{start:o,end:s}=r;t=Ze(e,r)?t.merge({[u]:o}):t.merge({[u]:s})}return t}(n,r,i);return o!==n&&(t=h.EditorState.forceSelection(t,o)),t}(t=He(t,this.props.replacementVariables),this.state.editorState),this.setState({editorState:t},(()=>{this.serializeContent(t),e()}))}))}handleKeyCommand(t){if("backspace"!==t&&"delete"!==t)return"not-handled";let e=Xe(this.state.editorState);const n=e.getCurrentContent(),r=e.getSelection();if(!r.isCollapsed())return"not-handled";const i=r.getStartOffset();if(i<0)return"not-handled";const o=n.getBlockForKey(r.getStartKey()).getText(),s="backspace"===t?i-1:i+1;if((o.codePointAt(s)||0)<=127)return"not-handled";let a;return a="backspace"===t?this.getBackwardMatch(o,i):this.getForwardMatch(o,i),a?(e=((t,e,n)=>{const r=t.getSelection(),i=t.getCurrentContent(),o=r.getStartOffset(),s=i.getBlockForKey(r.getStartKey()),a=e[e.length-1].length,u="backspace"===n?o-a:o+a,c=new h.SelectionState({anchorOffset:u,anchorKey:s.getKey(),focusOffset:o,focusKey:s.getKey(),isBackward:"delete"===n,hasFocus:r.getHasFocus()});return h.EditorState.push(t,h.Modifier.replaceText(i,c,""),"remove-range")})(e,a,t),this.onChange(e).then((()=>this.focus())),"handled"):"not-handled"}getForwardMatch(t,e){let n=1;return[2,3,4,5,6,7,8,9,10,11,12,13,14].every((r=>{const i=t.slice(e,e+r);return!(null===i.match(en)||i.match(en).length>1||(n=r,0))})),t.slice(e,e+n).match(en)}getBackwardMatch(t,e){return t.slice(0,e).match(en)}mapReplacementVariablesToSuggestions(t){return t.map((t=>({...t,name:t.label,replaceName:t.name})))}suggestionsFilter(t,e){const n=t.toLowerCase();return e.filter((function(t){return!(t.hidden||n&&0!==t.name.toLowerCase().indexOf(n))}))}determineCurrentReplacementVariables(t,e,n=""){if(""===n&&!Ee()(e)){const n=Ie()(t,(t=>ze()(e,t.name)));if(0!==n.length)return n}return t}onSearchChange({value:t}){this.props.onSearchChange&&this.props.onSearchChange(t);const e=this.determineCurrentReplacementVariables(this.props.replacementVariables,this.props.recommendedReplacementVariables,t),n=this.mapReplacementVariablesToSuggestions(e);this.setState({searchValue:t,suggestions:this.suggestionsFilter(t,n)}),setTimeout((()=>{this.announceSearchResults()}))}onSuggestionsOpenChange(t){this.setState({isSuggestionsOpen:t})}announceSearchResults(){const{suggestions:t}=this.state;t.length?this.debouncedA11ySpeak((0,c.sprintf)((0,c._n)("%d result found, use up and down arrow keys to navigate","%d results found, use up and down arrow keys to navigate",t.length,"wordpress-seo"),t.length),"assertive"):this.debouncedA11ySpeak((0,c.__)("No results","wordpress-seo"),"assertive")}focus(){this.editor.focus()}setEditorRef(t){this.editor=t}setEditorFieldId(){Me()(this.editor,"editor.editor").id=this.props.fieldId}triggerReplacementVariableSuggestions(){let t=Xe(this.state.editorState);const e=t.getSelection(),n=t.getCurrentContent(),r=Ye(n,e).getText(),i=(o=e).getIsBackward()?o.getEndOffset():o.getStartOffset();var o;const s=!$e(r,i-1),a=!$e(r,i),u=((t,e)=>{let n="%";return t&&(n=" "+n),e&&(n+=" "),n})(s,a);t=((t,e)=>{const n=t.getCurrentContent(),r=t.getSelection();if(!r.isCollapsed())return t;const i=h.Modifier.insertText(n,r,e);return h.EditorState.push(t,i,"insert-characters")})(t,u),a&&(t=((t,e,n="")=>{const r=t.getCurrentContent(),i=t.getSelection();""===n&&(n=Ye(r,i).getKey());const o=h.SelectionState.createEmpty(n).merge({anchorOffset:e,focusOffset:e});return h.EditorState.acceptSelection(t,o)})(t,i+u.length-1)),this.onChange(t).then((()=>this.focus()))}componentDidUpdate(t,e){const{content:n,replacementVariables:r,recommendedReplacementVariables:i}=t,{searchValue:o}=this.state,s={},a=this.props,u=a.content!==this._serializedContent&&a.content!==n,c=a.replacementVariables!==r,f=a.replacementVariables.map((t=>t.name)).filter((t=>!r.map((t=>t.name)).includes(t))).some((t=>n.includes("%%"+t+"%%")));if(u&&(this._serializedContent=a.content,s.editorState=Je(a.content,a.replacementVariables)),!u&&c&&f&&(this._serializedContent=a.content,s.editorState=Je(a.content,a.replacementVariables)),c){const t=this.determineCurrentReplacementVariables(a.replacementVariables,i,o);s.suggestions=this.suggestionsFilter(o,this.mapReplacementVariablesToSuggestions(t))}(c||u)&&this.setState({...e,...s})}handleCopyCutEvent(t){const{editorState:e}=this.state,n=e.getSelection();if(n.getHasFocus())try{const r=t.clipboardData,i=function(t,e,n=" "){const r=e.getStartKey(),i=e.getEndKey(),o=t.getBlockMap();let s=!1;return o.skipUntil((function(t){return t.getKey()===r})).takeUntil((function(t){const e=s;return t.getKey()===i&&(s=!0),e})).map((function(n){const o=n.getKey(),s={};return o===r&&(s.start=e.getStartOffset()),o===i&&(s.end=e.getEndOffset()),We(n,(e=>t.getEntity(e)),s)})).join(n)}(e.getCurrentContent(),n);r.setData("text/plain",i),t.preventDefault()}catch(t){console.error("Couldn't copy content of editor to clipboard, defaulting to browser copy behavior."),console.error("Original error: ",t)}}componentDidMount(){document.addEventListener("copy",this.handleCopyCutEvent),document.addEventListener("cut",this.handleCopyCutEvent),this.setEditorFieldId()}componentWillUnmount(){this.debouncedA11ySpeak.cancel(),document.removeEventListener("copy",this.handleCopyCutEvent),document.removeEventListener("cut",this.handleCopyCutEvent)}render(){const{MentionSuggestions:n}=this.pluginList.mentionsPlugin,{onFocus:r,onBlur:o,ariaLabelledBy:s,placeholder:a,theme:u,isDisabled:c,fieldId:f}=this.props,{editorState:h,suggestions:p,isSuggestionsOpen:l}=this.state;return(0,t.createElement)(e().Fragment,null,(0,t.createElement)(O,{key:this.state.editorKey,textDirectionality:u.isRtl?"RTL":"LTR",editorState:h,handleKeyCommand:this.handleKeyCommand,onChange:this.onChange,onFocus:r,onBlur:o,plugins:Object.values(this.pluginList),ref:this.setEditorRef,stripPastedStyles:!0,ariaLabelledBy:s,placeholder:a,spellCheck:!0,readOnly:c}),(0,i.applyFilters)("yoast.replacementVariableEditor.additionalPlugins",(0,t.createElement)(e().Fragment,null),this.pluginList,f),(0,t.createElement)(tn,null,(0,t.createElement)(n,{onSearchChange:this.onSearchChange,suggestions:p,onOpenChange:this.onSuggestionsOpenChange,open:l})))}}nn.propTypes={content:s().string.isRequired,replacementVariables:Ae.isRequired,recommendedReplacementVariables:qe,ariaLabelledBy:s().string.isRequired,onSearchChange:s().func,onChange:s().func.isRequired,onFocus:s().func,onBlur:s().func,theme:s().object,placeholder:s().string,fieldId:s().string.isRequired,isDisabled:s().bool},nn.defaultProps={onSearchChange:null,onFocus:()=>{},onBlur:()=>{},placeholder:"",theme:{isRtl:!1},recommendedReplacementVariables:[],isDisabled:!1};const rn=(0,Ce.withTheme)(nn),on=window.yoast.styleGuide,sn=window.yoast.componentsNew,an="#707070",un=Re()(sn.VariableEditorInputContainer)`
	.public-DraftStyleDefault-block {
		line-height: 1.85714285; // 26px based on 14px font-size
	}

	.public-DraftEditorPlaceholder-root {
		color: ${an};
		line-height: 1.85714285; // 26px based on 14px font-size
	}

	.public-DraftEditorPlaceholder-hasFocus {
		color: ${an};
	}
`,cn=Re()(sn.VariableEditorInputContainer)`
	min-height: 72px;
	padding: 4px 5px;
	line-height: 1.85714285; // 26px based on 14px font-size

	.public-DraftEditorPlaceholder-root {
		color: ${an};
		position: absolute;
		line-height: 1.85714285; // 26px based on 14px font-size
	}

	.public-DraftEditorPlaceholder-hasFocus {
		color: ${an};
		position: absolute;
	}
`,fn=Re().div`
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 16px 0 0 0;
`,hn=Re()(sn.Button)`
	color: #303030;
	box-sizing: border-box;
	border-radius: 4px;
	box-shadow: inset 0 -2px 0 0 rgba(0,0,0,0.1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	padding: 4px;
	border: 1px solid #dbdbdb;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	margin-bottom: 5px;
	max-width: 200px;
	padding: 0 0.5em;
`,pn=Re()(hn)`
	font-size: 13px;
	margin-bottom: 0; /* Override StandardButton margin instead of changing that. */
	& svg {
		${(0,Ke.getDirectionalStyle)("margin-right","margin-left")}: 7px;
		fill: ${on.colors.$color_grey_dark};
	}
`,ln=Re().div`
	display: inline-flex;
	gap: 0.5em;
	margin-inline-start: auto;
	margin-bottom: 5px;
`;class dn extends e().Component{constructor(t){super(t),this.uniqueId=u()("replacement-variable-editor-field-"),"description"===t.type?this.InputContainer=cn:this.InputContainer=un,t.withCaret&&(this.InputContainer=(0,on.withCaretStyles)(this.InputContainer)),this.triggerReplacementVariableSuggestions=this.triggerReplacementVariableSuggestions.bind(this)}triggerReplacementVariableSuggestions(){this.ref.triggerReplacementVariableSuggestions()}render(){const{label:e,onChange:n,content:r,onFocus:o,onBlur:s,isActive:a,isHovered:u,onSearchChange:h,replacementVariables:p,recommendedReplacementVariables:l,editorRef:d,placeholder:v,fieldId:_,onMouseEnter:y,onMouseLeave:g,hasNewBadge:m,isDisabled:w,hasPremiumBadge:b,type:S}=this.props,E=this.InputContainer,O=(0,i.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:_,type:S});return(0,t.createElement)(fn,{className:["yst-replacevar",w&&"yst-replacevar--disabled"].filter(Boolean).join(" "),onMouseEnter:y,onMouseLeave:g},(0,t.createElement)(sn.SimulatedLabel,{className:"yst-replacevar__label",id:this.uniqueId,onClick:o},e),b&&(0,t.createElement)(sn.PremiumBadge,{inLabel:!0}),m&&(0,t.createElement)(sn.NewBadge,{inLabel:!0}),(0,t.createElement)(ln,{className:"yst-replacevar__buttons"},(0,t.createElement)(f.Slot,{name:`yoast.replacementVariableEditor.additionalButtons.${_}`}),O.map(((e,n)=>(0,t.createElement)(t.Fragment,{key:`additional-button-${n}-${_}`},e))),(0,t.createElement)(f.Slot,{key:`PluginComponent-${_}`,name:`PluginComponent-${_}`}),(0,t.createElement)(pn,{className:"yst-replacevar__button-insert",onClick:this.triggerReplacementVariableSuggestions,disabled:w},(0,c.__)("Insert variable","wordpress-seo"))),(0,t.createElement)(E,{className:"yst-replacevar__editor",onClick:o,isActive:a&&!w,isHovered:u},(0,t.createElement)(rn,{fieldId:_,placeholder:v,content:r,onChange:n,onFocus:o,onBlur:s,onSearchChange:h,replacementVariables:p,recommendedReplacementVariables:l,ref:t=>{this.ref=t,d(t)},ariaLabelledBy:this.uniqueId,isDisabled:w})))}}dn.propTypes={editorRef:s().func,content:s().string.isRequired,onChange:s().func.isRequired,onBlur:s().func,onSearchChange:s().func,replacementVariables:Ae,recommendedReplacementVariables:qe,isActive:s().bool,isHovered:s().bool,withCaret:s().bool,onFocus:s().func,label:s().string,placeholder:s().string,type:s().oneOf(["title","description"]).isRequired,fieldId:s().string,onMouseEnter:s().func,onMouseLeave:s().func,hasNewBadge:s().bool,isDisabled:s().bool,hasPremiumBadge:s().bool},dn.defaultProps={onFocus:()=>{},onBlur:()=>{},onSearchChange:null,replacementVariables:[],recommendedReplacementVariables:[],fieldId:"",placeholder:"",label:"",withCaret:!1,isHovered:!1,isActive:!1,editorRef:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1};const vn=dn,yn=Re().section`
	padding: ${t=>t.padding?t.padding:"0 20px"};
`;class gn extends e().Component{constructor(t){super(t),this.elements={title:null,description:null},this.setRef=this.setRef.bind(this),this.setTitleRef=this.setTitleRef.bind(this),this.setDescriptionRef=this.setDescriptionRef.bind(this),this.triggerReplacementVariableSuggestions=this.triggerReplacementVariableSuggestions.bind(this),this.onFocusTitle=this.onFocusTitle.bind(this),this.onChangeTitle=this.onChangeTitle.bind(this),this.onFocusDescription=this.onFocusDescription.bind(this),this.onChangeDescription=this.onChangeDescription.bind(this)}setRef(t,e){this.elements[t]=e}setTitleRef(t){this.setRef("title",t)}setDescriptionRef(t){this.setRef("description",t)}componentDidUpdate(t){this.focusOnActiveFieldChange(t.activeField)}focusOnActiveFieldChange(t){const{activeField:e}=this.props;e&&e!==t&&this.elements[e].focus()}triggerReplacementVariableSuggestions(t){this.elements[t].triggerReplacementVariableSuggestions()}onFocusTitle(){this.props.onFocus("title")}onChangeTitle(t){this.props.onChange("title",t)}onFocusDescription(){this.props.onFocus("description")}onChangeDescription(t){this.props.onChange("description",t)}render(){const{descriptionEditorFieldPlaceholder:e,activeField:n,hoveredField:r,replacementVariables:i,recommendedReplacementVariables:o,onBlur:s,data:{title:a,description:u},containerPadding:f,fieldIds:h,labels:p,hasNewBadge:l,isDisabled:d,hasPremiumBadge:v}=this.props;return(0,t.createElement)(yn,{padding:f},(0,t.createElement)(vn,{type:"title",label:p.title||(0,c.__)("SEO title","wordpress-seo"),onFocus:this.onFocusTitle,onBlur:s,isActive:"title"===n,isHovered:"title"===r,editorRef:this.setTitleRef,replacementVariables:i,recommendedReplacementVariables:o,content:a,onChange:this.onChangeTitle,fieldId:h.title,hasNewBadge:l,isDisabled:d,hasPremiumBadge:v}),(0,t.createElement)(vn,{type:"description",placeholder:e,label:p.description||(0,c.__)("Meta description","wordpress-seo"),onFocus:this.onFocusDescription,onBlur:s,isActive:"description"===n,isHovered:"description"===r,editorRef:this.setDescriptionRef,replacementVariables:i,recommendedReplacementVariables:o,content:u,onChange:this.onChangeDescription,fieldId:h.description,hasNewBadge:l,isDisabled:d,hasPremiumBadge:v}))}}gn.propTypes={replacementVariables:Ae,recommendedReplacementVariables:qe,onChange:s().func.isRequired,onFocus:s().func,onBlur:s().func,data:s().shape({title:s().string,description:s().string}).isRequired,activeField:s().oneOf(["title","description"]),hoveredField:s().oneOf(["title","description"]),descriptionEditorFieldPlaceholder:s().string,containerPadding:s().string,fieldIds:s().shape({title:s().string.isRequired,description:s().string.isRequired}).isRequired,labels:s().shape({title:s().string,description:s().string}),hasNewBadge:s().bool,isDisabled:s().bool,hasPremiumBadge:s().bool},gn.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],onFocus:()=>{},onBlur:()=>{},containerPadding:"0 20px",descriptionEditorFieldPlaceholder:null,labels:{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1,activeField:"",hoveredField:""};const mn=gn;class wn extends e().Component{constructor(t){super(t),this.state={activeField:null,hoveredField:null},this.setFieldFocus=this.setFieldFocus.bind(this),this.handleChange=this.handleChange.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this)}handleChange(t,e){this.props.onChange(t,e)}setFieldFocus(t){this.setState({activeField:t})}onBlur(){this.setState({activeField:null})}onClick(t){this.setFieldFocus(t)}render(){const{data:e,replacementVariables:n,recommendedReplacementVariables:r,descriptionEditorFieldPlaceholder:i,hasPaperStyle:o,fieldIds:s,labels:a,hasNewBadge:u,isDisabled:c,hasPremiumBadge:f}=this.props,{activeField:h,hoveredField:p}=this.state;return(0,t.createElement)(sn.ErrorBoundary,null,(0,t.createElement)(mn,{descriptionEditorFieldPlaceholder:i,data:e,activeField:h,hoveredField:p,onChange:this.handleChange,onFocus:this.setFieldFocus,onBlur:this.onBlur,replacementVariables:n,recommendedReplacementVariables:r,containerPadding:o?"0 20px":"0",fieldIds:s,labels:a,hasNewBadge:u,isDisabled:c,hasPremiumBadge:f}))}}wn.propTypes={replacementVariables:Ae,recommendedReplacementVariables:qe,data:s().shape({title:s().string.isRequired,description:s().string.isRequired}).isRequired,onChange:s().func.isRequired,descriptionEditorFieldPlaceholder:s().string,hasPaperStyle:s().bool,fieldIds:s().shape({title:s().string.isRequired,description:s().string.isRequired}).isRequired,labels:s().shape({title:s().string,description:s().string}),hasNewBadge:s().bool,isDisabled:s().bool,hasPremiumBadge:s().bool},wn.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],hasPaperStyle:!0,descriptionEditorFieldPlaceholder:null,labels:{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1};const bn=wn})(),(window.yoast=window.yoast||{}).replacementVariableEditor=r})();