this.wp=this.wp||{},this.wp.richText=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="yyEc")}({"1ZqX":function(e,t){!function(){e.exports=this.wp.data}()},"25BE":function(e,t,r){"use strict";function n(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}r.d(t,"a",(function(){return n}))},"4eJC":function(e,t,r){e.exports=function(e,t){var r,n,a,i=0;function o(){var t,o,c=n,u=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return Object(o.a)({},e,Object(c.keyBy)(t.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(c.omit)(e,t.names)}return e}}),l=r("pPDe"),s=Object(l.a)((function(e){return Object.values(e.formatTypes)}),(function(e){return[e.formatTypes]}));function f(e,t){return e.formatTypes[t]}function d(e,t){return Object(c.find)(s(e),(function(e){var r=e.tagName;return t===r}))}function p(e,t){return Object(c.find)(s(e),(function(e){var r=e.className;return null!==r&&" ".concat(t," ").indexOf(" ".concat(r," "))>=0}))}function m(e){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(c.castArray)(e)}}function v(e){return{type:"REMOVE_FORMAT_TYPES",names:Object(c.castArray)(e)}}Object(i.registerStore)("core/rich-text",{reducer:u,selectors:n,actions:a});var g=r("KQm4");function h(e,t){if(e===t)return!0;if(!e||!t)return!1;if(e.type!==t.type)return!1;var r=e.attributes,n=t.attributes;if(r===n)return!0;if(!r||!n)return!1;var a=Object.keys(r),i=Object.keys(n);if(a.length!==i.length)return!1;for(var o=a.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.activeFormats,u=a.slice();if(r===n){var l=Object(c.find)(u[r],{type:t.type});if(l){for(;Object(c.find)(u[r],l);)x(u,r,t),r--;for(n++;Object(c.find)(u[n],l);)x(u,n,t),n++}}else for(var s=r;s0&&void 0!==arguments[0]?arguments[0]:{},t=e.element,r=e.text,n=e.html,a=e.range,i=e.multilineTag,o=e.multilineWrapperTags,c=e.__unstableIsEditableTree;return"string"==typeof r&&r.length>0?{formats:Array(r.length),replacements:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=j(document,n)),"object"!==Object(O.a)(t)?{formats:[],replacements:[],text:""}:i?I({element:t,range:a,multilineTag:i,multilineWrapperTags:o,isEditableTree:c}):S({element:t,range:a,isEditableTree:c}))}function A(e,t,r,n){if(r){var a=t.parentNode,i=r.startContainer,o=r.startOffset,c=r.endContainer,u=r.endOffset,l=e.text.length;void 0!==n.start?e.start=l+n.start:t===i&&t.nodeType===_?e.start=l+o:a===i&&t===i.childNodes[o]?e.start=l:a===i&&t===i.childNodes[o-1]?e.start=l+n.text.length:t===i&&(e.start=l),void 0!==n.end?e.end=l+n.end:t===c&&t.nodeType===_?e.end=l+u:a===c&&t===c.childNodes[u-1]?e.end=l+n.text.length:a===c&&t===c.childNodes[u]?e.end=l:t===c&&(e.end=l+u)}}function P(e){return e.replace(/[\n\r\t]+/g," ")}function S(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,c=e.currentWrapperTags,u=void 0===c?[]:c,l=e.isEditableTree,s={formats:[],replacements:[],text:""};if(!t)return s;if(!t.hasChildNodes())return A(s,t,r,{formats:[],replacements:[],text:""}),s;for(var f=t.childNodes.length,d=function(e){var c=t.childNodes[e],f=c.nodeName.toLowerCase();if(c.nodeType===_){var d=P(c.nodeValue);return r=function(e,t,r){if(t){var n=t.startContainer,a=t.endContainer,i=t.startOffset,o=t.endOffset;return e===n&&(i=r(e.nodeValue.slice(0,i)).length),e===a&&(o=r(e.nodeValue.slice(0,o)).length),{startContainer:n,startOffset:i,endContainer:a,endOffset:o}}}(c,r,P),A(s,c,r,{text:d}),s.formats.length+=d.length,s.replacements.length+=d.length,s.text+=d,"continue"}if(c.nodeType!==C)return"continue";if(c.getAttribute("data-rich-text-padding")||l&&"br"===f&&!c.getAttribute("data-rich-text-line-break"))return A(s,c,r,{formats:[],replacements:[],text:""}),"continue";if("script"===f){var p={formats:[,],replacements:[{type:f,attributes:{"data-rich-text-script":c.getAttribute("data-rich-text-script")||encodeURIComponent(c.innerHTML)}}],text:""};return A(s,c,r,p),k(s,p),"continue"}if("br"===f)return A(s,c,r,{formats:[],replacements:[],text:""}),k(s,N({text:"\n"})),"continue";var m=s.formats[s.formats.length-1],v=m&&m[m.length-1],b=function(e){var t,r=e.type,n=e.attributes;if(n&&n.class&&(t=Object(i.select)("core/rich-text").getFormatTypeForClassName(n.class))&&(n.class=" ".concat(n.class," ").replace(" ".concat(t.className," ")," ").trim(),n.class||delete n.class),t||(t=Object(i.select)("core/rich-text").getFormatTypeForBareElement(r)),!t)return n?{type:r,attributes:n}:{type:r};if(t.__experimentalCreatePrepareEditableTree&&!t.__experimentalCreateOnChangeEditableValue)return null;if(!n)return{type:t.name};var a={},o={};for(var c in n){var u=F(t.attributes,c);u?a[u]=n[c]:o[c]=n[c]}return{type:t.name,attributes:a,unregisteredAttributes:o}}({type:f,attributes:D({element:c})}),y=h(b,v)?v:b;if(a&&-1!==a.indexOf(f)){var x=I({element:c,range:r,multilineTag:n,multilineWrapperTags:a,currentWrapperTags:[].concat(Object(g.a)(u),[y]),isEditableTree:l});return A(s,c,r,x),k(s,x),"continue"}var T=S({element:c,range:r,multilineTag:n,multilineWrapperTags:a,isEditableTree:l});A(s,c,r,T),y?0===T.text.length?y.attributes&&k(s,{formats:[,],replacements:[y],text:""}):k(s,Object(o.a)({},T,{formats:Array.from(T.formats,(function(e){return e?[y].concat(Object(g.a)(e)):[y]}))})):k(s,T)},p=0;p0)&&k(u,{formats:[,],replacements:o.length>0?[o]:[,],text:E}),A(u,f,r,d),k(u,d)}}return u}function D(e){var t=e.element;if(t.hasAttributes()){for(var r,n=t.attributes.length,a=0;a1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=N({text:t})),b(e.reduce((function(e,r){var n=r.formats,a=r.replacements,i=r.text;return{formats:e.formats.concat(t.formats,n),replacements:e.replacements.concat(t.replacements,a),text:e.text+t.text+i}})))}var q=r("rePB"),K=r("wx14"),Q=r("GRId"),X=r("4eJC"),Z=r.n(X),$=r("g56x"),J=r("K9lf"),ee=[];function te(e,t){if("string"==typeof(t=Object(o.a)({name:e},t)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if(Object(i.select)("core/rich-text").getFormatType(t.name))window.console.error('Format "'+t.name+'" is already registered.');else if("string"==typeof t.tagName&&""!==t.tagName)if("string"==typeof t.className&&""!==t.className||null===t.className)if(/^[_a-zA-Z]+[a-zA-Z0-9-]*$/.test(t.className)){if(null===t.className){var r=Object(i.select)("core/rich-text").getFormatTypeForBareElement(t.tagName);if(r)return void window.console.error('Format "'.concat(r.name,'" is already registered to handle bare tag name "').concat(t.tagName,'".'))}else{var n=Object(i.select)("core/rich-text").getFormatTypeForClassName(t.className);if(n)return void window.console.error('Format "'.concat(n.name,'" is already registered to handle class name "').concat(t.className,'".'))}if("title"in t&&""!==t.title)if("keywords"in t&&t.keywords.length>3)window.console.error('The format "'+t.name+'" can have a maximum of 3 keywords.');else{if("string"==typeof t.title){Object(i.dispatch)("core/rich-text").addFormatTypes(t);var a=Z()((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,t=arguments.length>1?arguments[1]:void 0;return[].concat(Object(g.a)(e),[t])}));return t.__experimentalCreatePrepareEditableTree&&Object($.addFilter)("experimentalRichText",e,(function(r){var n=r;(t.__experimentalCreatePrepareEditableTree||t.__experimentalCreateFormatToValue||t.__experimentalCreateValueToFormat)&&(n=function(n){var i={};if(t.__experimentalCreatePrepareEditableTree&&(i.prepareEditableTree=a(n.prepareEditableTree,t.__experimentalCreatePrepareEditableTree(n["format_".concat(e)],{richTextIdentifier:n.identifier,blockClientId:n.clientId}))),t.__experimentalCreateOnChangeEditableValue){var c=Object.keys(n).reduce((function(t,r){var a=n[r],i="format_".concat(e,"_dispatch_");r.startsWith(i)&&(t[r.replace(i,"")]=a);return t}),{});i.onChangeEditableValue=a(n.onChangeEditableValue,t.__experimentalCreateOnChangeEditableValue(Object(o.a)({},n["format_".concat(e)],c),{richTextIdentifier:n.identifier,blockClientId:n.clientId}))}return Object(Q.createElement)(r,Object(K.a)({},n,i))});var u=[];return t.__experimentalGetPropsForEditableTreePreparation&&u.push(Object(i.withSelect)((function(r,n){var a=n.clientId,i=n.identifier;return Object(q.a)({},"format_".concat(e),t.__experimentalGetPropsForEditableTreePreparation(r,{richTextIdentifier:i,blockClientId:a}))}))),t.__experimentalGetPropsForEditableTreeChangeHandler&&u.push(Object(i.withDispatch)((function(r,n){var a=n.clientId,i=n.identifier,o=t.__experimentalGetPropsForEditableTreeChangeHandler(r,{richTextIdentifier:i,blockClientId:a});return Object(c.mapKeys)(o,(function(t,r){return"format_".concat(e,"_dispatch_").concat(r)}))}))),Object(J.compose)(u)(n)})),t}window.console.error("Format titles must be strings.")}else window.console.error('The format "'+t.name+'" must have a title.')}else window.console.error("A class name must begin with a letter, followed by any number of hyphens, letters, or numbers.");else window.console.error("Format class names must be a string, or null to handle bare elements.");else window.console.error("Format tag names must be a string.");else window.console.error("Format names must contain a namespace prefix, include only lowercase alphanumeric characters or dashes, and start with a letter. Example: my-plugin/my-custom-format");else window.console.error("Format names must be strings.")}function re(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.activeFormats,u=a.slice();if(r===n){var l=Object(c.find)(u[r],{type:t});if(l){for(;Object(c.find)(u[r],l);)ne(u,r,t),r--;for(n++;Object(c.find)(u[n],l);)ne(u,n,t),n++}}else for(var s=r;s2&&void 0!==arguments[2]?arguments[2]:e.start,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.end,a=e.formats,i=e.replacements,o=e.text;"string"==typeof t&&(t=N({text:t}));var c=r+t.text.length;return b({formats:a.slice(0,r).concat(t.formats,a.slice(n)),replacements:i.slice(0,r).concat(t.replacements,i.slice(n)),text:o.slice(0,r)+t.text+o.slice(n),start:c,end:c})}function ie(e,t,r){return ae(e,N(),t,r)}function oe(e,t,r){var n=e.formats,a=e.replacements,i=e.text,o=e.start,c=e.end;return i=i.replace(t,(function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),u=1;u1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=U(e).slice(0,t),a=n.lastIndexOf(E),i=e.replacements[a],o=[,];i&&(o=[i]);var c={formats:[,],replacements:o,text:E};return ae(e,c,t,r)}function le(e,t,r,n){return ae(e,{formats:[,],replacements:[t],text:""},r,n)}function se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=e.formats,a=e.replacements,i=e.text;return void 0===t||void 0===r?Object(o.a)({},e):{formats:n.slice(t,r),replacements:a.slice(t,r),text:i.slice(t,r)}}function fe(e,t){var r=e.formats,n=e.replacements,a=e.text,i=e.start,o=e.end;if("string"!=typeof t)return de.apply(void 0,arguments);var c=0;return a.split(t).map((function(e){var a=c,u={formats:r.slice(a,a+e.length),replacements:n.slice(a,a+e.length),text:e};return c+=t.length+e.length,void 0!==i&&void 0!==o&&(i>=a&&ia&&(u.start=0),o>=a&&oc&&(u.end=e.length)),u}))}function de(e){var t=e.formats,r=e.replacements,n=e.text,a=e.start,i=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u={formats:t.slice(0,o),replacements:r.slice(0,o),text:n.slice(0,o)},l={formats:t.slice(c),replacements:r.slice(c),text:n.slice(c),start:0,end:0};return[oe(u,/\u2028+$/,""),oe(l,/^\u2028+/,"")]}function pe(e,t){if(t)return e;var r={};for(var n in e){var a=n;n.startsWith("data-disable-rich-text-")&&(a=n.slice("data-disable-rich-text-".length)),r[a]=e[n]}return r}function me(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,c=e.boundaryClass,u=e.isEditableTree,l=function(e){return Object(i.select)("core/rich-text").getFormatType(e)}(t),s={};if(c&&(s["data-rich-text-format-boundary"]="true"),!l)return r&&(s=Object(o.a)({},r,s)),{type:t,attributes:pe(s,u),object:a};for(var f in s=Object(o.a)({},n,s),r){var d=!!l.attributes&&l.attributes[f];d?s[d]=r[f]:s[f]=r[f]}return l.className&&(s.class?s.class="".concat(l.className," ").concat(s.class):s.class=l.className),{type:l.tagName,object:l.object,attributes:pe(s,u)}}var ve={type:"br",attributes:{"data-rich-text-padding":"true"},object:!0};function ge(e){var t,r,n,a=e.value,i=e.multilineTag,c=e.createEmpty,u=e.append,l=e.getLastChild,s=e.getParent,f=e.isText,d=e.getText,p=e.remove,m=e.appendText,v=e.onStartIndex,h=e.onEndIndex,b=e.isEditableTree,y=a.formats,x=a.replacements,T=a.text,O=a.start,j=a.end,w=y.length+1,_=c(),C={type:i},F=V(a),N=F[F.length-1];i?(u(u(_,{type:i}),""),r=t=[C]):u(_,"");for(var A=function(e){var a=T.charAt(e),c=b&&(!n||n===E||"\n"===n),w=y[e];i&&(w=a===E?t=(x[e]||[]).reduce((function(e,t){return e.push(t,C),e}),[C]):[].concat(Object(g.a)(t),Object(g.a)(w||[])));var F=l(_);if(c&&a===E){for(var A=F;!f(A);)A=l(A);u(s(A),ve),u(s(A),"")}if(n===E){for(var P=F;!f(P);)P=l(P);v&&O===e&&v(_,P),h&&j===e&&h(_,P)}if(w&&w.forEach((function(e,t){if(!F||!r||e!==r[t]||a===E&&w.length-1===t){var n=e.type,i=e.attributes,o=e.unregisteredAttributes,c=b&&a!==E&&e===N,m=s(F),v=u(m,me({type:n,attributes:i,unregisteredAttributes:o,boundaryClass:c,isEditableTree:b}));f(F)&&0===d(F).length&&p(F),F=u(v,"")}else F=l(F)})),a===E)return r=w,n=a,"continue";0===e&&(v&&0===O&&v(_,F),h&&0===j&&h(_,F)),""===a?(b||"script"!==x[e].type?F=u(s(F),me(Object(o.a)({},x[e],{object:!0,isEditableTree:b}))):(F=u(s(F),me({type:"script",isEditableTree:b})),u(F,{html:decodeURIComponent(x[e].attributes["data-rich-text-script"])})),F=u(s(F),"")):"\n"===a?(F=u(s(F),{type:"br",attributes:b?{"data-rich-text-line-break":"true"}:void 0,object:!0}),F=u(s(F),"")):f(F)?m(F,a):F=u(s(F),a),v&&O===e+1&&v(_,F),h&&j===e+1&&h(_,F),c&&e===T.length&&u(s(F),ve),r=w,n=a},P=0;P1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}var xe=function(){return j(document,"")};function Te(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));var r=t,n=r.type,a=r.attributes;if(n)for(var i in t=e.ownerDocument.createElement(n),a)t.setAttribute(i,a[i]);return e.appendChild(t)}function Oe(e,t){e.appendData(t)}function je(e){return e.lastChild}function Ee(e){return e.parentNode}function we(e){return e.nodeType===he}function _e(e){return e.nodeValue}function Ce(e){return e.parentNode.removeChild(e)}function Fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.reduce((function(e,r){return r(e,t.text)}),t.formats)}function Ne(e){var t=e.value,r=e.multilineTag,n=e.prepareEditableTree,a=e.isEditableTree,i=void 0===a||a,c=[],u=[];return{body:ge({value:Object(o.a)({},t,{formats:Fe(n,t)}),multilineTag:r,createEmpty:xe,append:Te,getLastChild:je,getParent:Ee,isText:we,getText:_e,remove:Ce,appendText:Oe,onStartIndex:function(e,t){c=be(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){u=be(t,e,[t.nodeValue.length])},isEditableTree:i}),selection:{startPath:c,endPath:u}}}function Ae(e){var t=e.value,r=e.current,n=e.multilineTag,a=e.prepareEditableTree,i=e.__unstableDomOnly,o=Ne({value:t,multilineTag:n,prepareEditableTree:a}),c=o.body,u=o.selection;!function e(t,r){var n,a=0;for(;n=t.firstChild;){var i=r.childNodes[a];if(i)if(i.isEqualNode(n))t.removeChild(n);else if(i.nodeName!==n.nodeName||i.nodeType===he&&i.data!==n.data)r.replaceChild(n,i);else{var o=i.attributes,c=n.attributes;if(o)for(var u=0;u0){if(p=d,m=s.getRangeAt(0),p.startContainer===m.startContainer&&p.startOffset===m.startOffset&&p.endContainer===m.endContainer&&p.endOffset===m.endOffset)return void(f.activeElement!==t&&t.focus());s.removeAllRanges()}var p,m;s.addRange(d)}(u,r)}var Pe=r("Vx3V");function Se(e){return Ue(ge({value:e.value,multilineTag:e.multilineTag,createEmpty:Ie,append:ke,getLastChild:De,getParent:Ve,isText:Me,getText:Re,remove:We,appendText:Le}).children)}function Ie(){return{}}function De(e){var t=e.children;return t&&t[t.length-1]}function ke(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function Le(e,t){e.text+=t}function Ve(e){return e.parent}function Me(e){return"string"==typeof e.text}function Re(e){return e.text}function We(e){var t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function Be(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,i="";for(var o in r)Object(Pe.isValidAttributeName)(o)&&(i+=" ".concat(o,'="').concat(Object(Pe.escapeAttribute)(r[o]),'"'));return n?"<".concat(t).concat(i,">"):"<".concat(t).concat(i,">").concat(Ue(a),"")}function Ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map((function(e){return void 0!==e.html?e.html:void 0===e.text?Be(e):Object(Pe.escapeHTML)(e.text)})).join("")}function ze(e,t){return M(e,t.type)?re(e,t.type):y(e,t)}function Ge(e){var t=Object(i.select)("core/rich-text").getFormatType(e);if(t)return t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object($.removeFilter)("experimentalRichText",e),Object(i.dispatch)("core/rich-text").removeFormatTypes(e),t;window.console.error("Format ".concat(e," is not registered."))}function He(e){for(var t=e.start,r=e.text,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,a=n;a--;)if(r[a]===E)return a}function Ye(e,t){var r=He(e);if(void 0===r)return e;var n=e.text,a=e.replacements,i=e.end,c=He(e,r),u=a[r]||[],l=a[c]||[];if(u.length>l.length)return e;for(var s=a.slice(),f=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],i=t;i-- >=0;)if(r[i]===E){var o=n[i]||[];if(o.length===a.length+1)return i;if(o.length<=a.length)return}}(e,r),d=r;d=0;){if(r[i]===E)if((n[i]||[]).length===a.length-1)return i}}function Ke(e){var t=e.text,r=e.replacements,n=e.start,a=e.end,i=He(e,n);if(void 0===r[i])return e;for(var c=r.slice(0),u=r[qe(e,i)]||[],l=function(e,t){for(var r=e.text,n=e.replacements,a=n[t]||[],i=t,o=t||0;o=a.length))return i;i=o}return i}(e,He(e,a)),s=i;s<=l;s++)if(t[s]===E){var f=c[s]||[];c[s]=u.concat(f.slice(u.length+1)),0===c[s].length&&delete c[s]}return Object(o.a)({},e,{replacements:c})}function Qe(e,t){for(var r,n=e.text,a=e.replacements,i=e.start,c=e.end,u=He(e,i),l=a[u]||[],s=a[He(e,c)]||[],f=qe(e,u),d=a.slice(),p=l.length-1,m=s.length-1,v=f+1||0;vm?e:t})))}return r?Object(o.a)({},e,{replacements:d}):e}function Xe(e){var t=e.value,r=e.start,n=e.end,a=e.formats,i=t.formats[r-1]||[],o=t.formats[n]||[];for(t.activeFormats=a.map((function(e,t){if(i[t]){if(h(e,i[t]))return i[t]}else if(o[t]&&h(e,o[t]))return o[t];return e}));--n>=r;)t.activeFormats.length>0?t.formats[n]=t.activeFormats:delete t.formats[n];return t}}});