From dd791649a46b33fd7d5ea388fa42f1cf99c82884 Mon Sep 17 00:00:00 2001
From: "Anthony G. Basile" "),c+=" "+t.replace(/^\n*|\n*$/g,"")+" \s*<\/p>/g,"")).replace(/ ([^<]+)<\/(div|address|form)>/g," $1 \\s*(?"+l+"[^>]*>)\\s* ( ")).replace(/<\/blockquote><\/p>/g," \\s*(?"+l+"[^>]*>)","g"),"$1")).replace(new RegExp("(?"+l+"[^>]*>)\\s*',showdown:"S"},i.Converter=function(e){"use strict";var t={},n=[],r=[],o={},a=l,f={parsed:{},raw:"",format:""};function h(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new i.Converter));i.helper.isArray(e)||(e=[e]);var o=d(e,t);if(!o.valid)throw Error(o.error);for(var a=0;a
[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return n=(n=n.replace(/^ /gm,"¨0")).replace(/¨0/g,"")})),i.subParser("hashBlock")("
\n"+e+"\n
",t,n)})),e=n.converter._dispatch("blockQuotes.after",e,t,n)})),i.subParser("codeBlocks",(function(e,t,n){"use strict";e=n.converter._dispatch("codeBlocks.before",e,t,n);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,r,o){var a=r,s=o,c="\n";return a=i.subParser("outdent")(a,t,n),a=i.subParser("encodeCode")(a,t,n),a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),a="
",i.subParser("hashBlock")(a,t,n)+s}))).replace(/¨0/,""),e=n.converter._dispatch("codeBlocks.after",e,t,n)})),i.subParser("codeSpans",(function(e,t,n){"use strict";return void 0===(e=n.converter._dispatch("codeSpans.before",e,t,n))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,r,o,a){var s=a;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=r+""+a+c+"
"+(s=i.subParser("encodeCode")(s,t,n))+"
",s=i.subParser("hashHTMLSpans")(s,t,n)})),e=n.converter._dispatch("codeSpans.after",e,t,n)})),i.subParser("completeHTMLDocument",(function(e,t,n){"use strict";if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",o="\n",i="",a='\n',s="",c="";for(var l in void 0!==n.metadata.parsed.doctype&&(o="\n","html"!==(r=n.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==r||(a='')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":i="
",a=i.subParser("hashBlock")(a,t,n),"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"}))).replace(/¨0/,""),n.converter._dispatch("githubCodeBlocks.after",e,t,n)):e})),i.subParser("hashBlock",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",e=n.converter._dispatch("hashBlock.after",e,t,n)})),i.subParser("hashCodeTags",(function(e,t,n){"use strict";e=n.converter._dispatch("hashCodeTags.before",e,t,n);return e=i.helper.replaceRecursiveRegExp(e,(function(e,r,o,a){var s=o+i.subParser("encodeCode")(r,t,n)+a;return"¨C"+(n.gHtmlSpans.push(s)-1)+"C"}),""+(a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
]*>","
","gim"),e=n.converter._dispatch("hashCodeTags.after",e,t,n)})),i.subParser("hashElement",(function(e,t,n){"use strict";return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),r="\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),i.subParser("hashHTMLBlocks",(function(e,t,n){"use strict";e=n.converter._dispatch("hashHTMLBlocks.before",e,t,n);var r=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],o=function(e,t,r,o){var i=e;return-1!==r.search(/\bmarkdown\b/)&&(i=r+n.converter.makeHtml(t)+o),"\n\n¨K"+(n.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var a=0;a]*>","^ {0,3}
\\s*","gim"),e=n.converter._dispatch("hashPreCodeTags.after",e,t,n)})),i.subParser("headers",(function(e,t,n){"use strict";e=n.converter._dispatch("headers.before",e,t,n);var r=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),o=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,(function(e,o){var a=i.subParser("spanGamut")(o,t,n),s=t.noHeaderId?"":' id="'+c(o)+'"',l="
",t,n);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,r),e=n.converter._dispatch("horizontalRule.after",e,t,n)})),i.subParser("images",(function(e,t,n){"use strict";function r(e,t,r,o,a,s,c,l){var u=n.gUrls,d=n.gTitles,f=n.gDimensions;if(r=r.toLowerCase(),l||(l=""),e.search(/\(\s*>? ?(['"].*['"])?\)$/m)>-1)o="";else if(""===o||null===o){if(""!==r&&null!==r||(r=t.toLowerCase().replace(/ ?\n/g," ")),o="#"+r,i.helper.isUndefined(u[r]))return e;o=u[r],i.helper.isUndefined(d[r])||(l=d[r]),i.helper.isUndefined(f[r])||(a=f[r].width,s=f[r].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var h='"}return e=(e=(e=(e=(e=(e=n.converter._dispatch("images.before",e,t,n)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,n,o,i,a,s,c){return r(e,t,n,o=o.replace(/\s/g,""),i,a,s,c)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,r)).replace(/!\[([^\[\]]+)]()()()()()/g,r),e=n.converter._dispatch("images.after",e,t,n)})),i.subParser("italicsAndBold",(function(e,t,n){"use strict";function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"","")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"","")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"","")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=n.converter._dispatch("italicsAndBold.after",e,t,n)})),i.subParser("lists",(function(e,t,n){"use strict";function r(e,r){n.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,a=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(o,(function(e,r,o,s,c,l,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(c,t,n),f="";return l&&t.tasklists&&(f=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='"}))),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,(function(e){return"¨A"+e})),r||d.search(/\n{2,}/)>-1?(d=i.subParser("githubCodeBlocks")(d,t,n),d=i.subParser("blockGamut")(d,t,n)):(d=(d=i.subParser("lists")(d,t,n)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,n)).replace(/\n\n+/g,"\n\n"),d=a?i.subParser("paragraphs")(d,t,n):i.subParser("spanGamut")(d,t,n)),d="
]*>/.test(u)&&(d=!0)}o[s]=u}return e=(e=(e=o.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),n.converter._dispatch("paragraphs.after",e,t,n)})),i.subParser("runExtension",(function(e,t,n,r){"use strict";if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var o=e.regex;o instanceof RegExp||(o=new RegExp(o,"g")),t=t.replace(o,e.replace)}return t})),i.subParser("spanGamut",(function(e,t,n){"use strict";return e=n.converter._dispatch("spanGamut.before",e,t,n),e=i.subParser("codeSpans")(e,t,n),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,n),e=i.subParser("encodeBackslashEscapes")(e,t,n),e=i.subParser("images")(e,t,n),e=i.subParser("anchors")(e,t,n),e=i.subParser("autoLinks")(e,t,n),e=i.subParser("simplifiedAutoLinks")(e,t,n),e=i.subParser("emoji")(e,t,n),e=i.subParser("underline")(e,t,n),e=i.subParser("italicsAndBold")(e,t,n),e=i.subParser("strikethrough")(e,t,n),e=i.subParser("ellipsis")(e,t,n),e=i.subParser("hashHTMLSpans")(e,t,n),e=i.subParser("encodeAmpsAndAngles")(e,t,n),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=n.converter._dispatch("spanGamut.after",e,t,n)})),i.subParser("strikethrough",(function(e,t,n){"use strict";return t.strikethrough&&(e=(e=n.converter._dispatch("strikethrough.before",e,t,n)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,r){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,n)),""+e+""}(r)})),e=n.converter._dispatch("strikethrough.after",e,t,n)),e})),i.subParser("stripLinkDefinitions",(function(e,t,n){"use strict";var r=function(e,r,o,a,s,c,l){return r=r.toLowerCase(),o.match(/^data:.+?\/.+?;base64,/)?n.gUrls[r]=o.replace(/\s/g,""):n.gUrls[r]=i.subParser("encodeAmpsAndAngles")(o,t,n),c?c+l:(l&&(n.gTitles[r]=l.replace(/"|'/g,""")),t.parseImgDimensions&&a&&s&&(n.gDimensions[r]={width:a,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,r)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,r)).replace(/¨0/,"")})),i.subParser("tables",(function(e,t,n){"use strict";if(!t.tables)return e;function r(e,r){return""+i.subParser("spanGamut")(e,t,n)+" \n"}function o(e){var o,a=e.split("\n");for(o=0;o"),t.push((o=r.value,void 0,o.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),r.added?t.push(""):r.removed&&t.push("")}var o;return t.join("")}}])},e.exports=r()},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],s=!0;return function e(d){var f=n?i(d):d,h={},p=!0,v={node:f,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){v.isRoot||(v.parent.node[v.key]=e),v.node=e,t&&(p=!1)},delete:function(e){delete v.parent.node[v.key],e&&(p=!1)},remove:function(e){c(v.parent.node)?v.parent.node.splice(v.key,1):delete v.parent.node[v.key],e&&(p=!1)},keys:null,before:function(e){h.before=e},after:function(e){h.after=e},pre:function(e){h.pre=e},post:function(e){h.post=e},stop:function(){s=!1},block:function(){p=!1}};if(!s)return v;function m(){if("object"==typeof v.node&&null!==v.node){v.keys&&v.node_===v.node||(v.keys=a(v.node)),v.isLeaf=0==v.keys.length;for(var e=0;eO;O++)w[O]=O+1;w[15]=0;var S=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,E=Object.prototype.hasOwnProperty,C={},T={};function x(e){return!!E.call(T,e)||!E.call(C,e)&&(S.test(e)?T[e]=!0:(C[e]=!0,!1))}function D(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function M(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){j[e]=new M(e,0,!1,e,null)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];j[t]=new M(t,1,!1,e[1],null)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){j[e]=new M(e,2,!1,e.toLowerCase(),null)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){j[e]=new M(e,2,!1,e,null)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){j[e]=new M(e,3,!1,e.toLowerCase(),null)})),["checked","multiple","muted","selected"].forEach((function(e){j[e]=new M(e,3,!0,e,null)})),["capture","download"].forEach((function(e){j[e]=new M(e,4,!1,e,null)})),["cols","rows","size","span"].forEach((function(e){j[e]=new M(e,6,!1,e,null)})),["rowSpan","start"].forEach((function(e){j[e]=new M(e,5,!1,e.toLowerCase(),null)}));var I=/[\-:]([a-z])/g;function P(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(I,P);j[t]=new M(t,1,!1,e,null)})),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(I,P);j[t]=new M(t,1,!1,e,"http://www.w3.org/1999/xlink")})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(I,P);j[t]=new M(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")})),["tabIndex","crossOrigin"].forEach((function(e){j[e]=new M(e,1,!1,e.toLowerCase(),null)}));var N=/["'&<>]/;function R(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=N.exec(e);if(t){var n,r="",o=0;for(n=t.index;no&&(c.start=0),a>=o&&as&&(c.end=e.length)),c}))}function ii(e){var t=e.formats,n=e.replacements,r=e.text,o=e.start,i=e.end,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,c={formats:t.slice(0,a),replacements:n.slice(0,a),text:r.slice(0,a)},l={formats:t.slice(s),replacements:n.slice(s),text:r.slice(s),start:0,end:0};return[ni(c,/\u2028+$/,""),ni(l,/^\u2028+/,"")]}function ai(e){var t=e.type,n=e.attributes,r=e.unregisteredAttributes,o=e.object,i=e.boundaryClass,a=function(e){return uo("core/rich-text").getFormatType(e)}(t),s={};if(i&&(s["data-rich-text-format-boundary"]="true"),!a)return n&&(s=D({},n,s)),{type:t,attributes:s,object:o};for(var c in s=D({},r,s),n){var l=!!a.attributes&&a.attributes[c];l?s[l]=n[c]:s[c]=n[c]}return a.className&&(s.class?s.class="".concat(a.className," ").concat(s.class):s.class=a.className),{type:a.tagName,object:a.object,attributes:s}}var si={type:"br",attributes:{"data-rich-text-padding":"true"},object:!0};function ci(e){var t,n,r,o=e.value,i=e.multilineTag,a=e.createEmpty,s=e.append,c=e.getLastChild,l=e.getParent,u=e.isText,d=e.getText,f=e.remove,h=e.appendText,p=e.onStartIndex,v=e.onEndIndex,m=e.isEditableTree,g=o.formats,b=o.replacements,y=o.text,k=o.start,_=o.end,w=g.length+1,O=a(),S={type:i},E=Wo(o),C=E[E.length-1];i?(s(s(O,{type:i}),""),n=t=[S]):s(O,"");for(var T=function(e){var o=y.charAt(e),a=m&&(!r||r===jo||"\n"===r),w=g[e];i&&(w=o===jo?t=(b[e]||[]).reduce((function(e,t){return e.push(t,S),e}),[S]):[].concat(lt(t),lt(w||[])));var E=c(O);if(a&&o===jo){for(var T=E;!u(T);)T=c(T);s(l(T),si),s(l(T),"")}if(r===jo){for(var x=E;!u(x);)x=c(x);p&&k===e&&p(O,x),v&&_===e&&v(O,x)}if(w&&w.forEach((function(e,t){if(!E||!n||e!==n[t]||o===jo&&w.length-1===t){var r=e.type,i=e.attributes,a=e.unregisteredAttributes,h=m&&o!==jo&&e===C,p=l(E),v=s(p,ai({type:r,attributes:i,unregisteredAttributes:a,boundaryClass:h}));u(E)&&0===d(E).length&&f(E),E=s(v,"")}else E=c(E)})),o===jo)return n=w,r=o,"continue";0===e&&(p&&0===k&&p(O,E),v&&0===_&&v(O,E)),o===Io?(E=s(l(E),ai(D({},b[e],{object:!0}))),E=s(l(E),"")):"\n"===o?(E=s(l(E),{type:"br",attributes:m?{"data-rich-text-line-break":"true"}:void 0,object:!0}),E=s(l(E),"")):u(E)?h(E,o):E=s(l(E),o),p&&k===e+1&&p(O,E),v&&_===e+1&&v(O,E),a&&e===y.length&&s(l(E),si),n=w,r=o},x=0;x"),o=r.pop();e="";for(var i=0;i
";n.push([c,a.substr(s)+""]),e+=a.substr(0,s)+c}else e+=a}e+=o}var l="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=hf(e=(e=(e=(e=e.replace(/
\s*
/g,"\n\n")).replace(new RegExp("(<"+l+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("("+l+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("")),-1!==e.indexOf("")&&(e=(e=(e=e.replace(/(")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("]*)>/gi,"
")).replace(new RegExp("
|
/g,"
")).replace(/(
)?\s*\n/g,(function(e,t){return t?e:"
\n"}))).replace(/
","g"),"$1")).replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"
)\s*$/.test(s))return e(t,n);var c=Object(N.mapValues)(Object(N.pickBy)(r.attributes,(function(e){return e.shortcode})),(function(e){return e.shortcode(o.shortcode.attrs,o)}));return[s,$d(r.blockName,Dh(D({},Vd(r.blockName),{attributes:r.attributes}),o.shortcode.content,c))].concat(lt(e(t.substr(n))))}return[t]},sp=window.Node.COMMENT_NODE,cp=function(e){e.nodeType===sp&&sa(e)};function lp(e,t){return e.every((function(e){return function(e,t){if(Rh(e))return!0;if(!t)return!1;var n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((function(e){return 0===Object(N.difference)([n,t],e).length}))}(e,t)&&lp(Array.from(e.children),t)}))}function up(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var dp=function(e,t){var n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;var r=Array.from(n.body.children);return!r.some(up)&&lp(r,t)},fp=function(e,t){if("SPAN"===e.nodeName&&e.style){var n=e.style,r=n.fontWeight,o=n.fontStyle,i=n.textDecorationLine,a=n.verticalAlign;"bold"!==r&&"700"!==r||da(t.createElement("strong"),e),"italic"===o&&da(t.createElement("em"),e),"line-through"===i&&da(t.createElement("s"),e),"super"===a?da(t.createElement("sup"),e):"sub"===a&&da(t.createElement("sub"),e)}else"B"===e.nodeName?e=ua(e,"strong"):"I"===e.nodeName?e=ua(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")))},hp=function(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)},pp=window.parseInt;function vp(e){return"OL"===e.nodeName||"UL"===e.nodeName}var mp=function(e,t){if("P"===e.nodeName){var n=e.getAttribute("style");if(n&&-1!==n.indexOf("mso-list")){var r=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);if(r){var o=pp(r[1],10)-1||0,i=e.previousElementSibling;if(!i||!vp(i)){var a=e.textContent.trim().slice(0,1),s=/[1iIaA]/.test(a),c=t.createElement(s?"ol":"ul");s&&c.setAttribute("type",a),e.parentNode.insertBefore(c,e)}var l=e.previousElementSibling,u=l.nodeName,d=t.createElement("li"),f=l;for(e.removeChild(e.firstElementChild);e.firstChild;)d.appendChild(e.firstChild);for(;o--;)vp(f=f.lastElementChild||f)&&(f=f.lastElementChild||f);vp(f)||(f=f.appendChild(t.createElement(u))),f.appendChild(d),e.parentNode.removeChild(e)}}}},gp=window.URL,bp=gp.createObjectURL,yp=(gp.revokeObjectURL,{});function kp(e){var t=bp(e);return yp[t]=e,t}var _p=window,wp=_p.atob,Op=_p.File,Sp=function(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){var t,n=Ae(e.src.split(","),2),r=n[0],o=n[1],i=Ae(r.slice(5).split(";"),1)[0];if(!o||!i)return void(e.src="");try{t=wp(o)}catch(u){return void(e.src="")}for(var a=new Uint8Array(t.length),s=0;s ")&&0===n.indexOf(" ")&&(a="INLINE")),"INLINE"===a)return jp(n);var d=ap(n),f=d.length>1;if("AUTO"===a&&!f&&dp(n,s))return jp(n);var h=Object(N.filter)(tf("from"),{type:"raw"}).map((function(e){return e.isMatch?e:D({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})),p=Nh(),v=Fh(h),m=Object(N.compact)(Object(N.flatMap)(d,(function(e){if("string"!=typeof e)return e;var t=[Dp,mp,hp,Zh,Sp,fp,qh,cp,Qh,Xh];l||t.unshift(xp);var n=D({},v,p);return e=Bh(e=Vh(e,t,v),n),e=Yh(e),Mp.log("Processed HTML piece:\n\n",e),function(e){var t=e.html,n=e.rawTransforms,r=document.implementation.createHTMLDocument("");return r.body.innerHTML=t,Array.from(r.body.children).map((function(e){var t=ef(n,(function(t){return(0,t.isMatch)(e)}));if(!t)return $d("core/html",Dh("core/html",e.outerHTML));var r=t.transform,o=t.blockName;return r?r(e):$d(o,Dh(o,e.outerHTML))}))}({html:e,rawTransforms:h})})));if("AUTO"===a&&1===m.length){var g=o.trim();if(""!==g&&-1===g.indexOf("\n"))return Bh(Vf(m[0]),p)}return m}function Pp(e){var t=e.HTML,n=void 0===t?"":t;if(-1!==n.indexOf("\x3c!-- wp:"))return Ih(n);var r=ap(n),o=Object(N.filter)(tf("from"),{type:"raw"}).map((function(e){return e.isMatch?e:D({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})),i=Fh(o);return Object(N.compact)(Object(N.flatMap)(r,(function(e){return"string"!=typeof e?e:(e=Vh(e,[Zh,qh,Qh,Xh],i),function(e){var t=e.html,n=e.rawTransforms,r=document.implementation.createHTMLDocument("");return r.body.innerHTML=t,Array.from(r.body.children).map((function(e){var t=ef(n,(function(t){return(0,t.isMatch)(e)}));if(!t)return $d("core/html",Dh("core/html",e.outerHTML));var r=t.transform,o=t.blockName;return r?r(e):$d(o,Dh(o,e.outerHTML))}))}({html:e=Yh(e),rawTransforms:o}))})))}function Np(){return id("core/blocks").getCategories()}function Rp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?Object(N.map)(t,(function(t,n){var r=Ae(t,3),o=r[0],i=r[1],a=r[2],s=e[n];if(s&&s.name===o)return D({},s,{innerBlocks:Rp(s.innerBlocks,a)});var c=Vd(o),l=function(e,t){return Object(N.mapValues)(t,(function(t,n){return u(e[n],t)}))},u=function(e,t){return n=e,"html"===Object(N.get)(n,["source"])&&Object(N.isArray)(t)?le(t):function(e){return"query"===Object(N.get)(e,["source"])}(e)&&t?t.map((function(t){return l(e.query,t)})):t;var n};return $d(o,l(Object(N.get)(c,["attributes"],{}),i),Rp([],a))})):e}function Lp(e){return Object(N.isPlainObject)(e)&&Object(N.isString)(e.type)}function Ap(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=Object(N.map)(e,(function(e,t){return function(n,r,o,i,a){if(c=t,!Lp(s=n)||s.type!==c)return!1;var s,c,l=e(n);return rt()(l)?l.then(i,a):i(l),!0}}));n.push((function(e,n){return!!Lp(e)&&(t(e),n(),!0)}));var r=Object(tt.create)(n);return function(e){return new Promise((function(n,o){return r(e,(function(e){Lp(e)&&t(e),n(e)}),o)}))}}function zp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=Ap(e,t.dispatch);return function(e){return function(t){return(r=t)&&"Generator"===r[Symbol.toStringTag]?n(t):e(t);var r}}}}var Fp=function(){return function(e){return function(t){return rt()(t)?t.then((function(t){if(t)return e(t)})):e(t)}}},Hp=function(e,t){return function(){return function(n){return function(r){var o=e.select("core/data").getCachedResolvers(t);return Object.entries(o).forEach((function(n){var o=Ae(n,2),i=o[0],a=o[1],s=Object(N.get)(e.stores,[t,"resolvers",i]);s&&s.shouldInvalidate&&a.forEach((function(n,o){!1===n&&s.shouldInvalidate.apply(s,[r].concat(lt(o)))&&e.dispatch("core/data").invalidateResolution(t,i,o)}))})),n(r)}}}},Vp=Object(N.flowRight)([function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:D({},n,x({},o,i))}}}("selectorName")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ht.a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var n="START_RESOLUTION"===t.type,r=new ht.a(e);return r.set(t.args,n),r;case"INVALIDATE_RESOLUTION":var o=new ht.a(e);return o.delete(t.args),o}return e})),Bp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(N.has)(e,[t.selectorName])?Object(N.omit)(e,[t.selectorName]):e;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return Vp(e,t)}return e};function Up(e,t,n){var r=Object(N.get)(e,[t]);if(r)return r.get(n)}function Wp(e,t){return void 0!==Up(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function Kp(e,t){return!1===Up(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function Yp(e,t){return!0===Up(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[])}function $p(e){return e}function qp(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function Gp(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Zp(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function Xp(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function Qp(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}function Jp(e,t,n){var r,o=t.reducer,i=function(e,t,n){var r=[Hp(n,e),Fp];if(t.controls){var o=Object(N.mapValues)(t.controls,(function(e){return e.isRegistryControl?e(n):e}));r.push(zp(o))}var i=[et.apply(void 0,r)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&i.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e}));var a=t.reducer,s=t.initialState;return qe(Fe()({metadata:Bp,root:a}),{root:s},Object(N.flowRight)(i))}(e,t,n),a=function(e,t){return Object(N.mapValues)(e,(function(e){return function(){return Promise.resolve(t.dispatch(e.apply(void 0,arguments)))}}))}(D({},m,t.actions),i),s=function(e,t,n){return Object(N.mapValues)(e,(function(e){var r=e.isRegistrySelector?e(n.select):e,o=function(){var e=arguments.length,n=new Array(e+1);n[0]=t.__unstableOriginalGetState();for(var o=0;o 1?function(e,t,n,r,o){var i=t+1;if(o<0&&n)return he("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return he("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return me(pe("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e),e,i);if(o>0&&!r)return me(pe("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e),e,i)}(e,n,r,o,i):r&&o?me(he("Block %s is the only block, and cannot be moved"),t):i>0&&!o?me(he("Move %1$s block from position %2$d down to position %3$d"),t,a,a+1):i>0&&o?me(he("Block %s is at the end of the content and can’t be moved down"),t):i<0&&!r?me(he("Move %1$s block from position %2$d up to position %3$d"),t,a,a-1):i<0&&r?me(he("Block %s is at the beginning of the content and can’t be moved up"),t):void 0}var Mw=Object(I.createElement)(jn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Mn,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),jw=Object(I.createElement)(jn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Mn,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),Iw=Object(I.createElement)(jn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Dn,{d:"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z"})),Pw=ey((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlockIndex,i=(0,r.getBlockRootClientId)(n);return{index:o(n,i),rootClientId:i}}))((function(e){var t=e.children,n=e.clientId,r=e.rootClientId,o=e.blockElementId,i=e.index,a=e.onDragStart,s=e.onDragEnd,c={type:"block",srcIndex:i,srcRootClientId:r,srcClientId:n};return Object(I.createElement)(Ws,{elementId:o,transferData:c,onDragStart:a,onDragEnd:s},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})}))})),Nw=function(e){var t=e.isVisible,n=e.className,r=e.icon,o=e.onDragStart,i=e.onDragEnd,a=e.blockElementId,s=e.clientId;if(!t)return null;var c=Pn()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object(I.createElement)(Pw,{clientId:s,blockElementId:a,onDragStart:o,onDragEnd:i},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(I.createElement)("div",{className:c,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},r)}))},Rw=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Ce(e)),e.onBlur=e.onBlur.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.onMoveUp,n=e.onMoveDown,r=e.isFirst,o=e.isLast,i=e.isDraggable,a=e.onDragStart,s=e.onDragEnd,c=e.clientIds,l=e.blockElementId,u=e.blockType,d=e.firstIndex,f=e.isLocked,h=e.instanceId,p=e.isHidden,v=e.rootClientId,m=this.state.isFocused,g=Object(N.castArray)(c).length;return f||r&&o&&!v?null:Object(I.createElement)("div",{className:Pn()("editor-block-mover block-editor-block-mover",{"is-visible":m||!p})},Object(I.createElement)(Pa,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:r?null:t,icon:Mw,label:he("Move up"),"aria-describedby":"block-editor-block-mover__up-description-".concat(h),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(I.createElement)(Nw,{className:"editor-block-mover__control block-editor-block-mover__control",icon:Iw,clientId:c,blockElementId:l,isVisible:i,onDragStart:a,onDragEnd:s}),Object(I.createElement)(Pa,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:n,icon:jw,label:he("Move down"),"aria-describedby":"block-editor-block-mover__down-description-".concat(h),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(I.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},Dw(g,u&&u.title,d,r,o,-1)),Object(I.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(h),className:"editor-block-mover__description block-editor-block-mover__description"},Dw(g,u&&u.title,d,r,o,1)))}}]),t}(I.Component),Lw=Object(N.flowRight)(ey((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockIndex,a=r.getTemplateLock,s=r.getBlockRootClientId,c=r.getBlockOrder,l=Object(N.castArray)(n),u=Object(N.first)(l),d=o(u),f=s(Object(N.first)(l)),h=c(f),p=i(u,f),v=i(Object(N.last)(l),f);return{blockType:d?Vd(d.name):null,isLocked:"all"===a(f),rootClientId:f,firstIndex:p,isFirst:0===p,isLast:v===h.length-1}})),ry((function(e,t){var n=t.clientIds,r=t.rootClientId,o=e("core/block-editor"),i=o.moveBlocksDown,a=o.moveBlocksUp;return{onMoveDown:Object(N.partial)(i,n,r),onMoveUp:Object(N.partial)(a,n,r)}})),Hb)(Rw);var Aw=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(I.createElement)("div",{className:Pn()(t,"editor-warning block-editor-warning")},Object(I.createElement)("div",{className:"editor-warning__contents block-editor-warning__contents"},Object(I.createElement)("p",{className:"editor-warning__message block-editor-warning__message"},r),I.Children.count(n)>0&&Object(I.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},I.Children.map(n,(function(e,t){return Object(I.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)})))),o&&Object(I.createElement)(ds,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(I.createElement)(Pa,{icon:"ellipsis",label:he("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(I.createElement)(_c,null,o.map((function(e,t){return Object(I.createElement)(wc,{onClick:e.onClick,key:t},e.title)})))}}))},zw=n(131),Fw=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,i=e.actionText,a=e.className;return Object(I.createElement)("div",{className:a},Object(I.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object(I.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object(I.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object(I.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(I.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object(I.createElement)(va,{isLarge:!0,tabIndex:"0",onClick:o},i)))},Hw=function(e){function t(){return Oe(this,t),Te(this,xe(t).apply(this,arguments))}return Me(t,e),Ee(t,[{key:"getDifference",value:function(e,t){return Object(zw.diffChars)(e,t).map((function(e,t){var n=Pn()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object(I.createElement)("span",{key:t,className:n},e.value)}))}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:Ff(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(N.castArray)(e),n=t.map((function(e){return Hf(e.name,e.attributes,e.innerBlocks)})),r=t.map((function(e){return Ff(e.name,e.attributes,e.innerBlocks)}));return{rawContent:n.join(""),renderedContent:r}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,r=e.onConvert,o=e.convertor,i=e.convertButtonText,a=this.getOriginalContent(t),s=this.getConvertedContent(o(t)),c=this.getDifference(a.rawContent,s.rawContent);return Object(I.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object(I.createElement)(Fw,{title:he("Current"),className:"editor-block-compare__current block-editor-block-compare__current",action:n,actionText:he("Convert to HTML"),rawContent:a.rawContent,renderedContent:a.renderedContent}),Object(I.createElement)(Fw,{title:he("After Conversion"),className:"editor-block-compare__converted block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:s.renderedContent}))}}]),t}(I.Component),Vw=function(e){function t(e){var n;return Oe(this,t),(n=Te(this,xe(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(Ce(n)),n.onCompareClose=n.onCompareClose.bind(Ce(n)),n}return Me(t,e),Ee(t,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!Vd("core/html"),s=this.state.compare,c=[{title:he("Convert to Classic Block"),onClick:r},{title:he("Attempt Block Recovery"),onClick:o}];return s?Object(I.createElement)(Pc,{title:he("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object(I.createElement)(Hw,{block:i,onKeep:t,onConvert:n,convertor:Bw,convertButtonText:he("Convert to Blocks")})):Object(I.createElement)(Aw,{actions:[Object(I.createElement)(va,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!a},ve("Resolve","imperative verb")),a&&Object(I.createElement)(va,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},he("Convert to HTML"))],secondaryActions:c},he("This block contains unexpected or invalid content."))}}]),t}(I.Component),Bw=function(e){return Pp({HTML:e.originalContent})},Uw=Object(N.flowRight)([ey((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),ry((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return $d("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return $d("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,Bw(n))},attemptBlockRecovery:function(){var e;r(n.clientId,$d((e=n).name,e.attributes,e.innerBlocks))}}}))])(Vw),Ww=Object(I.createElement)(Aw,null,he("This block has encountered an error and cannot be previewed.")),Kw=function(){return Ww},Yw=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={hasError:!1},e}return Me(t,e),Ee(t,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(I.Component),$w=n(30),qw=n.n($w),Gw=function(e){function t(e){var n;return Oe(this,t),(n=Te(this,xe(t).apply(this,arguments))).onChange=n.onChange.bind(Ce(n)),n.onBlur=n.onBlur.bind(Ce(n)),n.state={html:e.block.isValid?Vf(e.block):e.block.originalContent},n}return Me(t,e),Ee(t,[{key:"componentDidUpdate",value:function(e){Object(N.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:Vf(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=Vd(this.props.block.name),n=Dh(t,e,this.props.block.attributes),r=e||Hf(t,n),o=!e||hh(t,n,r);this.props.onChange(this.props.clientId,n,r,o),e||this.setState({html:r})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(I.createElement)(qw.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(I.Component),Zw=Object(N.flowRight)([ey((function(e,t){return{block:e("core/block-editor").getBlock(t.clientId)}})),ry((function(e){return{onChange:function(t,n,r,o){e("core/block-editor").updateBlock(t,{attributes:n,originalContent:r,isValid:o})}}}))])(Gw);var Xw=ey((function(e,t){return{name:(0,e("core/block-editor").getBlockName)(t.clientId)}}))((function(e){var t=e.name;if(!t)return null;var n=Vd(t);return n?n.title:null})),Qw=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(Ce(e)),e.onBlur=e.onBlur.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onFocus",value:function(e){this.setState({isFocused:!0}),e.stopPropagation()}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.rootClientId;return Object(I.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object(I.createElement)(gu,null,n&&Object(I.createElement)(I.Fragment,null,Object(I.createElement)(Xw,{clientId:n}),Object(I.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object(I.createElement)(Xw,{clientId:t})))}}]),t}(I.Component),Jw=Object(N.flowRight)([ey((function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}}))])(Qw),eO=window,tO=eO.Node,nO=eO.getSelection,rO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(Ce(e)),e.focusSelection=e.focusSelection.bind(Ce(e)),e.switchOnKeyDown=Object(N.cond)([[Object(N.matchesProperty)(["keyCode"],Fn),e.focusSelection]]),e.toolbar=Object(I.createRef)(),e}return Me(t,e),Ee(t,[{key:"focusToolbar",value:function(){var e=fa.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=nO();if(e){var t=e.focusNode;t.nodeType!==tO.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusToolbar()}},{key:"render",value:function(){var e=this.props,t=e.children,n=j(e,["children"]);return Object(I.createElement)(nc,Ne({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(N.omit)(n,["focusOnMount"])),Object(I.createElement)(ys,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(I.Component);var oO=function(e){var t=e.focusOnMount;return Object(I.createElement)(rO,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":he("Block tools")},Object(I.createElement)(hE,null))};var iO=ey((function(e){var t=e("core/block-editor"),n=t.getMultiSelectedBlockClientIds,r=t.isMultiSelecting;return{multiSelectedBlockClientIds:n(),isSelecting:r()}}))((function(e){var t=e.multiSelectedBlockClientIds;return e.isSelecting?null:Object(I.createElement)(Lw,{clientIds:t})}));var aO=tb("< small")((function(e){var t=e.clientId;return Object(I.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object(I.createElement)(RO,null),Object(I.createElement)(Lw,{clientIds:[t]}))})),sO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(Ce(e)),e.onFocusInserter=e.onFocusInserter.bind(Ce(e)),e}return Me(t,e),Ee(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,r=t.rootClientId,o=t.clientId;return Object(I.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object(I.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object(I.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:Pn()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(I.createElement)(RO,{rootClientId:r,clientId:o})))}}]),t}(I.Component),cO=ey((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),i=o.getBlockIndex,a=o.getBlockInsertionPoint,s=o.isBlockInsertionPointVisible,c=i(n,r),l=a();return{showInsertionPoint:s()&&l.index===c&&l.rootClientId===r}}))(sO),lO=function(e){function t(){var e;return Oe(this,t),(e=Te(this,xe(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(Ce(e)),e.eventMap={},e}return Me(t,e),Ee(t,[{key:"proxyEvent",value:function(e){var t=!!e.nativeEvent._blockHandled;e.nativeEvent._blockHandled=!0;var n=this.eventMap[e.type];t&&(n+="Handled"),this.props[n]&&this.props[n](e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,r=void 0===n?[]:n,o=t.forwardedRef,i=j(t,["childHandledEvents","forwardedRef"]),a=Object(N.reduce)([].concat(lt(r),lt(Object.keys(i))),(function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(r){!!r[2]&&delete i[n];var o="on"+r[1];t[o]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=o}return t}),{});return Object(I.createElement)("div",Ne({ref:o},i,a))}}]),t}(I.Component),uO=function(e,t){return Object(I.createElement)(lO,Ne({},e,{forwardedRef:t}))};uO.displayName="IgnoreNestedEvents";var dO=Object(I.forwardRef)(uO);var fO=Object(N.flowRight)(ey((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getInserterItems,i=r.getTemplateLock;return{items:o(n),isLocked:!!i(n)}})),ry((function(e,t){var n=t.clientId,r=t.rootClientId;return{onInsert:function(t){var o=$d(t.name,t.initialAttributes);n?e("core/block-editor").replaceBlocks(n,o):e("core/block-editor").insertBlock(o,void 0,r)}}})))((function(e){var t=e.items,n=e.isLocked,r=e.onInsert;if(n)return null;var o=Object(N.filter)(t,(function(e){return!(e.isDisabled||e.name===Hd()&&Object(N.isEmpty)(e.initialAttributes))})).slice(0,3);return Object(I.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},o.map((function(e){return Object(I.createElement)(Pa,{key:e.id,className:"editor-inserter-with-shortcuts__block block-editor-inserter-with-shortcuts__block",onClick:function(){return r(e)},label:me(he("Add %s"),e.title),icon:Object(I.createElement)(hw,{icon:e.icon})})})))})),hO=function(e){var t=Ae(Object(I.useState)(null),2),n=t[0],r=t[1];return Object(I.useEffect)((function(){var t=function(){n&&r(null)},o=function(t){var n=e.current.getBoundingClientRect(),o=n.width,i=n.left,a=n.right,s=null;t.clientX-i "),c+=" "+t.replace(/^\n*|\n*$/g,"")+" \s*<\/p>/g,"")).replace(/ ([^<]+)<\/(div|address|form)>/g," $1 \\s*(?"+l+"[^>]*>)\\s* ( ")).replace(/<\/blockquote><\/p>/g," \\s*(?"+l+"[^>]*>)","g"),"$1")).replace(new RegExp("(?"+l+"[^>]*>)\\s* )\s*$/.test(c))return e(t,n);var l=Object(N.mapValues)(Object(N.pickBy)(o.attributes,(function(e){return e.shortcode})),(function(e){return e.shortcode(i.shortcode.attrs,i)})),u=wd(o.blockName,nh(D({},md(o.blockName),{attributes:o.attributes}),i.shortcode.content,l));return[c,u].concat(ft(e(t.substr(n))))}return[t]},Rh=window.Node.COMMENT_NODE,Lh=function(e){e.nodeType===Rh&&qi(e)};function Ah(e,t){return e.every((function(e){return function(e,t){if(ch(e))return!0;if(!t)return!1;var n=e.nodeName.toLowerCase();return[["ul","li","ol"],["h1","h2","h3","h4","h5","h6"]].some((function(e){return 0===Object(N.difference)([n,t],e).length}))}(e,t)&&Ah(Array.from(e.children),t)}))}function zh(e){return"BR"===e.nodeName&&e.previousSibling&&"BR"===e.previousSibling.nodeName}var Fh=function(e,t){if("SPAN"===e.nodeName&&e.style){var n=e.style,r=n.fontWeight,o=n.fontStyle,i=n.textDecorationLine,a=n.verticalAlign;"bold"!==r&&"700"!==r||Qi(t.createElement("strong"),e),"italic"===o&&Qi(t.createElement("em"),e),"line-through"===i&&Qi(t.createElement("s"),e),"super"===a?Qi(t.createElement("sup"),e):"sub"===a&&Qi(t.createElement("sub"),e)}else"B"===e.nodeName?e=Xi(e,"strong"):"I"===e.nodeName?e=Xi(e,"em"):"A"===e.nodeName&&(e.target&&"_blank"===e.target.toLowerCase()?e.rel="noreferrer noopener":(e.removeAttribute("target"),e.removeAttribute("rel")))},Hh=function(e){"SCRIPT"!==e.nodeName&&"NOSCRIPT"!==e.nodeName&&"TEMPLATE"!==e.nodeName&&"STYLE"!==e.nodeName||e.parentNode.removeChild(e)},Vh=window.parseInt;function Bh(e){return"OL"===e.nodeName||"UL"===e.nodeName}var Uh=function(e,t){if("P"===e.nodeName){var n=e.getAttribute("style");if(n&&-1!==n.indexOf("mso-list")){var r=/mso-list\s*:[^;]+level([0-9]+)/i.exec(n);if(r){var o=Vh(r[1],10)-1||0,i=e.previousElementSibling;if(!i||!Bh(i)){var a=e.textContent.trim().slice(0,1),s=/[1iIaA]/.test(a),c=t.createElement(s?"ol":"ul");s&&c.setAttribute("type",a),e.parentNode.insertBefore(c,e)}var l=e.previousElementSibling,u=l.nodeName,d=t.createElement("li"),f=l;for(e.removeChild(e.firstElementChild);e.firstChild;)d.appendChild(e.firstChild);for(;o--;)Bh(f=f.lastElementChild||f)&&(f=f.lastElementChild||f);Bh(f)||(f=f.appendChild(t.createElement(u))),f.appendChild(d),e.parentNode.removeChild(e)}}}},Wh=window.URL,Kh=Wh.createObjectURL,Yh=(Wh.revokeObjectURL,{});function $h(e){var t=Kh(e);return Yh[t]=e,t}var qh=window,Gh=qh.atob,Zh=qh.File,Xh=function(e){if("IMG"===e.nodeName){if(0===e.src.indexOf("file:")&&(e.src=""),0===e.src.indexOf("data:")){var t,n=Fe(e.src.split(","),2),r=n[0],o=n[1],i=Fe(r.slice(5).split(";"),1)[0];if(!o||!i)return void(e.src="");try{t=Gh(o)}catch(u){return void(e.src="")}for(var a=new Uint8Array(t.length),s=0;s ")&&0===r.indexOf(" ")&&(s="INLINE")),"INLINE"===s)return rp(r);var f=Nh(r),h=f.length>1;if("AUTO"===s&&!h&&function(e,t){var n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;var r=Array.from(n.body.children);return!r.some(zh)&&Ah(r,t)}(r,c))return rp(r);var p=Object(N.filter)(xd("from"),{type:"raw"}).map((function(e){return e.isMatch?e:D({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})),v=sh(),m=fh(p),b=Object(N.compact)(Object(N.flatMap)(f,(function(e){if("string"!=typeof e)return e;var t=[tp,Uh,Hh,Sh,Xh,Fh,wh,Lh,Ch,Eh];u||t.unshift(ep);var n=D({},m,v);return e=mh(e=vh(e,t,m),n),e=kh(e),np.log("Processed HTML piece:\n\n",e),function(e){var t=e.html,n=e.rawTransforms,r=document.implementation.createHTMLDocument("");return r.body.innerHTML=t,Array.from(r.body.children).map((function(e){var t=Td(n,(function(t){return(0,t.isMatch)(e)}));if(!t)return wd("core/html",nh("core/html",e.outerHTML));var r=t.transform,o=t.blockName;return r?r(e):wd(o,nh(o,e.outerHTML))}))}({html:e,rawTransforms:p})})));if("AUTO"===s&&1===b.length){var g=i.trim();if(""!==g&&-1===g.indexOf("\n"))return mh(vf(b[0]),v)}return b}function ip(e){var t=e.HTML,n=void 0===t?"":t;if(-1!==n.indexOf("\x3c!-- wp:"))return ih(n);var r=Nh(n),o=Object(N.filter)(xd("from"),{type:"raw"}).map((function(e){return e.isMatch?e:D({},e,{isMatch:function(t){return e.selector&&t.matches(e.selector)}})})),i=fh(o);return Object(N.compact)(Object(N.flatMap)(r,(function(e){return"string"!=typeof e?e:(e=vh(e,[Sh,wh,Ch,Eh],i),function(e){var t=e.html,n=e.rawTransforms,r=document.implementation.createHTMLDocument("");return r.body.innerHTML=t,Array.from(r.body.children).map((function(e){var t=Td(n,(function(t){return(0,t.isMatch)(e)}));if(!t)return wd("core/html",nh("core/html",e.outerHTML));var r=t.transform,o=t.blockName;return r?r(e):wd(o,nh(o,e.outerHTML))}))}({html:e=kh(e),rawTransforms:o}))})))}function ap(){return Nu("core/blocks").getCategories()}function sp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t?Object(N.map)(t,(function(t,n){var r=Fe(t,3),o=r[0],i=r[1],a=r[2],s=e[n];if(s&&s.name===o)return D({},s,{innerBlocks:sp(s.innerBlocks,a)});var c=md(o),l=function(e,t){return Object(N.mapValues)(t,(function(t,n){return u(e[n],t)}))},u=function(e,t){return n=e,"html"===Object(N.get)(n,["source"])&&Object(N.isArray)(t)?de(t):function(e){return"query"===Object(N.get)(e,["source"])}(e)&&t?t.map((function(t){return l(e.query,t)})):t;var n};return wd(o,l(Object(N.get)(c,["attributes"],{}),i),sp([],a))})):e}function cp(e){return!!e&&"Generator"===e[Symbol.toStringTag]}function lp(e){return Object(N.isPlainObject)(e)&&Object(N.isString)(e.type)}function up(e,t){return lp(e)&&e.type===t}function dp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=Object(N.map)(e,(function(e,t){return function(n,r,o,i,a){if(!up(n,t))return!1;var s=e(n);return at()(s)?s.then(i,a):i(s),!0}})),r=function(e,n){return!!lp(e)&&(t(e),n(),!0)};n.push(r);var o=Object(ot.create)(n);return function(e){return new Promise((function(n,r){return o(e,(function(e){lp(e)&&t(e),n(e)}),r)}))}}var fp=function(){return function(e){return function(t){return at()(t)?t.then((function(t){if(t)return e(t)})):e(t)}}},hp=function(e,t){return function(){return function(n){return function(r){var o=e.select("core/data").getCachedResolvers(t);return Object.entries(o).forEach((function(n){var o=Fe(n,2),i=o[0],a=o[1],s=Object(N.get)(e.stores,[t,"resolvers",i]);s&&s.shouldInvalidate&&a.forEach((function(n,o){!1===n&&s.shouldInvalidate.apply(s,[r].concat(ft(o)))&&e.dispatch("core/data").invalidateResolution(t,i,o)}))})),n(r)}}}},pp=Object(N.flowRight)([function(e){return function(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=r[e];if(void 0===o)return n;var i=t(n[o],r);return i===n[o]?n:D({},n,x({},o,i))}}}("selectorName")])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new mt.a,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var n="START_RESOLUTION"===t.type,r=new mt.a(e);return r.set(t.args,n),r;case"INVALIDATE_RESOLUTION":var o=new mt.a(e);return o.delete(t.args),o}return e})),vp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(N.has)(e,[t.selectorName])?Object(N.omit)(e,[t.selectorName]):e;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return pp(e,t)}return e};function mp(e,t,n){var r=Object(N.get)(e,[t]);if(r)return r.get(n)}function bp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return void 0!==mp(e,t,n)}function gp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!1===mp(e,t,n)}function yp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!0===mp(e,t,n)}function kp(e){return e}function _p(e,t){return{type:"START_RESOLUTION",selectorName:e,args:t}}function wp(e,t){return{type:"FINISH_RESOLUTION",selectorName:e,args:t}}function Op(e,t){return{type:"INVALIDATE_RESOLUTION",selectorName:e,args:t}}function Sp(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function Ep(e){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:e}}function Cp(e,t,n){var r,o=t.reducer,i=function(e,t,n){var r=[hp(n,e),fp];if(t.controls){var o=Object(N.mapValues)(t.controls,(function(e){return e.isRegistryControl?e(n):e}));r.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=dp(e,t.dispatch);return function(e){return function(t){return cp(t)?n(t):e(t)}}}}(o))}var i=[nt.apply(void 0,r)];"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&i.push(window.__REDUX_DEVTOOLS_EXTENSION__({name:e,instanceId:e}));var a=t.reducer,s=t.initialState;return Ze(Ve()({metadata:vp,root:a}),{root:s},Object(N.flowRight)(i))}(e,t,n),a=function(e,t){return Object(N.mapValues)(e,(function(e){return function(){return Promise.resolve(t.dispatch(e.apply(void 0,arguments)))}}))}(D({},m,t.actions),i),s=function(e,t,n){return Object(N.mapValues)(e,(function(e){var r=e.isRegistrySelector?e(n.select):e,o=function(){var e=arguments.length,n=new Array(e+1);n[0]=t.__unstableOriginalGetState();for(var o=0;o 1?function(e,t,n,r,o){if(o<0&&n)return ve("Blocks cannot be moved up as they are already at the top");if(o>0&&r)return ve("Blocks cannot be moved down as they are already at the bottom");if(o<0&&!n)return me("Move %1$d block from position %2$d up by one place","Move %1$d blocks from position %2$d up by one place",e);if(o>0&&!r)return me("Move %1$d block from position %2$d down by one place","Move %1$d blocks from position %2$d down by one place",e)}(e,0,r,o,i):r&&o?ve("Block %s is the only block, and cannot be moved"):i>0&&!o?ve("Move %1$s block from position %2$d down to position %3$d"):i>0&&o?ve("Block %s is at the end of the content and can’t be moved down"):i<0&&!r?ve("Move %1$s block from position %2$d up to position %3$d"):i<0&&r?ve("Block %s is at the beginning of the content and can’t be moved up"):void 0}var Q_=Object(I.createElement)(Mn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Dn,{points:"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 "})),J_=Object(I.createElement)(Mn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(Dn,{points:"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 "})),ew=Object(I.createElement)(Mn,{width:"18",height:"18",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18"},Object(I.createElement)(xn,{d:"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10 c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6 C8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z"})),tw=Og((function(e,t){var n=t.clientId,r=e("core/block-editor"),o=r.getBlockIndex,i=(0,r.getBlockRootClientId)(n);return{index:o(n,i),rootClientId:i}}))((function(e){var t=e.children,n=e.clientId,r=e.rootClientId,o=e.blockElementId,i=e.index,a=e.onDragStart,s=e.onDragEnd,c={type:"block",srcIndex:i,srcRootClientId:r,srcClientId:n};return Object(I.createElement)(js,{elementId:o,transferData:c,onDragStart:a,onDragEnd:s},(function(e){var n=e.onDraggableStart,r=e.onDraggableEnd;return t({onDraggableStart:n,onDraggableEnd:r})}))})),nw=function(e){var t=e.isVisible,n=e.className,r=e.icon,o=e.onDragStart,i=e.onDragEnd,a=e.blockElementId,s=e.clientId;if(!t)return null;var c=In()("editor-block-mover__control-drag-handle block-editor-block-mover__control-drag-handle",n);return Object(I.createElement)(tw,{clientId:s,blockElementId:a,onDragStart:o,onDragEnd:i},(function(e){var t=e.onDraggableStart,n=e.onDraggableEnd;return Object(I.createElement)("div",{className:c,"aria-hidden":"true",onDragStart:t,onDragEnd:n,draggable:!0},r)}))},rw=function(e){function t(){var e;return Ee(this,t),(e=De(this,Me(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(xe(e)),e.onBlur=e.onBlur.bind(xe(e)),e}return Ie(t,e),Te(t,[{key:"onFocus",value:function(){this.setState({isFocused:!0})}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.onMoveUp,n=e.onMoveDown,r=e.isFirst,o=e.isLast,i=e.isDraggable,a=e.onDragStart,s=e.onDragEnd,c=e.clientIds,l=e.blockElementId,u=e.blockType,d=(e.firstIndex,e.isLocked),f=e.instanceId,h=e.isHidden,p=e.rootClientId,v=this.state.isFocused,m=Object(N.castArray)(c).length;return d||r&&o&&!p?null:Object(I.createElement)("div",{className:In()("editor-block-mover block-editor-block-mover",{"is-visible":v||!h})},Object(I.createElement)(ya,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:r?null:t,icon:Q_,label:ve("Move up"),"aria-describedby":"block-editor-block-mover__up-description-".concat(f),"aria-disabled":r,onFocus:this.onFocus,onBlur:this.onBlur}),Object(I.createElement)(nw,{className:"editor-block-mover__control block-editor-block-mover__control",icon:ew,clientId:c,blockElementId:l,isVisible:i,onDragStart:a,onDragEnd:s}),Object(I.createElement)(ya,{className:"editor-block-mover__control block-editor-block-mover__control",onClick:o?null:n,icon:J_,label:ve("Move down"),"aria-describedby":"block-editor-block-mover__down-description-".concat(f),"aria-disabled":o,onFocus:this.onFocus,onBlur:this.onBlur}),Object(I.createElement)("span",{id:"block-editor-block-mover__up-description-".concat(f),className:"editor-block-mover__description block-editor-block-mover__description"},X_(m,u&&u.title,0,r,o,-1)),Object(I.createElement)("span",{id:"block-editor-block-mover__down-description-".concat(f),className:"editor-block-mover__description block-editor-block-mover__description"},X_(m,u&&u.title,0,r,o,1)))}}]),t}(I.Component),ow=Object(N.flowRight)(Og((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlock,i=r.getBlockIndex,a=r.getTemplateLock,s=r.getBlockRootClientId,c=r.getBlockOrder,l=Object(N.castArray)(n),u=Object(N.first)(l),d=o(u),f=s(Object(N.first)(l)),h=c(f),p=i(u,f),v=i(Object(N.last)(l),f);return{blockType:d?md(d.name):null,isLocked:"all"===a(f),rootClientId:f,firstIndex:p,isFirst:0===p,isLast:v===h.length-1}})),Cg((function(e,t){var n=t.clientIds,r=t.rootClientId,o=e("core/block-editor"),i=o.moveBlocksDown,a=o.moveBlocksUp;return{onMoveDown:Object(N.partial)(i,n,r),onMoveUp:Object(N.partial)(a,n,r)}})),lg)(rw);var iw=function(e){var t=e.className,n=e.actions,r=e.children,o=e.secondaryActions;return Object(I.createElement)("div",{className:In()(t,"editor-warning block-editor-warning")},Object(I.createElement)("div",{className:"editor-warning__contents block-editor-warning__contents"},Object(I.createElement)("p",{className:"editor-warning__message block-editor-warning__message"},r),I.Children.count(n)>0&&Object(I.createElement)("div",{className:"editor-warning__actions block-editor-warning__actions"},I.Children.map(n,(function(e,t){return Object(I.createElement)("span",{key:t,className:"editor-warning__action block-editor-warning__action"},e)})))),o&&Object(I.createElement)(Qa,{className:"editor-warning__secondary block-editor-warning__secondary",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(I.createElement)(ya,{icon:"ellipsis",label:ve("More options"),onClick:n,"aria-expanded":t})},renderContent:function(){return Object(I.createElement)(cc,null,o.map((function(e,t){return Object(I.createElement)(lc,{onClick:e.onClick,key:t},e.title)})))}}))},aw=n(138),sw=function(e){var t=e.title,n=e.rawContent,r=e.renderedContent,o=e.action,i=e.actionText,a=e.className;return Object(I.createElement)("div",{className:a},Object(I.createElement)("div",{className:"editor-block-compare__content block-editor-block-compare__content"},Object(I.createElement)("h2",{className:"editor-block-compare__heading block-editor-block-compare__heading"},t),Object(I.createElement)("div",{className:"editor-block-compare__html block-editor-block-compare__html"},n),Object(I.createElement)("div",{className:"editor-block-compare__preview block-editor-block-compare__preview edit-post-visual-editor"},r)),Object(I.createElement)("div",{className:"editor-block-compare__action block-editor-block-compare__action"},Object(I.createElement)(na,{isLarge:!0,tabIndex:"0",onClick:o},i)))},cw=function(e){function t(){return Ee(this,t),De(this,Me(t).apply(this,arguments))}return Ie(t,e),Te(t,[{key:"getDifference",value:function(e,t){return Object(aw.diffChars)(e,t).map((function(e,t){var n=In()({"editor-block-compare__added block-editor-block-compare__added":e.added,"editor-block-compare__removed block-editor-block-compare__removed":e.removed});return Object(I.createElement)("span",{key:t,className:n},e.value)}))}},{key:"getOriginalContent",value:function(e){return{rawContent:e.originalContent,renderedContent:hf(e.name,e.attributes)}}},{key:"getConvertedContent",value:function(e){var t=Object(N.castArray)(e),n=t.map((function(e){return pf(e.name,e.attributes,e.innerBlocks)})),r=t.map((function(e){return hf(e.name,e.attributes,e.innerBlocks)}));return{rawContent:n.join(""),renderedContent:r}}},{key:"render",value:function(){var e=this.props,t=e.block,n=e.onKeep,r=e.onConvert,o=e.convertor,i=e.convertButtonText,a=this.getOriginalContent(t),s=this.getConvertedContent(o(t)),c=this.getDifference(a.rawContent,s.rawContent);return Object(I.createElement)("div",{className:"editor-block-compare__wrapper block-editor-block-compare__wrapper"},Object(I.createElement)(sw,{title:ve("Current"),className:"editor-block-compare__current block-editor-block-compare__current",action:n,actionText:ve("Convert to HTML"),rawContent:a.rawContent,renderedContent:a.renderedContent}),Object(I.createElement)(sw,{title:ve("After Conversion"),className:"editor-block-compare__converted block-editor-block-compare__converted",action:r,actionText:i,rawContent:c,renderedContent:s.renderedContent}))}}]),t}(I.Component),lw=function(e){function t(e){var n;return Ee(this,t),(n=De(this,Me(t).call(this,e))).state={compare:!1},n.onCompare=n.onCompare.bind(xe(n)),n.onCompareClose=n.onCompareClose.bind(xe(n)),n}return Ie(t,e),Te(t,[{key:"onCompare",value:function(){this.setState({compare:!0})}},{key:"onCompareClose",value:function(){this.setState({compare:!1})}},{key:"render",value:function(){var e=this.props,t=e.convertToHTML,n=e.convertToBlocks,r=e.convertToClassic,o=e.attemptBlockRecovery,i=e.block,a=!!md("core/html"),s=this.state.compare,c=[{title:ve("Convert to Classic Block"),onClick:r},{title:ve("Attempt Block Recovery"),onClick:o}];return s?Object(I.createElement)(kc,{title:ve("Resolve Block"),onRequestClose:this.onCompareClose,className:"editor-block-compare block-editor-block-compare"},Object(I.createElement)(cw,{block:i,onKeep:t,onConvert:n,convertor:uw,convertButtonText:ve("Convert to Blocks")})):Object(I.createElement)(iw,{actions:[Object(I.createElement)(na,{key:"convert",onClick:this.onCompare,isLarge:!0,isPrimary:!a},be("Resolve","imperative verb")),a&&Object(I.createElement)(na,{key:"edit",onClick:t,isLarge:!0,isPrimary:!0},ve("Convert to HTML"))],secondaryActions:c},ve("This block contains unexpected or invalid content."))}}]),t}(I.Component),uw=function(e){return ip({HTML:e.originalContent})},dw=Object(N.flowRight)([Og((function(e,t){var n=t.clientId;return{block:e("core/block-editor").getBlock(n)}})),Cg((function(e,t){var n=t.block,r=e("core/block-editor").replaceBlock;return{convertToClassic:function(){r(n.clientId,function(e){return wd("core/freeform",{content:e.originalContent})}(n))},convertToHTML:function(){r(n.clientId,function(e){return wd("core/html",{content:e.originalContent})}(n))},convertToBlocks:function(){r(n.clientId,uw(n))},attemptBlockRecovery:function(){var e;r(n.clientId,wd((e=n).name,e.attributes,e.innerBlocks))}}}))])(lw),fw=Object(I.createElement)(iw,null,ve("This block has encountered an error and cannot be previewed.")),hw=function(){return fw},pw=function(e){function t(){var e;return Ee(this,t),(e=De(this,Me(t).apply(this,arguments))).state={hasError:!1},e}return Ie(t,e),Te(t,[{key:"componentDidCatch",value:function(e){this.props.onError(e),this.setState({hasError:!0})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}]),t}(I.Component),vw=n(36),mw=n.n(vw),bw=function(e){function t(e){var n;return Ee(this,t),(n=De(this,Me(t).apply(this,arguments))).onChange=n.onChange.bind(xe(n)),n.onBlur=n.onBlur.bind(xe(n)),n.state={html:e.block.isValid?vf(e.block):e.block.originalContent},n}return Ie(t,e),Te(t,[{key:"componentDidUpdate",value:function(e){Object(N.isEqual)(this.props.block.attributes,e.block.attributes)||this.setState({html:vf(this.props.block)})}},{key:"onBlur",value:function(){var e=this.state.html,t=md(this.props.block.name),n=nh(t,e,this.props.block.attributes),r=e||pf(t,n),o=!e||Vf(t,n,r);this.props.onChange(this.props.clientId,n,r,o),e||this.setState({html:r})}},{key:"onChange",value:function(e){this.setState({html:e.target.value})}},{key:"render",value:function(){var e=this.state.html;return Object(I.createElement)(mw.a,{className:"editor-block-list__block-html-textarea block-editor-block-list__block-html-textarea",value:e,onBlur:this.onBlur,onChange:this.onChange})}}]),t}(I.Component),gw=Object(N.flowRight)([Og((function(e,t){return{block:e("core/block-editor").getBlock(t.clientId)}})),Cg((function(e){return{onChange:function(t,n,r,o){e("core/block-editor").updateBlock(t,{attributes:n,originalContent:r,isValid:o})}}}))])(bw);var yw=Og((function(e,t){return{name:(0,e("core/block-editor").getBlockName)(t.clientId)}}))((function(e){var t=e.name;if(!t)return null;var n=md(t);return n?n.title:null})),kw=function(e){function t(){var e;return Ee(this,t),(e=De(this,Me(t).apply(this,arguments))).state={isFocused:!1},e.onFocus=e.onFocus.bind(xe(e)),e.onBlur=e.onBlur.bind(xe(e)),e}return Ie(t,e),Te(t,[{key:"onFocus",value:function(e){this.setState({isFocused:!0}),e.stopPropagation()}},{key:"onBlur",value:function(){this.setState({isFocused:!1})}},{key:"render",value:function(){var e=this.props,t=e.clientId,n=e.rootClientId;return Object(I.createElement)("div",{className:"editor-block-list__breadcrumb block-editor-block-list__breadcrumb"},Object(I.createElement)(ql,null,n&&Object(I.createElement)(I.Fragment,null,Object(I.createElement)(yw,{clientId:n}),Object(I.createElement)("span",{className:"editor-block-list__descendant-arrow block-editor-block-list__descendant-arrow"})),Object(I.createElement)(yw,{clientId:t})))}}]),t}(I.Component),_w=Object(N.flowRight)([Og((function(e,t){return{rootClientId:(0,e("core/block-editor").getBlockRootClientId)(t.clientId)}}))])(kw),ww=window,Ow=ww.Node,Sw=ww.getSelection,Ew=function(e){function t(){var e;return Ee(this,t),(e=De(this,Me(t).apply(this,arguments))).focusToolbar=e.focusToolbar.bind(xe(e)),e.focusSelection=e.focusSelection.bind(xe(e)),e.switchOnKeyDown=Object(N.cond)([[Object(N.matchesProperty)(["keyCode"],27),e.focusSelection]]),e.toolbar=Object(I.createRef)(),e}return Ie(t,e),Te(t,[{key:"focusToolbar",value:function(){var e=Ji.tabbable.find(this.toolbar.current);e.length&&e[0].focus()}},{key:"focusSelection",value:function(){var e=Sw();if(e){var t=e.focusNode;t.nodeType!==Ow.ELEMENT_NODE&&(t=t.parentElement),t&&t.focus()}}},{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.focusToolbar()}},{key:"render",value:function(){var e=this.props,t=e.children,n=j(e,["children"]);return Object(I.createElement)(Us,Le({orientation:"horizontal",role:"toolbar",ref:this.toolbar,onKeyDown:this.switchOnKeyDown},Object(N.omit)(n,["focusOnMount"])),Object(I.createElement)(as,{bindGlobal:!0,eventName:"keydown",shortcuts:{"alt+f10":this.focusToolbar}}),t)}}]),t}(I.Component);var Cw=function(e){var t=e.focusOnMount;return Object(I.createElement)(Ew,{focusOnMount:t,className:"editor-block-contextual-toolbar block-editor-block-contextual-toolbar","aria-label":ve("Block tools")},Object(I.createElement)(LS,null))};var Tw=Og((function(e){var t=e("core/block-editor"),n=t.getMultiSelectedBlockClientIds,r=t.isMultiSelecting;return{multiSelectedBlockClientIds:n(),isSelecting:r()}}))((function(e){var t=e.multiSelectedBlockClientIds;return e.isSelecting?null:Object(I.createElement)(ow,{clientIds:t})}));var xw=Eb("< small")((function(e){var t=e.clientId;return Object(I.createElement)("div",{className:"editor-block-list__block-mobile-toolbar block-editor-block-list__block-mobile-toolbar"},Object(I.createElement)(rO,null),Object(I.createElement)(ow,{clientIds:[t]}))})),Dw=function(e){function t(){var e;return Ee(this,t),(e=De(this,Me(t).apply(this,arguments))).state={isInserterFocused:!1},e.onBlurInserter=e.onBlurInserter.bind(xe(e)),e.onFocusInserter=e.onFocusInserter.bind(xe(e)),e}return Ie(t,e),Te(t,[{key:"onFocusInserter",value:function(e){e.stopPropagation(),this.setState({isInserterFocused:!0})}},{key:"onBlurInserter",value:function(){this.setState({isInserterFocused:!1})}},{key:"render",value:function(){var e=this.state.isInserterFocused,t=this.props,n=t.showInsertionPoint,r=t.rootClientId,o=t.clientId;return Object(I.createElement)("div",{className:"editor-block-list__insertion-point block-editor-block-list__insertion-point"},n&&Object(I.createElement)("div",{className:"editor-block-list__insertion-point-indicator block-editor-block-list__insertion-point-indicator"}),Object(I.createElement)("div",{onFocus:this.onFocusInserter,onBlur:this.onBlurInserter,tabIndex:-1,className:In()("editor-block-list__insertion-point-inserter block-editor-block-list__insertion-point-inserter",{"is-visible":e})},Object(I.createElement)(rO,{rootClientId:r,clientId:o})))}}]),t}(I.Component),Mw=Og((function(e,t){var n=t.clientId,r=t.rootClientId,o=e("core/block-editor"),i=o.getBlockIndex,a=o.getBlockInsertionPoint,s=o.isBlockInsertionPointVisible,c=i(n,r),l=a();return{showInsertionPoint:s()&&l.index===c&&l.rootClientId===r}}))(Dw),jw=function(e){function t(){var e;return Ee(this,t),(e=De(this,Me(t).apply(this,arguments))).proxyEvent=e.proxyEvent.bind(xe(e)),e.eventMap={},e}return Ie(t,e),Te(t,[{key:"proxyEvent",value:function(e){var t=!!e.nativeEvent._blockHandled;e.nativeEvent._blockHandled=!0;var n=this.eventMap[e.type];t&&(n+="Handled"),this.props[n]&&this.props[n](e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.childHandledEvents,r=void 0===n?[]:n,o=t.forwardedRef,i=j(t,["childHandledEvents","forwardedRef"]),a=Object(N.reduce)([].concat(ft(r),ft(Object.keys(i))),(function(t,n){var r=n.match(/^on([A-Z][a-zA-Z]+?)(Handled)?$/);if(r){!!r[2]&&delete i[n];var o="on"+r[1];t[o]=e.proxyEvent,e.eventMap[r[1].toLowerCase()]=o}return t}),{});return Object(I.createElement)("div",Le({ref:o},i,a))}}]),t}(I.Component),Iw=function(e,t){return Object(I.createElement)(jw,Le({},e,{forwardedRef:t}))};Iw.displayName="IgnoreNestedEvents";var Pw=Object(I.forwardRef)(Iw);var Nw=Object(N.flowRight)(Og((function(e,t){var n=t.rootClientId,r=e("core/block-editor"),o=r.getInserterItems,i=r.getTemplateLock;return{items:o(n),isLocked:!!i(n)}})),Cg((function(e,t){var n=t.clientId,r=t.rootClientId;return{onInsert:function(t){var o=wd(t.name,t.initialAttributes);n?e("core/block-editor").replaceBlocks(n,o):e("core/block-editor").insertBlock(o,void 0,r)}}})))((function(e){var t=e.items,n=e.isLocked,r=e.onInsert;if(n)return null;var o=Object(N.filter)(t,(function(e){return!(e.isDisabled||e.name===vd()&&Object(N.isEmpty)(e.initialAttributes))})).slice(0,3);return Object(I.createElement)("div",{className:"editor-inserter-with-shortcuts block-editor-inserter-with-shortcuts"},o.map((function(e){return Object(I.createElement)(ya,{key:e.id,className:"editor-inserter-with-shortcuts__block block-editor-inserter-with-shortcuts__block",onClick:function(){return r(e)},label:ge(ve("Add %s"),e.title),icon:Object(I.createElement)(L_,{icon:e.icon})})})))})),Rw=function(e){var t=Fe(Object(I.useState)(null),2),n=t[0],r=t[1];return Object(I.useEffect)((function(){var t=function(){n&&r(null)},o=function(t){var n=e.current.getBoundingClientRect(),o=n.width,i=n.left,a=n.right,s=null;t.clientX-i 0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!O.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=O.slice(-1)[0],E=(n.host||e.host||O.length>1)&&("."===C||".."===C)||""===C,x=0,S=O.length;S>=0;S--)"."===(C=O[S])?O.splice(S,1):".."===C?(O.splice(S,1),x++):x&&(O.splice(S,1),x--);if(!_&&!k)for(;x--;x)O.unshift("..");!_||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),E&&"/"!==O.join("/").substr(-1)&&O.push("");var A,F=""===O[0]||O[0]&&"/"===O[0].charAt(0);w&&(n.hostname=n.host=F?"":O.length?O.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(_=_||n.host&&O.length)&&!F&&O.unshift(""),O.length?n.pathname=O.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){!function(){e.exports=this.wp.url}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t){function n(e,t,n,r,i,a,o){try{var c=e[a](o),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function c(e){n(o,i,a,c,s,"next",e)}function s(e){n(o,i,a,c,s,"throw",e)}c(void 0)}))}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"e",(function(){return c}));var r="after-visits",i="before-visits",a=3,o="jp-visit-counter",c=15552e3},function(e,t,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(n.p=window.Jetpack_Block_Assets_Base_Url)},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t _((c-n)/(j=r+1))&&O("overflow"),n+=(p-t)*j,t=p,o=0;o =0;){if((i=a[n]).open&&i.marker===r.marker&&i.end<0&&i.level===r.level)if(!((i.close||r.open)&&void 0!==i.length&&void 0!==r.length&&(i.length+r.length)%3==0)){r.jump=t-n,r.open=!1,i.end=t,i.jump=0;break}n-=i.jump+1}}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t0&&this.level++,this.pendingLevel=this.level,this.tokens.push(i),i},c.prototype.scanDelims=function(e,t){var n,r,c,s,l,u,p,h,d,m=e,f=!0,b=!0,g=this.posMax,v=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;m 0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!O.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=O.slice(-1)[0],C=(n.host||e.host||O.length>1)&&("."===E||".."===E)||""===E,x=0,S=O.length;S>=0;S--)"."===(E=O[S])?O.splice(S,1):".."===E?(O.splice(S,1),x++):x&&(O.splice(S,1),x--);if(!_&&!k)for(;x--;x)O.unshift("..");!_||""===O[0]||O[0]&&"/"===O[0].charAt(0)||O.unshift(""),C&&"/"!==O.join("/").substr(-1)&&O.push("");var A,F=""===O[0]||O[0]&&"/"===O[0].charAt(0);w&&(n.hostname=n.host=F?"":O.length?O.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(_=_||n.host&&O.length)&&!F&&O.unshift(""),O.length?n.pathname=O.join("/"):(n.pathname=null,n.path=null),a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t'),mode:"BLOCKS",tagName:this.props.tagName}),d=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",l),void(d?this.props.onReplace(u):this.onSplit&&this.onSplit(c,u))}if(!Zo(c)){var f=(i||o).replace(/<[^>]+>/g,"").trim();if(a=f,be.test(a))return this.onChange(Do(c,{type:"a",attributes:{href:If(f)}})),void window.console.log("Created link:\n\n",f)}var h=this.props.onReplace&&this.isEmpty(),p=this.props.onReplace&&this.props.onSplit,v="INLINE";h?v="BLOCKS":p&&(v="AUTO");var m=Ip({HTML:i,plainText:o,mode:v,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof m){var g=Ao({html:m});this.multilineTag&&(g=ni(g,/\n+/g,jo)),this.onChange(ei(c,g))}else m.length>0&&(h?this.props.onReplace(m):this.onSplit(c,m))}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),this.recalculateBoundaryStyle();this.record=D({},this.record,{start:void 0,end:void 0,activeFormats:void 0}),this.props.onSelectionChange(void 0,void 0),this.setState({activeFormats:void 0}),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onBlur",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"onInput",value:function(e){if(e&&e.nativeEvent.isComposing)document.removeEventListener("selectionchange",this.onSelectionChange);else{if(e&&e.nativeEvent.inputType){var t=e.nativeEvent.inputType;if(0===t.indexOf("format")||wS.has(t))return void this.applyRecord(this.getRecord())}var n=this.createRecord(),r=this.record,o=r.start,i=r.activeFormats,a=void 0===i?[]:i,s=Li({value:n,start:o,end:n.start,formats:a});this.onChange(s,{withoutHistory:!0});var c=this.patterns.reduce((function(e,t){return t(e)}),s);c!==s&&(this.onCreateUndoLevel(),this.onChange(D({},c,{activeFormats:a}))),this.props.clearTimeout(this.onInput.timeout),this.onInput.timeout=this.props.setTimeout(this.onCreateUndoLevel,1e3)}}},{key:"onCompositionEnd",value:function(){this.onInput(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onSelectionChange",value:function(){var e=this.createRecord(),t=e.start,n=e.end,r=this.getRecord();if(t!==r.start||n!==r.end){var o=this.props.isCaretWithinFormattedText,i=D({},r,{start:t,end:n,activeFormats:void 0}),a=Wo(i);i.activeFormats=a,!o&&a.length?this.props.onEnterFormattedText():o&&!a.length&&this.props.onExitFormattedText(),this.record=i,this.applyRecord(i,{domOnly:!0}),this.props.onSelectionChange(t,n),this.setState({activeFormats:a}),a.length>0&&this.recalculateBoundaryStyle()}}},{key:"recalculateBoundaryStyle",value:function(){var e=this.editableRef.querySelector("*[data-rich-text-format-boundary]");if(e){var t=_S(e).color.replace(")",", 0.2)").replace("rgb","rgba"),n=".".concat("block-editor-rich-text__editable",":focus ").concat("*[data-rich-text-format-boundary]"),r="background-color: ".concat(t);OS.innerHTML="".concat(n," {").concat(r,"}")}}},{key:"onChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.withoutHistory;this.applyRecord(e);var r=e.start,o=e.end,i=e.activeFormats,a=void 0===i?[]:i,s=Object(N.pickBy)(this.props,(function(e,t){return t.startsWith("format_on_change_functions_")}));Object.values(s).forEach((function(t){t(e.formats,e.text)})),this.value=this.valueToFormat(e),this.record=e,this.props.onChange(this.value),this.props.onSelectionChange(r,o),this.setState({activeFormats:a}),n||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.value&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.value)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,r=t.onRemove;if(n||r){var o=e.keyCode===Ln;if(Zo(this.createRecord())){var i=this.isEmpty();(i||Qi(this.editableRef,o))&&(n&&n(!o),r&&i&&o&&r(!o),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey,a=this.props,s=a.onReplace,c=a.onSplit,l=s&&c;if(n||r||o||i||t!==Vn&&t!==Un||this.handleHorizontalNavigation(e),t===Hn&&"li"===this.multilineTag){var u=this.createRecord();if(Zo(u)){var d=u.text[u.start-1];d&&d!==jo||(this.onChange(Ii(u,{type:this.props.tagName})),e.preventDefault())}}if(t===Kn||t===Ln){var f=this.createRecord(),h=f.start,p=f.end;if(0===h&&0!==p&&p===f.text.length)return this.onChange(ti(f)),void e.preventDefault();if(this.multilineTag){var v=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.replacements,r=e.text,o=e.start,i=e.end,a=Zo(e),s=o-1,c=a?o-1:o,l=i;if(t||(s=i,c=o,l=a?i+1:i),r[s]===jo){var u;if(a&&n[s]&&n[s].length){var d=n.slice();d[s]=n[s].slice(0,-1),u=D({},e,{replacements:d})}else u=ti(e,c,l);return u}}(f,t===Ln);v&&(this.onChange(v),e.preventDefault())}this.onDeleteKeyDown(e)}else if(t===zn){e.preventDefault();var m=this.createRecord();if(this.props.onReplace){var g=Yo(m),b=ef(this.enterPatterns,(function(e){return e.regExp.test(g)}));if(b)return void this.props.onReplace([b.transform({content:g})])}this.multilineTag?e.shiftKey?this.onChange(ei(m,"\n")):l&&function(e){var t=e.text,n=e.start,r=e.end;return n===r&&(0===t.length||(0===n&&t.slice(0,1)===jo||(n===t.length&&t.slice(-1)===jo||t.slice(n-1,r+1)==="".concat(jo).concat(jo))))}(m)?this.onSplit(m):this.onChange(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,r=Yo(e).slice(0,t).lastIndexOf(jo),o=e.replacements[r],i=[,];return o&&(i=[o]),ei(e,{formats:[,],replacements:i,text:jo},t,n)}(m)):e.shiftKey||!l?this.onChange(ei(m,"\n")):this.onSplit(m)}}},{key:"handleHorizontalNavigation",value:function(e){var t=this,n=this.getRecord(),r=n.text,o=n.formats,i=n.start,a=n.end,s=n.activeFormats,c=void 0===s?[]:s,l=Zo(n),u="rtl"===_S(this.editableRef).direction?Un:Vn,d=e.keyCode===u;if(l&&0===c.length){if(0===i&&d)return;if(a===r.length&&!d)return}if(l){e.preventDefault();var f=o[i-1]||[],h=o[i]||[],p=c.length,v=h;if(f.length>h.length&&(v=f),f.length
-1},Nn.prototype.set=function(e,t){var n=this.__data__,r=Wn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new Pn,map:new(hn||Nn),string:new Pn}},Rn.prototype.delete=function(e){var t=Qo(this,e).delete(e);return this.size-=t?1:0,t},Rn.prototype.get=function(e){return Qo(this,e).get(e)},Rn.prototype.has=function(e){return Qo(this,e).has(e)},Rn.prototype.set=function(e,t){var n=Qo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(e){return this.__data__.has(e)},An.prototype.clear=function(){this.__data__=new Nn,this.size=0},An.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},An.prototype.get=function(e){return this.__data__.get(e)},An.prototype.has=function(e){return this.__data__.has(e)},An.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Nn){var r=n.__data__;if(!hn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rn(r)}return n.set(e,t),this.size=n.size,this};var er=wo(cr),tr=wo(lr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function rr(e,t,n){for(var r=-1,o=e.length;++r-1&&e%1==0&&e',showdown:"S"},i.Converter=function(e){"use strict";var t={},n=[],r=[],o={},a=l,f={parsed:{},raw:"",format:""};function h(e,t){if(t=t||null,i.helper.isString(e)){if(t=e=i.helper.stdExtName(e),i.extensions[e])return console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),void function(e,t){"function"==typeof e&&(e=e(new i.Converter));i.helper.isArray(e)||(e=[e]);var o=d(e,t);if(!o.valid)throw Error(o.error);for(var a=0;a
[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return n=(n=n.replace(/^ /gm,"¨0")).replace(/¨0/g,"")})),i.subParser("hashBlock")("
\n"+e+"\n
",t,n)})),e=n.converter._dispatch("blockQuotes.after",e,t,n)})),i.subParser("codeBlocks",(function(e,t,n){"use strict";e=n.converter._dispatch("codeBlocks.before",e,t,n);return e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,(function(e,r,o){var a=r,s=o,c="\n";return a=i.subParser("outdent")(a,t,n),a=i.subParser("encodeCode")(a,t,n),a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(c=""),a="
",i.subParser("hashBlock")(a,t,n)+s}))).replace(/¨0/,""),e=n.converter._dispatch("codeBlocks.after",e,t,n)})),i.subParser("codeSpans",(function(e,t,n){"use strict";return void 0===(e=n.converter._dispatch("codeSpans.before",e,t,n))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,r,o,a){var s=a;return s=(s=s.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),s=r+""+a+c+"
"+(s=i.subParser("encodeCode")(s,t,n))+"
",s=i.subParser("hashHTMLSpans")(s,t,n)})),e=n.converter._dispatch("codeSpans.after",e,t,n)})),i.subParser("completeHTMLDocument",(function(e,t,n){"use strict";if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",o="\n",i="",a='\n',s="",c="";for(var l in void 0!==n.metadata.parsed.doctype&&(o="\n","html"!==(r=n.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==r||(a='')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":i="
",a=i.subParser("hashBlock")(a,t,n),"\n\n¨G"+(n.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"}))).replace(/¨0/,""),n.converter._dispatch("githubCodeBlocks.after",e,t,n)):e})),i.subParser("hashBlock",(function(e,t,n){"use strict";return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",e=n.converter._dispatch("hashBlock.after",e,t,n)})),i.subParser("hashCodeTags",(function(e,t,n){"use strict";e=n.converter._dispatch("hashCodeTags.before",e,t,n);return e=i.helper.replaceRecursiveRegExp(e,(function(e,r,o,a){var s=o+i.subParser("encodeCode")(r,t,n)+a;return"¨C"+(n.gHtmlSpans.push(s)-1)+"C"}),""+(a=(a=(a=i.subParser("detab")(a,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+s+"
]*>","
","gim"),e=n.converter._dispatch("hashCodeTags.after",e,t,n)})),i.subParser("hashElement",(function(e,t,n){"use strict";return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),r="\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),i.subParser("hashHTMLBlocks",(function(e,t,n){"use strict";e=n.converter._dispatch("hashHTMLBlocks.before",e,t,n);var r=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],o=function(e,t,r,o){var i=e;return-1!==r.search(/\bmarkdown\b/)&&(i=r+n.converter.makeHtml(t)+o),"\n\n¨K"+(n.gHtmlBlocks.push(i)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"<"+t+">"})));for(var a=0;a]*>","^ {0,3}
\\s*","gim"),e=n.converter._dispatch("hashPreCodeTags.after",e,t,n)})),i.subParser("headers",(function(e,t,n){"use strict";e=n.converter._dispatch("headers.before",e,t,n);var r=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),o=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,a=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,(function(e,o){var a=i.subParser("spanGamut")(o,t,n),s=t.noHeaderId?"":' id="'+c(o)+'"',l="
",t,n);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,r),e=n.converter._dispatch("horizontalRule.after",e,t,n)})),i.subParser("images",(function(e,t,n){"use strict";function r(e,t,r,o,a,s,c,l){var u=n.gUrls,d=n.gTitles,f=n.gDimensions;if(r=r.toLowerCase(),l||(l=""),e.search(/\(\s*>? ?(['"].*['"])?\)$/m)>-1)o="";else if(""===o||null===o){if(""!==r&&null!==r||(r=t.toLowerCase().replace(/ ?\n/g," ")),o="#"+r,i.helper.isUndefined(u[r]))return e;o=u[r],i.helper.isUndefined(d[r])||(l=d[r]),i.helper.isUndefined(f[r])||(a=f[r].width,s=f[r].height)}t=t.replace(/"/g,""").replace(i.helper.regexes.asteriskDashAndColon,i.helper.escapeCharactersCallback);var h='"}return e=(e=(e=(e=(e=(e=n.converter._dispatch("images.before",e,t,n)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,n,o,i,a,s,c){return r(e,t,n,o=o.replace(/\s/g,""),i,a,s,c)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,r)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,r)).replace(/!\[([^\[\]]+)]()()()()()/g,r),e=n.converter._dispatch("images.after",e,t,n)})),i.subParser("italicsAndBold",(function(e,t,n){"use strict";function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"","")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"","")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"","")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"","")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"",""):e})),e=n.converter._dispatch("italicsAndBold.after",e,t,n)})),i.subParser("lists",(function(e,t,n){"use strict";function r(e,r){n.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,a=/\n[ \t]*\n(?!¨0)/.test(e+="¨0");return t.disableForced4SpacesIndentedSublists&&(o=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(o,(function(e,r,o,s,c,l,u){u=u&&""!==u.trim();var d=i.subParser("outdent")(c,t,n),f="";return l&&t.tasklists&&(f=' class="task-list-item" style="list-style-type: none;"',d=d.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='"}))),d=d.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,(function(e){return"¨A"+e})),r||d.search(/\n{2,}/)>-1?(d=i.subParser("githubCodeBlocks")(d,t,n),d=i.subParser("blockGamut")(d,t,n)):(d=(d=i.subParser("lists")(d,t,n)).replace(/\n$/,""),d=(d=i.subParser("hashHTMLBlocks")(d,t,n)).replace(/\n\n+/g,"\n\n"),d=a?i.subParser("paragraphs")(d,t,n):i.subParser("spanGamut")(d,t,n)),d="
]*>/.test(u)&&(d=!0)}o[s]=u}return e=(e=(e=o.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),n.converter._dispatch("paragraphs.after",e,t,n)})),i.subParser("runExtension",(function(e,t,n,r){"use strict";if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var o=e.regex;o instanceof RegExp||(o=new RegExp(o,"g")),t=t.replace(o,e.replace)}return t})),i.subParser("spanGamut",(function(e,t,n){"use strict";return e=n.converter._dispatch("spanGamut.before",e,t,n),e=i.subParser("codeSpans")(e,t,n),e=i.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,n),e=i.subParser("encodeBackslashEscapes")(e,t,n),e=i.subParser("images")(e,t,n),e=i.subParser("anchors")(e,t,n),e=i.subParser("autoLinks")(e,t,n),e=i.subParser("simplifiedAutoLinks")(e,t,n),e=i.subParser("emoji")(e,t,n),e=i.subParser("underline")(e,t,n),e=i.subParser("italicsAndBold")(e,t,n),e=i.subParser("strikethrough")(e,t,n),e=i.subParser("ellipsis")(e,t,n),e=i.subParser("hashHTMLSpans")(e,t,n),e=i.subParser("encodeAmpsAndAngles")(e,t,n),t.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"
\n")):e=e.replace(/ +\n/g,"
\n"),e=n.converter._dispatch("spanGamut.after",e,t,n)})),i.subParser("strikethrough",(function(e,t,n){"use strict";return t.strikethrough&&(e=(e=n.converter._dispatch("strikethrough.before",e,t,n)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,r){return function(e){return t.simplifiedAutoLink&&(e=i.subParser("simplifiedAutoLinks")(e,t,n)),""+e+""}(r)})),e=n.converter._dispatch("strikethrough.after",e,t,n)),e})),i.subParser("stripLinkDefinitions",(function(e,t,n){"use strict";var r=function(e,r,o,a,s,c,l){return r=r.toLowerCase(),o.match(/^data:.+?\/.+?;base64,/)?n.gUrls[r]=o.replace(/\s/g,""):n.gUrls[r]=i.subParser("encodeAmpsAndAngles")(o,t,n),c?c+l:(l&&(n.gTitles[r]=l.replace(/"|'/g,""")),t.parseImgDimensions&&a&&s&&(n.gDimensions[r]={width:a,height:s}),"")};return e=(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,r)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,r)).replace(/¨0/,"")})),i.subParser("tables",(function(e,t,n){"use strict";if(!t.tables)return e;function r(e,r){return""+i.subParser("spanGamut")(e,t,n)+" \n"}function o(e){var o,a=e.split("\n");for(o=0;o"),t.push((o=r.value,void 0,o.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),r.added?t.push(""):r.removed&&t.push("")}var o;return t.join("")}}])},e.exports=r()},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],s=!0;return function e(d){var f=n?i(d):d,h={},p=!0,v={node:f,node_:d,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){v.isRoot||(v.parent.node[v.key]=e),v.node=e,t&&(p=!1)},delete:function(e){delete v.parent.node[v.key],e&&(p=!1)},remove:function(e){c(v.parent.node)?v.parent.node.splice(v.key,1):delete v.parent.node[v.key],e&&(p=!1)},keys:null,before:function(e){h.before=e},after:function(e){h.after=e},pre:function(e){h.pre=e},post:function(e){h.post=e},stop:function(){s=!1},block:function(){p=!1}};if(!s)return v;function m(){if("object"==typeof v.node&&null!==v.node){v.keys&&v.node_===v.node||(v.keys=a(v.node)),v.isLeaf=0==v.keys.length;for(var e=0;eS;S++)O[S]=S+1;O[15]=0;var E=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,C=Object.prototype.hasOwnProperty,T={},x={};function D(e){return!!C.call(x,e)||!C.call(T,e)&&(E.test(e)?x[e]=!0:(T[e]=!0,!1))}function M(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function j(e,t,n,r,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){I[e]=new j(e,0,!1,e,null)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];I[t]=new j(t,1,!1,e[1],null)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){I[e]=new j(e,2,!1,e.toLowerCase(),null)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){I[e]=new j(e,2,!1,e,null)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){I[e]=new j(e,3,!1,e.toLowerCase(),null)})),["checked","multiple","muted","selected"].forEach((function(e){I[e]=new j(e,3,!0,e,null)})),["capture","download"].forEach((function(e){I[e]=new j(e,4,!1,e,null)})),["cols","rows","size","span"].forEach((function(e){I[e]=new j(e,6,!1,e,null)})),["rowSpan","start"].forEach((function(e){I[e]=new j(e,5,!1,e.toLowerCase(),null)}));var P=/[\-:]([a-z])/g;function N(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(P,N);I[t]=new j(t,1,!1,e,null)})),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(P,N);I[t]=new j(t,1,!1,e,"http://www.w3.org/1999/xlink")})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(P,N);I[t]=new j(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")})),["tabIndex","crossOrigin"].forEach((function(e){I[e]=new j(e,1,!1,e.toLowerCase(),null)}));var R=/["'&<>]/;function L(e){if("boolean"==typeof e||"number"==typeof e)return""+e;e=""+e;var t=R.exec(e);if(t){var n,r="",o=0;for(n=t.index;no&&(c.start=0),a>=o&&as&&(c.end=e.length)),c}))}function Ko(e){var t=e.formats,n=e.replacements,r=e.text,o=e.start,i=e.end,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,c={formats:t.slice(0,a),replacements:n.slice(0,a),text:r.slice(0,a)},l={formats:t.slice(s),replacements:n.slice(s),text:r.slice(s),start:0,end:0};return[Bo(c,/\u2028+$/,""),Bo(l,/^\u2028+/,"")]}function Yo(e){var t=e.type,n=e.attributes,r=e.unregisteredAttributes,o=e.object,i=e.boundaryClass,a=function(e){return Qr("core/rich-text").getFormatType(e)}(t),s={};if(i&&(s["data-rich-text-format-boundary"]="true"),!a)return n&&(s=D({},n,s)),{type:t,attributes:s,object:o};for(var c in s=D({},r,s),n){var l=!!a.attributes&&a.attributes[c];l?s[l]=n[c]:s[c]=n[c]}return a.className&&(s.class?s.class="".concat(a.className," ").concat(s.class):s.class=a.className),{type:a.tagName,object:a.object,attributes:s}}var $o={type:"br",attributes:{"data-rich-text-padding":"true"},object:!0};function qo(e){var t,n,r,o=e.value,i=e.multilineTag,a=e.createEmpty,s=e.append,c=e.getLastChild,l=e.getParent,u=e.isText,d=e.getText,f=e.remove,h=e.appendText,p=e.onStartIndex,v=e.onEndIndex,m=e.isEditableTree,b=o.formats,g=o.replacements,y=o.text,k=o.start,_=o.end,w=b.length+1,O=a(),S={type:i},E=Mo(o),C=E[E.length-1];i?(s(s(O,{type:i}),""),n=t=[S]):s(O,"");for(var T=function(e){var o=y.charAt(e),a=m&&(!r||"\u2028"===r||"\n"===r),w=b[e];i&&(w="\u2028"===o?t=(g[e]||[]).reduce((function(e,t){return e.push(t,S),e}),[S]):[].concat(ft(t),ft(w||[])));var E=c(O);if(a&&"\u2028"===o){for(var T=E;!u(T);)T=c(T);s(l(T),$o),s(l(T),"")}if("\u2028"===r){for(var x=E;!u(x);)x=c(x);p&&k===e&&p(O,x),v&&_===e&&v(O,x)}if(w&&w.forEach((function(e,t){if(!E||!n||e!==n[t]||"\u2028"===o&&w.length-1===t){var r=e.type,i=e.attributes,a=e.unregisteredAttributes,h=m&&"\u2028"!==o&&e===C,p=l(E),v=s(p,Yo({type:r,attributes:i,unregisteredAttributes:a,boundaryClass:h}));u(E)&&0===d(E).length&&f(E),E=s(v,"")}else E=c(E)})),"\u2028"===o)return n=w,r=o,"continue";0===e&&(p&&0===k&&p(O,E),v&&0===_&&v(O,E)),""===o?(E=s(l(E),Yo(D({},g[e],{object:!0}))),E=s(l(E),"")):"\n"===o?(E=s(l(E),{type:"br",attributes:m?{"data-rich-text-line-break":"true"}:void 0,object:!0}),E=s(l(E),"")):u(E)?h(E,o):E=s(l(E),o),p&&k===e+1&&p(O,E),v&&_===e+1&&v(O,E),a&&e===y.length&&s(l(E),$o),n=w,r=o},x=0;x"),o=r.pop();e="";for(var i=0;i
";n.push([c,a.substr(s)+""]),e+=a.substr(0,s)+c}else e+=a}e+=o}var l="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";-1!==(e=Hd(e=(e=(e=(e=e.replace(/
\s*
/g,"\n\n")).replace(new RegExp("(<"+l+"[\\s/>])","g"),"\n\n$1")).replace(new RegExp("("+l+">)","g"),"$1\n\n")).replace(/\r\n|\r/g,"\n"),{"\n":" \x3c!-- wpnl --\x3e "})).indexOf("")),-1!==e.indexOf("")&&(e=(e=(e=e.replace(/(")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/g,"$1")),-1===e.indexOf("]*)>/gi,"
")).replace(new RegExp("
|
/g,"
")).replace(/(
)?\s*\n/g,(function(e,t){return t?e:"
\n"}))).replace(/
","g"),"$1")).replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/g,"$1")).replace(/\n<\/p>$/g,"'),mode:"BLOCKS",tagName:this.props.tagName}),d=this.props.onReplace&&this.isEmpty();return window.console.log("Received item:\n\n",l),void(d?this.props.onReplace(u):this.onSplit&&this.onSplit(c,u))}if(!Lo(c)){var f=(i||o).replace(/<[^>]+>/g,"").trim();if(a=f,ke.test(a))return this.onChange(bo(c,{type:"a",attributes:{href:af(f)}})),void window.console.log("Created link:\n\n",f)}var h=this.props.onReplace&&this.isEmpty(),p=this.props.onReplace&&this.props.onSplit,v="INLINE";h?v="BLOCKS":p&&(v="AUTO");var m=op({HTML:i,plainText:o,mode:v,tagName:this.props.tagName,canUserUseUnfilteredHTML:this.props.canUserUseUnfilteredHTML});if("string"==typeof m){var b=Oo({html:m});this.multilineTag&&(b=Bo(b,/\n+/g,"\u2028")),this.onChange(Ho(c,b))}else m.length>0&&(h?this.props.onReplace(m):this.onSplit(c,m))}},{key:"onFocus",value:function(){var e=this.props.unstableOnFocus;e&&e(),this.recalculateBoundaryStyle();this.record=D({},this.record,{start:void 0,end:void 0,activeFormats:void 0}),this.props.onSelectionChange(void 0,void 0),this.setState({activeFormats:void 0}),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onBlur",value:function(){document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"onInput",value:function(e){if(e&&e.nativeEvent.isComposing)document.removeEventListener("selectionchange",this.onSelectionChange);else{if(e&&e.nativeEvent.inputType){var t=e.nativeEvent.inputType;if(0===t.indexOf("format")||KO.has(t))return void this.applyRecord(this.getRecord())}var n=this.createRecord(),r=this.record,o=r.start,i=r.activeFormats,a=void 0===i?[]:i,s=Oi({value:n,start:o,end:n.start,formats:a});this.onChange(s,{withoutHistory:!0});var c=this.patterns.reduce((function(e,t){return t(e)}),s);c!==s&&(this.onCreateUndoLevel(),this.onChange(D({},c,{activeFormats:a}))),this.props.clearTimeout(this.onInput.timeout),this.onInput.timeout=this.props.setTimeout(this.onCreateUndoLevel,1e3)}}},{key:"onCompositionEnd",value:function(){this.onInput(),document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"onSelectionChange",value:function(){var e=this.createRecord(),t=e.start,n=e.end,r=this.getRecord();if(t!==r.start||n!==r.end){var o=this.props.isCaretWithinFormattedText,i=D({},r,{start:t,end:n,activeFormats:void 0}),a=Mo(i);i.activeFormats=a,!o&&a.length?this.props.onEnterFormattedText():o&&!a.length&&this.props.onExitFormattedText(),this.record=i,this.applyRecord(i,{domOnly:!0}),this.props.onSelectionChange(t,n),this.setState({activeFormats:a}),a.length>0&&this.recalculateBoundaryStyle()}}},{key:"recalculateBoundaryStyle",value:function(){var e=this.editableRef.querySelector("*[data-rich-text-format-boundary]");if(e){var t=WO(e).color.replace(")",", 0.2)").replace("rgb","rgba"),n=".".concat("block-editor-rich-text__editable",":focus ").concat("*[data-rich-text-format-boundary]"),r="background-color: ".concat(t);YO.innerHTML="".concat(n," {").concat(r,"}")}}},{key:"onChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.withoutHistory;this.applyRecord(e);var r=e.start,o=e.end,i=e.activeFormats,a=void 0===i?[]:i,s=Object(N.pickBy)(this.props,(function(e,t){return t.startsWith("format_on_change_functions_")}));Object.values(s).forEach((function(t){t(e.formats,e.text)})),this.value=this.valueToFormat(e),this.record=e,this.props.onChange(this.value),this.props.onSelectionChange(r,o),this.setState({activeFormats:a}),n||this.onCreateUndoLevel()}},{key:"onCreateUndoLevel",value:function(){this.lastHistoryValue!==this.value&&(this.props.onCreateUndoLevel(),this.lastHistoryValue=this.value)}},{key:"onDeleteKeyDown",value:function(e){var t=this.props,n=t.onMerge,r=t.onRemove;if(n||r){var o=8===e.keyCode;if(Lo(this.createRecord())){var i=this.isEmpty();(i||Fi(this.editableRef,o))&&(n&&n(!o),r&&i&&o&&r(!o),e.preventDefault())}}}},{key:"onKeyDown",value:function(e){var t=e.keyCode,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey,a=this.props,s=a.onReplace,c=a.onSplit,l=s&&c;if(n||r||o||i||37!==t&&39!==t||this.handleHorizontalNavigation(e),32===t&&"li"===this.multilineTag){var u=this.createRecord();if(Lo(u)){var d=u.text[u.start-1];d&&"\u2028"!==d||(this.onChange(yi(u,{type:this.props.tagName})),e.preventDefault())}}if(46===t||8===t){var f=this.createRecord(),h=f.start,p=f.end;if(0===h&&0!==p&&p===f.text.length)return this.onChange(Vo(f)),void e.preventDefault();if(this.multilineTag){var v=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.replacements,r=e.text,o=e.start,i=e.end,a=Lo(e),s=o-1,c=a?o-1:o,l=i;if(t||(s=i,c=o,l=a?i+1:i),"\u2028"===r[s]){var u;if(a&&n[s]&&n[s].length){var d=n.slice();d[s]=n[s].slice(0,-1),u=D({},e,{replacements:d})}else u=Vo(e,c,l);return u}}(f,8===t);v&&(this.onChange(v),e.preventDefault())}this.onDeleteKeyDown(e)}else if(13===t){e.preventDefault();var m=this.createRecord();if(this.props.onReplace){var b=Io(m),g=Td(this.enterPatterns,(function(e){return e.regExp.test(b)}));if(g)return void this.props.onReplace([g.transform({content:b})])}this.multilineTag?e.shiftKey?this.onChange(Ho(m,"\n")):l&&function(e){var t=e.text,n=e.start,r=e.end;return n===r&&(0===t.length||(0===n&&"\u2028"===t.slice(0,1)||(n===t.length&&"\u2028"===t.slice(-1)||t.slice(n-1,r+1)==="".concat("\u2028").concat("\u2028"))))}(m)?this.onSplit(m):this.onChange(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.start,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.end,r=Io(e).slice(0,t),o=r.lastIndexOf("\u2028"),i=e.replacements[o],a=[,];i&&(a=[i]);var s={formats:[,],replacements:a,text:"\u2028"};return Ho(e,s,t,n)}(m)):e.shiftKey||!l?this.onChange(Ho(m,"\n")):this.onSplit(m)}}},{key:"handleHorizontalNavigation",value:function(e){var t=this,n=this.getRecord(),r=n.text,o=n.formats,i=n.start,a=n.end,s=n.activeFormats,c=void 0===s?[]:s,l=Lo(n),u="rtl"===WO(this.editableRef).direction?39:37,d=e.keyCode===u;if(l&&0===c.length){if(0===i&&d)return;if(a===r.length&&!d)return}if(l){e.preventDefault();var f=o[i-1]||[],h=o[i]||[],p=c.length,v=h;if(f.length>h.length&&(v=f),f.length
=0?(u=m.substr(0,f),p=m.substr(f+1)):(u=m,p=""),h=decodeURIComponent(u),d=decodeURIComponent(p),r(a,h)?Array.isArray(a[h])?a[h].push(d):a[h]=[a[h],d]:a[h]=d}return a}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var a=encodeURIComponent(r(i))+n;return Array.isArray(e[i])?e[i].map((function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[i]))})).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""}},function(e,t,n){e.exports=function(e){function t(e){let t=0;for(let n=0;n=n)return s;if(34!==(a=e.charCodeAt(t))&&39!==a&&40!==a)return s;for(t++,40===a&&(a=41);t
\n"},o.fence=function(e,t,n,r,o){var c,s,l,u,p=e[t],h=p.info?i(p.info).trim():"",d="";return h&&(d=h.split(/\s+/g)[0]),0===(c=n.highlight&&n.highlight(p.content,d)||a(p.content)).indexOf(""+a(e[t].content)+"
\n"):""+c+"
\n"},o.image=function(e,t,n,r,i){var a=e[t];return a.attrs[a.attrIndex("alt")][1]=i.renderInlineAsText(a.children,n,r),i.renderToken(e,t,n)},o.hardbreak=function(e,t,n){return n.xhtmlOut?""+c+"
\n":"
\n"},o.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},o.text=function(e,t){return a(e[t].content)},o.html_block=function(e,t){return e[t].content},o.html_inline=function(e,t){return e[t].content},c.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t=128&&h("not-basic"),n.push(e.charCodeAt(l));for(var p=s>0?s+1:0;pd((c-n)/(v=r+1))&&m("overflow"),n+=(s-t)*v,t=s,o=0;oc&&m("overflow"),f==t){for(l=n,u=36;!(l<(p=u<=i?1:u>=i+26?26:u-i));u+=36)k=l-p,_=36-p,O.push(h(j(p+k%_,0))),l=d(k/_);O.push(h(j(l,0))),i=y(n,v,r==a),n=0,++r}++n,++t}return O.join("")}o={version:"1.3.2",ucs2:{decode:g,encode:v},decode:_,encode:k,toASCII:function(e){return b(e,(function(e){return l.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return b(e,(function(e){return s.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()}).call(this,n(137)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(140),t.encode=t.stringify=n(141)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var c=1e3;a&&"number"==typeof a.maxKeys&&(c=a.maxKeys);var s=e.length;c>0&&s>c&&(s=c);for(var l=0;l=0?(u=m.substr(0,f),p=m.substr(f+1)):(u=m,p=""),d=decodeURIComponent(u),h=decodeURIComponent(p),r(i,d)?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(a){var i=encodeURIComponent(r(a))+n;return Array.isArray(e[a])?e[a].map((function(e){return i+encodeURIComponent(r(e))})).join(t):i+encodeURIComponent(r(e[a]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""}},function(e,t,n){var r=n(21);e.exports=function(e){function t(e){for(var t=0,n=0;n=n)return s;if(34!==(i=e.charCodeAt(t))&&39!==i&&40!==i)return s;for(t++,40===i&&(i=41);t
\n"},o.fence=function(e,t,n,r,o){var c,s,l,u,p=e[t],d=p.info?a(p.info).trim():"",h="";return d&&(h=d.split(/\s+/g)[0]),0===(c=n.highlight&&n.highlight(p.content,h)||i(p.content)).indexOf(""+i(e[t].content)+"
\n"):""+c+"
\n"},o.image=function(e,t,n,r,a){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=a.renderInlineAsText(i.children,n,r),a.renderToken(e,t,n)},o.hardbreak=function(e,t,n){return n.xhtmlOut?""+c+"
\n":"
\n"},o.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},o.text=function(e,t){return i(e[t].content)},o.html_block=function(e,t){return e[t].content},o.html_inline=function(e,t){return e[t].content},c.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t