this.wp=this.wp||{},this.wp.richText=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.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 o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));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=307)}({15:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",function(){return r})},19:function(t,e,n){"use strict";var r=n(31);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ADD_FORMAT_TYPES":return Object(a.a)({},t,Object(u.keyBy)(e.formatTypes,"name"));case"REMOVE_FORMAT_TYPES":return Object(u.omit)(t,e.names)}return t}}),f=n(33),s=Object(f.a)(function(t){return Object.values(t.formatTypes)},function(t){return[t.formatTypes]});function l(t,e){return t.formatTypes[e]}function d(t){return{type:"ADD_FORMAT_TYPES",formatTypes:Object(u.castArray)(t)}}function p(t){return{type:"REMOVE_FORMAT_TYPES",names:Object(u.castArray)(t)}}Object(i.registerStore)("core/rich-text",{reducer:c,selectors:r,actions:o});var m=n(19);function v(t,e){if(t===e)return!0;if(!t||!e)return!1;if(t.type!==e.type)return!1;var n=t.attributes,r=e.attributes;if(n===r)return!0;if(!n||!r)return!1;var o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;for(var a=o.length,u=0;u0&&void 0!==arguments[0]?arguments[0]:{},e=t.element,n=t.text,r=t.html,o=t.range,i=t.multilineTag,a=t.removeNode,u=t.unwrapNode,c=t.filterString,f=t.removeAttribute;return"string"==typeof n&&n.length>0?{formats:Array(n.length),text:n}:("string"==typeof r&&r.length>0&&(e=function(t,e){var n=t.implementation.createHTMLDocument("").body;return n.innerHTML=e,n}(document,r)),"object"!==Object(g.a)(e)?{formats:[],text:""}:i?function(t){var e=t.element,n=t.range,r=t.multilineTag,o=t.removeNode,i=t.unwrapNode,a=t.filterString,u=t.removeAttribute,c={formats:[],text:""};if(!e||!e.hasChildNodes())return c;for(var f=e.children.length,s=0;s2&&void 0!==arguments[2]?arguments[2]:o,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;"string"==typeof e&&(e=E({text:e}));var c=a+e.text.length;return h({formats:n.slice(0,a).concat(e.formats,n.slice(u)),text:r.slice(0,a)+e.text+r.slice(u),start:c,end:c})}var M="\ufeff";function P(t,e){var n=t.formats,r=t.text,o=t.start,i=t.end,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i,f=n.slice(0);if(a===c){var s=Object(u.find)(f[a],{type:e.type});if(!s){var l=f[a-1]||[];return D({formats:n,text:r,start:o,end:i},{formats:Object(u.find)(l,{type:e.type})?[Object(u.reject)(l,{type:e.type})]:[Object(m.a)(l).concat([e])],text:M})}for(;Object(u.find)(f[a],s);)_(f,a,e),a--;for(c++;Object(u.find)(f[c],s);)_(f,c,e),c++}else for(var d=a;d1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof e&&(e=E({text:e})),h(t.reduce(function(t,n){var r=n.formats,o=n.text;return{text:t.text+e.text+o,formats:t.formats.concat(e.formats,r)}}))}var z=n(9);function B(t,e){if("string"==typeof(e=Object(a.a)({name:t},e)).name)if(/^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$/.test(e.name))if(Object(i.select)("core/rich-text").getFormatType(e.name))window.console.error('Format "'+e.name+'" is already registered.');else if(e&&Object(u.isFunction)(e.edit))if("title"in e&&""!==e.title)if("keywords"in e&&e.keywords.length>3)window.console.error('The format "'+e.name+'" can have a maximum of 3 keywords.');else if("string"==typeof e.title){if(e.icon=Object(z.normalizeIconObject)(e.icon),Object(z.isValidIcon)(e.icon.src))return Object(i.dispatch)("core/rich-text").addFormatTypes(e),e;window.console.error("The icon passed is invalid. The icon should be a string, an element, a function, or an object following the specifications documented in https://wordpress.org/gutenberg/handbook/format-api/#icon-optional")}else window.console.error("Format titles must be strings.");else window.console.error('The format "'+e.name+'" must have a title.');else window.console.error('The "edit" property must be specified and must be a valid function.');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 Y(t,e){var n=t.formats,r=t.text,o=t.start,i=t.end,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i,f=n.slice(0);if(a===c){for(var s=Object(u.find)(f[a],{type:e});Object(u.find)(f[a],s);)W(f,a,e),a--;for(c++;Object(u.find)(f[c],s);)W(f,c,e),c++}else for(var l=a;l1?e-1:0),u=1;u1&&void 0!==arguments[1]?arguments[1]:r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;return void 0===i||void 0===a?{formats:e,text:n}:{formats:e.slice(i,a),text:n.slice(i,a)}}function J(t,e){var n=t.formats,r=t.text,o=t.start,i=t.end;if("string"!=typeof e)return function(t){var e=t.formats,n=t.text,r=t.start,o=t.end,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,u={formats:e.slice(0,i),text:n.slice(0,i)},c={formats:e.slice(a),text:n.slice(a),start:0,end:0};return[U(u,/\u2028+$/,""),U(c,/^\u2028+/,"")]}.apply(void 0,arguments);var a=0;return r.split(e).map(function(t){var r=a,u={formats:n.slice(r,r+t.length),text:t};return a+=e.length+t.length,void 0!==o&&void 0!==i&&(o>=r&&or&&(u.start=0),i>=r&&ia&&(u.end=t.length)),u})}function K(t,e,n){if(e){var r=n.createEmpty,o=n.append,i=r();return J(t,"\u2028").forEach(function(t,r){o(i,K(t,null,Object(a.a)({},n,{tag:e,multilineIndex:r})))}),i}var u=n.tag,c=n.multilineIndex,f=n.createEmpty,s=n.append,l=n.getLastChild,d=n.getParent,p=n.isText,m=n.getText,v=n.remove,h=n.appendText,g=n.onStartIndex,b=n.onEndIndex,y=n.onEmpty,x=t.formats,j=t.text,O=t.start,T=t.end,w=x.length+1,N=f(u);s(N,"");for(var E=function(t){var e=j.charAt(t),n=x[t],r=x[t-1],o=l(N);n&&n.forEach(function(t,e){if(o&&r&&t===r[e])o=l(o);else{var n=t.type,i=t.attributes,a=t.object,u=d(o),c=s(u,function(t){var e=t.type,n=t.attributes,r=t.object,o=V(e);if(!o)return{type:e,attributes:n,object:r};if(!n)return{type:o.match.tagName,object:o.object};var i={};for(var a in n){var u=o.attributes[a];u?i[u]=n[a]:i[a]=n[a]}return{type:o.match.tagName,object:o.object,attributes:i}}({type:n,attributes:i,object:a}));p(o)&&0===m(o).length&&v(o),o=s(a?u:c,"")}}),g&&0===O&&0===t&&g(N,o,c),b&&0===T&&0===t&&b(N,o,c),""!==e&&("\n"===e?(o=s(d(o),{type:"br",object:!0}),o=s(d(o),"")):p(o)?h(o,e):o=s(d(o),e)),g&&O===t+1&&g(N,o,c),b&&T===t+1&&b(N,o,c)},S=0;S1;)t=t.childNodes[e.shift()];return{node:t,offset:e[0]}}function rt(t){var e=document.implementation.createHTMLDocument("").body;return t?e.appendChild(e.ownerDocument.createElement(t)):e}function ot(t,e){"string"==typeof e&&(e=t.ownerDocument.createTextNode(e));var n=e,r=n.type,o=n.attributes;if(r)for(var i in e=t.ownerDocument.createElement(r),o)e.setAttribute(i,o[i]);return t.appendChild(e)}function it(t,e){t.appendData(e)}function at(t){return t.lastChild}function ut(t){return t.parentNode}function ct(t){return t.nodeType===Z}function ft(t){return t.nodeValue}function st(t){return t.parentNode.removeChild(t)}function lt(t,e){var n=[],r=[];return{body:K(t,e,{createEmpty:rt,append:ot,getLastChild:at,getParent:ut,isText:ct,getText:ft,remove:st,appendText:it,onStartIndex:function(t,e,r){n=et(e,t,[e.nodeValue.length]),void 0!==r&&(n=[r].concat(Object(m.a)(n)))},onEndIndex:function(t,e,n){r=et(e,t,[e.nodeValue.length]),void 0!==n&&(r=[n].concat(Object(m.a)(r)))},onEmpty:function(t){var e=t.ownerDocument.createElement("br");e.setAttribute("data-mce-bogus","1"),t.appendChild(e)}}),selection:{startPath:n,endPath:r}}}function dt(t,e,n){var r=lt(t,n),o=r.body,i=r.selection;!function(t,e){var n=0;for(;t.firstChild;){var r=e.childNodes[n],o=t.firstChild.nodeType;r?o!==r.nodeType||o!==Z||t.firstChild.nodeValue!==r.nodeValue?e.replaceChild(t.firstChild,r):t.removeChild(t.firstChild):e.appendChild(t.firstChild),n++}for(;e.childNodes[n];)e.removeChild(e.childNodes[n])}(o,e),void 0!==t.start&&function(t,e){var n=nt(e,t.startPath),r=n.node,o=n.offset,i=nt(e,t.endPath),a=i.node,u=i.offset,c=window.getSelection(),f=e.ownerDocument.createRange(),s=r===a&&o===u;s&&0===o&&r.previousSibling&&r.previousSibling.nodeType===tt&&"BR"!==r.previousSibling.nodeName?(r.insertData(0,"\ufeff"),f.setStart(r,1),f.setEnd(a,1)):s&&0===o&&r===Z&&0===r.nodeValue.length?(r.insertData(0,"\ufeff"),f.setStart(r,1),f.setEnd(a,1)):(f.setStart(r,o),f.setEnd(a,u));c.removeAllRanges(),c.addRange(f)}(i,e)}var pt=n(59);function mt(t,e){return Tt(K(t,e,{createEmpty:vt,append:gt,getLastChild:ht,getParent:yt,isText:xt,getText:jt,remove:Ot,appendText:bt}).children)}function vt(t){return{type:t}}function ht(t){var e=t.children;return e&&e[e.length-1]}function gt(t,e){return"string"==typeof e&&(e={text:e}),e.parent=t,t.children=t.children||[],t.children.push(e),e}function bt(t,e){t.text+=e}function yt(t){return t.parent}function xt(t){return"string"==typeof t.text}function jt(t){return t.text}function Ot(t){var e=t.parent.children.indexOf(t);return-1!==e&&t.parent.children.splice(e,1),t}function Tt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(t){return void 0===t.text?function(t){var e=t.type,n=t.attributes,r=t.object,o=t.children,i="";for(var a in n)Object(pt.isValidAttributeName)(a)&&(i+=" ".concat(a,'="').concat(Object(pt.escapeAttribute)(n[a]),'"'));return r?"<".concat(e).concat(i,">"):"<".concat(e).concat(i,">").concat(Tt(o),"")}(t):Object(pt.escapeHTML)(t.text)}).join("")}function wt(t,e){return L(t,e.type)?Y(t,e.type):P(t,e)}function Nt(t){var e=Object(i.select)("core/rich-text").getFormatType(t);if(e)return Object(i.dispatch)("core/rich-text").removeFormatTypes(t),e;window.console.error("Format ".concat(t," is not registered."))}n.d(e,"applyFormat",function(){return P}),n.d(e,"concat",function(){return k}),n.d(e,"create",function(){return E}),n.d(e,"getActiveFormat",function(){return L}),n.d(e,"getFormatType",function(){return V}),n.d(e,"getFormatTypes",function(){return x}),n.d(e,"getTextContent",function(){return R}),n.d(e,"isCollapsed",function(){return I}),n.d(e,"isEmpty",function(){return b}),n.d(e,"isEmptyLine",function(){return y}),n.d(e,"join",function(){return H}),n.d(e,"registerFormatType",function(){return B}),n.d(e,"removeFormat",function(){return Y}),n.d(e,"remove",function(){return q}),n.d(e,"replace",function(){return U}),n.d(e,"insert",function(){return D}),n.d(e,"insertObject",function(){return $}),n.d(e,"slice",function(){return G}),n.d(e,"split",function(){return J}),n.d(e,"apply",function(){return dt}),n.d(e,"unstableToDom",function(){return lt}),n.d(e,"toHTMLString",function(){return mt}),n.d(e,"toggleFormat",function(){return wt}),n.d(e,"unregisterFormatType",function(){return Nt})},31:function(t,e,n){"use strict";function r(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}n.d(e,"a",function(){return r})},33:function(t,e,n){"use strict";var r,o;function i(t){return[t]}function a(t){return!!t&&"object"==typeof t}function u(){var t={clear:function(){t.head=null}};return t}function c(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r