window.yoast=window.yoast||{},window.yoast.replacementVariableEditor=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=400)}({0:function(t,e){t.exports=window.yoast.propTypes},1:function(t,e){t.exports=window.wp.element},10:function(t,e){t.exports=window.yoast.helpers},108:function(t,e){t.exports=window.wp.components},109:function(t,e){t.exports=window.lodash.escapeRegExp},12:function(t,e){t.exports=window.yoast.draftJs},14:function(t,e,n){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:V(t)}function r(t){return a(t)?t:U(t)}function i(t){return u(t)?t:W(t)}function o(t){return s(t)&&!c(t)?t:N(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={},_={value:!1},y={value:!1};function g(t){return t.value=!1,t}function m(t){t&&(t.value=!0)}function b(){}function w(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?S(t)+e:e}function O(){return!0}function x(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function I(t,e){return M(t,e,0)}function z(t,e){return M(t,e,e)}function M(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var D,k,C,R="function"==typeof Symbol&&Symbol.iterator,A=R||"@@iterator";function q(t){this.next=t}function j(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 B(){return{value:void 0,done:!0}}function P(t){return!!T(t)}function F(t){return t&&"function"==typeof t.next}function K(t){var e=T(t);return e&&e.call(t)}function T(t){var e=t&&(R&&t[R]||t["@@iterator"]);if("function"==typeof e)return e}function L(t){return t&&"number"==typeof t.length}function V(t){return null==t?Q():s(t)?t.toSeq():function(t){var e=tt(t)||"object"==typeof t&&new J(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function U(t){return null==t?Q().toKeyedSeq():s(t)?a(t)?t.toSeq():t.fromEntrySeq():G(t)}function W(t){return null==t?Q():s(t)?a(t)?t.entrySeq():t.toIndexedSeq():Z(t)}function N(t){return(null==t?Q():s(t)?a(t)?t.entrySeq():t:Z(t)).toSetSeq()}function H(t){this._array=t,this.size=t.length}function J(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function $(t){this._iterable=t,this.size=t.length||t.size}function Y(t){this._iterator=t,this._iteratorCache=[]}function X(t){return!(!t||!t["@@__IMMUTABLE_SEQ__@@"])}function Q(){return D||(D=new H([]))}function G(t){var e=Array.isArray(t)?new H(t).fromEntrySeq():F(t)?new Y(t).fromEntrySeq():P(t)?new $(t).fromEntrySeq():"object"==typeof t?new J(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function Z(t){var e=tt(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function tt(t){return L(t)?new H(t):F(t)?new Y(t):P(t)?new $(t):void 0}function et(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 nt(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,s=0;return new q((function(){var t=i[n?o-s:s];return s++>o?{value:void 0,done:!0}:j(e,r?t[0]:s-1,t[1])}))}return t.__iteratorUncached(e,n)}function rt(t,e){return e?function t(e,n,r,i){return Array.isArray(n)?e.call(i,r,W(n).map((function(r,i){return t(e,r,i,n)}))):ot(n)?e.call(i,r,U(n).map((function(r,i){return t(e,r,i,n)}))):n}(e,t,"",{"":t}):it(t)}function it(t){return Array.isArray(t)?W(t).map(it).toList():ot(t)?U(t).map(it).toMap():t}function ot(t){return t&&(t.constructor===Object||void 0===t.constructor)}function st(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 at(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&&st(i[1],t)&&(n||st(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?!st(e,t.get(r,v)):!st(t.get(r,v),e))return h=!1,!1}));return h&&t.size===p}function ut(t,e){if(!(this instanceof ut))return new ut(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(k)return k;k=this}}function ct(t,e){if(!t)throw new Error(e)}function ft(t,e,n){if(!(this instanceof ft))return new ft(t,e,n);if(ct(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),er?{value:void 0,done:!0}:j(t,i,n[e?r-i++:i++])}))},e(J,U),J.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},J.prototype.has=function(t){return this._object.hasOwnProperty(t)},J.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},J.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new q((function(){var s=r[e?i-o:o];return o++>i?{value:void 0,done:!0}:j(t,s,n[s])}))},J.prototype[d]=!0,e($,W),$.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=K(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},$.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=K(this._iterable);if(!F(n))return new q(B);var r=0;return new q((function(){var e=n.next();return e.done?e:j(t,r++,e.value)}))},e(Y,W),Y.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=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return j(t,i,r[i++])}))},e(ut,W),ut.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ut.prototype.get=function(t,e){return this.has(t)?this._value:e},ut.prototype.includes=function(t){return st(this._value,t)},ut.prototype.slice=function(t,e){var n=this.size;return x(t,e,n)?this:new ut(this._value,z(e,n)-I(t,n))},ut.prototype.reverse=function(){return this},ut.prototype.indexOf=function(t){return st(this._value,t)?0:-1},ut.prototype.lastIndexOf=function(t){return st(this._value,t)?this.size:-1},ut.prototype.__iterate=function(t,e){for(var n=0;n1?" by "+this._step:"")+" ]"},ft.prototype.get=function(t,e){return this.has(t)?this._start+E(this,t)*this._step:e},ft.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=0&&nn?{value:void 0,done:!0}:j(t,o++,s)}))},ft.prototype.equals=function(t){return t instanceof ft?this._start===t._start&&this._end===t._end&&this._step===t._step:at(this,t)},e(ht,n),e(pt,ht),e(lt,ht),e(dt,ht),ht.Keyed=pt,ht.Indexed=lt,ht.Set=dt;var vt="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 _t(t){return t>>>1&1073741824|3221225471&t}function yt(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 _t(n)}if("string"===e)return t.length>xt?function(t){var e=Mt[t];return void 0===e&&(e=gt(t),zt===It&&(zt=0,Mt={}),zt++,Mt[t]=e),e}(t):gt(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(St&&void 0!==(e=mt.get(t)))return e;if(void 0!==(e=t[Ot]))return e;if(!wt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ot]))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=++Et,1073741824&Et&&(Et=0),St)mt.set(t,e);else{if(void 0!==bt&&!1===bt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(wt)Object.defineProperty(t,Ot,{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[Ot]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Ot]=e}}return e}(t);if("function"==typeof t.toString)return gt(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function gt(t){for(var e=0,n=0;n>>n),a=31&(0===n?r:r>>>n);return new Bt(e,1<>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function te(t,e,n,r){var i=r?t:w(t);return i[e]=n,i}qt[At]=!0,qt.delete=qt.remove,qt.removeIn=qt.deleteIn,jt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o=ee)return function(t,e,n,r){t||(t=new b);for(var i=new Kt(t,yt(n),[n,r]),o=0;o>>t)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Zt(o&i-1)].get(t+5,e,n,r)},Bt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=yt(r));var a=31&(0===e?n:n>>>e),u=1<=ne)return function(t,e,n,r,i){for(var o=0,s=new Array(32),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[o++]:void 0;return s[r]=i,new Pt(t,o+1,s)}(t,p,c,a,d);if(f&&!d&&2===p.length&&Jt(p[1^h]))return p[1^h];if(f&&d&&1===p.length&&Jt(d))return d;var _=t&&t===this.ownerID,y=f?d?c:c^u:c|u,g=f?d?te(p,h,d,_):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>>t),o=this.nodes[i];return o?o.get(t+5,e,n,r):r},Pt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=yt(r));var a=31&(0===e?n:n>>>e),u=i===v,c=this.nodes,f=c[a];if(u&&!f)return this;var h=Ht(f,t,e+5,n,r,i,o,s);if(h===f)return this;var p=this.count;if(f){if(!h&&--p0&&r<32?le(0,r,5,null,new ue(n.toArray())):e.withMutations((function(t){t.setSize(r),n.forEach((function(e,n){return t.set(n,e)}))})))}function oe(t){return!(!t||!t[se])}e(ie,lt),ie.of=function(){return this(arguments)},ie.prototype.toString=function(){return this.__toString("List [","]")},ie.prototype.get=function(t,e){if((t=E(this,t))>=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?ge(t,e).set(0,n):ge(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o=g(y);return e>=be(t._capacity)?r=ve(r,t.__ownerID,0,e,n,o):i=ve(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):le(t._origin,t._capacity,t._level,i,r):t}(this,t,e)},ie.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},ie.prototype.insert=function(t,e){return this.splice(t,0,e)},ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):de()},ie.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){ge(n,0,e+t.length);for(var r=0;r>>e&31;if(r>=this.array.length)return new ue([],t);var i,o=0===r;if(e>0){var s=this.array[r];if((i=s&&s.removeBefore(t,e-5,n))===s&&o)return this}if(o&&!i)return this;var a=_e(this,t);if(!o)for(var u=0;u>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-5,n))===o&&i===this.array.length-1)return this}var s=_e(this,t);return s.array.splice(i+1),r&&(s.array[i]=r),s};var ce,fe,he={};function pe(t,e){var n=t._origin,r=t._capacity,i=be(r),o=t._tail;return function t(s,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>32&&(c=32),function(){if(u===c)return he;var t=e?--c:u++;return a&&a[t]}}(s,u):function(i,o,s){var a,u=i&&i.array,c=s>n?0:n-s>>o,f=1+(r-s>>o);return f>32&&(f=32),function(){for(;;){if(a){var n=a();if(n!==he)return n;a=null}if(c===f)return he;var r=e?--f:c++;a=t(u&&u[r],o-5,s+(r<>>n&31,u=t&&a0){var c=t&&t.array[a],f=ve(c,e,n-5,r,i,o);return f===c?t:((s=_e(t,e)).array[a]=f,s)}return u&&t.array[a]===i?t:(m(o),s=_e(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function _e(t,e){return e&&t&&e===t.ownerID?t:new ue(t?t.array.slice():[],e)}function ye(t,e){if(e>=be(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&31],r-=5;return n}}function ge(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new b,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 ue(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=5);f&&(s+=f,i+=f,a+=f,o+=f);for(var h=be(o),p=be(a);p>=1<h?new ue([],r):l;if(l&&p>h&&s5;_-=5){var y=h>>>_&31;v=v.array[y]=_e(v.array[y],r)}v.array[h>>>5&31]=l}if(a=p)s-=p,a-=p,u=5,c=null,d=d&&d.removeBefore(r,0,s);else if(s>i||p>>u&31;if(g!==p>>>u&31)break;g&&(f+=(1<i&&(c=c.removeBefore(r,u,s-f)),c&&po&&(o=c.size),s(u)||(c=c.map((function(t){return rt(t)}))),r.push(c)}return o>t.size&&(t=t.setSize(o)),Gt(t,e,r)}function be(t){return t<32?0:t-1>>>5<<5}function we(t){return null==t?Oe():Se(t)?t:Oe().withMutations((function(e){var n=r(t);Dt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Se(t){return Ct(t)&&f(t)}function Ee(t,e,n,r){var i=Object.create(we.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function Oe(){return fe||(fe=Ee(Wt(),de()))}function xe(t,e,n){var r,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(n===v){if(!u)return t;s.size>=32&&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):Ee(r,i)}function Ie(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ze(t){this._iter=t,this.size=t.size}function Me(t){this._iter=t,this.size=t.size}function De(t){this._iter=t,this.size=t.size}function ke(t){var e=He(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=Je,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(2===e){var r=t.__iterator(e,n);return new q((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(1===e?0:1,n)},e}function Ce(t,e,n){var r=He(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,v);return o===v?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(2,i);return new q((function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return j(r,a,e.call(n,s[1],a,t),i)}))},r}function Re(t,e){var n=He(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ke(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=Je,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 Ae(t,e,n,r){var i=He(t);return r&&(i.has=function(r){var i=t.get(r,v);return i!==v&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,v);return o!==v&&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(2,o),a=0;return new q((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 j(i,r?c:a++,f,o)}}))},i}function qe(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n|=0),x(e,n,i))return t;var o=I(e,i),s=z(n,i);if(o!=o||s!=s)return qe(t.toSeq().cacheResult(),e,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var c=He(t);return c.size=0===a?a:t.size&&a||void 0,!r&&X(t)&&a>=0&&(c.get=function(e,n){return(e=E(this,e))>=0&&ea)return{value:void 0,done:!0};var t=i.next();return r||1===e?t:j(e,u-1,0===e?void 0:t.value[1],t)}))},c}function je(t,e,n,r){var i=He(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(2,o),u=!0,c=0;return new q((function(){var t,o,f;do{if((t=a.next()).done)return r||1===i?t:j(i,c++,0===i?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 2===i?t:j(i,o,f,t)}))},i}function Be(t,e){var n=a(t),i=[t].concat(e).map((function(t){return s(t)?n&&(t=r(t)):t=n?G(t):Z(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 H(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}function Pe(t,e,n){var r=He(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||c0}function Le(t,e,r){var i=He(t);return i.size=new H(r).map((function(t){return t.size})).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,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),K(i?t.reverse():t)})),s=0,a=!1;return new q((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}:j(t,s++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Ve(t,e){return X(t)?e:t.constructor(e)}function Ue(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function We(t){return Dt(t.size),S(t)}function Ne(t){return a(t)?r:u(t)?i:o}function He(t){return Object.create((a(t)?U:u(t)?W:N).prototype)}function Je(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function $e(t,e){return t>e?1:t=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):Sn(t,e)},yn.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;Dt(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):Sn(e,n)},yn.prototype.pop=function(){return this.slice(1)},yn.prototype.unshift=function(){return this.push.apply(this,arguments)},yn.prototype.unshiftAll=function(t){return this.pushAll(t)},yn.prototype.shift=function(){return this.pop.apply(this,arguments)},yn.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):En()},yn.prototype.slice=function(t,e){if(x(t,e,this.size))return this;var n=I(t,this.size);if(z(e,this.size)!==this.size)return lt.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):Sn(r,i)},yn.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Sn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},yn.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},yn.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new q((function(){if(r){var e=r.value;return r=r.next,j(t,n++,e)}return{value:void 0,done:!0}}))},yn.isStack=gn;var mn,bn="@@__IMMUTABLE_STACK__@@",wn=yn.prototype;function Sn(t,e,n,r){var i=Object.create(wn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function En(){return mn||(mn=Sn(0))}function On(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}wn[bn]=!0,wn.withMutations=qt.withMutations,wn.asMutable=qt.asMutable,wn.asImmutable=qt.asImmutable,wn.wasAltered=qt.wasAltered,n.Iterator=q,On(n,{toArray:function(){Dt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,n){t[n]=e})),t},toIndexedSeq:function(){return new ze(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 Ie(this,!0)},toMap:function(){return kt(this.toKeyedSeq())},toObject:function(){Dt(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t},toOrderedMap:function(){return we(this.toKeyedSeq())},toOrderedSet:function(){return fn(a(this)?this.valueSeq():this)},toSet:function(){return en(a(this)?this.valueSeq():this)},toSetSeq:function(){return new Me(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return yn(a(this)?this.valueSeq():this)},toList:function(){return ie(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(){var e=t.call(arguments,0);return Ve(this,Be(this,e))},includes:function(t){return this.some((function(e){return st(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){Dt(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 Ve(this,Ae(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 Dt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Dt(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(0)},map:function(t,e){return Ve(this,Ce(this,t,e))},reduce:function(t,e,n){var r,i;return Dt(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 Ve(this,Re(this,!0))},slice:function(t,e){return Ve(this,qe(this,t,e,!0))},some:function(t,e){return!this.every(Dn(t),e)},sort:function(t){return Ve(this,Fe(this,t))},values:function(){return this.__iterator(1)},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 S(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=kt().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 at(this,t)},entrySeq:function(){var t=this;if(t._cache)return new H(t._cache);var e=t.toSeq().map(Mn).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Dn(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(O)},flatMap:function(t,e){return Ve(this,function(t,e,n){var r=Ne(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 Ve(this,Pe(this,t,!0))},fromEntrySeq:function(){return new De(this)},get:function(t,e){return this.find((function(e,n){return st(n,t)}),void 0,e)},getIn:function(t,e){for(var n,r=this,i=Ye(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,v):v)===v)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=a(t),i=(f(t)?we():kt()).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=Ne(t);return i.map((function(e){return Ve(t,o(e))}))}(this,t,e)},has:function(t){return this.get(t,v)!==v},hasIn:function(t){return this.getIn(t,v)!==v},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(zn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Ke(this,t)},maxBy:function(t,e){return Ke(this,e,t)},min:function(t){return Ke(this,t?kn(t):An)},minBy:function(t,e){return Ke(this,e?kn(e):An,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Ve(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Ve(this,je(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Dn(t),e)},sortBy:function(t,e){return Ve(this,Fe(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Ve(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Ve(this,function(t,e,n){var r=He(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(2,i),a=!0;return new q((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)?2===r?t:j(r,u,c,t):(a=!1,{value:void 0,done:!0})}))},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Dn(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=vt(e,3432918353),e=vt(e<<15|e>>>-15,461845907),e=vt(e<<13|e>>>-13,5),e=vt((e=(e+3864292196|0)^t)^e>>>16,2246822507),_t((e=vt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+qn(yt(t),yt(e))|0}:function(t,e){r=r+qn(yt(t),yt(e))|0}:e?function(t){r=31*r+yt(t)|0}:function(t){r=r+yt(t)|0}),r)}(this))}});var xn=n.prototype;xn[h]=!0,xn[A]=xn.values,xn.__toJS=xn.toArray,xn.__toStringMapper=Cn,xn.inspect=xn.toSource=function(){return this.toString()},xn.chain=xn.flatMap,xn.contains=xn.includes,function(){try{Object.defineProperty(xn,"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){}}(),On(r,{flip:function(){return Ve(this,ke(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 st(e,t)}))},lastKeyOf:function(t){return this.findLastKey((function(e){return st(e,t)}))},mapEntries:function(t,e){var n=this,r=0;return Ve(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Ve(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var In=r.prototype;function zn(t,e){return e}function Mn(t,e){return[e,t]}function Dn(t){return function(){return!t.apply(this,arguments)}}function kn(t){return function(){return-t.apply(this,arguments)}}function Cn(t){return"string"==typeof t?JSON.stringify(t):t}function Rn(){return w(arguments)}function An(t,e){return te?-1:0}function qn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return In[p]=!0,In[A]=xn.entries,In.__toJS=xn.toObject,In.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Cn(t)},On(i,{toKeyedSeq:function(){return new Ie(this,!1)},filter:function(t,e){return Ve(this,Ae(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 Ve(this,Re(this,!1))},slice:function(t,e){return Ve(this,qe(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=I(t,t<0?this.count():this.size);var r=this.slice(0,t);return Ve(this,1===n?r:r.concat(w(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 Ve(this,Pe(this,t,!1))},get:function(t,e){return(t=E(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=E(this,t))>=0&&(void 0!==this.size?this.size===1/0||t=0||(i[n]=t[n]);return i}function g(t){var e=t.getCurrentContent().getBlockMap(),n=e.last().getKey(),r=e.last().getLength(),i=new l.SelectionState({anchorKey:n,anchorOffset:r,focusKey:n,focusOffset:r});return l.EditorState.acceptSelection(t,i)}var m=function(){function t(t){this.decorators=void 0,this.decorators=v.a.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+"-"+t)}))})),v.a.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("-"),n=Number(e[0]);return this.decorators.get(n)},t.getInnerKey=function(t){return t.split("-").slice(1).join("-")},t}(),b=function(t){return"function"==typeof t.getDecorations&&"function"==typeof t.getComponentForKey&&"function"==typeof t.getPropsForKey};function w(t){return Object(l.getDefaultKeyBinding)(t)}function S(t,e,n,r){var i,o=r.setEditorState;switch(t){case"backspace":case"backspace-word":case"backspace-to-start-of-line":i=l.RichUtils.onBackspace(e);break;case"delete":case"delete-word":case"delete-to-end-of-block":i=l.RichUtils.onDelete(e);break;default:return"not-handled"}return null!=i?(o(i),"handled"):"not-handled"}var E=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},O=function(t){var e,n;function r(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 _({},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;o0&&(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 F(t){var e=k(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function K(t){return t?(t.nodeName||"").toLowerCase():null}function T(t){return((C(t)?t.ownerDocument:t.document)||window.document).documentElement}function L(t){return P(T(t)).left+F(t).scrollLeft}function V(t){return k(t).getComputedStyle(t)}function U(t){var e=V(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function W(t,e,n){void 0===n&&(n=!1);var r,i,o=R(e),s=R(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=T(e),u=P(t,s),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!n)&&(("body"!==K(e)||U(a))&&(c=(r=e)!==k(r)&&R(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:F(r)),R(e)?((f=P(e,!0)).x+=e.clientLeft,f.y+=e.clientTop):a&&(f.x=L(a))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function N(t){var e=P(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 H(t){return"html"===K(t)?t:t.assignedSlot||t.parentNode||(A(t)?t.host:null)||T(t)}function J(t,e){var n;void 0===e&&(e=[]);var r=function t(e){return["html","body","#document"].indexOf(K(e))>=0?e.ownerDocument.body:R(e)&&U(e)?e:t(H(e))}(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=k(r),s=i?[o].concat(o.visualViewport||[],U(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(J(H(s)))}function $(t){return["table","td","th"].indexOf(K(t))>=0}function Y(t){return R(t)&&"fixed"!==V(t).position?t.offsetParent:null}function X(t){for(var e=k(t),n=Y(t);n&&$(n)&&"static"===V(n).position;)n=Y(n);return n&&("html"===K(n)||"body"===K(n)&&"static"===V(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&R(t)&&"fixed"===V(t).position)return null;for(var n=H(t);R(n)&&["html","body"].indexOf(K(n))<0;){var r=V(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 Q="top",G="bottom",Z="right",tt="left",et=[Q,G,Z,tt],nt=et.reduce((function(t,e){return t.concat([e+"-start",e+"-end"])}),[]),rt=[].concat(et,["auto"]).reduce((function(t,e){return t.concat([e,e+"-start",e+"-end"])}),[]),it=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];var ot={placement:"bottom",modifiers:[],strategy:"absolute"};function st(){for(var t=arguments.length,e=new Array(t),n=0;n=0?"x":"y"}function pt(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?ct(i):null,s=i?ft(i):null,a=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case Q:e={x:a,y:n.y-r.height};break;case G: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?ht(o):null;if(null!=c){var f="y"===c?"height":"width";switch(s){case"start":e[c]=e[c]-(n[f]/2-r[f]/2);break;case"end":e[c]=e[c]+(n[f]/2-r[f]/2)}}return e}var lt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function dt(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,b=Q,w=window;if(c){var S=X(n),E="clientHeight",O="clientWidth";S===k(n)&&"static"!==V(S=T(n)).position&&"absolute"===a&&(E="scrollHeight",O="scrollWidth"),S=S,(i===Q||(i===tt||i===Z)&&"end"===o)&&(b=G,_-=(h&&w.visualViewport?w.visualViewport.height:S[E])-r.height,_*=u?1:-1),i!==tt&&(i!==Q&&i!==G||"end"!==o)||(m=Z,d-=(h&&w.visualViewport?w.visualViewport.width:S[O])-r.width,d*=u?1:-1)}var x,I=Object.assign({position:a},c&<);return u?Object.assign({},I,((x={})[b]=g?"0":"",x[m]=y?"0":"",x.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+_+"px)":"translate3d("+d+"px, "+_+"px, 0)",x)):Object.assign({},I,((e={})[b]=g?_+"px":"",e[m]=y?d+"px":"",e.transform="",e))}var vt={left:"right",right:"left",bottom:"top",top:"bottom"};function _t(t){return t.replace(/left|right|bottom|top/g,(function(t){return vt[t]}))}var yt={start:"end",end:"start"};function gt(t){return t.replace(/start|end/g,(function(t){return yt[t]}))}function mt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&A(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function wt(t,e){return"viewport"===e?bt(function(t){var e=k(t),n=T(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+L(t),y:a}}(t)):C(e)?function(t){var e=P(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):bt(function(t){var e,n=T(t),r=F(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=q(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=q(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+L(t),u=-r.scrollTop;return"rtl"===V(i||n).direction&&(a+=q(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(T(t)))}function St(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Et(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function Ot(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?"viewport":a,c=n.elementContext,f=void 0===c?"popper":c,h=n.altBoundary,p=void 0!==h&&h,l=n.padding,d=void 0===l?0:l,v=St("number"!=typeof d?d:Et(d,et)),_="popper"===f?"reference":"popper",y=t.rects.popper,g=t.elements[p?_:f],m=function(t,e,n){var r="clippingParents"===e?function(t){var e=J(H(t)),n=["absolute","fixed"].indexOf(V(t).position)>=0,r=n&&R(t)?X(t):t;return C(r)?e.filter((function(t){return C(t)&&mt(t,r)&&"body"!==K(t)&&(!n||"static"!==V(t).position)})):[]}(t):[].concat(e),i=[].concat(r,[n]),o=i[0],s=i.reduce((function(e,n){var r=wt(t,n);return e.top=q(r.top,e.top),e.right=j(r.right,e.right),e.bottom=j(r.bottom,e.bottom),e.left=q(r.left,e.left),e}),wt(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(C(g)?g:g.contextElement||T(t.elements.popper),s,u),b=P(t.elements.reference),w=pt({reference:b,element:y,strategy:"absolute",placement:i}),S=bt(Object.assign({},y,w)),E="popper"===f?S:b,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},x=t.modifiersData.offset;if("popper"===f&&x){var I=x[i];Object.keys(O).forEach((function(t){var e=[Z,G].indexOf(t)>=0?1:-1,n=[Q,G].indexOf(t)>=0?"y":"x";O[t]+=I[n]*e}))}return O}function xt(t,e,n){return q(t,j(e,n))}function It(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 zt(t){return[Q,Z,G,tt].some((function(e){return t[e]>=0}))}var Mt=at({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=k(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,ut)})),a&&u.addEventListener("resize",n.update,ut),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ut)})),a&&u.removeEventListener("resize",n.update,ut)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=pt({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:ct(e.placement),variation:ft(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,dt(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,dt(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];R(i)&&K(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}),{});R(r)&&K(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=rt.reduce((function(t,n){return t[n]=function(t,e,n){var r=ct(t),i=[tt,Q].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=ct(_),g=u||(y!==_&&d?function(t){if("auto"===ct(t))return[];var e=_t(t);return[gt(t),e,gt(e)]}(_):[_t(_)]),m=[_].concat(g).reduce((function(t,n){return t.concat("auto"===ct(n)?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?rt:u,f=ft(r),h=f?a?nt:nt.filter((function(t){return ft(t)===f})):et,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]=Ot(t,{placement:n,boundary:i,rootBoundary:o,padding:s})[ct(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)}),[]),b=e.rects.reference,w=e.rects.popper,S=new Map,E=!0,O=m[0],x=0;x=0,k=D?"width":"height",C=Ot(e,{placement:I,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),R=D?M?Z:tt:M?G:Q;b[k]>w[k]&&(R=_t(R));var A=_t(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=I,E=!1;break}S.set(I,q)}if(E)for(var j=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"},B=d?3:1;B>0&&"break"!==j(B);B--);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,_=Ot(e,{boundary:u,rootBoundary:c,padding:h,altBoundary:f}),y=ct(e.placement),g=ft(e.placement),m=!g,b=ht(y),w="x"===b?"y":"x",S=e.modifiersData.popperOffsets,E=e.rects.reference,O=e.rects.popper,x="function"==typeof v?v(Object.assign({},e.rects,{placement:e.placement})):v,I="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),z=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(S){if(o){var D,k="y"===b?Q:tt,C="y"===b?G:Z,R="y"===b?"height":"width",A=S[b],B=A+_[k],P=A-_[C],F=l?-O[R]/2:0,K="start"===g?E[R]:O[R],T="start"===g?-O[R]:-E[R],L=e.elements.arrow,V=l&&L?N(L):{width:0,height:0},U=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=U[k],H=U[C],J=xt(0,E[R],V[R]),$=m?E[R]/2-F-J-W-I.mainAxis:K-J-W-I.mainAxis,Y=m?-E[R]/2+F+J+H+I.mainAxis:T+J+H+I.mainAxis,et=e.elements.arrow&&X(e.elements.arrow),nt=et?"y"===b?et.clientTop||0:et.clientLeft||0:0,rt=null!=(D=null==z?void 0:z[b])?D:0,it=A+Y-rt,ot=xt(l?j(B,A+$-rt-nt):B,A,l?q(P,it):P);S[b]=ot,M[b]=ot-A}if(a){var st,at="x"===b?Q:tt,ut="x"===b?G:Z,pt=S[w],lt="y"===w?"height":"width",dt=pt+_[at],vt=pt-_[ut],_t=-1!==[Q,tt].indexOf(y),yt=null!=(st=null==z?void 0:z[w])?st:0,gt=_t?dt:pt-E[lt]-O[lt]-yt+I.altAxis,mt=_t?pt+E[lt]+O[lt]-yt-I.altAxis:vt,bt=l&&_t?function(t,e,n){var r=xt(t,e,n);return r>n?n:r}(gt,pt,mt):xt(l?gt:dt,pt,l?mt:vt);S[w]=bt,M[w]=bt-pt}e.modifiersData[r]=M}},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=ct(n.placement),u=ht(a),c=[tt,Z].indexOf(a)>=0?"height":"width";if(o&&s){var f=function(t,e){return St("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Et(t,et))}(i.padding,n),h=N(o),p="y"===u?Q:tt,l="y"===u?G: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],b=y-h[c]-f[l],w=y/2-h[c]/2+g,S=xt(m,w,b),E=u;n.modifiersData[r]=((e={})[E]=S,e.centerOffset=S-w,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)))&&mt(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=Ot(e,{elementContext:"reference"}),a=Ot(e,{altBoundary:!0}),u=It(s,r),c=It(a,i,o),f=zt(u),h=zt(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})}}]}),Dt=n(67),kt=n.n(Dt),Ct=function(t){return t.reduce((function(t,e){var n=e[0],r=e[1];return t[n]=r,t}),{})},Rt="undefined"!=typeof window&&window.document&&window.document.createElement?o.useLayoutEffect:o.useEffect,At=[],qt=n(2);function jt(){return(jt=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=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 Nt(t){return"@"===t?"mention":t+"mention"}function Ht(t){var e=t.mention,n=t.theme,r=void 0===n?{}:n;return e.avatar?s.a.createElement("img",{src:e.avatar,className:r.mentionSuggestionsEntryAvatar,role:"presentation"}):null}var Jt=["mention","theme","isFocused","searchValue","selectMention"];function $t(t){var e=t.mention,n=t.theme;t.isFocused,t.searchValue,t.selectMention;var r=Pt(t,Jt);return s.a.createElement("div",r,s.a.createElement(Ht,{mention:e,theme:n}),s.a.createElement("span",{className:null==n?void 0:n.mentionSuggestionsEntryText},e.name))}function Yt(t){var e,n=t.decoratorRect,r=t.popover,i=t.props,o=function t(e){return e?"static"!==window.getComputedStyle(e).getPropertyValue("position")?e:t(e.parentElement):null}(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 Xt(t){return void 0!==t}function Qt(t){var e=t.store,n=t.children,r=t.theme,i=t.popperOptions,a=void 0===i?{placement:"bottom-start"}:i,u=Object(o.useState)((function(){return z(r.mentionSuggestions,r.mentionSuggestionsPopup)})),c=u[0],f=u[1],h=Object(o.useState)(null),p=h[0],l=h[1],d=function(t,e,n){void 0===n&&(n={});var r=o.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||At},s=o.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=s[0],u=s[1],c=o.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(t){var e=t.state,n=Object.keys(e.elements);u({styles:Ct(n.map((function(t){return[t,e.styles[t]||{}]}))),attributes:Ct(n.map((function(t){return[t,e.attributes[t]]})))})},requires:["computeStyles"]}}),[]),f=o.useMemo((function(){var t={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[c,{name:"applyStyles",enabled:!1}])};return kt()(r.current,t)?r.current||t:(r.current=t,t)}),[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,c]),h=o.useRef();return Rt((function(){h.current&&h.current.setOptions(f)}),[f]),Rt((function(){if(null!=t&&null!=e){var r=(n.createPopper||Mt)(t,e,f);return h.current=r,function(){r.destroy(),h.current=null}}}),[t,e,n.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}}(e.getReferenceElement(),p,a),v=d.styles,_=d.attributes;return Object(o.useEffect)((function(){requestAnimationFrame((function(){return f(z(r.mentionSuggestions,r.mentionSuggestionsPopup,r.mentionSuggestionsPopupVisible))}))}),[r]),s.a.createElement("div",jt({ref:l,style:v.popper},_.popper,{className:c}),n)}var Gt=Object(qt.once)((function(t){})),Zt=["entryComponent","popoverComponent","popperOptions","popoverContainer","onOpenChange","onAddMention","onSearchChange","suggestions","ariaProps","callbacks","theme","store","entityMutability","positionSuggestions","mentionTriggers","mentionPrefix"],te=function(t){var e,n;function r(e){var n;return(n=t.call(this,e)||this).state={focusedOptionIndex:0},n.key=Object(l.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(Xt).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(Xt)[0]})).filter(Xt);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=Wt(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(Nt(r),i,{mention:e}).getLastCreatedEntityKey(),s=t.getSelection(),a=Wt(t,s,[r]),u=a.begin,c=a.end,f=s.merge({anchorOffset:u,focusOffset:c}),h=l.Modifier.replaceText(t.getCurrentContent(),f,""+n+e.name,void 0,o),p=f.getAnchorKey();t.getCurrentContent().getBlockForKey(p).getLength()===c&&(h=l.Modifier.insertText(h,h.getSelectionAfter()," "));var d=l.EditorState.push(t,h,"insert-fragment");return l.EditorState.forceSelection(d,h.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}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,Bt(e,n);var i=r.prototype;return i.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||Yt)({decoratorRect:e,props:this.props,popover:this.popover}),r=0,i=Object.entries(n);r1&&void 0!==arguments[1]?arguments[1]:" ";return t.replace(ce,e)}function he(t,e,n){e=e||t.getCurrentContent().getBlocksAsArray();var r=Object(ue.List)(),i=Object(ue.List)();e.forEach((function(t){"atomic"!==t.getType()&&(r=r.push(fe(t.getText())),i=i.concat(t.getCharacterList()))})),n.stripEntities&&(i=i.map(pe));var o=new l.ContentBlock({key:Object(l.genKey)(),text:r.join(""),type:"unstyled",characterList:i,depth:0}),s=l.ContentState.createFromBlockArray([o]);return t=l.EditorState.push(t,s,"remove-range"),l.EditorState.moveFocusToEnd(t)}function pe(t){return t.set("entity",null)}function le(t){var e=!1;return t.forEach((function(t){null!==t.get("entity")&&(e=!0)})),e}var de={stripEntities:!0},ve=n(66),_e=n.n(ve),ye=n(65),ge=n.n(ye),me=n(183),be=n.n(me),we=n(184),Se=n.n(we),Ee=n(185),Oe=n.n(Ee),xe=n(37),Ie=n(5),ze=n.n(Ie);const Me=u.a.arrayOf(u.a.shape({name:u.a.string.isRequired,value:u.a.string.isRequired,label:u.a.string,description:u.a.string,hidden:u.a.bool})),De=u.a.arrayOf(u.a.string);var ke=n(186),Ce=n.n(ke),Re=n(6);const Ae=ze.a.span` color: ${Re.colors.$color_white}; background-color: ${Re.colors.$color_pink_dark}; padding: 0 8px; margin: 0 2px; line-height: 1.71428571; // 24px based on 14px font-size border-radius: 17px; cursor: default; &:hover { color: ${Re.colors.$color_white}; background-color: ${Re.colors.$color_pink_dark}; } `,qe=t=>{let{children:e,className:n}=t;return Object(r.createElement)(Ae,{className:Ce()("yst-replacevar__mention",n),spellCheck:!1},e)};qe.propTypes={children:u.a.node.isRequired,className:u.a.string.isRequired};var je=n(10);const Be=/%%([A-Za-z0-9_]+)%%/g;function Pe(t){return"%%"+t+"%%"}function Fe(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];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}function Ke(t,e,n){return t>=e&&t<=n}function Te(t,e){let{start:n=0,end:r=t.getText().length}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=t.getText().slice(n,r),o=[];return t.findEntityRanges(t=>!!t.getEntity(),(i,s)=>{if(Ke(i,n,r)&&Ke(s,n,r)){const r=e(t.getEntityAt(i));r.data.mention&&o.push({start:i-n,end:s-n,replacementText:Pe(r.data.mention.replaceName)})}}),Fe(i,o)}function Le(t,e){let n=e;return t.forEach(t=>{t.name===e&&t.label&&(n=t.label)}),n}function Ve(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=Be.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){return{...t,start:t.start,end:t.start+t.length,delta:t.label.length-t.length}}(t=function(t,e){return{...t,label:Le(e,t.name)}}(t,e));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,l.SelectionState.createEmpty(n).merge({anchorOffset:r.end,focusOffset:r.end+1}));if(!Object(je.getWordBoundaries)().includes(o)){const o=l.SelectionState.createEmpty(n).merge({anchorOffset:r.end,focusOffset:r.end}),s=l.Modifier.insertText(i,o," ");t=l.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=l.SelectionState.createEmpty(n).merge({anchorOffset:e.start,focusOffset:e.end});r=function(t,e){const n={mention:{replaceName:e.name}};return t.createEntity("%mention","IMMUTABLE",n)}(r,e);const o=l.Modifier.replaceText(r,i,e.label,null,r.getLastCreatedEntityKey());return l.EditorState.push(t,o,"apply-entity")}(o.editorState,t,i),r=l.EditorState.acceptSelection(r,o.selection)})}),r}function Ue(t,e){return Ve(l.EditorState.createWithContent(l.ContentState.createFromText(t)),e)}const We=(t,e)=>{const n=t.charAt(e);return 0===n.length||/\s/.test(n)},Ne=(t,e)=>{const n=e.getAnchorKey();return t.getBlockForKey(n)},He=t=>{const e=t.getCurrentContent(),n=t.getSelection(),r=l.Modifier.removeRange(e,n,"backward");return l.EditorState.push(t,r,"remove-range")};function Je(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 $e(t,e,n){const r=t.getBlockForKey(e).getEntityAt(n),i=Je(t,e,r);return null===i||i.start===n?null:r}function Ye(t,e){const{start:n,end:r}=e;return t.getStartOffset()<=n&&t.getEndOffset()>=r}const Xe=ze.a.div` div { z-index: 10995; } > div { max-height: 450px; overflow-y: auto; } `,Qe=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 Ge extends s.a.Component{constructor(t){super(t);const{content:e,replacementVariables:n,recommendedReplacementVariables:r}=this.props,i=Ue(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=_e()(xe.speak.bind(this),500),this.onSuggestionsOpenChange=this.onSuggestionsOpenChange.bind(this)}initializeDraftJsPlugins(){const t=function(t){void 0===t&&(t={});var e,n,r,i,o,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=Object(d.Map)(),p=Object(d.Map)(),l=!1,v={getEditorState:void 0,setEditorState:void 0,getPortalClientRect:function(t){return p.get(t)()},getAllSearches:function(){return h},isEscaped:function(t){return e===t},escapeSearch:function(t){e=t},resetEscapedSearch:function(){e=void 0},register:function(t){h=h.set(t,t)},updatePortalClientRect:function(t,e){p=p.set(t,e)},unregister:function(t){h=h.delete(t),p=p.delete(t)},getIsOpened:function(){return l},setIsOpened:function(t){l=t},getReferenceElement:function(){return n},setReferenceElement:function(t){n=t}},_=t,y=_.mentionPrefix,g=void 0===y?"":y,m=_.theme,b=void 0===m?ie:m,w=_.positionSuggestions,S=_.mentionComponent,E=_.mentionSuggestionsComponent,O=void 0===E?ee:E,x=_.entityMutability,I=void 0===x?"SEGMENTED":x,z=_.mentionTrigger,M=void 0===z?"@":z,k=_.mentionRegExp,C=void 0===k?"[\\w-À-ÖØ-öø-ÿĀ-ňŊ-ſА-я぀-ゟ゠-ヿ㄰-㆏가-힣一-龥؀-ۿÀ-ỹ]":k,R=_.supportWhitespace,A=void 0!==R&&R,q=_.popperOptions,j="string"==typeof M?[M]:M,B={ariaProps:f,callbacks:c,theme:b,store:v,entityMutability:I,positionSuggestions:w,mentionTriggers:j,mentionPrefix:g,popperOptions:q};return{MentionSuggestions:function(t){return s.a.createElement(O,jt({},t,B))},decorators:[{strategy:oe(j),component:function(t){return s.a.createElement(Lt,jt({},t,{theme:b,mentionComponent:S}))}},{strategy:(r=j,i=A,o=C,a="("+r.map((function(t){return D()(t)})).join("|")+")",u=i?new RegExp(a+"("+o+"|\\s)*","g"):new RegExp("(\\s|^)"+a+o+"*","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;ae(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;se.test(e[o])&&(o+=1),r(o,a)}}(t,s,e,r)}))}(u,t,i,e)}),component:function(t){return s.a.createElement(re,jt({},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:qe}),e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object.assign({},de,t),{blockRenderMap:Object(ue.Map)({unstyled:{element:"div"}}),onChange:function(e){var n=e.getCurrentContent().getBlocksAsArray();if(n.length>1)e=he(e,n,t);else{var r=n[0],i=r.getText(),o=r.getCharacterList(),s=t.stripEntities&&le(o);if(ce.test(i)||s){i=fe(i),t.stripEntities&&(o=o.map(pe)),r=new l.ContentBlock({key:Object(l.genKey)(),text:i,type:"unstyled",characterList:o,depth:0});var a=l.ContentState.createFromBlockArray([r]);e=l.EditorState.push(e,a,"insert-characters")}}return e},handleReturn:function(t){return"handled"}}}({stripEntities:!1});this.pluginList={mentionsPlugin:t,singleLinePlugin:{...e,handleReturn:()=>{}}},this.pluginList=Object(i.applyFilters)("yoast.replacementVariableEditor.pluginList",this.pluginList)}serializeContent(t){const e=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";const n=t.getBlockMap();return n.map(e=>Te(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=$e(n,i,r);if(null!==c){const r=Je(n,i,c),{start:o,end:s}=r;t=Ye(e,r)?t.merge({[a]:s}):t.merge({[a]:o})}const f=$e(n,s,o);if(null!==f){const r=Je(n,i,f),{start:o,end:s}=r;t=Ye(e,r)?t.merge({[u]:o}):t.merge({[u]:s})}return t}(n,r,i);return o!==n&&(t=l.EditorState.forceSelection(t,o)),t}(t=Ve(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=He(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 l.SelectionState({anchorOffset:u,anchorKey:s.getKey(),focusOffset:o,focusKey:s.getKey(),isBackward:"delete"===n,hasFocus:r.getHasFocus()});return l.EditorState.push(t,l.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(Qe)||i.match(Qe).length>1||(n=r,0))}),t.slice(e,e+n).match(Qe)}getBackwardMatch(t,e){return t.slice(0,e).match(Qe)}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){if(""===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"")&&!ge()(e)){const n=be()(t,t=>Se()(e,t.name));if(0!==n.length)return n}return t}onSearchChange(t){let{value:e}=t;this.props.onSearchChange&&this.props.onSearchChange(e);const n=this.determineCurrentReplacementVariables(this.props.replacementVariables,this.props.recommendedReplacementVariables,e),r=this.mapReplacementVariablesToSuggestions(n);this.setState({searchValue:e,suggestions:this.suggestionsFilter(e,r)}),setTimeout(()=>{this.announceSearchResults()})}onSuggestionsOpenChange(t){this.setState({isSuggestionsOpen:t})}announceSearchResults(){const{suggestions:t}=this.state;t.length?this.debouncedA11ySpeak(Object(h.sprintf)(Object(h._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(Object(h.__)("No results","wordpress-seo"),"assertive")}focus(){this.editor.focus()}setEditorRef(t){this.editor=t}setEditorFieldId(){Oe()(this.editor,"editor.editor").id=this.props.fieldId}triggerReplacementVariableSuggestions(){let t=He(this.state.editorState);const e=t.getSelection(),n=t.getCurrentContent(),r=Ne(n,e).getText(),i=(o=e).getIsBackward()?o.getEndOffset():o.getStartOffset();var o;const s=!We(r,i-1),a=!We(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=l.Modifier.insertText(n,r,e);return l.EditorState.push(t,i,"insert-characters")})(t,u),a&&(t=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=t.getCurrentContent(),i=t.getSelection();""===n&&(n=Ne(r,i).getKey());const o=l.SelectionState.createEmpty(n).merge({anchorOffset:e,focusOffset:e});return l.EditorState.acceptSelection(t,o)}(t,i+u.length-1)),this.onChange(t).then(()=>this.focus())}componentWillReceiveProps(t){const{content:e,replacementVariables:n,recommendedReplacementVariables:r}=this.props,{searchValue:i}=this.state,o={};if((t.content!==this._serializedContent&&t.content!==e||t.replacementVariables!==n&&t.replacementVariables.map(t=>t.name).filter(t=>!n.map(t=>t.name).includes(t)).some(t=>e.includes("%%"+t+"%%")))&&(this._serializedContent=t.content,o.editorState=Ue(t.content,t.replacementVariables)),t.replacementVariables!==n){const e=this.determineCurrentReplacementVariables(t.replacementVariables,r,i);o.suggestions=this.suggestionsFilter(i,this.mapReplacementVariablesToSuggestions(e))}this.setState(o)}handleCopyCutEvent(t){const{editorState:e}=this.state,n=e.getSelection();if(n.getHasFocus())try{const r=t.clipboardData,i=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";const r=e.getStartKey(),i=e.getEndKey(),o=t.getBlockMap();let s=!1;const a=o.skipUntil((function(t){return t.getKey()===r})).takeUntil((function(t){const e=s;return t.getKey()===i&&(s=!0),e}));return a.map((function(n){const o=n.getKey(),s={};return o===r&&(s.start=e.getStartOffset()),o===i&&(s.end=e.getEndOffset()),Te(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:t}=this.pluginList.mentionsPlugin,{onFocus:e,onBlur:n,ariaLabelledBy:o,placeholder:a,theme:u,isDisabled:c,fieldId:f}=this.props,{editorState:h,suggestions:p,isSuggestionsOpen:l}=this.state;return Object(r.createElement)(s.a.Fragment,null,Object(r.createElement)(x,{key:this.state.editorKey,textDirectionality:u.isRtl?"RTL":"LTR",editorState:h,handleKeyCommand:this.handleKeyCommand,onChange:this.onChange,onFocus:e,onBlur:n,plugins:Object.values(this.pluginList),ref:this.setEditorRef,stripPastedStyles:!0,ariaLabelledBy:o,placeholder:a,spellCheck:!0,readOnly:c}),Object(i.applyFilters)("yoast.replacementVariableEditor.additionalPlugins",Object(r.createElement)(s.a.Fragment,null),this.pluginList,f),Object(r.createElement)(Xe,null,Object(r.createElement)(t,{onSearchChange:this.onSearchChange,suggestions:p,onOpenChange:this.onSuggestionsOpenChange,open:l})))}}Ge.propTypes={content:u.a.string.isRequired,replacementVariables:Me.isRequired,recommendedReplacementVariables:De,ariaLabelledBy:u.a.string.isRequired,onSearchChange:u.a.func,onChange:u.a.func.isRequired,onFocus:u.a.func,onBlur:u.a.func,theme:u.a.object,placeholder:u.a.string,fieldId:u.a.string.isRequired,isDisabled:u.a.bool},Ge.defaultProps={onSearchChange:null,onFocus:()=>{},onBlur:()=>{},placeholder:"",theme:{isRtl:!1},recommendedReplacementVariables:[],isDisabled:!1};var Ze=Object(Ie.withTheme)(Ge),tn=n(9);const en=ze()(tn.VariableEditorInputContainer)` .public-DraftStyleDefault-block { line-height: 1.85714285; // 26px based on 14px font-size } .public-DraftEditorPlaceholder-root { color: ${"#707070"}; line-height: 1.85714285; // 26px based on 14px font-size } .public-DraftEditorPlaceholder-hasFocus { color: ${"#707070"}; } `,nn=ze()(tn.VariableEditorInputContainer)` min-height: 72px; padding: 4px 5px; line-height: 1.85714285; // 26px based on 14px font-size .public-DraftEditorPlaceholder-root { color: ${"#707070"}; position: absolute; line-height: 1.85714285; // 26px based on 14px font-size } .public-DraftEditorPlaceholder-hasFocus { color: ${"#707070"}; position: absolute; } `,rn=ze.a.div` display: flex; flex-wrap: wrap; align-items: center; margin: 16px 0 0 0; `,on=ze()(tn.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; `,sn=ze()(on)` font-size: 13px; margin-bottom: 0; /* Override StandardButton margin instead of changing that. */ & svg { ${Object(je.getDirectionalStyle)("margin-right","margin-left")}: 7px; fill: ${Re.colors.$color_grey_dark}; } `,an=ze.a.div` display: inline-flex; gap: 0.5em; margin-inline-start: auto; margin-bottom: 5px; `;class un extends s.a.Component{constructor(t){switch(super(t),this.uniqueId=f()("replacement-variable-editor-field-"),t.type){case"description":this.InputContainer=nn;break;case"title":this.InputContainer=en;break;default:this.InputContainer=en}t.withCaret&&(this.InputContainer=Object(Re.withCaretStyles)(this.InputContainer)),this.triggerReplacementVariableSuggestions=this.triggerReplacementVariableSuggestions.bind(this)}triggerReplacementVariableSuggestions(){this.ref.triggerReplacementVariableSuggestions()}render(){const{label:t,onChange:e,content:n,onFocus:s,onBlur:a,isActive:u,isHovered:c,onSearchChange:f,replacementVariables:l,recommendedReplacementVariables:d,editorRef:v,placeholder:_,fieldId:y,onMouseEnter:g,onMouseLeave:m,hasNewBadge:b,isDisabled:w,hasPremiumBadge:S,type:E}=this.props,O=this.InputContainer,x=Object(i.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:y,type:E});return Object(r.createElement)(rn,{className:["yst-replacevar",w&&"yst-replacevar--disabled"].filter(Boolean).join(" "),onMouseEnter:g,onMouseLeave:m},Object(r.createElement)(tn.SimulatedLabel,{className:"yst-replacevar__label",id:this.uniqueId,onClick:s},t),S&&Object(r.createElement)(tn.PremiumBadge,{inLabel:!0}),b&&Object(r.createElement)(tn.NewBadge,{inLabel:!0}),Object(r.createElement)(an,{className:"yst-replacevar__buttons"},Object(r.createElement)(p.Slot,{name:"yoast.replacementVariableEditor.additionalButtons."+y}),x.map((t,e)=>Object(r.createElement)(o.Fragment,{key:`additional-button-${e}-${y}`},t)),Object(r.createElement)(p.Slot,{key:"PluginComponent-"+y,name:"PluginComponent-"+y}),Object(r.createElement)(sn,{className:"yst-replacevar__button-insert",onClick:this.triggerReplacementVariableSuggestions,disabled:w},Object(h.__)("Insert variable","wordpress-seo"))),Object(r.createElement)(O,{className:"yst-replacevar__editor",onClick:s,isActive:u&&!w,isHovered:c},Object(r.createElement)(Ze,{fieldId:y,placeholder:_,content:n,onChange:e,onFocus:s,onBlur:a,onSearchChange:f,replacementVariables:l,recommendedReplacementVariables:d,ref:t=>{this.ref=t,v(t)},ariaLabelledBy:this.uniqueId,isDisabled:w})))}}un.propTypes={editorRef:u.a.func,content:u.a.string.isRequired,onChange:u.a.func.isRequired,onBlur:u.a.func,onSearchChange:u.a.func,replacementVariables:Me,recommendedReplacementVariables:De,isActive:u.a.bool,isHovered:u.a.bool,withCaret:u.a.bool,onFocus:u.a.func,label:u.a.string,placeholder:u.a.string,type:u.a.oneOf(["title","description"]).isRequired,fieldId:u.a.string,onMouseEnter:u.a.func,onMouseLeave:u.a.func,hasNewBadge:u.a.bool,isDisabled:u.a.bool,hasPremiumBadge:u.a.bool},un.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};var cn=un;const fn=ze.a.section` padding: ${t=>t.padding?t.padding:"0 20px"}; `;class hn extends s.a.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:t,activeField:e,hoveredField:n,replacementVariables:i,recommendedReplacementVariables:o,onBlur:s,data:{title:a,description:u},containerPadding:c,fieldIds:f,labels:p,hasNewBadge:l,isDisabled:d,hasPremiumBadge:v}=this.props;return Object(r.createElement)(fn,{padding:c},Object(r.createElement)(cn,{type:"title",label:p.title||Object(h.__)("SEO title","wordpress-seo"),onFocus:this.onFocusTitle,onBlur:s,isActive:"title"===e,isHovered:"title"===n,editorRef:this.setTitleRef,replacementVariables:i,recommendedReplacementVariables:o,content:a,onChange:this.onChangeTitle,fieldId:f.title,hasNewBadge:l,isDisabled:d,hasPremiumBadge:v}),Object(r.createElement)(cn,{type:"description",placeholder:t,label:p.description||Object(h.__)("Meta description","wordpress-seo"),onFocus:this.onFocusDescription,onBlur:s,isActive:"description"===e,isHovered:"description"===n,editorRef:this.setDescriptionRef,replacementVariables:i,recommendedReplacementVariables:o,content:u,onChange:this.onChangeDescription,fieldId:f.description,hasNewBadge:l,isDisabled:d,hasPremiumBadge:v}))}}hn.propTypes={replacementVariables:Me,recommendedReplacementVariables:De,onChange:u.a.func.isRequired,onFocus:u.a.func,onBlur:u.a.func,data:u.a.shape({title:u.a.string,description:u.a.string}).isRequired,activeField:u.a.oneOf(["title","description"]),hoveredField:u.a.oneOf(["title","description"]),descriptionEditorFieldPlaceholder:u.a.string,containerPadding:u.a.string,fieldIds:u.a.shape({title:u.a.string.isRequired,description:u.a.string.isRequired}).isRequired,labels:u.a.shape({title:u.a.string,description:u.a.string}),hasNewBadge:u.a.bool,isDisabled:u.a.bool,hasPremiumBadge:u.a.bool},hn.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],onFocus:()=>{},onBlur:()=>{},containerPadding:"0 20px",descriptionEditorFieldPlaceholder:null,labels:{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1,activeField:"",hoveredField:""};var pn=hn;class ln extends s.a.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:t,replacementVariables:e,recommendedReplacementVariables:n,descriptionEditorFieldPlaceholder:i,hasPaperStyle:o,fieldIds:s,labels:a,hasNewBadge:u,isDisabled:c,hasPremiumBadge:f}=this.props,{activeField:h,hoveredField:p}=this.state;return Object(r.createElement)(tn.ErrorBoundary,null,Object(r.createElement)(pn,{descriptionEditorFieldPlaceholder:i,data:t,activeField:h,hoveredField:p,onChange:this.handleChange,onFocus:this.setFieldFocus,onBlur:this.onBlur,replacementVariables:e,recommendedReplacementVariables:n,containerPadding:o?"0 20px":"0",fieldIds:s,labels:a,hasNewBadge:u,isDisabled:c,hasPremiumBadge:f}))}}ln.propTypes={replacementVariables:Me,recommendedReplacementVariables:De,data:u.a.shape({title:u.a.string.isRequired,description:u.a.string.isRequired}).isRequired,onChange:u.a.func.isRequired,descriptionEditorFieldPlaceholder:u.a.string,hasPaperStyle:u.a.bool,fieldIds:u.a.shape({title:u.a.string.isRequired,description:u.a.string.isRequired}).isRequired,labels:u.a.shape({title:u.a.string,description:u.a.string}),hasNewBadge:u.a.bool,isDisabled:u.a.bool,hasPremiumBadge:u.a.bool},ln.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],hasPaperStyle:!0,descriptionEditorFieldPlaceholder:null,labels:{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1};var dn=ln},5:function(t,e){t.exports=window.yoast.styledComponents},52:function(t,e){t.exports=window.lodash.uniqueId},6:function(t,e){t.exports=window.yoast.styleGuide},65:function(t,e){t.exports=window.lodash.isEmpty},66:function(t,e){t.exports=window.lodash.debounce},67:function(t,e){var n="undefined"!=typeof Element,r="function"==typeof Map,i="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;t.exports=function(t,e){try{return function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var a,u,c,f;if(Array.isArray(e)){if((a=e.length)!=s.length)return!1;for(u=a;0!=u--;)if(!t(e[u],s[u]))return!1;return!0}if(r&&e instanceof Map&&s instanceof Map){if(e.size!==s.size)return!1;for(f=e.entries();!(u=f.next()).done;)if(!s.has(u.value[0]))return!1;for(f=e.entries();!(u=f.next()).done;)if(!t(u.value[1],s.get(u.value[0])))return!1;return!0}if(i&&e instanceof Set&&s instanceof Set){if(e.size!==s.size)return!1;for(f=e.entries();!(u=f.next()).done;)if(!s.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(s)){if((a=e.length)!=s.length)return!1;for(u=a;0!=u--;)if(e[u]!==s[u])return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((a=(c=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(u=a;0!=u--;)if(!Object.prototype.hasOwnProperty.call(s,c[u]))return!1;if(n&&e instanceof Element)return!1;for(u=a;0!=u--;)if(("_owner"!==c[u]&&"__v"!==c[u]&&"__o"!==c[u]||!e.$$typeof)&&!t(e[c[u]],s[c[u]]))return!1;return!0}return e!=e&&s!=s}(t,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}},69:function(t,e){t.exports=window.wp.hooks},70:function(t,e,n){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:V(t)}function r(t){return a(t)?t:U(t)}function i(t){return u(t)?t:W(t)}function o(t){return s(t)&&!c(t)?t:N(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={},_={value:!1},y={value:!1};function g(t){return t.value=!1,t}function m(t){t&&(t.value=!0)}function b(){}function w(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?S(t)+e:e}function O(){return!0}function x(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function I(t,e){return M(t,e,0)}function z(t,e){return M(t,e,e)}function M(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var D,k,C,R="function"==typeof Symbol&&Symbol.iterator,A=R||"@@iterator";function q(t){this.next=t}function j(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 B(){return{value:void 0,done:!0}}function P(t){return!!T(t)}function F(t){return t&&"function"==typeof t.next}function K(t){var e=T(t);return e&&e.call(t)}function T(t){var e=t&&(R&&t[R]||t["@@iterator"]);if("function"==typeof e)return e}function L(t){return t&&"number"==typeof t.length}function V(t){return null==t?Q():s(t)?t.toSeq():function(t){var e=tt(t)||"object"==typeof t&&new J(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function U(t){return null==t?Q().toKeyedSeq():s(t)?a(t)?t.toSeq():t.fromEntrySeq():G(t)}function W(t){return null==t?Q():s(t)?a(t)?t.entrySeq():t.toIndexedSeq():Z(t)}function N(t){return(null==t?Q():s(t)?a(t)?t.entrySeq():t:Z(t)).toSetSeq()}function H(t){this._array=t,this.size=t.length}function J(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function $(t){this._iterable=t,this.size=t.length||t.size}function Y(t){this._iterator=t,this._iteratorCache=[]}function X(t){return!(!t||!t["@@__IMMUTABLE_SEQ__@@"])}function Q(){return D||(D=new H([]))}function G(t){var e=Array.isArray(t)?new H(t).fromEntrySeq():F(t)?new Y(t).fromEntrySeq():P(t)?new $(t).fromEntrySeq():"object"==typeof t?new J(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function Z(t){var e=tt(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function tt(t){return L(t)?new H(t):F(t)?new Y(t):P(t)?new $(t):void 0}function et(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 nt(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,s=0;return new q((function(){var t=i[n?o-s:s];return s++>o?{value:void 0,done:!0}:j(e,r?t[0]:s-1,t[1])}))}return t.__iteratorUncached(e,n)}function rt(t,e){return e?function t(e,n,r,i){return Array.isArray(n)?e.call(i,r,W(n).map((function(r,i){return t(e,r,i,n)}))):ot(n)?e.call(i,r,U(n).map((function(r,i){return t(e,r,i,n)}))):n}(e,t,"",{"":t}):it(t)}function it(t){return Array.isArray(t)?W(t).map(it).toList():ot(t)?U(t).map(it).toMap():t}function ot(t){return t&&(t.constructor===Object||void 0===t.constructor)}function st(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 at(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&&st(i[1],t)&&(n||st(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?!st(e,t.get(r,v)):!st(t.get(r,v),e))return h=!1,!1}));return h&&t.size===p}function ut(t,e){if(!(this instanceof ut))return new ut(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(k)return k;k=this}}function ct(t,e){if(!t)throw new Error(e)}function ft(t,e,n){if(!(this instanceof ft))return new ft(t,e,n);if(ct(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),er?{value:void 0,done:!0}:j(t,i,n[e?r-i++:i++])}))},e(J,U),J.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},J.prototype.has=function(t){return this._object.hasOwnProperty(t)},J.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},J.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new q((function(){var s=r[e?i-o:o];return o++>i?{value:void 0,done:!0}:j(t,s,n[s])}))},J.prototype[d]=!0,e($,W),$.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=K(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},$.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=K(this._iterable);if(!F(n))return new q(B);var r=0;return new q((function(){var e=n.next();return e.done?e:j(t,r++,e.value)}))},e(Y,W),Y.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=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return j(t,i,r[i++])}))},e(ut,W),ut.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},ut.prototype.get=function(t,e){return this.has(t)?this._value:e},ut.prototype.includes=function(t){return st(this._value,t)},ut.prototype.slice=function(t,e){var n=this.size;return x(t,e,n)?this:new ut(this._value,z(e,n)-I(t,n))},ut.prototype.reverse=function(){return this},ut.prototype.indexOf=function(t){return st(this._value,t)?0:-1},ut.prototype.lastIndexOf=function(t){return st(this._value,t)?this.size:-1},ut.prototype.__iterate=function(t,e){for(var n=0;n=0&&e=0&&nn?{value:void 0,done:!0}:j(t,o++,s)}))},ft.prototype.equals=function(t){return t instanceof ft?this._start===t._start&&this._end===t._end&&this._step===t._step:at(this,t)},e(ht,n),e(pt,ht),e(lt,ht),e(dt,ht),ht.Keyed=pt,ht.Indexed=lt,ht.Set=dt;var vt="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 _t(t){return t>>>1&1073741824|3221225471&t}function yt(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 _t(n)}if("string"===e)return t.length>xt?function(t){var e=Mt[t];return void 0===e&&(e=gt(t),zt===It&&(zt=0,Mt={}),zt++,Mt[t]=e),e}(t):gt(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(St&&void 0!==(e=mt.get(t)))return e;if(void 0!==(e=t[Ot]))return e;if(!wt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ot]))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=++Et,1073741824&Et&&(Et=0),St)mt.set(t,e);else{if(void 0!==bt&&!1===bt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(wt)Object.defineProperty(t,Ot,{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[Ot]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Ot]=e}}return e}(t);if("function"==typeof t.toString)return gt(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function gt(t){for(var e=0,n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}}))},kt.prototype.toString=function(){return this.__toString("Map {","}")},kt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},kt.prototype.set=function(t,e){return Nt(this,t,e)},kt.prototype.setIn=function(t,e){return this.updateIn(t,v,(function(){return e}))},kt.prototype.remove=function(t){return Nt(this,t,v)},kt.prototype.deleteIn=function(t){return this.updateIn(t,(function(){return v}))},kt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},kt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=function t(e,n,r,i){var o=e===v,s=n.next();if(s.done){var a=o?r:e,u=i(a);return u===a?e:u}ct(o||e&&e.set,"invalid keyPath");var c=s.value,f=o?v:e.get(c,v),h=t(f,n,r,i);return h===f?e:h===v?e.remove(c):(o?Wt():e).set(c,h)}(this,Ye(t),e,n);return r===v?void 0:r},kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Wt()},kt.prototype.merge=function(){return Yt(this,void 0,arguments)},kt.prototype.mergeWith=function(e){var n=t.call(arguments,1);return Yt(this,e,n)},kt.prototype.mergeIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,Wt(),(function(t){return"function"==typeof t.merge?t.merge.apply(t,n):n[n.length-1]}))},kt.prototype.mergeDeep=function(){return Yt(this,Xt,arguments)},kt.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return Yt(this,Qt(e),n)},kt.prototype.mergeDeepIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,Wt(),(function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,n):n[n.length-1]}))},kt.prototype.sort=function(t){return we(Fe(this,t))},kt.prototype.sortBy=function(t,e){return we(Fe(this,e,t))},kt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},kt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new b)},kt.prototype.asImmutable=function(){return this.__ensureOwner()},kt.prototype.wasAltered=function(){return this.__altered},kt.prototype.__iterator=function(t,e){return new Tt(this,t,e)},kt.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},kt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ut(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},kt.isMap=Ct;var Rt,At="@@__IMMUTABLE_MAP__@@",qt=kt.prototype;function jt(t,e){this.ownerID=t,this.entries=e}function Bt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Pt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function Ft(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Kt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Tt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&Vt(t._root)}function Lt(t,e){return j(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Ut(t,e,n,r){var i=Object.create(qt);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Wt(){return Rt||(Rt=Ut(0))}function Nt(t,e,n){var r,i;if(t._root){var o=g(_),s=g(y);if(r=Ht(t._root,t.__ownerID,0,void 0,e,n,o,s),!s.value)return t;i=t.size+(o.value?n===v?-1:1:0)}else{if(n===v)return t;i=1,r=new jt(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?Ut(i,r):Wt()}function Ht(t,e,n,r,i,o,s,a){return t?t.update(e,n,r,i,o,s,a):o===v?t:(m(a),m(s),new Kt(e,r,[i,o]))}function Jt(t){return t.constructor===Kt||t.constructor===Ft}function $t(t,e,n,r,i){if(t.keyHash===r)return new Ft(e,r,[t.entry,i]);var o,s=31&(0===n?t.keyHash:t.keyHash>>>n),a=31&(0===n?r:r>>>n);return new Bt(e,1<>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function te(t,e,n,r){var i=r?t:w(t);return i[e]=n,i}qt[At]=!0,qt.delete=qt.remove,qt.removeIn=qt.deleteIn,jt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o=ee)return function(t,e,n,r){t||(t=new b);for(var i=new Kt(t,yt(n),[n,r]),o=0;o>>t)),o=this.bitmap;return 0==(o&i)?r:this.nodes[Zt(o&i-1)].get(t+5,e,n,r)},Bt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=yt(r));var a=31&(0===e?n:n>>>e),u=1<=ne)return function(t,e,n,r,i){for(var o=0,s=new Array(32),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[o++]:void 0;return s[r]=i,new Pt(t,o+1,s)}(t,p,c,a,d);if(f&&!d&&2===p.length&&Jt(p[1^h]))return p[1^h];if(f&&d&&1===p.length&&Jt(d))return d;var _=t&&t===this.ownerID,y=f?d?c:c^u:c|u,g=f?d?te(p,h,d,_):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>>t),o=this.nodes[i];return o?o.get(t+5,e,n,r):r},Pt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=yt(r));var a=31&(0===e?n:n>>>e),u=i===v,c=this.nodes,f=c[a];if(u&&!f)return this;var h=Ht(f,t,e+5,n,r,i,o,s);if(h===f)return this;var p=this.count;if(f){if(!h&&--p0&&r<32?le(0,r,5,null,new ue(n.toArray())):e.withMutations((function(t){t.setSize(r),n.forEach((function(e,n){return t.set(n,e)}))})))}function oe(t){return!(!t||!t[se])}e(ie,lt),ie.of=function(){return this(arguments)},ie.prototype.toString=function(){return this.__toString("List [","]")},ie.prototype.get=function(t,e){if((t=E(this,t))>=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?ge(t,e).set(0,n):ge(t,0,e+1).set(e,n)}));e+=t._origin;var r=t._tail,i=t._root,o=g(y);return e>=be(t._capacity)?r=ve(r,t.__ownerID,0,e,n,o):i=ve(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):le(t._origin,t._capacity,t._level,i,r):t}(this,t,e)},ie.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},ie.prototype.insert=function(t,e){return this.splice(t,0,e)},ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):de()},ie.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(n){ge(n,0,e+t.length);for(var r=0;r>>e&31;if(r>=this.array.length)return new ue([],t);var i,o=0===r;if(e>0){var s=this.array[r];if((i=s&&s.removeBefore(t,e-5,n))===s&&o)return this}if(o&&!i)return this;var a=_e(this,t);if(!o)for(var u=0;u>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-5,n))===o&&i===this.array.length-1)return this}var s=_e(this,t);return s.array.splice(i+1),r&&(s.array[i]=r),s};var ce,fe,he={};function pe(t,e){var n=t._origin,r=t._capacity,i=be(r),o=t._tail;return function t(s,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>32&&(c=32),function(){if(u===c)return he;var t=e?--c:u++;return a&&a[t]}}(s,u):function(i,o,s){var a,u=i&&i.array,c=s>n?0:n-s>>o,f=1+(r-s>>o);return f>32&&(f=32),function(){for(;;){if(a){var n=a();if(n!==he)return n;a=null}if(c===f)return he;var r=e?--f:c++;a=t(u&&u[r],o-5,s+(r<>>n&31,u=t&&a0){var c=t&&t.array[a],f=ve(c,e,n-5,r,i,o);return f===c?t:((s=_e(t,e)).array[a]=f,s)}return u&&t.array[a]===i?t:(m(o),s=_e(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function _e(t,e){return e&&t&&e===t.ownerID?t:new ue(t?t.array.slice():[],e)}function ye(t,e){if(e>=be(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&31],r-=5;return n}}function ge(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new b,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 ue(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=5);f&&(s+=f,i+=f,a+=f,o+=f);for(var h=be(o),p=be(a);p>=1<h?new ue([],r):l;if(l&&p>h&&s5;_-=5){var y=h>>>_&31;v=v.array[y]=_e(v.array[y],r)}v.array[h>>>5&31]=l}if(a=p)s-=p,a-=p,u=5,c=null,d=d&&d.removeBefore(r,0,s);else if(s>i||p>>u&31;if(g!==p>>>u&31)break;g&&(f+=(1<i&&(c=c.removeBefore(r,u,s-f)),c&&po&&(o=c.size),s(u)||(c=c.map((function(t){return rt(t)}))),r.push(c)}return o>t.size&&(t=t.setSize(o)),Gt(t,e,r)}function be(t){return t<32?0:t-1>>>5<<5}function we(t){return null==t?Oe():Se(t)?t:Oe().withMutations((function(e){var n=r(t);Dt(n.size),n.forEach((function(t,n){return e.set(n,t)}))}))}function Se(t){return Ct(t)&&f(t)}function Ee(t,e,n,r){var i=Object.create(we.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function Oe(){return fe||(fe=Ee(Wt(),de()))}function xe(t,e,n){var r,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(n===v){if(!u)return t;s.size>=32&&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):Ee(r,i)}function Ie(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ze(t){this._iter=t,this.size=t.size}function Me(t){this._iter=t,this.size=t.size}function De(t){this._iter=t,this.size=t.size}function ke(t){var e=He(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=Je,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(2===e){var r=t.__iterator(e,n);return new q((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(1===e?0:1,n)},e}function Ce(t,e,n){var r=He(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,v);return o===v?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(2,i);return new q((function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return j(r,a,e.call(n,s[1],a,t),i)}))},r}function Re(t,e){var n=He(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ke(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=Je,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 Ae(t,e,n,r){var i=He(t);return r&&(i.has=function(r){var i=t.get(r,v);return i!==v&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,v);return o!==v&&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(2,o),a=0;return new q((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 j(i,r?c:a++,f,o)}}))},i}function qe(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),x(e,n,i))return t;var o=I(e,i),s=z(n,i);if(o!=o||s!=s)return qe(t.toSeq().cacheResult(),e,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var c=He(t);return c.size=0===a?a:t.size&&a||void 0,!r&&X(t)&&a>=0&&(c.get=function(e,n){return(e=E(this,e))>=0&&ea)return{value:void 0,done:!0};var t=i.next();return r||1===e?t:j(e,u-1,0===e?void 0:t.value[1],t)}))},c}function je(t,e,n,r){var i=He(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(2,o),u=!0,c=0;return new q((function(){var t,o,f;do{if((t=a.next()).done)return r||1===i?t:j(i,c++,0===i?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 2===i?t:j(i,o,f,t)}))},i}function Be(t,e){var n=a(t),i=[t].concat(e).map((function(t){return s(t)?n&&(t=r(t)):t=n?G(t):Z(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 H(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}function Pe(t,e,n){var r=He(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||c0}function Le(t,e,r){var i=He(t);return i.size=new H(r).map((function(t){return t.size})).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,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),K(i?t.reverse():t)})),s=0,a=!1;return new q((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}:j(t,s++,e.apply(null,n.map((function(t){return t.value}))))}))},i}function Ve(t,e){return X(t)?e:t.constructor(e)}function Ue(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function We(t){return Dt(t.size),S(t)}function Ne(t){return a(t)?r:u(t)?i:o}function He(t){return Object.create((a(t)?U:u(t)?W:N).prototype)}function Je(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):V.prototype.cacheResult.call(this)}function $e(t,e){return t>e?1:t=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):Sn(t,e)},yn.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;Dt(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):Sn(e,n)},yn.prototype.pop=function(){return this.slice(1)},yn.prototype.unshift=function(){return this.push.apply(this,arguments)},yn.prototype.unshiftAll=function(t){return this.pushAll(t)},yn.prototype.shift=function(){return this.pop.apply(this,arguments)},yn.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):En()},yn.prototype.slice=function(t,e){if(x(t,e,this.size))return this;var n=I(t,this.size);if(z(e,this.size)!==this.size)return lt.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):Sn(r,i)},yn.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Sn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},yn.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},yn.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new q((function(){if(r){var e=r.value;return r=r.next,j(t,n++,e)}return{value:void 0,done:!0}}))},yn.isStack=gn;var mn,bn="@@__IMMUTABLE_STACK__@@",wn=yn.prototype;function Sn(t,e,n,r){var i=Object.create(wn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function En(){return mn||(mn=Sn(0))}function On(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}wn[bn]=!0,wn.withMutations=qt.withMutations,wn.asMutable=qt.asMutable,wn.asImmutable=qt.asImmutable,wn.wasAltered=qt.wasAltered,n.Iterator=q,On(n,{toArray:function(){Dt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,n){t[n]=e})),t},toIndexedSeq:function(){return new ze(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 Ie(this,!0)},toMap:function(){return kt(this.toKeyedSeq())},toObject:function(){Dt(this.size);var t={};return this.__iterate((function(e,n){t[n]=e})),t},toOrderedMap:function(){return we(this.toKeyedSeq())},toOrderedSet:function(){return fn(a(this)?this.valueSeq():this)},toSet:function(){return en(a(this)?this.valueSeq():this)},toSetSeq:function(){return new Me(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return yn(a(this)?this.valueSeq():this)},toList:function(){return ie(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(){var e=t.call(arguments,0);return Ve(this,Be(this,e))},includes:function(t){return this.some((function(e){return st(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){Dt(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 Ve(this,Ae(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 Dt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Dt(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(0)},map:function(t,e){return Ve(this,Ce(this,t,e))},reduce:function(t,e,n){var r,i;return Dt(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 Ve(this,Re(this,!0))},slice:function(t,e){return Ve(this,qe(this,t,e,!0))},some:function(t,e){return!this.every(Dn(t),e)},sort:function(t){return Ve(this,Fe(this,t))},values:function(){return this.__iterator(1)},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 S(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=kt().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 at(this,t)},entrySeq:function(){var t=this;if(t._cache)return new H(t._cache);var e=t.toSeq().map(Mn).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Dn(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(O)},flatMap:function(t,e){return Ve(this,function(t,e,n){var r=Ne(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 Ve(this,Pe(this,t,!0))},fromEntrySeq:function(){return new De(this)},get:function(t,e){return this.find((function(e,n){return st(n,t)}),void 0,e)},getIn:function(t,e){for(var n,r=this,i=Ye(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,v):v)===v)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=a(t),i=(f(t)?we():kt()).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=Ne(t);return i.map((function(e){return Ve(t,o(e))}))}(this,t,e)},has:function(t){return this.get(t,v)!==v},hasIn:function(t){return this.getIn(t,v)!==v},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 st(e,t)}))},keySeq:function(){return this.toSeq().map(zn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Ke(this,t)},maxBy:function(t,e){return Ke(this,e,t)},min:function(t){return Ke(this,t?kn(t):An)},minBy:function(t,e){return Ke(this,e?kn(e):An,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Ve(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Ve(this,je(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Dn(t),e)},sortBy:function(t,e){return Ve(this,Fe(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Ve(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Ve(this,function(t,e,n){var r=He(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(2,i),a=!0;return new q((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)?2===r?t:j(r,u,c,t):(a=!1,{value:void 0,done:!0})}))},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Dn(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=vt(e,3432918353),e=vt(e<<15|e>>>-15,461845907),e=vt(e<<13|e>>>-13,5),e=vt((e=(e+3864292196|0)^t)^e>>>16,2246822507),_t((e=vt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+qn(yt(t),yt(e))|0}:function(t,e){r=r+qn(yt(t),yt(e))|0}:e?function(t){r=31*r+yt(t)|0}:function(t){r=r+yt(t)|0}),r)}(this))}});var xn=n.prototype;xn[h]=!0,xn[A]=xn.values,xn.__toJS=xn.toArray,xn.__toStringMapper=Cn,xn.inspect=xn.toSource=function(){return this.toString()},xn.chain=xn.flatMap,xn.contains=xn.includes,On(r,{flip:function(){return Ve(this,ke(this))},mapEntries:function(t,e){var n=this,r=0;return Ve(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],r++,n)})).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Ve(this,this.toSeq().flip().map((function(r,i){return t.call(e,r,i,n)})).flip())}});var In=r.prototype;function zn(t,e){return e}function Mn(t,e){return[e,t]}function Dn(t){return function(){return!t.apply(this,arguments)}}function kn(t){return function(){return-t.apply(this,arguments)}}function Cn(t){return"string"==typeof t?JSON.stringify(t):String(t)}function Rn(){return w(arguments)}function An(t,e){return te?-1:0}function qn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return In[p]=!0,In[A]=xn.entries,In.__toJS=xn.toObject,In.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Cn(t)},On(i,{toKeyedSeq:function(){return new Ie(this,!1)},filter:function(t,e){return Ve(this,Ae(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 Ve(this,Re(this,!1))},slice:function(t,e){return Ve(this,qe(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=I(t,t<0?this.count():this.size);var r=this.slice(0,t);return Ve(this,1===n?r:r.concat(w(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 Ve(this,Pe(this,t,!1))},get:function(t,e){return(t=E(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=E(this,t))>=0&&(void 0!==this.size?this.size===1/0||t