%PDF- %PDF-
Direktori : /home/dopla/www/wp-includes/js/dist/ |
Current File : /home/dopla/www/wp-includes/js/dist/rich-text.min.js |
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,l=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(o=0;o<l;o++)if(c.args[o]!==arguments[o]){c=c.next;continue e}return c!==n&&(c===a&&(a=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=n,c.prev=null,n.prev=c,n=c),c.val}c=c.next}for(t=new Array(l),o=0;o<l;o++)t[o]=arguments[o];return c={args:t,val:e.apply(null,t)},n?(n.prev=c,c.next=n):a=c,i===r?(a=a.prev).next=null:i++,n=c,c.val}return t&&t.maxSize&&(r=t.maxSize),o.clear=function(){n=null,a=null,i=0},o}},GRId:function(e,t){!function(){e.exports=this.wp.element}()},K9lf:function(e,t){!function(){e.exports=this.wp.compose}()},KQm4:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r("25BE");function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||Object(n.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}},U8pU:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return(a="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)})(e)}r.d(t,"a",(function(){return a}))},Vx3V:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},YLtl:function(e,t){!function(){e.exports=this.lodash}()},g56x:function(e,t){!function(){e.exports=this.wp.hooks}()},pPDe:function(e,t,r){"use strict";var n,a;function i(e){return[e]}function o(){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<e.length;n++)if(e[n]!==t[n])return!1;return!0}n={},a="undefined"!=typeof WeakMap,t.a=function(e,t){var r,l;function s(){r=a?new WeakMap:o()}function u(){var r,n,a,i,o,s=arguments.length;for(i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];for(o=t.apply(null,i),(r=l(o)).isUniqueByDependants||(r.lastDependants&&!c(o,r.lastDependants,0)&&r.clear(),r.lastDependants=o),n=r.head;n;){if(c(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:e.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 t||(t=i),l=a?function(e){var t,a,i,c,l,s=r,u=!0;for(t=0;t<e.length;t++){if(a=e[t],!(l=a)||"object"!=typeof l){u=!1;break}s.has(a)?s=s.get(a):(i=new WeakMap,s.set(a,i),s=i)}return s.has(n)||((c=o()).isUniqueByDependants=u,s.set(n,c)),s.get(n)}:function(){return r},u.getDependants=t,u.clear=s,s(),u}},rePB: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}))},vpQ4:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r("rePB");function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),a.forEach((function(t){Object(n.a)(e,t,r[t])}))}return e}},wx14:function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r.d(t,"a",(function(){return n}))},yyEc:function(e,t,r){"use strict";r.r(t),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 L})),r.d(t,"getActiveFormat",(function(){return R})),r.d(t,"getSelectionEnd",(function(){return k})),r.d(t,"getSelectionStart",(function(){return B})),r.d(t,"getTextContent",(function(){return z})),r.d(t,"isCollapsed",(function(){return H})),r.d(t,"isEmpty",(function(){return N})),r.d(t,"isEmptyLine",(function(){return E})),r.d(t,"join",(function(){return U})),r.d(t,"registerFormatType",(function(){return J})),r.d(t,"removeFormat",(function(){return ee})),r.d(t,"remove",(function(){return ne})),r.d(t,"replace",(function(){return ae})),r.d(t,"insert",(function(){return re})),r.d(t,"insertLineSeparator",(function(){return ie})),r.d(t,"insertObject",(function(){return oe})),r.d(t,"slice",(function(){return ce})),r.d(t,"split",(function(){return le})),r.d(t,"apply",(function(){return _e})),r.d(t,"unstableToDom",(function(){return Ce})),r.d(t,"toHTMLString",(function(){return Ae})),r.d(t,"toggleFormat",(function(){return Be})),r.d(t,"LINE_SEPARATOR",(function(){return w})),r.d(t,"unregisterFormatType",(function(){return ze})),r.d(t,"indentListItems",(function(){return Ue})),r.d(t,"outdentListItems",(function(){return Ye})),r.d(t,"changeListType",(function(){return qe}));var n={};r.r(n),r.d(n,"getFormatTypes",(function(){return u})),r.d(n,"getFormatType",(function(){return f})),r.d(n,"getFormatTypeForBareElement",(function(){return d})),r.d(n,"getFormatTypeForClassName",(function(){return p}));var a={};r.r(a),r.d(a,"addFormatTypes",(function(){return m})),r.d(a,"removeFormatTypes",(function(){return g}));var i=r("1ZqX"),o=r("vpQ4"),c=r("YLtl");var l=Object(i.combineReducers)({formatTypes:function(){var e=arguments.length>0&&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}}),s=r("pPDe"),u=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)(u(e),(function(e){var r=e.tagName;return t===r}))}function p(e,t){return Object(c.find)(u(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 g(e){return{type:"REMOVE_FORMAT_TYPES",names:Object(c.castArray)(e)}}function v(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;c<o;c++){var l=a[c];if(r[l]!==n[l])return!1}return!0}function h(e){var t=e.formats,r=e.text,n=e.start,a=e.end,i=e.replacements,o=[];return{formats:t.map((function(e){return e.map((function(e){var t=Object(c.find)(o,(function(t){return v(t,e)}));return t||(o.push(e),e)}))})),text:r,start:n,end:a,replacements:i}}function b(e,t){var r=e.formats,n=e.text,a=e.start,i=e.end,o=e.replacements,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i,u=r.slice(0);if(l===s){var f=Object(c.find)(u[l],{type:t.type});if(!f){var d=u[l-1]||[],p=Object(c.find)(d,{type:t.type});return{formats:r,text:n,start:a,end:i,replacements:o,formatPlaceholder:{index:l,format:p?void 0:t}}}for(;Object(c.find)(u[l],f);)y(u,l,t),l--;for(s++;Object(c.find)(u[s],f);)y(u,s,t),s++}else for(var m=l;m<s;m++)y(u,m,t);return h({formats:u,text:n,start:a,end:i,replacements:o})}function y(e,t,r){if(e[t]){var n=e[t].filter((function(e){return e.type!==r.type}));n.push(r),e[t]=n}else e[t]=[r]}function x(e,t){return e.text[t]}function T(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return h(t.reduce((function(e,t){var r=t.formats,n=t.text;return{text:e.text+n,formats:e.formats.concat(r)}})))}Object(i.registerStore)("core/rich-text",{reducer:l,selectors:n,actions:a});var O=r("KQm4"),j=r("U8pU"),w="\u2028";function N(e){return 0===e.text.length}function E(e){var t=e.text,r=e.start,n=e.end;return r===n&&(0===t.length||(0===r&&t.slice(0,1)===w||(r===t.length&&t.slice(-1)===w||t.slice(r-1,n+1)==="".concat(w).concat(w))))}function C(e,t){var r=e.implementation;return C.body||(C.body=r.createHTMLDocument("").body),C.body.innerHTML=t,C.body}var _=window.Node,S=_.TEXT_NODE,A=_.ELEMENT_NODE;function F(e,t){for(var r in e)if(e[r]===t)return r}function P(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(!n)return{type:t.name};var a={},o={};for(var c in n){var l=F(t.attributes,c);l?a[l]=n[c]:o[c]=n[c]}return{type:t.name,attributes:a,unregisteredAttributes:o}}function L(){var e=arguments.length>0&&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.removeNode,l=e.unwrapNode,s=e.filterString,u=e.removeAttribute;return"string"==typeof r&&r.length>0?{formats:Array(r.length),replacements:Array(r.length),text:r}:("string"==typeof n&&n.length>0&&(t=C(document,n)),"object"!==Object(j.a)(t)?{formats:[],replacements:[],text:""}:i?V({element:t,range:a,multilineTag:i,multilineWrapperTags:o,removeNode:c,unwrapNode:l,filterString:s,removeAttribute:u}):I({element:t,range:a,removeNode:c,unwrapNode:l,filterString:s,removeAttribute:u}))}function D(e,t,r,n){if(r){var a=t.parentNode,i=r.startContainer,o=r.startOffset,c=r.endContainer,l=r.endOffset,s=e.text.length;void 0!==n.start?e.start=s+n.start:t===i&&t.nodeType===S?e.start=s+o:a===i&&t===i.childNodes[o]?e.start=s:a===i&&t===i.childNodes[o-1]?e.start=s+n.text.length:t===i&&(e.start=s),void 0!==n.end?e.end=s+n.end:t===c&&t.nodeType===S?e.end=s+l:a===c&&t===c.childNodes[l-1]?e.end=s+n.text.length:a===c&&t===c.childNodes[l]?e.end=s:t===c&&(e.end=s+l)}}function W(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}}}function I(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,i=e.currentWrapperTags,o=void 0===i?[]:i,c=e.removeNode,l=e.unwrapNode,s=e.filterString,u=e.removeAttribute,f={formats:[],replacements:[],text:""};if(!t)return f;if(!t.hasChildNodes())return D(f,t,r,{formats:[],replacements:[],text:""}),f;for(var d=t.childNodes.length,p=function(e){return e=e.replace(/[\n\r\t]+/g," "),s&&(e=s(e)),e},m=0;m<d;m++){var g=t.childNodes[m],h=g.nodeName.toLowerCase();if(g.nodeType!==S){if(g.nodeType===A)if(c&&c(g)||l&&l(g)&&!g.hasChildNodes())D(f,g,r,{formats:[],replacements:[],text:""});else if("script"!==h)if("br"!==h){var b=f.formats[f.formats.length-1],y=b&&b[b.length-1],x=void 0,T=void 0;if(!l||!l(g)){var j=P({type:h,attributes:M({element:g,removeAttribute:u})});j&&(x=v(j,y)?y:j)}a&&-1!==a.indexOf(h)?(T=V({element:g,range:r,multilineTag:n,multilineWrapperTags:a,removeNode:c,unwrapNode:l,filterString:s,removeAttribute:u,currentWrapperTags:Object(O.a)(o).concat([x])}),x=void 0):T=I({element:g,range:r,multilineTag:n,multilineWrapperTags:a,removeNode:c,unwrapNode:l,filterString:s,removeAttribute:u});var w=T.text,E=f.text.length;if(D(f,g,r,T),!N(T)||!x||x.attributes){var C=f.formats;if(x&&x.attributes&&0===w.length){var _=f.replacements[f.replacements.length-1];if(x.object=!0,v(_,x))return f;f.text+="",f.replacements.push(x),f.formats.length+=1}else{f.text+=w,f.formats.length+=w.length,f.replacements.length+=w.length;for(var F=T.formats.length;F--;){var L,R=E+F;if(x&&(C[R]?C[R].push(x):C[R]=[x]),T.formats[F])if(C[R])(L=C[R]).push.apply(L,Object(O.a)(T.formats[F]));else C[R]=T.formats[F];T.replacements[F]&&(f.replacements[R]=T.replacements[F])}}}}else D(f,g,r,{formats:[],replacements:[],text:""}),f.text+="\n",f.formats.length+=1,f.replacements.length+=1;else{var k={formats:[,],replacements:[{type:h,attributes:{"data-rich-text-script":g.getAttribute("data-rich-text-script")||encodeURIComponent(g.innerHTML)}}],text:""};D(f,g,r,k),f.formats.length+=1,f.replacements=f.replacements.concat(k.replacements),f.text+=""}}else{var B=p(g.nodeValue);D(f,g,r=W(g,r,p),{text:B}),f.text+=B,f.formats.length+=B.length,f.replacements.length+=B.length}}return f}function V(e){var t=e.element,r=e.range,n=e.multilineTag,a=e.multilineWrapperTags,i=e.removeNode,o=e.unwrapNode,c=e.filterString,l=e.removeAttribute,s=e.currentWrapperTags,u=void 0===s?[]:s,f={formats:[],replacements:[],text:""};if(!t||!t.hasChildNodes())return f;for(var d=t.children.length,p=0;p<d;p++){var m=t.children[p];if(m.nodeName.toLowerCase()===n){var g=I({element:m,range:r,multilineTag:n,multilineWrapperTags:a,currentWrapperTags:u,removeNode:i,unwrapNode:o,filterString:c,removeAttribute:l});if("\n"===g.text){var v=g.start,h=g.end;g={formats:[],replacements:[],text:""},void 0!==v&&(g.start=0),void 0!==h&&(g.end=0)}if(0!==p||u.length>0){var b=u.length>0?[u]:[,];f.formats=f.formats.concat(b),f.replacements.length+=1,f.text+=w}D(f,m,r,g),f.formats=f.formats.concat(g.formats),f.replacements=f.replacements.concat(g.replacements),f.text+=g.text}}return f}function M(e){var t=e.element,r=e.removeAttribute;if(t.hasAttributes()){for(var n,a=t.attributes.length,i=0;i<a;i++){var o=t.attributes[i],c=o.name,l=o.value;if(!r||!r(c))(n=n||{})[/^on/i.test(c)?"data-disable-rich-text-"+c:c]=l}return n}}function R(e,t){var r=e.formats,n=e.start;if(void 0!==n)return Object(c.find)(r[n],{type:t})}function k(e){return e.end}function B(e){return e.start}function z(e){return e.text}function H(e){var t=e.start,r=e.end;if(void 0!==t&&void 0!==r)return t===r}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"string"==typeof t&&(t=L({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 G=r("rePB"),Y=r("wx14"),q=r("GRId"),K=r("4eJC"),Q=r.n(K),X=r("g56x"),Z=r("K9lf"),$=[];function J(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=Q()((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$,t=arguments.length>1?arguments[1]:void 0;return Object(O.a)(e).concat([t])}));return t.__experimentalGetPropsForEditableTreePreparation&&Object(X.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(Y.a)({},n,i))});var l=[Object(i.withSelect)((function(r,n){var a=n.clientId,i=n.identifier;return Object(G.a)({},"format_".concat(e),t.__experimentalGetPropsForEditableTreePreparation(r,{richTextIdentifier:i,blockClientId:a}))}))];return t.__experimentalGetPropsForEditableTreeChangeHandler&&l.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(Z.compose)(l)(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 ee(e,t){var r=e.formats,n=e.text,a=e.start,i=e.end,o=e.replacements,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i,u=r.slice(0);if(l===s){for(var f=Object(c.find)(u[l],{type:t});Object(c.find)(u[l],f);)te(u,l,t),l--;for(s++;Object(c.find)(u[s],f);)te(u,s,t),s++}else for(var d=l;d<s;d++)u[d]&&te(u,d,t);return h({formats:u,text:n,start:a,end:i,replacements:o})}function te(e,t,r){var n=e[t].filter((function(e){return e.type!==r}));n.length?e[t]=n:delete e[t]}function re(e,t){var r=e.formats,n=e.text,a=e.start,i=e.end,o=e.replacements,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;"string"==typeof t&&(t=L({text:t}));var s=c+t.text.length;return h({formats:r.slice(0,c).concat(t.formats,r.slice(l)),text:n.slice(0,c)+t.text+n.slice(l),replacements:o.slice(0,c).concat(t.replacements,o.slice(l)),start:s,end:s})}function ne(e,t,r){return re(e,L(),t,r)}function ae(e,t,r){var n=e.formats,a=e.text,i=e.start,o=e.end,c=e.replacements;return a=a.replace(t,(function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),l=1;l<t;l++)a[l-1]=arguments[l];var s,u,f=a[a.length-2],d=r;return"function"==typeof d&&(d=r.apply(void 0,[e].concat(a))),"object"===Object(j.a)(d)?(s=d.formats,u=d.replacements,d=d.text):(s=Array(d.length),u=Array(d.length),n[f]&&(s=s.fill(n[f]))),n=n.slice(0,f).concat(s,n.slice(f+e.length)),c=c.slice(0,f).concat(u,c.slice(f+e.length)),i&&(i=o=f+d.length),d})),h({formats:n,replacements:c,text:a,start:i,end:o})}function ie(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=z(e).slice(0,t),a=n.lastIndexOf(w),i=e.formats[a],o=[,];i&&(o=[i]);var c={formats:o,replacements:[,],text:w};return re(e,c,t,r)}function oe(e,t,r,n){return re(e,{text:"",replacements:[Object(o.a)({},t,{object:!0})],formats:[,]},r,n)}function ce(e){var t=e.formats,r=e.text,n=e.start,a=e.end,i=e.replacements,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;return void 0===o||void 0===c?{formats:t,text:r,replacements:i}:{formats:t.slice(o,c),replacements:i.slice(o,c),text:r.slice(o,c)}}function le(e,t){var r=e.formats,n=e.text,a=e.start,i=e.end,o=e.replacements;if("string"!=typeof t)return se.apply(void 0,arguments);var c=0;return n.split(t).map((function(e){var n=c,l={formats:r.slice(n,n+e.length),replacements:o.slice(n,n+e.length),text:e};return c+=t.length+e.length,void 0!==a&&void 0!==i&&(a>=n&&a<c?l.start=a-n:a<n&&i>n&&(l.start=0),i>=n&&i<c?l.end=i-n:a<c&&i>c&&(l.end=e.length)),l}))}function se(e){var t=e.formats,r=e.text,n=e.start,a=e.end,i=e.replacements,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,l={formats:t.slice(0,o),replacements:i.slice(0,o),text:r.slice(0,o)},s={formats:t.slice(c),replacements:i.slice(c),text:r.slice(c),start:0,end:0};return[ae(l,/\u2028+$/,""),ae(s,/^\u2028+/,"")]}function ue(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 fe(e){var t=e.type,r=e.attributes,n=e.unregisteredAttributes,a=e.object,c=e.isEditableTree,l=function(e){return Object(i.select)("core/rich-text").getFormatType(e)}(t);if(!l)return{type:t,attributes:ue(r,c),object:a};var s=Object(o.a)({},n);for(var u in r){var f=l.attributes[u];f?s[f]=r[u]:s[u]=r[u]}return l.className&&(s.class?s.class="".concat(l.className," ").concat(s.class):s.class=l.className),{type:l.tagName,object:l.object,attributes:ue(s,c)}}function de(e){var t,r,n,a=e.value,i=e.multilineTag,c=e.multilineWrapperTags,l=void 0===c?[]:c,s=e.createEmpty,u=e.append,f=e.getLastChild,d=e.getParent,p=e.isText,m=e.getText,g=e.remove,v=e.appendText,h=e.onStartIndex,b=e.onEndIndex,y=e.isEditableTree,x=a.formats,T=a.text,j=a.start,N=a.end,E=a.formatPlaceholder,C=a.replacements,_=x.length+1,S=s(),A={type:i};function F(e,t){if(y&&E&&E.index===t){var r=d(e);e=void 0===E.format?d(r):u(r,fe(E.format)),e=u(e,"\ufeff")}return e}i?(u(u(S,{type:i}),""),r=t=[A]):u(S,"");for(var P=function(e){var a=T.charAt(e),c=x[e];i&&(c=a===w?t=(c||[]).reduce((function(e,t){return a===w&&-1!==l.indexOf(t.type)&&(e.push(t),e.push(A)),e}),[A]):Object(O.a)(t).concat(Object(O.a)(c||[])));var s=f(S);if(n===w){for(var E=s;!p(E);)E=f(E);h&&j===e&&h(S,E),b&&N===e&&b(S,E)}if(c&&c.forEach((function(e,t){if(!s||!r||e!==r[t]||a===w&&c.length-1===t){var n=d(s),i=e.type,o=e.attributes,l=e.unregisteredAttributes,v=u(n,fe({type:i,attributes:o,unregisteredAttributes:l,isEditableTree:y}));p(s)&&0===m(s).length&&g(s),s=u(e.object?n:v,"")}else s=f(s)})),a===w)return r=c,n=a,"continue";s=F(s,0),0===e&&(h&&0===j&&h(S,s),b&&0===N&&b(S,s)),""===a?(y||"script"!==C[e].type?s=u(d(s),fe(Object(o.a)({},C[e],{object:!0,isEditableTree:y}))):(s=u(d(s),fe({type:"script",isEditableTree:y})),u(s,{html:decodeURIComponent(C[e].attributes["data-rich-text-script"])})),s=u(d(s),"")):"\n"===a?(s=u(d(s),{type:"br",object:!0}),s=u(d(s),"")):p(s)?v(s,a):s=u(d(s),a),s=F(s,e+1),h&&j===e+1&&h(S,s),b&&N===e+1&&b(S,s),r=c,n=a},L=0;L<_;L++)P(L);return S}var pe=window.Node,me=pe.TEXT_NODE,ge=pe.ELEMENT_NODE;function ve(e,t,r){for(var n=e.parentNode,a=0;e=e.previousSibling;)a++;return r=[a].concat(Object(O.a)(r)),n!==t&&(r=ve(n,t,r)),r}function he(e,t){for(t=Object(O.a)(t);e&&t.length>1;)e=e.childNodes[t.shift()];return{node:e,offset:t[0]}}var be=function(){return C(document,"")};function ye(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 xe(e,t){e.appendData(t)}function Te(e){return e.lastChild}function Oe(e){return e.parentNode}function je(e){return e.nodeType===me}function we(e){return e.nodeValue}function Ne(e){return e.parentNode.removeChild(e)}function Ee(){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 Ce(e){var t=e.value,r=e.multilineTag,n=e.multilineWrapperTags,a=e.createLinePadding,i=e.prepareEditableTree,c=[],l=[],s=de({value:Object(o.a)({},t,{formats:Ee(i,t)}),multilineTag:r,multilineWrapperTags:n,createEmpty:be,append:ye,getLastChild:Te,getParent:Oe,isText:je,getText:we,remove:Ne,appendText:xe,onStartIndex:function(e,t){c=ve(t,e,[t.nodeValue.length])},onEndIndex:function(e,t){l=ve(t,e,[t.nodeValue.length])},isEditableTree:!0});return a&&function e(t){for(var r=t.element,n=t.createLinePadding,a=t.multilineWrapperTags,i=r.childNodes.length,o=r.ownerDocument,c=0;c<i;c++){var l=r.childNodes[c];l.nodeType===me?1!==i||l.nodeValue||r.appendChild(n(o)):(a&&!l.previousSibling&&-1!==a.indexOf(l.nodeName.toLowerCase())&&r.insertBefore(n(o),l),e({element:l,createLinePadding:n,multilineWrapperTags:a}))}}({element:s,createLinePadding:a,multilineWrapperTags:n}),{body:s,selection:{startPath:c,endPath:l}}}function _e(e){var t=e.value,r=e.current,n=Ce({value:t,multilineTag:e.multilineTag,multilineWrapperTags:e.multilineWrapperTags,createLinePadding:e.createLinePadding,prepareEditableTree:e.prepareEditableTree}),a=n.body,i=n.selection;!function(e,t){var r,n=0;for(;r=e.firstChild;){var a=t.childNodes[n];a?a.isEqualNode(r)?e.removeChild(r):t.replaceChild(r,a):t.appendChild(r),n++}for(;t.childNodes[n];)t.removeChild(t.childNodes[n])}(a,r),void 0!==t.start&&function(e,t){var r=he(t,e.startPath),n=r.node,a=r.offset,i=he(t,e.endPath),o=i.node,c=i.offset,l=window.getSelection(),s=t.ownerDocument.createRange(),u=n===o&&a===c;u&&0===a&&n.previousSibling&&n.previousSibling.nodeType===ge&&"BR"!==n.previousSibling.nodeName||u&&0===a&&n===me&&0===n.nodeValue.length?(n.insertData(0,"\ufeff"),s.setStart(n,1),s.setEnd(o,1)):(s.setStart(n,a),s.setEnd(o,c));if(l.rangeCount>0){if(f=s,d=l.getRangeAt(0),f.startContainer===d.startContainer&&f.startOffset===d.startOffset&&f.endContainer===d.endContainer&&f.endOffset===d.endOffset)return;l.removeAllRanges()}var f,d;l.addRange(s)}(i,r)}var Se=r("Vx3V");function Ae(e){return ke(de({value:e.value,multilineTag:e.multilineTag,multilineWrapperTags:e.multilineWrapperTags,createEmpty:Fe,append:Le,getLastChild:Pe,getParent:We,isText:Ie,getText:Ve,remove:Me,appendText:De}).children)}function Fe(){return{}}function Pe(e){var t=e.children;return t&&t[t.length-1]}function Le(e,t){return"string"==typeof t&&(t={text:t}),t.parent=e,e.children=e.children||[],e.children.push(t),t}function De(e,t){e.text+=t}function We(e){return e.parent}function Ie(e){return"string"==typeof e.text}function Ve(e){return e.text}function Me(e){var t=e.parent.children.indexOf(e);return-1!==t&&e.parent.children.splice(t,1),e}function Re(e){var t=e.type,r=e.attributes,n=e.object,a=e.children,i="";for(var o in r)Object(Se.isValidAttributeName)(o)&&(i+=" ".concat(o,'="').concat(Object(Se.escapeAttribute)(r[o]),'"'));return n?"<".concat(t).concat(i,">"):"<".concat(t).concat(i,">").concat(ke(a),"</").concat(t,">")}function ke(){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?Re(e):Object(Se.escapeHTML)(e.text)})).join("")}function Be(e,t){return R(e,t.type)?ee(e,t.type):b(e,t)}function ze(e){var t=Object(i.select)("core/rich-text").getFormatType(e);if(t)return t.__experimentalCreatePrepareEditableTree&&t.__experimentalGetPropsForEditableTreePreparation&&Object(X.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]===w)return a}function Ue(e,t){var r=He(e);if(void 0===r)return e;var n=e.text,a=e.formats,i=e.start,o=e.end,c=He(e,r),l=a[r]||[],s=a[c]||[];if(l.length>s.length)return e;for(var u=a.slice(),f=function(e,t){for(var r=e.text,n=e.formats,a=n[t]||[],i=t;i-- >=0;)if(r[i]===w){var o=n[i]||[];if(o.length===a.length+1)return i;if(o.length<=a.length)return}}(e,r),d=r;d<o;d++)if(n[d]===w)if(f){var p=a[f]||[];u[d]=p.concat((u[d]||[]).slice(p.length-1))}else{var m=a[c]||[],g=m[m.length-1]||t;u[d]=m.concat([g],(u[d]||[]).slice(m.length))}return h({text:n,formats:u,start:i,end:o})}function Ge(e,t){for(var r=e.text,n=e.formats,a=n[t]||[],i=t;i-- >=0;){if(r[i]===w)if((n[i]||[]).length===a.length-1)return i}}function Ye(e){var t=e.text,r=e.formats,n=e.start,a=e.end,i=He(e,n);if(void 0===r[i])return e;for(var o=r.slice(0),c=r[Ge(e,i)]||[],l=function(e,t){for(var r=e.text,n=e.formats,a=n[t]||[],i=t,o=t||0;o<r.length;o++)if(r[o]===w){if(!((n[o]||[]).length>=a.length))return i;i=o}return i}(e,He(e,a)),s=i;s<=l;s++)if(t[s]===w){var u=o[s]||[];o[s]=c.concat(u.slice(c.length+1)),0===o[s].length&&delete o[s]}return h({text:t,formats:o,start:n,end:a})}function qe(e,t){for(var r,n=e.text,a=e.formats,i=e.start,o=e.end,c=He(e,i),l=a[c]||[],s=a[He(e,o)]||[],u=Ge(e,c),f=a.slice(0),d=l.length-1,p=s.length-1,m=u+1||0;m<n.length;m++)if(n[m]===w){if((f[m]||[]).length<=d)break;f[m]&&(r=!0,f[m]=f[m].map((function(e,r){return r<d||r>p?e:t})))}return r?h({text:n,formats:f,start:i,end:o}):e}}});