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=309)}({0:function(e,t){!function(){e.exports=this.wp.element}()},15:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",function(){return n})},18:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_FORMAT_TYPES":return Object(i.a)({},e,Object(c.keyBy)(t.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(c.omit)(e,t.names)}return e}}),s=r(32),l=Object(s.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)(l(e),function(e){var r=e.tagName;return t===r})}function p(e,t){return Object(c.find)(l(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)}}function g(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),o=Object.keys(n);if(a.length!==o.length)return!1;for(var i=a.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o,s=r.slice(0);if(i===u){var l=Object(c.find)(s[i],{type:t.type});if(!l){var f=s[i-1]||[];return{formats:r,text:n,start:a,end:o,formatPlaceholder:{index:i,format:Object(c.find)(f,{type:t.type})?void 0:t}}}for(;Object(c.find)(s[i],l);)y(s,i,t),i--;for(u++;Object(c.find)(s[u],l);)y(s,u,t),u++}else for(var d=i;d0&&void 0!==arguments[0]?arguments[0]:{},t=e.element,r=e.text,n=e.html,a=e.range,o=e.multilineTag,i=e.multilineWrapperTags,c=e.removeNode,u=e.unwrapNode,s=e.filterString,l=e.removeAttribute;return"string"==typeof r&&r.length>0?{formats:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=function(e,t){var r=e.implementation.createHTMLDocument("").body;return r.innerHTML=t,r}(document,n)),"object"!==Object(j.a)(t)?{formats:[],text:""}:o?k({element:t,range:a,multilineTag:o,multilineWrapperTags:i,removeNode:c,unwrapNode:u,filterString:s,removeAttribute:l}):R({element:t,range:a,removeNode:c,unwrapNode:u,filterString:s,removeAttribute:l}))}function L(e,t,r,n){if(r){var a=t.parentNode,o=r.startContainer,i=r.startOffset,c=r.endContainer,u=r.endOffset,s=e.text.length;void 0!==n.start?e.start=s+n.start:t===o&&t.nodeType===C?e.start=s+i:a===o&&t===o.childNodes[i]?e.start=s:a===o&&t===o.childNodes[i-1]?e.start=s+n.text.length:t===o&&(e.start=s),void 0!==n.end?e.end=s+n.end:t===c&&t.nodeType===C?e.end=s+u:a===c&&t===c.childNodes[u-1]?e.end=s+n.text.length:a===c&&t===c.childNodes[u]?e.end=s:t===c&&(e.end=s+u)}}function M(e,t,r){if(t){var n=t.startContainer,a=t.endContainer,o=t.startOffset,i=t.endOffset;return e===n&&(o=r(e.nodeValue.slice(0,o)).length),e===a&&(i=r(e.nodeValue.slice(0,i)).length),{startContainer:n,startOffset:o,endContainer:a,endOffset:i}}}function R(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,o=e.currentWrapperTags,i=void 0===o?[]:o,c=e.removeNode,u=e.unwrapNode,s=e.filterString,l=e.removeAttribute,f={formats:[],text:""};if(!t)return f;if(!t.hasChildNodes())return L(f,t,r,{formats:[],text:""}),f;for(var d=t.childNodes.length,p=function(e){return e=e.replace(/[\r\n]/g,""),s&&(e=s(e)),e},m=0;m0){var b=l.length>0?[l]:[,];f.formats=f.formats.concat(b),f.text+=w}L(f,m,r,v),f.formats=f.formats.concat(v.formats),f.text+=v.text}}return f}function I(e){var t=e.element,r=e.removeAttribute;if(t.hasAttributes()){for(var n,a=t.attributes.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=W({text:t})),h(e.reduce(function(e,r){var n=r.formats,a=r.text;return{text:e.text+t.text+a,formats:e.formats.concat(t.formats,n)}}))}var $=r(18),q=r(15),U=r(0),X=r(23);function Z(e,t){if("string"==typeof(t=Object(i.a)({name:e},t)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(t.name))if(Object(o.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(o.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(o.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)return Object(o.dispatch)("core/rich-text").addFormatTypes(t),t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object(X.addFilter)("experimentalRichText",e,function(r){return Object(o.withSelect)(function(r,n){var a=n.clientId,o=n.identifier;return Object(q.a)({},"format_".concat(e),t.__experimentalGetPropsForEditableTreePreparation(r,{richTextIdentifier:o,blockClientId:a}))})(function(n){return Object(U.createElement)(r,Object($.a)({},n,{prepareEditableTree:Object(O.a)(n.prepareEditableTree||[]).concat([t.__experimentalCreatePrepareEditableTree(n["format_".concat(e)],{richTextIdentifier:n.identifier,blockClientId:n.clientId})])}))})}),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 J(e,t){var r=e.formats,n=e.text,a=e.start,o=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o,s=r.slice(0);if(i===u){for(var l=Object(c.find)(s[i],{type:t});Object(c.find)(s[i],l);)K(s,i,t),i--;for(u++;Object(c.find)(s[u],l);)K(s,u,t),u++}else for(var f=i;f2&&void 0!==arguments[2]?arguments[2]:a,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;"string"==typeof t&&(t=W({text:t}));var u=i+t.text.length;return h({formats:r.slice(0,i).concat(t.formats,r.slice(c)),text:n.slice(0,i)+t.text+n.slice(c),start:u,end:u})}function ee(e,t,r){return Q(e,W(),t,r)}function te(e,t,r){var n=e.formats,a=e.text,o=e.start,i=e.end;return a=a.replace(t,function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),c=1;c1&&void 0!==arguments[1]?arguments[1]:e.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,n=z(e).slice(0,t).lastIndexOf(w),a=[,];return-1!==n&&(a=[e.formats[n]]),Q(e,{formats:a,text:w},t,r)}var ne="";function ae(e,t,r,n){return Q(e,{text:ne,formats:[[Object(i.a)({},t,{object:!0})]]},r,n)}function oe(e){var t=e.formats,r=e.text,n=e.start,a=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;return void 0===o||void 0===i?{formats:t,text:r}:{formats:t.slice(o,i),text:r.slice(o,i)}}function ie(e,t){var r=e.formats,n=e.text,a=e.start,o=e.end;if("string"!=typeof t)return function(e){var t=e.formats,r=e.text,n=e.start,a=e.end,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,c={formats:t.slice(0,o),text:r.slice(0,o)},u={formats:t.slice(i),text:r.slice(i),start:0,end:0};return[te(c,/\u2028+$/,""),te(u,/^\u2028+/,"")]}.apply(void 0,arguments);var i=0;return n.split(t).map(function(e){var n=i,c={formats:r.slice(n,n+e.length),text:e};return i+=t.length+e.length,void 0!==a&&void 0!==o&&(a>=n&&an&&(c.start=0),o>=n&&oi&&(c.end=e.length)),c})}function ce(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,c=function(e){return Object(o.select)("core/rich-text").getFormatType(e)}(t);if(!c)return{type:t,attributes:r,object:a};var u=Object(i.a)({},n);for(var s in r){var l=c.attributes[s];l?u[l]=r[s]:u[s]=r[s]}return c.className&&(u.class?u.class="".concat(c.className," ").concat(u.class):u.class=c.className),{type:c.tagName,object:c.object,attributes:u}}function ue(e){var t,r,n,a=e.value,o=e.multilineTag,i=e.multilineWrapperTags,c=void 0===i?[]:i,u=e.createEmpty,s=e.append,l=e.getLastChild,f=e.getParent,d=e.isText,p=e.getText,m=e.remove,v=e.appendText,g=e.onStartIndex,h=e.onEndIndex,b=e.isEditableTree,y=a.formats,x=a.text,T=a.start,j=a.end,S=a.formatPlaceholder,F=y.length+1,A=u(),C={type:o};function P(e,t){if(b&&S&&S.index===t){var r=f(e);e=void 0===S.format?f(r):s(r,ce(S.format)),e=s(e,E)}return e}o?(s(s(A,{type:o}),""),r=t=[C]):s(A,"");for(var _=function(e){var a=x.charAt(e),i=y[e];o&&(i=a===w?t=(i||[]).reduce(function(e,t){return a===w&&-1!==c.indexOf(t.type)&&(e.push(t),e.push(C)),e},[C]):Object(O.a)(t).concat(Object(O.a)(i||[])));var u=l(A);if(n===w){for(var b=u;!d(b);)b=l(b);g&&T===e&&g(A,b),h&&j===e&&h(A,b)}if(i&&i.forEach(function(e,t){if(!u||!r||e!==r[t]||a===w&&i.length-1===t){var n=f(u),o=s(n,ce(e));d(u)&&0===p(u).length&&m(u),u=s(e.object?n:o,"")}else u=l(u)}),a===w)return r=i,n=a,"continue";u=P(u,0),0===e&&(g&&0===T&&g(A,u),h&&0===j&&h(A,u)),a!==N&&("\n"===a?(u=s(f(u),{type:"br",object:!0}),u=s(f(u),"")):d(u)?v(u,a):u=s(f(u),a)),u=P(u,e+1),g&&T===e+1&&g(A,u),h&&j===e+1&&h(A,u),r=i,n=a},D=0;D1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}function me(){return document.implementation.createHTMLDocument("").body}function ve(e,t){"string"==typeof t&&(t=e.ownerDocument.createTextNode(t));var r=t,n=r.type,a=r.attributes;if(n)for(var o in t=e.ownerDocument.createElement(n),a)t.setAttribute(o,a[o]);return e.appendChild(t)}function ge(e,t){e.appendData(t)}function he(e){return e.lastChild}function be(e){return e.parentNode}function ye(e){return e.nodeType===le}function xe(e){return e.nodeValue}function Te(e){return e.parentNode.removeChild(e)}function Oe(){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 je(e){var t=e.value,r=e.multilineTag,n=e.multilineWrapperTags,a=e.createLinePadding,o=e.prepareEditableTree,c=[],u=[],s=ue({value:Object(i.a)({},t,{formats:Oe(o,t)}),multilineTag:r,multilineWrapperTags:n,createEmpty:me,append:ve,getLastChild:he,getParent:be,isText:ye,getText:xe,remove:Te,appendText:ge,onStartIndex:function(e,t){c=de(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){u=de(t,e,[t.nodeValue.length])},isEditableTree:!0});return a&&function e(t){for(var r=t.element,n=t.createLinePadding,a=t.multilineWrapperTags,o=r.childNodes.length,i=r.ownerDocument,c=0;c0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return void 0===e.text?function(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,o="";for(var i in r)Object(Ne.isValidAttributeName)(i)&&(o+=" ".concat(i,'="').concat(Object(Ne.escapeAttribute)(r[i]),'"'));return n?"<".concat(t).concat(o,">"):"<".concat(t).concat(o,">").concat(Re(a),"")}(e):Object(Ne.escapeHTML)(e.text)}).join("")}function ke(e,t){return V(e,t.type)?J(e,t.type):b(e,t)}function Ie(e){var t=Object(o.select)("core/rich-text").getFormatType(e);if(t)return t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object(X.removeFilter)("experimentalRichText",e),Object(o.dispatch)("core/rich-text").removeFormatTypes(e),t;window.console.error("Format ".concat(e," is not registered."))}r.d(t,"applyFormat",function(){return b}),r.d(t,"charAt",function(){return x}),r.d(t,"concat",function(){return T}),r.d(t,"create",function(){return W}),r.d(t,"getActiveFormat",function(){return V}),r.d(t,"getSelectionEnd",function(){return B}),r.d(t,"getSelectionStart",function(){return H}),r.d(t,"getTextContent",function(){return z}),r.d(t,"isCollapsed",function(){return G}),r.d(t,"isEmpty",function(){return S}),r.d(t,"isEmptyLine",function(){return F}),r.d(t,"join",function(){return Y}),r.d(t,"registerFormatType",function(){return Z}),r.d(t,"removeFormat",function(){return J}),r.d(t,"remove",function(){return ee}),r.d(t,"replace",function(){return te}),r.d(t,"insert",function(){return Q}),r.d(t,"insertLineSeparator",function(){return re}),r.d(t,"insertObject",function(){return ae}),r.d(t,"slice",function(){return oe}),r.d(t,"split",function(){return ie}),r.d(t,"apply",function(){return we}),r.d(t,"unstableToDom",function(){return je}),r.d(t,"toHTMLString",function(){return Fe}),r.d(t,"toggleFormat",function(){return ke}),r.d(t,"LINE_SEPARATOR",function(){return w}),r.d(t,"unregisterFormatType",function(){return Ie})},32:function(e,t,r){"use strict";var n,a;function o(e){return[e]}function i(){var e={clear:function(){e.head=null}};return e}function c(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n