1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
this.wp=this.wp||{},this.wp.richText=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=309)}({15:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",function(){return n})},19:function(t,e,r){"use strict";var n=r(32);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||Object(n.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(e,"a",function(){return o})},2:function(t,e){!function(){t.exports=this.lodash}()},27:function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return(o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}r.d(e,"a",function(){return o})},30:function(t,e){!function(){t.exports=this.wp.deprecated}()},309:function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"getFormatTypes",function(){return s}),r.d(n,"getFormatType",function(){return l});var o={};r.r(o),r.d(o,"addFormatTypes",function(){return d}),r.d(o,"removeFormatTypes",function(){return p});var i=r(5),a=r(8),u=r(2);var c=Object(i.combineReducers)({formatTypes:function(){var t=arguments.length>0&&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=r(34),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)}}function m(t,e){if(t===e)return!0;if(!t||!e)return!1;if(t.type!==e.type)return!1;var r=t.attributes,n=e.attributes;if(r===n)return!0;if(!r||!n)return!1;var o=Object.keys(r),i=Object.keys(n);if(o.length!==i.length)return!1;for(var a=o.length,u=0;u<a;u++){var c=o[u];if(r[c]!==n[c])return!1}return!0}function v(t){var e=t.formats,r=t.text,n=t.start,o=t.end,i=e.slice(0);return i.forEach(function(t,e){var r=i[e-1];if(r){var n=t.slice(0);n.forEach(function(t,e){var o=r[e];m(t,o)&&(n[e]=o)}),i[e]=n}}),{formats:i,text:r,start:n,end:o}}function g(t,e){var r=t.formats,n=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=r.slice(0);if(a===c){var s=Object(u.find)(f[a],{type:e.type});if(!s){var l=f[a-1]||[];return{formats:r,text:n,start:o,end:i,formatPlaceholder:{index:a,format:Object(u.find)(l,{type:e.type})?void 0:e}}}for(;Object(u.find)(f[a],s);)h(f,a,e),a--;for(c++;Object(u.find)(f[c],s);)h(f,c,e),c++}else for(var d=a;d<c;d++)h(f,d,e);return v({formats:f,text:n,start:o,end:i})}function h(t,e,r){if(t[e]){var n=t[e].filter(function(t){return t.type!==r.type});n.push(r),t[e]=n}else t[e]=[r]}function y(t,e){return t.text[e]}function b(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return v(e.reduce(function(t,e){var r=e.formats,n=e.text;return{text:t.text+n,formats:t.formats.concat(r)}}))}Object(i.registerStore)("core/rich-text",{reducer:c,selectors:n,actions:o});var x=r(19),T=r(27),O="\u2028",j="",w="\ufeff";function N(t){return 0===t.text.length}function S(t){var e=t.text,r=t.start,n=t.end;return r===n&&(0===e.length||(0===r&&e.slice(0,1)===O||(r===e.length&&e.slice(-1)===O||e.slice(r-1,n+1)==="".concat(O).concat(O))))}function E(){return Object(i.select)("core/rich-text").getFormatTypes()}var A=window.Node,C=A.TEXT_NODE,P=A.ELEMENT_NODE;function F(t,e){for(var r in t)if(t[r]===e)return r}function D(t){var e=t.type,r=t.attributes,n=Object(u.find)(E(),function(t){var r=t.match;return e===r.tagName});if(!n)return r?{type:e,attributes:r}:{type:e};if(!r)return{type:n.name};var o={},i={};for(var a in r){var c=F(n.attributes,a);c?o[c]=r[a]:i[a]=r[a]}return{type:n.name,attributes:o,unregisteredAttributes:i}}function W(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.element,r=t.text,n=t.html,o=t.range,i=t.multilineTag,a=t.multilineWrapperTags,u=t.removeNode,c=t.unwrapNode,f=t.filterString,s=t.removeAttribute;return"string"==typeof r&&r.length>0?{formats:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(e=function(t,e){var r=t.implementation.createHTMLDocument("").body;return r.innerHTML=e,r}(document,n)),"object"!==Object(T.a)(e)?{formats:[],text:""}:i?R({element:e,range:o,multilineTag:i,multilineWrapperTags:a,removeNode:u,unwrapNode:c,filterString:f,removeAttribute:s}):_({element:e,range:o,removeNode:u,unwrapNode:c,filterString:f,removeAttribute:s}))}function L(t,e,r,n){if(r){var o=e.parentNode,i=r.startContainer,a=r.startOffset,u=r.endContainer,c=r.endOffset,f=t.text.length;void 0!==n.start?t.start=f+n.start:e===i&&e.nodeType===C?t.start=f+a:o===i&&e===i.childNodes[a]?t.start=f:o===i&&e===i.childNodes[a-1]?t.start=f+n.text.length:e===i&&(t.start=f),void 0!==n.end?t.end=f+n.end:e===u&&e.nodeType===C?t.end=f+c:o===u&&e===u.childNodes[c-1]?t.end=f+n.text.length:o===u&&e===u.childNodes[c]?t.end=f:e===u&&(t.end=f+c)}}function M(t,e,r){if(e){var n=e.startContainer,o=e.endContainer,i=e.startOffset,a=e.endOffset;return t===n&&(i=r(t.nodeValue.slice(0,i)).length),t===o&&(a=r(t.nodeValue.slice(0,a)).length),{startContainer:n,startOffset:i,endContainer:o,endOffset:a}}}function _(t){var e=t.element,r=t.range,n=t.multilineTag,o=t.multilineWrapperTags,i=t.currentWrapperTags,a=void 0===i?[]:i,u=t.removeNode,c=t.unwrapNode,f=t.filterString,s=t.removeAttribute,l={formats:[],text:""};if(!e)return l;if(!e.hasChildNodes())return L(l,e,r,{formats:[],text:""}),l;for(var d=e.childNodes.length,p=function(t){return t=t.replace(/[\r\n]/g,""),f&&(t=f(t)),t},v=0;v<d;v++){var g=e.childNodes[v],h=g.nodeName.toLowerCase();if(g.nodeType!==C){if(g.nodeType===P)if(u&&u(g)||c&&c(g)&&!g.hasChildNodes())L(l,g,r,{formats:[],text:""});else if("br"!==h){var y=l.formats[l.formats.length-1],b=y&&y[y.length-1],T=void 0,O=void 0;if(!c||!c(g)){var w=D({type:h,attributes:V({element:g,removeAttribute:s})});T=m(w,b)?b:w}o&&-1!==o.indexOf(h)?(O=R({element:g,range:r,multilineTag:n,multilineWrapperTags:o,removeNode:u,unwrapNode:c,filterString:f,removeAttribute:s,currentWrapperTags:Object(x.a)(a).concat([T])}),T=void 0):O=_({element:g,range:r,multilineTag:n,multilineWrapperTags:o,removeNode:u,unwrapNode:c,filterString:f,removeAttribute:s});var S=O.text,E=l.text.length;if(L(l,g,r,O),!N(O)||!T||T.attributes){var A=l.formats;if(T&&T.attributes&&0===S.length)T.object=!0,l.text+=j,A[E]?A[E].unshift(T):A[E]=[T];else{l.text+=S,l.formats.length+=S.length;for(var F=O.formats.length;F--;){var W,k=E+F;if(T&&(A[k]?A[k].push(T):A[k]=[T]),O.formats[F])if(A[k])(W=A[k]).push.apply(W,Object(x.a)(O.formats[F]));else A[k]=O.formats[F]}}}}else L(l,g,r,{formats:[],text:""}),l.text+="\n",l.formats.length+=1}else{var H=p(g.nodeValue);L(l,g,r=M(g,r,p),{text:H}),l.text+=H,l.formats.length+=H.length}}return l}function R(t){var e=t.element,r=t.range,n=t.multilineTag,o=t.multilineWrapperTags,i=t.removeNode,a=t.unwrapNode,u=t.filterString,c=t.removeAttribute,f=t.currentWrapperTags,s=void 0===f?[]:f,l={formats:[],text:""};if(!e||!e.hasChildNodes())return l;for(var d=e.children.length,p=0;p<d;p++){var m=e.children[p];if(m.nodeName.toLowerCase()===n){var v=_({element:m,range:r,multilineTag:n,multilineWrapperTags:o,currentWrapperTags:s,removeNode:i,unwrapNode:a,filterString:u,removeAttribute:c});if("\n"===v.text){var g=v.start,h=v.end;v={formats:[],text:""},void 0!==g&&(v.start=0),void 0!==h&&(v.end=0)}if(0!==p||s.length>0){var y=s.length>0?[s]:[,];l.formats=l.formats.concat(y),l.text+=O}L(l,m,r,v),l.formats=l.formats.concat(v.formats),l.text+=v.text}}return l}function V(t){var e=t.element,r=t.removeAttribute;if(e.hasAttributes()){for(var n,o=e.attributes.length,i=0;i<o;i++){var a=e.attributes[i],u=a.name,c=a.value;r&&r(u)||((n=n||{})[u]=c)}return n}}function k(t,e){var r=t.formats,n=t.start;if(void 0!==n)return Object(u.find)(r[n],{type:e})}function H(t){return Object(i.select)("core/rich-text").getFormatType(t)}function I(t){return t.end}function B(t){return t.start}function z(t){return t.text}function Y(t){var e=t.start,r=t.end;if(void 0!==e&&void 0!==r)return e===r}function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof e&&(e=W({text:e})),v(t.reduce(function(t,r){var n=r.formats,o=r.text;return{text:t.text+e.text+o,formats:t.formats.concat(e.formats,n)}}))}function U(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)return Object(i.dispatch)("core/rich-text").addFormatTypes(e),e;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 X(t,e){var r=t.formats,n=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=r.slice(0);if(a===c){for(var s=Object(u.find)(f[a],{type:e});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 l=a;l<c;l++)f[l]&&$(f,l,e);return v({formats:f,text:n,start:o,end:i})}function $(t,e,r){var n=t[e].filter(function(t){return t.type!==r});n.length?t[e]=n:delete t[e]}function G(t,e){var r=t.formats,n=t.text,o=t.start,i=t.end,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;"string"==typeof e&&(e=W({text:e}));var c=a+e.text.length;return v({formats:r.slice(0,a).concat(e.formats,r.slice(u)),text:n.slice(0,a)+e.text+n.slice(u),start:c,end:c})}function J(t,e,r){return G(t,W(),e,r)}function K(t,e,r){var n=t.formats,o=t.text,i=t.start,a=t.end;return o=o.replace(e,function(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),u=1;u<e;u++)o[u-1]=arguments[u];var c,f=o[o.length-2],s=r;return"function"==typeof s&&(s=r.apply(void 0,[t].concat(o))),"object"===Object(T.a)(s)?(c=s.formats,s=s.text):(c=Array(s.length),n[f]&&(c=c.fill(n[f]))),n=n.slice(0,f).concat(c,n.slice(f+t.length)),i&&(i=a=f+s.length),s}),v({formats:n,text:o,start:i,end:a})}function Q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.start,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.end,n=z(t).slice(0,e).lastIndexOf(O),o=[,];return-1!==n&&(o=[t.formats[n]]),G(t,{formats:o,text:O},e,r)}var Z="";function tt(t,e,r,n){return G(t,{text:Z,formats:[[Object(a.a)({},e,{object:!0})]]},r,n)}function et(t){var e=t.formats,r=t.text,n=t.start,o=t.end,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;return void 0===i||void 0===a?{formats:e,text:r}:{formats:e.slice(i,a),text:r.slice(i,a)}}function rt(t,e){var r=t.formats,n=t.text,o=t.start,i=t.end;if("string"!=typeof e)return function(t){var e=t.formats,r=t.text,n=t.start,o=t.end,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,u={formats:e.slice(0,i),text:r.slice(0,i)},c={formats:e.slice(a),text:r.slice(a),start:0,end:0};return[K(u,/\u2028+$/,""),K(c,/^\u2028+/,"")]}.apply(void 0,arguments);var a=0;return n.split(e).map(function(t){var n=a,u={formats:r.slice(n,n+t.length),text:t};return a+=e.length+t.length,void 0!==o&&void 0!==i&&(o>=n&&o<a?u.start=o-n:o<n&&i>n&&(u.start=0),i>=n&&i<a?u.end=i-n:o<a&&i>a&&(u.end=t.length)),u})}function nt(t){var e=t.type,r=t.attributes,n=t.object,o=H(e);if(!o)return{type:e,attributes:r,object:n};if(!r)return{type:o.match.tagName,object:o.object};var i={};for(var a in r){var u=o.attributes[a];u?i[u]=r[a]:i[a]=r[a]}return{type:o.match.tagName,object:o.object,attributes:i}}function ot(t){var e,r,n,o=t.value,i=t.multilineTag,a=t.multilineWrapperTags,u=t.createEmpty,c=t.append,f=t.getLastChild,s=t.getParent,l=t.isText,d=t.getText,p=t.remove,m=t.appendText,v=t.onStartIndex,g=t.onEndIndex,h=t.isEditableTree,y=o.formats,b=o.text,T=o.start,N=o.end,S=o.formatPlaceholder,E=y.length+1,A=u(),C={type:i};function P(t,e){if(h&&S&&S.index===e){var r=s(t);t=void 0===S.format?s(r):c(r,nt(S.format)),t=c(t,w)}return t}i?(c(c(A,{type:i}),""),r=e=[C]):c(A,"");for(var F=function(t){var o=b.charAt(t),u=y[t];i&&(u=o===O?e=(u||[]).reduce(function(t,e){return o===O&&-1!==a.indexOf(e.type)&&(t.push(e),t.push(C)),t},[C]):Object(x.a)(e).concat(Object(x.a)(u||[])));var h=f(A);if(n===O){for(var w=h;!l(w);)w=f(w);v&&T===t&&v(A,w),g&&N===t&&g(A,w)}if(u&&u.forEach(function(t,e){if(!h||!r||t!==r[e]||o===O&&u.length-1===e){var n=t.type,i=t.attributes,a=t.object,m=s(h),v=c(m,nt({type:n,attributes:i,object:a}));l(h)&&0===d(h).length&&p(h),h=c(a?m:v,"")}else h=f(h)}),o===O)return r=u,n=o,"continue";h=P(h,0),0===t&&(v&&0===T&&v(A,h),g&&0===N&&g(A,h)),o!==j&&("\n"===o?(h=c(s(h),{type:"br",object:!0}),h=c(s(h),"")):l(h)?m(h,o):h=c(s(h),o)),h=P(h,t+1),v&&T===t+1&&v(A,h),g&&N===t+1&&g(A,h),r=u,n=o},D=0;D<E;D++)F(D);return A}var it=window.Node,at=it.TEXT_NODE,ut=it.ELEMENT_NODE;function ct(t,e,r){for(var n=t.parentNode,o=0;t=t.previousSibling;)o++;return r=[o].concat(Object(x.a)(r)),n!==e&&(r=ct(n,e,r)),r}function ft(t,e){for(e=Object(x.a)(e);t&&e.length>1;)t=t.childNodes[e.shift()];return{node:t,offset:e[0]}}function st(){return document.implementation.createHTMLDocument("").body}function lt(t,e){"string"==typeof e&&(e=t.ownerDocument.createTextNode(e));var r=e,n=r.type,o=r.attributes;if(n)for(var i in e=t.ownerDocument.createElement(n),o)e.setAttribute(i,o[i]);return t.appendChild(e)}function dt(t,e){t.appendData(e)}function pt(t){return t.lastChild}function mt(t){return t.parentNode}function vt(t){return t.nodeType===at}function gt(t){return t.nodeValue}function ht(t){return t.parentNode.removeChild(t)}function yt(t){var e=t.value,r=t.multilineTag,n=t.multilineWrapperTags,o=t.createLinePadding,i=[],a=[],u=ot({value:e,multilineTag:r,multilineWrapperTags:n,createEmpty:st,append:lt,getLastChild:pt,getParent:mt,isText:vt,getText:gt,remove:ht,appendText:dt,onStartIndex:function(t,e){i=ct(e,t,[e.nodeValue.length])},onEndIndex:function(t,e){a=ct(e,t,[e.nodeValue.length])},isEditableTree:!0});return o&&function t(e){for(var r=e.element,n=e.createLinePadding,o=e.multilineWrapperTags,i=r.childNodes.length,a=r.ownerDocument,u=0;u<i;u++){var c=r.childNodes[u];c.nodeType===at?1!==i||c.nodeValue||r.appendChild(n(a)):(o&&!c.previousSibling&&-1!==o.indexOf(c.nodeName.toLowerCase())&&r.insertBefore(n(a),c),t({element:c,createLinePadding:n,multilineWrapperTags:o}))}}({element:u,createLinePadding:o,multilineWrapperTags:n}),{body:u,selection:{startPath:i,endPath:a}}}function bt(t){var e=t.value,r=t.current,n=yt({value:e,multilineTag:t.multilineTag,multilineWrapperTags:t.multilineWrapperTags,createLinePadding:t.createLinePadding}),o=n.body,i=n.selection;!function(t,e){var r=0;for(;t.firstChild;){var n=e.childNodes[r],o=t.firstChild.nodeType;n?o!==n.nodeType||o!==at||t.firstChild.nodeValue!==n.nodeValue?e.replaceChild(t.firstChild,n):t.removeChild(t.firstChild):e.appendChild(t.firstChild),r++}for(;e.childNodes[r];)e.removeChild(e.childNodes[r])}(o,r),void 0!==e.start&&function(t,e){var r=ft(e,t.startPath),n=r.node,o=r.offset,i=ft(e,t.endPath),a=i.node,u=i.offset,c=window.getSelection(),f=e.ownerDocument.createRange(),s=n===a&&o===u;s&&0===o&&n.previousSibling&&n.previousSibling.nodeType===ut&&"BR"!==n.previousSibling.nodeName?(n.insertData(0,"\ufeff"),f.setStart(n,1),f.setEnd(a,1)):s&&0===o&&n===at&&0===n.nodeValue.length?(n.insertData(0,"\ufeff"),f.setStart(n,1),f.setEnd(a,1)):(f.setStart(n,o),f.setEnd(a,u));c.removeAllRanges(),c.addRange(f)}(i,r)}var xt=r(58),Tt=r(30),Ot=r.n(Tt);function jt(t){var e=t.value,r=t.multilineTag,n=t.multilineWrapperTags;return void 0===e&&(Ot()("wp.richText.toHTMLString positional parameters",{version:"4.4",alternative:"named parameters",plugin:"Gutenberg"}),e=arguments[0],r=arguments[1],n=arguments[2]),Dt(ot({value:e,multilineTag:r,multilineWrapperTags:n,createEmpty:wt,append:St,getLastChild:Nt,getParent:At,isText:Ct,getText:Pt,remove:Ft,appendText:Et}).children)}function wt(){return{}}function Nt(t){var e=t.children;return e&&e[e.length-1]}function St(t,e){return"string"==typeof e&&(e={text:e}),e.parent=t,t.children=t.children||[],t.children.push(e),e}function Et(t,e){t.text+=e}function At(t){return t.parent}function Ct(t){return"string"==typeof t.text}function Pt(t){return t.text}function Ft(t){var e=t.parent.children.indexOf(t);return-1!==e&&t.parent.children.splice(e,1),t}function Dt(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(t){return void 0===t.text?function(t){var e=t.type,r=t.attributes,n=t.object,o=t.children,i="";for(var a in r)Object(xt.isValidAttributeName)(a)&&(i+=" ".concat(a,'="').concat(Object(xt.escapeAttribute)(r[a]),'"'));return n?"<".concat(e).concat(i,">"):"<".concat(e).concat(i,">").concat(Dt(o),"</").concat(e,">")}(t):Object(xt.escapeHTML)(t.text)}).join("")}function Wt(t,e){return k(t,e.type)?X(t,e.type):g(t,e)}function Lt(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."))}r.d(e,"applyFormat",function(){return g}),r.d(e,"charAt",function(){return y}),r.d(e,"concat",function(){return b}),r.d(e,"create",function(){return W}),r.d(e,"getActiveFormat",function(){return k}),r.d(e,"getFormatType",function(){return H}),r.d(e,"getFormatTypes",function(){return E}),r.d(e,"getSelectionEnd",function(){return I}),r.d(e,"getSelectionStart",function(){return B}),r.d(e,"getTextContent",function(){return z}),r.d(e,"isCollapsed",function(){return Y}),r.d(e,"isEmpty",function(){return N}),r.d(e,"isEmptyLine",function(){return S}),r.d(e,"join",function(){return q}),r.d(e,"registerFormatType",function(){return U}),r.d(e,"removeFormat",function(){return X}),r.d(e,"remove",function(){return J}),r.d(e,"replace",function(){return K}),r.d(e,"insert",function(){return G}),r.d(e,"insertLineSeparator",function(){return Q}),r.d(e,"insertObject",function(){return tt}),r.d(e,"slice",function(){return et}),r.d(e,"split",function(){return rt}),r.d(e,"apply",function(){return bt}),r.d(e,"unstableToDom",function(){return yt}),r.d(e,"toHTMLString",function(){return jt}),r.d(e,"toggleFormat",function(){return Wt}),r.d(e,"LINE_SEPARATOR",function(){return O}),r.d(e,"unregisterFormatType",function(){return Lt})},32:function(t,e,r){"use strict";function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(e,"a",function(){return n})},34:function(t,e,r){"use strict";var n,o;function i(t){return[t]}function a(){var t={clear:function(){t.head=null}};return t}function u(t,e,r){var n;if(t.length!==e.length)return!1;for(n=r;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}n={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var r,c;function f(){r=o?new WeakMap:a()}function s(){var r,n,o,i,a,f=arguments.length;for(i=new Array(f),o=0;o<f;o++)i[o]=arguments[o];for(a=e.apply(null,i),(r=c(a)).isUniqueByDependants||(r.lastDependants&&!u(a,r.lastDependants,0)&&r.clear(),r.lastDependants=a),n=r.head;n;){if(u(n.args,i,1))return n!==r.head&&(n.prev.next=n.next,n.next&&(n.next.prev=n.prev),n.next=r.head,n.prev=null,r.head.prev=n,r.head=n),n.val;n=n.next}return n={val:t.apply(null,i)},i[0]=null,n.args=i,r.head&&(r.head.prev=n,n.next=r.head),r.head=n,n.val}return e||(e=i),c=o?function(t){var e,o,i,u,c,f=r,s=!0;for(e=0;e<t.length;e++){if(o=t[e],!(c=o)||"object"!=typeof c){s=!1;break}f.has(o)?f=f.get(o):(i=new WeakMap,f.set(o,i),f=i)}return f.has(n)||((u=a()).isUniqueByDependants=s,f.set(n,u)),f.get(n)}:function(){return r},s.getDependants=e,s.clear=f,f(),s}},5:function(t,e){!function(){t.exports=this.wp.data}()},58:function(t,e){!function(){t.exports=this.wp.escapeHtml}()},8:function(t,e,r){"use strict";r.d(e,"a",function(){return o});var n=r(15);function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){Object(n.a)(t,e,r[e])})}return t}}}); |